Skip to content

Auto-generated code for 9.1 #2936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions docs/reference/api-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular whitespace character detected: U+2009 (Thin Space). This may impair Markdown rendering.
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html
comment: |
Expand Down Expand Up @@ -1015,6 +1015,7 @@
## client.info [_info]
Get cluster info.
Get basic build, version, and cluster information.
::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.

[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info)

Expand Down Expand Up @@ -4624,7 +4625,12 @@
It is valid only for the CSV format.
- **`drop_null_columns` (Optional, boolean)**: Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
- **`format` (Optional, Enum("csv" \| "json" \| "tsv" \| "txt" \| "yaml" \| "cbor" \| "smile" \| "arrow"))**: A short version of the Accept header, for example `json` or `yaml`.
- **`format` (Optional, Enum("csv" \| "json" \| "tsv" \| "txt" \| "yaml" \| "cbor" \| "smile" \| "arrow"))**: A short version of the Accept header, e.g. json, yaml.

`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.

For async requests, nothing will be returned if the async query doesn't finish within the timeout.
The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.

## client.esql.asyncQueryDelete [_esql.async_query_delete]
Delete an async ES|QL query.
Expand Down Expand Up @@ -4745,6 +4751,8 @@
object with information about the clusters that participated in the search along with info such as shards
count.
- **`format` (Optional, Enum("csv" \| "json" \| "tsv" \| "txt" \| "yaml" \| "cbor" \| "smile" \| "arrow"))**: A short version of the Accept header, e.g. json, yaml.

`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
- **`delimiter` (Optional, string)**: The character to use between values within a CSV row. Only valid for the CSV format.
- **`drop_null_columns` (Optional, boolean)**: Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.
Expand Down Expand Up @@ -7612,6 +7620,7 @@
The following integrations are available through the inference API. You can find the available task types next to the integration name:
* AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
* Amazon Bedrock (`completion`, `text_embedding`)
* Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)
* Anthropic (`completion`)
* Azure AI Studio (`completion`, `text_embedding`)
* Azure OpenAI (`completion`, `text_embedding`)
Expand Down Expand Up @@ -7692,14 +7701,28 @@
- **`timeout` (Optional, string \| -1 \| 0)**: Specifies the amount of time to wait for the inference endpoint to be created.

## client.inference.putAmazonsagemaker [_inference.put_amazonsagemaker]
Configure a Amazon SageMaker inference endpoint
Create an Amazon SageMaker inference endpoint.

[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-amazon-sagemaker.html)
Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.

[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker)

```ts
client.inference.putAmazonsagemaker()
client.inference.putAmazonsagemaker({ task_type, amazonsagemaker_inference_id, service, service_settings })
```

### Arguments [_arguments_inference.put_amazonsagemaker]

#### Request (object) [_request_inference.put_amazonsagemaker]
- **`task_type` (Enum("text_embedding" \| "completion" \| "chat_completion" \| "sparse_embedding" \| "rerank"))**: The type of the inference task that the model will perform.
- **`amazonsagemaker_inference_id` (string)**: The unique identifier of the inference endpoint.
- **`service` (Enum("amazon_sagemaker"))**: The type of service supported for the specified task type. In this case, `amazon_sagemaker`.
- **`service_settings` ({ access_key, endpoint_name, api, region, secret_key, target_model, target_container_hostname, inference_component_name, batch_size, dimensions })**: Settings used to install the inference model.
These settings are specific to the `amazon_sagemaker` service and `service_settings.api` you specified.
- **`chunking_settings` (Optional, { max_chunk_size, overlap, sentence_overlap, strategy })**: The chunking configuration object.
- **`task_settings` (Optional, { custom_attributes, enable_explanations, inference_id, session_id, target_variant })**: Settings to configure the inference task.
These settings are specific to the task type and `service_settings.api` you specified.
- **`timeout` (Optional, string \| -1 \| 0)**: Specifies the amount of time to wait for the inference endpoint to be created.

## client.inference.putAnthropic [_inference.put_anthropic]
Create an Anthropic inference endpoint.
Expand Down
45 changes: 32 additions & 13 deletions src/api/api/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,15 @@ export default class Inference {
'task_type',
'amazonsagemaker_inference_id'
],
body: [],
query: []
body: [
'chunking_settings',
'service',
'service_settings',
'task_settings'
],
query: [
'timeout'
]
},
'inference.put_anthropic': {
path: [
Expand Down Expand Up @@ -716,7 +723,7 @@ export default class Inference {
}

/**
* Create an inference endpoint. IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. The following integrations are available through the inference API. You can find the available task types next to the integration name: * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`) * Amazon Bedrock (`completion`, `text_embedding`) * Anthropic (`completion`) * Azure AI Studio (`completion`, `text_embedding`) * Azure OpenAI (`completion`, `text_embedding`) * Cohere (`completion`, `rerank`, `text_embedding`) * DeepSeek (`completion`, `chat_completion`) * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland) * ELSER (`sparse_embedding`) * Google AI Studio (`completion`, `text_embedding`) * Google Vertex AI (`rerank`, `text_embedding`) * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) * Mistral (`chat_completion`, `completion`, `text_embedding`) * OpenAI (`chat_completion`, `completion`, `text_embedding`) * VoyageAI (`text_embedding`, `rerank`) * Watsonx inference integration (`text_embedding`) * JinaAI (`text_embedding`, `rerank`)
* Create an inference endpoint. IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. The following integrations are available through the inference API. You can find the available task types next to the integration name: * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`) * Amazon Bedrock (`completion`, `text_embedding`) * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`) * Anthropic (`completion`) * Azure AI Studio (`completion`, `text_embedding`) * Azure OpenAI (`completion`, `text_embedding`) * Cohere (`completion`, `rerank`, `text_embedding`) * DeepSeek (`completion`, `chat_completion`) * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland) * ELSER (`sparse_embedding`) * Google AI Studio (`completion`, `text_embedding`) * Google Vertex AI (`rerank`, `text_embedding`) * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`) * Mistral (`chat_completion`, `completion`, `text_embedding`) * OpenAI (`chat_completion`, `completion`, `text_embedding`) * VoyageAI (`text_embedding`, `rerank`) * Watsonx inference integration (`text_embedding`) * JinaAI (`text_embedding`, `rerank`)
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put | Elasticsearch API documentation}
*/
async put (this: That, params: T.InferencePutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferencePutResponse>
Expand Down Expand Up @@ -887,15 +894,17 @@ export default class Inference {
}

/**
* Configure a Amazon SageMaker inference endpoint
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.1/infer-service-amazon-sagemaker.html | Elasticsearch API documentation}
* Create an Amazon SageMaker inference endpoint. Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker | Elasticsearch API documentation}
*/
async putAmazonsagemaker (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async putAmazonsagemaker (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async putAmazonsagemaker (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async putAmazonsagemaker (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
async putAmazonsagemaker (this: That, params: T.InferencePutAmazonsagemakerRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferencePutAmazonsagemakerResponse>
async putAmazonsagemaker (this: That, params: T.InferencePutAmazonsagemakerRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferencePutAmazonsagemakerResponse, unknown>>
async putAmazonsagemaker (this: That, params: T.InferencePutAmazonsagemakerRequest, options?: TransportRequestOptions): Promise<T.InferencePutAmazonsagemakerResponse>
async putAmazonsagemaker (this: That, params: T.InferencePutAmazonsagemakerRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
} = this.acceptedParams['inference.put_amazonsagemaker']

const userQuery = params?.querystring
Expand All @@ -911,12 +920,22 @@ export default class Inference {
}
}

params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
querystring[key] = params[key]
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/api/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const acceptedParams: Record<string, { path: string[], body: string[], query: st
}

/**
* Get cluster info. Get basic build, version, and cluster information.
* Get cluster info. Get basic build, version, and cluster information. ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info | Elasticsearch API documentation}
*/
export default async function InfoApi (this: That, params?: T.InfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InfoResponse>
Expand Down
Loading
Loading