API generation

This commit is contained in:
delvedor
2020-07-29 08:32:03 +02:00
parent 11b4cea493
commit 14536d6855
6 changed files with 93 additions and 129 deletions

View File

@ -12,16 +12,11 @@ function buildIndicesCreateDataStream (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'pretty',
'human',
'error_trace',
'source',
'filter_path'
]
const snakeCase = {
errorTrace: 'error_trace',
filterPath: 'filter_path'
}
/**

View File

@ -12,20 +12,11 @@ function buildIndicesDataStreamsStats (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'expand_wildcards',
'forbid_closed_indices',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
]
const snakeCase = {
expandWildcards: 'expand_wildcards',
forbidClosedIndices: 'forbid_closed_indices',
errorTrace: 'error_trace',
filterPath: 'filter_path'
}
/**

View File

@ -12,16 +12,11 @@ function buildIndicesDeleteDataStream (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'pretty',
'human',
'error_trace',
'source',
'filter_path'
]
const snakeCase = {
errorTrace: 'error_trace',
filterPath: 'filter_path'
}
/**

View File

@ -12,16 +12,11 @@ function buildIndicesGetDataStream (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'pretty',
'human',
'error_trace',
'source',
'filter_path'
]
const snakeCase = {
errorTrace: 'error_trace',
filterPath: 'filter_path'
}
/**

View File

@ -650,17 +650,6 @@ export interface IndicesCreate<T = RequestBody> extends Generic {
body?: T;
}
export interface IndicesCreateDataStream<T = RequestBody> extends Generic {
name: string;
body?: T;
}
export interface IndicesDataStreamsStats extends Generic {
name?: string | string[];
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
forbid_closed_indices?: boolean;
}
export interface IndicesDelete extends Generic {
index: string | string[];
timeout?: string;
@ -677,10 +666,6 @@ export interface IndicesDeleteAlias extends Generic {
master_timeout?: string;
}
export interface IndicesDeleteDataStream extends Generic {
name: string | string[];
}
export interface IndicesDeleteIndexTemplate extends Generic {
name: string;
timeout?: string;
@ -782,10 +767,6 @@ export interface IndicesGetAlias extends Generic {
local?: boolean;
}
export interface IndicesGetDataStream extends Generic {
name?: string | string[];
}
export interface IndicesGetFieldMapping extends Generic {
fields: string | string[];
index?: string | string[];
@ -1745,6 +1726,19 @@ export interface IlmStart extends Generic {
export interface IlmStop extends Generic {
}
export interface IndicesCreateDataStream<T = RequestBody> extends Generic {
name: string;
body?: T;
}
export interface IndicesDataStreamsStats extends Generic {
name?: string | string[];
}
export interface IndicesDeleteDataStream extends Generic {
name: string | string[];
}
export interface IndicesFreeze extends Generic {
index: string;
timeout?: string;
@ -1755,6 +1749,10 @@ export interface IndicesFreeze extends Generic {
wait_for_active_shards?: string;
}
export interface IndicesGetDataStream extends Generic {
name?: string | string[];
}
export interface IndicesReloadSearchAnalyzers extends Generic {
index: string | string[];
ignore_unavailable?: boolean;