diff --git a/api/api/cat.aliases.js b/api/api/cat.aliases.js index a291a4629..a706265dd 100644 --- a/api/api/cat.aliases.js +++ b/api/api/cat.aliases.js @@ -14,7 +14,6 @@ function buildCatAliases (opts) { const acceptedQuerystring = [ 'format', 'local', - 'master_timeout', 'h', 'help', 's', @@ -27,7 +26,6 @@ function buildCatAliases (opts) { ] const snakeCase = { - masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/cat.count.js b/api/api/cat.count.js index 7578a3259..10cf6fd2c 100644 --- a/api/api/cat.count.js +++ b/api/api/cat.count.js @@ -13,8 +13,6 @@ function buildCatCount (opts) { const acceptedQuerystring = [ 'format', - 'local', - 'master_timeout', 'h', 'help', 's', @@ -27,7 +25,6 @@ function buildCatCount (opts) { ] const snakeCase = { - masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/cat.fielddata.js b/api/api/cat.fielddata.js index 6a058e46f..e8767eb00 100644 --- a/api/api/cat.fielddata.js +++ b/api/api/cat.fielddata.js @@ -14,8 +14,6 @@ function buildCatFielddata (opts) { const acceptedQuerystring = [ 'format', 'bytes', - 'local', - 'master_timeout', 'h', 'help', 's', @@ -29,7 +27,6 @@ function buildCatFielddata (opts) { ] const snakeCase = { - masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/cat.health.js b/api/api/cat.health.js index e6b99d266..c655333e7 100644 --- a/api/api/cat.health.js +++ b/api/api/cat.health.js @@ -13,11 +13,10 @@ function buildCatHealth (opts) { const acceptedQuerystring = [ 'format', - 'local', - 'master_timeout', 'h', 'help', 's', + 'time', 'ts', 'v', 'pretty', @@ -28,7 +27,6 @@ function buildCatHealth (opts) { ] const snakeCase = { - masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/cat.indices.js b/api/api/cat.indices.js index 6bbcd49cc..cf5876aff 100644 --- a/api/api/cat.indices.js +++ b/api/api/cat.indices.js @@ -21,6 +21,7 @@ function buildCatIndices (opts) { 'help', 'pri', 's', + 'time', 'v', 'include_unloaded_segments', 'pretty', diff --git a/api/api/cat.nodes.js b/api/api/cat.nodes.js index 8c7beed6f..01923de06 100644 --- a/api/api/cat.nodes.js +++ b/api/api/cat.nodes.js @@ -12,6 +12,7 @@ function buildCatNodes (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ + 'bytes', 'format', 'full_id', 'local', @@ -19,6 +20,7 @@ function buildCatNodes (opts) { 'h', 'help', 's', + 'time', 'v', 'pretty', 'human', diff --git a/api/api/cat.pending_tasks.js b/api/api/cat.pending_tasks.js index f97e120b3..10f6b5ab0 100644 --- a/api/api/cat.pending_tasks.js +++ b/api/api/cat.pending_tasks.js @@ -18,6 +18,7 @@ function buildCatPendingTasks (opts) { 'h', 'help', 's', + 'time', 'v', 'pretty', 'human', diff --git a/api/api/cat.recovery.js b/api/api/cat.recovery.js index 85c779024..7a75f6433 100644 --- a/api/api/cat.recovery.js +++ b/api/api/cat.recovery.js @@ -16,11 +16,11 @@ function buildCatRecovery (opts) { 'active_only', 'bytes', 'detailed', - 'master_timeout', 'h', 'help', 'index', 's', + 'time', 'v', 'pretty', 'human', @@ -31,7 +31,6 @@ function buildCatRecovery (opts) { const snakeCase = { activeOnly: 'active_only', - masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/cat.shards.js b/api/api/cat.shards.js index 551488839..634d78cd0 100644 --- a/api/api/cat.shards.js +++ b/api/api/cat.shards.js @@ -19,6 +19,7 @@ function buildCatShards (opts) { 'h', 'help', 's', + 'time', 'v', 'pretty', 'human', diff --git a/api/api/cat.snapshots.js b/api/api/cat.snapshots.js index 22809b988..78d8921b9 100644 --- a/api/api/cat.snapshots.js +++ b/api/api/cat.snapshots.js @@ -18,6 +18,7 @@ function buildCatSnapshots (opts) { 'h', 'help', 's', + 'time', 'v', 'pretty', 'human', diff --git a/api/api/cat.tasks.js b/api/api/cat.tasks.js index c84a22797..1e0eda879 100644 --- a/api/api/cat.tasks.js +++ b/api/api/cat.tasks.js @@ -20,6 +20,7 @@ function buildCatTasks (opts) { 'h', 'help', 's', + 'time', 'v', 'pretty', 'human', diff --git a/api/api/ccr.pause_auto_follow_pattern.js b/api/api/ccr.pause_auto_follow_pattern.js new file mode 100644 index 000000000..5782467f9 --- /dev/null +++ b/api/api/ccr.pause_auto_follow_pattern.js @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildCcrPauseAutoFollowPattern (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a ccr.pause_auto_follow_pattern request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-pause-auto-follow-pattern.html + */ + return function ccrPauseAutoFollowPattern (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['name'] == null) { + const err = new ConfigurationError('Missing required parameter: name') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildCcrPauseAutoFollowPattern diff --git a/api/api/ccr.resume_auto_follow_pattern.js b/api/api/ccr.resume_auto_follow_pattern.js new file mode 100644 index 000000000..d8adf6dc0 --- /dev/null +++ b/api/api/ccr.resume_auto_follow_pattern.js @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildCcrResumeAutoFollowPattern (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a ccr.resume_auto_follow_pattern request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-resume-auto-follow-pattern.html + */ + return function ccrResumeAutoFollowPattern (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['name'] == null) { + const err = new ConfigurationError('Missing required parameter: name') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildCcrResumeAutoFollowPattern diff --git a/api/api/data_frame_transform_deprecated.delete_transform.js b/api/api/data_frame_transform_deprecated.delete_transform.js new file mode 100644 index 000000000..beaf9a387 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.delete_transform.js @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedDeleteTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'force' + ] + + const snakeCase = { + + } + + /** + * Perform a data_frame_transform_deprecated.delete_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-transform.html + */ + return function dataFrameTransformDeprecatedDeleteTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'DELETE' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedDeleteTransform diff --git a/api/api/data_frame_transform_deprecated.get_transform.js b/api/api/data_frame_transform_deprecated.get_transform.js new file mode 100644 index 000000000..a2eb48f66 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.get_transform.js @@ -0,0 +1,73 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedGetTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'from', + 'size', + 'allow_no_match' + ] + + const snakeCase = { + allowNoMatch: 'allow_no_match' + } + + /** + * Perform a data_frame_transform_deprecated.get_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform.html + */ + return function dataFrameTransformDeprecatedGetTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // 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 = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'GET' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedGetTransform diff --git a/api/api/data_frame_transform_deprecated.get_transform_stats.js b/api/api/data_frame_transform_deprecated.get_transform_stats.js new file mode 100644 index 000000000..fa23121a3 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.get_transform_stats.js @@ -0,0 +1,79 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedGetTransformStats (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'from', + 'size', + 'allow_no_match' + ] + + const snakeCase = { + allowNoMatch: 'allow_no_match' + } + + /** + * Perform a data_frame_transform_deprecated.get_transform_stats request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-stats.html + */ + return function dataFrameTransformDeprecatedGetTransformStats (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'GET' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats' + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedGetTransformStats diff --git a/api/api/data_frame_transform_deprecated.preview_transform.js b/api/api/data_frame_transform_deprecated.preview_transform.js new file mode 100644 index 000000000..24c26c166 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.preview_transform.js @@ -0,0 +1,74 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedPreviewTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a data_frame_transform_deprecated.preview_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + */ + return function dataFrameTransformDeprecatedPreviewTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + 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') { + const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedPreviewTransform diff --git a/api/api/data_frame_transform_deprecated.put_transform.js b/api/api/data_frame_transform_deprecated.put_transform.js new file mode 100644 index 000000000..e57e8f04e --- /dev/null +++ b/api/api/data_frame_transform_deprecated.put_transform.js @@ -0,0 +1,81 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedPutTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'defer_validation' + ] + + const snakeCase = { + deferValidation: 'defer_validation' + } + + /** + * Perform a data_frame_transform_deprecated.put_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/put-transform.html + */ + return function dataFrameTransformDeprecatedPutTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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') { + const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'PUT' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedPutTransform diff --git a/api/api/data_frame_transform_deprecated.start_transform.js b/api/api/data_frame_transform_deprecated.start_transform.js new file mode 100644 index 000000000..933e2bc28 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.start_transform.js @@ -0,0 +1,77 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedStartTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'timeout' + ] + + const snakeCase = { + + } + + /** + * Perform a data_frame_transform_deprecated.start_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/start-transform.html + */ + return function dataFrameTransformDeprecatedStartTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedStartTransform diff --git a/api/api/data_frame_transform_deprecated.stop_transform.js b/api/api/data_frame_transform_deprecated.stop_transform.js new file mode 100644 index 000000000..fcc8a0140 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.stop_transform.js @@ -0,0 +1,80 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedStopTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'wait_for_completion', + 'timeout', + 'allow_no_match' + ] + + const snakeCase = { + waitForCompletion: 'wait_for_completion', + allowNoMatch: 'allow_no_match' + } + + /** + * Perform a data_frame_transform_deprecated.stop_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-transform.html + */ + return function dataFrameTransformDeprecatedStopTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedStopTransform diff --git a/api/api/data_frame_transform_deprecated.update_transform.js b/api/api/data_frame_transform_deprecated.update_transform.js new file mode 100644 index 000000000..3c276c974 --- /dev/null +++ b/api/api/data_frame_transform_deprecated.update_transform.js @@ -0,0 +1,81 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildDataFrameTransformDeprecatedUpdateTransform (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'defer_validation' + ] + + const snakeCase = { + deferValidation: 'defer_validation' + } + + /** + * Perform a data_frame_transform_deprecated.update_transform request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/update-transform.html + */ + return function dataFrameTransformDeprecatedUpdateTransform (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['transform_id'] == null && params['transformId'] == null) { + const err = new ConfigurationError('Missing required parameter: transform_id or transformId') + 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') { + const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, transformId, transform_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildDataFrameTransformDeprecatedUpdateTransform diff --git a/api/api/enrich.delete_policy.js b/api/api/enrich.delete_policy.js new file mode 100644 index 000000000..c2658df0a --- /dev/null +++ b/api/api/enrich.delete_policy.js @@ -0,0 +1,76 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildEnrichDeletePolicy (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a enrich.delete_policy request + */ + return function enrichDeletePolicy (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['name'] == null) { + const err = new ConfigurationError('Missing required parameter: name') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'DELETE' + path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildEnrichDeletePolicy diff --git a/api/api/enrich.execute_policy.js b/api/api/enrich.execute_policy.js new file mode 100644 index 000000000..61f09e411 --- /dev/null +++ b/api/api/enrich.execute_policy.js @@ -0,0 +1,76 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildEnrichExecutePolicy (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'wait_for_completion' + ] + + const snakeCase = { + waitForCompletion: 'wait_for_completion' + } + + /** + * Perform a enrich.execute_policy request + */ + return function enrichExecutePolicy (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['name'] == null) { + const err = new ConfigurationError('Missing required parameter: name') + 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}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'PUT' + path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildEnrichExecutePolicy diff --git a/api/api/enrich.get_policy.js b/api/api/enrich.get_policy.js new file mode 100644 index 000000000..4225e808b --- /dev/null +++ b/api/api/enrich.get_policy.js @@ -0,0 +1,75 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildEnrichGetPolicy (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a enrich.get_policy request + */ + return function enrichGetPolicy (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // 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 = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if ((name) != null) { + if (method == null) method = 'GET' + path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + } else { + if (method == null) method = 'GET' + path = '/' + '_enrich' + '/' + 'policy' + } + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildEnrichGetPolicy diff --git a/api/api/enrich.put_policy.js b/api/api/enrich.put_policy.js new file mode 100644 index 000000000..53830f100 --- /dev/null +++ b/api/api/enrich.put_policy.js @@ -0,0 +1,80 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildEnrichPutPolicy (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a enrich.put_policy request + */ + return function enrichPutPolicy (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // check required parameters + if (params['name'] == null) { + const err = new ConfigurationError('Missing required parameter: name') + 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') { + const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`) + return handleError(err, callback) + } + + var warnings = [] + var { method, body, name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'PUT' + path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildEnrichPutPolicy diff --git a/api/api/enrich.stats.js b/api/api/enrich.stats.js new file mode 100644 index 000000000..98d7cd7cf --- /dev/null +++ b/api/api/enrich.stats.js @@ -0,0 +1,70 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildEnrichStats (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a enrich.stats request + */ + return function enrichStats (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // 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 = [] + var { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'GET' + path = '/' + '_enrich' + '/' + '_stats' + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildEnrichStats diff --git a/api/api/get_script_context.js b/api/api/get_script_context.js new file mode 100644 index 000000000..67301b982 --- /dev/null +++ b/api/api/get_script_context.js @@ -0,0 +1,76 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildGetScriptContext (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + 'pretty', + 'human', + 'error_trace', + 'source', + 'filter_path' + ] + + const snakeCase = { + errorTrace: 'error_trace', + filterPath: 'filter_path' + } + + /** + * Perform a get_script_context request + * Returns all script contexts. + */ + return function getScriptContext (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // 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 = [] + var { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'GET' + path = '/' + '_script_context' + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildGetScriptContext diff --git a/api/api/index.js b/api/api/index.js index 6136772b9..334e60b1c 100644 --- a/api/api/index.js +++ b/api/api/index.js @@ -73,7 +73,7 @@ function buildIndex (opts) { } var warnings = [] - var { method, body, id, index, type, ...querystring } = params + var { method, body, id, index, ...querystring } = params querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) var ignore = options.ignore @@ -83,15 +83,9 @@ function buildIndex (opts) { var path = '' - if ((index) != null && (type) != null && (id) != null) { - if (method == null) method = 'PUT' - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) - } else if ((index) != null && (id) != null) { + if ((index) != null && (id) != null) { if (method == null) method = 'PUT' path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id) - } else if ((index) != null && (type) != null) { - if (method == null) method = 'POST' - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) } else { if (method == null) method = 'POST' path = '/' + encodeURIComponent(index) + '/' + '_doc' diff --git a/api/api/slm.execute_retention.js b/api/api/slm.execute_retention.js new file mode 100644 index 000000000..f23dfb5e2 --- /dev/null +++ b/api/api/slm.execute_retention.js @@ -0,0 +1,71 @@ +// Licensed to Elasticsearch B.V under one or more agreements. +// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. +// See the LICENSE file in the project root for more information + +'use strict' + +/* eslint camelcase: 0 */ +/* eslint no-unused-vars: 0 */ + +function buildSlmExecuteRetention (opts) { + // eslint-disable-next-line no-unused-vars + const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts + + const acceptedQuerystring = [ + + ] + + const snakeCase = { + + } + + /** + * Perform a slm.execute_retention request + * https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html + */ + return function slmExecuteRetention (params, options, callback) { + options = options || {} + if (typeof options === 'function') { + callback = options + options = {} + } + if (typeof params === 'function' || params == null) { + callback = params + params = {} + options = {} + } + + // 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 = [] + var { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) + + var ignore = options.ignore + if (typeof ignore === 'number') { + options.ignore = [ignore] + } + + var path = '' + + if (method == null) method = 'POST' + path = '/' + '_slm' + '/' + '_execute_retention' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + options.warnings = warnings.length === 0 ? null : warnings + return makeRequest(request, options, callback) + } +} + +module.exports = buildSlmExecuteRetention diff --git a/api/api/transform.delete_transform.js b/api/api/transform.delete_transform.js index 2942bd76c..043e3d13a 100644 --- a/api/api/transform.delete_transform.js +++ b/api/api/transform.delete_transform.js @@ -59,7 +59,7 @@ function buildTransformDeleteTransform (opts) { var path = '' if (method == null) method = 'DELETE' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) // build request object const request = { diff --git a/api/api/transform.get_transform.js b/api/api/transform.get_transform.js index b701dc9b7..643debd27 100644 --- a/api/api/transform.get_transform.js +++ b/api/api/transform.get_transform.js @@ -56,10 +56,10 @@ function buildTransformGetTransform (opts) { if ((transform_id || transformId) != null) { if (method == null) method = 'GET' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) } else { if (method == null) method = 'GET' - path = '/' + '_data_frame' + '/' + 'transforms' + path = '/' + '_transform' } // build request object diff --git a/api/api/transform.get_transform_stats.js b/api/api/transform.get_transform_stats.js index b5d278ece..7dc8fa140 100644 --- a/api/api/transform.get_transform_stats.js +++ b/api/api/transform.get_transform_stats.js @@ -61,7 +61,7 @@ function buildTransformGetTransformStats (opts) { var path = '' if (method == null) method = 'GET' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats' + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats' // build request object const request = { diff --git a/api/api/transform.preview_transform.js b/api/api/transform.preview_transform.js index 5d3692784..78333d69f 100644 --- a/api/api/transform.preview_transform.js +++ b/api/api/transform.preview_transform.js @@ -59,7 +59,7 @@ function buildTransformPreviewTransform (opts) { var path = '' if (method == null) method = 'POST' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + '_preview' + path = '/' + '_transform' + '/' + '_preview' // build request object const request = { diff --git a/api/api/transform.put_transform.js b/api/api/transform.put_transform.js index 53069e4e9..4832ea689 100644 --- a/api/api/transform.put_transform.js +++ b/api/api/transform.put_transform.js @@ -63,7 +63,7 @@ function buildTransformPutTransform (opts) { var path = '' if (method == null) method = 'PUT' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) // build request object const request = { diff --git a/api/api/transform.start_transform.js b/api/api/transform.start_transform.js index 08e2f4826..8482d4dd6 100644 --- a/api/api/transform.start_transform.js +++ b/api/api/transform.start_transform.js @@ -59,7 +59,7 @@ function buildTransformStartTransform (opts) { var path = '' if (method == null) method = 'POST' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start' + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start' // build request object const request = { diff --git a/api/api/transform.stop_transform.js b/api/api/transform.stop_transform.js index 41b3fe706..1ee434793 100644 --- a/api/api/transform.stop_transform.js +++ b/api/api/transform.stop_transform.js @@ -62,7 +62,7 @@ function buildTransformStopTransform (opts) { var path = '' if (method == null) method = 'POST' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop' + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop' // build request object const request = { diff --git a/api/api/transform.update_transform.js b/api/api/transform.update_transform.js index caeab7f51..d8623e7a9 100644 --- a/api/api/transform.update_transform.js +++ b/api/api/transform.update_transform.js @@ -63,7 +63,7 @@ function buildTransformUpdateTransform (opts) { var path = '' if (method == null) method = 'POST' - path = '/' + '_data_frame' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update' + path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update' // build request object const request = { diff --git a/api/index.js b/api/index.js index b1329cfca..d05e44f37 100644 --- a/api/index.js +++ b/api/index.js @@ -53,10 +53,14 @@ function ESAPI (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_auto_follow_pattern: lazyLoad('ccr.pause_auto_follow_pattern', opts), + pauseAutoFollowPattern: lazyLoad('ccr.pause_auto_follow_pattern', opts), pause_follow: lazyLoad('ccr.pause_follow', opts), pauseFollow: lazyLoad('ccr.pause_follow', opts), put_auto_follow_pattern: lazyLoad('ccr.put_auto_follow_pattern', opts), putAutoFollowPattern: lazyLoad('ccr.put_auto_follow_pattern', opts), + resume_auto_follow_pattern: lazyLoad('ccr.resume_auto_follow_pattern', opts), + resumeAutoFollowPattern: lazyLoad('ccr.resume_auto_follow_pattern', opts), resume_follow: lazyLoad('ccr.resume_follow', opts), resumeFollow: lazyLoad('ccr.resume_follow', opts), stats: lazyLoad('ccr.stats', opts), @@ -82,6 +86,42 @@ function ESAPI (opts) { }, count: lazyLoad('count', opts), create: lazyLoad('create', opts), + data_frame_transform_deprecated: { + delete_transform: lazyLoad('data_frame_transform_deprecated.delete_transform', opts), + deleteTransform: lazyLoad('data_frame_transform_deprecated.delete_transform', opts), + get_transform: lazyLoad('data_frame_transform_deprecated.get_transform', opts), + getTransform: lazyLoad('data_frame_transform_deprecated.get_transform', opts), + get_transform_stats: lazyLoad('data_frame_transform_deprecated.get_transform_stats', opts), + getTransformStats: lazyLoad('data_frame_transform_deprecated.get_transform_stats', opts), + preview_transform: lazyLoad('data_frame_transform_deprecated.preview_transform', opts), + previewTransform: lazyLoad('data_frame_transform_deprecated.preview_transform', opts), + put_transform: lazyLoad('data_frame_transform_deprecated.put_transform', opts), + putTransform: lazyLoad('data_frame_transform_deprecated.put_transform', opts), + start_transform: lazyLoad('data_frame_transform_deprecated.start_transform', opts), + startTransform: lazyLoad('data_frame_transform_deprecated.start_transform', opts), + stop_transform: lazyLoad('data_frame_transform_deprecated.stop_transform', opts), + stopTransform: lazyLoad('data_frame_transform_deprecated.stop_transform', opts), + update_transform: lazyLoad('data_frame_transform_deprecated.update_transform', opts), + updateTransform: lazyLoad('data_frame_transform_deprecated.update_transform', opts) + }, + dataFrameTransformDeprecated: { + delete_transform: lazyLoad('data_frame_transform_deprecated.delete_transform', opts), + deleteTransform: lazyLoad('data_frame_transform_deprecated.delete_transform', opts), + get_transform: lazyLoad('data_frame_transform_deprecated.get_transform', opts), + getTransform: lazyLoad('data_frame_transform_deprecated.get_transform', opts), + get_transform_stats: lazyLoad('data_frame_transform_deprecated.get_transform_stats', opts), + getTransformStats: lazyLoad('data_frame_transform_deprecated.get_transform_stats', opts), + preview_transform: lazyLoad('data_frame_transform_deprecated.preview_transform', opts), + previewTransform: lazyLoad('data_frame_transform_deprecated.preview_transform', opts), + put_transform: lazyLoad('data_frame_transform_deprecated.put_transform', opts), + putTransform: lazyLoad('data_frame_transform_deprecated.put_transform', opts), + start_transform: lazyLoad('data_frame_transform_deprecated.start_transform', opts), + startTransform: lazyLoad('data_frame_transform_deprecated.start_transform', opts), + stop_transform: lazyLoad('data_frame_transform_deprecated.stop_transform', opts), + stopTransform: lazyLoad('data_frame_transform_deprecated.stop_transform', opts), + update_transform: lazyLoad('data_frame_transform_deprecated.update_transform', opts), + updateTransform: lazyLoad('data_frame_transform_deprecated.update_transform', opts) + }, delete: lazyLoad('delete', opts), delete_by_query: lazyLoad('delete_by_query', opts), deleteByQuery: lazyLoad('delete_by_query', opts), @@ -89,6 +129,17 @@ function ESAPI (opts) { deleteByQueryRethrottle: lazyLoad('delete_by_query_rethrottle', opts), delete_script: lazyLoad('delete_script', opts), deleteScript: lazyLoad('delete_script', opts), + enrich: { + delete_policy: lazyLoad('enrich.delete_policy', opts), + deletePolicy: lazyLoad('enrich.delete_policy', opts), + execute_policy: lazyLoad('enrich.execute_policy', opts), + executePolicy: lazyLoad('enrich.execute_policy', opts), + get_policy: lazyLoad('enrich.get_policy', opts), + getPolicy: lazyLoad('enrich.get_policy', opts), + put_policy: lazyLoad('enrich.put_policy', opts), + putPolicy: lazyLoad('enrich.put_policy', opts), + stats: lazyLoad('enrich.stats', opts) + }, exists: lazyLoad('exists', opts), exists_source: lazyLoad('exists_source', opts), existsSource: lazyLoad('exists_source', opts), @@ -98,6 +149,8 @@ function ESAPI (opts) { get: lazyLoad('get', opts), get_script: lazyLoad('get_script', opts), getScript: lazyLoad('get_script', opts), + get_script_context: lazyLoad('get_script_context', opts), + getScriptContext: lazyLoad('get_script_context', opts), get_source: lazyLoad('get_source', opts), getSource: lazyLoad('get_source', opts), graph: { @@ -433,6 +486,8 @@ function ESAPI (opts) { deleteLifecycle: lazyLoad('slm.delete_lifecycle', opts), execute_lifecycle: lazyLoad('slm.execute_lifecycle', opts), executeLifecycle: lazyLoad('slm.execute_lifecycle', opts), + execute_retention: lazyLoad('slm.execute_retention', opts), + executeRetention: lazyLoad('slm.execute_retention', opts), get_lifecycle: lazyLoad('slm.get_lifecycle', opts), getLifecycle: lazyLoad('slm.get_lifecycle', opts), get_stats: lazyLoad('slm.get_stats', opts), diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index a24b2ded7..18e8658ca 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -32,7 +32,6 @@ export interface CatAliases extends Generic { name?: string | string[]; format?: string; local?: boolean; - master_timeout?: string; h?: string | string[]; help?: boolean; s?: string | string[]; @@ -54,8 +53,6 @@ export interface CatAllocation extends Generic { export interface CatCount extends Generic { index?: string | string[]; format?: string; - local?: boolean; - master_timeout?: string; h?: string | string[]; help?: boolean; s?: string | string[]; @@ -66,8 +63,6 @@ export interface CatFielddata extends Generic { fields?: string | string[]; format?: string; bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - local?: boolean; - master_timeout?: string; h?: string | string[]; help?: boolean; s?: string | string[]; @@ -76,11 +71,10 @@ export interface CatFielddata extends Generic { export interface CatHealth extends Generic { format?: string; - local?: boolean; - master_timeout?: string; h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; ts?: boolean; v?: boolean; } @@ -101,6 +95,7 @@ export interface CatIndices extends Generic { help?: boolean; pri?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; include_unloaded_segments?: boolean; } @@ -126,6 +121,7 @@ export interface CatNodeattrs extends Generic { } export interface CatNodes extends Generic { + bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; format?: string; full_id?: boolean; local?: boolean; @@ -133,6 +129,7 @@ export interface CatNodes extends Generic { h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -143,6 +140,7 @@ export interface CatPendingTasks extends Generic { h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -162,10 +160,10 @@ export interface CatRecovery extends Generic { active_only?: boolean; bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; detailed?: boolean; - master_timeout?: string; h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -198,6 +196,7 @@ export interface CatShards extends Generic { h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -209,6 +208,7 @@ export interface CatSnapshots extends Generic { h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -221,6 +221,7 @@ export interface CatTasks extends Generic { h?: string | string[]; help?: boolean; s?: string | string[]; + time?: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)'; v?: boolean; } @@ -352,7 +353,7 @@ export interface Create extends Generic { routing?: string; timeout?: string; version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; + version_type?: 'internal' | 'external' | 'external_gte'; pipeline?: string; body: T; } @@ -506,6 +507,9 @@ export interface GetScript extends Generic { master_timeout?: string; } +export interface GetScriptContext extends Generic { +} + export interface GetSource extends Generic { id: string; index: string; @@ -525,14 +529,13 @@ export interface GetSource extends Generic { export interface Index extends Generic { id?: string; index: string; - type?: string; wait_for_active_shards?: string; op_type?: 'index' | 'create'; refresh?: 'true' | 'false' | 'wait_for'; routing?: string; timeout?: string; version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; + version_type?: 'internal' | 'external' | 'external_gte'; if_seq_no?: number; if_primary_term?: number; pipeline?: string; @@ -1349,6 +1352,10 @@ export interface CcrGetAutoFollowPattern extends Generic { name?: string; } +export interface CcrPauseAutoFollowPattern extends Generic { + name: string; +} + export interface CcrPauseFollow extends Generic { index: string; } @@ -1358,6 +1365,10 @@ export interface CcrPutAutoFollowPattern extends Generic { body: T; } +export interface CcrResumeAutoFollowPattern extends Generic { + name: string; +} + export interface CcrResumeFollow extends Generic { index: string; body?: T; @@ -1370,6 +1381,74 @@ export interface CcrUnfollow extends Generic { index: string; } +export interface DataFrameTransformDeprecatedDeleteTransform extends Generic { + transform_id: string; + force?: boolean; +} + +export interface DataFrameTransformDeprecatedGetTransform extends Generic { + transform_id?: string; + from?: number; + size?: number; + allow_no_match?: boolean; +} + +export interface DataFrameTransformDeprecatedGetTransformStats extends Generic { + transform_id: string; + from?: number; + size?: number; + allow_no_match?: boolean; +} + +export interface DataFrameTransformDeprecatedPreviewTransform extends Generic { + body: T; +} + +export interface DataFrameTransformDeprecatedPutTransform extends Generic { + transform_id: string; + defer_validation?: boolean; + body: T; +} + +export interface DataFrameTransformDeprecatedStartTransform extends Generic { + transform_id: string; + timeout?: string; +} + +export interface DataFrameTransformDeprecatedStopTransform extends Generic { + transform_id: string; + wait_for_completion?: boolean; + timeout?: string; + allow_no_match?: boolean; +} + +export interface DataFrameTransformDeprecatedUpdateTransform extends Generic { + transform_id: string; + defer_validation?: boolean; + body: T; +} + +export interface EnrichDeletePolicy extends Generic { + name: string; +} + +export interface EnrichExecutePolicy extends Generic { + name: string; + wait_for_completion?: boolean; +} + +export interface EnrichGetPolicy extends Generic { + name?: string; +} + +export interface EnrichPutPolicy extends Generic { + name: string; + body: T; +} + +export interface EnrichStats extends Generic { +} + export interface GraphExplore extends Generic { index: string | string[]; routing?: string; @@ -2005,8 +2084,11 @@ export interface SlmExecuteLifecycle extends Generic { policy_id: string; } +export interface SlmExecuteRetention extends Generic { +} + export interface SlmGetLifecycle extends Generic { - policy_id?: string; + policy_id?: string | string[]; } export interface SlmGetStats extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index bf16778f1..2860ec151 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -133,7 +133,6 @@ client.cat.aliases({ name: string | string[], format: string, local: boolean, - master_timeout: string, h: string | string[], help: boolean, s: string | string[], @@ -152,9 +151,6 @@ link:{ref}/cat-alias.html[Reference] |`local` |`boolean` - Return local information, do not retrieve the state from master node (default: false) -|`master_timeout` or `masterTimeout` -|`string` - Explicit operation timeout for connection to master node - |`h` |`string \| string[]` - Comma-separated list of column names to display @@ -224,8 +220,6 @@ link:{ref}/cat-allocation.html[Reference] client.cat.count({ index: string | string[], format: string, - local: boolean, - master_timeout: string, h: string | string[], help: boolean, s: string | string[], @@ -241,12 +235,6 @@ link:{ref}/cat-count.html[Reference] |`format` |`string` - a short version of the Accept header, e.g. json, yaml -|`local` -|`boolean` - Return local information, do not retrieve the state from master node (default: false) - -|`master_timeout` or `masterTimeout` -|`string` - Explicit operation timeout for connection to master node - |`h` |`string \| string[]` - Comma-separated list of column names to display @@ -269,8 +257,6 @@ client.cat.fielddata({ fields: string | string[], format: string, bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', - local: boolean, - master_timeout: string, h: string | string[], help: boolean, s: string | string[], @@ -289,12 +275,6 @@ link:{ref}/cat-fielddata.html[Reference] |`bytes` |`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values -|`local` -|`boolean` - Return local information, do not retrieve the state from master node (default: false) - -|`master_timeout` or `masterTimeout` -|`string` - Explicit operation timeout for connection to master node - |`h` |`string \| string[]` - Comma-separated list of column names to display @@ -315,11 +295,10 @@ link:{ref}/cat-fielddata.html[Reference] ---- client.cat.health({ format: string, - local: boolean, - master_timeout: string, h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', ts: boolean, v: boolean }) @@ -330,12 +309,6 @@ link:{ref}/cat-health.html[Reference] |`format` |`string` - a short version of the Accept header, e.g. json, yaml -|`local` -|`boolean` - Return local information, do not retrieve the state from master node (default: false) - -|`master_timeout` or `masterTimeout` -|`string` - Explicit operation timeout for connection to master node - |`h` |`string \| string[]` - Comma-separated list of column names to display @@ -345,6 +318,9 @@ link:{ref}/cat-health.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`ts` |`boolean` - Set to false to disable timestamping + _Default:_ `true` @@ -389,6 +365,7 @@ client.cat.indices({ help: boolean, pri: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean, include_unloaded_segments: boolean }) @@ -426,6 +403,9 @@ link:{ref}/cat-indices.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -519,6 +499,7 @@ link:{ref}/cat-nodeattrs.html[Reference] [source,ts] ---- client.cat.nodes({ + bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', format: string, full_id: boolean, local: boolean, @@ -526,12 +507,16 @@ client.cat.nodes({ h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- link:{ref}/cat-nodes.html[Reference] [cols=2*] |=== +|`bytes` +|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values + |`format` |`string` - a short version of the Accept header, e.g. json, yaml @@ -553,6 +538,9 @@ link:{ref}/cat-nodes.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -569,6 +557,7 @@ client.cat.pendingTasks({ h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- @@ -593,6 +582,9 @@ link:{ref}/cat-pending-tasks.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -648,10 +640,10 @@ client.cat.recovery({ active_only: boolean, bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb', detailed: boolean, - master_timeout: string, h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- @@ -673,9 +665,6 @@ link:{ref}/cat-recovery.html[Reference] |`detailed` |`boolean` - If `true`, the response includes detailed information about shard recoveries -|`master_timeout` or `masterTimeout` -|`string` - Explicit operation timeout for connection to master node - |`h` |`string \| string[]` - Comma-separated list of column names to display @@ -685,6 +674,9 @@ link:{ref}/cat-recovery.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -783,6 +775,7 @@ client.cat.shards({ h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- @@ -813,6 +806,9 @@ link:{ref}/cat-shards.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -830,6 +826,7 @@ client.cat.snapshots({ h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- @@ -857,6 +854,9 @@ link:{ref}/cat-snapshots.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -875,6 +875,7 @@ client.cat.tasks({ h: string | string[], help: boolean, s: string | string[], + time: 'd (Days)' | 'h (Hours)' | 'm (Minutes)' | 's (Seconds)' | 'ms (Milliseconds)' | 'micros (Microseconds)' | 'nanos (Nanoseconds)', v: boolean }) ---- @@ -905,6 +906,9 @@ link:{ref}/tasks.html[Reference] |`s` |`string \| string[]` - Comma-separated list of column names or column aliases to sort by +|`time` +|`'d (Days)' \| 'h (Hours)' \| 'm (Minutes)' \| 's (Seconds)' \| 'ms (Milliseconds)' \| 'micros (Microseconds)' \| 'nanos (Nanoseconds)'` - The unit in which to display time values + |`v` |`boolean` - Verbose mode. Display column headers @@ -1403,7 +1407,7 @@ client.create({ routing: string, timeout: string, version: number, - version_type: 'internal' | 'external' | 'external_gte' | 'force', + version_type: 'internal' | 'external' | 'external_gte', pipeline: string, body: object }) @@ -1438,7 +1442,7 @@ WARNING: This parameter has been deprecated. |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte'` - Specific version type |`pipeline` |`string` - The pipeline id to preprocess incoming documents with @@ -2016,6 +2020,14 @@ link:{ref}/modules-scripting.html[Reference] |=== +=== getScriptContext +*Stability:* experimental +[source,ts] +---- +client.getScriptContext() +---- + + === getSource [source,ts] @@ -2079,14 +2091,13 @@ link:{ref}/docs-get.html[Reference] client.index({ id: string, index: string, - type: string, wait_for_active_shards: string, op_type: 'index' | 'create', refresh: 'true' | 'false' | 'wait_for', routing: string, timeout: string, version: number, - version_type: 'internal' | 'external' | 'external_gte' | 'force', + version_type: 'internal' | 'external' | 'external_gte', if_seq_no: number, if_primary_term: number, pipeline: string, @@ -2102,17 +2113,11 @@ link:{ref}/docs-index_.html[Reference] |`index` |`string` - The name of the index -|`type` -|`string` - The type of the document + - -WARNING: This parameter has been deprecated. - |`wait_for_active_shards` or `waitForActiveShards` |`string` - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) |`op_type` or `opType` -|`'index' \| 'create'` - Explicit operation type + -_Default:_ `index` +|`'index' \| 'create'` - Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID |`refresh` |`'true' \| 'false' \| 'wait_for'` - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. @@ -2127,7 +2132,7 @@ _Default:_ `index` |`number` - Explicit version number for concurrency control |`version_type` or `versionType` -|`'internal' \| 'external' \| 'external_gte' \| 'force'` - Specific version type +|`'internal' \| 'external' \| 'external_gte'` - Specific version type |`if_seq_no` or `ifSeqNo` |`number` - only perform the index operation if the last operation that has changed the document has the specified sequence number @@ -5412,6 +5417,22 @@ link:{ref}/ccr-get-auto-follow-pattern.html[Reference] |=== +=== ccr.pauseAutoFollowPattern + +[source,ts] +---- +client.ccr.pauseAutoFollowPattern({ + name: string +}) +---- +link:{ref}/ccr-pause-auto-follow-pattern.html[Reference] +[cols=2*] +|=== +|`name` +|`string` - The name of the auto follow pattern that should pause discovering new indices to follow. + +|=== + === ccr.pauseFollow [source,ts] @@ -5448,6 +5469,22 @@ link:{ref}/ccr-put-auto-follow-pattern.html[Reference] |=== +=== ccr.resumeAutoFollowPattern + +[source,ts] +---- +client.ccr.resumeAutoFollowPattern({ + name: string +}) +---- +link:{ref}/ccr-resume-auto-follow-pattern.html[Reference] +[cols=2*] +|=== +|`name` +|`string` - The name of the auto follow pattern to resume discovering new indices to follow. + +|=== + === ccr.resumeFollow [source,ts] @@ -5493,6 +5530,271 @@ link:http://www.elastic.co/guide/en/elasticsearch/reference/current[Reference] |=== +=== dataFrameTransformDeprecated.deleteTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.deleteTransform({ + transform_id: string, + force: boolean +}) +---- +link:{ref}/delete-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the transform to delete + +|`force` +|`boolean` - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. + +|=== + +=== dataFrameTransformDeprecated.getTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.getTransform({ + transform_id: string, + from: number, + size: number, + allow_no_match: boolean +}) +---- +link:{ref}/get-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms + +|`from` +|`number` - skips a number of transform configs, defaults to 0 + +|`size` +|`number` - specifies a max number of transforms to get, defaults to 100 + +|`allow_no_match` or `allowNoMatch` +|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) + +|=== + +=== dataFrameTransformDeprecated.getTransformStats +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.getTransformStats({ + transform_id: string, + from: number, + size: number, + allow_no_match: boolean +}) +---- +link:{ref}/get-transform-stats.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the transform for which to get stats. '_all' or '*' implies all transforms + +|`from` +|`number` - skips a number of transform stats, defaults to 0 + +|`size` +|`number` - specifies a max number of transform stats to get, defaults to 100 + +|`allow_no_match` or `allowNoMatch` +|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) + +|=== + +=== dataFrameTransformDeprecated.previewTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.previewTransform({ + body: object +}) +---- +link:{ref}/preview-transform.html[Reference] +[cols=2*] +|=== +|`body` +|`object` - The definition for the transform to preview + +|=== + +=== dataFrameTransformDeprecated.putTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.putTransform({ + transform_id: string, + defer_validation: boolean, + body: object +}) +---- +link:{ref}/put-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the new transform. + +|`defer_validation` or `deferValidation` +|`boolean` - If validations should be deferred until transform starts, defaults to false. + +|`body` +|`object` - The transform definition + +|=== + +=== dataFrameTransformDeprecated.startTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.startTransform({ + transform_id: string, + timeout: string +}) +---- +link:{ref}/start-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the transform to start + +|`timeout` +|`string` - Controls the time to wait for the transform to start + +|=== + +=== dataFrameTransformDeprecated.stopTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.stopTransform({ + transform_id: string, + wait_for_completion: boolean, + timeout: string, + allow_no_match: boolean +}) +---- +link:{ref}/stop-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the transform to stop + +|`wait_for_completion` or `waitForCompletion` +|`boolean` - Whether to wait for the transform to fully stop before returning or not. Default to false + +|`timeout` +|`string` - Controls the time to wait until the transform has stopped. Default to 30 seconds + +|`allow_no_match` or `allowNoMatch` +|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) + +|=== + +=== dataFrameTransformDeprecated.updateTransform +*Stability:* beta +[source,ts] +---- +client.dataFrameTransformDeprecated.updateTransform({ + transform_id: string, + defer_validation: boolean, + body: object +}) +---- +link:{ref}/update-transform.html[Reference] +[cols=2*] +|=== +|`transform_id` or `transformId` +|`string` - The id of the transform. + +|`defer_validation` or `deferValidation` +|`boolean` - If validations should be deferred until transform starts, defaults to false. + +|`body` +|`object` - The update transform definition + +|=== + +=== enrich.deletePolicy + +[source,ts] +---- +client.enrich.deletePolicy({ + name: string +}) +---- +[cols=2*] +|=== +|`name` +|`string` - The name of the enrich policy + +|=== + +=== enrich.executePolicy + +[source,ts] +---- +client.enrich.executePolicy({ + name: string, + wait_for_completion: boolean +}) +---- +[cols=2*] +|=== +|`name` +|`string` - The name of the enrich policy + +|`wait_for_completion` or `waitForCompletion` +|`boolean` - Should the request should block until the execution is complete. + +_Default:_ `true` + +|=== + +=== enrich.getPolicy + +[source,ts] +---- +client.enrich.getPolicy({ + name: string +}) +---- +[cols=2*] +|=== +|`name` +|`string` - The name of the enrich policy + +|=== + +=== enrich.putPolicy + +[source,ts] +---- +client.enrich.putPolicy({ + name: string, + body: object +}) +---- +[cols=2*] +|=== +|`name` +|`string` - The name of the enrich policy + +|`body` +|`object` - The enrich policy to register + +|=== + +=== enrich.stats + +[source,ts] +---- +client.enrich.stats() +---- + + === graph.explore [source,ts] @@ -7990,19 +8292,28 @@ link:{ref}/slm-api-execute.html[Reference] |=== +=== slm.executeRetention + +[source,ts] +---- +client.slm.executeRetention() +---- +link:{ref}/slm-api-execute-retention.html[Reference] + + === slm.getLifecycle [source,ts] ---- client.slm.getLifecycle({ - policy_id: string + policy_id: string | string[] }) ---- link:{ref}/slm-api-get.html[Reference] [cols=2*] |=== |`policy_id` or `policyId` -|`string` - Comma-separated list of snapshot lifecycle policies to retrieve +|`string \| string[]` - Comma-separated list of snapshot lifecycle policies to retrieve |=== diff --git a/index.d.ts b/index.d.ts index cafbae25b..4e327f7ef 100644 --- a/index.d.ts +++ b/index.d.ts @@ -151,10 +151,14 @@ declare class Client extends EventEmitter { forgetFollower: ApiMethod get_auto_follow_pattern: ApiMethod getAutoFollowPattern: ApiMethod + pause_auto_follow_pattern: ApiMethod + pauseAutoFollowPattern: ApiMethod pause_follow: ApiMethod pauseFollow: ApiMethod put_auto_follow_pattern: ApiMethod putAutoFollowPattern: ApiMethod + resume_auto_follow_pattern: ApiMethod + resumeAutoFollowPattern: ApiMethod resume_follow: ApiMethod resumeFollow: ApiMethod stats: ApiMethod @@ -180,6 +184,42 @@ declare class Client extends EventEmitter { } count: ApiMethod create: ApiMethod + data_frame_transform_deprecated: { + delete_transform: ApiMethod + deleteTransform: ApiMethod + get_transform: ApiMethod + getTransform: ApiMethod + get_transform_stats: ApiMethod + getTransformStats: ApiMethod + preview_transform: ApiMethod + previewTransform: ApiMethod + put_transform: ApiMethod + putTransform: ApiMethod + start_transform: ApiMethod + startTransform: ApiMethod + stop_transform: ApiMethod + stopTransform: ApiMethod + update_transform: ApiMethod + updateTransform: ApiMethod + } + dataFrameTransformDeprecated: { + delete_transform: ApiMethod + deleteTransform: ApiMethod + get_transform: ApiMethod + getTransform: ApiMethod + get_transform_stats: ApiMethod + getTransformStats: ApiMethod + preview_transform: ApiMethod + previewTransform: ApiMethod + put_transform: ApiMethod + putTransform: ApiMethod + start_transform: ApiMethod + startTransform: ApiMethod + stop_transform: ApiMethod + stopTransform: ApiMethod + update_transform: ApiMethod + updateTransform: ApiMethod + } delete: ApiMethod delete_by_query: ApiMethod deleteByQuery: ApiMethod @@ -187,6 +227,17 @@ declare class Client extends EventEmitter { deleteByQueryRethrottle: ApiMethod delete_script: ApiMethod deleteScript: ApiMethod + enrich: { + delete_policy: ApiMethod + deletePolicy: ApiMethod + execute_policy: ApiMethod + executePolicy: ApiMethod + get_policy: ApiMethod + getPolicy: ApiMethod + put_policy: ApiMethod + putPolicy: ApiMethod + stats: ApiMethod + } exists: ApiMethod exists_source: ApiMethod existsSource: ApiMethod @@ -196,6 +247,8 @@ declare class Client extends EventEmitter { get: ApiMethod get_script: ApiMethod getScript: ApiMethod + get_script_context: ApiMethod + getScriptContext: ApiMethod get_source: ApiMethod getSource: ApiMethod graph: { @@ -531,6 +584,8 @@ declare class Client extends EventEmitter { deleteLifecycle: ApiMethod execute_lifecycle: ApiMethod executeLifecycle: ApiMethod + execute_retention: ApiMethod + executeRetention: ApiMethod get_lifecycle: ApiMethod getLifecycle: ApiMethod get_stats: ApiMethod