API generation

This commit is contained in:
delvedor
2020-11-02 08:04:26 +01:00
parent 3e60b6726d
commit 4b8077b40d
5 changed files with 35 additions and 31 deletions

View File

@ -58,7 +58,7 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
return this.transport.request(request, options, callback)
}
AutoscalingApi.prototype.getAutoscalingDecision = function autoscalingGetAutoscalingDecisionApi (params, options, callback) {
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
var { method, body, ...querystring } = params
@ -66,7 +66,7 @@ AutoscalingApi.prototype.getAutoscalingDecision = function autoscalingGetAutosca
var path = ''
if (method == null) method = 'GET'
path = '/' + '_autoscaling' + '/' + 'decision'
path = '/' + '_autoscaling' + '/' + 'capacity'
// build request object
const request = {
@ -139,7 +139,7 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
Object.defineProperties(AutoscalingApi.prototype, {
delete_autoscaling_policy: { get () { return this.deleteAutoscalingPolicy } },
get_autoscaling_decision: { get () { return this.getAutoscalingDecision } },
get_autoscaling_capacity: { get () { return this.getAutoscalingCapacity } },
get_autoscaling_policy: { get () { return this.getAutoscalingPolicy } },
put_autoscaling_policy: { get () { return this.putAutoscalingPolicy } }
})

2
api/kibana.d.ts vendored
View File

@ -82,7 +82,7 @@ interface KibanaClient {
}
autoscaling: {
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putAutoscalingPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingPutAutoscalingPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}

View File

@ -89,7 +89,7 @@ export interface AutoscalingDeleteAutoscalingPolicy extends Generic {
name: string;
}
export interface AutoscalingGetAutoscalingDecision extends Generic {
export interface AutoscalingGetAutoscalingCapacity extends Generic {
}
export interface AutoscalingGetAutoscalingPolicy extends Generic {

View File

@ -353,13 +353,13 @@ link:{ref}/autoscaling-delete-autoscaling-policy.html[Documentation] +
|===
[discrete]
=== autoscaling.getAutoscalingDecision
=== autoscaling.getAutoscalingCapacity
*Stability:* experimental
[source,ts]
----
client.autoscaling.getAutoscalingDecision()
client.autoscaling.getAutoscalingCapacity()
----
link:{ref}/autoscaling-get-autoscaling-decision.html[Documentation] +
link:{ref}/autoscaling-get-autoscaling-capacity.html[Documentation] +
[discrete]
@ -733,7 +733,9 @@ link:{ref}/cat-indices.html[Documentation] +
|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values
|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)
|`boolean` - Return local information, do not retrieve the state from master node (default: false) +
WARNING: This parameter has been deprecated.
|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node
@ -1371,7 +1373,9 @@ link:{ref}/cat-shards.html[Documentation] +
|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values
|`local`
|`boolean` - Return local information, do not retrieve the state from master node (default: false)
|`boolean` - Return local information, do not retrieve the state from master node (default: false) +
WARNING: This parameter has been deprecated.
|`master_timeout` or `masterTimeout`
|`string` - Explicit operation timeout for connection to master node
@ -6052,7 +6056,7 @@ link:{ref}/ml-delete-calendar-job.html[Documentation] +
[discrete]
=== ml.deleteDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.deleteDataFrameAnalytics({
@ -6220,7 +6224,7 @@ link:{ref}/ml-delete-snapshot.html[Documentation] +
[discrete]
=== ml.deleteTrainedModel
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.deleteTrainedModel({
@ -6254,7 +6258,7 @@ link:{ref}/ml-apis.html[Documentation] +
[discrete]
=== ml.evaluateDataFrame
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.evaluateDataFrame({
@ -6271,7 +6275,7 @@ link:{ref}/evaluate-dfanalytics.html[Documentation] +
[discrete]
=== ml.explainDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.explainDataFrameAnalytics({
@ -6602,7 +6606,7 @@ link:{ref}/ml-get-category.html[Documentation] +
[discrete]
=== ml.getDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.getDataFrameAnalytics({
@ -6637,7 +6641,7 @@ _Default:_ `100`
[discrete]
=== ml.getDataFrameAnalyticsStats
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.getDataFrameAnalyticsStats({
@ -7023,7 +7027,7 @@ link:{ref}/ml-get-record.html[Documentation] +
[discrete]
=== ml.getTrainedModels
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.getTrainedModels({
@ -7077,7 +7081,7 @@ _Default:_ `100`
[discrete]
=== ml.getTrainedModelsStats
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.getTrainedModelsStats({
@ -7244,7 +7248,7 @@ link:{ref}/ml-put-calendar-job.html[Documentation] +
[discrete]
=== ml.putDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.putDataFrameAnalytics({
@ -7344,7 +7348,7 @@ link:{ref}/ml-put-job.html[Documentation] +
[discrete]
=== ml.putTrainedModel
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.putTrainedModel({
@ -7415,7 +7419,7 @@ link:{ref}/ml-set-upgrade-mode.html[Documentation] +
[discrete]
=== ml.startDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.startDataFrameAnalytics({
@ -7473,7 +7477,7 @@ link:{ref}/ml-start-datafeed.html[Documentation] +
[discrete]
=== ml.stopDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.stopDataFrameAnalytics({
@ -7545,7 +7549,7 @@ WARNING: This parameter has been deprecated.
[discrete]
=== ml.updateDataFrameAnalytics
*Stability:* experimental
*Stability:* beta
[source,ts]
----
client.ml.updateDataFrameAnalytics({

16
index.d.ts vendored
View File

@ -176,14 +176,14 @@ declare class Client {
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_decision<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_autoscaling_decision<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_decision<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_decision<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_capacity<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_autoscaling_capacity<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_capacity<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_capacity<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_policy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_autoscaling_policy<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_autoscaling_policy<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingPolicy, callback: callbackFn<TResponse, TContext>): TransportRequestCallback