From 76b1bc6452f95da3642c87a07277428a28e38d27 Mon Sep 17 00:00:00 2001 From: delvedor Date: Thu, 18 Jun 2020 15:33:46 +0200 Subject: [PATCH] API generation --- api/api/async_search.submit.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 ++++++++++++++++++++++++ 13 files changed, 72 insertions(+) diff --git a/api/api/async_search.submit.js b/api/api/async_search.submit.js index 30d408051..e46a1785f 100644 --- a/api/api/async_search.submit.js +++ b/api/api/async_search.submit.js @@ -38,7 +38,9 @@ function buildAsyncSearchSubmit (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'suggest_field', @@ -71,7 +73,9 @@ function buildAsyncSearchSubmit (opts) { 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', diff --git a/api/api/bulk.js b/api/api/bulk.js index 361dd22b1..683c50310 100644 --- a/api/api/bulk.js +++ b/api/api/bulk.js @@ -19,7 +19,9 @@ function buildBulk (opts) { 'type', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pipeline', 'pretty', 'human', @@ -31,7 +33,9 @@ function buildBulk (opts) { const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js index 8573f14b6..41f23ce59 100644 --- a/api/api/delete_by_query.js +++ b/api/api/delete_by_query.js @@ -33,7 +33,9 @@ function buildDeleteByQuery (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'version', @@ -62,7 +64,9 @@ function buildDeleteByQuery (opts) { 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', diff --git a/api/api/exists.js b/api/api/exists.js index 7659a0907..c48a5299b 100644 --- a/api/api/exists.js +++ b/api/api/exists.js @@ -19,7 +19,9 @@ function buildExists (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -32,7 +34,9 @@ function buildExists (opts) { 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' diff --git a/api/api/exists_source.js b/api/api/exists_source.js index 059ed1de5..fab3f6d85 100644 --- a/api/api/exists_source.js +++ b/api/api/exists_source.js @@ -18,7 +18,9 @@ function buildExistsSource (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -30,7 +32,9 @@ function buildExistsSource (opts) { const snakeCase = { _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/explain.js b/api/api/explain.js index cf513bdcb..71aab5acf 100644 --- a/api/api/explain.js +++ b/api/api/explain.js @@ -23,7 +23,9 @@ function buildExplain (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pretty', 'human', 'error_trace', @@ -36,7 +38,9 @@ function buildExplain (opts) { defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/get.js b/api/api/get.js index ee5aeeee7..87b127cab 100644 --- a/api/api/get.js +++ b/api/api/get.js @@ -19,7 +19,9 @@ function buildGet (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -32,7 +34,9 @@ function buildGet (opts) { 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' diff --git a/api/api/get_source.js b/api/api/get_source.js index 08543b96a..70bd3deff 100644 --- a/api/api/get_source.js +++ b/api/api/get_source.js @@ -18,7 +18,9 @@ function buildGetSource (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'version', 'version_type', 'pretty', @@ -30,7 +32,9 @@ function buildGetSource (opts) { const snakeCase = { _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' diff --git a/api/api/mget.js b/api/api/mget.js index 2e6093e5e..fbf6f03f4 100644 --- a/api/api/mget.js +++ b/api/api/mget.js @@ -19,7 +19,9 @@ function buildMget (opts) { 'routing', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'pretty', 'human', 'error_trace', @@ -30,7 +32,9 @@ function buildMget (opts) { const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', + _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', + _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' } diff --git a/api/api/search.js b/api/api/search.js index c17ccd295..8e058048f 100644 --- a/api/api/search.js +++ b/api/api/search.js @@ -35,7 +35,9 @@ function buildSearch (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'suggest_field', @@ -73,7 +75,9 @@ function buildSearch (opts) { 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', diff --git a/api/api/update.js b/api/api/update.js index e45c32c38..bd5744bba 100644 --- a/api/api/update.js +++ b/api/api/update.js @@ -15,7 +15,9 @@ function buildUpdate (opts) { 'wait_for_active_shards', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'lang', 'refresh', 'retry_on_conflict', @@ -33,7 +35,9 @@ function buildUpdate (opts) { 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', diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js index 2ba13c742..682e44ddd 100644 --- a/api/api/update_by_query.js +++ b/api/api/update_by_query.js @@ -34,7 +34,9 @@ function buildUpdateByQuery (opts) { 'sort', '_source', '_source_excludes', + '_source_exclude', '_source_includes', + '_source_include', 'terminate_after', 'stats', 'version', @@ -64,7 +66,9 @@ function buildUpdateByQuery (opts) { 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', diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index aee0071c9..553056135 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -17,6 +17,8 @@ export interface Generic { export interface Bulk extends Generic { index?: string; type?: string; + _source_exclude?: string | string[]; + _source_include?: string | string[]; wait_for_active_shards?: string; refresh?: 'true' | 'false' | 'wait_for'; routing?: string; @@ -414,6 +416,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'; @@ -465,6 +469,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; @@ -481,6 +487,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; @@ -496,6 +504,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'; @@ -524,6 +534,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; @@ -551,6 +563,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; @@ -1018,6 +1032,8 @@ export interface IngestSimulate 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; @@ -1170,6 +1186,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; @@ -1359,6 +1377,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[]; @@ -1376,6 +1396,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'; @@ -1432,6 +1454,8 @@ export interface AsyncSearchGet 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;