API generation
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildIndicesGetDataStreams (opts) {
|
||||
function buildIndicesGetDataStream (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
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.
|
||||
* 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 || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -60,10 +60,10 @@ function buildIndicesGetDataStreams (opts) {
|
||||
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_data_streams' + '/' + encodeURIComponent(name)
|
||||
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_data_streams'
|
||||
path = '/' + '_data_stream'
|
||||
}
|
||||
|
||||
// build request object
|
||||
@ -79,4 +79,4 @@ function buildIndicesGetDataStreams (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildIndicesGetDataStreams
|
||||
module.exports = buildIndicesGetDataStream
|
||||
@ -221,8 +221,8 @@ function ESAPI (opts) {
|
||||
get: lazyLoad('indices.get', opts),
|
||||
get_alias: lazyLoad('indices.get_alias', opts),
|
||||
getAlias: lazyLoad('indices.get_alias', opts),
|
||||
get_data_streams: lazyLoad('indices.get_data_streams', opts),
|
||||
getDataStreams: lazyLoad('indices.get_data_streams', opts),
|
||||
get_data_stream: lazyLoad('indices.get_data_stream', opts),
|
||||
getDataStream: lazyLoad('indices.get_data_stream', opts),
|
||||
get_field_mapping: lazyLoad('indices.get_field_mapping', opts),
|
||||
getFieldMapping: lazyLoad('indices.get_field_mapping', opts),
|
||||
get_index_template: lazyLoad('indices.get_index_template', opts),
|
||||
|
||||
2
api/requestParams.d.ts
vendored
2
api/requestParams.d.ts
vendored
@ -749,7 +749,7 @@ export interface IndicesGetAlias extends Generic {
|
||||
local?: boolean;
|
||||
}
|
||||
|
||||
export interface IndicesGetDataStreams extends Generic {
|
||||
export interface IndicesGetDataStream extends Generic {
|
||||
name?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user