API generation

This commit is contained in:
delvedor
2021-11-03 13:37:32 +01:00
parent dc905aaabc
commit bb7393a084
4 changed files with 12 additions and 7 deletions

View File

@ -73,10 +73,10 @@ FleetApi.prototype.msearch = function fleetMsearchApi (params, options, callback
let path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_msearch'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_msearch'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_fleet' + '/' + '_msearch'
path = '/' + '_fleet' + '/' + '_fleet_msearch'
}
// build request object
@ -104,7 +104,7 @@ FleetApi.prototype.search = function fleetSearchApi (params, options, callback)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_search'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_search'
// build request object
const request = {

View File

@ -23,7 +23,7 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'timeout', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreIdleThreads: 'ignore_idle_threads', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments' }
function NodesApi (transport, ConfigurationError) {

View File

@ -2066,7 +2066,8 @@ export interface NodesHotThreads extends Generic {
snapshots?: number;
threads?: number;
ignore_idle_threads?: boolean;
type?: 'cpu' | 'wait' | 'block';
type?: 'cpu' | 'wait' | 'block' | 'mem';
sort?: 'cpu' | 'total';
timeout?: string;
}

View File

@ -8520,7 +8520,8 @@ client.nodes.hotThreads({
snapshots: number,
threads: number,
ignore_idle_threads: boolean,
type: 'cpu' | 'wait' | 'block',
type: 'cpu' | 'wait' | 'block' | 'mem',
sort: 'cpu' | 'total',
timeout: string
})
----
@ -8543,7 +8544,10 @@ link:{ref}/cluster-nodes-hot-threads.html[Documentation] +
|`boolean` - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
|`type`
|`'cpu' \| 'wait' \| 'block'` - The type to sample (default: cpu)
|`'cpu' \| 'wait' \| 'block' \| 'mem'` - The type to sample (default: cpu)
|`sort`
|`'cpu' \| 'total'` - The sort order for 'cpu' type (default: total)
|`timeout`
|`string` - Explicit operation timeout