From fc3883a1813c4b8214dd43d3e4bc2684fc7cc08c Mon Sep 17 00:00:00 2001 From: delvedor Date: Mon, 2 Nov 2020 08:03:45 +0100 Subject: [PATCH] API generation --- api/api/autoscaling.js | 6 ++--- api/kibana.d.ts | 2 +- api/requestParams.d.ts | 4 ++- docs/reference.asciidoc | 54 ++++++++++++++++++++++++++--------------- index.d.ts | 16 ++++++------ 5 files changed, 49 insertions(+), 33 deletions(-) diff --git a/api/api/autoscaling.js b/api/api/autoscaling.js index 7a968b06c..622fcd2e8 100644 --- a/api/api/autoscaling.js +++ b/api/api/autoscaling.js @@ -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 } } }) diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 922a14d9c..c99854da7 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -82,7 +82,7 @@ interface KibanaClient { } autoscaling: { deleteAutoscalingPolicy, TContext = Context>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise> - getAutoscalingDecision, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise> + getAutoscalingCapacity, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise> getAutoscalingPolicy, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise> putAutoscalingPolicy, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.AutoscalingPutAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise> } diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 5ef7087f2..f2d86a1f4 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -91,7 +91,7 @@ export interface AutoscalingDeleteAutoscalingPolicy extends Generic { name: string; } -export interface AutoscalingGetAutoscalingDecision extends Generic { +export interface AutoscalingGetAutoscalingCapacity extends Generic { } export interface AutoscalingGetAutoscalingPolicy extends Generic { @@ -983,6 +983,7 @@ export interface IndicesDeleteAlias extends Generic { export interface IndicesDeleteDataStream extends Generic { name: string | string[]; + expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; } export interface IndicesDeleteIndexTemplate extends Generic { @@ -1090,6 +1091,7 @@ export interface IndicesGetAlias extends Generic { export interface IndicesGetDataStream extends Generic { name?: string | string[]; + expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; } export interface IndicesGetFieldMapping extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 498a99285..1f0af6e4c 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -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 @@ -1365,7 +1367,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 @@ -3983,7 +3987,8 @@ link:{ref}/indices-aliases.html[Documentation] + [source,ts] ---- client.indices.deleteDataStream({ - name: string | string[] + name: string | string[], + expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- link:{ref}/data-streams.html[Documentation] + @@ -3992,6 +3997,10 @@ link:{ref}/data-streams.html[Documentation] + |`name` |`string \| string[]` - A comma-separated list of data streams to delete; use `*` to delete all data streams +|`expand_wildcards` or `expandWildcards` +|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + +_Default:_ `open` + |=== [discrete] @@ -4432,7 +4441,8 @@ _Default:_ `all` [source,ts] ---- client.indices.getDataStream({ - name: string | string[] + name: string | string[], + expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all' }) ---- link:{ref}/data-streams.html[Documentation] + @@ -4441,6 +4451,10 @@ link:{ref}/data-streams.html[Documentation] + |`name` |`string \| string[]` - A comma-separated list of data streams to get; use `*` to get all data streams +|`expand_wildcards` or `expandWildcards` +|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether wildcard expressions should get expanded to open or closed indices (default: open) + +_Default:_ `open` + |=== [discrete] @@ -5904,7 +5918,7 @@ link:{ref}/ml-delete-calendar-job.html[Documentation] + [discrete] === ml.deleteDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.deleteDataFrameAnalytics({ @@ -6072,7 +6086,7 @@ link:{ref}/ml-delete-snapshot.html[Documentation] + [discrete] === ml.deleteTrainedModel -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.deleteTrainedModel({ @@ -6106,7 +6120,7 @@ link:{ref}/ml-apis.html[Documentation] + [discrete] === ml.evaluateDataFrame -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.evaluateDataFrame({ @@ -6123,7 +6137,7 @@ link:{ref}/evaluate-dfanalytics.html[Documentation] + [discrete] === ml.explainDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.explainDataFrameAnalytics({ @@ -6454,7 +6468,7 @@ link:{ref}/ml-get-category.html[Documentation] + [discrete] === ml.getDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.getDataFrameAnalytics({ @@ -6489,7 +6503,7 @@ _Default:_ `100` [discrete] === ml.getDataFrameAnalyticsStats -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.getDataFrameAnalyticsStats({ @@ -6875,7 +6889,7 @@ link:{ref}/ml-get-record.html[Documentation] + [discrete] === ml.getTrainedModels -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.getTrainedModels({ @@ -6929,7 +6943,7 @@ _Default:_ `100` [discrete] === ml.getTrainedModelsStats -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.getTrainedModelsStats({ @@ -7096,7 +7110,7 @@ link:{ref}/ml-put-calendar-job.html[Documentation] + [discrete] === ml.putDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.putDataFrameAnalytics({ @@ -7196,7 +7210,7 @@ link:{ref}/ml-put-job.html[Documentation] + [discrete] === ml.putTrainedModel -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.putTrainedModel({ @@ -7267,7 +7281,7 @@ link:{ref}/ml-set-upgrade-mode.html[Documentation] + [discrete] === ml.startDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.startDataFrameAnalytics({ @@ -7325,7 +7339,7 @@ link:{ref}/ml-start-datafeed.html[Documentation] + [discrete] === ml.stopDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.stopDataFrameAnalytics({ @@ -7397,7 +7411,7 @@ WARNING: This parameter has been deprecated. [discrete] === ml.updateDataFrameAnalytics -*Stability:* experimental +*Stability:* beta [source,ts] ---- client.ml.updateDataFrameAnalytics({ diff --git a/index.d.ts b/index.d.ts index 2fb512f6a..1000c7ed7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -176,14 +176,14 @@ declare class Client { deleteAutoscalingPolicy, TContext = Context>(callback: callbackFn): TransportRequestCallback deleteAutoscalingPolicy, TContext = Context>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, callback: callbackFn): TransportRequestCallback deleteAutoscalingPolicy, TContext = Context>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - get_autoscaling_decision, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise> - get_autoscaling_decision, TContext = Context>(callback: callbackFn): TransportRequestCallback - get_autoscaling_decision, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, callback: callbackFn): TransportRequestCallback - get_autoscaling_decision, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - getAutoscalingDecision, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise> - getAutoscalingDecision, TContext = Context>(callback: callbackFn): TransportRequestCallback - getAutoscalingDecision, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, callback: callbackFn): TransportRequestCallback - getAutoscalingDecision, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingDecision, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + get_autoscaling_capacity, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise> + get_autoscaling_capacity, TContext = Context>(callback: callbackFn): TransportRequestCallback + get_autoscaling_capacity, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, callback: callbackFn): TransportRequestCallback + get_autoscaling_capacity, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + getAutoscalingCapacity, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise> + getAutoscalingCapacity, TContext = Context>(callback: callbackFn): TransportRequestCallback + getAutoscalingCapacity, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, callback: callbackFn): TransportRequestCallback + getAutoscalingCapacity, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingCapacity, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback get_autoscaling_policy, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise> get_autoscaling_policy, TContext = Context>(callback: callbackFn): TransportRequestCallback get_autoscaling_policy, TContext = Context>(params: RequestParams.AutoscalingGetAutoscalingPolicy, callback: callbackFn): TransportRequestCallback