API generation
This commit is contained in:
@ -15,7 +15,6 @@ function buildCatNodes (opts) {
|
||||
'bytes',
|
||||
'format',
|
||||
'full_id',
|
||||
'local',
|
||||
'master_timeout',
|
||||
'h',
|
||||
'help',
|
||||
|
||||
@ -79,10 +79,10 @@ function buildIndicesDeleteAlias (opts) {
|
||||
|
||||
if ((index) != null && (name) != null) {
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||
} else {
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||
}
|
||||
|
||||
// build request object
|
||||
|
||||
@ -79,10 +79,10 @@ function buildIndicesPutAlias (opts) {
|
||||
|
||||
if ((index) != null && (name) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||
} else {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name)
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name)
|
||||
}
|
||||
|
||||
// build request object
|
||||
|
||||
@ -12,7 +12,7 @@ function buildMlDeleteDataFrameAnalytics (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
|
||||
'force'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
@ -21,7 +21,7 @@ function buildMlDeleteTrainedModel (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.delete_trained_model request
|
||||
* TODO
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference.html
|
||||
*/
|
||||
return function mlDeleteTrainedModel (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -14,19 +14,21 @@ function buildMlGetTrainedModels (opts) {
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'include_model_definition',
|
||||
'decompress_definition',
|
||||
'from',
|
||||
'size'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
includeModelDefinition: 'include_model_definition'
|
||||
includeModelDefinition: 'include_model_definition',
|
||||
decompressDefinition: 'decompress_definition'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a ml.get_trained_models request
|
||||
* TODO
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference.html
|
||||
*/
|
||||
return function mlGetTrainedModels (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -24,7 +24,7 @@ function buildMlGetTrainedModelsStats (opts) {
|
||||
|
||||
/**
|
||||
* Perform a ml.get_trained_models_stats request
|
||||
* TODO
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html
|
||||
*/
|
||||
return function mlGetTrainedModelsStats (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -67,16 +67,16 @@ function buildNodesHotThreads (opts) {
|
||||
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'
|
||||
} else if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + 'hot_threads'
|
||||
|
||||
3
api/requestParams.d.ts
vendored
3
api/requestParams.d.ts
vendored
@ -124,7 +124,6 @@ export interface CatNodes extends Generic {
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
full_id?: boolean;
|
||||
local?: boolean;
|
||||
master_timeout?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
@ -1578,6 +1577,7 @@ export interface MlDeleteCalendarJob extends Generic {
|
||||
|
||||
export interface MlDeleteDataFrameAnalytics extends Generic {
|
||||
id: string;
|
||||
force?: boolean;
|
||||
}
|
||||
|
||||
export interface MlDeleteDatafeed extends Generic {
|
||||
@ -1790,6 +1790,7 @@ export interface MlGetTrainedModels extends Generic {
|
||||
model_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
include_model_definition?: boolean;
|
||||
decompress_definition?: boolean;
|
||||
from?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user