API generation

This commit is contained in:
delvedor
2018-11-05 19:17:55 +01:00
parent 49cff40e96
commit 2d3701d7e9
122 changed files with 458 additions and 457 deletions

View File

@ -2,7 +2,7 @@
function buildBulk (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html) request
*
@ -38,7 +38,7 @@ function buildBulk (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -46,7 +46,7 @@ function buildBulk (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -110,7 +110,7 @@ function buildBulk (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatAliases (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.aliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html) request
*
@ -33,7 +33,7 @@ function buildCatAliases (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildCatAliases (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatAllocation (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html) request
*
@ -34,7 +34,7 @@ function buildCatAllocation (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -94,7 +94,7 @@ function buildCatAllocation (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatCount (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html) request
*
@ -33,7 +33,7 @@ function buildCatCount (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildCatCount (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatFielddata (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html) request
*
@ -35,7 +35,7 @@ function buildCatFielddata (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -97,7 +97,7 @@ function buildCatFielddata (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatHealth (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html) request
*
@ -33,7 +33,7 @@ function buildCatHealth (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -93,7 +93,7 @@ function buildCatHealth (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatHelp (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html) request
*
@ -27,7 +27,7 @@ function buildCatHelp (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -75,7 +75,7 @@ function buildCatHelp (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatIndices (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html) request
*
@ -36,7 +36,7 @@ function buildCatIndices (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -100,7 +100,7 @@ function buildCatIndices (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatMaster (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html) request
*
@ -32,7 +32,7 @@ function buildCatMaster (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -90,7 +90,7 @@ function buildCatMaster (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatNodeattrs (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html) request
*
@ -32,7 +32,7 @@ function buildCatNodeattrs (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -90,7 +90,7 @@ function buildCatNodeattrs (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatNodes (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html) request
*
@ -33,7 +33,7 @@ function buildCatNodes (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -93,7 +93,7 @@ function buildCatNodes (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatPendingTasks (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.pending_tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html) request
*
@ -32,7 +32,7 @@ function buildCatPendingTasks (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -90,7 +90,7 @@ function buildCatPendingTasks (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatPlugins (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html) request
*
@ -32,7 +32,7 @@ function buildCatPlugins (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -90,7 +90,7 @@ function buildCatPlugins (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatRecovery (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html) request
*
@ -33,7 +33,7 @@ function buildCatRecovery (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildCatRecovery (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatRepositories (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
*
@ -32,7 +32,7 @@ function buildCatRepositories (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -90,7 +90,7 @@ function buildCatRepositories (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatSegments (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html) request
*
@ -32,7 +32,7 @@ function buildCatSegments (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -88,7 +88,7 @@ function buildCatSegments (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatShards (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html) request
*
@ -34,7 +34,7 @@ function buildCatShards (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -94,7 +94,7 @@ function buildCatShards (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatSnapshots (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
*
@ -33,7 +33,7 @@ function buildCatSnapshots (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildCatSnapshots (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatTasks (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
*
@ -34,7 +34,7 @@ function buildCatTasks (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -96,7 +96,7 @@ function buildCatTasks (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatTemplates (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.templates](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html) request
*
@ -33,7 +33,7 @@ function buildCatTemplates (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildCatTemplates (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCatThreadPool (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cat.thread_pool](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
*
@ -34,7 +34,7 @@ function buildCatThreadPool (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -94,7 +94,7 @@ function buildCatThreadPool (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClearScroll (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [clear_scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*
@ -63,7 +63,7 @@ function buildClearScroll (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterAllocationExplain (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.allocation_explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) request
*
@ -68,7 +68,7 @@ function buildClusterAllocationExplain (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterGetSettings (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.get_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
@ -29,7 +29,7 @@ function buildClusterGetSettings (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -81,7 +81,7 @@ function buildClusterGetSettings (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterHealth (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
*
@ -36,7 +36,7 @@ function buildClusterHealth (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -100,7 +100,7 @@ function buildClusterHealth (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterPendingTasks (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.pending_tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html) request
*
@ -27,7 +27,7 @@ function buildClusterPendingTasks (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -75,7 +75,7 @@ function buildClusterPendingTasks (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterPutSettings (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.put_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
@ -29,7 +29,7 @@ function buildClusterPutSettings (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildClusterPutSettings (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterRemoteInfo (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.remote_info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html) request
*
@ -25,7 +25,7 @@ function buildClusterRemoteInfo (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -69,7 +69,7 @@ function buildClusterRemoteInfo (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterReroute (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html) request
*
@ -80,7 +80,7 @@ function buildClusterReroute (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterState (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html) request
*
@ -33,7 +33,7 @@ function buildClusterState (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -41,7 +41,7 @@ function buildClusterState (opts) {
if (params['index'] != null && (params['metric'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: metric'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -97,7 +97,7 @@ function buildClusterState (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildClusterStats (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html) request
*
@ -28,7 +28,7 @@ function buildClusterStats (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -76,7 +76,7 @@ function buildClusterStats (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCount (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html) request
*
@ -41,7 +41,7 @@ function buildCount (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -111,7 +111,7 @@ function buildCount (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildCreate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
@ -37,25 +37,25 @@ function buildCreate (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -63,12 +63,12 @@ function buildCreate (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -128,7 +128,7 @@ function buildCreate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildDelete (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html) request
*
@ -35,25 +35,25 @@ function buildDelete (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -61,12 +61,12 @@ function buildDelete (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -124,7 +124,7 @@ function buildDelete (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildDeleteByQuery (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [delete_by_query](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html) request
*
@ -60,13 +60,13 @@ function buildDeleteByQuery (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -74,7 +74,7 @@ function buildDeleteByQuery (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -182,7 +182,7 @@ function buildDeleteByQuery (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildDeleteScript (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [delete_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
@ -28,13 +28,13 @@ function buildDeleteScript (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -82,7 +82,7 @@ function buildDeleteScript (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildExists (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -39,25 +39,25 @@ function buildExists (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -65,12 +65,12 @@ function buildExists (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -136,7 +136,7 @@ function buildExists (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildExistsSource (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [exists_source](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -38,25 +38,25 @@ function buildExistsSource (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -64,12 +64,12 @@ function buildExistsSource (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -133,7 +133,7 @@ function buildExistsSource (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildExplain (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html) request
*
@ -42,19 +42,19 @@ function buildExplain (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -62,12 +62,12 @@ function buildExplain (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -137,7 +137,7 @@ function buildExplain (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildFieldCaps (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [field_caps](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html) request
*
@ -75,7 +75,7 @@ function buildFieldCaps (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildGet (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -39,25 +39,25 @@ function buildGet (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -65,12 +65,12 @@ function buildGet (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -136,7 +136,7 @@ function buildGet (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildGetScript (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [get_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
@ -27,13 +27,13 @@ function buildGetScript (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildGetScript (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildGetSource (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [get_source](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
@ -38,25 +38,25 @@ function buildGetSource (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -64,12 +64,12 @@ function buildGetSource (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -133,7 +133,7 @@ function buildGetSource (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndex (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
@ -38,19 +38,19 @@ function buildIndex (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -58,12 +58,12 @@ function buildIndex (opts) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: type, index'),
{ body: null, headers: null, statusCode: null }
result
)
} else if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -125,7 +125,7 @@ function buildIndex (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesAnalyze (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
*
@ -66,7 +66,7 @@ function buildIndicesAnalyze (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesClearCache (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.clear_cache](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html) request
*
@ -36,7 +36,7 @@ function buildIndicesClearCache (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -100,7 +100,7 @@ function buildIndicesClearCache (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesClose (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
@ -31,13 +31,13 @@ function buildIndicesClose (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildIndicesClose (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesCreate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html) request
*
@ -31,7 +31,7 @@ function buildIndicesCreate (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -83,7 +83,7 @@ function buildIndicesCreate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesDelete (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html) request
*
@ -31,13 +31,13 @@ function buildIndicesDelete (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -91,7 +91,7 @@ function buildIndicesDelete (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesDeleteAlias (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.delete_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
@ -29,19 +29,19 @@ function buildIndicesDeleteAlias (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -49,7 +49,7 @@ function buildIndicesDeleteAlias (opts) {
if (params['name'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -97,7 +97,7 @@ function buildIndicesDeleteAlias (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesDeleteTemplate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.delete_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
@ -28,13 +28,13 @@ function buildIndicesDeleteTemplate (opts) {
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -82,7 +82,7 @@ function buildIndicesDeleteTemplate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesExists (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request
*
@ -32,13 +32,13 @@ function buildIndicesExists (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -94,7 +94,7 @@ function buildIndicesExists (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesExistsAlias (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.exists_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
@ -31,13 +31,13 @@ function buildIndicesExistsAlias (opts) {
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -89,7 +89,7 @@ function buildIndicesExistsAlias (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesExistsTemplate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.exists_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
@ -29,13 +29,13 @@ function buildIndicesExistsTemplate (opts) {
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -85,7 +85,7 @@ function buildIndicesExistsTemplate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesExistsType (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.exists_type](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html) request
*
@ -31,19 +31,19 @@ function buildIndicesExistsType (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -51,7 +51,7 @@ function buildIndicesExistsType (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -103,7 +103,7 @@ function buildIndicesExistsType (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesFlush (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
*
@ -31,7 +31,7 @@ function buildIndicesFlush (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -85,7 +85,7 @@ function buildIndicesFlush (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesFlushSynced (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.flush_synced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request
*
@ -29,7 +29,7 @@ function buildIndicesFlushSynced (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildIndicesFlushSynced (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesForcemerge (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) request
*
@ -32,7 +32,7 @@ function buildIndicesForcemerge (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -88,7 +88,7 @@ function buildIndicesForcemerge (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGet (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
*
@ -33,13 +33,13 @@ function buildIndicesGet (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -97,7 +97,7 @@ function buildIndicesGet (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetAlias (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
@ -31,7 +31,7 @@ function buildIndicesGetAlias (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -83,7 +83,7 @@ function buildIndicesGetAlias (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetFieldMapping (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_field_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html) request
*
@ -33,13 +33,13 @@ function buildIndicesGetFieldMapping (opts) {
if (params['fields'] == null) {
return callback(
new ConfigurationError('Missing required parameter: fields'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -93,7 +93,7 @@ function buildIndicesGetFieldMapping (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetMapping (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html) request
*
@ -32,7 +32,7 @@ function buildIndicesGetMapping (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -86,7 +86,7 @@ function buildIndicesGetMapping (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetSettings (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html) request
*
@ -34,7 +34,7 @@ function buildIndicesGetSettings (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesGetSettings (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetTemplate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
@ -29,7 +29,7 @@ function buildIndicesGetTemplate (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildIndicesGetTemplate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesGetUpgrade (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.get_upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
@ -29,7 +29,7 @@ function buildIndicesGetUpgrade (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildIndicesGetUpgrade (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesOpen (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
@ -32,13 +32,13 @@ function buildIndicesOpen (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -94,7 +94,7 @@ function buildIndicesOpen (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesPutAlias (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.put_alias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
@ -30,13 +30,13 @@ function buildIndicesPutAlias (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -44,7 +44,7 @@ function buildIndicesPutAlias (opts) {
if (params['name'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesPutAlias (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesPutMapping (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.put_mapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html) request
*
@ -34,13 +34,13 @@ function buildIndicesPutMapping (opts) {
if (params['type'] == null) {
return callback(
new ConfigurationError('Missing required parameter: type'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -96,7 +96,7 @@ function buildIndicesPutMapping (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesPutSettings (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.put_settings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html) request
*
@ -34,7 +34,7 @@ function buildIndicesPutSettings (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesPutSettings (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesPutTemplate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.put_template](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
@ -32,13 +32,13 @@ function buildIndicesPutTemplate (opts) {
if (params['name'] == null) {
return callback(
new ConfigurationError('Missing required parameter: name'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesPutTemplate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesRecovery (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html) request
*
@ -28,7 +28,7 @@ function buildIndicesRecovery (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -76,7 +76,7 @@ function buildIndicesRecovery (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesRefresh (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html) request
*
@ -29,7 +29,7 @@ function buildIndicesRefresh (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -79,7 +79,7 @@ function buildIndicesRefresh (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesRollover (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.rollover](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html) request
*
@ -32,7 +32,7 @@ function buildIndicesRollover (opts) {
if (params['alias'] == null) {
return callback(
new ConfigurationError('Missing required parameter: alias'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -40,7 +40,7 @@ function buildIndicesRollover (opts) {
if ((params['new_index'] != null || params['newIndex'] != null) && (params['alias'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: alias'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesRollover (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesSegments (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html) request
*
@ -30,7 +30,7 @@ function buildIndicesSegments (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -82,7 +82,7 @@ function buildIndicesSegments (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesShardStores (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.shard_stores](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html) request
*
@ -30,7 +30,7 @@ function buildIndicesShardStores (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -82,7 +82,7 @@ function buildIndicesShardStores (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesShrink (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.shrink](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html) request
*
@ -32,13 +32,13 @@ function buildIndicesShrink (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['target'] == null) {
return callback(
new ConfigurationError('Missing required parameter: target'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -46,7 +46,7 @@ function buildIndicesShrink (opts) {
if (params['target'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -98,7 +98,7 @@ function buildIndicesShrink (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesSplit (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.split](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html) request
*
@ -32,13 +32,13 @@ function buildIndicesSplit (opts) {
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['target'] == null) {
return callback(
new ConfigurationError('Missing required parameter: target'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -46,7 +46,7 @@ function buildIndicesSplit (opts) {
if (params['target'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -98,7 +98,7 @@ function buildIndicesSplit (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesStats (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html) request
*
@ -34,7 +34,7 @@ function buildIndicesStats (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildIndicesStats (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesUpdateAliases (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.update_aliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
@ -28,7 +28,7 @@ function buildIndicesUpdateAliases (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -76,7 +76,7 @@ function buildIndicesUpdateAliases (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesUpgrade (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
@ -31,7 +31,7 @@ function buildIndicesUpgrade (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -85,7 +85,7 @@ function buildIndicesUpgrade (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIndicesValidateQuery (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [indices.validate_query](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html) request
*
@ -40,7 +40,7 @@ function buildIndicesValidateQuery (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -108,7 +108,7 @@ function buildIndicesValidateQuery (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildInfo (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
@ -25,7 +25,7 @@ function buildInfo (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -69,7 +69,7 @@ function buildInfo (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIngestDeletePipeline (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ingest.delete_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
@ -28,13 +28,13 @@ function buildIngestDeletePipeline (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -82,7 +82,7 @@ function buildIngestDeletePipeline (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIngestGetPipeline (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ingest.get_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
@ -27,7 +27,7 @@ function buildIngestGetPipeline (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -73,7 +73,7 @@ function buildIngestGetPipeline (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIngestProcessorGrok (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ingest.processor_grok](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
@ -25,7 +25,7 @@ function buildIngestProcessorGrok (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -69,7 +69,7 @@ function buildIngestProcessorGrok (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIngestPutPipeline (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ingest.put_pipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
@ -29,13 +29,13 @@ function buildIngestPutPipeline (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -83,7 +83,7 @@ function buildIngestPutPipeline (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildIngestSimulate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
@ -28,7 +28,7 @@ function buildIngestSimulate (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -74,7 +74,7 @@ function buildIngestSimulate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildMget (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html) request
*
@ -36,7 +36,7 @@ function buildMget (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -44,7 +44,7 @@ function buildMget (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -104,7 +104,7 @@ function buildMget (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildMsearch (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html) request
*
@ -32,7 +32,7 @@ function buildMsearch (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -40,7 +40,7 @@ function buildMsearch (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -92,7 +92,7 @@ function buildMsearch (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildMsearchTemplate (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [msearch_template](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) request
*
@ -31,7 +31,7 @@ function buildMsearchTemplate (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -39,7 +39,7 @@ function buildMsearchTemplate (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -89,7 +89,7 @@ function buildMsearchTemplate (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildMtermvectors (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html) request
*
@ -41,7 +41,7 @@ function buildMtermvectors (opts) {
if (params['type'] != null && (params['index'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: index'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -111,7 +111,7 @@ function buildMtermvectors (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildNodesHotThreads (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [nodes.hot_threads](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html) request
*
@ -32,7 +32,7 @@ function buildNodesHotThreads (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -88,7 +88,7 @@ function buildNodesHotThreads (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildNodesInfo (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html) request
*
@ -29,7 +29,7 @@ function buildNodesInfo (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -77,7 +77,7 @@ function buildNodesInfo (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildNodesStats (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request
*
@ -36,7 +36,7 @@ function buildNodesStats (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -96,7 +96,7 @@ function buildNodesStats (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildNodesUsage (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [nodes.usage](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html) request
*
@ -28,7 +28,7 @@ function buildNodesUsage (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -74,7 +74,7 @@ function buildNodesUsage (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildPing (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
@ -25,7 +25,7 @@ function buildPing (opts) {
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -69,7 +69,7 @@ function buildPing (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildPutScript (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [put_script](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
@ -31,13 +31,13 @@ function buildPutScript (opts) {
if (params['id'] == null) {
return callback(
new ConfigurationError('Missing required parameter: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -45,7 +45,7 @@ function buildPutScript (opts) {
if (params['context'] != null && (params['id'] == null)) {
return callback(
new ConfigurationError('Missing required parameter of the url: id'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -95,7 +95,7 @@ function buildPutScript (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildRankEval (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [rank_eval](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html) request
*
@ -30,7 +30,7 @@ function buildRankEval (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -80,7 +80,7 @@ function buildRankEval (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildReindex (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
*
@ -32,7 +32,7 @@ function buildReindex (opts) {
if (params['body'] == null) {
return callback(
new ConfigurationError('Missing required parameter: body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -88,7 +88,7 @@ function buildReindex (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

View File

@ -2,7 +2,7 @@
function buildReindexRethrottle (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError } = opts
const { makeRequest, ConfigurationError, result } = opts
/**
* Perform a [reindex_rethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
*
@ -27,19 +27,19 @@ function buildReindexRethrottle (opts) {
if (params['task_id'] == null && params['taskId'] == null) {
return callback(
new ConfigurationError('Missing required parameter: task_id or taskId'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
return callback(
new ConfigurationError('Missing required parameter: requests_per_second or requestsPerSecond'),
{ body: null, headers: null, statusCode: null }
result
)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
{ body: null, headers: null, statusCode: null }
result
)
}
@ -85,7 +85,7 @@ function buildReindexRethrottle (opts) {
if (params.headers != null && typeof params.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
{ body: null, headers: null, statusCode: null }
result
)
}

Some files were not shown because too many files have changed in this diff Show More