API generation

This commit is contained in:
delvedor
2020-03-04 09:19:06 +01:00
parent 32f3fef14f
commit 6d50c9fa30
7 changed files with 62 additions and 10 deletions

View File

@ -28,7 +28,7 @@ function buildCatMlDatafeeds (opts) {
/**
* Perform a cat.ml_datafeeds request
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html
* http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
*/
return function catMlDatafeeds (params, options, callback) {
options = options || {}

View File

@ -29,7 +29,7 @@ function buildCatMlJobs (opts) {
/**
* Perform a cat.ml_jobs request
* http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html
* http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
*/
return function catMlJobs (params, options, callback) {
options = options || {}

View File

@ -31,7 +31,7 @@ function buildCatMlTrainedModels (opts) {
/**
* Perform a cat.ml_trained_models request
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html
* https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html
*/
return function catMlTrainedModels (params, options, callback) {
options = options || {}

View File

@ -12,11 +12,17 @@ function buildMlPutDatafeed (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'ignore_unavailable',
'allow_no_indices',
'ignore_throttled',
'expand_wildcards'
]
const snakeCase = {
ignoreUnavailable: 'ignore_unavailable',
allowNoIndices: 'allow_no_indices',
ignoreThrottled: 'ignore_throttled',
expandWildcards: 'expand_wildcards'
}
/**

View File

@ -12,11 +12,17 @@ function buildMlUpdateDatafeed (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [
'ignore_unavailable',
'allow_no_indices',
'ignore_throttled',
'expand_wildcards'
]
const snakeCase = {
ignoreUnavailable: 'ignore_unavailable',
allowNoIndices: 'allow_no_indices',
ignoreThrottled: 'ignore_throttled',
expandWildcards: 'expand_wildcards'
}
/**

View File

@ -1893,6 +1893,10 @@ export interface MlPutDataFrameAnalytics<T = any> extends Generic {
export interface MlPutDatafeed<T = any> extends Generic {
datafeed_id: string;
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
ignore_throttled?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
body: T;
}
@ -1954,6 +1958,10 @@ export interface MlStopDatafeed extends Generic {
export interface MlUpdateDatafeed<T = any> extends Generic {
datafeed_id: string;
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
ignore_throttled?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
body: T;
}