From 2d3701d7e9a49eaf5831a4e43fae012a7789d8d7 Mon Sep 17 00:00:00 2001 From: delvedor Date: Mon, 5 Nov 2018 19:17:55 +0100 Subject: [PATCH] API generation --- api/api/bulk.js | 8 ++++---- api/api/cat.aliases.js | 6 +++--- api/api/cat.allocation.js | 6 +++--- api/api/cat.count.js | 6 +++--- api/api/cat.fielddata.js | 6 +++--- api/api/cat.health.js | 6 +++--- api/api/cat.help.js | 6 +++--- api/api/cat.indices.js | 6 +++--- api/api/cat.master.js | 6 +++--- api/api/cat.nodeattrs.js | 6 +++--- api/api/cat.nodes.js | 6 +++--- api/api/cat.pending_tasks.js | 6 +++--- api/api/cat.plugins.js | 6 +++--- api/api/cat.recovery.js | 6 +++--- api/api/cat.repositories.js | 6 +++--- api/api/cat.segments.js | 6 +++--- api/api/cat.shards.js | 6 +++--- api/api/cat.snapshots.js | 6 +++--- api/api/cat.tasks.js | 6 +++--- api/api/cat.templates.js | 6 +++--- api/api/cat.thread_pool.js | 6 +++--- api/api/clear_scroll.js | 4 ++-- api/api/cluster.allocation_explain.js | 4 ++-- api/api/cluster.get_settings.js | 6 +++--- api/api/cluster.health.js | 6 +++--- api/api/cluster.pending_tasks.js | 6 +++--- api/api/cluster.put_settings.js | 6 +++--- api/api/cluster.remote_info.js | 6 +++--- api/api/cluster.reroute.js | 4 ++-- api/api/cluster.state.js | 8 ++++---- api/api/cluster.stats.js | 6 +++--- api/api/count.js | 6 +++--- api/api/create.js | 16 ++++++++-------- api/api/delete.js | 16 ++++++++-------- api/api/delete_by_query.js | 10 +++++----- api/api/delete_script.js | 8 ++++---- api/api/exists.js | 16 ++++++++-------- api/api/exists_source.js | 16 ++++++++-------- api/api/explain.js | 14 +++++++------- api/api/field_caps.js | 4 ++-- api/api/get.js | 16 ++++++++-------- api/api/get_script.js | 8 ++++---- api/api/get_source.js | 16 ++++++++-------- api/api/index.js | 14 +++++++------- api/api/indices.analyze.js | 4 ++-- api/api/indices.clear_cache.js | 6 +++--- api/api/indices.close.js | 8 ++++---- api/api/indices.create.js | 6 +++--- api/api/indices.delete.js | 8 ++++---- api/api/indices.delete_alias.js | 12 ++++++------ api/api/indices.delete_template.js | 8 ++++---- api/api/indices.exists.js | 8 ++++---- api/api/indices.exists_alias.js | 8 ++++---- api/api/indices.exists_template.js | 8 ++++---- api/api/indices.exists_type.js | 12 ++++++------ api/api/indices.flush.js | 6 +++--- api/api/indices.flush_synced.js | 6 +++--- api/api/indices.forcemerge.js | 6 +++--- api/api/indices.get.js | 8 ++++---- api/api/indices.get_alias.js | 6 +++--- api/api/indices.get_field_mapping.js | 8 ++++---- api/api/indices.get_mapping.js | 6 +++--- api/api/indices.get_settings.js | 6 +++--- api/api/indices.get_template.js | 6 +++--- api/api/indices.get_upgrade.js | 6 +++--- api/api/indices.open.js | 8 ++++---- api/api/indices.put_alias.js | 10 +++++----- api/api/indices.put_mapping.js | 8 ++++---- api/api/indices.put_settings.js | 6 +++--- api/api/indices.put_template.js | 8 ++++---- api/api/indices.recovery.js | 6 +++--- api/api/indices.refresh.js | 6 +++--- api/api/indices.rollover.js | 8 ++++---- api/api/indices.segments.js | 6 +++--- api/api/indices.shard_stores.js | 6 +++--- api/api/indices.shrink.js | 10 +++++----- api/api/indices.split.js | 10 +++++----- api/api/indices.stats.js | 6 +++--- api/api/indices.update_aliases.js | 6 +++--- api/api/indices.upgrade.js | 6 +++--- api/api/indices.validate_query.js | 6 +++--- api/api/info.js | 6 +++--- api/api/ingest.delete_pipeline.js | 8 ++++---- api/api/ingest.get_pipeline.js | 6 +++--- api/api/ingest.processor_grok.js | 6 +++--- api/api/ingest.put_pipeline.js | 8 ++++---- api/api/ingest.simulate.js | 6 +++--- api/api/mget.js | 8 ++++---- api/api/msearch.js | 8 ++++---- api/api/msearch_template.js | 8 ++++---- api/api/mtermvectors.js | 6 +++--- api/api/nodes.hot_threads.js | 6 +++--- api/api/nodes.info.js | 6 +++--- api/api/nodes.stats.js | 6 +++--- api/api/nodes.usage.js | 6 +++--- api/api/ping.js | 6 +++--- api/api/put_script.js | 10 +++++----- api/api/rank_eval.js | 6 +++--- api/api/reindex.js | 6 +++--- api/api/reindex_rethrottle.js | 10 +++++----- api/api/render_search_template.js | 4 ++-- api/api/scripts_painless_execute.js | 4 ++-- api/api/scroll.js | 4 ++-- api/api/search.js | 6 +++--- api/api/search_shards.js | 6 +++--- api/api/search_template.js | 8 ++++---- api/api/snapshot.create.js | 10 +++++----- api/api/snapshot.create_repository.js | 8 ++++---- api/api/snapshot.delete.js | 12 ++++++------ api/api/snapshot.delete_repository.js | 8 ++++---- api/api/snapshot.get.js | 12 ++++++------ api/api/snapshot.get_repository.js | 6 +++--- api/api/snapshot.restore.js | 10 +++++----- api/api/snapshot.status.js | 8 ++++---- api/api/snapshot.verify_repository.js | 8 ++++---- api/api/tasks.cancel.js | 6 +++--- api/api/tasks.get.js | 8 ++++---- api/api/tasks.list.js | 6 +++--- api/api/termvectors.js | 12 ++++++------ api/api/update.js | 16 ++++++++-------- api/api/update_by_query.js | 8 ++++---- api/index.js | 1 + 122 files changed, 458 insertions(+), 457 deletions(-) diff --git a/api/api/bulk.js b/api/api/bulk.js index bba62c2bd..78f57f8e2 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -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 ) } diff --git a/api/api/cat.aliases.js b/api/api/cat.aliases.js index 24e48fa8c..d06f0c901 100644 --- a/api/api/cat.aliases.js +++ b/api/api/cat.aliases.js @@ -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 ) } diff --git a/api/api/cat.allocation.js b/api/api/cat.allocation.js index 1abd0c58b..82d8557ab 100644 --- a/api/api/cat.allocation.js +++ b/api/api/cat.allocation.js @@ -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 ) } diff --git a/api/api/cat.count.js b/api/api/cat.count.js index 87136212c..bae0d16ea 100644 --- a/api/api/cat.count.js +++ b/api/api/cat.count.js @@ -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 ) } diff --git a/api/api/cat.fielddata.js b/api/api/cat.fielddata.js index 3c1476ba2..c05d217a2 100644 --- a/api/api/cat.fielddata.js +++ b/api/api/cat.fielddata.js @@ -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 ) } diff --git a/api/api/cat.health.js b/api/api/cat.health.js index 738895a6a..90993b0fc 100644 --- a/api/api/cat.health.js +++ b/api/api/cat.health.js @@ -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 ) } diff --git a/api/api/cat.help.js b/api/api/cat.help.js index 3c25f7b00..00dbd5478 100644 --- a/api/api/cat.help.js +++ b/api/api/cat.help.js @@ -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 ) } diff --git a/api/api/cat.indices.js b/api/api/cat.indices.js index 0d3bcfea0..1a9652752 100644 --- a/api/api/cat.indices.js +++ b/api/api/cat.indices.js @@ -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 ) } diff --git a/api/api/cat.master.js b/api/api/cat.master.js index 184bd06ca..9863e42e1 100644 --- a/api/api/cat.master.js +++ b/api/api/cat.master.js @@ -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 ) } diff --git a/api/api/cat.nodeattrs.js b/api/api/cat.nodeattrs.js index bca45c397..1beafdd64 100644 --- a/api/api/cat.nodeattrs.js +++ b/api/api/cat.nodeattrs.js @@ -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 ) } diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js index 4a45dd5f5..08a799cd8 100644 --- a/api/api/cat.nodes.js +++ b/api/api/cat.nodes.js @@ -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 ) } diff --git a/api/api/cat.pending_tasks.js b/api/api/cat.pending_tasks.js index 8b9caa342..023065d70 100644 --- a/api/api/cat.pending_tasks.js +++ b/api/api/cat.pending_tasks.js @@ -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 ) } diff --git a/api/api/cat.plugins.js b/api/api/cat.plugins.js index 2b9d3a336..6b7eb577b 100644 --- a/api/api/cat.plugins.js +++ b/api/api/cat.plugins.js @@ -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 ) } diff --git a/api/api/cat.recovery.js b/api/api/cat.recovery.js index 11850a0d5..be17917c1 100644 --- a/api/api/cat.recovery.js +++ b/api/api/cat.recovery.js @@ -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 ) } diff --git a/api/api/cat.repositories.js b/api/api/cat.repositories.js index a736f6380..981ecc704 100644 --- a/api/api/cat.repositories.js +++ b/api/api/cat.repositories.js @@ -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 ) } diff --git a/api/api/cat.segments.js b/api/api/cat.segments.js index b7e6eecbb..b6fa888f7 100644 --- a/api/api/cat.segments.js +++ b/api/api/cat.segments.js @@ -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 ) } diff --git a/api/api/cat.shards.js b/api/api/cat.shards.js index 3313d3d50..c87ede6da 100644 --- a/api/api/cat.shards.js +++ b/api/api/cat.shards.js @@ -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 ) } diff --git a/api/api/cat.snapshots.js b/api/api/cat.snapshots.js index 455a0488e..60a0e6797 100644 --- a/api/api/cat.snapshots.js +++ b/api/api/cat.snapshots.js @@ -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 ) } diff --git a/api/api/cat.tasks.js b/api/api/cat.tasks.js index bed6b98b8..170fe567c 100644 --- a/api/api/cat.tasks.js +++ b/api/api/cat.tasks.js @@ -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 ) } diff --git a/api/api/cat.templates.js b/api/api/cat.templates.js index c49f9901e..62e542b3c 100644 --- a/api/api/cat.templates.js +++ b/api/api/cat.templates.js @@ -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 ) } diff --git a/api/api/cat.thread_pool.js b/api/api/cat.thread_pool.js index a37473d5d..59d97ee50 100644 --- a/api/api/cat.thread_pool.js +++ b/api/api/cat.thread_pool.js @@ -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 ) } diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index 51668e8da..331e7bfe5 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -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 ) } diff --git a/api/api/cluster.allocation_explain.js b/api/api/cluster.allocation_explain.js index 2a2e9a541..d8c934dbe 100644 --- a/api/api/cluster.allocation_explain.js +++ b/api/api/cluster.allocation_explain.js @@ -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 ) } diff --git a/api/api/cluster.get_settings.js b/api/api/cluster.get_settings.js index b99e539c9..db046d645 100644 --- a/api/api/cluster.get_settings.js +++ b/api/api/cluster.get_settings.js @@ -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 ) } diff --git a/api/api/cluster.health.js b/api/api/cluster.health.js index a318a1a53..5f3526f88 100644 --- a/api/api/cluster.health.js +++ b/api/api/cluster.health.js @@ -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 ) } diff --git a/api/api/cluster.pending_tasks.js b/api/api/cluster.pending_tasks.js index e9ff7e10f..dfc9df2e6 100644 --- a/api/api/cluster.pending_tasks.js +++ b/api/api/cluster.pending_tasks.js @@ -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 ) } diff --git a/api/api/cluster.put_settings.js b/api/api/cluster.put_settings.js index d161d20d1..275dcd800 100644 --- a/api/api/cluster.put_settings.js +++ b/api/api/cluster.put_settings.js @@ -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 ) } diff --git a/api/api/cluster.remote_info.js b/api/api/cluster.remote_info.js index 6626f0530..8445b4e44 100644 --- a/api/api/cluster.remote_info.js +++ b/api/api/cluster.remote_info.js @@ -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 ) } diff --git a/api/api/cluster.reroute.js b/api/api/cluster.reroute.js index 04e7d39a9..fc7fc927d 100644 --- a/api/api/cluster.reroute.js +++ b/api/api/cluster.reroute.js @@ -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 ) } diff --git a/api/api/cluster.state.js b/api/api/cluster.state.js index 1a47ce670..98df3eb07 100644 --- a/api/api/cluster.state.js +++ b/api/api/cluster.state.js @@ -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 ) } diff --git a/api/api/cluster.stats.js b/api/api/cluster.stats.js index d674a491d..f48a3420e 100644 --- a/api/api/cluster.stats.js +++ b/api/api/cluster.stats.js @@ -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 ) } diff --git a/api/api/count.js b/api/api/count.js index d955bdd0b..bafcd080d 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -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 ) } diff --git a/api/api/create.js b/api/api/create.js index 034243834..d44c77bf8 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -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 ) } diff --git a/api/api/delete.js b/api/api/delete.js index 884a213f6..2a25363df 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -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 ) } diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 65796dcfe..7207af5b7 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -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 ) } diff --git a/api/api/delete_script.js b/api/api/delete_script.js index f1945790c..338432402 100644 --- a/api/api/delete_script.js +++ b/api/api/delete_script.js @@ -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 ) } diff --git a/api/api/exists.js b/api/api/exists.js index f2e229dc2..7be0f4898 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -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 ) } diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 1d17db7be..4fc17e5e6 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -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 ) } diff --git a/api/api/explain.js b/api/api/explain.js index 1f342b291..d270bf0e4 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -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 ) } diff --git a/api/api/field_caps.js b/api/api/field_caps.js index d415fb509..f398dc57b 100644 --- a/api/api/field_caps.js +++ b/api/api/field_caps.js @@ -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 ) } diff --git a/api/api/get.js b/api/api/get.js index d234e65df..9c2d737bf 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -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 ) } diff --git a/api/api/get_script.js b/api/api/get_script.js index bebd680bc..39bd7e54a 100644 --- a/api/api/get_script.js +++ b/api/api/get_script.js @@ -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 ) } diff --git a/api/api/get_source.js b/api/api/get_source.js index 6a4fc5d55..bac64bb3b 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -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 ) } diff --git a/api/api/index.js b/api/api/index.js index f9a4835f8..7d259cfa0 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -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 ) } diff --git a/api/api/indices.analyze.js b/api/api/indices.analyze.js index d8068bbfa..cdd0866b0 100644 --- a/api/api/indices.analyze.js +++ b/api/api/indices.analyze.js @@ -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 ) } diff --git a/api/api/indices.clear_cache.js b/api/api/indices.clear_cache.js index cc38b7ecd..705aedb30 100644 --- a/api/api/indices.clear_cache.js +++ b/api/api/indices.clear_cache.js @@ -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 ) } diff --git a/api/api/indices.close.js b/api/api/indices.close.js index a33e70dec..3f6be4ad4 100644 --- a/api/api/indices.close.js +++ b/api/api/indices.close.js @@ -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 ) } diff --git a/api/api/indices.create.js b/api/api/indices.create.js index c6868d0ea..2433d1fbc 100644 --- a/api/api/indices.create.js +++ b/api/api/indices.create.js @@ -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 ) } diff --git a/api/api/indices.delete.js b/api/api/indices.delete.js index ffa02d65d..fe51f0448 100644 --- a/api/api/indices.delete.js +++ b/api/api/indices.delete.js @@ -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 ) } diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js index b876b8eec..0b4679fb4 100644 --- a/api/api/indices.delete_alias.js +++ b/api/api/indices.delete_alias.js @@ -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 ) } diff --git a/api/api/indices.delete_template.js b/api/api/indices.delete_template.js index 3259a896f..f25ec411d 100644 --- a/api/api/indices.delete_template.js +++ b/api/api/indices.delete_template.js @@ -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 ) } diff --git a/api/api/indices.exists.js b/api/api/indices.exists.js index 436c1656e..b6fdf9f89 100644 --- a/api/api/indices.exists.js +++ b/api/api/indices.exists.js @@ -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 ) } diff --git a/api/api/indices.exists_alias.js b/api/api/indices.exists_alias.js index a076c8fcb..8e90ba851 100644 --- a/api/api/indices.exists_alias.js +++ b/api/api/indices.exists_alias.js @@ -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 ) } diff --git a/api/api/indices.exists_template.js b/api/api/indices.exists_template.js index b2c459c43..943b545b8 100644 --- a/api/api/indices.exists_template.js +++ b/api/api/indices.exists_template.js @@ -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 ) } diff --git a/api/api/indices.exists_type.js b/api/api/indices.exists_type.js index 7e104eefb..2e40c05ac 100644 --- a/api/api/indices.exists_type.js +++ b/api/api/indices.exists_type.js @@ -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 ) } diff --git a/api/api/indices.flush.js b/api/api/indices.flush.js index 54834a222..47a8d2201 100644 --- a/api/api/indices.flush.js +++ b/api/api/indices.flush.js @@ -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 ) } diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js index 1c76858f7..7d1f95a09 100644 --- a/api/api/indices.flush_synced.js +++ b/api/api/indices.flush_synced.js @@ -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 ) } diff --git a/api/api/indices.forcemerge.js b/api/api/indices.forcemerge.js index 5cf5a3e06..89f0b9310 100644 --- a/api/api/indices.forcemerge.js +++ b/api/api/indices.forcemerge.js @@ -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 ) } diff --git a/api/api/indices.get.js b/api/api/indices.get.js index d6bcafa73..3215012be 100644 --- a/api/api/indices.get.js +++ b/api/api/indices.get.js @@ -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 ) } diff --git a/api/api/indices.get_alias.js b/api/api/indices.get_alias.js index 7925d5238..45f8ff747 100644 --- a/api/api/indices.get_alias.js +++ b/api/api/indices.get_alias.js @@ -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 ) } diff --git a/api/api/indices.get_field_mapping.js b/api/api/indices.get_field_mapping.js index 3af4964ab..13fd55563 100644 --- a/api/api/indices.get_field_mapping.js +++ b/api/api/indices.get_field_mapping.js @@ -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 ) } diff --git a/api/api/indices.get_mapping.js b/api/api/indices.get_mapping.js index de130c8ab..c077f9a43 100644 --- a/api/api/indices.get_mapping.js +++ b/api/api/indices.get_mapping.js @@ -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 ) } diff --git a/api/api/indices.get_settings.js b/api/api/indices.get_settings.js index c53e859fd..e29b58a28 100644 --- a/api/api/indices.get_settings.js +++ b/api/api/indices.get_settings.js @@ -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 ) } diff --git a/api/api/indices.get_template.js b/api/api/indices.get_template.js index 55beaa599..6824d30d8 100644 --- a/api/api/indices.get_template.js +++ b/api/api/indices.get_template.js @@ -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 ) } diff --git a/api/api/indices.get_upgrade.js b/api/api/indices.get_upgrade.js index 8bffcf0e5..7c144538c 100644 --- a/api/api/indices.get_upgrade.js +++ b/api/api/indices.get_upgrade.js @@ -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 ) } diff --git a/api/api/indices.open.js b/api/api/indices.open.js index 2cb459eee..0a2361e15 100644 --- a/api/api/indices.open.js +++ b/api/api/indices.open.js @@ -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 ) } diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js index d0efccf94..fc9f30e41 100644 --- a/api/api/indices.put_alias.js +++ b/api/api/indices.put_alias.js @@ -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 ) } diff --git a/api/api/indices.put_mapping.js b/api/api/indices.put_mapping.js index bf403dc7a..fd0cb2420 100644 --- a/api/api/indices.put_mapping.js +++ b/api/api/indices.put_mapping.js @@ -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 ) } diff --git a/api/api/indices.put_settings.js b/api/api/indices.put_settings.js index c9eb3b0e4..a8d24ce60 100644 --- a/api/api/indices.put_settings.js +++ b/api/api/indices.put_settings.js @@ -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 ) } diff --git a/api/api/indices.put_template.js b/api/api/indices.put_template.js index c67845977..02d12841a 100644 --- a/api/api/indices.put_template.js +++ b/api/api/indices.put_template.js @@ -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 ) } diff --git a/api/api/indices.recovery.js b/api/api/indices.recovery.js index 4b28d9914..82215416c 100644 --- a/api/api/indices.recovery.js +++ b/api/api/indices.recovery.js @@ -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 ) } diff --git a/api/api/indices.refresh.js b/api/api/indices.refresh.js index aeb999575..c9bee4420 100644 --- a/api/api/indices.refresh.js +++ b/api/api/indices.refresh.js @@ -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 ) } diff --git a/api/api/indices.rollover.js b/api/api/indices.rollover.js index 47a9af22f..71cc44f2c 100644 --- a/api/api/indices.rollover.js +++ b/api/api/indices.rollover.js @@ -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 ) } diff --git a/api/api/indices.segments.js b/api/api/indices.segments.js index 7d719c375..1942d3253 100644 --- a/api/api/indices.segments.js +++ b/api/api/indices.segments.js @@ -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 ) } diff --git a/api/api/indices.shard_stores.js b/api/api/indices.shard_stores.js index 4cc39dea4..b3452cff7 100644 --- a/api/api/indices.shard_stores.js +++ b/api/api/indices.shard_stores.js @@ -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 ) } diff --git a/api/api/indices.shrink.js b/api/api/indices.shrink.js index 9981a1eec..8f7afbebd 100644 --- a/api/api/indices.shrink.js +++ b/api/api/indices.shrink.js @@ -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 ) } diff --git a/api/api/indices.split.js b/api/api/indices.split.js index a40db9b25..b6362db21 100644 --- a/api/api/indices.split.js +++ b/api/api/indices.split.js @@ -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 ) } diff --git a/api/api/indices.stats.js b/api/api/indices.stats.js index 00f43b6ad..5ef5f2590 100644 --- a/api/api/indices.stats.js +++ b/api/api/indices.stats.js @@ -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 ) } diff --git a/api/api/indices.update_aliases.js b/api/api/indices.update_aliases.js index 7ec44ccdb..23c8a3f1c 100644 --- a/api/api/indices.update_aliases.js +++ b/api/api/indices.update_aliases.js @@ -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 ) } diff --git a/api/api/indices.upgrade.js b/api/api/indices.upgrade.js index 1259ee440..5dbd9d62a 100644 --- a/api/api/indices.upgrade.js +++ b/api/api/indices.upgrade.js @@ -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 ) } diff --git a/api/api/indices.validate_query.js b/api/api/indices.validate_query.js index ca27a5990..eac6cc301 100644 --- a/api/api/indices.validate_query.js +++ b/api/api/indices.validate_query.js @@ -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 ) } diff --git a/api/api/info.js b/api/api/info.js index 59cb80341..adf968cd9 100644 --- a/api/api/info.js +++ b/api/api/info.js @@ -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 ) } diff --git a/api/api/ingest.delete_pipeline.js b/api/api/ingest.delete_pipeline.js index ace43057e..5c09102c7 100644 --- a/api/api/ingest.delete_pipeline.js +++ b/api/api/ingest.delete_pipeline.js @@ -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 ) } diff --git a/api/api/ingest.get_pipeline.js b/api/api/ingest.get_pipeline.js index 176a24abe..c4ed71d6b 100644 --- a/api/api/ingest.get_pipeline.js +++ b/api/api/ingest.get_pipeline.js @@ -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 ) } diff --git a/api/api/ingest.processor_grok.js b/api/api/ingest.processor_grok.js index a8b93a6cd..c94f51b76 100644 --- a/api/api/ingest.processor_grok.js +++ b/api/api/ingest.processor_grok.js @@ -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 ) } diff --git a/api/api/ingest.put_pipeline.js b/api/api/ingest.put_pipeline.js index 02e6841c3..e87f3b732 100644 --- a/api/api/ingest.put_pipeline.js +++ b/api/api/ingest.put_pipeline.js @@ -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 ) } diff --git a/api/api/ingest.simulate.js b/api/api/ingest.simulate.js index 14ff6c3c9..df95e7b8b 100644 --- a/api/api/ingest.simulate.js +++ b/api/api/ingest.simulate.js @@ -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 ) } diff --git a/api/api/mget.js b/api/api/mget.js index 54890e994..cc6dbe375 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -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 ) } diff --git a/api/api/msearch.js b/api/api/msearch.js index 1319b246a..b8312360a 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -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 ) } diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js index 62f0a6754..4e6e18ef9 100644 --- a/api/api/msearch_template.js +++ b/api/api/msearch_template.js @@ -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 ) } diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index 1cceaa317..5a9d0d902 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -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 ) } diff --git a/api/api/nodes.hot_threads.js b/api/api/nodes.hot_threads.js index 23ac7e02d..e2c9ea3fe 100644 --- a/api/api/nodes.hot_threads.js +++ b/api/api/nodes.hot_threads.js @@ -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 ) } diff --git a/api/api/nodes.info.js b/api/api/nodes.info.js index c48200a32..414d93a99 100644 --- a/api/api/nodes.info.js +++ b/api/api/nodes.info.js @@ -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 ) } diff --git a/api/api/nodes.stats.js b/api/api/nodes.stats.js index 176556a83..3819d2e62 100644 --- a/api/api/nodes.stats.js +++ b/api/api/nodes.stats.js @@ -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 ) } diff --git a/api/api/nodes.usage.js b/api/api/nodes.usage.js index 11a4055ee..17853295f 100644 --- a/api/api/nodes.usage.js +++ b/api/api/nodes.usage.js @@ -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 ) } diff --git a/api/api/ping.js b/api/api/ping.js index 8dc4f43ad..8351bf512 100644 --- a/api/api/ping.js +++ b/api/api/ping.js @@ -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 ) } diff --git a/api/api/put_script.js b/api/api/put_script.js index ce07d3210..87c4c4464 100644 --- a/api/api/put_script.js +++ b/api/api/put_script.js @@ -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 ) } diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js index 8b22dad2b..e54102e62 100644 --- a/api/api/rank_eval.js +++ b/api/api/rank_eval.js @@ -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 ) } diff --git a/api/api/reindex.js b/api/api/reindex.js index 6764bb563..453d7eed2 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -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 ) } diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js index 396dff3d1..54d8de9e4 100644 --- a/api/api/reindex_rethrottle.js +++ b/api/api/reindex_rethrottle.js @@ -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 ) } diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js index 94b6a3c5a..35faf765a 100644 --- a/api/api/render_search_template.js +++ b/api/api/render_search_template.js @@ -2,7 +2,7 @@ function buildRenderSearchTemplate (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [render_search_template](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request * @@ -63,7 +63,7 @@ function buildRenderSearchTemplate (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 ) } diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js index 7a08082c2..b3f871e75 100644 --- a/api/api/scripts_painless_execute.js +++ b/api/api/scripts_painless_execute.js @@ -2,7 +2,7 @@ function buildScriptsPainlessExecute (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [scripts_painless_execute](https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html) request * @@ -62,7 +62,7 @@ function buildScriptsPainlessExecute (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 ) } diff --git a/api/api/scroll.js b/api/api/scroll.js index f5f5bf575..32e4c7010 100644 --- a/api/api/scroll.js +++ b/api/api/scroll.js @@ -2,7 +2,7 @@ function buildScroll (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request * @@ -69,7 +69,7 @@ function buildScroll (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 ) } diff --git a/api/api/search.js b/api/api/search.js index 1a29f8427..8f75d2ad5 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -2,7 +2,7 @@ function buildSearch (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html) request * @@ -66,7 +66,7 @@ function buildSearch (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 ) } @@ -186,7 +186,7 @@ function buildSearch (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 ) } diff --git a/api/api/search_shards.js b/api/api/search_shards.js index 62a2fa783..bf341c32d 100644 --- a/api/api/search_shards.js +++ b/api/api/search_shards.js @@ -2,7 +2,7 @@ function buildSearchShards (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [search_shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html) request * @@ -32,7 +32,7 @@ function buildSearchShards (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 buildSearchShards (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 ) } diff --git a/api/api/search_template.js b/api/api/search_template.js index 7d42e6b62..e6d2b1e00 100644 --- a/api/api/search_template.js +++ b/api/api/search_template.js @@ -2,7 +2,7 @@ function buildSearchTemplate (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [search_template](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request * @@ -38,7 +38,7 @@ function buildSearchTemplate (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 buildSearchTemplate (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 buildSearchTemplate (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 ) } diff --git a/api/api/snapshot.create.js b/api/api/snapshot.create.js index 18dc40192..ab12c54cf 100644 --- a/api/api/snapshot.create.js +++ b/api/api/snapshot.create.js @@ -2,7 +2,7 @@ function buildSnapshotCreate (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -30,13 +30,13 @@ function buildSnapshotCreate (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { body: null, headers: null, statusCode: null } + result ) } if (params['snapshot'] == null) { return callback( new ConfigurationError('Missing required parameter: snapshot'), - { body: null, headers: null, statusCode: null } + result ) } @@ -44,7 +44,7 @@ function buildSnapshotCreate (opts) { if (params['snapshot'] != null && (params['repository'] == null)) { return callback( new ConfigurationError('Missing required parameter of the url: repository'), - { body: null, headers: null, statusCode: null } + result ) } @@ -92,7 +92,7 @@ function buildSnapshotCreate (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 ) } diff --git a/api/api/snapshot.create_repository.js b/api/api/snapshot.create_repository.js index 7458bea79..52012fb38 100644 --- a/api/api/snapshot.create_repository.js +++ b/api/api/snapshot.create_repository.js @@ -2,7 +2,7 @@ function buildSnapshotCreateRepository (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.create_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -30,13 +30,13 @@ function buildSnapshotCreateRepository (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { 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 ) } @@ -86,7 +86,7 @@ function buildSnapshotCreateRepository (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 ) } diff --git a/api/api/snapshot.delete.js b/api/api/snapshot.delete.js index 949f4d2e6..ca5060144 100644 --- a/api/api/snapshot.delete.js +++ b/api/api/snapshot.delete.js @@ -2,7 +2,7 @@ function buildSnapshotDelete (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -28,19 +28,19 @@ function buildSnapshotDelete (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { body: null, headers: null, statusCode: null } + result ) } if (params['snapshot'] == null) { return callback( new ConfigurationError('Missing required parameter: snapshot'), - { 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 ) } @@ -48,7 +48,7 @@ function buildSnapshotDelete (opts) { if (params['snapshot'] != null && (params['repository'] == null)) { return callback( new ConfigurationError('Missing required parameter of the url: repository'), - { body: null, headers: null, statusCode: null } + result ) } @@ -94,7 +94,7 @@ function buildSnapshotDelete (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 ) } diff --git a/api/api/snapshot.delete_repository.js b/api/api/snapshot.delete_repository.js index d42bc2113..1291f1767 100644 --- a/api/api/snapshot.delete_repository.js +++ b/api/api/snapshot.delete_repository.js @@ -2,7 +2,7 @@ function buildSnapshotDeleteRepository (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.delete_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -28,13 +28,13 @@ function buildSnapshotDeleteRepository (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { 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 buildSnapshotDeleteRepository (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 ) } diff --git a/api/api/snapshot.get.js b/api/api/snapshot.get.js index 91b54005f..8ffe9ab50 100644 --- a/api/api/snapshot.get.js +++ b/api/api/snapshot.get.js @@ -2,7 +2,7 @@ function buildSnapshotGet (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -30,19 +30,19 @@ function buildSnapshotGet (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { body: null, headers: null, statusCode: null } + result ) } if (params['snapshot'] == null) { return callback( new ConfigurationError('Missing required parameter: snapshot'), - { 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 ) } @@ -50,7 +50,7 @@ function buildSnapshotGet (opts) { if (params['snapshot'] != null && (params['repository'] == null)) { return callback( new ConfigurationError('Missing required parameter of the url: repository'), - { body: null, headers: null, statusCode: null } + result ) } @@ -100,7 +100,7 @@ function buildSnapshotGet (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 ) } diff --git a/api/api/snapshot.get_repository.js b/api/api/snapshot.get_repository.js index 0c91cf26d..fa83c11f4 100644 --- a/api/api/snapshot.get_repository.js +++ b/api/api/snapshot.get_repository.js @@ -2,7 +2,7 @@ function buildSnapshotGetRepository (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.get_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -28,7 +28,7 @@ function buildSnapshotGetRepository (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 buildSnapshotGetRepository (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 ) } diff --git a/api/api/snapshot.restore.js b/api/api/snapshot.restore.js index d5f2e445d..92059a1d7 100644 --- a/api/api/snapshot.restore.js +++ b/api/api/snapshot.restore.js @@ -2,7 +2,7 @@ function buildSnapshotRestore (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -30,13 +30,13 @@ function buildSnapshotRestore (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { body: null, headers: null, statusCode: null } + result ) } if (params['snapshot'] == null) { return callback( new ConfigurationError('Missing required parameter: snapshot'), - { body: null, headers: null, statusCode: null } + result ) } @@ -44,7 +44,7 @@ function buildSnapshotRestore (opts) { if (params['snapshot'] != null && (params['repository'] == null)) { return callback( new ConfigurationError('Missing required parameter of the url: repository'), - { body: null, headers: null, statusCode: null } + result ) } @@ -92,7 +92,7 @@ function buildSnapshotRestore (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 ) } diff --git a/api/api/snapshot.status.js b/api/api/snapshot.status.js index 50959dd95..7d65a5a5c 100644 --- a/api/api/snapshot.status.js +++ b/api/api/snapshot.status.js @@ -2,7 +2,7 @@ function buildSnapshotStatus (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -29,7 +29,7 @@ function buildSnapshotStatus (opts) { if (params.body != null) { return callback( new ConfigurationError('This API does not require a body'), - { body: null, headers: null, statusCode: null } + result ) } @@ -37,7 +37,7 @@ function buildSnapshotStatus (opts) { if (params['snapshot'] != null && (params['repository'] == null)) { return callback( new ConfigurationError('Missing required parameter of the url: repository'), - { body: null, headers: null, statusCode: null } + result ) } @@ -85,7 +85,7 @@ function buildSnapshotStatus (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 ) } diff --git a/api/api/snapshot.verify_repository.js b/api/api/snapshot.verify_repository.js index ff605606c..095eb0bac 100644 --- a/api/api/snapshot.verify_repository.js +++ b/api/api/snapshot.verify_repository.js @@ -2,7 +2,7 @@ function buildSnapshotVerifyRepository (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [snapshot.verify_repository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request * @@ -28,13 +28,13 @@ function buildSnapshotVerifyRepository (opts) { if (params['repository'] == null) { return callback( new ConfigurationError('Missing required parameter: repository'), - { 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 buildSnapshotVerifyRepository (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 ) } diff --git a/api/api/tasks.cancel.js b/api/api/tasks.cancel.js index 5b53505e0..f403dfdaf 100644 --- a/api/api/tasks.cancel.js +++ b/api/api/tasks.cancel.js @@ -2,7 +2,7 @@ function buildTasksCancel (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [tasks.cancel](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request * @@ -29,7 +29,7 @@ function buildTasksCancel (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 buildTasksCancel (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 ) } diff --git a/api/api/tasks.get.js b/api/api/tasks.get.js index f3d574b0e..38951667c 100644 --- a/api/api/tasks.get.js +++ b/api/api/tasks.get.js @@ -2,7 +2,7 @@ function buildTasksGet (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [tasks.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request * @@ -28,13 +28,13 @@ function buildTasksGet (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.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 buildTasksGet (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 ) } diff --git a/api/api/tasks.list.js b/api/api/tasks.list.js index a9d70eb49..68e38707f 100644 --- a/api/api/tasks.list.js +++ b/api/api/tasks.list.js @@ -2,7 +2,7 @@ function buildTasksList (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [tasks.list](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request * @@ -32,7 +32,7 @@ function buildTasksList (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 buildTasksList (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 ) } diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 6caf19bf2..af07ddd34 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -2,7 +2,7 @@ function buildTermvectors (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html) request * @@ -41,13 +41,13 @@ function buildTermvectors (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 ) } @@ -55,12 +55,12 @@ function buildTermvectors (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 buildTermvectors (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 ) } diff --git a/api/api/update.js b/api/api/update.js index 0c65b4ada..b0140d158 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -2,7 +2,7 @@ function buildUpdate (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html) request * @@ -42,25 +42,25 @@ function buildUpdate (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 ) } @@ -68,12 +68,12 @@ function buildUpdate (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 ) } @@ -143,7 +143,7 @@ function buildUpdate (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 ) } diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index 7e3a2ec1c..56c53fdce 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -2,7 +2,7 @@ function buildUpdateByQuery (opts) { // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError } = opts + const { makeRequest, ConfigurationError, result } = opts /** * Perform a [update_by_query](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html) request * @@ -62,7 +62,7 @@ function buildUpdateByQuery (opts) { if (params['index'] == null) { return callback( new ConfigurationError('Missing required parameter: index'), - { body: null, headers: null, statusCode: null } + result ) } @@ -70,7 +70,7 @@ function buildUpdateByQuery (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 buildUpdateByQuery (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 ) } diff --git a/api/index.js b/api/index.js index da91b8259..4d88a2504 100644 --- a/api/index.js +++ b/api/index.js @@ -5,6 +5,7 @@ const assert = require('assert') function ESAPI (opts) { assert(opts.makeRequest, 'Missing makeRequest function') assert(opts.ConfigurationError, 'Missing ConfigurationError class') + assert(opts.result, 'Missing default result object') const apis = { bulk: require('./api/bulk.js')(opts),