From 56e5857e2715624dc27d464531c04ce8ba97dadf Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 17:49:27 +0100 Subject: [PATCH 1/6] API generation --- api/api/ccr.follow_stats.js | 6 + ...tion.upgrade.js => ccr.forget_follower.js} | 24 +- ...pack.graph.explore.js => graph.explore.js} | 10 +- api/api/ilm.explain_lifecycle.js | 3 +- ...ck.license.delete.js => license.delete.js} | 10 +- .../{xpack.license.get.js => license.get.js} | 10 +- ..._status.js => license.get_basic_status.js} | 10 +- ..._status.js => license.get_trial_status.js} | 10 +- ...{xpack.license.post.js => license.post.js} | 10 +- ...t_basic.js => license.post_start_basic.js} | 10 +- ...t_trial.js => license.post_start_trial.js} | 10 +- ...recations.js => migration.deprecations.js} | 10 +- api/api/ml.get_calendars.js | 9 +- api/api/reindex.js | 2 + ...lup.delete_job.js => rollup.delete_job.js} | 10 +- ....rollup.get_jobs.js => rollup.get_jobs.js} | 10 +- ...llup_caps.js => rollup.get_rollup_caps.js} | 10 +- ...aps.js => rollup.get_rollup_index_caps.js} | 10 +- ...ck.rollup.put_job.js => rollup.put_job.js} | 10 +- ...llup_search.js => rollup.rollup_search.js} | 12 +- ...ollup.start_job.js => rollup.start_job.js} | 10 +- ....rollup.stop_job.js => rollup.stop_job.js} | 10 +- api/api/security.disable_user.js | 4 + api/api/security.enable_user.js | 4 + api/api/security.get_privileges.js | 4 +- ...ql.clear_cursor.js => sql.clear_cursor.js} | 10 +- api/api/{xpack.sql.query.js => sql.query.js} | 10 +- ...pack.sql.translate.js => sql.translate.js} | 10 +- ...cher.ack_watch.js => watcher.ack_watch.js} | 10 +- ...ate_watch.js => watcher.activate_watch.js} | 10 +- ...e_watch.js => watcher.deactivate_watch.js} | 10 +- ...elete_watch.js => watcher.delete_watch.js} | 10 +- ...cute_watch.js => watcher.execute_watch.js} | 10 +- ...cher.get_watch.js => watcher.get_watch.js} | 10 +- ...cher.put_watch.js => watcher.put_watch.js} | 10 +- ...pack.watcher.start.js => watcher.start.js} | 10 +- ...pack.watcher.stats.js => watcher.stats.js} | 14 +- ...{xpack.watcher.stop.js => watcher.stop.js} | 10 +- api/api/xpack.migration.get_assistance.js | 136 ---- api/index.js | 131 ++-- api/requestParams.d.ts | 228 +++--- docs/reference.asciidoc | 691 +++++++++--------- index.d.ts | 129 ++-- 43 files changed, 763 insertions(+), 914 deletions(-) rename api/api/{xpack.migration.upgrade.js => ccr.forget_follower.js} (78%) rename api/api/{xpack.graph.explore.js => graph.explore.js} (92%) rename api/api/{xpack.license.delete.js => license.delete.js} (91%) rename api/api/{xpack.license.get.js => license.get.js} (91%) rename api/api/{xpack.license.get_basic_status.js => license.get_basic_status.js} (90%) rename api/api/{xpack.license.get_trial_status.js => license.get_trial_status.js} (90%) rename api/api/{xpack.license.post.js => license.post.js} (91%) rename api/api/{xpack.license.post_start_basic.js => license.post_start_basic.js} (90%) rename api/api/{xpack.license.post_start_trial.js => license.post_start_trial.js} (90%) rename api/api/{xpack.migration.deprecations.js => migration.deprecations.js} (90%) rename api/api/{xpack.rollup.delete_job.js => rollup.delete_job.js} (92%) rename api/api/{xpack.rollup.get_jobs.js => rollup.get_jobs.js} (92%) rename api/api/{xpack.rollup.get_rollup_caps.js => rollup.get_rollup_caps.js} (92%) rename api/api/{xpack.rollup.get_rollup_index_caps.js => rollup.get_rollup_index_caps.js} (91%) rename api/api/{xpack.rollup.put_job.js => rollup.put_job.js} (93%) rename api/api/{xpack.rollup.rollup_search.js => rollup.rollup_search.js} (91%) rename api/api/{xpack.rollup.start_job.js => rollup.start_job.js} (92%) rename api/api/{xpack.rollup.stop_job.js => rollup.stop_job.js} (93%) rename api/api/{xpack.sql.clear_cursor.js => sql.clear_cursor.js} (92%) rename api/api/{xpack.sql.query.js => sql.query.js} (93%) rename api/api/{xpack.sql.translate.js => sql.translate.js} (92%) rename api/api/{xpack.watcher.ack_watch.js => watcher.ack_watch.js} (92%) rename api/api/{xpack.watcher.activate_watch.js => watcher.activate_watch.js} (90%) rename api/api/{xpack.watcher.deactivate_watch.js => watcher.deactivate_watch.js} (90%) rename api/api/{xpack.watcher.delete_watch.js => watcher.delete_watch.js} (90%) rename api/api/{xpack.watcher.execute_watch.js => watcher.execute_watch.js} (90%) rename api/api/{xpack.watcher.get_watch.js => watcher.get_watch.js} (90%) rename api/api/{xpack.watcher.put_watch.js => watcher.put_watch.js} (91%) rename api/api/{xpack.watcher.start.js => watcher.start.js} (90%) rename api/api/{xpack.watcher.stats.js => watcher.stats.js} (88%) rename api/api/{xpack.watcher.stop.js => watcher.stop.js} (90%) delete mode 100644 api/api/xpack.migration.get_assistance.js diff --git a/api/api/ccr.follow_stats.js b/api/api/ccr.follow_stats.js index a586bd1a2..027870fec 100644 --- a/api/api/ccr.follow_stats.js +++ b/api/api/ccr.follow_stats.js @@ -60,6 +60,12 @@ function buildCcrFollowStats (opts) { }) } + // check required parameters + if (params['index'] == null) { + const err = new ConfigurationError('Missing required parameter: index') + return handleError(err, callback) + } + // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/xpack.migration.upgrade.js b/api/api/ccr.forget_follower.js similarity index 78% rename from api/api/xpack.migration.upgrade.js rename to api/api/ccr.forget_follower.js index abcac314c..0c50659f0 100644 --- a/api/api/xpack.migration.upgrade.js +++ b/api/api/ccr.forget_follower.js @@ -22,25 +22,25 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackMigrationUpgrade (opts) { +function buildCcrForgetFollower (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.migration.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html) request + * Perform a [ccr.forget_follower](http://www.elastic.co/guide/en/elasticsearch/reference/current) request * - * @param {string} index - The name of the index - * @param {boolean} wait_for_completion - Should the request block until the upgrade operation is completed + * @param {string} index - the name of the leader index for which specified follower retention leases should be removed + * @param {object} body - the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index */ const acceptedQuerystring = [ - 'wait_for_completion' + ] const snakeCase = { - waitForCompletion: 'wait_for_completion' + } - return function xpackMigrationUpgrade (params, options, callback) { + return function ccrForgetFollower (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -55,7 +55,7 @@ function buildXpackMigrationUpgrade (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackMigrationUpgrade(params, options, (err, body) => { + ccrForgetFollower(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -66,6 +66,10 @@ function buildXpackMigrationUpgrade (opts) { const err = new ConfigurationError('Missing required parameter: index') return handleError(err, callback) } + if (params['body'] == null) { + const err = new ConfigurationError('Missing required parameter: body') + return handleError(err, callback) + } // validate headers object if (options.headers != null && typeof options.headers !== 'object') { @@ -88,7 +92,7 @@ function buildXpackMigrationUpgrade (opts) { var path = '' - path = '/' + '_migration' + '/' + 'upgrade' + '/' + encodeURIComponent(index) + path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower' // build request object const request = { @@ -129,4 +133,4 @@ function buildXpackMigrationUpgrade (opts) { } } -module.exports = buildXpackMigrationUpgrade +module.exports = buildCcrForgetFollower diff --git a/api/api/xpack.graph.explore.js b/api/api/graph.explore.js similarity index 92% rename from api/api/xpack.graph.explore.js rename to api/api/graph.explore.js index fd869a86a..7ddd5b7bb 100644 --- a/api/api/xpack.graph.explore.js +++ b/api/api/graph.explore.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackGraphExplore (opts) { +function buildGraphExplore (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.graph.explore](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html) request + * Perform a [graph.explore](https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html) request * * @param {list} index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * @param {list} type - A comma-separated list of document types to search; leave empty to perform the operation on all types @@ -44,7 +44,7 @@ function buildXpackGraphExplore (opts) { } - return function xpackGraphExplore (params, options, callback) { + return function graphExplore (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -59,7 +59,7 @@ function buildXpackGraphExplore (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackGraphExplore(params, options, (err, body) => { + graphExplore(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -137,4 +137,4 @@ function buildXpackGraphExplore (opts) { } } -module.exports = buildXpackGraphExplore +module.exports = buildGraphExplore diff --git a/api/api/ilm.explain_lifecycle.js b/api/api/ilm.explain_lifecycle.js index bdc11cd86..9a00df8ce 100644 --- a/api/api/ilm.explain_lifecycle.js +++ b/api/api/ilm.explain_lifecycle.js @@ -29,11 +29,10 @@ function buildIlmExplainLifecycle (opts) { * Perform a [ilm.explain_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html) request * * @param {string} index - The name of the index to explain - * @param {boolean} human - Return data such as dates in a human readable format */ const acceptedQuerystring = [ - 'human' + ] const snakeCase = { diff --git a/api/api/xpack.license.delete.js b/api/api/license.delete.js similarity index 91% rename from api/api/xpack.license.delete.js rename to api/api/license.delete.js index 07c1e7ec5..c106ac8f9 100644 --- a/api/api/xpack.license.delete.js +++ b/api/api/license.delete.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicenseDelete (opts) { +function buildLicenseDelete (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.delete](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.delete](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * */ @@ -38,7 +38,7 @@ function buildXpackLicenseDelete (opts) { } - return function xpackLicenseDelete (params, options, callback) { + return function licenseDelete (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -53,7 +53,7 @@ function buildXpackLicenseDelete (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicenseDelete(params, options, (err, body) => { + licenseDelete(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -127,4 +127,4 @@ function buildXpackLicenseDelete (opts) { } } -module.exports = buildXpackLicenseDelete +module.exports = buildLicenseDelete diff --git a/api/api/xpack.license.get.js b/api/api/license.get.js similarity index 91% rename from api/api/xpack.license.get.js rename to api/api/license.get.js index c0a5d67ff..8f08f25ac 100644 --- a/api/api/xpack.license.get.js +++ b/api/api/license.get.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicenseGet (opts) { +function buildLicenseGet (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.get](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.get](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * * @param {boolean} local - Return local information, do not retrieve the state from master node (default: false) */ @@ -39,7 +39,7 @@ function buildXpackLicenseGet (opts) { } - return function xpackLicenseGet (params, options, callback) { + return function licenseGet (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackLicenseGet (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicenseGet(params, options, (err, body) => { + licenseGet(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackLicenseGet (opts) { } } -module.exports = buildXpackLicenseGet +module.exports = buildLicenseGet diff --git a/api/api/xpack.license.get_basic_status.js b/api/api/license.get_basic_status.js similarity index 90% rename from api/api/xpack.license.get_basic_status.js rename to api/api/license.get_basic_status.js index 9fb98f504..f37c1488f 100644 --- a/api/api/xpack.license.get_basic_status.js +++ b/api/api/license.get_basic_status.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicenseGetBasicStatus (opts) { +function buildLicenseGetBasicStatus (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.get_basic_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.get_basic_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * */ @@ -38,7 +38,7 @@ function buildXpackLicenseGetBasicStatus (opts) { } - return function xpackLicenseGetBasicStatus (params, options, callback) { + return function licenseGetBasicStatus (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -53,7 +53,7 @@ function buildXpackLicenseGetBasicStatus (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicenseGetBasicStatus(params, options, (err, body) => { + licenseGetBasicStatus(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -127,4 +127,4 @@ function buildXpackLicenseGetBasicStatus (opts) { } } -module.exports = buildXpackLicenseGetBasicStatus +module.exports = buildLicenseGetBasicStatus diff --git a/api/api/xpack.license.get_trial_status.js b/api/api/license.get_trial_status.js similarity index 90% rename from api/api/xpack.license.get_trial_status.js rename to api/api/license.get_trial_status.js index 81a5f7fde..dbcc06001 100644 --- a/api/api/xpack.license.get_trial_status.js +++ b/api/api/license.get_trial_status.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicenseGetTrialStatus (opts) { +function buildLicenseGetTrialStatus (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.get_trial_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.get_trial_status](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * */ @@ -38,7 +38,7 @@ function buildXpackLicenseGetTrialStatus (opts) { } - return function xpackLicenseGetTrialStatus (params, options, callback) { + return function licenseGetTrialStatus (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -53,7 +53,7 @@ function buildXpackLicenseGetTrialStatus (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicenseGetTrialStatus(params, options, (err, body) => { + licenseGetTrialStatus(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -127,4 +127,4 @@ function buildXpackLicenseGetTrialStatus (opts) { } } -module.exports = buildXpackLicenseGetTrialStatus +module.exports = buildLicenseGetTrialStatus diff --git a/api/api/xpack.license.post.js b/api/api/license.post.js similarity index 91% rename from api/api/xpack.license.post.js rename to api/api/license.post.js index b7dcd1f3e..5c4717859 100644 --- a/api/api/xpack.license.post.js +++ b/api/api/license.post.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicensePost (opts) { +function buildLicensePost (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.post](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.post](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * * @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false) * @param {object} body - licenses to be installed @@ -40,7 +40,7 @@ function buildXpackLicensePost (opts) { } - return function xpackLicensePost (params, options, callback) { + return function licensePost (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -55,7 +55,7 @@ function buildXpackLicensePost (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicensePost(params, options, (err, body) => { + licensePost(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -123,4 +123,4 @@ function buildXpackLicensePost (opts) { } } -module.exports = buildXpackLicensePost +module.exports = buildLicensePost diff --git a/api/api/xpack.license.post_start_basic.js b/api/api/license.post_start_basic.js similarity index 90% rename from api/api/xpack.license.post_start_basic.js rename to api/api/license.post_start_basic.js index 4950bcba2..3c38476d1 100644 --- a/api/api/xpack.license.post_start_basic.js +++ b/api/api/license.post_start_basic.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicensePostStartBasic (opts) { +function buildLicensePostStartBasic (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.post_start_basic](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.post_start_basic](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * * @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false) */ @@ -39,7 +39,7 @@ function buildXpackLicensePostStartBasic (opts) { } - return function xpackLicensePostStartBasic (params, options, callback) { + return function licensePostStartBasic (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackLicensePostStartBasic (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicensePostStartBasic(params, options, (err, body) => { + licensePostStartBasic(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackLicensePostStartBasic (opts) { } } -module.exports = buildXpackLicensePostStartBasic +module.exports = buildLicensePostStartBasic diff --git a/api/api/xpack.license.post_start_trial.js b/api/api/license.post_start_trial.js similarity index 90% rename from api/api/xpack.license.post_start_trial.js rename to api/api/license.post_start_trial.js index e5f462be2..bdc4faf1d 100644 --- a/api/api/xpack.license.post_start_trial.js +++ b/api/api/license.post_start_trial.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackLicensePostStartTrial (opts) { +function buildLicensePostStartTrial (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.license.post_start_trial](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request + * Perform a [license.post_start_trial](https://www.elastic.co/guide/en/x-pack/current/license-management.html) request * * @param {string} type - The type of trial license to generate (default: "trial") * @param {boolean} acknowledge - whether the user has acknowledged acknowledge messages (default: false) @@ -41,7 +41,7 @@ function buildXpackLicensePostStartTrial (opts) { } - return function xpackLicensePostStartTrial (params, options, callback) { + return function licensePostStartTrial (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -56,7 +56,7 @@ function buildXpackLicensePostStartTrial (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackLicensePostStartTrial(params, options, (err, body) => { + licensePostStartTrial(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -130,4 +130,4 @@ function buildXpackLicensePostStartTrial (opts) { } } -module.exports = buildXpackLicensePostStartTrial +module.exports = buildLicensePostStartTrial diff --git a/api/api/xpack.migration.deprecations.js b/api/api/migration.deprecations.js similarity index 90% rename from api/api/xpack.migration.deprecations.js rename to api/api/migration.deprecations.js index 209648e64..0325579ea 100644 --- a/api/api/xpack.migration.deprecations.js +++ b/api/api/migration.deprecations.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackMigrationDeprecations (opts) { +function buildMigrationDeprecations (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.migration.deprecations](http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html) request + * Perform a [migration.deprecations](http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html) request * * @param {string} index - Index pattern */ @@ -39,7 +39,7 @@ function buildXpackMigrationDeprecations (opts) { } - return function xpackMigrationDeprecations (params, options, callback) { + return function migrationDeprecations (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackMigrationDeprecations (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackMigrationDeprecations(params, options, (err, body) => { + migrationDeprecations(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackMigrationDeprecations (opts) { } } -module.exports = buildXpackMigrationDeprecations +module.exports = buildMigrationDeprecations diff --git a/api/api/ml.get_calendars.js b/api/api/ml.get_calendars.js index 3815c5a2f..2e3cdf86f 100644 --- a/api/api/ml.get_calendars.js +++ b/api/api/ml.get_calendars.js @@ -31,6 +31,7 @@ function buildMlGetCalendars (opts) { * @param {string} calendar_id - The ID of the calendar to fetch * @param {int} from - skips a number of calendars * @param {int} size - specifies a max number of calendars to get + * @param {object} body - The from and size parameters optionally sent in the body */ const acceptedQuerystring = [ @@ -63,12 +64,6 @@ function buildMlGetCalendars (opts) { }) } - // check required parameters - if (params.body != null) { - const err = new ConfigurationError('This API does not require a body') - return handleError(err, callback) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) @@ -100,7 +95,7 @@ function buildMlGetCalendars (opts) { const request = { method, path, - body: '', + body: body || '', querystring } diff --git a/api/api/reindex.js b/api/api/reindex.js index e4130b870..571bbfc03 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -33,6 +33,7 @@ function buildReindex (opts) { * @param {string} wait_for_active_shards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) * @param {boolean} wait_for_completion - Should the request should block until the reindex is complete. * @param {number} requests_per_second - The throttle to set on this request in sub-requests per second. -1 means no throttle. + * @param {time} scroll - Control how long to keep the search context alive * @param {number} slices - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. * @param {object} body - The search definition using the Query DSL and the prototype for the index request. */ @@ -43,6 +44,7 @@ function buildReindex (opts) { 'wait_for_active_shards', 'wait_for_completion', 'requests_per_second', + 'scroll', 'slices', 'pretty', 'human', diff --git a/api/api/xpack.rollup.delete_job.js b/api/api/rollup.delete_job.js similarity index 92% rename from api/api/xpack.rollup.delete_job.js rename to api/api/rollup.delete_job.js index 6790debfe..d19a7daee 100644 --- a/api/api/xpack.rollup.delete_job.js +++ b/api/api/rollup.delete_job.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupDeleteJob (opts) { +function buildRollupDeleteJob (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.delete_job]() request + * Perform a [rollup.delete_job]() request * * @param {string} id - The ID of the job to delete */ @@ -39,7 +39,7 @@ function buildXpackRollupDeleteJob (opts) { } - return function xpackRollupDeleteJob (params, options, callback) { + return function rollupDeleteJob (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackRollupDeleteJob (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupDeleteJob(params, options, (err, body) => { + rollupDeleteJob(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackRollupDeleteJob (opts) { } } -module.exports = buildXpackRollupDeleteJob +module.exports = buildRollupDeleteJob diff --git a/api/api/xpack.rollup.get_jobs.js b/api/api/rollup.get_jobs.js similarity index 92% rename from api/api/xpack.rollup.get_jobs.js rename to api/api/rollup.get_jobs.js index 9a8ba22e2..b8d9c96d3 100644 --- a/api/api/xpack.rollup.get_jobs.js +++ b/api/api/rollup.get_jobs.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupGetJobs (opts) { +function buildRollupGetJobs (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.get_jobs]() request + * Perform a [rollup.get_jobs]() request * * @param {string} id - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs */ @@ -39,7 +39,7 @@ function buildXpackRollupGetJobs (opts) { } - return function xpackRollupGetJobs (params, options, callback) { + return function rollupGetJobs (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackRollupGetJobs (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupGetJobs(params, options, (err, body) => { + rollupGetJobs(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -126,4 +126,4 @@ function buildXpackRollupGetJobs (opts) { } } -module.exports = buildXpackRollupGetJobs +module.exports = buildRollupGetJobs diff --git a/api/api/xpack.rollup.get_rollup_caps.js b/api/api/rollup.get_rollup_caps.js similarity index 92% rename from api/api/xpack.rollup.get_rollup_caps.js rename to api/api/rollup.get_rollup_caps.js index 9986e0022..a57802471 100644 --- a/api/api/xpack.rollup.get_rollup_caps.js +++ b/api/api/rollup.get_rollup_caps.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupGetRollupCaps (opts) { +function buildRollupGetRollupCaps (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.get_rollup_caps]() request + * Perform a [rollup.get_rollup_caps]() request * * @param {string} id - The ID of the index to check rollup capabilities on, or left blank for all jobs */ @@ -39,7 +39,7 @@ function buildXpackRollupGetRollupCaps (opts) { } - return function xpackRollupGetRollupCaps (params, options, callback) { + return function rollupGetRollupCaps (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackRollupGetRollupCaps (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupGetRollupCaps(params, options, (err, body) => { + rollupGetRollupCaps(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -126,4 +126,4 @@ function buildXpackRollupGetRollupCaps (opts) { } } -module.exports = buildXpackRollupGetRollupCaps +module.exports = buildRollupGetRollupCaps diff --git a/api/api/xpack.rollup.get_rollup_index_caps.js b/api/api/rollup.get_rollup_index_caps.js similarity index 91% rename from api/api/xpack.rollup.get_rollup_index_caps.js rename to api/api/rollup.get_rollup_index_caps.js index 1cc6def83..c67754c53 100644 --- a/api/api/xpack.rollup.get_rollup_index_caps.js +++ b/api/api/rollup.get_rollup_index_caps.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupGetRollupIndexCaps (opts) { +function buildRollupGetRollupIndexCaps (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.get_rollup_index_caps]() request + * Perform a [rollup.get_rollup_index_caps]() request * * @param {string} index - The rollup index or index pattern to obtain rollup capabilities from. */ @@ -39,7 +39,7 @@ function buildXpackRollupGetRollupIndexCaps (opts) { } - return function xpackRollupGetRollupIndexCaps (params, options, callback) { + return function rollupGetRollupIndexCaps (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackRollupGetRollupIndexCaps (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupGetRollupIndexCaps(params, options, (err, body) => { + rollupGetRollupIndexCaps(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackRollupGetRollupIndexCaps (opts) { } } -module.exports = buildXpackRollupGetRollupIndexCaps +module.exports = buildRollupGetRollupIndexCaps diff --git a/api/api/xpack.rollup.put_job.js b/api/api/rollup.put_job.js similarity index 93% rename from api/api/xpack.rollup.put_job.js rename to api/api/rollup.put_job.js index 0cb159d52..81727e1e1 100644 --- a/api/api/xpack.rollup.put_job.js +++ b/api/api/rollup.put_job.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupPutJob (opts) { +function buildRollupPutJob (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.put_job]() request + * Perform a [rollup.put_job]() request * * @param {string} id - The ID of the job to create * @param {object} body - The job configuration @@ -40,7 +40,7 @@ function buildXpackRollupPutJob (opts) { } - return function xpackRollupPutJob (params, options, callback) { + return function rollupPutJob (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -55,7 +55,7 @@ function buildXpackRollupPutJob (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupPutJob(params, options, (err, body) => { + rollupPutJob(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -133,4 +133,4 @@ function buildXpackRollupPutJob (opts) { } } -module.exports = buildXpackRollupPutJob +module.exports = buildRollupPutJob diff --git a/api/api/xpack.rollup.rollup_search.js b/api/api/rollup.rollup_search.js similarity index 91% rename from api/api/xpack.rollup.rollup_search.js rename to api/api/rollup.rollup_search.js index 3388186c0..ea0b6d2ed 100644 --- a/api/api/xpack.rollup.rollup_search.js +++ b/api/api/rollup.rollup_search.js @@ -22,13 +22,13 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupRollupSearch (opts) { +function buildRollupRollupSearch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.rollup_search]() request + * Perform a [rollup.rollup_search]() request * - * @param {string} index - The index or index-pattern (containing rollup or regular data) that should be searched + * @param {list} index - The indices or index-pattern(s) (containing rollup or regular data) that should be searched * @param {string} type - The doc type inside the index * @param {boolean} typed_keys - Specify whether aggregation and suggester names should be prefixed by their respective types in the response * @param {boolean} rest_total_hits_as_int - Indicates whether hits.total should be rendered as an integer or an object in the rest search response @@ -45,7 +45,7 @@ function buildXpackRollupRollupSearch (opts) { restTotalHitsAsInt: 'rest_total_hits_as_int' } - return function xpackRollupRollupSearch (params, options, callback) { + return function rollupRollupSearch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -60,7 +60,7 @@ function buildXpackRollupRollupSearch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupRollupSearch(params, options, (err, body) => { + rollupRollupSearch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -148,4 +148,4 @@ function buildXpackRollupRollupSearch (opts) { } } -module.exports = buildXpackRollupRollupSearch +module.exports = buildRollupRollupSearch diff --git a/api/api/xpack.rollup.start_job.js b/api/api/rollup.start_job.js similarity index 92% rename from api/api/xpack.rollup.start_job.js rename to api/api/rollup.start_job.js index 8d32df4be..eb6d945c8 100644 --- a/api/api/xpack.rollup.start_job.js +++ b/api/api/rollup.start_job.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupStartJob (opts) { +function buildRollupStartJob (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.start_job]() request + * Perform a [rollup.start_job]() request * * @param {string} id - The ID of the job to start */ @@ -39,7 +39,7 @@ function buildXpackRollupStartJob (opts) { } - return function xpackRollupStartJob (params, options, callback) { + return function rollupStartJob (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackRollupStartJob (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupStartJob(params, options, (err, body) => { + rollupStartJob(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackRollupStartJob (opts) { } } -module.exports = buildXpackRollupStartJob +module.exports = buildRollupStartJob diff --git a/api/api/xpack.rollup.stop_job.js b/api/api/rollup.stop_job.js similarity index 93% rename from api/api/xpack.rollup.stop_job.js rename to api/api/rollup.stop_job.js index a9e8cd234..99413dc59 100644 --- a/api/api/xpack.rollup.stop_job.js +++ b/api/api/rollup.stop_job.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackRollupStopJob (opts) { +function buildRollupStopJob (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.rollup.stop_job]() request + * Perform a [rollup.stop_job]() request * * @param {string} id - The ID of the job to stop * @param {boolean} wait_for_completion - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. @@ -43,7 +43,7 @@ function buildXpackRollupStopJob (opts) { } - return function xpackRollupStopJob (params, options, callback) { + return function rollupStopJob (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -58,7 +58,7 @@ function buildXpackRollupStopJob (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackRollupStopJob(params, options, (err, body) => { + rollupStopJob(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackRollupStopJob (opts) { } } -module.exports = buildXpackRollupStopJob +module.exports = buildRollupStopJob diff --git a/api/api/security.disable_user.js b/api/api/security.disable_user.js index 3171ae0ed..fdc3817f1 100644 --- a/api/api/security.disable_user.js +++ b/api/api/security.disable_user.js @@ -62,6 +62,10 @@ function buildSecurityDisableUser (opts) { } // check required parameters + if (params['username'] == null) { + const err = new ConfigurationError('Missing required parameter: username') + return handleError(err, callback) + } if (params.body != null) { const err = new ConfigurationError('This API does not require a body') return handleError(err, callback) diff --git a/api/api/security.enable_user.js b/api/api/security.enable_user.js index e6fb6daab..4ce4daaac 100644 --- a/api/api/security.enable_user.js +++ b/api/api/security.enable_user.js @@ -62,6 +62,10 @@ function buildSecurityEnableUser (opts) { } // check required parameters + if (params['username'] == null) { + const err = new ConfigurationError('Missing required parameter: username') + return handleError(err, callback) + } if (params.body != null) { const err = new ConfigurationError('This API does not require a body') return handleError(err, callback) diff --git a/api/api/security.get_privileges.js b/api/api/security.get_privileges.js index 2d5f8e809..d12d76fbe 100644 --- a/api/api/security.get_privileges.js +++ b/api/api/security.get_privileges.js @@ -94,9 +94,9 @@ function buildSecurityGetPrivileges (opts) { var path = '' - if (application && name) { + if ((application) != null && (name) != null) { path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name) - } else if (application) { + } else if ((application) != null) { path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) } else { path = '/' + '_security' + '/' + 'privilege' diff --git a/api/api/xpack.sql.clear_cursor.js b/api/api/sql.clear_cursor.js similarity index 92% rename from api/api/xpack.sql.clear_cursor.js rename to api/api/sql.clear_cursor.js index ac0173726..7355413c8 100644 --- a/api/api/xpack.sql.clear_cursor.js +++ b/api/api/sql.clear_cursor.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackSqlClearCursor (opts) { +function buildSqlClearCursor (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.sql.clear_cursor](Clear SQL cursor) request + * Perform a [sql.clear_cursor](Clear SQL cursor) request * * @param {object} body - Specify the cursor value in the `cursor` element to clean the cursor. */ @@ -39,7 +39,7 @@ function buildXpackSqlClearCursor (opts) { } - return function xpackSqlClearCursor (params, options, callback) { + return function sqlClearCursor (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackSqlClearCursor (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackSqlClearCursor(params, options, (err, body) => { + sqlClearCursor(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackSqlClearCursor (opts) { } } -module.exports = buildXpackSqlClearCursor +module.exports = buildSqlClearCursor diff --git a/api/api/xpack.sql.query.js b/api/api/sql.query.js similarity index 93% rename from api/api/xpack.sql.query.js rename to api/api/sql.query.js index ef833913a..26b0bd993 100644 --- a/api/api/xpack.sql.query.js +++ b/api/api/sql.query.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackSqlQuery (opts) { +function buildSqlQuery (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.sql.query](Execute SQL) request + * Perform a [sql.query](Execute SQL) request * * @param {string} format - a short version of the Accept header, e.g. json, yaml * @param {object} body - Use the `query` element to start a query. Use the `cursor` element to continue a query. @@ -40,7 +40,7 @@ function buildXpackSqlQuery (opts) { } - return function xpackSqlQuery (params, options, callback) { + return function sqlQuery (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -55,7 +55,7 @@ function buildXpackSqlQuery (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackSqlQuery(params, options, (err, body) => { + sqlQuery(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -129,4 +129,4 @@ function buildXpackSqlQuery (opts) { } } -module.exports = buildXpackSqlQuery +module.exports = buildSqlQuery diff --git a/api/api/xpack.sql.translate.js b/api/api/sql.translate.js similarity index 92% rename from api/api/xpack.sql.translate.js rename to api/api/sql.translate.js index 03b4f787d..613588c40 100644 --- a/api/api/xpack.sql.translate.js +++ b/api/api/sql.translate.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackSqlTranslate (opts) { +function buildSqlTranslate (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.sql.translate](Translate SQL into Elasticsearch queries) request + * Perform a [sql.translate](Translate SQL into Elasticsearch queries) request * * @param {object} body - Specify the query in the `query` element. */ @@ -39,7 +39,7 @@ function buildXpackSqlTranslate (opts) { } - return function xpackSqlTranslate (params, options, callback) { + return function sqlTranslate (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackSqlTranslate (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackSqlTranslate(params, options, (err, body) => { + sqlTranslate(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackSqlTranslate (opts) { } } -module.exports = buildXpackSqlTranslate +module.exports = buildSqlTranslate diff --git a/api/api/xpack.watcher.ack_watch.js b/api/api/watcher.ack_watch.js similarity index 92% rename from api/api/xpack.watcher.ack_watch.js rename to api/api/watcher.ack_watch.js index ac328d3ac..d6c96ea70 100644 --- a/api/api/xpack.watcher.ack_watch.js +++ b/api/api/watcher.ack_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherAckWatch (opts) { +function buildWatcherAckWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.ack_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html) request + * Perform a [watcher.ack_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html) request * * @param {string} watch_id - Watch ID * @param {list} action_id - A comma-separated list of the action ids to be acked @@ -40,7 +40,7 @@ function buildXpackWatcherAckWatch (opts) { } - return function xpackWatcherAckWatch (params, options, callback) { + return function watcherAckWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -55,7 +55,7 @@ function buildXpackWatcherAckWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherAckWatch(params, options, (err, body) => { + watcherAckWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -143,4 +143,4 @@ function buildXpackWatcherAckWatch (opts) { } } -module.exports = buildXpackWatcherAckWatch +module.exports = buildWatcherAckWatch diff --git a/api/api/xpack.watcher.activate_watch.js b/api/api/watcher.activate_watch.js similarity index 90% rename from api/api/xpack.watcher.activate_watch.js rename to api/api/watcher.activate_watch.js index 5bbf1a3ca..ebc06ed75 100644 --- a/api/api/xpack.watcher.activate_watch.js +++ b/api/api/watcher.activate_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherActivateWatch (opts) { +function buildWatcherActivateWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.activate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html) request + * Perform a [watcher.activate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html) request * * @param {string} watch_id - Watch ID */ @@ -39,7 +39,7 @@ function buildXpackWatcherActivateWatch (opts) { } - return function xpackWatcherActivateWatch (params, options, callback) { + return function watcherActivateWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackWatcherActivateWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherActivateWatch(params, options, (err, body) => { + watcherActivateWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackWatcherActivateWatch (opts) { } } -module.exports = buildXpackWatcherActivateWatch +module.exports = buildWatcherActivateWatch diff --git a/api/api/xpack.watcher.deactivate_watch.js b/api/api/watcher.deactivate_watch.js similarity index 90% rename from api/api/xpack.watcher.deactivate_watch.js rename to api/api/watcher.deactivate_watch.js index 6261a2842..e2290027e 100644 --- a/api/api/xpack.watcher.deactivate_watch.js +++ b/api/api/watcher.deactivate_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherDeactivateWatch (opts) { +function buildWatcherDeactivateWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.deactivate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html) request + * Perform a [watcher.deactivate_watch](https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html) request * * @param {string} watch_id - Watch ID */ @@ -39,7 +39,7 @@ function buildXpackWatcherDeactivateWatch (opts) { } - return function xpackWatcherDeactivateWatch (params, options, callback) { + return function watcherDeactivateWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackWatcherDeactivateWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherDeactivateWatch(params, options, (err, body) => { + watcherDeactivateWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackWatcherDeactivateWatch (opts) { } } -module.exports = buildXpackWatcherDeactivateWatch +module.exports = buildWatcherDeactivateWatch diff --git a/api/api/xpack.watcher.delete_watch.js b/api/api/watcher.delete_watch.js similarity index 90% rename from api/api/xpack.watcher.delete_watch.js rename to api/api/watcher.delete_watch.js index 8feda5b3e..090717cf4 100644 --- a/api/api/xpack.watcher.delete_watch.js +++ b/api/api/watcher.delete_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherDeleteWatch (opts) { +function buildWatcherDeleteWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.delete_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html) request + * Perform a [watcher.delete_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html) request * * @param {string} id - Watch ID */ @@ -39,7 +39,7 @@ function buildXpackWatcherDeleteWatch (opts) { } - return function xpackWatcherDeleteWatch (params, options, callback) { + return function watcherDeleteWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackWatcherDeleteWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherDeleteWatch(params, options, (err, body) => { + watcherDeleteWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackWatcherDeleteWatch (opts) { } } -module.exports = buildXpackWatcherDeleteWatch +module.exports = buildWatcherDeleteWatch diff --git a/api/api/xpack.watcher.execute_watch.js b/api/api/watcher.execute_watch.js similarity index 90% rename from api/api/xpack.watcher.execute_watch.js rename to api/api/watcher.execute_watch.js index 564897c5e..96d2f5a02 100644 --- a/api/api/xpack.watcher.execute_watch.js +++ b/api/api/watcher.execute_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherExecuteWatch (opts) { +function buildWatcherExecuteWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.execute_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html) request + * Perform a [watcher.execute_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html) request * * @param {string} id - Watch ID * @param {boolean} debug - indicates whether the watch should execute in debug mode @@ -41,7 +41,7 @@ function buildXpackWatcherExecuteWatch (opts) { } - return function xpackWatcherExecuteWatch (params, options, callback) { + return function watcherExecuteWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -56,7 +56,7 @@ function buildXpackWatcherExecuteWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherExecuteWatch(params, options, (err, body) => { + watcherExecuteWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -128,4 +128,4 @@ function buildXpackWatcherExecuteWatch (opts) { } } -module.exports = buildXpackWatcherExecuteWatch +module.exports = buildWatcherExecuteWatch diff --git a/api/api/xpack.watcher.get_watch.js b/api/api/watcher.get_watch.js similarity index 90% rename from api/api/xpack.watcher.get_watch.js rename to api/api/watcher.get_watch.js index 1d3f228c3..1028d7db1 100644 --- a/api/api/xpack.watcher.get_watch.js +++ b/api/api/watcher.get_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherGetWatch (opts) { +function buildWatcherGetWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.get_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html) request + * Perform a [watcher.get_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html) request * * @param {string} id - Watch ID */ @@ -39,7 +39,7 @@ function buildXpackWatcherGetWatch (opts) { } - return function xpackWatcherGetWatch (params, options, callback) { + return function watcherGetWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -54,7 +54,7 @@ function buildXpackWatcherGetWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherGetWatch(params, options, (err, body) => { + watcherGetWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -132,4 +132,4 @@ function buildXpackWatcherGetWatch (opts) { } } -module.exports = buildXpackWatcherGetWatch +module.exports = buildWatcherGetWatch diff --git a/api/api/xpack.watcher.put_watch.js b/api/api/watcher.put_watch.js similarity index 91% rename from api/api/xpack.watcher.put_watch.js rename to api/api/watcher.put_watch.js index 7d89cf6db..b23620a8d 100644 --- a/api/api/xpack.watcher.put_watch.js +++ b/api/api/watcher.put_watch.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherPutWatch (opts) { +function buildWatcherPutWatch (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.put_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) request + * Perform a [watcher.put_watch](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html) request * * @param {string} id - Watch ID * @param {boolean} active - Specify whether the watch is in/active by default @@ -48,7 +48,7 @@ function buildXpackWatcherPutWatch (opts) { ifPrimaryTerm: 'if_primary_term' } - return function xpackWatcherPutWatch (params, options, callback) { + return function watcherPutWatch (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -63,7 +63,7 @@ function buildXpackWatcherPutWatch (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherPutWatch(params, options, (err, body) => { + watcherPutWatch(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -137,4 +137,4 @@ function buildXpackWatcherPutWatch (opts) { } } -module.exports = buildXpackWatcherPutWatch +module.exports = buildWatcherPutWatch diff --git a/api/api/xpack.watcher.start.js b/api/api/watcher.start.js similarity index 90% rename from api/api/xpack.watcher.start.js rename to api/api/watcher.start.js index 980cb5e86..cf6e5df84 100644 --- a/api/api/xpack.watcher.start.js +++ b/api/api/watcher.start.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherStart (opts) { +function buildWatcherStart (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.start](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html) request + * Perform a [watcher.start](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html) request * */ @@ -38,7 +38,7 @@ function buildXpackWatcherStart (opts) { } - return function xpackWatcherStart (params, options, callback) { + return function watcherStart (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -53,7 +53,7 @@ function buildXpackWatcherStart (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherStart(params, options, (err, body) => { + watcherStart(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -127,4 +127,4 @@ function buildXpackWatcherStart (opts) { } } -module.exports = buildXpackWatcherStart +module.exports = buildWatcherStart diff --git a/api/api/xpack.watcher.stats.js b/api/api/watcher.stats.js similarity index 88% rename from api/api/xpack.watcher.stats.js rename to api/api/watcher.stats.js index 43e6f7187..c89cc4cbb 100644 --- a/api/api/xpack.watcher.stats.js +++ b/api/api/watcher.stats.js @@ -22,14 +22,14 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherStats (opts) { +function buildWatcherStats (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html) request + * Perform a [watcher.stats](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html) request * - * @param {enum} metric - Controls what additional stat metrics should be include in the response - * @param {enum} metric - Controls what additional stat metrics should be include in the response + * @param {list} metric - Controls what additional stat metrics should be include in the response + * @param {list} metric - Controls what additional stat metrics should be include in the response * @param {boolean} emit_stacktraces - Emits stack traces of currently running watches */ @@ -42,7 +42,7 @@ function buildXpackWatcherStats (opts) { emitStacktraces: 'emit_stacktraces' } - return function xpackWatcherStats (params, options, callback) { + return function watcherStats (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -57,7 +57,7 @@ function buildXpackWatcherStats (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherStats(params, options, (err, body) => { + watcherStats(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -135,4 +135,4 @@ function buildXpackWatcherStats (opts) { } } -module.exports = buildXpackWatcherStats +module.exports = buildWatcherStats diff --git a/api/api/xpack.watcher.stop.js b/api/api/watcher.stop.js similarity index 90% rename from api/api/xpack.watcher.stop.js rename to api/api/watcher.stop.js index a6a4e1fb3..a69519b53 100644 --- a/api/api/xpack.watcher.stop.js +++ b/api/api/watcher.stop.js @@ -22,11 +22,11 @@ /* eslint camelcase: 0 */ /* eslint no-unused-vars: 0 */ -function buildXpackWatcherStop (opts) { +function buildWatcherStop (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError } = opts /** - * Perform a [xpack.watcher.stop](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html) request + * Perform a [watcher.stop](http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html) request * */ @@ -38,7 +38,7 @@ function buildXpackWatcherStop (opts) { } - return function xpackWatcherStop (params, options, callback) { + return function watcherStop (params, options, callback) { options = options || {} if (typeof options === 'function') { callback = options @@ -53,7 +53,7 @@ function buildXpackWatcherStop (opts) { // promises support if (callback == null) { return new Promise((resolve, reject) => { - xpackWatcherStop(params, options, (err, body) => { + watcherStop(params, options, (err, body) => { err ? reject(err) : resolve(body) }) }) @@ -127,4 +127,4 @@ function buildXpackWatcherStop (opts) { } } -module.exports = buildXpackWatcherStop +module.exports = buildWatcherStop diff --git a/api/api/xpack.migration.get_assistance.js b/api/api/xpack.migration.get_assistance.js deleted file mode 100644 index fd7972430..000000000 --- a/api/api/xpack.migration.get_assistance.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -'use strict' - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -function buildXpackMigrationGetAssistance (opts) { - // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError, handleError } = opts - /** - * Perform a [xpack.migration.get_assistance](https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html) request - * - * @param {list} index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} allow_no_indices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {enum} expand_wildcards - Whether to expand wildcard expression to concrete indices that are open, closed or both. - * @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) - */ - - const acceptedQuerystring = [ - 'allow_no_indices', - 'expand_wildcards', - 'ignore_unavailable' - ] - - const snakeCase = { - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - ignoreUnavailable: 'ignore_unavailable' - } - - return function xpackMigrationGetAssistance (params, options, callback) { - options = options || {} - if (typeof options === 'function') { - callback = options - options = {} - } - if (typeof params === 'function' || params == null) { - callback = params - params = {} - options = {} - } - - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - xpackMigrationGetAssistance(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - - // validate headers object - if (options.headers != null && typeof options.headers !== 'object') { - const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) - return handleError(err, callback) - } - - var warnings = null - var { method, body, index } = params - var querystring = semicopy(params, ['method', 'body', 'index']) - - if (method == null) { - method = 'GET' - } - - var ignore = options.ignore || null - if (typeof ignore === 'number') { - ignore = [ignore] - } - - var path = '' - - if ((index) != null) { - path = '/' + '_migration' + '/' + 'assistance' + '/' + encodeURIComponent(index) - } else { - path = '/' + '_migration' + '/' + 'assistance' - } - - // build request object - const request = { - method, - path, - body: null, - querystring - } - - const requestOptions = { - ignore, - requestTimeout: options.requestTimeout || null, - maxRetries: options.maxRetries || null, - asStream: options.asStream || false, - headers: options.headers || null, - querystring: options.querystring || null, - compression: options.compression || false, - warnings - } - - return makeRequest(request, requestOptions, callback) - - function semicopy (obj, exclude) { - var target = {} - var keys = Object.keys(obj) - for (var i = 0, len = keys.length; i < len; i++) { - var key = keys[i] - if (exclude.indexOf(key) === -1) { - target[snakeCase[key] || key] = obj[key] - if (acceptedQuerystring.indexOf(snakeCase[key] || key) === -1) { - warnings = warnings || [] - warnings.push('Client - Unknown parameter: "' + key + '", sending it as query parameter') - } - } - } - return target - } - } -} - -module.exports = buildXpackMigrationGetAssistance diff --git a/api/index.js b/api/index.js index 57622d189..5701066de 100644 --- a/api/index.js +++ b/api/index.js @@ -63,6 +63,8 @@ function ESAPI (opts) { followInfo: lazyLoad('ccr.follow_info', opts), follow_stats: lazyLoad('ccr.follow_stats', opts), followStats: lazyLoad('ccr.follow_stats', opts), + forget_follower: lazyLoad('ccr.forget_follower', opts), + forgetFollower: lazyLoad('ccr.forget_follower', opts), get_auto_follow_pattern: lazyLoad('ccr.get_auto_follow_pattern', opts), getAutoFollowPattern: lazyLoad('ccr.get_auto_follow_pattern', opts), pause_follow: lazyLoad('ccr.pause_follow', opts), @@ -112,6 +114,9 @@ function ESAPI (opts) { getScript: lazyLoad('get_script', opts), get_source: lazyLoad('get_source', opts), getSource: lazyLoad('get_source', opts), + graph: { + explore: lazyLoad('graph.explore', opts) + }, ilm: { delete_lifecycle: lazyLoad('ilm.delete_lifecycle', opts), deleteLifecycle: lazyLoad('ilm.delete_lifecycle', opts), @@ -205,7 +210,23 @@ function ESAPI (opts) { putPipeline: lazyLoad('ingest.put_pipeline', opts), simulate: lazyLoad('ingest.simulate', opts) }, + license: { + delete: lazyLoad('license.delete', opts), + get: lazyLoad('license.get', opts), + get_basic_status: lazyLoad('license.get_basic_status', opts), + getBasicStatus: lazyLoad('license.get_basic_status', opts), + get_trial_status: lazyLoad('license.get_trial_status', opts), + getTrialStatus: lazyLoad('license.get_trial_status', opts), + post: lazyLoad('license.post', opts), + post_start_basic: lazyLoad('license.post_start_basic', opts), + postStartBasic: lazyLoad('license.post_start_basic', opts), + post_start_trial: lazyLoad('license.post_start_trial', opts), + postStartTrial: lazyLoad('license.post_start_trial', opts) + }, mget: lazyLoad('mget', opts), + migration: { + deprecations: lazyLoad('migration.deprecations', opts) + }, ml: { close_job: lazyLoad('ml.close_job', opts), closeJob: lazyLoad('ml.close_job', opts), @@ -323,6 +344,24 @@ function ESAPI (opts) { reindexRethrottle: lazyLoad('reindex_rethrottle', opts), render_search_template: lazyLoad('render_search_template', opts), renderSearchTemplate: lazyLoad('render_search_template', opts), + rollup: { + delete_job: lazyLoad('rollup.delete_job', opts), + deleteJob: lazyLoad('rollup.delete_job', opts), + get_jobs: lazyLoad('rollup.get_jobs', opts), + getJobs: lazyLoad('rollup.get_jobs', opts), + get_rollup_caps: lazyLoad('rollup.get_rollup_caps', opts), + getRollupCaps: lazyLoad('rollup.get_rollup_caps', opts), + get_rollup_index_caps: lazyLoad('rollup.get_rollup_index_caps', opts), + getRollupIndexCaps: lazyLoad('rollup.get_rollup_index_caps', opts), + put_job: lazyLoad('rollup.put_job', opts), + putJob: lazyLoad('rollup.put_job', opts), + rollup_search: lazyLoad('rollup.rollup_search', opts), + rollupSearch: lazyLoad('rollup.rollup_search', opts), + start_job: lazyLoad('rollup.start_job', opts), + startJob: lazyLoad('rollup.start_job', opts), + stop_job: lazyLoad('rollup.stop_job', opts), + stopJob: lazyLoad('rollup.stop_job', opts) + }, scripts_painless_execute: lazyLoad('scripts_painless_execute', opts), scriptsPainlessExecute: lazyLoad('scripts_painless_execute', opts), scroll: lazyLoad('scroll', opts), @@ -397,6 +436,12 @@ function ESAPI (opts) { verify_repository: lazyLoad('snapshot.verify_repository', opts), verifyRepository: lazyLoad('snapshot.verify_repository', opts) }, + sql: { + clear_cursor: lazyLoad('sql.clear_cursor', opts), + clearCursor: lazyLoad('sql.clear_cursor', opts), + query: lazyLoad('sql.query', opts), + translate: lazyLoad('sql.translate', opts) + }, ssl: { certificates: lazyLoad('ssl.certificates', opts) }, @@ -411,74 +456,28 @@ function ESAPI (opts) { updateByQuery: lazyLoad('update_by_query', opts), update_by_query_rethrottle: lazyLoad('update_by_query_rethrottle', opts), updateByQueryRethrottle: lazyLoad('update_by_query_rethrottle', opts), + watcher: { + ack_watch: lazyLoad('watcher.ack_watch', opts), + ackWatch: lazyLoad('watcher.ack_watch', opts), + activate_watch: lazyLoad('watcher.activate_watch', opts), + activateWatch: lazyLoad('watcher.activate_watch', opts), + deactivate_watch: lazyLoad('watcher.deactivate_watch', opts), + deactivateWatch: lazyLoad('watcher.deactivate_watch', opts), + delete_watch: lazyLoad('watcher.delete_watch', opts), + deleteWatch: lazyLoad('watcher.delete_watch', opts), + execute_watch: lazyLoad('watcher.execute_watch', opts), + executeWatch: lazyLoad('watcher.execute_watch', opts), + get_watch: lazyLoad('watcher.get_watch', opts), + getWatch: lazyLoad('watcher.get_watch', opts), + put_watch: lazyLoad('watcher.put_watch', opts), + putWatch: lazyLoad('watcher.put_watch', opts), + start: lazyLoad('watcher.start', opts), + stats: lazyLoad('watcher.stats', opts), + stop: lazyLoad('watcher.stop', opts) + }, xpack: { - graph: { - explore: lazyLoad('xpack.graph.explore', opts) - }, info: lazyLoad('xpack.info', opts), - license: { - delete: lazyLoad('xpack.license.delete', opts), - get: lazyLoad('xpack.license.get', opts), - get_basic_status: lazyLoad('xpack.license.get_basic_status', opts), - getBasicStatus: lazyLoad('xpack.license.get_basic_status', opts), - get_trial_status: lazyLoad('xpack.license.get_trial_status', opts), - getTrialStatus: lazyLoad('xpack.license.get_trial_status', opts), - post: lazyLoad('xpack.license.post', opts), - post_start_basic: lazyLoad('xpack.license.post_start_basic', opts), - postStartBasic: lazyLoad('xpack.license.post_start_basic', opts), - post_start_trial: lazyLoad('xpack.license.post_start_trial', opts), - postStartTrial: lazyLoad('xpack.license.post_start_trial', opts) - }, - migration: { - deprecations: lazyLoad('xpack.migration.deprecations', opts), - get_assistance: lazyLoad('xpack.migration.get_assistance', opts), - getAssistance: lazyLoad('xpack.migration.get_assistance', opts), - upgrade: lazyLoad('xpack.migration.upgrade', opts) - }, - rollup: { - delete_job: lazyLoad('xpack.rollup.delete_job', opts), - deleteJob: lazyLoad('xpack.rollup.delete_job', opts), - get_jobs: lazyLoad('xpack.rollup.get_jobs', opts), - getJobs: lazyLoad('xpack.rollup.get_jobs', opts), - get_rollup_caps: lazyLoad('xpack.rollup.get_rollup_caps', opts), - getRollupCaps: lazyLoad('xpack.rollup.get_rollup_caps', opts), - get_rollup_index_caps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts), - getRollupIndexCaps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts), - put_job: lazyLoad('xpack.rollup.put_job', opts), - putJob: lazyLoad('xpack.rollup.put_job', opts), - rollup_search: lazyLoad('xpack.rollup.rollup_search', opts), - rollupSearch: lazyLoad('xpack.rollup.rollup_search', opts), - start_job: lazyLoad('xpack.rollup.start_job', opts), - startJob: lazyLoad('xpack.rollup.start_job', opts), - stop_job: lazyLoad('xpack.rollup.stop_job', opts), - stopJob: lazyLoad('xpack.rollup.stop_job', opts) - }, - sql: { - clear_cursor: lazyLoad('xpack.sql.clear_cursor', opts), - clearCursor: lazyLoad('xpack.sql.clear_cursor', opts), - query: lazyLoad('xpack.sql.query', opts), - translate: lazyLoad('xpack.sql.translate', opts) - }, - usage: lazyLoad('xpack.usage', opts), - watcher: { - ack_watch: lazyLoad('xpack.watcher.ack_watch', opts), - ackWatch: lazyLoad('xpack.watcher.ack_watch', opts), - activate_watch: lazyLoad('xpack.watcher.activate_watch', opts), - activateWatch: lazyLoad('xpack.watcher.activate_watch', opts), - deactivate_watch: lazyLoad('xpack.watcher.deactivate_watch', opts), - deactivateWatch: lazyLoad('xpack.watcher.deactivate_watch', opts), - delete_watch: lazyLoad('xpack.watcher.delete_watch', opts), - deleteWatch: lazyLoad('xpack.watcher.delete_watch', opts), - execute_watch: lazyLoad('xpack.watcher.execute_watch', opts), - executeWatch: lazyLoad('xpack.watcher.execute_watch', opts), - get_watch: lazyLoad('xpack.watcher.get_watch', opts), - getWatch: lazyLoad('xpack.watcher.get_watch', opts), - put_watch: lazyLoad('xpack.watcher.put_watch', opts), - putWatch: lazyLoad('xpack.watcher.put_watch', opts), - start: lazyLoad('xpack.watcher.start', opts), - stats: lazyLoad('xpack.watcher.stats', opts), - stop: lazyLoad('xpack.watcher.stop', opts) - } + usage: lazyLoad('xpack.usage', opts) } } diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 755fddf88..d5969d269 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1051,6 +1051,7 @@ export interface Reindex extends Generic { wait_for_active_shards?: string; wait_for_completion?: boolean; requests_per_second?: number; + scroll?: string; slices?: number; body: any; } @@ -1337,7 +1338,12 @@ export interface CcrFollowInfo extends Generic { } export interface CcrFollowStats extends Generic { - index?: string | string[]; + index: string | string[]; +} + +export interface CcrForgetFollower extends Generic { + index: string; + body: any; } export interface CcrGetAutoFollowPattern extends Generic { @@ -1365,13 +1371,20 @@ export interface CcrUnfollow extends Generic { index: string; } +export interface GraphExplore extends Generic { + index?: string | string[]; + type?: string | string[]; + routing?: string; + timeout?: string; + body?: any; +} + export interface IlmDeleteLifecycle extends Generic { policy?: string; } export interface IlmExplainLifecycle extends Generic { index?: string; - human?: boolean; } export interface IlmGetLifecycle extends Generic { @@ -1425,6 +1438,37 @@ export interface IndicesUnfreeze extends Generic { wait_for_active_shards?: string; } +export interface LicenseDelete extends Generic { +} + +export interface LicenseGet extends Generic { + local?: boolean; +} + +export interface LicenseGetBasicStatus extends Generic { +} + +export interface LicenseGetTrialStatus extends Generic { +} + +export interface LicensePost extends Generic { + acknowledge?: boolean; + body?: any; +} + +export interface LicensePostStartBasic extends Generic { + acknowledge?: boolean; +} + +export interface LicensePostStartTrial extends Generic { + type?: string; + acknowledge?: boolean; +} + +export interface MigrationDeprecations extends Generic { + index?: string; +} + export interface MlCloseJob extends Generic { job_id: string; allow_no_jobs?: boolean; @@ -1538,6 +1582,7 @@ export interface MlGetCalendars extends Generic { calendar_id?: string; from?: number; size?: number; + body?: any; } export interface MlGetCategories extends Generic { @@ -1738,6 +1783,45 @@ export interface MonitoringBulk extends Generic { body: any; } +export interface RollupDeleteJob extends Generic { + id: string; +} + +export interface RollupGetJobs extends Generic { + id?: string; +} + +export interface RollupGetRollupCaps extends Generic { + id?: string; +} + +export interface RollupGetRollupIndexCaps extends Generic { + index: string; +} + +export interface RollupPutJob extends Generic { + id: string; + body: any; +} + +export interface RollupRollupSearch extends Generic { + index: string | string[]; + type?: string; + typed_keys?: boolean; + rest_total_hits_as_int?: boolean; + body: any; +} + +export interface RollupStartJob extends Generic { + id: string; +} + +export interface RollupStopJob extends Generic { + id: string; + wait_for_completion?: boolean; + timeout?: string; +} + export interface SecurityAuthenticate extends Generic { } @@ -1783,12 +1867,12 @@ export interface SecurityDeleteUser extends Generic { } export interface SecurityDisableUser extends Generic { - username?: string; + username: string; refresh?: 'true' | 'false' | 'wait_for'; } export interface SecurityEnableUser extends Generic { - username?: string; + username: string; refresh?: 'true' | 'false' | 'wait_for'; } @@ -1859,148 +1943,50 @@ export interface SecurityPutUser extends Generic { body: any; } -export interface SslCertificates extends Generic { -} - -export interface XpackGraphExplore extends Generic { - index?: string | string[]; - type?: string | string[]; - routing?: string; - timeout?: string; - body?: any; -} - -export interface XpackInfo extends Generic { - categories?: string | string[]; -} - -export interface XpackLicenseDelete extends Generic { -} - -export interface XpackLicenseGet extends Generic { - local?: boolean; -} - -export interface XpackLicenseGetBasicStatus extends Generic { -} - -export interface XpackLicenseGetTrialStatus extends Generic { -} - -export interface XpackLicensePost extends Generic { - acknowledge?: boolean; - body?: any; -} - -export interface XpackLicensePostStartBasic extends Generic { - acknowledge?: boolean; -} - -export interface XpackLicensePostStartTrial extends Generic { - type?: string; - acknowledge?: boolean; -} - -export interface XpackMigrationDeprecations extends Generic { - index?: string; -} - -export interface XpackMigrationGetAssistance extends Generic { - index?: string | string[]; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'none' | 'all'; - ignore_unavailable?: boolean; -} - -export interface XpackMigrationUpgrade extends Generic { - index: string; - wait_for_completion?: boolean; -} - -export interface XpackRollupDeleteJob extends Generic { - id: string; -} - -export interface XpackRollupGetJobs extends Generic { - id?: string; -} - -export interface XpackRollupGetRollupCaps extends Generic { - id?: string; -} - -export interface XpackRollupGetRollupIndexCaps extends Generic { - index: string; -} - -export interface XpackRollupPutJob extends Generic { - id: string; - body: any; -} - -export interface XpackRollupRollupSearch extends Generic { - index: string; - type?: string; - typed_keys?: boolean; - rest_total_hits_as_int?: boolean; +export interface SqlClearCursor extends Generic { body: any; } -export interface XpackRollupStartJob extends Generic { - id: string; -} - -export interface XpackRollupStopJob extends Generic { - id: string; - wait_for_completion?: boolean; - timeout?: string; -} - -export interface XpackSqlClearCursor extends Generic { - body: any; -} - -export interface XpackSqlQuery extends Generic { +export interface SqlQuery extends Generic { format?: string; body: any; } -export interface XpackSqlTranslate extends Generic { +export interface SqlTranslate extends Generic { body: any; } -export interface XpackUsage extends Generic { - master_timeout?: string; +export interface SslCertificates extends Generic { } -export interface XpackWatcherAckWatch extends Generic { +export interface WatcherAckWatch extends Generic { watch_id: string; action_id?: string | string[]; } -export interface XpackWatcherActivateWatch extends Generic { +export interface WatcherActivateWatch extends Generic { watch_id: string; } -export interface XpackWatcherDeactivateWatch extends Generic { +export interface WatcherDeactivateWatch extends Generic { watch_id: string; } -export interface XpackWatcherDeleteWatch extends Generic { +export interface WatcherDeleteWatch extends Generic { id: string; } -export interface XpackWatcherExecuteWatch extends Generic { +export interface WatcherExecuteWatch extends Generic { id?: string; debug?: boolean; body?: any; } -export interface XpackWatcherGetWatch extends Generic { +export interface WatcherGetWatch extends Generic { id: string; } -export interface XpackWatcherPutWatch extends Generic { +export interface WatcherPutWatch extends Generic { id: string; active?: boolean; version?: number; @@ -2009,13 +1995,21 @@ export interface XpackWatcherPutWatch extends Generic { body?: any; } -export interface XpackWatcherStart extends Generic { +export interface WatcherStart extends Generic { } -export interface XpackWatcherStats extends Generic { - metric?: '_all' | 'queued_watches' | 'current_watches' | 'pending_watches'; +export interface WatcherStats extends Generic { + metric?: string | string[]; emit_stacktraces?: boolean; } -export interface XpackWatcherStop extends Generic { +export interface WatcherStop extends Generic { +} + +export interface XpackInfo extends Generic { + categories?: string | string[]; +} + +export interface XpackUsage extends Generic { + master_timeout?: string; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 82257cb39..9ba91aca0 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -3264,6 +3264,10 @@ _Default:_ `true` |`requests_per_second` or `requestsPerSecond` |`number` - The throttle to set on this request in sub-requests per second. -1 means no throttle. +|`scroll` +|`string` - Control how long to keep the search context alive + +_Default:_ `5m` + |`slices` |`number` - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + _Default:_ `1` @@ -4181,6 +4185,22 @@ https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-s |=== +=== ccr.forgetFollower +[source,js] +---- +client.ccr.forgetFollower([params] [, options] [, callback]) +---- +http://www.elastic.co/guide/en/elasticsearch/reference/current +[cols=2*] +|=== +|`index` +|`string` - the name of the leader index for which specified follower retention leases should be removed + +|`body` +|`object` - the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index + +|=== + === ccr.getAutoFollowPattern [source,js] ---- @@ -4260,6 +4280,31 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current |=== +=== graph.explore +[source,js] +---- +client.graph.explore([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html +[cols=2*] +|=== +|`index` +|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + +|`type` +|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types + +|`routing` +|`string` - Specific routing value + +|`timeout` +|`string` - Explicit operation timeout + +|`body` +|`object` - Graph Query DSL + +|=== + === ilm.deleteLifecycle [source,js] ---- @@ -4284,10 +4329,6 @@ https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-life |`index` |`string` - The name of the index to explain -|`human` -|`boolean` - Return data such as dates in a human readable format + -_Default:_ `false` - |=== === ilm.getLifecycle @@ -4449,6 +4490,101 @@ _Default:_ `closed` |=== +=== license.delete +[source,js] +---- +client.license.delete([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html + + +=== license.get +[source,js] +---- +client.license.get([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html +[cols=2*] +|=== +|`local` +|`boolean` - Return local information, do not retrieve the state from master node (default: false) + +|=== + +=== license.getBasicStatus +[source,js] +---- +client.license.getBasicStatus([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html + + +=== license.getTrialStatus +[source,js] +---- +client.license.getTrialStatus([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html + + +=== license.post +[source,js] +---- +client.license.post([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html +[cols=2*] +|=== +|`acknowledge` +|`boolean` - whether the user has acknowledged acknowledge messages (default: false) + +|`body` +|`object` - licenses to be installed + +|=== + +=== license.postStartBasic +[source,js] +---- +client.license.postStartBasic([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html +[cols=2*] +|=== +|`acknowledge` +|`boolean` - whether the user has acknowledged acknowledge messages (default: false) + +|=== + +=== license.postStartTrial +[source,js] +---- +client.license.postStartTrial([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/x-pack/current/license-management.html +[cols=2*] +|=== +|`type` +|`string` - The type of trial license to generate (default: "trial") + +|`acknowledge` +|`boolean` - whether the user has acknowledged acknowledge messages (default: false) + +|=== + +=== migration.deprecations +[source,js] +---- +client.migration.deprecations([params] [, options] [, callback]) +---- +http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html +[cols=2*] +|=== +|`index` +|`string` - Index pattern + +|=== + === ml.closeJob [source,js] ---- @@ -4809,6 +4945,9 @@ client.ml.getCalendars([params] [, options] [, callback]) |`size` |`number` - specifies a max number of calendars to get +|`body` +|`object` - The from and size parameters optionally sent in the body + |=== === ml.getCategories @@ -5434,6 +5573,131 @@ http://www.elastic.co/guide/en/monitoring/current/appendix-api-bulk.html |=== +=== rollup.deleteJob +[source,js] +---- +client.rollup.deleteJob([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the job to delete + +|=== + +=== rollup.getJobs +[source,js] +---- +client.rollup.getJobs([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs + +|=== + +=== rollup.getRollupCaps +[source,js] +---- +client.rollup.getRollupCaps([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the index to check rollup capabilities on, or left blank for all jobs + +|=== + +=== rollup.getRollupIndexCaps +[source,js] +---- +client.rollup.getRollupIndexCaps([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`index` +|`string` - The rollup index or index pattern to obtain rollup capabilities from. + +|=== + +=== rollup.putJob +[source,js] +---- +client.rollup.putJob([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the job to create + +|`body` +|`object` - The job configuration + +|=== + +=== rollup.rollupSearch +[source,js] +---- +client.rollup.rollupSearch([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`index` +|`string, string[]` - The indices or index-pattern(s) (containing rollup or regular data) that should be searched + +|`type` +|`string` - The doc type inside the index + +|`typed_keys` or `typedKeys` +|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response + +|`rest_total_hits_as_int` or `restTotalHitsAsInt` +|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response + +|`body` +|`object` - The search request body + +|=== + +=== rollup.startJob +[source,js] +---- +client.rollup.startJob([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the job to start + +|=== + +=== rollup.stopJob +[source,js] +---- +client.rollup.stopJob([params] [, options] [, callback]) +---- + +[cols=2*] +|=== +|`id` +|`string` - The ID of the job to stop + +|`wait_for_completion` or `waitForCompletion` +|`boolean` - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. + +|`timeout` +|`string` - Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. + +|=== + === security.authenticate [source,js] ---- @@ -5818,345 +6082,39 @@ https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put |=== -=== ssl.certificates +=== sql.clearCursor [source,js] ---- -client.ssl.certificates([params] [, options] [, callback]) +client.sql.clearCursor([params] [, options] [, callback]) ---- -https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html +Clear SQL cursor +[cols=2*] +|=== +|`body` +|`object` - Specify the cursor value in the `cursor` element to clean the cursor. +|=== -=== xpack.graph.explore +=== sql.query [source,js] ---- -client.xpack.graph.explore([params] [, options] [, callback]) +client.sql.query([params] [, options] [, callback]) ---- -https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html +Execute SQL [cols=2*] |=== -|`index` -|`string, string[]` - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - -|`type` -|`string, string[]` - A comma-separated list of document types to search; leave empty to perform the operation on all types - -|`routing` -|`string` - Specific routing value - -|`timeout` -|`string` - Explicit operation timeout +|`format` +|`string` - a short version of the Accept header, e.g. json, yaml |`body` -|`object` - Graph Query DSL +|`object` - Use the `query` element to start a query. Use the `cursor` element to continue a query. |=== -=== xpack.info +=== sql.translate [source,js] ---- -client.xpack.info([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html -[cols=2*] -|=== -|`categories` -|`string, string[]` - Comma-separated list of info categories. Can be any of: build, license, features - -|=== - -=== xpack.license.delete -[source,js] ----- -client.xpack.license.delete([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html - - -=== xpack.license.get -[source,js] ----- -client.xpack.license.get([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html -[cols=2*] -|=== -|`local` -|`boolean` - Return local information, do not retrieve the state from master node (default: false) - -|=== - -=== xpack.license.getBasicStatus -[source,js] ----- -client.xpack.license.getBasicStatus([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html - - -=== xpack.license.getTrialStatus -[source,js] ----- -client.xpack.license.getTrialStatus([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html - - -=== xpack.license.post -[source,js] ----- -client.xpack.license.post([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html -[cols=2*] -|=== -|`acknowledge` -|`boolean` - whether the user has acknowledged acknowledge messages (default: false) - -|`body` -|`object` - licenses to be installed - -|=== - -=== xpack.license.postStartBasic -[source,js] ----- -client.xpack.license.postStartBasic([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html -[cols=2*] -|=== -|`acknowledge` -|`boolean` - whether the user has acknowledged acknowledge messages (default: false) - -|=== - -=== xpack.license.postStartTrial -[source,js] ----- -client.xpack.license.postStartTrial([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/x-pack/current/license-management.html -[cols=2*] -|=== -|`type` -|`string` - The type of trial license to generate (default: "trial") - -|`acknowledge` -|`boolean` - whether the user has acknowledged acknowledge messages (default: false) - -|=== - -=== xpack.migration.deprecations -[source,js] ----- -client.xpack.migration.deprecations([params] [, options] [, callback]) ----- -http://www.elastic.co/guide/en/migration/current/migration-api-deprecation.html -[cols=2*] -|=== -|`index` -|`string` - Index pattern - -|=== - -=== xpack.migration.getAssistance -[source,js] ----- -client.xpack.migration.getAssistance([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-assistance.html -[cols=2*] -|=== -|`index` -|`string, string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - -|`allow_no_indices` or `allowNoIndices` -|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - -|`expand_wildcards` or `expandWildcards` -|`'open', 'closed', 'none', 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + -_Default:_ `open` - -|`ignore_unavailable` or `ignoreUnavailable` -|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed) - -|=== - -=== xpack.migration.upgrade -[source,js] ----- -client.xpack.migration.upgrade([params] [, options] [, callback]) ----- -https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-upgrade.html -[cols=2*] -|=== -|`index` -|`string` - The name of the index - -|`wait_for_completion` or `waitForCompletion` -|`boolean` - Should the request block until the upgrade operation is completed + -_Default:_ `true` - -|=== - -=== xpack.rollup.deleteJob -[source,js] ----- -client.xpack.rollup.deleteJob([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the job to delete - -|=== - -=== xpack.rollup.getJobs -[source,js] ----- -client.xpack.rollup.getJobs([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs - -|=== - -=== xpack.rollup.getRollupCaps -[source,js] ----- -client.xpack.rollup.getRollupCaps([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the index to check rollup capabilities on, or left blank for all jobs - -|=== - -=== xpack.rollup.getRollupIndexCaps -[source,js] ----- -client.xpack.rollup.getRollupIndexCaps([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`index` -|`string` - The rollup index or index pattern to obtain rollup capabilities from. - -|=== - -=== xpack.rollup.putJob -[source,js] ----- -client.xpack.rollup.putJob([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the job to create - -|`body` -|`object` - The job configuration - -|=== - -=== xpack.rollup.rollupSearch -[source,js] ----- -client.xpack.rollup.rollupSearch([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`index` -|`string` - The index or index-pattern (containing rollup or regular data) that should be searched - -|`type` -|`string` - The doc type inside the index - -|`typed_keys` or `typedKeys` -|`boolean` - Specify whether aggregation and suggester names should be prefixed by their respective types in the response - -|`rest_total_hits_as_int` or `restTotalHitsAsInt` -|`boolean` - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - -|`body` -|`object` - The search request body - -|=== - -=== xpack.rollup.startJob -[source,js] ----- -client.xpack.rollup.startJob([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the job to start - -|=== - -=== xpack.rollup.stopJob -[source,js] ----- -client.xpack.rollup.stopJob([params] [, options] [, callback]) ----- - -[cols=2*] -|=== -|`id` -|`string` - The ID of the job to stop - -|`wait_for_completion` or `waitForCompletion` -|`boolean` - True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. - -|`timeout` -|`string` - Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. - -|=== - -=== xpack.sql.clearCursor -[source,js] ----- -client.xpack.sql.clearCursor([params] [, options] [, callback]) ----- -Clear SQL cursor -[cols=2*] -|=== -|`body` -|`object` - Specify the cursor value in the `cursor` element to clean the cursor. - -|=== - -=== xpack.sql.query -[source,js] ----- -client.xpack.sql.query([params] [, options] [, callback]) ----- -Execute SQL -[cols=2*] -|=== -|`format` -|`string` - a short version of the Accept header, e.g. json, yaml - -|`body` -|`object` - Use the `query` element to start a query. Use the `cursor` element to continue a query. - -|=== - -=== xpack.sql.translate -[source,js] ----- -client.xpack.sql.translate([params] [, options] [, callback]) +client.sql.translate([params] [, options] [, callback]) ---- Translate SQL into Elasticsearch queries [cols=2*] @@ -6166,23 +6124,18 @@ Translate SQL into Elasticsearch queries |=== -=== xpack.usage +=== ssl.certificates [source,js] ---- -client.xpack.usage([params] [, options] [, callback]) +client.ssl.certificates([params] [, options] [, callback]) ---- -Retrieve information about xpack features usage -[cols=2*] -|=== -|`master_timeout` or `masterTimeout` -|`string` - Specify timeout for watch write operation +https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html -|=== -=== xpack.watcher.ackWatch +=== watcher.ackWatch [source,js] ---- -client.xpack.watcher.ackWatch([params] [, options] [, callback]) +client.watcher.ackWatch([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html [cols=2*] @@ -6195,10 +6148,10 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-w |=== -=== xpack.watcher.activateWatch +=== watcher.activateWatch [source,js] ---- -client.xpack.watcher.activateWatch([params] [, options] [, callback]) +client.watcher.activateWatch([params] [, options] [, callback]) ---- https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html [cols=2*] @@ -6208,10 +6161,10 @@ https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-acti |=== -=== xpack.watcher.deactivateWatch +=== watcher.deactivateWatch [source,js] ---- -client.xpack.watcher.deactivateWatch([params] [, options] [, callback]) +client.watcher.deactivateWatch([params] [, options] [, callback]) ---- https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html [cols=2*] @@ -6221,10 +6174,10 @@ https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deac |=== -=== xpack.watcher.deleteWatch +=== watcher.deleteWatch [source,js] ---- -client.xpack.watcher.deleteWatch([params] [, options] [, callback]) +client.watcher.deleteWatch([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html [cols=2*] @@ -6234,10 +6187,10 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delet |=== -=== xpack.watcher.executeWatch +=== watcher.executeWatch [source,js] ---- -client.xpack.watcher.executeWatch([params] [, options] [, callback]) +client.watcher.executeWatch([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html [cols=2*] @@ -6253,10 +6206,10 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execu |=== -=== xpack.watcher.getWatch +=== watcher.getWatch [source,js] ---- -client.xpack.watcher.getWatch([params] [, options] [, callback]) +client.watcher.getWatch([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html [cols=2*] @@ -6266,10 +6219,10 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-w |=== -=== xpack.watcher.putWatch +=== watcher.putWatch [source,js] ---- -client.xpack.watcher.putWatch([params] [, options] [, callback]) +client.watcher.putWatch([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html [cols=2*] @@ -6294,37 +6247,63 @@ http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-w |=== -=== xpack.watcher.start +=== watcher.start [source,js] ---- -client.xpack.watcher.start([params] [, options] [, callback]) +client.watcher.start([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html -=== xpack.watcher.stats +=== watcher.stats [source,js] ---- -client.xpack.watcher.stats([params] [, options] [, callback]) +client.watcher.stats([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html [cols=2*] |=== |`metric` -|`'_all', 'queued_watches', 'current_watches', 'pending_watches'` - Controls what additional stat metrics should be include in the response +|`string, string[]` - Controls what additional stat metrics should be include in the response |`metric` -|`'_all', 'queued_watches', 'current_watches', 'pending_watches'` - Controls what additional stat metrics should be include in the response +|`string, string[]` - Controls what additional stat metrics should be include in the response |`emit_stacktraces` or `emitStacktraces` |`boolean` - Emits stack traces of currently running watches |=== -=== xpack.watcher.stop +=== watcher.stop [source,js] ---- -client.xpack.watcher.stop([params] [, options] [, callback]) +client.watcher.stop([params] [, options] [, callback]) ---- http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + +=== xpack.info +[source,js] +---- +client.xpack.info([params] [, options] [, callback]) +---- +https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html +[cols=2*] +|=== +|`categories` +|`string, string[]` - Comma-separated list of info categories. Can be any of: build, license, features + +|=== + +=== xpack.usage +[source,js] +---- +client.xpack.usage([params] [, options] [, callback]) +---- +Retrieve information about xpack features usage +[cols=2*] +|=== +|`master_timeout` or `masterTimeout` +|`string` - Specify timeout for watch write operation + +|=== diff --git a/index.d.ts b/index.d.ts index dd7a4244f..885e2b5e6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -134,6 +134,8 @@ declare class Client extends EventEmitter { followInfo: ApiMethod follow_stats: ApiMethod followStats: ApiMethod + forget_follower: ApiMethod + forgetFollower: ApiMethod get_auto_follow_pattern: ApiMethod getAutoFollowPattern: ApiMethod pause_follow: ApiMethod @@ -183,6 +185,9 @@ declare class Client extends EventEmitter { getScript: ApiMethod get_source: ApiMethod getSource: ApiMethod + graph: { + explore: ApiMethod + } ilm: { delete_lifecycle: ApiMethod deleteLifecycle: ApiMethod @@ -276,7 +281,23 @@ declare class Client extends EventEmitter { putPipeline: ApiMethod simulate: ApiMethod } + license: { + delete: ApiMethod + get: ApiMethod + get_basic_status: ApiMethod + getBasicStatus: ApiMethod + get_trial_status: ApiMethod + getTrialStatus: ApiMethod + post: ApiMethod + post_start_basic: ApiMethod + postStartBasic: ApiMethod + post_start_trial: ApiMethod + postStartTrial: ApiMethod + } mget: ApiMethod + migration: { + deprecations: ApiMethod + } ml: { close_job: ApiMethod closeJob: ApiMethod @@ -394,6 +415,24 @@ declare class Client extends EventEmitter { reindexRethrottle: ApiMethod render_search_template: ApiMethod renderSearchTemplate: ApiMethod + rollup: { + delete_job: ApiMethod + deleteJob: ApiMethod + get_jobs: ApiMethod + getJobs: ApiMethod + get_rollup_caps: ApiMethod + getRollupCaps: ApiMethod + get_rollup_index_caps: ApiMethod + getRollupIndexCaps: ApiMethod + put_job: ApiMethod + putJob: ApiMethod + rollup_search: ApiMethod + rollupSearch: ApiMethod + start_job: ApiMethod + startJob: ApiMethod + stop_job: ApiMethod + stopJob: ApiMethod + } scripts_painless_execute: ApiMethod scriptsPainlessExecute: ApiMethod scroll: ApiMethod @@ -468,6 +507,12 @@ declare class Client extends EventEmitter { verify_repository: ApiMethod verifyRepository: ApiMethod } + sql: { + clear_cursor: ApiMethod + clearCursor: ApiMethod + query: ApiMethod + translate: ApiMethod + } ssl: { certificates: ApiMethod } @@ -482,74 +527,28 @@ declare class Client extends EventEmitter { updateByQuery: ApiMethod update_by_query_rethrottle: ApiMethod updateByQueryRethrottle: ApiMethod + watcher: { + ack_watch: ApiMethod + ackWatch: ApiMethod + activate_watch: ApiMethod + activateWatch: ApiMethod + deactivate_watch: ApiMethod + deactivateWatch: ApiMethod + delete_watch: ApiMethod + deleteWatch: ApiMethod + execute_watch: ApiMethod + executeWatch: ApiMethod + get_watch: ApiMethod + getWatch: ApiMethod + put_watch: ApiMethod + putWatch: ApiMethod + start: ApiMethod + stats: ApiMethod + stop: ApiMethod + } xpack: { - graph: { - explore: ApiMethod - } info: ApiMethod - license: { - delete: ApiMethod - get: ApiMethod - get_basic_status: ApiMethod - getBasicStatus: ApiMethod - get_trial_status: ApiMethod - getTrialStatus: ApiMethod - post: ApiMethod - post_start_basic: ApiMethod - postStartBasic: ApiMethod - post_start_trial: ApiMethod - postStartTrial: ApiMethod - } - migration: { - deprecations: ApiMethod - get_assistance: ApiMethod - getAssistance: ApiMethod - upgrade: ApiMethod - } - rollup: { - delete_job: ApiMethod - deleteJob: ApiMethod - get_jobs: ApiMethod - getJobs: ApiMethod - get_rollup_caps: ApiMethod - getRollupCaps: ApiMethod - get_rollup_index_caps: ApiMethod - getRollupIndexCaps: ApiMethod - put_job: ApiMethod - putJob: ApiMethod - rollup_search: ApiMethod - rollupSearch: ApiMethod - start_job: ApiMethod - startJob: ApiMethod - stop_job: ApiMethod - stopJob: ApiMethod - } - sql: { - clear_cursor: ApiMethod - clearCursor: ApiMethod - query: ApiMethod - translate: ApiMethod - } usage: ApiMethod - watcher: { - ack_watch: ApiMethod - ackWatch: ApiMethod - activate_watch: ApiMethod - activateWatch: ApiMethod - deactivate_watch: ApiMethod - deactivateWatch: ApiMethod - delete_watch: ApiMethod - deleteWatch: ApiMethod - execute_watch: ApiMethod - executeWatch: ApiMethod - get_watch: ApiMethod - getWatch: ApiMethod - put_watch: ApiMethod - putWatch: ApiMethod - start: ApiMethod - stats: ApiMethod - stop: ApiMethod - } } } From 50b0023ecc40503f7ccd53f717c1945a55beb08a Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 17:49:52 +0100 Subject: [PATCH 2/6] Use ES 7.0.0-rc1 --- .ci/test-matrix.yml | 2 +- .travis.yml | 2 +- scripts/es-docker-platinum.sh | 2 +- scripts/es-docker.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index 84d69d9e0..176e0d93b 100644 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -1,6 +1,6 @@ --- ELASTICSEARCH_VERSION: -- 7.0.0-beta1 +- 7.0.0-rc1 NODE_JS_VERSION: - 11 diff --git a/.travis.yml b/.travis.yml index 3eb76648b..658142902 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ node_js: env: global: - - ELASTICSEARCH_VERSION=7.0.0-beta1 + - ELASTICSEARCH_VERSION=7.0.0-rc1 - QUIET=true before_install: diff --git a/scripts/es-docker-platinum.sh b/scripts/es-docker-platinum.sh index 8ab34962a..2e41f4c52 100755 --- a/scripts/es-docker-platinum.sh +++ b/scripts/es-docker-platinum.sh @@ -28,5 +28,5 @@ exec docker run \ -v "$repo$testnodekey:/usr/share/elasticsearch/config/certs/testnode.key" \ -v "$repo$cacrt:/usr/share/elasticsearch/config/certs/ca.crt" \ -p 9200:9200 \ - docker.elastic.co/elasticsearch/elasticsearch:7.0.0-beta1 + docker.elastic.co/elasticsearch/elasticsearch:7.0.0-rc1 # docker.elastic.co/elasticsearch/elasticsearch:6.6.0 diff --git a/scripts/es-docker.sh b/scripts/es-docker.sh index d0e4f5adb..9573d2ffc 100755 --- a/scripts/es-docker.sh +++ b/scripts/es-docker.sh @@ -9,5 +9,5 @@ exec docker run \ -p 9200:9200 \ --network=elastic \ --name=elasticsearch \ - docker.elastic.co/elasticsearch/elasticsearch:7.0.0-beta1 + docker.elastic.co/elasticsearch/elasticsearch:7.0.0-rc1 # docker.elastic.co/elasticsearch/elasticsearch:6.6.0 From 05f2257eea4face369b45f5dc6c5602ecfce4e79 Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 17:51:08 +0100 Subject: [PATCH 3/6] Updated integration test runner --- test/integration/test-runner.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/test-runner.js b/test/integration/test-runner.js index 63ca22085..d02495264 100644 --- a/test/integration/test-runner.js +++ b/test/integration/test-runner.js @@ -182,15 +182,15 @@ TestRunner.prototype.cleanupPlatinum = function (q, done) { }) q.add((q, done) => { - this.client.xpack.rollup.getJobs({ id: '_all' }, (err, { body }) => { + this.client.rollup.getJobs({ id: '_all' }, (err, { body }) => { this.tap.error(err, 'should not error: rollup.getJobs') const jobs = body.jobs.map(j => j.config.id) helper.runInParallel( - this.client, 'xpack.rollup.stopJob', + this.client, 'rollup.stopJob', jobs.map(j => ({ id: j, waitForCompletion: true })) ) .then(() => helper.runInParallel( - this.client, 'xpack.rollup.deleteJob', + this.client, 'rollup.deleteJob', jobs.map(j => ({ id: j })) )) .then(() => done()) From ced995318fba8e033ecbbb9ecab8bb787f0e2f4b Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 19:18:13 +0100 Subject: [PATCH 4/6] Updated integration test runner --- test/integration/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/index.js b/test/integration/index.js index e68b5bcf5..eca6dd474 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -49,7 +49,12 @@ const platinumBlackList = { 'indices.get_alias/20_empty.yml': ['Check empty aliases when getting all aliases via /_alias'], // https://github.com/elastic/elasticsearch/pull/39400 'ml/jobs_crud.yml': ['Test put job with id that is already taken'], - // TODO: investigate why this is failing + // it gets random failures on CI, must investigate + 'ml/set_upgrade_mode.yml': [ + 'Attempt to open job when upgrade_mode is enabled', + 'Setting upgrade mode to disabled from enabled' + ], + // investigate why this is failing 'monitoring/bulk/10_basic.yml': ['*'], 'monitoring/bulk/20_privileges.yml': ['*'], 'license/20_put_license.yml': ['*'], From 6c09127c6d604ee6cbcb0852f1671647982805d8 Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 19:22:27 +0100 Subject: [PATCH 5/6] API generation --- api/api/bulk.js | 9 --------- api/api/cat.aliases.js | 9 --------- api/api/cat.allocation.js | 9 --------- api/api/cat.count.js | 9 --------- api/api/cat.fielddata.js | 9 --------- api/api/cat.health.js | 9 --------- api/api/cat.help.js | 9 --------- api/api/cat.indices.js | 9 --------- api/api/cat.master.js | 9 --------- api/api/cat.nodeattrs.js | 9 --------- api/api/cat.nodes.js | 9 --------- api/api/cat.pending_tasks.js | 9 --------- api/api/cat.plugins.js | 9 --------- api/api/cat.recovery.js | 9 --------- api/api/cat.repositories.js | 9 --------- api/api/cat.segments.js | 9 --------- api/api/cat.shards.js | 9 --------- api/api/cat.snapshots.js | 9 --------- api/api/cat.tasks.js | 9 --------- api/api/cat.templates.js | 9 --------- api/api/cat.thread_pool.js | 9 --------- api/api/ccr.delete_auto_follow_pattern.js | 9 --------- api/api/ccr.follow.js | 9 --------- api/api/ccr.follow_info.js | 9 --------- api/api/ccr.follow_stats.js | 9 --------- api/api/ccr.forget_follower.js | 9 --------- api/api/ccr.get_auto_follow_pattern.js | 9 --------- api/api/ccr.pause_follow.js | 9 --------- api/api/ccr.put_auto_follow_pattern.js | 9 --------- api/api/ccr.resume_follow.js | 9 --------- api/api/ccr.stats.js | 9 --------- api/api/ccr.unfollow.js | 9 --------- api/api/clear_scroll.js | 9 --------- api/api/cluster.allocation_explain.js | 9 --------- api/api/cluster.get_settings.js | 9 --------- api/api/cluster.health.js | 9 --------- api/api/cluster.pending_tasks.js | 9 --------- api/api/cluster.put_settings.js | 9 --------- api/api/cluster.remote_info.js | 9 --------- api/api/cluster.reroute.js | 9 --------- api/api/cluster.state.js | 9 --------- api/api/cluster.stats.js | 9 --------- api/api/count.js | 9 --------- api/api/create.js | 9 --------- api/api/delete.js | 9 --------- api/api/delete_by_query.js | 9 --------- api/api/delete_by_query_rethrottle.js | 9 --------- api/api/delete_script.js | 9 --------- api/api/exists.js | 9 --------- api/api/exists_source.js | 9 --------- api/api/explain.js | 9 --------- api/api/field_caps.js | 9 --------- api/api/get.js | 9 --------- api/api/get_script.js | 9 --------- api/api/get_source.js | 9 --------- api/api/graph.explore.js | 9 --------- api/api/ilm.delete_lifecycle.js | 9 --------- api/api/ilm.explain_lifecycle.js | 9 --------- api/api/ilm.get_lifecycle.js | 9 --------- api/api/ilm.get_status.js | 9 --------- api/api/ilm.move_to_step.js | 9 --------- api/api/ilm.put_lifecycle.js | 9 --------- api/api/ilm.remove_policy.js | 9 --------- api/api/ilm.retry.js | 9 --------- api/api/ilm.start.js | 9 --------- api/api/ilm.stop.js | 9 --------- api/api/index.js | 9 --------- api/api/indices.analyze.js | 9 --------- api/api/indices.clear_cache.js | 9 --------- api/api/indices.close.js | 9 --------- api/api/indices.create.js | 9 --------- api/api/indices.delete.js | 9 --------- api/api/indices.delete_alias.js | 9 --------- api/api/indices.delete_template.js | 9 --------- api/api/indices.exists.js | 9 --------- api/api/indices.exists_alias.js | 9 --------- api/api/indices.exists_template.js | 9 --------- api/api/indices.exists_type.js | 9 --------- api/api/indices.flush.js | 9 --------- api/api/indices.flush_synced.js | 9 --------- api/api/indices.forcemerge.js | 9 --------- api/api/indices.freeze.js | 9 --------- api/api/indices.get.js | 9 --------- api/api/indices.get_alias.js | 9 --------- api/api/indices.get_field_mapping.js | 9 --------- api/api/indices.get_mapping.js | 9 --------- api/api/indices.get_settings.js | 9 --------- api/api/indices.get_template.js | 9 --------- api/api/indices.get_upgrade.js | 9 --------- api/api/indices.open.js | 9 --------- api/api/indices.put_alias.js | 9 --------- api/api/indices.put_mapping.js | 9 --------- api/api/indices.put_settings.js | 9 --------- api/api/indices.put_template.js | 9 --------- api/api/indices.recovery.js | 9 --------- api/api/indices.refresh.js | 9 --------- api/api/indices.rollover.js | 9 --------- api/api/indices.segments.js | 9 --------- api/api/indices.shard_stores.js | 9 --------- api/api/indices.shrink.js | 9 --------- api/api/indices.split.js | 9 --------- api/api/indices.stats.js | 9 --------- api/api/indices.unfreeze.js | 9 --------- api/api/indices.update_aliases.js | 9 --------- api/api/indices.upgrade.js | 9 --------- api/api/indices.validate_query.js | 9 --------- api/api/info.js | 9 --------- api/api/ingest.delete_pipeline.js | 9 --------- api/api/ingest.get_pipeline.js | 9 --------- api/api/ingest.processor_grok.js | 9 --------- api/api/ingest.put_pipeline.js | 9 --------- api/api/ingest.simulate.js | 9 --------- api/api/license.delete.js | 9 --------- api/api/license.get.js | 9 --------- api/api/license.get_basic_status.js | 9 --------- api/api/license.get_trial_status.js | 9 --------- api/api/license.post.js | 9 --------- api/api/license.post_start_basic.js | 9 --------- api/api/license.post_start_trial.js | 9 --------- api/api/mget.js | 9 --------- api/api/migration.deprecations.js | 9 --------- api/api/ml.close_job.js | 9 --------- api/api/ml.delete_calendar.js | 9 --------- api/api/ml.delete_calendar_event.js | 9 --------- api/api/ml.delete_calendar_job.js | 9 --------- api/api/ml.delete_datafeed.js | 9 --------- api/api/ml.delete_expired_data.js | 9 --------- api/api/ml.delete_filter.js | 9 --------- api/api/ml.delete_forecast.js | 9 --------- api/api/ml.delete_job.js | 9 --------- api/api/ml.delete_model_snapshot.js | 9 --------- api/api/ml.find_file_structure.js | 9 --------- api/api/ml.flush_job.js | 9 --------- api/api/ml.forecast.js | 9 --------- api/api/ml.get_buckets.js | 9 --------- api/api/ml.get_calendar_events.js | 9 --------- api/api/ml.get_calendars.js | 9 --------- api/api/ml.get_categories.js | 9 --------- api/api/ml.get_datafeed_stats.js | 9 --------- api/api/ml.get_datafeeds.js | 9 --------- api/api/ml.get_filters.js | 9 --------- api/api/ml.get_influencers.js | 9 --------- api/api/ml.get_job_stats.js | 9 --------- api/api/ml.get_jobs.js | 9 --------- api/api/ml.get_model_snapshots.js | 9 --------- api/api/ml.get_overall_buckets.js | 9 --------- api/api/ml.get_records.js | 9 --------- api/api/ml.info.js | 9 --------- api/api/ml.open_job.js | 9 --------- api/api/ml.post_calendar_events.js | 9 --------- api/api/ml.post_data.js | 9 --------- api/api/ml.preview_datafeed.js | 9 --------- api/api/ml.put_calendar.js | 9 --------- api/api/ml.put_calendar_job.js | 9 --------- api/api/ml.put_datafeed.js | 9 --------- api/api/ml.put_filter.js | 9 --------- api/api/ml.put_job.js | 9 --------- api/api/ml.revert_model_snapshot.js | 9 --------- api/api/ml.set_upgrade_mode.js | 9 --------- api/api/ml.start_datafeed.js | 9 --------- api/api/ml.stop_datafeed.js | 9 --------- api/api/ml.update_datafeed.js | 9 --------- api/api/ml.update_filter.js | 9 --------- api/api/ml.update_job.js | 9 --------- api/api/ml.update_model_snapshot.js | 9 --------- api/api/ml.validate.js | 9 --------- api/api/ml.validate_detector.js | 9 --------- api/api/monitoring.bulk.js | 9 --------- api/api/msearch.js | 9 --------- api/api/msearch_template.js | 9 --------- api/api/mtermvectors.js | 9 --------- api/api/nodes.hot_threads.js | 9 --------- api/api/nodes.info.js | 9 --------- api/api/nodes.reload_secure_settings.js | 9 --------- api/api/nodes.stats.js | 9 --------- api/api/nodes.usage.js | 9 --------- api/api/ping.js | 9 --------- api/api/put_script.js | 9 --------- api/api/rank_eval.js | 9 --------- api/api/reindex.js | 9 --------- api/api/reindex_rethrottle.js | 9 --------- api/api/render_search_template.js | 9 --------- api/api/rollup.delete_job.js | 9 --------- api/api/rollup.get_jobs.js | 9 --------- api/api/rollup.get_rollup_caps.js | 9 --------- api/api/rollup.get_rollup_index_caps.js | 9 --------- api/api/rollup.put_job.js | 9 --------- api/api/rollup.rollup_search.js | 9 --------- api/api/rollup.start_job.js | 9 --------- api/api/rollup.stop_job.js | 9 --------- api/api/scripts_painless_execute.js | 9 --------- api/api/scroll.js | 9 --------- api/api/search.js | 9 --------- api/api/search_shards.js | 9 --------- api/api/search_template.js | 9 --------- api/api/security.authenticate.js | 9 --------- api/api/security.change_password.js | 9 --------- api/api/security.clear_cached_realms.js | 9 --------- api/api/security.clear_cached_roles.js | 9 --------- api/api/security.create_api_key.js | 9 --------- api/api/security.delete_privileges.js | 9 --------- api/api/security.delete_role.js | 9 --------- api/api/security.delete_role_mapping.js | 9 --------- api/api/security.delete_user.js | 9 --------- api/api/security.disable_user.js | 9 --------- api/api/security.enable_user.js | 9 --------- api/api/security.get_api_key.js | 9 --------- api/api/security.get_privileges.js | 9 --------- api/api/security.get_role.js | 9 --------- api/api/security.get_role_mapping.js | 9 --------- api/api/security.get_token.js | 9 --------- api/api/security.get_user.js | 9 --------- api/api/security.get_user_privileges.js | 9 --------- api/api/security.has_privileges.js | 9 --------- api/api/security.invalidate_api_key.js | 9 --------- api/api/security.invalidate_token.js | 9 --------- api/api/security.put_privileges.js | 9 --------- api/api/security.put_role.js | 9 --------- api/api/security.put_role_mapping.js | 9 --------- api/api/security.put_user.js | 9 --------- api/api/snapshot.create.js | 9 --------- api/api/snapshot.create_repository.js | 9 --------- api/api/snapshot.delete.js | 9 --------- api/api/snapshot.delete_repository.js | 9 --------- api/api/snapshot.get.js | 9 --------- api/api/snapshot.get_repository.js | 9 --------- api/api/snapshot.restore.js | 9 --------- api/api/snapshot.status.js | 9 --------- api/api/snapshot.verify_repository.js | 9 --------- api/api/sql.clear_cursor.js | 9 --------- api/api/sql.query.js | 9 --------- api/api/sql.translate.js | 9 --------- api/api/ssl.certificates.js | 9 --------- api/api/tasks.cancel.js | 9 --------- api/api/tasks.get.js | 9 --------- api/api/tasks.list.js | 9 --------- api/api/termvectors.js | 9 --------- api/api/update.js | 9 --------- api/api/update_by_query.js | 9 --------- api/api/update_by_query_rethrottle.js | 9 --------- api/api/watcher.ack_watch.js | 9 --------- api/api/watcher.activate_watch.js | 9 --------- api/api/watcher.deactivate_watch.js | 9 --------- api/api/watcher.delete_watch.js | 9 --------- api/api/watcher.execute_watch.js | 9 --------- api/api/watcher.get_watch.js | 9 --------- api/api/watcher.put_watch.js | 9 --------- api/api/watcher.start.js | 9 --------- api/api/watcher.stats.js | 9 --------- api/api/watcher.stop.js | 9 --------- api/api/xpack.info.js | 9 --------- api/api/xpack.usage.js | 9 --------- 252 files changed, 2268 deletions(-) diff --git a/api/api/bulk.js b/api/api/bulk.js index 59fb595ef..5322898dc 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -79,15 +79,6 @@ function buildBulk (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - bulk(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/cat.aliases.js b/api/api/cat.aliases.js index 286946a15..e5738e038 100644 --- a/api/api/cat.aliases.js +++ b/api/api/cat.aliases.js @@ -71,15 +71,6 @@ function buildCatAliases (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catAliases(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.allocation.js b/api/api/cat.allocation.js index b3e7c7c1a..561c02ddb 100644 --- a/api/api/cat.allocation.js +++ b/api/api/cat.allocation.js @@ -73,15 +73,6 @@ function buildCatAllocation (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catAllocation(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.count.js b/api/api/cat.count.js index b96c583eb..2be151d71 100644 --- a/api/api/cat.count.js +++ b/api/api/cat.count.js @@ -71,15 +71,6 @@ function buildCatCount (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catCount(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.fielddata.js b/api/api/cat.fielddata.js index eda153770..1685acd80 100644 --- a/api/api/cat.fielddata.js +++ b/api/api/cat.fielddata.js @@ -75,15 +75,6 @@ function buildCatFielddata (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catFielddata(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.health.js b/api/api/cat.health.js index 96cc273f6..6badc3a80 100644 --- a/api/api/cat.health.js +++ b/api/api/cat.health.js @@ -72,15 +72,6 @@ function buildCatHealth (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catHealth(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.help.js b/api/api/cat.help.js index 73f343092..d776803de 100644 --- a/api/api/cat.help.js +++ b/api/api/cat.help.js @@ -59,15 +59,6 @@ function buildCatHelp (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catHelp(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.indices.js b/api/api/cat.indices.js index 104120318..aff657648 100644 --- a/api/api/cat.indices.js +++ b/api/api/cat.indices.js @@ -77,15 +77,6 @@ function buildCatIndices (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catIndices(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.master.js b/api/api/cat.master.js index 4f0ea16fe..08528e146 100644 --- a/api/api/cat.master.js +++ b/api/api/cat.master.js @@ -70,15 +70,6 @@ function buildCatMaster (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catMaster(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.nodeattrs.js b/api/api/cat.nodeattrs.js index 302a8a8d2..65a36356a 100644 --- a/api/api/cat.nodeattrs.js +++ b/api/api/cat.nodeattrs.js @@ -70,15 +70,6 @@ function buildCatNodeattrs (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catNodeattrs(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js index 9bac55b02..d539438c5 100644 --- a/api/api/cat.nodes.js +++ b/api/api/cat.nodes.js @@ -73,15 +73,6 @@ function buildCatNodes (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catNodes(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.pending_tasks.js b/api/api/cat.pending_tasks.js index 0fc503db7..b13a3d306 100644 --- a/api/api/cat.pending_tasks.js +++ b/api/api/cat.pending_tasks.js @@ -70,15 +70,6 @@ function buildCatPendingTasks (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catPendingTasks(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.plugins.js b/api/api/cat.plugins.js index 53aaff71e..1f3b6cdf3 100644 --- a/api/api/cat.plugins.js +++ b/api/api/cat.plugins.js @@ -70,15 +70,6 @@ function buildCatPlugins (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catPlugins(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.recovery.js b/api/api/cat.recovery.js index 7b9f106b4..7e631fab3 100644 --- a/api/api/cat.recovery.js +++ b/api/api/cat.recovery.js @@ -71,15 +71,6 @@ function buildCatRecovery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catRecovery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.repositories.js b/api/api/cat.repositories.js index fec64cc26..9e229bfd8 100644 --- a/api/api/cat.repositories.js +++ b/api/api/cat.repositories.js @@ -70,15 +70,6 @@ function buildCatRepositories (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catRepositories(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.segments.js b/api/api/cat.segments.js index fc94e56be..adc48ee61 100644 --- a/api/api/cat.segments.js +++ b/api/api/cat.segments.js @@ -68,15 +68,6 @@ function buildCatSegments (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catSegments(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.shards.js b/api/api/cat.shards.js index 0fc7671ea..4de59a7c9 100644 --- a/api/api/cat.shards.js +++ b/api/api/cat.shards.js @@ -73,15 +73,6 @@ function buildCatShards (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catShards(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.snapshots.js b/api/api/cat.snapshots.js index 2f4716800..4db252fe9 100644 --- a/api/api/cat.snapshots.js +++ b/api/api/cat.snapshots.js @@ -72,15 +72,6 @@ function buildCatSnapshots (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catSnapshots(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.tasks.js b/api/api/cat.tasks.js index 9ca380c59..b00e20496 100644 --- a/api/api/cat.tasks.js +++ b/api/api/cat.tasks.js @@ -75,15 +75,6 @@ function buildCatTasks (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catTasks(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.templates.js b/api/api/cat.templates.js index fee010050..2f0b6beca 100644 --- a/api/api/cat.templates.js +++ b/api/api/cat.templates.js @@ -71,15 +71,6 @@ function buildCatTemplates (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catTemplates(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cat.thread_pool.js b/api/api/cat.thread_pool.js index 92c8c03ed..fddeb9256 100644 --- a/api/api/cat.thread_pool.js +++ b/api/api/cat.thread_pool.js @@ -73,15 +73,6 @@ function buildCatThreadPool (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - catThreadPool(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ccr.delete_auto_follow_pattern.js b/api/api/ccr.delete_auto_follow_pattern.js index 49182b4b0..af0f01987 100644 --- a/api/api/ccr.delete_auto_follow_pattern.js +++ b/api/api/ccr.delete_auto_follow_pattern.js @@ -51,15 +51,6 @@ function buildCcrDeleteAutoFollowPattern (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrDeleteAutoFollowPattern(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/ccr.follow.js b/api/api/ccr.follow.js index 55ed9c2a6..ab8d8e255 100644 --- a/api/api/ccr.follow.js +++ b/api/api/ccr.follow.js @@ -53,15 +53,6 @@ function buildCcrFollow (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrFollow(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/ccr.follow_info.js b/api/api/ccr.follow_info.js index 267771db4..209521757 100644 --- a/api/api/ccr.follow_info.js +++ b/api/api/ccr.follow_info.js @@ -51,15 +51,6 @@ function buildCcrFollowInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrFollowInfo(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ccr.follow_stats.js b/api/api/ccr.follow_stats.js index 027870fec..5d455b480 100644 --- a/api/api/ccr.follow_stats.js +++ b/api/api/ccr.follow_stats.js @@ -51,15 +51,6 @@ function buildCcrFollowStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrFollowStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/ccr.forget_follower.js b/api/api/ccr.forget_follower.js index 0c50659f0..1e2504cee 100644 --- a/api/api/ccr.forget_follower.js +++ b/api/api/ccr.forget_follower.js @@ -52,15 +52,6 @@ function buildCcrForgetFollower (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrForgetFollower(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/ccr.get_auto_follow_pattern.js b/api/api/ccr.get_auto_follow_pattern.js index 0a3ea7e34..83b3cbfc8 100644 --- a/api/api/ccr.get_auto_follow_pattern.js +++ b/api/api/ccr.get_auto_follow_pattern.js @@ -51,15 +51,6 @@ function buildCcrGetAutoFollowPattern (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrGetAutoFollowPattern(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ccr.pause_follow.js b/api/api/ccr.pause_follow.js index be724edba..2862163f1 100644 --- a/api/api/ccr.pause_follow.js +++ b/api/api/ccr.pause_follow.js @@ -51,15 +51,6 @@ function buildCcrPauseFollow (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrPauseFollow(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/ccr.put_auto_follow_pattern.js b/api/api/ccr.put_auto_follow_pattern.js index b8807645e..6338da352 100644 --- a/api/api/ccr.put_auto_follow_pattern.js +++ b/api/api/ccr.put_auto_follow_pattern.js @@ -52,15 +52,6 @@ function buildCcrPutAutoFollowPattern (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrPutAutoFollowPattern(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/ccr.resume_follow.js b/api/api/ccr.resume_follow.js index 7a68ce986..3c857a84a 100644 --- a/api/api/ccr.resume_follow.js +++ b/api/api/ccr.resume_follow.js @@ -52,15 +52,6 @@ function buildCcrResumeFollow (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrResumeFollow(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/ccr.stats.js b/api/api/ccr.stats.js index 46be2e712..81f544210 100644 --- a/api/api/ccr.stats.js +++ b/api/api/ccr.stats.js @@ -50,15 +50,6 @@ function buildCcrStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ccr.unfollow.js b/api/api/ccr.unfollow.js index f90358f30..2163e6ad7 100644 --- a/api/api/ccr.unfollow.js +++ b/api/api/ccr.unfollow.js @@ -51,15 +51,6 @@ function buildCcrUnfollow (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ccrUnfollow(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index 8ac22c45f..552ac23cc 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -57,15 +57,6 @@ function buildClearScroll (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clearScroll(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/cluster.allocation_explain.js b/api/api/cluster.allocation_explain.js index 5cac759d3..3ce754e73 100644 --- a/api/api/cluster.allocation_explain.js +++ b/api/api/cluster.allocation_explain.js @@ -62,15 +62,6 @@ function buildClusterAllocationExplain (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterAllocationExplain(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/cluster.get_settings.js b/api/api/cluster.get_settings.js index 800c0bccb..8e215e750 100644 --- a/api/api/cluster.get_settings.js +++ b/api/api/cluster.get_settings.js @@ -66,15 +66,6 @@ function buildClusterGetSettings (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterGetSettings(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cluster.health.js b/api/api/cluster.health.js index c7b9272ba..327cbbaba 100644 --- a/api/api/cluster.health.js +++ b/api/api/cluster.health.js @@ -83,15 +83,6 @@ function buildClusterHealth (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterHealth(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cluster.pending_tasks.js b/api/api/cluster.pending_tasks.js index fa693b025..cc132b7a7 100644 --- a/api/api/cluster.pending_tasks.js +++ b/api/api/cluster.pending_tasks.js @@ -60,15 +60,6 @@ function buildClusterPendingTasks (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterPendingTasks(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cluster.put_settings.js b/api/api/cluster.put_settings.js index 0c70e79bc..9064e1670 100644 --- a/api/api/cluster.put_settings.js +++ b/api/api/cluster.put_settings.js @@ -64,15 +64,6 @@ function buildClusterPutSettings (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterPutSettings(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/cluster.remote_info.js b/api/api/cluster.remote_info.js index 39f6681df..22a2ca142 100644 --- a/api/api/cluster.remote_info.js +++ b/api/api/cluster.remote_info.js @@ -55,15 +55,6 @@ function buildClusterRemoteInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterRemoteInfo(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cluster.reroute.js b/api/api/cluster.reroute.js index d098f9b00..5a29ea54d 100644 --- a/api/api/cluster.reroute.js +++ b/api/api/cluster.reroute.js @@ -71,15 +71,6 @@ function buildClusterReroute (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterReroute(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/cluster.state.js b/api/api/cluster.state.js index 871443f85..7d6b7c303 100644 --- a/api/api/cluster.state.js +++ b/api/api/cluster.state.js @@ -80,15 +80,6 @@ function buildClusterState (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterState(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/cluster.stats.js b/api/api/cluster.stats.js index 2a1cb0129..77f634146 100644 --- a/api/api/cluster.stats.js +++ b/api/api/cluster.stats.js @@ -61,15 +61,6 @@ function buildClusterStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - clusterStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/count.js b/api/api/count.js index 9781748a9..ae6816fba 100644 --- a/api/api/count.js +++ b/api/api/count.js @@ -94,15 +94,6 @@ function buildCount (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - count(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required url components if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') diff --git a/api/api/create.js b/api/api/create.js index ae7ba709d..0ee306e57 100644 --- a/api/api/create.js +++ b/api/api/create.js @@ -77,15 +77,6 @@ function buildCreate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - create(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/delete.js b/api/api/delete.js index 86b77f27c..35ab29398 100644 --- a/api/api/delete.js +++ b/api/api/delete.js @@ -80,15 +80,6 @@ function buildDelete (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - _delete(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index c39b52aed..7e3aae9ea 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -137,15 +137,6 @@ function buildDeleteByQuery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - deleteByQuery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js index f91452770..bbeb5094a 100644 --- a/api/api/delete_by_query_rethrottle.js +++ b/api/api/delete_by_query_rethrottle.js @@ -59,15 +59,6 @@ function buildDeleteByQueryRethrottle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - deleteByQueryRethrottle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') diff --git a/api/api/delete_script.js b/api/api/delete_script.js index ad697f003..6165361bf 100644 --- a/api/api/delete_script.js +++ b/api/api/delete_script.js @@ -61,15 +61,6 @@ function buildDeleteScript (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - deleteScript(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/exists.js b/api/api/exists.js index adf118738..ac6e5db8a 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -84,15 +84,6 @@ function buildExists (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - exists(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 8462081cc..d8111530e 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -81,15 +81,6 @@ function buildExistsSource (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - existsSource(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/explain.js b/api/api/explain.js index f811dceaf..f59f7a11c 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -90,15 +90,6 @@ function buildExplain (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - explain(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/field_caps.js b/api/api/field_caps.js index a2e91201a..c8a6dec42 100644 --- a/api/api/field_caps.js +++ b/api/api/field_caps.js @@ -67,15 +67,6 @@ function buildFieldCaps (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - fieldCaps(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/get.js b/api/api/get.js index 1714f78d2..ff8e8b032 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -90,15 +90,6 @@ function buildGet (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - get(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/get_script.js b/api/api/get_script.js index 7e1fdd6cf..b6659841f 100644 --- a/api/api/get_script.js +++ b/api/api/get_script.js @@ -59,15 +59,6 @@ function buildGetScript (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - getScript(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/get_source.js b/api/api/get_source.js index 327097fce..bcac14deb 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -81,15 +81,6 @@ function buildGetSource (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - getSource(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/graph.explore.js b/api/api/graph.explore.js index 7ddd5b7bb..19e601a64 100644 --- a/api/api/graph.explore.js +++ b/api/api/graph.explore.js @@ -56,15 +56,6 @@ function buildGraphExplore (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - graphExplore(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required url components if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') diff --git a/api/api/ilm.delete_lifecycle.js b/api/api/ilm.delete_lifecycle.js index 883cb2cd4..7e09289af 100644 --- a/api/api/ilm.delete_lifecycle.js +++ b/api/api/ilm.delete_lifecycle.js @@ -51,15 +51,6 @@ function buildIlmDeleteLifecycle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmDeleteLifecycle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.explain_lifecycle.js b/api/api/ilm.explain_lifecycle.js index 9a00df8ce..e5638c16d 100644 --- a/api/api/ilm.explain_lifecycle.js +++ b/api/api/ilm.explain_lifecycle.js @@ -51,15 +51,6 @@ function buildIlmExplainLifecycle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmExplainLifecycle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.get_lifecycle.js b/api/api/ilm.get_lifecycle.js index 39cc1aff3..a01952fa5 100644 --- a/api/api/ilm.get_lifecycle.js +++ b/api/api/ilm.get_lifecycle.js @@ -51,15 +51,6 @@ function buildIlmGetLifecycle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmGetLifecycle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.get_status.js b/api/api/ilm.get_status.js index 080950254..30c135900 100644 --- a/api/api/ilm.get_status.js +++ b/api/api/ilm.get_status.js @@ -50,15 +50,6 @@ function buildIlmGetStatus (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmGetStatus(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.move_to_step.js b/api/api/ilm.move_to_step.js index ead4a8456..49f82a8c5 100644 --- a/api/api/ilm.move_to_step.js +++ b/api/api/ilm.move_to_step.js @@ -52,15 +52,6 @@ function buildIlmMoveToStep (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmMoveToStep(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ilm.put_lifecycle.js b/api/api/ilm.put_lifecycle.js index 4f49d73f6..28955b0fe 100644 --- a/api/api/ilm.put_lifecycle.js +++ b/api/api/ilm.put_lifecycle.js @@ -52,15 +52,6 @@ function buildIlmPutLifecycle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmPutLifecycle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ilm.remove_policy.js b/api/api/ilm.remove_policy.js index c7c210b5e..ccfbc8c81 100644 --- a/api/api/ilm.remove_policy.js +++ b/api/api/ilm.remove_policy.js @@ -51,15 +51,6 @@ function buildIlmRemovePolicy (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmRemovePolicy(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.retry.js b/api/api/ilm.retry.js index f86bd2df8..5ea000327 100644 --- a/api/api/ilm.retry.js +++ b/api/api/ilm.retry.js @@ -51,15 +51,6 @@ function buildIlmRetry (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmRetry(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.start.js b/api/api/ilm.start.js index 76968acfc..f2461f3ef 100644 --- a/api/api/ilm.start.js +++ b/api/api/ilm.start.js @@ -50,15 +50,6 @@ function buildIlmStart (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmStart(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ilm.stop.js b/api/api/ilm.stop.js index ce69c06a0..ad1607579 100644 --- a/api/api/ilm.stop.js +++ b/api/api/ilm.stop.js @@ -50,15 +50,6 @@ function buildIlmStop (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ilmStop(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/index.js b/api/api/index.js index dfd323df9..716d8c4cf 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -86,15 +86,6 @@ function buildIndex (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - _index(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.analyze.js b/api/api/indices.analyze.js index 12f0543eb..4d819f7c0 100644 --- a/api/api/indices.analyze.js +++ b/api/api/indices.analyze.js @@ -59,15 +59,6 @@ function buildIndicesAnalyze (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesAnalyze(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/indices.clear_cache.js b/api/api/indices.clear_cache.js index ff66ae2f0..fa2739c6b 100644 --- a/api/api/indices.clear_cache.js +++ b/api/api/indices.clear_cache.js @@ -75,15 +75,6 @@ function buildIndicesClearCache (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesClearCache(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.close.js b/api/api/indices.close.js index f4f99f279..023bc3507 100644 --- a/api/api/indices.close.js +++ b/api/api/indices.close.js @@ -70,15 +70,6 @@ function buildIndicesClose (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesClose(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.create.js b/api/api/indices.create.js index 43b50e94a..355a7a370 100644 --- a/api/api/indices.create.js +++ b/api/api/indices.create.js @@ -68,15 +68,6 @@ function buildIndicesCreate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesCreate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.delete.js b/api/api/indices.delete.js index 0fa1e25ed..bb46902fd 100644 --- a/api/api/indices.delete.js +++ b/api/api/indices.delete.js @@ -70,15 +70,6 @@ function buildIndicesDelete (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesDelete(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.delete_alias.js b/api/api/indices.delete_alias.js index 2c71ec518..db5091854 100644 --- a/api/api/indices.delete_alias.js +++ b/api/api/indices.delete_alias.js @@ -62,15 +62,6 @@ function buildIndicesDeleteAlias (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesDeleteAlias(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.delete_template.js b/api/api/indices.delete_template.js index 1d2a93322..623ba6933 100644 --- a/api/api/indices.delete_template.js +++ b/api/api/indices.delete_template.js @@ -61,15 +61,6 @@ function buildIndicesDeleteTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesDeleteTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/indices.exists.js b/api/api/indices.exists.js index 53d6d0940..85cc737a4 100644 --- a/api/api/indices.exists.js +++ b/api/api/indices.exists.js @@ -73,15 +73,6 @@ function buildIndicesExists (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesExists(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.exists_alias.js b/api/api/indices.exists_alias.js index 2754554a3..d25ddb733 100644 --- a/api/api/indices.exists_alias.js +++ b/api/api/indices.exists_alias.js @@ -68,15 +68,6 @@ function buildIndicesExistsAlias (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesExistsAlias(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/indices.exists_template.js b/api/api/indices.exists_template.js index c3391e25f..ea3fb9d35 100644 --- a/api/api/indices.exists_template.js +++ b/api/api/indices.exists_template.js @@ -64,15 +64,6 @@ function buildIndicesExistsTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesExistsTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/indices.exists_type.js b/api/api/indices.exists_type.js index 7b81b322c..4c2573419 100644 --- a/api/api/indices.exists_type.js +++ b/api/api/indices.exists_type.js @@ -68,15 +68,6 @@ function buildIndicesExistsType (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesExistsType(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.flush.js b/api/api/indices.flush.js index 3404ea8a5..1099650fa 100644 --- a/api/api/indices.flush.js +++ b/api/api/indices.flush.js @@ -70,15 +70,6 @@ function buildIndicesFlush (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesFlush(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js index 660211cb2..df404cee0 100644 --- a/api/api/indices.flush_synced.js +++ b/api/api/indices.flush_synced.js @@ -65,15 +65,6 @@ function buildIndicesFlushSynced (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesFlushSynced(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.forcemerge.js b/api/api/indices.forcemerge.js index 518e404c2..5bf900cc6 100644 --- a/api/api/indices.forcemerge.js +++ b/api/api/indices.forcemerge.js @@ -73,15 +73,6 @@ function buildIndicesForcemerge (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesForcemerge(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.freeze.js b/api/api/indices.freeze.js index 1352e32fa..944a9b00a 100644 --- a/api/api/indices.freeze.js +++ b/api/api/indices.freeze.js @@ -66,15 +66,6 @@ function buildIndicesFreeze (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesFreeze(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.get.js b/api/api/indices.get.js index 79add9faf..6a4047c83 100644 --- a/api/api/indices.get.js +++ b/api/api/indices.get.js @@ -79,15 +79,6 @@ function buildIndicesGet (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGet(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.get_alias.js b/api/api/indices.get_alias.js index 49753273a..fc2f508ef 100644 --- a/api/api/indices.get_alias.js +++ b/api/api/indices.get_alias.js @@ -68,15 +68,6 @@ function buildIndicesGetAlias (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetAlias(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.get_field_mapping.js b/api/api/indices.get_field_mapping.js index c2c6dff23..78dcfcc0c 100644 --- a/api/api/indices.get_field_mapping.js +++ b/api/api/indices.get_field_mapping.js @@ -75,15 +75,6 @@ function buildIndicesGetFieldMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetFieldMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['fields'] == null) { const err = new ConfigurationError('Missing required parameter: fields') diff --git a/api/api/indices.get_mapping.js b/api/api/indices.get_mapping.js index 976262ab1..5534a5cec 100644 --- a/api/api/indices.get_mapping.js +++ b/api/api/indices.get_mapping.js @@ -74,15 +74,6 @@ function buildIndicesGetMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.get_settings.js b/api/api/indices.get_settings.js index 5a240eda3..5af0ba622 100644 --- a/api/api/indices.get_settings.js +++ b/api/api/indices.get_settings.js @@ -77,15 +77,6 @@ function buildIndicesGetSettings (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetSettings(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.get_template.js b/api/api/indices.get_template.js index 201c0c82f..315c9d9ad 100644 --- a/api/api/indices.get_template.js +++ b/api/api/indices.get_template.js @@ -67,15 +67,6 @@ function buildIndicesGetTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.get_upgrade.js b/api/api/indices.get_upgrade.js index e6266b2f3..c5acf2611 100644 --- a/api/api/indices.get_upgrade.js +++ b/api/api/indices.get_upgrade.js @@ -65,15 +65,6 @@ function buildIndicesGetUpgrade (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesGetUpgrade(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.open.js b/api/api/indices.open.js index 3468e0e81..ba585f805 100644 --- a/api/api/indices.open.js +++ b/api/api/indices.open.js @@ -73,15 +73,6 @@ function buildIndicesOpen (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesOpen(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.put_alias.js b/api/api/indices.put_alias.js index c3e3146ae..68710d615 100644 --- a/api/api/indices.put_alias.js +++ b/api/api/indices.put_alias.js @@ -63,15 +63,6 @@ function buildIndicesPutAlias (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesPutAlias(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.put_mapping.js b/api/api/indices.put_mapping.js index 1e3dea5eb..491ffd2db 100644 --- a/api/api/indices.put_mapping.js +++ b/api/api/indices.put_mapping.js @@ -75,15 +75,6 @@ function buildIndicesPutMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesPutMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/indices.put_settings.js b/api/api/indices.put_settings.js index 5f8a36ef3..c12a1a47d 100644 --- a/api/api/indices.put_settings.js +++ b/api/api/indices.put_settings.js @@ -77,15 +77,6 @@ function buildIndicesPutSettings (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesPutSettings(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/indices.put_template.js b/api/api/indices.put_template.js index e0240ca57..2ccc9a5a6 100644 --- a/api/api/indices.put_template.js +++ b/api/api/indices.put_template.js @@ -72,15 +72,6 @@ function buildIndicesPutTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesPutTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/indices.recovery.js b/api/api/indices.recovery.js index e02e35d2c..226637439 100644 --- a/api/api/indices.recovery.js +++ b/api/api/indices.recovery.js @@ -61,15 +61,6 @@ function buildIndicesRecovery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesRecovery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.refresh.js b/api/api/indices.refresh.js index 4fea12890..e246af298 100644 --- a/api/api/indices.refresh.js +++ b/api/api/indices.refresh.js @@ -65,15 +65,6 @@ function buildIndicesRefresh (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesRefresh(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.rollover.js b/api/api/indices.rollover.js index 58204002e..73ad046be 100644 --- a/api/api/indices.rollover.js +++ b/api/api/indices.rollover.js @@ -72,15 +72,6 @@ function buildIndicesRollover (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesRollover(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['alias'] == null) { const err = new ConfigurationError('Missing required parameter: alias') diff --git a/api/api/indices.segments.js b/api/api/indices.segments.js index 7a32cf405..d571c8c65 100644 --- a/api/api/indices.segments.js +++ b/api/api/indices.segments.js @@ -67,15 +67,6 @@ function buildIndicesSegments (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesSegments(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.shard_stores.js b/api/api/indices.shard_stores.js index 36593ed08..f835b5975 100644 --- a/api/api/indices.shard_stores.js +++ b/api/api/indices.shard_stores.js @@ -67,15 +67,6 @@ function buildIndicesShardStores (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesShardStores(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.shrink.js b/api/api/indices.shrink.js index 49ac9696e..e8dcbe934 100644 --- a/api/api/indices.shrink.js +++ b/api/api/indices.shrink.js @@ -69,15 +69,6 @@ function buildIndicesShrink (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesShrink(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.split.js b/api/api/indices.split.js index 6734ad03f..fbb062d1f 100644 --- a/api/api/indices.split.js +++ b/api/api/indices.split.js @@ -69,15 +69,6 @@ function buildIndicesSplit (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesSplit(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.stats.js b/api/api/indices.stats.js index c521d54f3..e4b811ea5 100644 --- a/api/api/indices.stats.js +++ b/api/api/indices.stats.js @@ -74,15 +74,6 @@ function buildIndicesStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.unfreeze.js b/api/api/indices.unfreeze.js index d22b5da8e..cac430b25 100644 --- a/api/api/indices.unfreeze.js +++ b/api/api/indices.unfreeze.js @@ -66,15 +66,6 @@ function buildIndicesUnfreeze (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesUnfreeze(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/indices.update_aliases.js b/api/api/indices.update_aliases.js index 7fe2d96f7..869bd1e42 100644 --- a/api/api/indices.update_aliases.js +++ b/api/api/indices.update_aliases.js @@ -61,15 +61,6 @@ function buildIndicesUpdateAliases (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesUpdateAliases(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/indices.upgrade.js b/api/api/indices.upgrade.js index e222b048d..a2b5e25b6 100644 --- a/api/api/indices.upgrade.js +++ b/api/api/indices.upgrade.js @@ -71,15 +71,6 @@ function buildIndicesUpgrade (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesUpgrade(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/indices.validate_query.js b/api/api/indices.validate_query.js index 380fbc2ea..fca278548 100644 --- a/api/api/indices.validate_query.js +++ b/api/api/indices.validate_query.js @@ -88,15 +88,6 @@ function buildIndicesValidateQuery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - indicesValidateQuery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required url components if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') diff --git a/api/api/info.js b/api/api/info.js index 86bd415bb..681d465a4 100644 --- a/api/api/info.js +++ b/api/api/info.js @@ -55,15 +55,6 @@ function buildInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - info(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ingest.delete_pipeline.js b/api/api/ingest.delete_pipeline.js index b0ed7aee5..98377da51 100644 --- a/api/api/ingest.delete_pipeline.js +++ b/api/api/ingest.delete_pipeline.js @@ -61,15 +61,6 @@ function buildIngestDeletePipeline (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ingestDeletePipeline(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/ingest.get_pipeline.js b/api/api/ingest.get_pipeline.js index fb706cad2..c0cd21726 100644 --- a/api/api/ingest.get_pipeline.js +++ b/api/api/ingest.get_pipeline.js @@ -59,15 +59,6 @@ function buildIngestGetPipeline (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ingestGetPipeline(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ingest.processor_grok.js b/api/api/ingest.processor_grok.js index b6ddee865..f3c88aa8f 100644 --- a/api/api/ingest.processor_grok.js +++ b/api/api/ingest.processor_grok.js @@ -55,15 +55,6 @@ function buildIngestProcessorGrok (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ingestProcessorGrok(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ingest.put_pipeline.js b/api/api/ingest.put_pipeline.js index a01192cd3..1ce8e62b7 100644 --- a/api/api/ingest.put_pipeline.js +++ b/api/api/ingest.put_pipeline.js @@ -62,15 +62,6 @@ function buildIngestPutPipeline (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ingestPutPipeline(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/ingest.simulate.js b/api/api/ingest.simulate.js index faed91850..b157763cb 100644 --- a/api/api/ingest.simulate.js +++ b/api/api/ingest.simulate.js @@ -59,15 +59,6 @@ function buildIngestSimulate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ingestSimulate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/license.delete.js b/api/api/license.delete.js index c106ac8f9..520058967 100644 --- a/api/api/license.delete.js +++ b/api/api/license.delete.js @@ -50,15 +50,6 @@ function buildLicenseDelete (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licenseDelete(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/license.get.js b/api/api/license.get.js index 8f08f25ac..613d0e827 100644 --- a/api/api/license.get.js +++ b/api/api/license.get.js @@ -51,15 +51,6 @@ function buildLicenseGet (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licenseGet(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/license.get_basic_status.js b/api/api/license.get_basic_status.js index f37c1488f..911e60a27 100644 --- a/api/api/license.get_basic_status.js +++ b/api/api/license.get_basic_status.js @@ -50,15 +50,6 @@ function buildLicenseGetBasicStatus (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licenseGetBasicStatus(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/license.get_trial_status.js b/api/api/license.get_trial_status.js index dbcc06001..51d570fa2 100644 --- a/api/api/license.get_trial_status.js +++ b/api/api/license.get_trial_status.js @@ -50,15 +50,6 @@ function buildLicenseGetTrialStatus (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licenseGetTrialStatus(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/license.post.js b/api/api/license.post.js index 5c4717859..fd238e700 100644 --- a/api/api/license.post.js +++ b/api/api/license.post.js @@ -52,15 +52,6 @@ function buildLicensePost (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licensePost(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/license.post_start_basic.js b/api/api/license.post_start_basic.js index 3c38476d1..72d9bb04d 100644 --- a/api/api/license.post_start_basic.js +++ b/api/api/license.post_start_basic.js @@ -51,15 +51,6 @@ function buildLicensePostStartBasic (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licensePostStartBasic(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/license.post_start_trial.js b/api/api/license.post_start_trial.js index bdc4faf1d..b99569790 100644 --- a/api/api/license.post_start_trial.js +++ b/api/api/license.post_start_trial.js @@ -53,15 +53,6 @@ function buildLicensePostStartTrial (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - licensePostStartTrial(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/mget.js b/api/api/mget.js index cd3e0d776..f01283b20 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -77,15 +77,6 @@ function buildMget (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mget(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/migration.deprecations.js b/api/api/migration.deprecations.js index 0325579ea..cc5de6d85 100644 --- a/api/api/migration.deprecations.js +++ b/api/api/migration.deprecations.js @@ -51,15 +51,6 @@ function buildMigrationDeprecations (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - migrationDeprecations(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.close_job.js b/api/api/ml.close_job.js index 9f7ef3448..c5b2fb379 100644 --- a/api/api/ml.close_job.js +++ b/api/api/ml.close_job.js @@ -58,15 +58,6 @@ function buildMlCloseJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlCloseJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.delete_calendar.js b/api/api/ml.delete_calendar.js index 8a59d397a..4d2cd5920 100644 --- a/api/api/ml.delete_calendar.js +++ b/api/api/ml.delete_calendar.js @@ -51,15 +51,6 @@ function buildMlDeleteCalendar (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteCalendar(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.delete_calendar_event.js b/api/api/ml.delete_calendar_event.js index 66510a078..4470e735f 100644 --- a/api/api/ml.delete_calendar_event.js +++ b/api/api/ml.delete_calendar_event.js @@ -52,15 +52,6 @@ function buildMlDeleteCalendarEvent (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteCalendarEvent(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.delete_calendar_job.js b/api/api/ml.delete_calendar_job.js index afc42be1f..3bf8d33b8 100644 --- a/api/api/ml.delete_calendar_job.js +++ b/api/api/ml.delete_calendar_job.js @@ -52,15 +52,6 @@ function buildMlDeleteCalendarJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteCalendarJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.delete_datafeed.js b/api/api/ml.delete_datafeed.js index bb0d88360..1cee977d0 100644 --- a/api/api/ml.delete_datafeed.js +++ b/api/api/ml.delete_datafeed.js @@ -52,15 +52,6 @@ function buildMlDeleteDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.delete_expired_data.js b/api/api/ml.delete_expired_data.js index a55feb9e0..cf21a2e86 100644 --- a/api/api/ml.delete_expired_data.js +++ b/api/api/ml.delete_expired_data.js @@ -50,15 +50,6 @@ function buildMlDeleteExpiredData (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteExpiredData(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.delete_filter.js b/api/api/ml.delete_filter.js index 9efb0dca0..cdf204830 100644 --- a/api/api/ml.delete_filter.js +++ b/api/api/ml.delete_filter.js @@ -51,15 +51,6 @@ function buildMlDeleteFilter (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteFilter(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') diff --git a/api/api/ml.delete_forecast.js b/api/api/ml.delete_forecast.js index 98e4f83e1..bb112a9ce 100644 --- a/api/api/ml.delete_forecast.js +++ b/api/api/ml.delete_forecast.js @@ -56,15 +56,6 @@ function buildMlDeleteForecast (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteForecast(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.delete_job.js b/api/api/ml.delete_job.js index 0bda34d42..7a63de2b5 100644 --- a/api/api/ml.delete_job.js +++ b/api/api/ml.delete_job.js @@ -54,15 +54,6 @@ function buildMlDeleteJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.delete_model_snapshot.js b/api/api/ml.delete_model_snapshot.js index 4547167a1..62a071ec1 100644 --- a/api/api/ml.delete_model_snapshot.js +++ b/api/api/ml.delete_model_snapshot.js @@ -52,15 +52,6 @@ function buildMlDeleteModelSnapshot (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlDeleteModelSnapshot(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.find_file_structure.js b/api/api/ml.find_file_structure.js index ec3310b7d..37d2db4dd 100644 --- a/api/api/ml.find_file_structure.js +++ b/api/api/ml.find_file_structure.js @@ -83,15 +83,6 @@ function buildMlFindFileStructure (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlFindFileStructure(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/ml.flush_job.js b/api/api/ml.flush_job.js index 1e06d4899..a2e1dae52 100644 --- a/api/api/ml.flush_job.js +++ b/api/api/ml.flush_job.js @@ -63,15 +63,6 @@ function buildMlFlushJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlFlushJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.forecast.js b/api/api/ml.forecast.js index e6940f5eb..b623627fb 100644 --- a/api/api/ml.forecast.js +++ b/api/api/ml.forecast.js @@ -54,15 +54,6 @@ function buildMlForecast (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlForecast(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_buckets.js b/api/api/ml.get_buckets.js index c861bb564..80873c653 100644 --- a/api/api/ml.get_buckets.js +++ b/api/api/ml.get_buckets.js @@ -72,15 +72,6 @@ function buildMlGetBuckets (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetBuckets(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_calendar_events.js b/api/api/ml.get_calendar_events.js index 18758714f..c7aa2d77a 100644 --- a/api/api/ml.get_calendar_events.js +++ b/api/api/ml.get_calendar_events.js @@ -61,15 +61,6 @@ function buildMlGetCalendarEvents (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetCalendarEvents(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.get_calendars.js b/api/api/ml.get_calendars.js index 2e3cdf86f..2792f7e50 100644 --- a/api/api/ml.get_calendars.js +++ b/api/api/ml.get_calendars.js @@ -55,15 +55,6 @@ function buildMlGetCalendars (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetCalendars(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ml.get_categories.js b/api/api/ml.get_categories.js index 74d0b9be2..4ab14462f 100644 --- a/api/api/ml.get_categories.js +++ b/api/api/ml.get_categories.js @@ -56,15 +56,6 @@ function buildMlGetCategories (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetCategories(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_datafeed_stats.js b/api/api/ml.get_datafeed_stats.js index f3f81a523..e1e61aa33 100644 --- a/api/api/ml.get_datafeed_stats.js +++ b/api/api/ml.get_datafeed_stats.js @@ -52,15 +52,6 @@ function buildMlGetDatafeedStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetDatafeedStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.get_datafeeds.js b/api/api/ml.get_datafeeds.js index 81b672364..4f7fb7d66 100644 --- a/api/api/ml.get_datafeeds.js +++ b/api/api/ml.get_datafeeds.js @@ -52,15 +52,6 @@ function buildMlGetDatafeeds (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetDatafeeds(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.get_filters.js b/api/api/ml.get_filters.js index 10a59b465..f3f4a74e9 100644 --- a/api/api/ml.get_filters.js +++ b/api/api/ml.get_filters.js @@ -54,15 +54,6 @@ function buildMlGetFilters (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetFilters(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.get_influencers.js b/api/api/ml.get_influencers.js index 996387867..591d40e85 100644 --- a/api/api/ml.get_influencers.js +++ b/api/api/ml.get_influencers.js @@ -69,15 +69,6 @@ function buildMlGetInfluencers (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetInfluencers(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_job_stats.js b/api/api/ml.get_job_stats.js index 105b184fa..c0855dc08 100644 --- a/api/api/ml.get_job_stats.js +++ b/api/api/ml.get_job_stats.js @@ -52,15 +52,6 @@ function buildMlGetJobStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetJobStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.get_jobs.js b/api/api/ml.get_jobs.js index d64bce624..17d83fec9 100644 --- a/api/api/ml.get_jobs.js +++ b/api/api/ml.get_jobs.js @@ -52,15 +52,6 @@ function buildMlGetJobs (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetJobs(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.get_model_snapshots.js b/api/api/ml.get_model_snapshots.js index 1f3e85ec6..466c6829d 100644 --- a/api/api/ml.get_model_snapshots.js +++ b/api/api/ml.get_model_snapshots.js @@ -64,15 +64,6 @@ function buildMlGetModelSnapshots (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetModelSnapshots(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_overall_buckets.js b/api/api/ml.get_overall_buckets.js index 58b18e6e5..ba1c7c9ac 100644 --- a/api/api/ml.get_overall_buckets.js +++ b/api/api/ml.get_overall_buckets.js @@ -69,15 +69,6 @@ function buildMlGetOverallBuckets (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetOverallBuckets(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.get_records.js b/api/api/ml.get_records.js index dfd490ebc..3a3e5335f 100644 --- a/api/api/ml.get_records.js +++ b/api/api/ml.get_records.js @@ -69,15 +69,6 @@ function buildMlGetRecords (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlGetRecords(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.info.js b/api/api/ml.info.js index 1a27d31c5..3e0b95328 100644 --- a/api/api/ml.info.js +++ b/api/api/ml.info.js @@ -50,15 +50,6 @@ function buildMlInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlInfo(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/ml.open_job.js b/api/api/ml.open_job.js index 4b75a05c3..72b4ab402 100644 --- a/api/api/ml.open_job.js +++ b/api/api/ml.open_job.js @@ -53,15 +53,6 @@ function buildMlOpenJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlOpenJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.post_calendar_events.js b/api/api/ml.post_calendar_events.js index 89415d0a0..8ad6e683d 100644 --- a/api/api/ml.post_calendar_events.js +++ b/api/api/ml.post_calendar_events.js @@ -52,15 +52,6 @@ function buildMlPostCalendarEvents (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPostCalendarEvents(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.post_data.js b/api/api/ml.post_data.js index ed316305b..4661fc231 100644 --- a/api/api/ml.post_data.js +++ b/api/api/ml.post_data.js @@ -56,15 +56,6 @@ function buildMlPostData (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPostData(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.preview_datafeed.js b/api/api/ml.preview_datafeed.js index 82ccdbb0c..0f78bc7dd 100644 --- a/api/api/ml.preview_datafeed.js +++ b/api/api/ml.preview_datafeed.js @@ -51,15 +51,6 @@ function buildMlPreviewDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPreviewDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.put_calendar.js b/api/api/ml.put_calendar.js index eaab32513..bcd5d40ac 100644 --- a/api/api/ml.put_calendar.js +++ b/api/api/ml.put_calendar.js @@ -52,15 +52,6 @@ function buildMlPutCalendar (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPutCalendar(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.put_calendar_job.js b/api/api/ml.put_calendar_job.js index 32352d98e..3f160c47d 100644 --- a/api/api/ml.put_calendar_job.js +++ b/api/api/ml.put_calendar_job.js @@ -52,15 +52,6 @@ function buildMlPutCalendarJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPutCalendarJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['calendar_id'] == null && params['calendarId'] == null) { const err = new ConfigurationError('Missing required parameter: calendar_id or calendarId') diff --git a/api/api/ml.put_datafeed.js b/api/api/ml.put_datafeed.js index 79d2ccb44..2de0baa75 100644 --- a/api/api/ml.put_datafeed.js +++ b/api/api/ml.put_datafeed.js @@ -52,15 +52,6 @@ function buildMlPutDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPutDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.put_filter.js b/api/api/ml.put_filter.js index 1daf4f649..057f71e1e 100644 --- a/api/api/ml.put_filter.js +++ b/api/api/ml.put_filter.js @@ -52,15 +52,6 @@ function buildMlPutFilter (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPutFilter(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') diff --git a/api/api/ml.put_job.js b/api/api/ml.put_job.js index ecb1fc0ce..0aa4a256e 100644 --- a/api/api/ml.put_job.js +++ b/api/api/ml.put_job.js @@ -52,15 +52,6 @@ function buildMlPutJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlPutJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.revert_model_snapshot.js b/api/api/ml.revert_model_snapshot.js index e79441be2..41ff3c13b 100644 --- a/api/api/ml.revert_model_snapshot.js +++ b/api/api/ml.revert_model_snapshot.js @@ -54,15 +54,6 @@ function buildMlRevertModelSnapshot (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlRevertModelSnapshot(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.set_upgrade_mode.js b/api/api/ml.set_upgrade_mode.js index df3eb2d4e..57a4df4d1 100644 --- a/api/api/ml.set_upgrade_mode.js +++ b/api/api/ml.set_upgrade_mode.js @@ -53,15 +53,6 @@ function buildMlSetUpgradeMode (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlSetUpgradeMode(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ml.start_datafeed.js b/api/api/ml.start_datafeed.js index 90b0ddfa9..1c11f9f31 100644 --- a/api/api/ml.start_datafeed.js +++ b/api/api/ml.start_datafeed.js @@ -57,15 +57,6 @@ function buildMlStartDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlStartDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.stop_datafeed.js b/api/api/ml.stop_datafeed.js index c6e472472..f845de47a 100644 --- a/api/api/ml.stop_datafeed.js +++ b/api/api/ml.stop_datafeed.js @@ -57,15 +57,6 @@ function buildMlStopDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlStopDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.update_datafeed.js b/api/api/ml.update_datafeed.js index f098b5fd9..486a2b881 100644 --- a/api/api/ml.update_datafeed.js +++ b/api/api/ml.update_datafeed.js @@ -52,15 +52,6 @@ function buildMlUpdateDatafeed (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlUpdateDatafeed(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['datafeed_id'] == null && params['datafeedId'] == null) { const err = new ConfigurationError('Missing required parameter: datafeed_id or datafeedId') diff --git a/api/api/ml.update_filter.js b/api/api/ml.update_filter.js index b7a98d1d2..0b203684d 100644 --- a/api/api/ml.update_filter.js +++ b/api/api/ml.update_filter.js @@ -52,15 +52,6 @@ function buildMlUpdateFilter (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlUpdateFilter(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['filter_id'] == null && params['filterId'] == null) { const err = new ConfigurationError('Missing required parameter: filter_id or filterId') diff --git a/api/api/ml.update_job.js b/api/api/ml.update_job.js index 2b44c2204..2e9617666 100644 --- a/api/api/ml.update_job.js +++ b/api/api/ml.update_job.js @@ -52,15 +52,6 @@ function buildMlUpdateJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlUpdateJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.update_model_snapshot.js b/api/api/ml.update_model_snapshot.js index b450e88cd..7e80fa05b 100644 --- a/api/api/ml.update_model_snapshot.js +++ b/api/api/ml.update_model_snapshot.js @@ -53,15 +53,6 @@ function buildMlUpdateModelSnapshot (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlUpdateModelSnapshot(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['job_id'] == null && params['jobId'] == null) { const err = new ConfigurationError('Missing required parameter: job_id or jobId') diff --git a/api/api/ml.validate.js b/api/api/ml.validate.js index d27708111..61b6da7c7 100644 --- a/api/api/ml.validate.js +++ b/api/api/ml.validate.js @@ -51,15 +51,6 @@ function buildMlValidate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlValidate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/ml.validate_detector.js b/api/api/ml.validate_detector.js index aa6c57d7c..8b00f4597 100644 --- a/api/api/ml.validate_detector.js +++ b/api/api/ml.validate_detector.js @@ -51,15 +51,6 @@ function buildMlValidateDetector (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mlValidateDetector(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/monitoring.bulk.js b/api/api/monitoring.bulk.js index 150cefbc7..ff488720b 100644 --- a/api/api/monitoring.bulk.js +++ b/api/api/monitoring.bulk.js @@ -59,15 +59,6 @@ function buildMonitoringBulk (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - monitoringBulk(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/msearch.js b/api/api/msearch.js index 7e11d2166..a4615c4fb 100644 --- a/api/api/msearch.js +++ b/api/api/msearch.js @@ -79,15 +79,6 @@ function buildMsearch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - msearch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js index e6596d60b..1692f567f 100644 --- a/api/api/msearch_template.js +++ b/api/api/msearch_template.js @@ -73,15 +73,6 @@ function buildMsearchTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - msearchTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js index 3937b1f19..fe4c49a6e 100644 --- a/api/api/mtermvectors.js +++ b/api/api/mtermvectors.js @@ -87,15 +87,6 @@ function buildMtermvectors (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - mtermvectors(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required url components if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') diff --git a/api/api/nodes.hot_threads.js b/api/api/nodes.hot_threads.js index 41ed47bdd..12f59399c 100644 --- a/api/api/nodes.hot_threads.js +++ b/api/api/nodes.hot_threads.js @@ -69,15 +69,6 @@ function buildNodesHotThreads (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - nodesHotThreads(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/nodes.info.js b/api/api/nodes.info.js index 27e538dc2..4179dd155 100644 --- a/api/api/nodes.info.js +++ b/api/api/nodes.info.js @@ -62,15 +62,6 @@ function buildNodesInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - nodesInfo(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/nodes.reload_secure_settings.js b/api/api/nodes.reload_secure_settings.js index cddf57967..53f6a6a1a 100644 --- a/api/api/nodes.reload_secure_settings.js +++ b/api/api/nodes.reload_secure_settings.js @@ -58,15 +58,6 @@ function buildNodesReloadSecureSettings (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - nodesReloadSecureSettings(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/nodes.stats.js b/api/api/nodes.stats.js index f1025146e..4553511fd 100644 --- a/api/api/nodes.stats.js +++ b/api/api/nodes.stats.js @@ -77,15 +77,6 @@ function buildNodesStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - nodesStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/nodes.usage.js b/api/api/nodes.usage.js index 9c2fde766..308a6645b 100644 --- a/api/api/nodes.usage.js +++ b/api/api/nodes.usage.js @@ -59,15 +59,6 @@ function buildNodesUsage (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - nodesUsage(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/ping.js b/api/api/ping.js index c4f8f8fc0..71192c360 100644 --- a/api/api/ping.js +++ b/api/api/ping.js @@ -55,15 +55,6 @@ function buildPing (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/put_script.js b/api/api/put_script.js index 48418aba7..bad10957b 100644 --- a/api/api/put_script.js +++ b/api/api/put_script.js @@ -65,15 +65,6 @@ function buildPutScript (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - putScript(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js index abfc4b552..a32132466 100644 --- a/api/api/rank_eval.js +++ b/api/api/rank_eval.js @@ -66,15 +66,6 @@ function buildRankEval (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rankEval(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/reindex.js b/api/api/reindex.js index 571bbfc03..44949d112 100644 --- a/api/api/reindex.js +++ b/api/api/reindex.js @@ -73,15 +73,6 @@ function buildReindex (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - reindex(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js index 1dffd3eeb..605a2ea83 100644 --- a/api/api/reindex_rethrottle.js +++ b/api/api/reindex_rethrottle.js @@ -59,15 +59,6 @@ function buildReindexRethrottle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - reindexRethrottle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js index 16bae3358..59bcab0b1 100644 --- a/api/api/render_search_template.js +++ b/api/api/render_search_template.js @@ -57,15 +57,6 @@ function buildRenderSearchTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - renderSearchTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/rollup.delete_job.js b/api/api/rollup.delete_job.js index d19a7daee..353c35094 100644 --- a/api/api/rollup.delete_job.js +++ b/api/api/rollup.delete_job.js @@ -51,15 +51,6 @@ function buildRollupDeleteJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupDeleteJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/rollup.get_jobs.js b/api/api/rollup.get_jobs.js index b8d9c96d3..e88e8a8ef 100644 --- a/api/api/rollup.get_jobs.js +++ b/api/api/rollup.get_jobs.js @@ -51,15 +51,6 @@ function buildRollupGetJobs (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupGetJobs(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/rollup.get_rollup_caps.js b/api/api/rollup.get_rollup_caps.js index a57802471..aec85ccfa 100644 --- a/api/api/rollup.get_rollup_caps.js +++ b/api/api/rollup.get_rollup_caps.js @@ -51,15 +51,6 @@ function buildRollupGetRollupCaps (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupGetRollupCaps(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/rollup.get_rollup_index_caps.js b/api/api/rollup.get_rollup_index_caps.js index c67754c53..1cf85f7c3 100644 --- a/api/api/rollup.get_rollup_index_caps.js +++ b/api/api/rollup.get_rollup_index_caps.js @@ -51,15 +51,6 @@ function buildRollupGetRollupIndexCaps (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupGetRollupIndexCaps(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/rollup.put_job.js b/api/api/rollup.put_job.js index 81727e1e1..5db700e80 100644 --- a/api/api/rollup.put_job.js +++ b/api/api/rollup.put_job.js @@ -52,15 +52,6 @@ function buildRollupPutJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupPutJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/rollup.rollup_search.js b/api/api/rollup.rollup_search.js index ea0b6d2ed..78094e181 100644 --- a/api/api/rollup.rollup_search.js +++ b/api/api/rollup.rollup_search.js @@ -57,15 +57,6 @@ function buildRollupRollupSearch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupRollupSearch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/rollup.start_job.js b/api/api/rollup.start_job.js index eb6d945c8..48abec711 100644 --- a/api/api/rollup.start_job.js +++ b/api/api/rollup.start_job.js @@ -51,15 +51,6 @@ function buildRollupStartJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupStartJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/rollup.stop_job.js b/api/api/rollup.stop_job.js index 99413dc59..1aa07fa2d 100644 --- a/api/api/rollup.stop_job.js +++ b/api/api/rollup.stop_job.js @@ -55,15 +55,6 @@ function buildRollupStopJob (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - rollupStopJob(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js index 70ae75336..3a2785063 100644 --- a/api/api/scripts_painless_execute.js +++ b/api/api/scripts_painless_execute.js @@ -56,15 +56,6 @@ function buildScriptsPainlessExecute (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - scriptsPainlessExecute(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/scroll.js b/api/api/scroll.js index d60c648ef..0bfd11aff 100644 --- a/api/api/scroll.js +++ b/api/api/scroll.js @@ -65,15 +65,6 @@ function buildScroll (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - scroll(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/search.js b/api/api/search.js index 8c364d3d5..c7c08cd8d 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -169,15 +169,6 @@ function buildSearch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - search(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required url components if (params['type'] != null && (params['index'] == null)) { const err = new ConfigurationError('Missing required parameter of the url: index') diff --git a/api/api/search_shards.js b/api/api/search_shards.js index 86e091bc1..43eed2ed8 100644 --- a/api/api/search_shards.js +++ b/api/api/search_shards.js @@ -71,15 +71,6 @@ function buildSearchShards (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - searchShards(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/search_template.js b/api/api/search_template.js index 63a0305a1..aadc63aaf 100644 --- a/api/api/search_template.js +++ b/api/api/search_template.js @@ -92,15 +92,6 @@ function buildSearchTemplate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - searchTemplate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.authenticate.js b/api/api/security.authenticate.js index d594b8fa3..747b7718c 100644 --- a/api/api/security.authenticate.js +++ b/api/api/security.authenticate.js @@ -50,15 +50,6 @@ function buildSecurityAuthenticate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityAuthenticate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.change_password.js b/api/api/security.change_password.js index dd5d315d2..b0a9ed5d0 100644 --- a/api/api/security.change_password.js +++ b/api/api/security.change_password.js @@ -53,15 +53,6 @@ function buildSecurityChangePassword (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityChangePassword(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.clear_cached_realms.js b/api/api/security.clear_cached_realms.js index ffeacab4a..8cd3bf99b 100644 --- a/api/api/security.clear_cached_realms.js +++ b/api/api/security.clear_cached_realms.js @@ -52,15 +52,6 @@ function buildSecurityClearCachedRealms (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityClearCachedRealms(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['realms'] == null) { const err = new ConfigurationError('Missing required parameter: realms') diff --git a/api/api/security.clear_cached_roles.js b/api/api/security.clear_cached_roles.js index 7cc7e7fb1..41de57377 100644 --- a/api/api/security.clear_cached_roles.js +++ b/api/api/security.clear_cached_roles.js @@ -51,15 +51,6 @@ function buildSecurityClearCachedRoles (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityClearCachedRoles(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/security.create_api_key.js b/api/api/security.create_api_key.js index ecdcac135..bb5e69379 100644 --- a/api/api/security.create_api_key.js +++ b/api/api/security.create_api_key.js @@ -52,15 +52,6 @@ function buildSecurityCreateApiKey (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityCreateApiKey(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.delete_privileges.js b/api/api/security.delete_privileges.js index 72aef6928..9cfd26d1c 100644 --- a/api/api/security.delete_privileges.js +++ b/api/api/security.delete_privileges.js @@ -53,15 +53,6 @@ function buildSecurityDeletePrivileges (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityDeletePrivileges(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['application'] == null) { const err = new ConfigurationError('Missing required parameter: application') diff --git a/api/api/security.delete_role.js b/api/api/security.delete_role.js index a72ae6722..6fb2d0496 100644 --- a/api/api/security.delete_role.js +++ b/api/api/security.delete_role.js @@ -52,15 +52,6 @@ function buildSecurityDeleteRole (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityDeleteRole(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/security.delete_role_mapping.js b/api/api/security.delete_role_mapping.js index 780435a4d..700d76f4f 100644 --- a/api/api/security.delete_role_mapping.js +++ b/api/api/security.delete_role_mapping.js @@ -52,15 +52,6 @@ function buildSecurityDeleteRoleMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityDeleteRoleMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/security.delete_user.js b/api/api/security.delete_user.js index 802c6b61a..7fb437fe2 100644 --- a/api/api/security.delete_user.js +++ b/api/api/security.delete_user.js @@ -52,15 +52,6 @@ function buildSecurityDeleteUser (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityDeleteUser(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') diff --git a/api/api/security.disable_user.js b/api/api/security.disable_user.js index fdc3817f1..a15e13b2a 100644 --- a/api/api/security.disable_user.js +++ b/api/api/security.disable_user.js @@ -52,15 +52,6 @@ function buildSecurityDisableUser (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityDisableUser(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') diff --git a/api/api/security.enable_user.js b/api/api/security.enable_user.js index 4ce4daaac..f13274d71 100644 --- a/api/api/security.enable_user.js +++ b/api/api/security.enable_user.js @@ -52,15 +52,6 @@ function buildSecurityEnableUser (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityEnableUser(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') diff --git a/api/api/security.get_api_key.js b/api/api/security.get_api_key.js index 720748cfc..9a82ec39e 100644 --- a/api/api/security.get_api_key.js +++ b/api/api/security.get_api_key.js @@ -57,15 +57,6 @@ function buildSecurityGetApiKey (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetApiKey(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.get_privileges.js b/api/api/security.get_privileges.js index d12d76fbe..ef4045ff1 100644 --- a/api/api/security.get_privileges.js +++ b/api/api/security.get_privileges.js @@ -52,15 +52,6 @@ function buildSecurityGetPrivileges (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetPrivileges(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.get_role.js b/api/api/security.get_role.js index 79d2cfa8d..d2b433f1d 100644 --- a/api/api/security.get_role.js +++ b/api/api/security.get_role.js @@ -51,15 +51,6 @@ function buildSecurityGetRole (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetRole(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.get_role_mapping.js b/api/api/security.get_role_mapping.js index 3e21061a8..1c3e2287c 100644 --- a/api/api/security.get_role_mapping.js +++ b/api/api/security.get_role_mapping.js @@ -51,15 +51,6 @@ function buildSecurityGetRoleMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetRoleMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.get_token.js b/api/api/security.get_token.js index eba728309..6e3245b62 100644 --- a/api/api/security.get_token.js +++ b/api/api/security.get_token.js @@ -51,15 +51,6 @@ function buildSecurityGetToken (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetToken(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.get_user.js b/api/api/security.get_user.js index 736fb11ec..abedf7cc5 100644 --- a/api/api/security.get_user.js +++ b/api/api/security.get_user.js @@ -51,15 +51,6 @@ function buildSecurityGetUser (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetUser(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.get_user_privileges.js b/api/api/security.get_user_privileges.js index 3979a39a5..4b489297b 100644 --- a/api/api/security.get_user_privileges.js +++ b/api/api/security.get_user_privileges.js @@ -50,15 +50,6 @@ function buildSecurityGetUserPrivileges (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityGetUserPrivileges(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/security.has_privileges.js b/api/api/security.has_privileges.js index 6dfb8371d..ba46e6fde 100644 --- a/api/api/security.has_privileges.js +++ b/api/api/security.has_privileges.js @@ -52,15 +52,6 @@ function buildSecurityHasPrivileges (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityHasPrivileges(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.invalidate_api_key.js b/api/api/security.invalidate_api_key.js index c37d9a513..f32685f97 100644 --- a/api/api/security.invalidate_api_key.js +++ b/api/api/security.invalidate_api_key.js @@ -51,15 +51,6 @@ function buildSecurityInvalidateApiKey (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityInvalidateApiKey(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.invalidate_token.js b/api/api/security.invalidate_token.js index e76bd68de..0e891bf38 100644 --- a/api/api/security.invalidate_token.js +++ b/api/api/security.invalidate_token.js @@ -51,15 +51,6 @@ function buildSecurityInvalidateToken (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityInvalidateToken(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.put_privileges.js b/api/api/security.put_privileges.js index e0d02ad17..c20c25a91 100644 --- a/api/api/security.put_privileges.js +++ b/api/api/security.put_privileges.js @@ -52,15 +52,6 @@ function buildSecurityPutPrivileges (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityPutPrivileges(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/security.put_role.js b/api/api/security.put_role.js index 8f44f7551..3becd8b55 100644 --- a/api/api/security.put_role.js +++ b/api/api/security.put_role.js @@ -53,15 +53,6 @@ function buildSecurityPutRole (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityPutRole(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/security.put_role_mapping.js b/api/api/security.put_role_mapping.js index c96026823..cd40cbad1 100644 --- a/api/api/security.put_role_mapping.js +++ b/api/api/security.put_role_mapping.js @@ -53,15 +53,6 @@ function buildSecurityPutRoleMapping (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityPutRoleMapping(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['name'] == null) { const err = new ConfigurationError('Missing required parameter: name') diff --git a/api/api/security.put_user.js b/api/api/security.put_user.js index 088bacde1..73e1e6722 100644 --- a/api/api/security.put_user.js +++ b/api/api/security.put_user.js @@ -53,15 +53,6 @@ function buildSecurityPutUser (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - securityPutUser(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['username'] == null) { const err = new ConfigurationError('Missing required parameter: username') diff --git a/api/api/snapshot.create.js b/api/api/snapshot.create.js index 543f5c47c..e1aa00e93 100644 --- a/api/api/snapshot.create.js +++ b/api/api/snapshot.create.js @@ -64,15 +64,6 @@ function buildSnapshotCreate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotCreate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.create_repository.js b/api/api/snapshot.create_repository.js index c924aa4ab..ff1c1f80c 100644 --- a/api/api/snapshot.create_repository.js +++ b/api/api/snapshot.create_repository.js @@ -64,15 +64,6 @@ function buildSnapshotCreateRepository (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotCreateRepository(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.delete.js b/api/api/snapshot.delete.js index 441de2c68..22f309ae7 100644 --- a/api/api/snapshot.delete.js +++ b/api/api/snapshot.delete.js @@ -60,15 +60,6 @@ function buildSnapshotDelete (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotDelete(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.delete_repository.js b/api/api/snapshot.delete_repository.js index 1180ee8d4..0316765cd 100644 --- a/api/api/snapshot.delete_repository.js +++ b/api/api/snapshot.delete_repository.js @@ -61,15 +61,6 @@ function buildSnapshotDeleteRepository (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotDeleteRepository(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.get.js b/api/api/snapshot.get.js index 10115993c..f3b4243f6 100644 --- a/api/api/snapshot.get.js +++ b/api/api/snapshot.get.js @@ -65,15 +65,6 @@ function buildSnapshotGet (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotGet(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.get_repository.js b/api/api/snapshot.get_repository.js index 5ddafea21..f825b04a0 100644 --- a/api/api/snapshot.get_repository.js +++ b/api/api/snapshot.get_repository.js @@ -61,15 +61,6 @@ function buildSnapshotGetRepository (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotGetRepository(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/snapshot.restore.js b/api/api/snapshot.restore.js index 0c43c5352..7df0ac952 100644 --- a/api/api/snapshot.restore.js +++ b/api/api/snapshot.restore.js @@ -64,15 +64,6 @@ function buildSnapshotRestore (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotRestore(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/snapshot.status.js b/api/api/snapshot.status.js index d5533d1e0..d0820b6c6 100644 --- a/api/api/snapshot.status.js +++ b/api/api/snapshot.status.js @@ -63,15 +63,6 @@ function buildSnapshotStatus (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotStatus(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/snapshot.verify_repository.js b/api/api/snapshot.verify_repository.js index 58d28a419..ea23febc8 100644 --- a/api/api/snapshot.verify_repository.js +++ b/api/api/snapshot.verify_repository.js @@ -61,15 +61,6 @@ function buildSnapshotVerifyRepository (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - snapshotVerifyRepository(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['repository'] == null) { const err = new ConfigurationError('Missing required parameter: repository') diff --git a/api/api/sql.clear_cursor.js b/api/api/sql.clear_cursor.js index 7355413c8..0dac8e9b5 100644 --- a/api/api/sql.clear_cursor.js +++ b/api/api/sql.clear_cursor.js @@ -51,15 +51,6 @@ function buildSqlClearCursor (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - sqlClearCursor(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/sql.query.js b/api/api/sql.query.js index 26b0bd993..0eb23acc2 100644 --- a/api/api/sql.query.js +++ b/api/api/sql.query.js @@ -52,15 +52,6 @@ function buildSqlQuery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - sqlQuery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/sql.translate.js b/api/api/sql.translate.js index 613588c40..be1325763 100644 --- a/api/api/sql.translate.js +++ b/api/api/sql.translate.js @@ -51,15 +51,6 @@ function buildSqlTranslate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - sqlTranslate(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['body'] == null) { const err = new ConfigurationError('Missing required parameter: body') diff --git a/api/api/ssl.certificates.js b/api/api/ssl.certificates.js index 77a10aedc..28f8fc9f7 100644 --- a/api/api/ssl.certificates.js +++ b/api/api/ssl.certificates.js @@ -50,15 +50,6 @@ function buildSslCertificates (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - sslCertificates(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/tasks.cancel.js b/api/api/tasks.cancel.js index 9fe7143dc..3d3dd5d3e 100644 --- a/api/api/tasks.cancel.js +++ b/api/api/tasks.cancel.js @@ -63,15 +63,6 @@ function buildTasksCancel (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - tasksCancel(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/tasks.get.js b/api/api/tasks.get.js index c485510bb..426fe46af 100644 --- a/api/api/tasks.get.js +++ b/api/api/tasks.get.js @@ -61,15 +61,6 @@ function buildTasksGet (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - tasksGet(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') diff --git a/api/api/tasks.list.js b/api/api/tasks.list.js index 66335f50a..57f170927 100644 --- a/api/api/tasks.list.js +++ b/api/api/tasks.list.js @@ -72,15 +72,6 @@ function buildTasksList (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - tasksList(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/termvectors.js b/api/api/termvectors.js index 45c2c157d..2571b64fd 100644 --- a/api/api/termvectors.js +++ b/api/api/termvectors.js @@ -86,15 +86,6 @@ function buildTermvectors (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - termvectors(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/update.js b/api/api/update.js index dbebf10cd..3a4f6120d 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -89,15 +89,6 @@ function buildUpdate (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - update(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index aeef807a4..ab41dcf72 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -142,15 +142,6 @@ function buildUpdateByQuery (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - updateByQuery(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['index'] == null) { const err = new ConfigurationError('Missing required parameter: index') diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js index 563fce717..2937a00d1 100644 --- a/api/api/update_by_query_rethrottle.js +++ b/api/api/update_by_query_rethrottle.js @@ -59,15 +59,6 @@ function buildUpdateByQueryRethrottle (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - updateByQueryRethrottle(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['task_id'] == null && params['taskId'] == null) { const err = new ConfigurationError('Missing required parameter: task_id or taskId') diff --git a/api/api/watcher.ack_watch.js b/api/api/watcher.ack_watch.js index d6c96ea70..d7158969f 100644 --- a/api/api/watcher.ack_watch.js +++ b/api/api/watcher.ack_watch.js @@ -52,15 +52,6 @@ function buildWatcherAckWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherAckWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') diff --git a/api/api/watcher.activate_watch.js b/api/api/watcher.activate_watch.js index ebc06ed75..8012179d2 100644 --- a/api/api/watcher.activate_watch.js +++ b/api/api/watcher.activate_watch.js @@ -51,15 +51,6 @@ function buildWatcherActivateWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherActivateWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') diff --git a/api/api/watcher.deactivate_watch.js b/api/api/watcher.deactivate_watch.js index e2290027e..cd7cfa9bf 100644 --- a/api/api/watcher.deactivate_watch.js +++ b/api/api/watcher.deactivate_watch.js @@ -51,15 +51,6 @@ function buildWatcherDeactivateWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherDeactivateWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['watch_id'] == null && params['watchId'] == null) { const err = new ConfigurationError('Missing required parameter: watch_id or watchId') diff --git a/api/api/watcher.delete_watch.js b/api/api/watcher.delete_watch.js index 090717cf4..c126fea0c 100644 --- a/api/api/watcher.delete_watch.js +++ b/api/api/watcher.delete_watch.js @@ -51,15 +51,6 @@ function buildWatcherDeleteWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherDeleteWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/watcher.execute_watch.js b/api/api/watcher.execute_watch.js index 96d2f5a02..633797a5d 100644 --- a/api/api/watcher.execute_watch.js +++ b/api/api/watcher.execute_watch.js @@ -53,15 +53,6 @@ function buildWatcherExecuteWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherExecuteWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // validate headers object if (options.headers != null && typeof options.headers !== 'object') { const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) diff --git a/api/api/watcher.get_watch.js b/api/api/watcher.get_watch.js index 1028d7db1..807ec2643 100644 --- a/api/api/watcher.get_watch.js +++ b/api/api/watcher.get_watch.js @@ -51,15 +51,6 @@ function buildWatcherGetWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherGetWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/watcher.put_watch.js b/api/api/watcher.put_watch.js index b23620a8d..4f6d1d701 100644 --- a/api/api/watcher.put_watch.js +++ b/api/api/watcher.put_watch.js @@ -60,15 +60,6 @@ function buildWatcherPutWatch (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherPutWatch(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params['id'] == null) { const err = new ConfigurationError('Missing required parameter: id') diff --git a/api/api/watcher.start.js b/api/api/watcher.start.js index cf6e5df84..5cd32357c 100644 --- a/api/api/watcher.start.js +++ b/api/api/watcher.start.js @@ -50,15 +50,6 @@ function buildWatcherStart (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherStart(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/watcher.stats.js b/api/api/watcher.stats.js index c89cc4cbb..efdae5e0d 100644 --- a/api/api/watcher.stats.js +++ b/api/api/watcher.stats.js @@ -54,15 +54,6 @@ function buildWatcherStats (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherStats(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/watcher.stop.js b/api/api/watcher.stop.js index a69519b53..18cb40f9e 100644 --- a/api/api/watcher.stop.js +++ b/api/api/watcher.stop.js @@ -50,15 +50,6 @@ function buildWatcherStop (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - watcherStop(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/xpack.info.js b/api/api/xpack.info.js index 49024007e..13cefe3b2 100644 --- a/api/api/xpack.info.js +++ b/api/api/xpack.info.js @@ -51,15 +51,6 @@ function buildXpackInfo (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - xpackInfo(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') diff --git a/api/api/xpack.usage.js b/api/api/xpack.usage.js index 3fa432afa..50cd02732 100644 --- a/api/api/xpack.usage.js +++ b/api/api/xpack.usage.js @@ -51,15 +51,6 @@ function buildXpackUsage (opts) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - xpackUsage(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - // check required parameters if (params.body != null) { const err = new ConfigurationError('This API does not require a body') From 3c3f855f67000a174893bc2797556eb1ccdbbfcb Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 27 Mar 2019 19:22:56 +0100 Subject: [PATCH 6/6] Follow-up #790 --- scripts/utils/generate.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/utils/generate.js b/scripts/utils/generate.js index a6410b5cf..33fd4eded 100644 --- a/scripts/utils/generate.js +++ b/scripts/utils/generate.js @@ -108,15 +108,6 @@ function generate (spec, common) { options = {} } - // promises support - if (callback == null) { - return new Promise((resolve, reject) => { - ${safeWords(name)}(params, options, (err, body) => { - err ? reject(err) : resolve(body) - }) - }) - } - ${genRequiredChecks()} ${genUrlValidation(paths, api)}