Update code generation (#969)
* Updated code generation scripts to use the new spec * API generation * Fix bad link
This commit is contained in:
committed by
GitHub
parent
4ff1bd5110
commit
69247496ce
@ -10,22 +10,6 @@
|
|||||||
function buildBulk (opts) {
|
function buildBulk (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - Default index for items which don't provide one
|
|
||||||
* @param {string} type - Default document type for items which don't provide one
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {string} type - Default document type for items which don't provide one
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
|
|
||||||
* @param {list} _source_excludes - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
|
|
||||||
* @param {list} _source_includes - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
|
|
||||||
* @param {string} pipeline - The pipeline id to preprocess incoming documents with
|
|
||||||
* @param {object} body - The operation definition and data (action-data pairs), separated by newlines
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_active_shards',
|
'wait_for_active_shards',
|
||||||
@ -56,6 +40,11 @@ function buildBulk (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a bulk request
|
||||||
|
* Allows to perform multiple index/update/delete operations in a single request.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html
|
||||||
|
*/
|
||||||
return function bulk (params, options, callback) {
|
return function bulk (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -90,10 +79,6 @@ function buildBulk (opts) {
|
|||||||
var { method, body, index, type, ...querystring } = params
|
var { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -102,10 +87,13 @@ function buildBulk (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
|
||||||
} else if ((index) != null) {
|
} else if ((index) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_bulk'
|
path = '/' + encodeURIComponent(index) + '/' + '_bulk'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_bulk'
|
path = '/' + '_bulk'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatAliases (opts) {
|
function buildCatAliases (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.aliases](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html) request
|
|
||||||
*
|
|
||||||
* @param {list} name - A comma-separated list of alias names to return
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -44,6 +32,11 @@ function buildCatAliases (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.aliases request
|
||||||
|
* Shows information about currently configured aliases to indices including filter and routing infos.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html
|
||||||
|
*/
|
||||||
return function catAliases (params, options, callback) {
|
return function catAliases (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,12 +49,6 @@ function buildCatAliases (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -72,10 +59,6 @@ function buildCatAliases (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -84,8 +67,10 @@ function buildCatAliases (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
|
path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'aliases'
|
path = '/' + '_cat' + '/' + 'aliases'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildCatAllocation (opts) {
|
function buildCatAllocation (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html) request
|
|
||||||
*
|
|
||||||
* @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -46,6 +33,11 @@ function buildCatAllocation (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.allocation request
|
||||||
|
* Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html
|
||||||
|
*/
|
||||||
return function catAllocation (params, options, callback) {
|
return function catAllocation (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,12 +50,6 @@ function buildCatAllocation (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -74,10 +60,6 @@ function buildCatAllocation (opts) {
|
|||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
var { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,8 +68,10 @@ function buildCatAllocation (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
|
path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'allocation'
|
path = '/' + '_cat' + '/' + 'allocation'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatCount (opts) {
|
function buildCatCount (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -44,6 +32,11 @@ function buildCatCount (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.count request
|
||||||
|
* Provides quick access to the document count of the entire cluster, or individual indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html
|
||||||
|
*/
|
||||||
return function catCount (params, options, callback) {
|
return function catCount (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,12 +49,6 @@ function buildCatCount (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -72,10 +59,6 @@ function buildCatCount (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -84,8 +67,10 @@ function buildCatCount (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
|
path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'count'
|
path = '/' + '_cat' + '/' + 'count'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,20 +10,6 @@
|
|||||||
function buildCatFielddata (opts) {
|
function buildCatFielddata (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html) request
|
|
||||||
*
|
|
||||||
* @param {list} fields - A comma-separated list of fields to return the fielddata size
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
* @param {list} fields - A comma-separated list of fields to return in the output
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -48,6 +34,11 @@ function buildCatFielddata (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.fielddata request
|
||||||
|
* Shows how much heap memory is currently being used by fielddata on every data node in the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html
|
||||||
|
*/
|
||||||
return function catFielddata (params, options, callback) {
|
return function catFielddata (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -60,12 +51,6 @@ function buildCatFielddata (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -76,10 +61,6 @@ function buildCatFielddata (opts) {
|
|||||||
var { method, body, fields, ...querystring } = params
|
var { method, body, fields, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -88,8 +69,10 @@ function buildCatFielddata (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((fields) != null) {
|
if ((fields) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
|
path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'fielddata'
|
path = '/' + '_cat' + '/' + 'fielddata'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatHealth (opts) {
|
function buildCatHealth (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} ts - Set to false to disable timestamping
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -45,6 +33,11 @@ function buildCatHealth (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.health request
|
||||||
|
* Returns a concise representation of the cluster health.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html
|
||||||
|
*/
|
||||||
return function catHealth (params, options, callback) {
|
return function catHealth (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -57,12 +50,6 @@ function buildCatHealth (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -73,10 +60,6 @@ function buildCatHealth (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -84,6 +67,7 @@ function buildCatHealth (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'health'
|
path = '/' + '_cat' + '/' + 'health'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildCatHelp (opts) {
|
function buildCatHelp (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'help',
|
'help',
|
||||||
@ -32,6 +26,11 @@ function buildCatHelp (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.help request
|
||||||
|
* Returns help for the Cat APIs.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html
|
||||||
|
*/
|
||||||
return function catHelp (params, options, callback) {
|
return function catHelp (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -44,12 +43,6 @@ function buildCatHelp (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -60,10 +53,6 @@ function buildCatHelp (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -71,6 +60,7 @@ function buildCatHelp (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat'
|
path = '/' + '_cat'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,22 +10,6 @@
|
|||||||
function buildCatIndices (opts) {
|
function buildCatIndices (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {enum} health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {boolean} pri - Set to true to return stats only for primary shards
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
* @param {boolean} include_unloaded_segments - If set to true segment stats will include stats for segments that are not currently loaded into memory
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -53,6 +37,11 @@ function buildCatIndices (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.indices request
|
||||||
|
* Returns information about indices: number of primaries and replicas, document counts, disk size, ...
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html
|
||||||
|
*/
|
||||||
return function catIndices (params, options, callback) {
|
return function catIndices (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -65,12 +54,6 @@ function buildCatIndices (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -81,10 +64,6 @@ function buildCatIndices (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -93,8 +72,10 @@ function buildCatIndices (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
|
path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'indices'
|
path = '/' + '_cat' + '/' + 'indices'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatMaster (opts) {
|
function buildCatMaster (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -43,6 +32,11 @@ function buildCatMaster (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.master request
|
||||||
|
* Returns information about the master node.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html
|
||||||
|
*/
|
||||||
return function catMaster (params, options, callback) {
|
return function catMaster (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +49,6 @@ function buildCatMaster (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +59,6 @@ function buildCatMaster (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,6 +66,7 @@ function buildCatMaster (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'master'
|
path = '/' + '_cat' + '/' + 'master'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatNodeattrs (opts) {
|
function buildCatNodeattrs (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -43,6 +32,11 @@ function buildCatNodeattrs (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.nodeattrs request
|
||||||
|
* Returns information about custom node attributes.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html
|
||||||
|
*/
|
||||||
return function catNodeattrs (params, options, callback) {
|
return function catNodeattrs (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +49,6 @@ function buildCatNodeattrs (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +59,6 @@ function buildCatNodeattrs (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,6 +66,7 @@ function buildCatNodeattrs (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'nodeattrs'
|
path = '/' + '_cat' + '/' + 'nodeattrs'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatNodes (opts) {
|
function buildCatNodes (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} full_id - Return the full node ID instead of the shortened version (default: false)
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -46,6 +34,11 @@ function buildCatNodes (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.nodes request
|
||||||
|
* Returns basic statistics about performance of cluster nodes.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html
|
||||||
|
*/
|
||||||
return function catNodes (params, options, callback) {
|
return function catNodes (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,12 +51,6 @@ function buildCatNodes (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -74,10 +61,6 @@ function buildCatNodes (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -85,6 +68,7 @@ function buildCatNodes (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'nodes'
|
path = '/' + '_cat' + '/' + 'nodes'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatPendingTasks (opts) {
|
function buildCatPendingTasks (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.pending_tasks](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -43,6 +32,11 @@ function buildCatPendingTasks (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.pending_tasks request
|
||||||
|
* Returns a concise representation of the cluster pending tasks.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
|
||||||
|
*/
|
||||||
return function catPendingTasks (params, options, callback) {
|
return function catPendingTasks (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +49,6 @@ function buildCatPendingTasks (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +59,6 @@ function buildCatPendingTasks (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,6 +66,7 @@ function buildCatPendingTasks (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'pending_tasks'
|
path = '/' + '_cat' + '/' + 'pending_tasks'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatPlugins (opts) {
|
function buildCatPlugins (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -43,6 +32,11 @@ function buildCatPlugins (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.plugins request
|
||||||
|
* Returns information about installed plugins across nodes node.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
|
||||||
|
*/
|
||||||
return function catPlugins (params, options, callback) {
|
return function catPlugins (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +49,6 @@ function buildCatPlugins (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +59,6 @@ function buildCatPlugins (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,6 +66,7 @@ function buildCatPlugins (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'plugins'
|
path = '/' + '_cat' + '/' + 'plugins'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatRecovery (opts) {
|
function buildCatRecovery (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -44,6 +32,11 @@ function buildCatRecovery (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.recovery request
|
||||||
|
* Returns information about index shard recoveries, both on-going completed.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html
|
||||||
|
*/
|
||||||
return function catRecovery (params, options, callback) {
|
return function catRecovery (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,12 +49,6 @@ function buildCatRecovery (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -72,10 +59,6 @@ function buildCatRecovery (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -84,8 +67,10 @@ function buildCatRecovery (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'recovery'
|
path = '/' + '_cat' + '/' + 'recovery'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatRepositories (opts) {
|
function buildCatRepositories (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -43,6 +32,11 @@ function buildCatRepositories (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.repositories request
|
||||||
|
* Returns information about snapshot repositories registered in the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html
|
||||||
|
*/
|
||||||
return function catRepositories (params, options, callback) {
|
return function catRepositories (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +49,6 @@ function buildCatRepositories (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +59,6 @@ function buildCatRepositories (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,6 +66,7 @@ function buildCatRepositories (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'repositories'
|
path = '/' + '_cat' + '/' + 'repositories'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildCatSegments (opts) {
|
function buildCatSegments (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -41,6 +30,11 @@ function buildCatSegments (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.segments request
|
||||||
|
* Provides low-level information about the segments in the shards of an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html
|
||||||
|
*/
|
||||||
return function catSegments (params, options, callback) {
|
return function catSegments (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -53,12 +47,6 @@ function buildCatSegments (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -69,10 +57,6 @@ function buildCatSegments (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -81,8 +65,10 @@ function buildCatSegments (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'segments'
|
path = '/' + '_cat' + '/' + 'segments'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildCatShards (opts) {
|
function buildCatShards (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to limit the returned information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} bytes - The unit in which to display byte values
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -46,6 +33,11 @@ function buildCatShards (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.shards request
|
||||||
|
* Provides a detailed view of shard allocation on nodes.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html
|
||||||
|
*/
|
||||||
return function catShards (params, options, callback) {
|
return function catShards (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,12 +50,6 @@ function buildCatShards (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -74,10 +60,6 @@ function buildCatShards (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,8 +68,10 @@ function buildCatShards (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'shards'
|
path = '/' + '_cat' + '/' + 'shards'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatSnapshots (opts) {
|
function buildCatSnapshots (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
|
|
||||||
*
|
|
||||||
* @param {list} repository - Name of repository from which to fetch the snapshot information
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} ignore_unavailable - Set to true to ignore unavailable snapshots
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -45,6 +33,11 @@ function buildCatSnapshots (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.snapshots request
|
||||||
|
* Returns all snapshots in a specific repository.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html
|
||||||
|
*/
|
||||||
return function catSnapshots (params, options, callback) {
|
return function catSnapshots (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -57,12 +50,6 @@ function buildCatSnapshots (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -73,10 +60,6 @@ function buildCatSnapshots (opts) {
|
|||||||
var { method, body, repository, ...querystring } = params
|
var { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -85,8 +68,10 @@ function buildCatSnapshots (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((repository) != null) {
|
if ((repository) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
|
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'snapshots'
|
path = '/' + '_cat' + '/' + 'snapshots'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildCatTasks (opts) {
|
function buildCatTasks (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.tasks](https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
|
|
||||||
*
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
|
||||||
* @param {list} actions - A comma-separated list of actions that should be returned. Leave empty to return all.
|
|
||||||
* @param {boolean} detailed - Return detailed task information (default: false)
|
|
||||||
* @param {number} parent_task - Return tasks with specified parent task id. Set to -1 to return all.
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -48,6 +35,11 @@ function buildCatTasks (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.tasks request
|
||||||
|
* Returns information about the tasks currently executing on one or more nodes in the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html
|
||||||
|
*/
|
||||||
return function catTasks (params, options, callback) {
|
return function catTasks (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -60,12 +52,6 @@ function buildCatTasks (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -76,10 +62,6 @@ function buildCatTasks (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -87,6 +69,7 @@ function buildCatTasks (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'tasks'
|
path = '/' + '_cat' + '/' + 'tasks'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildCatTemplates (opts) {
|
function buildCatTemplates (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.templates](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html) request
|
|
||||||
*
|
|
||||||
* @param {string} name - A pattern that returned template names must match
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -44,6 +32,11 @@ function buildCatTemplates (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.templates request
|
||||||
|
* Returns information about existing templates.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html
|
||||||
|
*/
|
||||||
return function catTemplates (params, options, callback) {
|
return function catTemplates (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,12 +49,6 @@ function buildCatTemplates (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -72,10 +59,6 @@ function buildCatTemplates (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -84,8 +67,10 @@ function buildCatTemplates (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
|
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'templates'
|
path = '/' + '_cat' + '/' + 'templates'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildCatThreadPool (opts) {
|
function buildCatThreadPool (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cat.thread_pool](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
|
|
||||||
*
|
|
||||||
* @param {list} thread_pool_patterns - A comma-separated list of regular-expressions to filter the thread pools in the output
|
|
||||||
* @param {string} format - a short version of the Accept header, e.g. json, yaml
|
|
||||||
* @param {enum} size - The multiplier in which to display values
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {list} h - Comma-separated list of column names to display
|
|
||||||
* @param {boolean} help - Return help information
|
|
||||||
* @param {list} s - Comma-separated list of column names or column aliases to sort by
|
|
||||||
* @param {boolean} v - Verbose mode. Display column headers
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'format',
|
'format',
|
||||||
@ -46,6 +33,12 @@ function buildCatThreadPool (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cat.thread_pool request
|
||||||
|
* Returns cluster-wide thread pool statistics per node.
|
||||||
|
By default the active, queue and rejected statistics are returned for all thread pools.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html
|
||||||
|
*/
|
||||||
return function catThreadPool (params, options, callback) {
|
return function catThreadPool (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,12 +51,6 @@ function buildCatThreadPool (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -74,10 +61,6 @@ function buildCatThreadPool (opts) {
|
|||||||
var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
|
var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,8 +69,10 @@ function buildCatThreadPool (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'thread_pool'
|
path = '/' + '_cat' + '/' + 'thread_pool'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrDeleteAutoFollowPattern (opts) {
|
function buildCcrDeleteAutoFollowPattern (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.delete_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html) request
|
|
||||||
*
|
|
||||||
* @param {string} name - The name of the auto follow pattern.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrDeleteAutoFollowPattern (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.delete_auto_follow_pattern request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html
|
||||||
|
*/
|
||||||
return function ccrDeleteAutoFollowPattern (params, options, callback) {
|
return function ccrDeleteAutoFollowPattern (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildCcrDeleteAutoFollowPattern (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,6 +58,7 @@ function buildCcrDeleteAutoFollowPattern (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildCcrFollow (opts) {
|
function buildCcrFollow (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the follower index
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {object} body - The name of the leader index and other optional ccr related parameters
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_active_shards'
|
'wait_for_active_shards'
|
||||||
@ -26,6 +19,10 @@ function buildCcrFollow (opts) {
|
|||||||
waitForActiveShards: 'wait_for_active_shards'
|
waitForActiveShards: 'wait_for_active_shards'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.follow request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html
|
||||||
|
*/
|
||||||
return function ccrFollow (params, options, callback) {
|
return function ccrFollow (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,10 +55,6 @@ function buildCcrFollow (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -69,6 +62,7 @@ function buildCcrFollow (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrFollowInfo (opts) {
|
function buildCcrFollowInfo (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.follow_info](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrFollowInfo (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.follow_info request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html
|
||||||
|
*/
|
||||||
return function ccrFollowInfo (params, options, callback) {
|
return function ccrFollowInfo (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -36,6 +35,12 @@ function buildCcrFollowInfo (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check required parameters
|
||||||
|
if (params['index'] == null) {
|
||||||
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -46,10 +51,6 @@ function buildCcrFollowInfo (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -57,6 +58,7 @@ function buildCcrFollowInfo (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrFollowStats (opts) {
|
function buildCcrFollowStats (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.follow_stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index patterns; use `_all` to perform the operation on all indices
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrFollowStats (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.follow_stats request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html
|
||||||
|
*/
|
||||||
return function ccrFollowStats (params, options, callback) {
|
return function ccrFollowStats (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildCcrFollowStats (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,6 +58,7 @@ function buildCcrFollowStats (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildCcrForgetFollower (opts) {
|
function buildCcrForgetFollower (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.forget_follower](http://www.elastic.co/guide/en/elasticsearch/reference/current) request
|
|
||||||
*
|
|
||||||
* @param {string} index - the name of the leader index for which specified follower retention leases should be removed
|
|
||||||
* @param {object} body - the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -25,6 +19,10 @@ function buildCcrForgetFollower (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.forget_follower request
|
||||||
|
* http://www.elastic.co/guide/en/elasticsearch/reference/current
|
||||||
|
*/
|
||||||
return function ccrForgetFollower (params, options, callback) {
|
return function ccrForgetFollower (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -57,10 +55,6 @@ function buildCcrForgetFollower (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,6 +62,7 @@ function buildCcrForgetFollower (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrGetAutoFollowPattern (opts) {
|
function buildCcrGetAutoFollowPattern (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.get_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html) request
|
|
||||||
*
|
|
||||||
* @param {string} name - The name of the auto follow pattern.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrGetAutoFollowPattern (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.get_auto_follow_pattern request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html
|
||||||
|
*/
|
||||||
return function ccrGetAutoFollowPattern (params, options, callback) {
|
return function ccrGetAutoFollowPattern (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -46,10 +45,6 @@ function buildCcrGetAutoFollowPattern (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -58,8 +53,10 @@ function buildCcrGetAutoFollowPattern (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow'
|
path = '/' + '_ccr' + '/' + 'auto_follow'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrPauseFollow (opts) {
|
function buildCcrPauseFollow (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.pause_follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the follower index that should pause following its leader index.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrPauseFollow (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.pause_follow request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html
|
||||||
|
*/
|
||||||
return function ccrPauseFollow (params, options, callback) {
|
return function ccrPauseFollow (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildCcrPauseFollow (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,6 +58,7 @@ function buildCcrPauseFollow (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildCcrPutAutoFollowPattern (opts) {
|
function buildCcrPutAutoFollowPattern (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.put_auto_follow_pattern](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html) request
|
|
||||||
*
|
|
||||||
* @param {string} name - The name of the auto follow pattern.
|
|
||||||
* @param {object} body - The specification of the auto follow pattern
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -25,6 +19,10 @@ function buildCcrPutAutoFollowPattern (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.put_auto_follow_pattern request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html
|
||||||
|
*/
|
||||||
return function ccrPutAutoFollowPattern (params, options, callback) {
|
return function ccrPutAutoFollowPattern (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -57,10 +55,6 @@ function buildCcrPutAutoFollowPattern (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,6 +62,7 @@ function buildCcrPutAutoFollowPattern (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildCcrResumeFollow (opts) {
|
function buildCcrResumeFollow (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.resume_follow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the follow index to resume following.
|
|
||||||
* @param {object} body - The name of the leader index and other optional ccr related parameters
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -25,6 +19,10 @@ function buildCcrResumeFollow (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.resume_follow request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html
|
||||||
|
*/
|
||||||
return function ccrResumeFollow (params, options, callback) {
|
return function ccrResumeFollow (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -53,10 +51,6 @@ function buildCcrResumeFollow (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -64,6 +58,7 @@ function buildCcrResumeFollow (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,10 +10,6 @@
|
|||||||
function buildCcrStats (opts) {
|
function buildCcrStats (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html) request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -23,6 +19,10 @@ function buildCcrStats (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.stats request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
|
||||||
|
*/
|
||||||
return function ccrStats (params, options, callback) {
|
return function ccrStats (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -45,10 +45,6 @@ function buildCcrStats (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -56,6 +52,7 @@ function buildCcrStats (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ccr' + '/' + 'stats'
|
path = '/' + '_ccr' + '/' + 'stats'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildCcrUnfollow (opts) {
|
function buildCcrUnfollow (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ccr.unfollow](http://www.elastic.co/guide/en/elasticsearch/reference/current) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the follower index that should be turned into a regular index.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildCcrUnfollow (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ccr.unfollow request
|
||||||
|
* http://www.elastic.co/guide/en/elasticsearch/reference/current
|
||||||
|
*/
|
||||||
return function ccrUnfollow (params, options, callback) {
|
return function ccrUnfollow (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildCcrUnfollow (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,6 +58,7 @@ function buildCcrUnfollow (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildClearScroll (opts) {
|
function buildClearScroll (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [clear_scroll](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api) request
|
|
||||||
*
|
|
||||||
* @param {list} scroll_id - A comma-separated list of scroll IDs to clear
|
|
||||||
* @param {object} body - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'pretty',
|
'pretty',
|
||||||
@ -30,6 +24,11 @@ function buildClearScroll (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a clear_scroll request
|
||||||
|
* Explicitly clears the search context for a scroll.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api
|
||||||
|
*/
|
||||||
return function clearScroll (params, options, callback) {
|
return function clearScroll (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildClearScroll (opts) {
|
|||||||
var { method, body, scrollId, scroll_id, ...querystring } = params
|
var { method, body, scrollId, scroll_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -64,8 +59,10 @@ function buildClearScroll (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((scroll_id || scrollId) != null) {
|
if ((scroll_id || scrollId) != null) {
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_search' + '/' + 'scroll'
|
path = '/' + '_search' + '/' + 'scroll'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildClusterAllocationExplain (opts) {
|
function buildClusterAllocationExplain (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.allocation_explain](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} include_yes_decisions - Return 'YES' decisions in explanation (default: false)
|
|
||||||
* @param {boolean} include_disk_info - Return information about disk usage and shard sizes (default: false)
|
|
||||||
* @param {object} body - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_yes_decisions',
|
'include_yes_decisions',
|
||||||
@ -35,6 +28,11 @@ function buildClusterAllocationExplain (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.allocation_explain request
|
||||||
|
* Provides explanations for shard allocations in the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html
|
||||||
|
*/
|
||||||
return function clusterAllocationExplain (params, options, callback) {
|
return function clusterAllocationExplain (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -57,10 +55,6 @@ function buildClusterAllocationExplain (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,6 +62,7 @@ function buildClusterAllocationExplain (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
|
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildClusterGetSettings (opts) {
|
function buildClusterGetSettings (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.get_settings](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {boolean} include_defaults - Whether to return all default clusters setting.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'flat_settings',
|
'flat_settings',
|
||||||
@ -39,6 +31,11 @@ function buildClusterGetSettings (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.get_settings request
|
||||||
|
* Returns cluster settings.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
|
||||||
|
*/
|
||||||
return function clusterGetSettings (params, options, callback) {
|
return function clusterGetSettings (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -51,12 +48,6 @@ function buildClusterGetSettings (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -67,10 +58,6 @@ function buildClusterGetSettings (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -78,6 +65,7 @@ function buildClusterGetSettings (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'settings'
|
path = '/' + '_cluster' + '/' + 'settings'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,22 +10,6 @@
|
|||||||
function buildClusterHealth (opts) {
|
function buildClusterHealth (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - Limit the information returned to a specific index
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {enum} level - Specify the level of detail for returned information
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {string} wait_for_active_shards - Wait until the specified number of shards is active
|
|
||||||
* @param {string} wait_for_nodes - Wait until the specified number of nodes is available
|
|
||||||
* @param {enum} wait_for_events - Wait until all currently queued events with the given priority are processed
|
|
||||||
* @param {boolean} wait_for_no_relocating_shards - Whether to wait until there are no relocating shards in the cluster
|
|
||||||
* @param {boolean} wait_for_no_initializing_shards - Whether to wait until there are no initializing shards in the cluster
|
|
||||||
* @param {enum} wait_for_status - Wait until cluster is in a specific state
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'expand_wildcards',
|
'expand_wildcards',
|
||||||
@ -59,6 +43,11 @@ function buildClusterHealth (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.health request
|
||||||
|
* Returns basic information about the health of the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html
|
||||||
|
*/
|
||||||
return function clusterHealth (params, options, callback) {
|
return function clusterHealth (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -71,12 +60,6 @@ function buildClusterHealth (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -87,10 +70,6 @@ function buildClusterHealth (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -99,8 +78,10 @@ function buildClusterHealth (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
|
path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'health'
|
path = '/' + '_cluster' + '/' + 'health'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildClusterPendingTasks (opts) {
|
function buildClusterPendingTasks (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.pending_tasks](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'local',
|
'local',
|
||||||
@ -33,6 +27,12 @@ function buildClusterPendingTasks (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.pending_tasks request
|
||||||
|
* Returns a list of any cluster-level changes (e.g. create index, update mapping,
|
||||||
|
allocate or fail shard) which have not yet been executed.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html
|
||||||
|
*/
|
||||||
return function clusterPendingTasks (params, options, callback) {
|
return function clusterPendingTasks (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -45,12 +45,6 @@ function buildClusterPendingTasks (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -61,10 +55,6 @@ function buildClusterPendingTasks (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -72,6 +62,7 @@ function buildClusterPendingTasks (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'pending_tasks'
|
path = '/' + '_cluster' + '/' + 'pending_tasks'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildClusterPutSettings (opts) {
|
function buildClusterPutSettings (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.put_settings](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {object} body - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart).
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'flat_settings',
|
'flat_settings',
|
||||||
@ -37,6 +29,11 @@ function buildClusterPutSettings (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.put_settings request
|
||||||
|
* Updates the cluster settings.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html
|
||||||
|
*/
|
||||||
return function clusterPutSettings (params, options, callback) {
|
return function clusterPutSettings (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -65,10 +62,6 @@ function buildClusterPutSettings (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -76,6 +69,7 @@ function buildClusterPutSettings (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_cluster' + '/' + 'settings'
|
path = '/' + '_cluster' + '/' + 'settings'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,10 +10,6 @@
|
|||||||
function buildClusterRemoteInfo (opts) {
|
function buildClusterRemoteInfo (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.remote_info](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html) request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'pretty',
|
'pretty',
|
||||||
@ -28,6 +24,11 @@ function buildClusterRemoteInfo (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.remote_info request
|
||||||
|
* Returns the information about configured remote clusters.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html
|
||||||
|
*/
|
||||||
return function clusterRemoteInfo (params, options, callback) {
|
return function clusterRemoteInfo (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -40,12 +41,6 @@ function buildClusterRemoteInfo (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -56,10 +51,6 @@ function buildClusterRemoteInfo (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -67,6 +58,7 @@ function buildClusterRemoteInfo (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_remote' + '/' + 'info'
|
path = '/' + '_remote' + '/' + 'info'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildClusterReroute (opts) {
|
function buildClusterReroute (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html) request
|
|
||||||
*
|
|
||||||
* @param {boolean} dry_run - Simulate the operation only and return the resulting state
|
|
||||||
* @param {boolean} explain - Return an explanation of why the commands can or cannot be executed
|
|
||||||
* @param {boolean} retry_failed - Retries allocation of shards that are blocked due to too many subsequent allocation failures
|
|
||||||
* @param {list} metric - Limit the information returned to the specified metrics. Defaults to all but metadata
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {object} body - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'dry_run',
|
'dry_run',
|
||||||
@ -44,6 +33,11 @@ function buildClusterReroute (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.reroute request
|
||||||
|
* Allows to manually change the allocation of individual shards in the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html
|
||||||
|
*/
|
||||||
return function clusterReroute (params, options, callback) {
|
return function clusterReroute (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -66,10 +60,6 @@ function buildClusterReroute (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -77,6 +67,7 @@ function buildClusterReroute (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_cluster' + '/' + 'reroute'
|
path = '/' + '_cluster' + '/' + 'reroute'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,20 +10,6 @@
|
|||||||
function buildClusterState (opts) {
|
function buildClusterState (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {list} metric - Limit the information returned to the specified metrics
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {number} wait_for_metadata_version - Wait for the metadata version to be equal or greater than the specified metadata version
|
|
||||||
* @param {time} wait_for_timeout - The maximum time to wait for wait_for_metadata_version before timing out
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'local',
|
'local',
|
||||||
@ -53,6 +39,11 @@ function buildClusterState (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.state request
|
||||||
|
* Returns a comprehensive information about the state of the cluster.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html
|
||||||
|
*/
|
||||||
return function clusterState (params, options, callback) {
|
return function clusterState (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -65,12 +56,6 @@ function buildClusterState (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if (params['index'] != null && (params['metric'] == null)) {
|
if (params['index'] != null && (params['metric'] == null)) {
|
||||||
const err = new ConfigurationError('Missing required parameter of the url: metric')
|
const err = new ConfigurationError('Missing required parameter of the url: metric')
|
||||||
@ -84,13 +69,9 @@ function buildClusterState (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var warnings = []
|
var warnings = []
|
||||||
var { method, body, index, metric, ...querystring } = params
|
var { method, body, metric, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -99,10 +80,13 @@ function buildClusterState (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((metric) != null && (index) != null) {
|
if ((metric) != null && (index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
|
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
|
||||||
} else if ((metric) != null) {
|
} else if ((metric) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric)
|
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'state'
|
path = '/' + '_cluster' + '/' + 'state'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildClusterStats (opts) {
|
function buildClusterStats (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html) request
|
|
||||||
*
|
|
||||||
* @param {list} node_id - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'flat_settings',
|
'flat_settings',
|
||||||
@ -34,6 +27,11 @@ function buildClusterStats (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a cluster.stats request
|
||||||
|
* Returns high-level overview of cluster statistics.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html
|
||||||
|
*/
|
||||||
return function clusterStats (params, options, callback) {
|
return function clusterStats (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -46,12 +44,6 @@ function buildClusterStats (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -62,10 +54,6 @@ function buildClusterStats (opts) {
|
|||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
var { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -74,8 +62,10 @@ function buildClusterStats (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
|
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'stats'
|
path = '/' + '_cluster' + '/' + 'stats'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,27 +10,6 @@
|
|||||||
function buildCount (opts) {
|
function buildCount (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of indices to restrict the results
|
|
||||||
* @param {list} type - A comma-separated list of types to restrict the results
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} ignore_throttled - Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {number} min_score - Include only documents with a specific `_score` value in the result
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {list} routing - A comma-separated list of specific routing values
|
|
||||||
* @param {string} q - Query in the Lucene query string syntax
|
|
||||||
* @param {string} analyzer - The analyzer to use for the query string
|
|
||||||
* @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
|
||||||
* @param {enum} default_operator - The default operator for query string query (AND or OR)
|
|
||||||
* @param {string} df - The field to use as default where no field prefix is given in the query string
|
|
||||||
* @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
|
||||||
* @param {number} terminate_after - The maximum count for each shard, upon reaching which the query execution will terminate early
|
|
||||||
* @param {object} body - A query to restrict the results specified with the Query DSL (optional)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -67,6 +46,11 @@ function buildCount (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a count request
|
||||||
|
* Returns number of documents matching a query.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html
|
||||||
|
*/
|
||||||
return function count (params, options, callback) {
|
return function count (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -86,13 +70,9 @@ function buildCount (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var warnings = []
|
var warnings = []
|
||||||
var { method, body, index, type, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -101,8 +81,10 @@ function buildCount (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_count'
|
path = '/' + encodeURIComponent(index) + '/' + '_count'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_count'
|
path = '/' + '_count'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,21 +10,6 @@
|
|||||||
function buildCreate (opts) {
|
function buildCreate (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - Document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
* @param {string} pipeline - The pipeline id to preprocess incoming documents with
|
|
||||||
* @param {object} body - The document
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_active_shards',
|
'wait_for_active_shards',
|
||||||
@ -48,6 +33,13 @@ function buildCreate (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a create request
|
||||||
|
* Creates a new document in the index.
|
||||||
|
|
||||||
|
Returns a 409 response when a document with a same ID already exists in the index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
||||||
|
*/
|
||||||
return function create (params, options, callback) {
|
return function create (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -84,10 +76,6 @@ function buildCreate (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -96,8 +84,10 @@ function buildCreate (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_create' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_create' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildDataFrameDeleteDataFrameTransform (opts) {
|
function buildDataFrameDeleteDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.delete_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the transform to delete
|
|
||||||
* @param {boolean} force - 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'force'
|
'force'
|
||||||
@ -25,6 +19,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
|
||||||
|
*/
|
||||||
return function dataFrameDeleteDataFrameTransform (params, options, callback) {
|
return function dataFrameDeleteDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -42,10 +40,6 @@ function buildDataFrameDeleteDataFrameTransform (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -57,10 +51,6 @@ function buildDataFrameDeleteDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,13 +58,14 @@ function buildDataFrameDeleteDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildDataFrameGetDataFrameTransform (opts) {
|
function buildDataFrameGetDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.get_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms
|
|
||||||
* @param {int} from - skips a number of transform configs, defaults to 0
|
|
||||||
* @param {int} size - specifies a max number of transforms to get, defaults to 100
|
|
||||||
* @param {boolean} allow_no_match - 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)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'from',
|
'from',
|
||||||
@ -29,6 +21,10 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
|||||||
allowNoMatch: 'allow_no_match'
|
allowNoMatch: 'allow_no_match'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a data_frame.get_data_frame_transform request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform.html
|
||||||
|
*/
|
||||||
return function dataFrameGetDataFrameTransform (params, options, callback) {
|
return function dataFrameGetDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -41,12 +37,6 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -57,10 +47,6 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -69,8 +55,10 @@ function buildDataFrameGetDataFrameTransform (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((transform_id || transformId) != null) {
|
if ((transform_id || transformId) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms'
|
path = '/' + '_data_frame' + '/' + 'transforms'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildDataFrameGetDataFrameTransformStats (opts) {
|
function buildDataFrameGetDataFrameTransformStats (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.get_data_frame_transform_stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-data-frame-transform-stats.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the transform for which to get stats. '_all' or '*' implies all transforms
|
|
||||||
* @param {number} from - skips a number of transform stats, defaults to 0
|
|
||||||
* @param {number} size - specifies a max number of transform stats to get, defaults to 100
|
|
||||||
* @param {boolean} allow_no_match - 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)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'from',
|
'from',
|
||||||
@ -29,6 +21,10 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
|||||||
allowNoMatch: 'allow_no_match'
|
allowNoMatch: 'allow_no_match'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
return function dataFrameGetDataFrameTransformStats (params, options, callback) {
|
return function dataFrameGetDataFrameTransformStats (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -42,8 +38,8 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params.body != null) {
|
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +53,6 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,6 +60,7 @@ function buildDataFrameGetDataFrameTransformStats (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildDataFramePreviewDataFrameTransform (opts) {
|
function buildDataFramePreviewDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.preview_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {object} body - The definition for the data_frame transform to preview
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,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
|
||||||
|
*/
|
||||||
return function dataFramePreviewDataFrameTransform (params, options, callback) {
|
return function dataFramePreviewDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,10 +51,6 @@ function buildDataFramePreviewDataFrameTransform (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,6 +58,7 @@ function buildDataFramePreviewDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + '_preview'
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + '_preview'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildDataFramePutDataFrameTransform (opts) {
|
function buildDataFramePutDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.put_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the new transform.
|
|
||||||
* @param {boolean} defer_validation - If validations should be deferred until data frame transform starts, defaults to false.
|
|
||||||
* @param {object} body - The data frame transform definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'defer_validation'
|
'defer_validation'
|
||||||
@ -26,6 +19,10 @@ function buildDataFramePutDataFrameTransform (opts) {
|
|||||||
deferValidation: 'defer_validation'
|
deferValidation: 'defer_validation'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a data_frame.put_data_frame_transform request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html
|
||||||
|
*/
|
||||||
return function dataFramePutDataFrameTransform (params, options, callback) {
|
return function dataFramePutDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,10 +55,6 @@ function buildDataFramePutDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -69,6 +62,7 @@ function buildDataFramePutDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildDataFrameStartDataFrameTransform (opts) {
|
function buildDataFrameStartDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.start_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/start-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the transform to start
|
|
||||||
* @param {time} timeout - Controls the time to wait for the transform to start
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout'
|
'timeout'
|
||||||
@ -25,6 +19,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
|
||||||
|
*/
|
||||||
return function dataFrameStartDataFrameTransform (params, options, callback) {
|
return function dataFrameStartDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -42,10 +40,6 @@ function buildDataFrameStartDataFrameTransform (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -57,10 +51,6 @@ function buildDataFrameStartDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -68,13 +58,14 @@ function buildDataFrameStartDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildDataFrameStopDataFrameTransform (opts) {
|
function buildDataFrameStopDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.stop_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the transform to stop
|
|
||||||
* @param {boolean} wait_for_completion - Whether to wait for the transform to fully stop before returning or not. Default to false
|
|
||||||
* @param {time} timeout - Controls the time to wait until the transform has stopped. Default to 30 seconds
|
|
||||||
* @param {boolean} allow_no_match - 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)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_completion',
|
'wait_for_completion',
|
||||||
@ -30,6 +22,10 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
|||||||
allowNoMatch: 'allow_no_match'
|
allowNoMatch: 'allow_no_match'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a data_frame.stop_data_frame_transform request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-data-frame-transform.html
|
||||||
|
*/
|
||||||
return function dataFrameStopDataFrameTransform (params, options, callback) {
|
return function dataFrameStopDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -47,10 +43,6 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
const err = new ConfigurationError('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -62,10 +54,6 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -73,13 +61,14 @@ function buildDataFrameStopDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildDataFrameUpdateDataFrameTransform (opts) {
|
function buildDataFrameUpdateDataFrameTransform (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [data_frame.update_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-data-frame-transform.html) request
|
|
||||||
*
|
|
||||||
* @param {string} transform_id - The id of the transform.
|
|
||||||
* @param {boolean} defer_validation - If validations should be deferred until data frame transform starts, defaults to false.
|
|
||||||
* @param {object} body - The update data frame transform definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'defer_validation'
|
'defer_validation'
|
||||||
@ -26,6 +19,10 @@ function buildDataFrameUpdateDataFrameTransform (opts) {
|
|||||||
deferValidation: 'defer_validation'
|
deferValidation: 'defer_validation'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a data_frame.update_data_frame_transform request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/update-data-frame-transform.html
|
||||||
|
*/
|
||||||
return function dataFrameUpdateDataFrameTransform (params, options, callback) {
|
return function dataFrameUpdateDataFrameTransform (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,10 +55,6 @@ function buildDataFrameUpdateDataFrameTransform (opts) {
|
|||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
var { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -69,6 +62,7 @@ function buildDataFrameUpdateDataFrameTransform (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,21 +10,6 @@
|
|||||||
function buildDelete (opts) {
|
function buildDelete (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {enum} refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {number} if_seq_no - only perform the delete operation if the last operation that has changed the document has the specified sequence number
|
|
||||||
* @param {number} if_primary_term - only perform the delete operation if the last operation that has changed the document has the specified primary term
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_active_shards',
|
'wait_for_active_shards',
|
||||||
@ -51,6 +36,11 @@ function buildDelete (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete request
|
||||||
|
* Removes a document from the index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html
|
||||||
|
*/
|
||||||
return function _delete (params, options, callback) {
|
return function _delete (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -72,10 +62,6 @@ function buildDelete (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -87,10 +73,6 @@ function buildDelete (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -99,8 +81,10 @@ function buildDelete (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +92,7 @@ function buildDelete (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,44 +10,6 @@
|
|||||||
function buildDeleteByQuery (opts) {
|
function buildDeleteByQuery (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [delete_by_query](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {string} analyzer - The analyzer to use for the query string
|
|
||||||
* @param {boolean} analyze_wildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
|
|
||||||
* @param {enum} default_operator - The default operator for query string query (AND or OR)
|
|
||||||
* @param {string} df - The field to use as default where no field prefix is given in the query string
|
|
||||||
* @param {number} from - Starting offset (default: 0)
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} conflicts - What to do when the delete by query hits version conflicts?
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {string} q - Query in the Lucene query string syntax
|
|
||||||
* @param {list} routing - A comma-separated list of specific routing values
|
|
||||||
* @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search
|
|
||||||
* @param {enum} search_type - Search operation type
|
|
||||||
* @param {time} search_timeout - Explicit timeout for each search request. Defaults to no timeout.
|
|
||||||
* @param {number} max_docs - Maximum number of documents to process (default: all documents)
|
|
||||||
* @param {list} sort - A comma-separated list of <field>:<direction> pairs
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {number} terminate_after - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
|
|
||||||
* @param {list} stats - Specific 'tag' of the request for logging and statistical purposes
|
|
||||||
* @param {boolean} version - Specify whether to return document version as part of a hit
|
|
||||||
* @param {boolean} request_cache - Specify if request cache should be used for this request or not, defaults to index level setting
|
|
||||||
* @param {boolean} refresh - Should the effected indexes be refreshed?
|
|
||||||
* @param {time} timeout - Time each individual bulk request should wait for shards that are unavailable.
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {number} scroll_size - Size on the scroll request powering the delete by query
|
|
||||||
* @param {boolean} wait_for_completion - Should the request should block until the delete by query is complete.
|
|
||||||
* @param {number} requests_per_second - The throttle for this request in sub-requests per second. -1 means no throttle.
|
|
||||||
* @param {number} slices - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
|
|
||||||
* @param {object} body - The search definition using the Query DSL
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'analyzer',
|
'analyzer',
|
||||||
@ -114,6 +76,11 @@ function buildDeleteByQuery (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete_by_query request
|
||||||
|
* Deletes documents matching the provided query.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
|
||||||
|
*/
|
||||||
return function deleteByQuery (params, options, callback) {
|
return function deleteByQuery (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -146,10 +113,6 @@ function buildDeleteByQuery (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -157,6 +120,7 @@ function buildDeleteByQuery (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
|
path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildDeleteByQueryRethrottle (opts) {
|
function buildDeleteByQueryRethrottle (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [delete_by_query_rethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html) request
|
|
||||||
*
|
|
||||||
* @param {string} task_id - The task id to rethrottle
|
|
||||||
* @param {number} requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'requests_per_second',
|
'requests_per_second',
|
||||||
@ -32,6 +26,11 @@ function buildDeleteByQueryRethrottle (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete_by_query_rethrottle request
|
||||||
|
* Changes the number of requests per second for a particular Delete By Query operation.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
|
||||||
|
*/
|
||||||
return function deleteByQueryRethrottle (params, options, callback) {
|
return function deleteByQueryRethrottle (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -53,10 +52,6 @@ function buildDeleteByQueryRethrottle (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond')
|
const err = new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -68,10 +63,6 @@ function buildDeleteByQueryRethrottle (opts) {
|
|||||||
var { method, body, taskId, task_id, ...querystring } = params
|
var { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -79,13 +70,14 @@ function buildDeleteByQueryRethrottle (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildDeleteScript (opts) {
|
function buildDeleteScript (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [delete_script](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - Script ID
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -34,6 +27,11 @@ function buildDeleteScript (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a delete_script request
|
||||||
|
* Deletes a script.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
||||||
|
*/
|
||||||
return function deleteScript (params, options, callback) {
|
return function deleteScript (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -51,10 +49,6 @@ function buildDeleteScript (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: id')
|
const err = new ConfigurationError('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -66,10 +60,6 @@ function buildDeleteScript (opts) {
|
|||||||
var { method, body, id, ...querystring } = params
|
var { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -77,13 +67,14 @@ function buildDeleteScript (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,23 +10,6 @@
|
|||||||
function buildExists (opts) {
|
function buildExists (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
|
||||||
* @param {list} stored_fields - A comma-separated list of stored fields to return in the response
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
|
||||||
* @param {boolean} refresh - Refresh the shard containing the document before performing the operation
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'stored_fields',
|
'stored_fields',
|
||||||
@ -59,6 +42,11 @@ function buildExists (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a exists request
|
||||||
|
* Returns information about whether a document exists in an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||||
|
*/
|
||||||
return function exists (params, options, callback) {
|
return function exists (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -80,10 +68,6 @@ function buildExists (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -95,10 +79,6 @@ function buildExists (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -107,8 +87,10 @@ function buildExists (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,22 +10,6 @@
|
|||||||
function buildExistsSource (opts) {
|
function buildExistsSource (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [exists_source](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document; deprecated and optional starting with 7.0
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
|
||||||
* @param {boolean} refresh - Refresh the shard containing the document before performing the operation
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'preference',
|
'preference',
|
||||||
@ -56,6 +40,11 @@ function buildExistsSource (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a exists_source request
|
||||||
|
* Returns information about whether a document source exists in an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||||
|
*/
|
||||||
return function existsSource (params, options, callback) {
|
return function existsSource (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -77,10 +66,6 @@ function buildExistsSource (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
|
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
|
||||||
@ -101,10 +86,6 @@ function buildExistsSource (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -113,8 +94,10 @@ function buildExistsSource (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,26 +10,6 @@
|
|||||||
function buildExplain (opts) {
|
function buildExplain (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document
|
|
||||||
* @param {boolean} analyze_wildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
|
|
||||||
* @param {string} analyzer - The analyzer for the query string query
|
|
||||||
* @param {enum} default_operator - The default operator for query string query (AND or OR)
|
|
||||||
* @param {string} df - The default field for query string query (default: _all)
|
|
||||||
* @param {list} stored_fields - A comma-separated list of stored fields to return in the response
|
|
||||||
* @param {boolean} lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {string} q - Query in the Lucene query string syntax
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {object} body - The query definition using the Query DSL
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'analyze_wildcard',
|
'analyze_wildcard',
|
||||||
@ -65,6 +45,11 @@ function buildExplain (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a explain request
|
||||||
|
* Returns information about why a specific matches (or doesn't match) a query.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html
|
||||||
|
*/
|
||||||
return function explain (params, options, callback) {
|
return function explain (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -97,10 +82,6 @@ function buildExplain (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -109,8 +90,10 @@ function buildExplain (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildFieldCaps (opts) {
|
function buildFieldCaps (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [field_caps](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {list} fields - A comma-separated list of field names
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} include_unmapped - Indicates whether unmapped fields should be included in the response.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'fields',
|
'fields',
|
||||||
@ -43,6 +33,11 @@ function buildFieldCaps (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a field_caps request
|
||||||
|
* Returns the information about the capabilities of fields among multiple indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html
|
||||||
|
*/
|
||||||
return function fieldCaps (params, options, callback) {
|
return function fieldCaps (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +50,6 @@ function buildFieldCaps (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +60,6 @@ function buildFieldCaps (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -83,8 +68,10 @@ function buildFieldCaps (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
|
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_field_caps'
|
path = '/' + '_field_caps'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +79,7 @@ function buildFieldCaps (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,23 +10,6 @@
|
|||||||
function buildGet (opts) {
|
function buildGet (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
|
||||||
* @param {list} stored_fields - A comma-separated list of stored fields to return in the response
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
|
||||||
* @param {boolean} refresh - Refresh the shard containing the document before performing the operation
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'stored_fields',
|
'stored_fields',
|
||||||
@ -59,6 +42,11 @@ function buildGet (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a get request
|
||||||
|
* Returns a document.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||||
|
*/
|
||||||
return function get (params, options, callback) {
|
return function get (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -80,10 +68,6 @@ function buildGet (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -95,10 +79,6 @@ function buildGet (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -107,8 +87,10 @@ function buildGet (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildGetScript (opts) {
|
function buildGetScript (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [get_script](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - Script ID
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'master_timeout',
|
'master_timeout',
|
||||||
@ -32,6 +26,11 @@ function buildGetScript (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a get_script request
|
||||||
|
* Returns a script.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
|
||||||
|
*/
|
||||||
return function getScript (params, options, callback) {
|
return function getScript (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -49,10 +48,6 @@ function buildGetScript (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: id')
|
const err = new ConfigurationError('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -64,10 +59,6 @@ function buildGetScript (opts) {
|
|||||||
var { method, body, id, ...querystring } = params
|
var { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -75,6 +66,7 @@ function buildGetScript (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,22 +10,6 @@
|
|||||||
function buildGetSource (opts) {
|
function buildGetSource (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [get_source](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - The document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document; deprecated and optional starting with 7.0
|
|
||||||
* @param {string} preference - Specify the node or shard the operation should be performed on (default: random)
|
|
||||||
* @param {boolean} realtime - Specify whether to perform the operation in realtime or search mode
|
|
||||||
* @param {boolean} refresh - Refresh the shard containing the document before performing the operation
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {list} _source - True or false to return the _source field or not, or a list of fields to return
|
|
||||||
* @param {list} _source_excludes - A list of fields to exclude from the returned _source field
|
|
||||||
* @param {list} _source_includes - A list of fields to extract and return from the _source field
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'preference',
|
'preference',
|
||||||
@ -56,6 +40,11 @@ function buildGetSource (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a get_source request
|
||||||
|
* Returns the source of a document.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
|
||||||
|
*/
|
||||||
return function getSource (params, options, callback) {
|
return function getSource (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -77,10 +66,6 @@ function buildGetSource (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -92,10 +77,6 @@ function buildGetSource (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -104,8 +85,10 @@ function buildGetSource (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,15 +10,6 @@
|
|||||||
function buildGraphExplore (opts) {
|
function buildGraphExplore (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [graph.explore](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {list} type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {object} body - Graph Query DSL
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'routing',
|
'routing',
|
||||||
@ -29,6 +20,10 @@ function buildGraphExplore (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a graph.explore request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html
|
||||||
|
*/
|
||||||
return function graphExplore (params, options, callback) {
|
return function graphExplore (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -41,6 +36,12 @@ function buildGraphExplore (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check required parameters
|
||||||
|
if (params['index'] == null) {
|
||||||
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if (params['type'] != null && (params['index'] == null)) {
|
if (params['type'] != null && (params['index'] == null)) {
|
||||||
const err = new ConfigurationError('Missing required parameter of the url: index')
|
const err = new ConfigurationError('Missing required parameter of the url: index')
|
||||||
@ -57,10 +58,6 @@ function buildGraphExplore (opts) {
|
|||||||
var { method, body, index, type, ...querystring } = params
|
var { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -69,8 +66,10 @@ function buildGraphExplore (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
path = '/' + encodeURIComponent(index) + '/' + '_graph' + '/' + 'explore'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildIlmDeleteLifecycle (opts) {
|
function buildIlmDeleteLifecycle (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.delete_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html) request
|
|
||||||
*
|
|
||||||
* @param {string} policy - The name of the index lifecycle policy
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildIlmDeleteLifecycle (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.delete_lifecycle request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html
|
||||||
|
*/
|
||||||
return function ilmDeleteLifecycle (params, options, callback) {
|
return function ilmDeleteLifecycle (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -37,8 +36,8 @@ function buildIlmDeleteLifecycle (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params.body != null) {
|
if (params['policy'] == null) {
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
const err = new ConfigurationError('Missing required parameter: policy')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,10 +51,6 @@ function buildIlmDeleteLifecycle (opts) {
|
|||||||
var { method, body, policy, ...querystring } = params
|
var { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,13 +58,14 @@ function buildIlmDeleteLifecycle (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildIlmExplainLifecycle (opts) {
|
function buildIlmExplainLifecycle (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.explain_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index to explain
|
|
||||||
* @param {boolean} only_managed - filters the indices included in the response to ones managed by ILM
|
|
||||||
* @param {boolean} only_errors - filters the indices included in the response to ones in an ILM error state, implies only_managed
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'only_managed',
|
'only_managed',
|
||||||
@ -28,6 +21,10 @@ function buildIlmExplainLifecycle (opts) {
|
|||||||
onlyErrors: 'only_errors'
|
onlyErrors: 'only_errors'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.explain_lifecycle request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html
|
||||||
|
*/
|
||||||
return function ilmExplainLifecycle (params, options, callback) {
|
return function ilmExplainLifecycle (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -41,8 +38,8 @@ function buildIlmExplainLifecycle (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params.body != null) {
|
if (params['index'] == null) {
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,10 +53,6 @@ function buildIlmExplainLifecycle (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -67,6 +60,7 @@ function buildIlmExplainLifecycle (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildIlmGetLifecycle (opts) {
|
function buildIlmGetLifecycle (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.get_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html) request
|
|
||||||
*
|
|
||||||
* @param {string} policy - The name of the index lifecycle policy
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildIlmGetLifecycle (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.get_lifecycle request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html
|
||||||
|
*/
|
||||||
return function ilmGetLifecycle (params, options, callback) {
|
return function ilmGetLifecycle (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -36,12 +35,6 @@ function buildIlmGetLifecycle (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -52,10 +45,6 @@ function buildIlmGetLifecycle (opts) {
|
|||||||
var { method, body, policy, ...querystring } = params
|
var { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -64,8 +53,10 @@ function buildIlmGetLifecycle (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((policy) != null) {
|
if ((policy) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ilm' + '/' + 'policy'
|
path = '/' + '_ilm' + '/' + 'policy'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,6 @@
|
|||||||
function buildIlmGetStatus (opts) {
|
function buildIlmGetStatus (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.get_status](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html) request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -23,6 +19,10 @@ function buildIlmGetStatus (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.get_status request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html
|
||||||
|
*/
|
||||||
return function ilmGetStatus (params, options, callback) {
|
return function ilmGetStatus (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -35,12 +35,6 @@ function buildIlmGetStatus (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -51,10 +45,6 @@ function buildIlmGetStatus (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -62,6 +52,7 @@ function buildIlmGetStatus (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ilm' + '/' + 'status'
|
path = '/' + '_ilm' + '/' + 'status'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildIlmMoveToStep (opts) {
|
function buildIlmMoveToStep (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.move_to_step](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index whose lifecycle step is to change
|
|
||||||
* @param {object} body - The new lifecycle step to move to
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -25,6 +19,10 @@ function buildIlmMoveToStep (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.move_to_step request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html
|
||||||
|
*/
|
||||||
return function ilmMoveToStep (params, options, callback) {
|
return function ilmMoveToStep (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -37,6 +35,12 @@ function buildIlmMoveToStep (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check required parameters
|
||||||
|
if (params['index'] == null) {
|
||||||
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -47,10 +51,6 @@ function buildIlmMoveToStep (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -58,6 +58,7 @@ function buildIlmMoveToStep (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,12 +10,6 @@
|
|||||||
function buildIlmPutLifecycle (opts) {
|
function buildIlmPutLifecycle (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.put_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html) request
|
|
||||||
*
|
|
||||||
* @param {string} policy - The name of the index lifecycle policy
|
|
||||||
* @param {object} body - The lifecycle policy definition to register
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -25,6 +19,10 @@ function buildIlmPutLifecycle (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.put_lifecycle request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html
|
||||||
|
*/
|
||||||
return function ilmPutLifecycle (params, options, callback) {
|
return function ilmPutLifecycle (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -37,6 +35,12 @@ function buildIlmPutLifecycle (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check required parameters
|
||||||
|
if (params['policy'] == null) {
|
||||||
|
const err = new ConfigurationError('Missing required parameter: policy')
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -47,10 +51,6 @@ function buildIlmPutLifecycle (opts) {
|
|||||||
var { method, body, policy, ...querystring } = params
|
var { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -58,6 +58,7 @@ function buildIlmPutLifecycle (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildIlmRemovePolicy (opts) {
|
function buildIlmRemovePolicy (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.remove_policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index to remove policy on
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildIlmRemovePolicy (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.remove_policy request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html
|
||||||
|
*/
|
||||||
return function ilmRemovePolicy (params, options, callback) {
|
return function ilmRemovePolicy (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -37,8 +36,8 @@ function buildIlmRemovePolicy (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params.body != null) {
|
if (params['index'] == null) {
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,10 +51,6 @@ function buildIlmRemovePolicy (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,13 +58,14 @@ function buildIlmRemovePolicy (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,6 @@
|
|||||||
function buildIlmRetry (opts) {
|
function buildIlmRetry (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.retry](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the indices (comma-separated) whose failed lifecycle step is to be retry
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -24,6 +19,10 @@ function buildIlmRetry (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.retry request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html
|
||||||
|
*/
|
||||||
return function ilmRetry (params, options, callback) {
|
return function ilmRetry (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -37,8 +36,8 @@ function buildIlmRetry (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params.body != null) {
|
if (params['index'] == null) {
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,10 +51,6 @@ function buildIlmRetry (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -63,13 +58,14 @@ function buildIlmRetry (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,6 @@
|
|||||||
function buildIlmStart (opts) {
|
function buildIlmStart (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.start](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html) request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -23,6 +19,10 @@ function buildIlmStart (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.start request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html
|
||||||
|
*/
|
||||||
return function ilmStart (params, options, callback) {
|
return function ilmStart (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -35,12 +35,6 @@ function buildIlmStart (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -51,10 +45,6 @@ function buildIlmStart (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -62,13 +52,14 @@ function buildIlmStart (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'start'
|
path = '/' + '_ilm' + '/' + 'start'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,6 @@
|
|||||||
function buildIlmStop (opts) {
|
function buildIlmStop (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [ilm.stop](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html) request
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
@ -23,6 +19,10 @@ function buildIlmStop (opts) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ilm.stop request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html
|
||||||
|
*/
|
||||||
return function ilmStop (params, options, callback) {
|
return function ilmStop (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -35,12 +35,6 @@ function buildIlmStop (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -51,10 +45,6 @@ function buildIlmStop (opts) {
|
|||||||
var { method, body, ...querystring } = params
|
var { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -62,13 +52,14 @@ function buildIlmStop (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'stop'
|
path = '/' + '_ilm' + '/' + 'stop'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,24 +10,6 @@
|
|||||||
function buildIndex (opts) {
|
function buildIndex (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
|
|
||||||
*
|
|
||||||
* @param {string} id - Document ID
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {string} type - The type of the document
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
|
|
||||||
* @param {enum} op_type - Explicit operation type
|
|
||||||
* @param {enum} refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
|
|
||||||
* @param {string} routing - Specific routing value
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {number} version - Explicit version number for concurrency control
|
|
||||||
* @param {enum} version_type - Specific version type
|
|
||||||
* @param {number} if_seq_no - only perform the index operation if the last operation that has changed the document has the specified sequence number
|
|
||||||
* @param {number} if_primary_term - only perform the index operation if the last operation that has changed the document has the specified primary term
|
|
||||||
* @param {string} pipeline - The pipeline id to preprocess incoming documents with
|
|
||||||
* @param {object} body - The document
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'wait_for_active_shards',
|
'wait_for_active_shards',
|
||||||
@ -57,6 +39,11 @@ function buildIndex (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a index request
|
||||||
|
* Creates or updates a document in an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html
|
||||||
|
*/
|
||||||
return function _index (params, options, callback) {
|
return function _index (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -89,10 +76,6 @@ function buildIndex (opts) {
|
|||||||
var { method, body, id, index, type, ...querystring } = params
|
var { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -101,12 +84,16 @@ function buildIndex (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
} else if ((index) != null && (id) != null) {
|
} else if ((index) != null && (id) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
|
||||||
} else if ((index) != null && (type) != null) {
|
} else if ((index) != null && (type) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_doc'
|
path = '/' + encodeURIComponent(index) + '/' + '_doc'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildIndicesAnalyze (opts) {
|
function buildIndicesAnalyze (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index to scope the operation
|
|
||||||
* @param {string} index - The name of the index to scope the operation
|
|
||||||
* @param {object} body - Define analyzer/tokenizer parameters and the text on which the analysis should be performed
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'index',
|
'index',
|
||||||
@ -32,6 +25,11 @@ function buildIndicesAnalyze (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.analyze request
|
||||||
|
* Performs the analysis process on a text and return the tokens breakdown of the text.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html
|
||||||
|
*/
|
||||||
return function indicesAnalyze (params, options, callback) {
|
return function indicesAnalyze (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -54,10 +52,6 @@ function buildIndicesAnalyze (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -66,8 +60,10 @@ function buildIndicesAnalyze (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_analyze'
|
path = '/' + encodeURIComponent(index) + '/' + '_analyze'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_analyze'
|
path = '/' + '_analyze'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildIndicesClearCache (opts) {
|
function buildIndicesClearCache (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.clear_cache](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index name to limit the operation
|
|
||||||
* @param {boolean} fielddata - Clear field data
|
|
||||||
* @param {list} fields - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all)
|
|
||||||
* @param {boolean} query - Clear query caches
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {list} index - A comma-separated list of index name to limit the operation
|
|
||||||
* @param {boolean} request - Clear request cache
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'fielddata',
|
'fielddata',
|
||||||
@ -48,6 +35,11 @@ function buildIndicesClearCache (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.clear_cache request
|
||||||
|
* Clears all or specific caches for one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html
|
||||||
|
*/
|
||||||
return function indicesClearCache (params, options, callback) {
|
return function indicesClearCache (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -60,12 +52,6 @@ function buildIndicesClearCache (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -76,10 +62,6 @@ function buildIndicesClearCache (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -88,8 +70,10 @@ function buildIndicesClearCache (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'
|
path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_cache' + '/' + 'clear'
|
path = '/' + '_cache' + '/' + 'clear'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +81,7 @@ function buildIndicesClearCache (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesClone (opts) {
|
function buildIndicesClone (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.clone](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the source index to clone
|
|
||||||
* @param {string} target - The name of the target index to clone into
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {string} wait_for_active_shards - Set the number of active shards to wait for on the cloned index before the operation returns.
|
|
||||||
* @param {object} body - The configuration for the target index (`settings` and `aliases`)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -39,6 +29,11 @@ function buildIndicesClone (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.clone request
|
||||||
|
* Clones an index
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clone-index.html
|
||||||
|
*/
|
||||||
return function indicesClone (params, options, callback) {
|
return function indicesClone (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -77,10 +72,6 @@ function buildIndicesClone (opts) {
|
|||||||
var { method, body, index, target, ...querystring } = params
|
var { method, body, index, target, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -88,6 +79,7 @@ function buildIndicesClone (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target)
|
path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildIndicesClose (opts) {
|
function buildIndicesClose (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma separated list of indices to close
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -46,6 +35,11 @@ function buildIndicesClose (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.close request
|
||||||
|
* Closes an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
|
||||||
|
*/
|
||||||
return function indicesClose (params, options, callback) {
|
return function indicesClose (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -63,10 +57,6 @@ function buildIndicesClose (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -78,10 +68,6 @@ function buildIndicesClose (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -89,13 +75,14 @@ function buildIndicesClose (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_close'
|
path = '/' + encodeURIComponent(index) + '/' + '_close'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesCreate (opts) {
|
function buildIndicesCreate (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index
|
|
||||||
* @param {boolean} include_type_name - Whether a type should be expected in the body of the mappings.
|
|
||||||
* @param {string} wait_for_active_shards - Set the number of active shards to wait for before the operation returns.
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {object} body - The configuration for the index (`settings` and `mappings`)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
'include_type_name',
|
||||||
@ -41,6 +31,11 @@ function buildIndicesCreate (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.create request
|
||||||
|
* Creates an index with optional settings and mappings.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html
|
||||||
|
*/
|
||||||
return function indicesCreate (params, options, callback) {
|
return function indicesCreate (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -69,10 +64,6 @@ function buildIndicesCreate (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -80,6 +71,7 @@ function buildIndicesCreate (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index)
|
path = '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesDelete (opts) {
|
function buildIndicesDelete (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} ignore_unavailable - Ignore unavailable indexes (default: false)
|
|
||||||
* @param {boolean} allow_no_indices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
|
||||||
* @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -43,6 +33,11 @@ function buildIndicesDelete (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.delete request
|
||||||
|
* Deletes an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html
|
||||||
|
*/
|
||||||
return function indicesDelete (params, options, callback) {
|
return function indicesDelete (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -60,10 +55,6 @@ function buildIndicesDelete (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -75,10 +66,6 @@ function buildIndicesDelete (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,13 +73,14 @@ function buildIndicesDelete (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + encodeURIComponent(index)
|
path = '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildIndicesDeleteAlias (opts) {
|
function buildIndicesDeleteAlias (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.delete_alias](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
|
|
||||||
* @param {list} name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
|
|
||||||
* @param {time} timeout - Explicit timestamp for the document
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -35,6 +27,11 @@ function buildIndicesDeleteAlias (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.delete_alias request
|
||||||
|
* Deletes an alias.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
||||||
|
*/
|
||||||
return function indicesDeleteAlias (params, options, callback) {
|
return function indicesDeleteAlias (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,10 +53,6 @@ function buildIndicesDeleteAlias (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: name')
|
const err = new ConfigurationError('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if (params['name'] != null && (params['index'] == null)) {
|
if (params['name'] != null && (params['index'] == null)) {
|
||||||
@ -77,10 +70,6 @@ function buildIndicesDeleteAlias (opts) {
|
|||||||
var { method, body, index, name, ...querystring } = params
|
var { method, body, index, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -89,16 +78,18 @@ function buildIndicesDeleteAlias (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (name) != null) {
|
if ((index) != null && (name) != null) {
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
if (method == null) method = 'DELETE'
|
||||||
} else {
|
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,13 +10,6 @@
|
|||||||
function buildIndicesDeleteTemplate (opts) {
|
function buildIndicesDeleteTemplate (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.delete_template](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
|
|
||||||
*
|
|
||||||
* @param {string} name - The name of the template
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -34,6 +27,11 @@ function buildIndicesDeleteTemplate (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.delete_template request
|
||||||
|
* Deletes an index template.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
||||||
|
*/
|
||||||
return function indicesDeleteTemplate (params, options, callback) {
|
return function indicesDeleteTemplate (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -51,10 +49,6 @@ function buildIndicesDeleteTemplate (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: name')
|
const err = new ConfigurationError('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -66,10 +60,6 @@ function buildIndicesDeleteTemplate (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'DELETE'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -77,13 +67,14 @@ function buildIndicesDeleteTemplate (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildIndicesExists (opts) {
|
function buildIndicesExists (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {boolean} ignore_unavailable - Ignore unavailable indexes (default: false)
|
|
||||||
* @param {boolean} allow_no_indices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
|
||||||
* @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'local',
|
'local',
|
||||||
@ -46,6 +35,11 @@ function buildIndicesExists (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.exists request
|
||||||
|
* Returns information about whether a particular index exists.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
|
||||||
|
*/
|
||||||
return function indicesExists (params, options, callback) {
|
return function indicesExists (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -63,10 +57,6 @@ function buildIndicesExists (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -78,10 +68,6 @@ function buildIndicesExists (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -89,6 +75,7 @@ function buildIndicesExists (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index)
|
path = '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesExistsAlias (opts) {
|
function buildIndicesExistsAlias (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.exists_alias](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to filter aliases
|
|
||||||
* @param {list} name - A comma-separated list of alias names to return
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -41,6 +31,11 @@ function buildIndicesExistsAlias (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.exists_alias request
|
||||||
|
* Returns information about whether a particular alias exists.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
||||||
|
*/
|
||||||
return function indicesExistsAlias (params, options, callback) {
|
return function indicesExistsAlias (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,10 +53,6 @@ function buildIndicesExistsAlias (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: name')
|
const err = new ConfigurationError('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -70,13 +61,9 @@ function buildIndicesExistsAlias (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var warnings = []
|
var warnings = []
|
||||||
var { method, body, index, name, ...querystring } = params
|
var { method, body, name, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -85,8 +72,10 @@ function buildIndicesExistsAlias (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (name) != null) {
|
if ((index) != null && (name) != null) {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildIndicesExistsTemplate (opts) {
|
function buildIndicesExistsTemplate (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.exists_template](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
|
|
||||||
*
|
|
||||||
* @param {list} name - The comma separated names of the index templates
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'flat_settings',
|
'flat_settings',
|
||||||
@ -37,6 +29,11 @@ function buildIndicesExistsTemplate (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.exists_template request
|
||||||
|
* Returns information about whether a particular index template exists.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
||||||
|
*/
|
||||||
return function indicesExistsTemplate (params, options, callback) {
|
return function indicesExistsTemplate (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -54,10 +51,6 @@ function buildIndicesExistsTemplate (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: name')
|
const err = new ConfigurationError('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -69,10 +62,6 @@ function buildIndicesExistsTemplate (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -80,6 +69,7 @@ function buildIndicesExistsTemplate (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesExistsType (opts) {
|
function buildIndicesExistsType (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.exists_type](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` to check the types across all indices
|
|
||||||
* @param {list} type - A comma-separated list of document types to check
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -41,6 +31,11 @@ function buildIndicesExistsType (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.exists_type request
|
||||||
|
* Returns information about whether a particular document type exists. (DEPRECATED)
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html
|
||||||
|
*/
|
||||||
return function indicesExistsType (params, options, callback) {
|
return function indicesExistsType (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -62,10 +57,6 @@ function buildIndicesExistsType (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: type')
|
const err = new ConfigurationError('Missing required parameter: type')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if (params['type'] != null && (params['index'] == null)) {
|
if (params['type'] != null && (params['index'] == null)) {
|
||||||
@ -83,10 +74,6 @@ function buildIndicesExistsType (opts) {
|
|||||||
var { method, body, index, type, ...querystring } = params
|
var { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'HEAD'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -94,6 +81,7 @@ function buildIndicesExistsType (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesFlush (opts) {
|
function buildIndicesFlush (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string for all indices
|
|
||||||
* @param {boolean} force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
|
|
||||||
* @param {boolean} wait_if_ongoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'force',
|
'force',
|
||||||
@ -43,6 +33,11 @@ function buildIndicesFlush (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.flush request
|
||||||
|
* Performs the flush operation on one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
|
||||||
|
*/
|
||||||
return function indicesFlush (params, options, callback) {
|
return function indicesFlush (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -55,12 +50,6 @@ function buildIndicesFlush (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -71,10 +60,6 @@ function buildIndicesFlush (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -83,8 +68,10 @@ function buildIndicesFlush (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_flush'
|
path = '/' + encodeURIComponent(index) + '/' + '_flush'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_flush'
|
path = '/' + '_flush'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +79,7 @@ function buildIndicesFlush (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildIndicesFlushSynced (opts) {
|
function buildIndicesFlushSynced (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.flush_synced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string for all indices
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -38,6 +30,11 @@ function buildIndicesFlushSynced (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.flush_synced request
|
||||||
|
* Performs a synced flush operation on one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api
|
||||||
|
*/
|
||||||
return function indicesFlushSynced (params, options, callback) {
|
return function indicesFlushSynced (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -50,12 +47,6 @@ function buildIndicesFlushSynced (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -66,10 +57,6 @@ function buildIndicesFlushSynced (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = body == null ? 'GET' : 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -78,8 +65,10 @@ function buildIndicesFlushSynced (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_flush' + '/' + 'synced'
|
path = '/' + '_flush' + '/' + 'synced'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +76,7 @@ function buildIndicesFlushSynced (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildIndicesForcemerge (opts) {
|
function buildIndicesForcemerge (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {boolean} flush - Specify whether the index should be flushed after performing the operation (default: true)
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {number} max_num_segments - The number of segments the index should be merged into (default: dynamic)
|
|
||||||
* @param {boolean} only_expunge_deletes - Specify whether the operation should only expunge deleted documents
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'flush',
|
'flush',
|
||||||
@ -46,6 +35,11 @@ function buildIndicesForcemerge (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.forcemerge request
|
||||||
|
* Performs the force merge operation on one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
|
||||||
|
*/
|
||||||
return function indicesForcemerge (params, options, callback) {
|
return function indicesForcemerge (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -58,12 +52,6 @@ function buildIndicesForcemerge (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -74,10 +62,6 @@ function buildIndicesForcemerge (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,8 +70,10 @@ function buildIndicesForcemerge (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'
|
path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_forcemerge'
|
path = '/' + '_forcemerge'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +81,7 @@ function buildIndicesForcemerge (opts) {
|
|||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildIndicesFreeze (opts) {
|
function buildIndicesFreeze (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.freeze](https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html) request
|
|
||||||
*
|
|
||||||
* @param {string} index - The name of the index to freeze
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -39,6 +28,10 @@ function buildIndicesFreeze (opts) {
|
|||||||
waitForActiveShards: 'wait_for_active_shards'
|
waitForActiveShards: 'wait_for_active_shards'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.freeze request
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html
|
||||||
|
*/
|
||||||
return function indicesFreeze (params, options, callback) {
|
return function indicesFreeze (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -56,10 +49,6 @@ function buildIndicesFreeze (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -71,10 +60,6 @@ function buildIndicesFreeze (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -82,13 +67,14 @@ function buildIndicesFreeze (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_freeze'
|
path = '/' + encodeURIComponent(index) + '/' + '_freeze'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildIndicesGet (opts) {
|
function buildIndicesGet (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names
|
|
||||||
* @param {boolean} include_type_name - Whether to add the type name to the response (default: false)
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {boolean} ignore_unavailable - Ignore unavailable indexes (default: false)
|
|
||||||
* @param {boolean} allow_no_indices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
|
||||||
* @param {enum} expand_wildcards - Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
'include_type_name',
|
||||||
@ -52,6 +39,11 @@ function buildIndicesGet (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get request
|
||||||
|
* Returns information about one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
||||||
|
*/
|
||||||
return function indicesGet (params, options, callback) {
|
return function indicesGet (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -69,10 +61,6 @@ function buildIndicesGet (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -84,10 +72,6 @@ function buildIndicesGet (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -95,6 +79,7 @@ function buildIndicesGet (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index)
|
path = '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
@ -10,16 +10,6 @@
|
|||||||
function buildIndicesGetAlias (opts) {
|
function buildIndicesGetAlias (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_alias](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names to filter aliases
|
|
||||||
* @param {list} name - A comma-separated list of alias names to return
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -41,6 +31,11 @@ function buildIndicesGetAlias (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_alias request
|
||||||
|
* Returns an alias.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
||||||
|
*/
|
||||||
return function indicesGetAlias (params, options, callback) {
|
return function indicesGetAlias (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -53,12 +48,6 @@ function buildIndicesGetAlias (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -66,13 +55,9 @@ function buildIndicesGetAlias (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var warnings = []
|
var warnings = []
|
||||||
var { method, body, index, name, ...querystring } = params
|
var { method, body, name, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -81,12 +66,16 @@ function buildIndicesGetAlias (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (name) != null) {
|
if ((index) != null && (name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
} else if ((name) != null) {
|
} else if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
path = '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
} else if ((index) != null) {
|
} else if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_alias'
|
path = '/' + encodeURIComponent(index) + '/' + '_alias'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_alias'
|
path = '/' + '_alias'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildIndicesGetFieldMapping (opts) {
|
function buildIndicesGetFieldMapping (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_field_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names
|
|
||||||
* @param {list} type - A comma-separated list of document types
|
|
||||||
* @param {list} fields - A comma-separated list of fields
|
|
||||||
* @param {boolean} include_type_name - Whether a type should be returned in the body of the mappings.
|
|
||||||
* @param {boolean} include_defaults - Whether the default mapping values should be returned as well
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
'include_type_name',
|
||||||
@ -48,6 +35,11 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_field_mapping request
|
||||||
|
* Returns mapping for one or more fields.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
|
||||||
|
*/
|
||||||
return function indicesGetFieldMapping (params, options, callback) {
|
return function indicesGetFieldMapping (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -65,10 +57,6 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: fields')
|
const err = new ConfigurationError('Missing required parameter: fields')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -77,13 +65,9 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var warnings = []
|
var warnings = []
|
||||||
var { method, body, index, type, fields, ...querystring } = params
|
var { method, body, fields, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -92,12 +76,16 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null && (fields) != null) {
|
if ((index) != null && (type) != null && (fields) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||||
} else if ((index) != null && (fields) != null) {
|
} else if ((index) != null && (fields) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||||
} else if ((type) != null && (fields) != null) {
|
} else if ((type) != null && (fields) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
path = '/' + '_mapping' + '/' + encodeURIComponent(type) + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,18 +10,6 @@
|
|||||||
function buildIndicesGetMapping (opts) {
|
function buildIndicesGetMapping (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_mapping](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names
|
|
||||||
* @param {list} type - A comma-separated list of document types
|
|
||||||
* @param {boolean} include_type_name - Whether to add the type name to the response (default: false)
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
'include_type_name',
|
||||||
@ -47,6 +35,11 @@ function buildIndicesGetMapping (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_mapping request
|
||||||
|
* Returns mappings for one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html
|
||||||
|
*/
|
||||||
return function indicesGetMapping (params, options, callback) {
|
return function indicesGetMapping (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -59,12 +52,6 @@ function buildIndicesGetMapping (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -75,10 +62,6 @@ function buildIndicesGetMapping (opts) {
|
|||||||
var { method, body, index, type, ...querystring } = params
|
var { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -87,12 +70,16 @@ function buildIndicesGetMapping (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||||
} else if ((index) != null) {
|
} else if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
path = '/' + encodeURIComponent(index) + '/' + '_mapping'
|
||||||
} else if ((type) != null) {
|
} else if ((type) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
path = '/' + '_mapping' + '/' + encodeURIComponent(type)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_mapping'
|
path = '/' + '_mapping'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,19 +10,6 @@
|
|||||||
function buildIndicesGetSettings (opts) {
|
function buildIndicesGetSettings (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_settings](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {list} name - The name of the settings that should be included
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
* @param {boolean} include_defaults - Whether to return all default setting for each of the indices.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'master_timeout',
|
'master_timeout',
|
||||||
@ -50,6 +37,11 @@ function buildIndicesGetSettings (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_settings request
|
||||||
|
* Returns settings for one or more indices.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html
|
||||||
|
*/
|
||||||
return function indicesGetSettings (params, options, callback) {
|
return function indicesGetSettings (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -62,12 +54,6 @@ function buildIndicesGetSettings (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -78,10 +64,6 @@ function buildIndicesGetSettings (opts) {
|
|||||||
var { method, body, index, name, ...querystring } = params
|
var { method, body, index, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -90,12 +72,16 @@ function buildIndicesGetSettings (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (name) != null) {
|
if ((index) != null && (name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name)
|
path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name)
|
||||||
} else if ((index) != null) {
|
} else if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_settings'
|
path = '/' + encodeURIComponent(index) + '/' + '_settings'
|
||||||
} else if ((name) != null) {
|
} else if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_settings' + '/' + encodeURIComponent(name)
|
path = '/' + '_settings' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_settings'
|
path = '/' + '_settings'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,15 +10,6 @@
|
|||||||
function buildIndicesGetTemplate (opts) {
|
function buildIndicesGetTemplate (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_template](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
|
|
||||||
*
|
|
||||||
* @param {list} name - The comma separated names of the index templates
|
|
||||||
* @param {boolean} include_type_name - Whether a type should be returned in the body of the mappings.
|
|
||||||
* @param {boolean} flat_settings - Return settings in flat format (default: false)
|
|
||||||
* @param {time} master_timeout - Explicit operation timeout for connection to master node
|
|
||||||
* @param {boolean} local - Return local information, do not retrieve the state from master node (default: false)
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
'include_type_name',
|
||||||
@ -40,6 +31,11 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_template request
|
||||||
|
* Returns an index template.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
||||||
|
*/
|
||||||
return function indicesGetTemplate (params, options, callback) {
|
return function indicesGetTemplate (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -52,12 +48,6 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -68,10 +58,6 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
var { method, body, name, ...querystring } = params
|
var { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -80,8 +66,10 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_template' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_template'
|
path = '/' + '_template'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,6 @@
|
|||||||
function buildIndicesGetUpgrade (opts) {
|
function buildIndicesGetUpgrade (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.get_upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
@ -38,6 +30,11 @@ function buildIndicesGetUpgrade (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.get_upgrade request
|
||||||
|
* The _upgrade API is no longer useful and will be removed.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html
|
||||||
|
*/
|
||||||
return function indicesGetUpgrade (params, options, callback) {
|
return function indicesGetUpgrade (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -50,12 +47,6 @@ function buildIndicesGetUpgrade (opts) {
|
|||||||
options = {}
|
options = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required parameters
|
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
@ -66,10 +57,6 @@ function buildIndicesGetUpgrade (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'GET'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -78,8 +65,10 @@ function buildIndicesGetUpgrade (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||||
} else {
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_upgrade'
|
path = '/' + '_upgrade'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,17 +10,6 @@
|
|||||||
function buildIndicesOpen (opts) {
|
function buildIndicesOpen (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma separated list of indices to open
|
|
||||||
* @param {time} timeout - Explicit operation timeout
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
|
||||||
* @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
|
||||||
* @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
|
||||||
* @param {string} wait_for_active_shards - Sets the number of active shards to wait for before the operation returns.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -46,6 +35,11 @@ function buildIndicesOpen (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.open request
|
||||||
|
* Opens an index.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html
|
||||||
|
*/
|
||||||
return function indicesOpen (params, options, callback) {
|
return function indicesOpen (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -63,10 +57,6 @@ function buildIndicesOpen (opts) {
|
|||||||
const err = new ConfigurationError('Missing required parameter: index')
|
const err = new ConfigurationError('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params.body != null) {
|
|
||||||
const err = new ConfigurationError('This API does not require a body')
|
|
||||||
return handleError(err, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate headers object
|
// validate headers object
|
||||||
if (options.headers != null && typeof options.headers !== 'object') {
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
@ -78,10 +68,6 @@ function buildIndicesOpen (opts) {
|
|||||||
var { method, body, index, ...querystring } = params
|
var { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'POST'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -89,13 +75,14 @@ function buildIndicesOpen (opts) {
|
|||||||
|
|
||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_open'
|
path = '/' + encodeURIComponent(index) + '/' + '_open'
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
method,
|
method,
|
||||||
path,
|
path,
|
||||||
body: '',
|
body: body || '',
|
||||||
querystring
|
querystring
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,15 +10,6 @@
|
|||||||
function buildIndicesPutAlias (opts) {
|
function buildIndicesPutAlias (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
/**
|
|
||||||
* Perform a [indices.put_alias](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
|
|
||||||
*
|
|
||||||
* @param {list} index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
|
|
||||||
* @param {string} name - The name of the alias to be created or updated
|
|
||||||
* @param {time} timeout - Explicit timestamp for the document
|
|
||||||
* @param {time} master_timeout - Specify timeout for connection to master
|
|
||||||
* @param {object} body - The settings for the alias, such as `routing` or `filter`
|
|
||||||
*/
|
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -36,6 +27,11 @@ function buildIndicesPutAlias (opts) {
|
|||||||
filterPath: 'filter_path'
|
filterPath: 'filter_path'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a indices.put_alias request
|
||||||
|
* Creates or updates an alias.
|
||||||
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
||||||
|
*/
|
||||||
return function indicesPutAlias (params, options, callback) {
|
return function indicesPutAlias (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
@ -74,10 +70,6 @@ function buildIndicesPutAlias (opts) {
|
|||||||
var { method, body, index, name, ...querystring } = params
|
var { method, body, index, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
if (method == null) {
|
|
||||||
method = 'PUT'
|
|
||||||
}
|
|
||||||
|
|
||||||
var ignore = options.ignore
|
var ignore = options.ignore
|
||||||
if (typeof ignore === 'number') {
|
if (typeof ignore === 'number') {
|
||||||
options.ignore = [ignore]
|
options.ignore = [ignore]
|
||||||
@ -86,9 +78,11 @@ function buildIndicesPutAlias (opts) {
|
|||||||
var path = ''
|
var path = ''
|
||||||
|
|
||||||
if ((index) != null && (name) != null) {
|
if ((index) != null && (name) != null) {
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
if (method == null) method = 'PUT'
|
||||||
} else {
|
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'PUT'
|
||||||
|
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user