From 8bccc50d6d33886d920e4dea1234209078d4a4bb Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 10 Feb 2021 17:23:26 +0100 Subject: [PATCH] API generation --- api/api/async_search.js | 4 ++-- api/api/bulk.js | 4 ++-- api/api/delete_by_query.js | 4 ++-- api/api/exists.js | 4 ++-- api/api/exists_source.js | 4 ++-- api/api/explain.js | 4 ++-- api/api/get.js | 4 ++-- api/api/get_source.js | 4 ++-- api/api/mget.js | 4 ++-- api/api/search.js | 4 ++-- api/api/update.js | 4 ++-- api/api/update_by_query.js | 4 ++-- api/requestParams.d.ts | 24 ++++++++++++++++++++++++ docs/reference.asciidoc | 8 ++++---- 14 files changed, 52 insertions(+), 28 deletions(-) diff --git a/api/api/async_search.js b/api/api/async_search.js index d7f719305..7852cb45c 100644 --- a/api/api/async_search.js +++ b/api/api/async_search.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests'] -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' } +const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests'] +const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' } function AsyncSearchApi (transport, ConfigurationError) { this.transport = transport diff --git a/api/api/bulk.js b/api/api/bulk.js index 5dfaeba94..9a750374a 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_includes', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' } function bulkApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 3a6a9a3d9..1c6c22d13 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' } function deleteByQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/exists.js b/api/api/exists.js index 5e907fd96..f719f930e 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } function existsApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 930bc72ab..f16c6abbd 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } function existsSourceApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/explain.js b/api/api/explain.js index da6ed2d9e..12bc10366 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } function explainApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/get.js b/api/api/get.js index a45848470..bfa9cbc79 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } function getApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/get_source.js b/api/api/get_source.js index a0d716dab..23121d2dd 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' } function getSourceApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/mget.js b/api/api/mget.js index 2ff5d404e..96846228a 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } function mgetApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/search.js b/api/api/search.js index d9e144246..0e5c6029f 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' } function searchApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/update.js b/api/api/update.js index aae88a27a..95c4becd5 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' } function updateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index afc53845d..d7760bc9e 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] -const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path'] +const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' } function updateByQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index ec458a9b6..11b92f7c8 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -45,6 +45,8 @@ export interface AsyncSearchStatus extends Generic { export interface AsyncSearchSubmit extends Generic { index?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_completion_timeout?: string; keep_on_completion?: boolean; keep_alive?: string; @@ -108,6 +110,8 @@ export interface AutoscalingPutAutoscalingPolicy extends Generi export interface Bulk extends Generic { index?: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_active_shards?: string; refresh?: 'wait_for' | boolean; routing?: string; @@ -647,6 +651,8 @@ export interface Delete extends Generic { export interface DeleteByQuery extends Generic { index: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; default_operator?: 'AND' | 'OR'; @@ -737,6 +743,8 @@ export interface Exists extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -753,6 +761,8 @@ export interface ExistsSource extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; preference?: string; realtime?: boolean; refresh?: boolean; @@ -768,6 +778,8 @@ export interface Explain extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyze_wildcard?: boolean; analyzer?: string; default_operator?: 'AND' | 'OR'; @@ -797,6 +809,8 @@ export interface Get extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -824,6 +838,8 @@ export interface GetSource extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; preference?: string; realtime?: boolean; refresh?: boolean; @@ -1433,6 +1449,8 @@ export interface LicensePostStartTrial extends Generic { export interface Mget extends Generic { index?: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; stored_fields?: string | string[]; preference?: string; realtime?: boolean; @@ -2074,6 +2092,8 @@ export interface Scroll extends Generic { export interface Search extends Generic { index?: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; ccs_minimize_roundtrips?: boolean; @@ -2530,6 +2550,8 @@ export interface Update extends Generic { id: string; index: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_active_shards?: string; _source?: string | string[]; _source_excludes?: string | string[]; @@ -2548,6 +2570,8 @@ export interface Update extends Generic { export interface UpdateByQuery extends Generic { index: string | string[]; type?: string | string[]; + _source_exclude?: string | string[]; + _source_include?: string | string[]; analyzer?: string; analyze_wildcard?: boolean; default_operator?: 'AND' | 'OR'; diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index ef7073f31..1901bb23b 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -354,7 +354,7 @@ _Default:_ `5` [discrete] === autoscaling.deleteAutoscalingPolicy -*Stability:* experimental + [source,ts] ---- client.autoscaling.deleteAutoscalingPolicy({ @@ -371,7 +371,7 @@ link:{ref}/autoscaling-delete-autoscaling-policy.html[Documentation] + [discrete] === autoscaling.getAutoscalingCapacity -*Stability:* experimental + [source,ts] ---- client.autoscaling.getAutoscalingCapacity() @@ -381,7 +381,7 @@ link:{ref}/autoscaling-get-autoscaling-capacity.html[Documentation] + [discrete] === autoscaling.getAutoscalingPolicy -*Stability:* experimental + [source,ts] ---- client.autoscaling.getAutoscalingPolicy({ @@ -398,7 +398,7 @@ link:{ref}/autoscaling-get-autoscaling-policy.html[Documentation] + [discrete] === autoscaling.putAutoscalingPolicy -*Stability:* experimental + [source,ts] ---- client.autoscaling.putAutoscalingPolicy({