Skip to content

Commit 4019fc0

Browse files
authored
Generate docstrings and better API reference docs for 8.8 branch (#1942)
1 parent a7355e7 commit 4019fc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+6787
-433
lines changed

docs/reference.asciidoc

Lines changed: 5065 additions & 429 deletions
Large diffs are not rendered by default.

src/api/api/async_search.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export default class AsyncSearch {
4343
this.transport = transport
4444
}
4545

46+
/**
47+
* Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
48+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/async-search.html | Elasticsearch API documentation}
49+
*/
4650
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>
4751
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchDeleteResponse, unknown>>
4852
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchDeleteResponse>
@@ -65,6 +69,10 @@ export default class AsyncSearch {
6569
return await this.transport.request({ path, method, querystring, body }, options)
6670
}
6771

72+
/**
73+
* Retrieves the results of a previously submitted async search request given its ID.
74+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/async-search.html | Elasticsearch API documentation}
75+
*/
6876
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
6977
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument, TAggregations>, unknown>>
7078
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
@@ -87,6 +95,10 @@ export default class AsyncSearch {
8795
return await this.transport.request({ path, method, querystring, body }, options)
8896
}
8997

98+
/**
99+
* Retrieves the status of a previously submitted async search request given its ID.
100+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/async-search.html | Elasticsearch API documentation}
101+
*/
90102
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>
91103
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchStatusResponse, unknown>>
92104
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchStatusResponse>
@@ -109,6 +121,10 @@ export default class AsyncSearch {
109121
return await this.transport.request({ path, method, querystring, body }, options)
110122
}
111123

124+
/**
125+
* Executes a search request asynchronously.
126+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/async-search.html | Elasticsearch API documentation}
127+
*/
112128
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>
113129
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument, TAggregations>, unknown>>
114130
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>

src/api/api/autoscaling.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export default class Autoscaling {
4343
this.transport = transport
4444
}
4545

46+
/**
47+
* Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
48+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
49+
*/
4650
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
4751
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, unknown>>
4852
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
@@ -65,6 +69,10 @@ export default class Autoscaling {
6569
return await this.transport.request({ path, method, querystring, body }, options)
6670
}
6771

72+
/**
73+
* Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
74+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
75+
*/
6876
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
6977
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, unknown>>
7078
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
@@ -88,6 +96,10 @@ export default class Autoscaling {
8896
return await this.transport.request({ path, method, querystring, body }, options)
8997
}
9098

99+
/**
100+
* Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
101+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
102+
*/
91103
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
92104
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, unknown>>
93105
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
@@ -110,6 +122,10 @@ export default class Autoscaling {
110122
return await this.transport.request({ path, method, querystring, body }, options)
111123
}
112124

125+
/**
126+
* Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
127+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
128+
*/
113129
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>
114130
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, unknown>>
115131
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingPutAutoscalingPolicyResponse>

src/api/api/bulk.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ import * as T from '../types'
3737
import * as TB from '../typesWithBodyKey'
3838
interface That { transport: Transport }
3939

40+
/**
41+
* Allows to perform multiple index/update/delete operations in a single request.
42+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.8/docs-bulk.html | Elasticsearch API documentation}
43+
*/
4044
export default async function BulkApi<TDocument = unknown, TPartialDocument = unknown> (this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>
4145
export default async function BulkApi<TDocument = unknown, TPartialDocument = unknown> (this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>
4246
export default async function BulkApi<TDocument = unknown, TPartialDocument = unknown> (this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<T.BulkResponse>

0 commit comments

Comments
 (0)