API generation

This commit is contained in:
delvedor
2020-03-20 16:54:50 +01:00
parent 354c13c033
commit 1b638d6992
2 changed files with 8 additions and 8 deletions

View File

@ -13,8 +13,10 @@ function buildAsyncSearchSubmit (opts) {
const acceptedQuerystring = [
'wait_for_completion',
'clean_on_completion',
'keep_alive',
'batched_reduce_size',
'request_cache',
'analyzer',
'analyze_wildcard',
'default_operator',
@ -52,15 +54,15 @@ function buildAsyncSearchSubmit (opts) {
'typed_keys',
'version',
'seq_no_primary_term',
'request_cache',
'max_concurrent_shard_requests',
'clean_on_completion'
'max_concurrent_shard_requests'
]
const snakeCase = {
waitForCompletion: 'wait_for_completion',
cleanOnCompletion: 'clean_on_completion',
keepAlive: 'keep_alive',
batchedReduceSize: 'batched_reduce_size',
requestCache: 'request_cache',
analyzeWildcard: 'analyze_wildcard',
defaultOperator: 'default_operator',
storedFields: 'stored_fields',
@ -84,9 +86,7 @@ function buildAsyncSearchSubmit (opts) {
allowPartialSearchResults: 'allow_partial_search_results',
typedKeys: 'typed_keys',
seqNoPrimaryTerm: 'seq_no_primary_term',
requestCache: 'request_cache',
maxConcurrentShardRequests: 'max_concurrent_shard_requests',
cleanOnCompletion: 'clean_on_completion'
maxConcurrentShardRequests: 'max_concurrent_shard_requests'
}
/**

View File

@ -1364,8 +1364,10 @@ export interface AsyncSearchSubmit<T = any> extends Generic {
_source_exclude?: string | string[];
_source_include?: string | string[];
wait_for_completion?: string;
clean_on_completion?: boolean;
keep_alive?: string;
batched_reduce_size?: number;
request_cache?: boolean;
analyzer?: string;
analyze_wildcard?: boolean;
default_operator?: 'AND' | 'OR';
@ -1401,9 +1403,7 @@ export interface AsyncSearchSubmit<T = any> extends Generic {
typed_keys?: boolean;
version?: boolean;
seq_no_primary_term?: boolean;
request_cache?: boolean;
max_concurrent_shard_requests?: number;
clean_on_completion?: boolean;
body?: T;
}