API generation
This commit is contained in:
@ -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'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
36
api/requestParams.d.ts
vendored
36
api/requestParams.d.ts
vendored
@ -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;
|
||||
|
||||
@ -2678,52 +2678,6 @@ link:{ref}/indices-create-index.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
=== indices.createDataStream
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.createDataStream({
|
||||
name: string,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string` - The name of the data stream
|
||||
|
||||
|`body`
|
||||
|`object` - The data stream definition
|
||||
|
||||
|===
|
||||
|
||||
=== indices.dataStreamsStats
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.dataStreamsStats({
|
||||
name: string | string[],
|
||||
expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
|
||||
forbid_closed_indices: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
|
||||
|
||||
|`expand_wildcards` or `expandWildcards`
|
||||
|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
|
||||
_Default:_ `open`
|
||||
|
||||
|`forbid_closed_indices` or `forbidClosedIndices`
|
||||
|`boolean` - If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices +
|
||||
_Default:_ `true`
|
||||
|
||||
|===
|
||||
|
||||
=== indices.delete
|
||||
|
||||
[source,ts]
|
||||
@ -2789,22 +2743,6 @@ link:{ref}/indices-aliases.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
=== indices.deleteDataStream
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.deleteDataStream({
|
||||
name: string | string[]
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data streams to delete; use `*` to delete all data streams
|
||||
|
||||
|===
|
||||
|
||||
=== indices.deleteIndexTemplate
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
@ -3217,22 +3155,6 @@ _Default:_ `all`
|
||||
|
||||
|===
|
||||
|
||||
=== indices.getDataStream
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.getDataStream({
|
||||
name: string | string[]
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data streams to get; use `*` to get all data streams
|
||||
|
||||
|===
|
||||
|
||||
=== indices.getFieldMapping
|
||||
|
||||
[source,ts]
|
||||
@ -7132,6 +7054,58 @@ client.ilm.stop()
|
||||
link:{ref}/ilm-stop.html[Documentation] +
|
||||
|
||||
|
||||
=== indices.createDataStream
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.createDataStream({
|
||||
name: string,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string` - The name of the data stream
|
||||
|
||||
|`body`
|
||||
|`object` - The data stream definition
|
||||
|
||||
|===
|
||||
|
||||
=== indices.dataStreamsStats
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.dataStreamsStats({
|
||||
name: string | string[]
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams
|
||||
|
||||
|===
|
||||
|
||||
=== indices.deleteDataStream
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.deleteDataStream({
|
||||
name: string | string[]
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data streams to delete; use `*` to delete all data streams
|
||||
|
||||
|===
|
||||
|
||||
=== indices.freeze
|
||||
|
||||
[source,ts]
|
||||
@ -7173,6 +7147,22 @@ _Default:_ `closed`
|
||||
|
||||
|===
|
||||
|
||||
=== indices.getDataStream
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.getDataStream({
|
||||
name: string | string[]
|
||||
})
|
||||
----
|
||||
link:{ref}/data-streams.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string \| string[]` - A comma-separated list of data streams to get; use `*` to get all data streams
|
||||
|
||||
|===
|
||||
|
||||
=== indices.reloadSearchAnalyzers
|
||||
|
||||
[source,ts]
|
||||
|
||||
Reference in New Issue
Block a user