API generation
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
/* eslint camelcase: 0 */
|
/* eslint camelcase: 0 */
|
||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
function buildIndicesGetDataStreams (opts) {
|
function buildIndicesGetDataStream (opts) {
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
@ -25,11 +25,11 @@ function buildIndicesGetDataStreams (opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a indices.get_data_streams request
|
* Perform a indices.get_data_stream request
|
||||||
* Returns data streams.
|
* Returns data streams.
|
||||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
* https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
||||||
*/
|
*/
|
||||||
return function indicesGetDataStreams (params, options, callback) {
|
return function indicesGetDataStream (params, options, callback) {
|
||||||
options = options || {}
|
options = options || {}
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
callback = options
|
callback = options
|
||||||
@ -60,10 +60,10 @@ function buildIndicesGetDataStreams (opts) {
|
|||||||
|
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_data_streams' + '/' + encodeURIComponent(name)
|
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
||||||
} else {
|
} else {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_data_streams'
|
path = '/' + '_data_stream'
|
||||||
}
|
}
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
@ -79,4 +79,4 @@ function buildIndicesGetDataStreams (opts) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = buildIndicesGetDataStreams
|
module.exports = buildIndicesGetDataStream
|
||||||
@ -255,8 +255,8 @@ function ESAPI (opts) {
|
|||||||
get: lazyLoad('indices.get', opts),
|
get: lazyLoad('indices.get', opts),
|
||||||
get_alias: lazyLoad('indices.get_alias', opts),
|
get_alias: lazyLoad('indices.get_alias', opts),
|
||||||
getAlias: lazyLoad('indices.get_alias', opts),
|
getAlias: lazyLoad('indices.get_alias', opts),
|
||||||
get_data_streams: lazyLoad('indices.get_data_streams', opts),
|
get_data_stream: lazyLoad('indices.get_data_stream', opts),
|
||||||
getDataStreams: lazyLoad('indices.get_data_streams', opts),
|
getDataStream: lazyLoad('indices.get_data_stream', opts),
|
||||||
get_field_mapping: lazyLoad('indices.get_field_mapping', opts),
|
get_field_mapping: lazyLoad('indices.get_field_mapping', opts),
|
||||||
getFieldMapping: lazyLoad('indices.get_field_mapping', opts),
|
getFieldMapping: lazyLoad('indices.get_field_mapping', opts),
|
||||||
get_index_template: lazyLoad('indices.get_index_template', opts),
|
get_index_template: lazyLoad('indices.get_index_template', opts),
|
||||||
|
|||||||
2
api/requestParams.d.ts
vendored
2
api/requestParams.d.ts
vendored
@ -745,7 +745,7 @@ export interface IndicesGetAlias extends Generic {
|
|||||||
local?: boolean;
|
local?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IndicesGetDataStreams extends Generic {
|
export interface IndicesGetDataStream extends Generic {
|
||||||
name?: string;
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1095,7 +1095,7 @@ client.cluster.deleteComponentTemplate({
|
|||||||
master_timeout: string
|
master_timeout: string
|
||||||
})
|
})
|
||||||
----
|
----
|
||||||
link:{ref}/indices-component-template.html[Documentation] +
|
link:{ref}/indices-component-templates.html[Documentation] +
|
||||||
[cols=2*]
|
[cols=2*]
|
||||||
|===
|
|===
|
||||||
|`name`
|
|`name`
|
||||||
@ -1136,7 +1136,7 @@ client.cluster.existsComponentTemplate({
|
|||||||
local: boolean
|
local: boolean
|
||||||
})
|
})
|
||||||
----
|
----
|
||||||
link:{ref}/indices-component-template.html[Documentation] +
|
link:{ref}/indices-component-templates.html[Documentation] +
|
||||||
[cols=2*]
|
[cols=2*]
|
||||||
|===
|
|===
|
||||||
|`name`
|
|`name`
|
||||||
@ -1160,7 +1160,7 @@ client.cluster.getComponentTemplate({
|
|||||||
local: boolean
|
local: boolean
|
||||||
})
|
})
|
||||||
----
|
----
|
||||||
link:{ref}/indices-component-template.html[Documentation] +
|
link:{ref}/indices-component-templates.html[Documentation] +
|
||||||
[cols=2*]
|
[cols=2*]
|
||||||
|===
|
|===
|
||||||
|`name`
|
|`name`
|
||||||
@ -1321,7 +1321,7 @@ client.cluster.putComponentTemplate({
|
|||||||
body: object
|
body: object
|
||||||
})
|
})
|
||||||
----
|
----
|
||||||
link:{ref}/indices-component-template.html[Documentation] +
|
link:{ref}/indices-component-templates.html[Documentation] +
|
||||||
[cols=2*]
|
[cols=2*]
|
||||||
|===
|
|===
|
||||||
|`name`
|
|`name`
|
||||||
@ -2994,11 +2994,11 @@ _Default:_ `all`
|
|||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
=== indices.getDataStreams
|
=== indices.getDataStream
|
||||||
*Stability:* experimental
|
*Stability:* experimental
|
||||||
[source,ts]
|
[source,ts]
|
||||||
----
|
----
|
||||||
client.indices.getDataStreams({
|
client.indices.getDataStream({
|
||||||
name: string
|
name: string
|
||||||
})
|
})
|
||||||
----
|
----
|
||||||
|
|||||||
16
index.d.ts
vendored
16
index.d.ts
vendored
@ -993,14 +993,14 @@ declare class Client extends EventEmitter {
|
|||||||
getAlias<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getAlias<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
getAlias<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getAlias<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
getAlias<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getAlias<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
get_data_streams<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetDataStreams, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get_data_stream<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||||
get_data_streams<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
get_data_stream<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
get_data_streams<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
get_data_stream<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStream, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
get_data_streams<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
get_data_stream<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStream, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
getDataStreams<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetDataStreams, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDataStream<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||||
getDataStreams<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getDataStream<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
getDataStreams<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getDataStream<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStream, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
getDataStreams<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStreams, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
getDataStream<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetDataStream, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||||
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetFieldMapping, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
get_field_mapping<TResponse = Record<string, any>, TContext = unknown>(params: RequestParams.IndicesGetFieldMapping, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||||
|
|||||||
Reference in New Issue
Block a user