diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md index 323a5a73b..cdcd3e8c9 100644 --- a/docs/reference/api-reference.md +++ b/docs/reference/api-reference.md @@ -754,6 +754,7 @@ client.get({ id, index }) - **`routing` (Optional, string)**: A custom value used to route operations to a specific shard. - **`_source` (Optional, boolean \| string \| string[])**: Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return. - **`_source_excludes` (Optional, string \| string[])**: A list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. +- **`_source_exclude_vectors` (Optional, boolean)**: Whether vectors should be excluded from _source - **`_source_includes` (Optional, string \| string[])**: A list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. - **`stored_fields` (Optional, string \| string[])**: A list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to `false`. Only leaf fields can be retrieved with the `stored_fields` option. Object fields can't be returned; if specified, the request fails. - **`version` (Optional, number)**: The version number for concurrency control. It must match the current version of the document for the request to succeed. @@ -831,7 +832,6 @@ client.getSource({ id, index }) - **`_source` (Optional, boolean \| string \| string[])**: Indicates whether to return the `_source` field (`true` or `false`) or lists the fields to return. - **`_source_excludes` (Optional, string \| string[])**: A list of source fields to exclude in the response. - **`_source_includes` (Optional, string \| string[])**: A list of source fields to include in the response. -- **`stored_fields` (Optional, string \| string[])**: A list of stored fields to return as part of a hit. - **`version` (Optional, number)**: The version number for concurrency control. It must match the current version of the document for the request to succeed. - **`version_type` (Optional, Enum("internal" \| "external" \| "external_gte" \| "force"))**: The version type. @@ -1014,6 +1014,7 @@ client.index({ index }) - **`version_type` (Optional, Enum("internal" \| "external" \| "external_gte" \| "force"))**: The version type. - **`wait_for_active_shards` (Optional, number \| Enum("all" \| "index-setting"))**: The number of shard copies that must be active before proceeding with the operation. You can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). The default value of `1` means it waits for each primary shard to be active. - **`require_alias` (Optional, boolean)**: If `true`, the destination must be an index alias. +- **`require_data_stream` (Optional, boolean)**: If `true`, the request's actions must target a data stream (existing or to be created). ## client.info [_info] Get cluster info. @@ -1559,6 +1560,7 @@ client.search({ ... }) - **`typed_keys` (Optional, boolean)**: If `true`, aggregation and suggester names are be prefixed by their respective types in the response. - **`rest_total_hits_as_int` (Optional, boolean)**: Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. - **`_source_excludes` (Optional, string \| string[])**: A list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. +- **`_source_exclude_vectors` (Optional, boolean)**: Whether vectors should be excluded from _source - **`_source_includes` (Optional, string \| string[])**: A list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. - **`q` (Optional, string)**: A query in the Lucene query string syntax. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. IMPORTANT: This parameter overrides the query parameter in the request body. If both parameters are specified, documents matching the query request body parameter are not returned. - **`force_synthetic_source` (Optional, boolean)**: Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. @@ -3464,6 +3466,7 @@ client.cluster.getComponentTemplate({ ... }) - **`name` (Optional, string)**: List of component template names used to limit the request. Wildcard (`*`) expressions are supported. - **`flat_settings` (Optional, boolean)**: If `true`, returns settings in flat format. +- **`settings_filter` (Optional, string \| string[])**: Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys - **`include_defaults` (Optional, boolean)**: Return all default configurations for the component template (default: false) - **`local` (Optional, boolean)**: If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the master node. @@ -3649,6 +3652,7 @@ To unset `_meta`, replace the template without specifying this information. - **`deprecated` (Optional, boolean)**: Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning. - **`create` (Optional, boolean)**: If `true`, this request cannot replace or update existing component templates. +- **`cause` (Optional, string)**: User defined reason for create the component template. - **`master_timeout` (Optional, string \| -1 \| 0)**: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. @@ -3778,7 +3782,7 @@ client.cluster.state({ ... }) - **`flat_settings` (Optional, boolean)**: Return settings in flat format (default: false) - **`ignore_unavailable` (Optional, boolean)**: Whether specified concrete indices should be ignored when unavailable (missing or closed) - **`local` (Optional, boolean)**: Return local information, do not retrieve the state from master node (default: false) -- **`master_timeout` (Optional, string \| -1 \| 0)**: Specify timeout for connection to master +- **`master_timeout` (Optional, string \| -1 \| 0)**: Timeout for waiting for new cluster state in case it is blocked - **`wait_for_metadata_version` (Optional, number)**: Wait for the metadata version to be equal or greater than the specified metadata version - **`wait_for_timeout` (Optional, string \| -1 \| 0)**: The maximum time to wait for wait_for_metadata_version before timing out @@ -6119,6 +6123,25 @@ Supports a list of values, such as `open,hidden`. - **`master_timeout` (Optional, string \| -1 \| 0)**: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. - **`verbose` (Optional, boolean)**: Whether the maximum timestamp for each data stream should be calculated and returned. +## client.indices.getDataStreamMappings [_indices.get_data_stream_mappings] +Get data stream mappings. + +Get mapping information for one or more data streams. + +[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-mappings) + +```ts +client.indices.getDataStreamMappings({ name }) +``` + +### Arguments [_arguments_indices.get_data_stream_mappings] + +#### Request (object) [_request_indices.get_data_stream_mappings] +- **`name` (string \| string[])**: A list of data streams or data stream patterns. Supports wildcards (`*`). +- **`master_timeout` (Optional, string \| -1 \| 0)**: The period to wait for a connection to the master node. If no response is +received before the timeout expires, the request fails and returns an +error. + ## client.indices.getDataStreamOptions [_indices.get_data_stream_options] Get data stream options. @@ -6510,6 +6533,33 @@ error. - **`timeout` (Optional, string \| -1 \| 0)**: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +## client.indices.putDataStreamMappings [_indices.put_data_stream_mappings] +Update data stream mappings. + +This API can be used to override mappings on specific data streams. These overrides will take precedence over what +is specified in the template that the data stream matches. The mapping change is only applied to new write indices +that are created during rollover after this API is called. No indices are changed by this API. + +[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings) + +```ts +client.indices.putDataStreamMappings({ name }) +``` + +### Arguments [_arguments_indices.put_data_stream_mappings] + +#### Request (object) [_request_indices.put_data_stream_mappings] +- **`name` (string \| string[])**: A list of data streams or data stream patterns. +- **`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects, _data_stream_timestamp })** +- **`dry_run` (Optional, boolean)**: If `true`, the request does not actually change the mappings on any data streams. Instead, it +simulates changing the settings and reports back to the user what would have happened had these settings +actually been applied. +- **`master_timeout` (Optional, string \| -1 \| 0)**: The period to wait for a connection to the master node. If no response is +received before the timeout expires, the request fails and returns an +error. +- **`timeout` (Optional, string \| -1 \| 0)**: The period to wait for a response. If no response is received before the + timeout expires, the request fails and returns an error. + ## client.indices.putDataStreamOptions [_indices.put_data_stream_options] Update data stream options. Update the data stream options of the specified data streams. @@ -7582,6 +7632,16 @@ It can be a single string or an array. - **`task_type` (Optional, Enum("sparse_embedding" \| "text_embedding" \| "rerank" \| "completion" \| "chat_completion"))**: The type of inference task that the model performs. - **`query` (Optional, string)**: The query input, which is required only for the `rerank` task. It is not required for other tasks. +- **`input_type` (Optional, string)**: Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include: +* `SEARCH` +* `INGEST` +* `CLASSIFICATION` +* `CLUSTERING` +Not all services support all values. Unsupported values will trigger a validation exception. +Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + +> info +> The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`. - **`task_settings` (Optional, User-defined value)**: Task settings for the individual inference request. These settings are specific to the task type you specified and override the task settings specified when initializing the service. - **`timeout` (Optional, string \| -1 \| 0)**: The amount of time to wait for the inference request to complete. @@ -8084,7 +8144,7 @@ client.inference.putWatsonx({ task_type, watsonx_inference_id, service, service_ - **`service_settings` ({ api_key, api_version, model_id, project_id, rate_limit, url })**: Settings used to install the inference model. These settings are specific to the `watsonxai` service. ## client.inference.rerank [_inference.rerank] -Perform rereanking inference on the service +Perform reranking inference on the service [Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference) @@ -8292,9 +8352,6 @@ client.ingest.getIpLocationDatabase({ ... }) - **`id` (Optional, string \| string[])**: List of database configuration IDs to retrieve. Wildcard (`*`) expressions are supported. To get all database configurations, omit this parameter or use `*`. -- **`master_timeout` (Optional, string \| -1 \| 0)**: The period to wait for a connection to the master node. -If no response is received before the timeout expires, the request fails and returns an error. -A value of `-1` indicates that the request should never time out. ## client.ingest.getPipeline [_ingest.get_pipeline] Get pipelines. @@ -8553,7 +8610,7 @@ client.license.postStartTrial({ ... }) #### Request (object) [_request_license.post_start_trial] - **`acknowledge` (Optional, boolean)**: whether the user has acknowledged acknowledge messages (default: false) -- **`type_query_string` (Optional, string)** +- **`type` (Optional, string)**: The type of trial license to generate (default: "trial") - **`master_timeout` (Optional, string \| -1 \| 0)**: Period to wait for a connection to the master node. ## client.logstash.deletePipeline [_logstash.delete_pipeline] @@ -12233,15 +12290,9 @@ To check whether a user has a specific list of privileges, use the has privilege [Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges) ```ts -client.security.getUserPrivileges({ ... }) +client.security.getUserPrivileges() ``` -### Arguments [_arguments_security.get_user_privileges] - -#### Request (object) [_request_security.get_user_privileges] -- **`application` (Optional, string)**: The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. -- **`priviledge` (Optional, string)**: The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. -- **`username` (Optional, string \| null)** ## client.security.getUserProfile [_security.get_user_profile] Get a user profile. @@ -12312,6 +12363,10 @@ It is not valid with other grant types. If you specify the `password` grant type, this parameter is required. It is not valid with other grant types. - **`run_as` (Optional, string)**: The name of the user to be impersonated. +- **`refresh` (Optional, Enum(true \| false \| "wait_for"))**: If 'true', Elasticsearch refreshes the affected shards to make this operation +visible to search. +If 'wait_for', it waits for a refresh to make this operation visible to search. +If 'false', nothing is done with refreshes. ## client.security.hasPrivileges [_security.has_privileges] Check user privileges. @@ -13617,6 +13672,8 @@ It also accepts wildcards (`*`). - **`master_timeout` (Optional, string \| -1 \| 0)**: The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to `-1`. +- **`wait_for_completion` (Optional, boolean)**: If `true`, the request returns a response when the matching snapshots are all deleted. +If `false`, the request returns a response as soon as the deletes are scheduled. ## client.snapshot.deleteRepository [_snapshot.delete_repository] Delete snapshot repositories. diff --git a/src/api/api/cluster.ts b/src/api/api/cluster.ts index 06f615279..c7ca51911 100644 --- a/src/api/api/cluster.ts +++ b/src/api/api/cluster.ts @@ -84,6 +84,7 @@ export default class Cluster { body: [], query: [ 'flat_settings', + 'settings_filter', 'include_defaults', 'local', 'master_timeout' @@ -155,6 +156,7 @@ export default class Cluster { ], query: [ 'create', + 'cause', 'master_timeout' ] }, diff --git a/src/api/api/get.ts b/src/api/api/get.ts index 6b8c79f55..5150eef02 100644 --- a/src/api/api/get.ts +++ b/src/api/api/get.ts @@ -41,6 +41,7 @@ const acceptedParams: Record - async getDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async getDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise - async getDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise { + async getDataStreamMappings (this: That, params: T.IndicesGetDataStreamMappingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async getDataStreamMappings (this: That, params: T.IndicesGetDataStreamMappingsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async getDataStreamMappings (this: That, params: T.IndicesGetDataStreamMappingsRequest, options?: TransportRequestOptions): Promise + async getDataStreamMappings (this: That, params: T.IndicesGetDataStreamMappingsRequest, options?: TransportRequestOptions): Promise { const { path: acceptedPath } = this.acceptedParams['indices.get_data_stream_mappings'] @@ -2531,11 +2539,11 @@ export default class Indices { } } - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body' && key !== 'querystring') { + // @ts-expect-error querystring[key] = params[key] } } @@ -3314,36 +3322,38 @@ export default class Indices { } /** - * Updates a data stream's mappings - * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html | Elasticsearch API documentation} + * Update data stream mappings. This API can be used to override mappings on specific data streams. These overrides will take precedence over what is specified in the template that the data stream matches. The mapping change is only applied to new write indices that are created during rollover after this API is called. No indices are changed by this API. + * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-mappings | Elasticsearch API documentation} */ - async putDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async putDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async putDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise - async putDataStreamMappings (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise { + async putDataStreamMappings (this: That, params: T.IndicesPutDataStreamMappingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async putDataStreamMappings (this: That, params: T.IndicesPutDataStreamMappingsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async putDataStreamMappings (this: That, params: T.IndicesPutDataStreamMappingsRequest, options?: TransportRequestOptions): Promise + async putDataStreamMappings (this: That, params: T.IndicesPutDataStreamMappingsRequest, options?: TransportRequestOptions): Promise { const { - path: acceptedPath + path: acceptedPath, + body: acceptedBody, + query: acceptedQuery } = this.acceptedParams['indices.put_data_stream_mappings'] const userQuery = params?.querystring const querystring: Record = userQuery != null ? { ...userQuery } : {} - let body: Record | string | undefined - const userBody = params?.body - if (userBody != null) { - if (typeof userBody === 'string') { - body = userBody - } else { - body = { ...userBody } - } - } - - params = params ?? {} + let body: any = params.body ?? undefined for (const key in params) { - if (acceptedPath.includes(key)) { + if (acceptedBody.includes(key)) { + // @ts-expect-error + body = 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] + } } } diff --git a/src/api/api/inference.ts b/src/api/api/inference.ts index 8f0287319..f8f0df4ff 100644 --- a/src/api/api/inference.ts +++ b/src/api/api/inference.ts @@ -85,6 +85,7 @@ export default class Inference { body: [ 'query', 'input', + 'input_type', 'task_settings' ], query: [ @@ -1751,7 +1752,7 @@ export default class Inference { } /** - * Perform rereanking inference on the service + * Perform reranking inference on the service * @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference | Elasticsearch API documentation} */ async rerank (this: That, params: T.InferenceRerankRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/api/ingest.ts b/src/api/api/ingest.ts index e5bc73147..732135791 100644 --- a/src/api/api/ingest.ts +++ b/src/api/api/ingest.ts @@ -82,9 +82,7 @@ export default class Ingest { 'id' ], body: [], - query: [ - 'master_timeout' - ] + query: [] }, 'ingest.get_pipeline': { path: [ diff --git a/src/api/api/license.ts b/src/api/api/license.ts index 8a1fb00d1..b9072b867 100644 --- a/src/api/api/license.ts +++ b/src/api/api/license.ts @@ -87,7 +87,7 @@ export default class License { body: [], query: [ 'acknowledge', - 'type_query_string', + 'type', 'master_timeout' ] } diff --git a/src/api/api/reindex.ts b/src/api/api/reindex.ts index c5af7c2bb..2a6fedd23 100644 --- a/src/api/api/reindex.ts +++ b/src/api/api/reindex.ts @@ -44,6 +44,7 @@ const acceptedParams: Record = GetGetResult @@ -944,17 +946,15 @@ export interface GetSourceRequest extends RequestBase { _source_excludes?: Fields /** A comma-separated list of source fields to include in the response. */ _source_includes?: Fields - /** A comma-separated list of stored fields to return as part of a hit. */ - stored_fields?: Fields /** The version number for concurrency control. * It must match the current version of the document for the request to succeed. */ version?: VersionNumber /** The version type. */ version_type?: VersionType /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { id?: never, index?: never, preference?: never, realtime?: never, refresh?: never, routing?: never, _source?: never, _source_excludes?: never, _source_includes?: never, stored_fields?: never, version?: never, version_type?: never } + body?: string | { [key: string]: any } & { id?: never, index?: never, preference?: never, realtime?: never, refresh?: never, routing?: never, _source?: never, _source_excludes?: never, _source_includes?: never, version?: never, version_type?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { id?: never, index?: never, preference?: never, realtime?: never, refresh?: never, routing?: never, _source?: never, _source_excludes?: never, _source_includes?: never, stored_fields?: never, version?: never, version_type?: never } + querystring?: { [key: string]: any } & { id?: never, index?: never, preference?: never, realtime?: never, refresh?: never, routing?: never, _source?: never, _source_excludes?: never, _source_includes?: never, version?: never, version_type?: never } } export type GetSourceResponse = TDocument @@ -1206,11 +1206,13 @@ export interface IndexRequest extends RequestBase { wait_for_active_shards?: WaitForActiveShards /** If `true`, the destination must be an index alias. */ require_alias?: boolean + /** If `true`, the request's actions must target a data stream (existing or to be created). */ + require_data_stream?: boolean document?: TDocument /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { id?: never, index?: never, if_primary_term?: never, if_seq_no?: never, include_source_on_error?: never, op_type?: never, pipeline?: never, refresh?: never, routing?: never, timeout?: never, version?: never, version_type?: never, wait_for_active_shards?: never, require_alias?: never, document?: never } + body?: string | { [key: string]: any } & { id?: never, index?: never, if_primary_term?: never, if_seq_no?: never, include_source_on_error?: never, op_type?: never, pipeline?: never, refresh?: never, routing?: never, timeout?: never, version?: never, version_type?: never, wait_for_active_shards?: never, require_alias?: never, require_data_stream?: never, document?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { id?: never, index?: never, if_primary_term?: never, if_seq_no?: never, include_source_on_error?: never, op_type?: never, pipeline?: never, refresh?: never, routing?: never, timeout?: never, version?: never, version_type?: never, wait_for_active_shards?: never, require_alias?: never, document?: never } + querystring?: { [key: string]: any } & { id?: never, index?: never, if_primary_term?: never, if_seq_no?: never, include_source_on_error?: never, op_type?: never, pipeline?: never, refresh?: never, routing?: never, timeout?: never, version?: never, version_type?: never, wait_for_active_shards?: never, require_alias?: never, require_data_stream?: never, document?: never } } export type IndexResponse = WriteResponseBase @@ -2077,6 +2079,8 @@ export interface SearchRequest extends RequestBase { * You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. * If the `_source` parameter is `false`, this parameter is ignored. */ _source_excludes?: Fields + /** Whether vectors should be excluded from _source */ + _source_exclude_vectors?: boolean /** A comma-separated list of source fields to include in the response. * If this parameter is specified, only these source fields are returned. * You can exclude fields from this subset using the `_source_excludes` query parameter. @@ -2202,9 +2206,9 @@ export interface SearchRequest extends RequestBase { * You can retrieve these stats using the indices stats API. */ stats?: string[] /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { index?: never, allow_no_indices?: never, allow_partial_search_results?: never, analyzer?: never, analyze_wildcard?: never, batched_reduce_size?: never, ccs_minimize_roundtrips?: never, default_operator?: never, df?: never, expand_wildcards?: never, ignore_throttled?: never, ignore_unavailable?: never, include_named_queries_score?: never, lenient?: never, max_concurrent_shard_requests?: never, preference?: never, pre_filter_shard_size?: never, request_cache?: never, routing?: never, scroll?: never, search_type?: never, suggest_field?: never, suggest_mode?: never, suggest_size?: never, suggest_text?: never, typed_keys?: never, rest_total_hits_as_int?: never, _source_excludes?: never, _source_includes?: never, q?: never, force_synthetic_source?: never, aggregations?: never, aggs?: never, collapse?: never, explain?: never, ext?: never, from?: never, highlight?: never, track_total_hits?: never, indices_boost?: never, docvalue_fields?: never, knn?: never, rank?: never, min_score?: never, post_filter?: never, profile?: never, query?: never, rescore?: never, retriever?: never, script_fields?: never, search_after?: never, size?: never, slice?: never, sort?: never, _source?: never, fields?: never, suggest?: never, terminate_after?: never, timeout?: never, track_scores?: never, version?: never, seq_no_primary_term?: never, stored_fields?: never, pit?: never, runtime_mappings?: never, stats?: never } + body?: string | { [key: string]: any } & { index?: never, allow_no_indices?: never, allow_partial_search_results?: never, analyzer?: never, analyze_wildcard?: never, batched_reduce_size?: never, ccs_minimize_roundtrips?: never, default_operator?: never, df?: never, expand_wildcards?: never, ignore_throttled?: never, ignore_unavailable?: never, include_named_queries_score?: never, lenient?: never, max_concurrent_shard_requests?: never, preference?: never, pre_filter_shard_size?: never, request_cache?: never, routing?: never, scroll?: never, search_type?: never, suggest_field?: never, suggest_mode?: never, suggest_size?: never, suggest_text?: never, typed_keys?: never, rest_total_hits_as_int?: never, _source_excludes?: never, _source_exclude_vectors?: never, _source_includes?: never, q?: never, force_synthetic_source?: never, aggregations?: never, aggs?: never, collapse?: never, explain?: never, ext?: never, from?: never, highlight?: never, track_total_hits?: never, indices_boost?: never, docvalue_fields?: never, knn?: never, rank?: never, min_score?: never, post_filter?: never, profile?: never, query?: never, rescore?: never, retriever?: never, script_fields?: never, search_after?: never, size?: never, slice?: never, sort?: never, _source?: never, fields?: never, suggest?: never, terminate_after?: never, timeout?: never, track_scores?: never, version?: never, seq_no_primary_term?: never, stored_fields?: never, pit?: never, runtime_mappings?: never, stats?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { index?: never, allow_no_indices?: never, allow_partial_search_results?: never, analyzer?: never, analyze_wildcard?: never, batched_reduce_size?: never, ccs_minimize_roundtrips?: never, default_operator?: never, df?: never, expand_wildcards?: never, ignore_throttled?: never, ignore_unavailable?: never, include_named_queries_score?: never, lenient?: never, max_concurrent_shard_requests?: never, preference?: never, pre_filter_shard_size?: never, request_cache?: never, routing?: never, scroll?: never, search_type?: never, suggest_field?: never, suggest_mode?: never, suggest_size?: never, suggest_text?: never, typed_keys?: never, rest_total_hits_as_int?: never, _source_excludes?: never, _source_includes?: never, q?: never, force_synthetic_source?: never, aggregations?: never, aggs?: never, collapse?: never, explain?: never, ext?: never, from?: never, highlight?: never, track_total_hits?: never, indices_boost?: never, docvalue_fields?: never, knn?: never, rank?: never, min_score?: never, post_filter?: never, profile?: never, query?: never, rescore?: never, retriever?: never, script_fields?: never, search_after?: never, size?: never, slice?: never, sort?: never, _source?: never, fields?: never, suggest?: never, terminate_after?: never, timeout?: never, track_scores?: never, version?: never, seq_no_primary_term?: never, stored_fields?: never, pit?: never, runtime_mappings?: never, stats?: never } + querystring?: { [key: string]: any } & { index?: never, allow_no_indices?: never, allow_partial_search_results?: never, analyzer?: never, analyze_wildcard?: never, batched_reduce_size?: never, ccs_minimize_roundtrips?: never, default_operator?: never, df?: never, expand_wildcards?: never, ignore_throttled?: never, ignore_unavailable?: never, include_named_queries_score?: never, lenient?: never, max_concurrent_shard_requests?: never, preference?: never, pre_filter_shard_size?: never, request_cache?: never, routing?: never, scroll?: never, search_type?: never, suggest_field?: never, suggest_mode?: never, suggest_size?: never, suggest_text?: never, typed_keys?: never, rest_total_hits_as_int?: never, _source_excludes?: never, _source_exclude_vectors?: never, _source_includes?: never, q?: never, force_synthetic_source?: never, aggregations?: never, aggs?: never, collapse?: never, explain?: never, ext?: never, from?: never, highlight?: never, track_total_hits?: never, indices_boost?: never, docvalue_fields?: never, knn?: never, rank?: never, min_score?: never, post_filter?: never, profile?: never, query?: never, rescore?: never, retriever?: never, script_fields?: never, search_after?: never, size?: never, slice?: never, sort?: never, _source?: never, fields?: never, suggest?: never, terminate_after?: never, timeout?: never, track_scores?: never, version?: never, seq_no_primary_term?: never, stored_fields?: never, pit?: never, runtime_mappings?: never, stats?: never } } export type SearchResponse> = SearchResponseBody @@ -15810,6 +15814,8 @@ export interface ClusterGetComponentTemplateRequest extends RequestBase { name?: Name /** If `true`, returns settings in flat format. */ flat_settings?: boolean + /** Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys */ + settings_filter?: string | string[] /** Return all default configurations for the component template (default: false) */ include_defaults?: boolean /** If `true`, the request retrieves information from the local node only. @@ -15819,9 +15825,9 @@ export interface ClusterGetComponentTemplateRequest extends RequestBase { * If no response is received before the timeout expires, the request fails and returns an error. */ master_timeout?: Duration /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { name?: never, flat_settings?: never, include_defaults?: never, local?: never, master_timeout?: never } + body?: string | { [key: string]: any } & { name?: never, flat_settings?: never, settings_filter?: never, include_defaults?: never, local?: never, master_timeout?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { name?: never, flat_settings?: never, include_defaults?: never, local?: never, master_timeout?: never } + querystring?: { [key: string]: any } & { name?: never, flat_settings?: never, settings_filter?: never, include_defaults?: never, local?: never, master_timeout?: never } } export interface ClusterGetComponentTemplateResponse { @@ -16032,6 +16038,8 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase { name: Name /** If `true`, this request cannot replace or update existing component templates. */ create?: boolean + /** User defined reason for create the component template. */ + cause?: string /** Period to wait for a connection to the master node. * If no response is received before the timeout expires, the request fails and returns an error. */ master_timeout?: Duration @@ -16050,9 +16058,9 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase { * that uses deprecated components, Elasticsearch will emit a deprecation warning. */ deprecated?: boolean /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { name?: never, create?: never, master_timeout?: never, template?: never, version?: never, _meta?: never, deprecated?: never } + body?: string | { [key: string]: any } & { name?: never, create?: never, cause?: never, master_timeout?: never, template?: never, version?: never, _meta?: never, deprecated?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { name?: never, create?: never, master_timeout?: never, template?: never, version?: never, _meta?: never, deprecated?: never } + querystring?: { [key: string]: any } & { name?: never, create?: never, cause?: never, master_timeout?: never, template?: never, version?: never, _meta?: never, deprecated?: never } } export type ClusterPutComponentTemplateResponse = AcknowledgedResponseBase @@ -16242,7 +16250,7 @@ export interface ClusterStateRequest extends RequestBase { ignore_unavailable?: boolean /** Return local information, do not retrieve the state from master node (default: false) */ local?: boolean - /** Specify timeout for connection to master */ + /** Timeout for waiting for new cluster state in case it is blocked */ master_timeout?: Duration /** Wait for the metadata version to be equal or greater than the specified metadata version */ wait_for_metadata_version?: VersionNumber @@ -18802,6 +18810,9 @@ export interface IndicesDataStream { /** The settings specific to this data stream that will take precedence over the settings in the matching index * template. */ settings: IndicesIndexSettings + /** The mappings specific to this data stream that will take precedence over the mappings in the matching index + * template. */ + mappings?: MappingTypeMapping /** Health status of the data stream. * This health status is based on the state of the primary and replica shards of the stream’s backing indices. */ status: HealthStatus @@ -20407,6 +20418,33 @@ export interface IndicesGetDataStreamResponse { data_streams: IndicesDataStream[] } +export interface IndicesGetDataStreamMappingsDataStreamMappings { + /** The name of the data stream. */ + name: string + /** The settings specific to this data stream */ + mappings: MappingTypeMapping + /** The settings specific to this data stream merged with the settings from its template. These `effective_settings` + * are the settings that will be used when a new index is created for this data stream. */ + effective_mappings: MappingTypeMapping +} + +export interface IndicesGetDataStreamMappingsRequest extends RequestBase { + /** A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). */ + name: Indices + /** The period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an + * error. */ + master_timeout?: Duration + /** All values in `body` will be added to the request body. */ + body?: string | { [key: string]: any } & { name?: never, master_timeout?: never } + /** All values in `querystring` will be added to the request querystring. */ + querystring?: { [key: string]: any } & { name?: never, master_timeout?: never } +} + +export interface IndicesGetDataStreamMappingsResponse { + data_streams: IndicesGetDataStreamMappingsDataStreamMappings[] +} + export interface IndicesGetDataStreamOptionsDataStreamWithOptions { name: DataStreamName options?: IndicesDataStreamOptions @@ -20829,6 +20867,46 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase { export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase +export interface IndicesPutDataStreamMappingsRequest extends RequestBase { + /** A comma-separated list of data streams or data stream patterns. */ + name: Indices + /** If `true`, the request does not actually change the mappings on any data streams. Instead, it + * simulates changing the settings and reports back to the user what would have happened had these settings + * actually been applied. */ + dry_run?: boolean + /** The period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an + * error. */ + master_timeout?: Duration + /** The period to wait for a response. If no response is received before the + * timeout expires, the request fails and returns an error. */ + timeout?: Duration + mappings?: MappingTypeMapping + /** All values in `body` will be added to the request body. */ + body?: string | { [key: string]: any } & { name?: never, dry_run?: never, master_timeout?: never, timeout?: never, mappings?: never } + /** All values in `querystring` will be added to the request querystring. */ + querystring?: { [key: string]: any } & { name?: never, dry_run?: never, master_timeout?: never, timeout?: never, mappings?: never } +} + +export interface IndicesPutDataStreamMappingsResponse { + data_streams: IndicesPutDataStreamMappingsUpdatedDataStreamMappings[] +} + +export interface IndicesPutDataStreamMappingsUpdatedDataStreamMappings { + /** The data stream name. */ + name: IndexName + /** If the mappings were successfully applied to the data stream (or would have been, if running in `dry_run` + * mode), it is `true`. If an error occurred, it is `false`. */ + applied_to_data_stream: boolean + /** A message explaining why the mappings could not be applied to the data stream. */ + error?: string + /** The mappings that are specfic to this data stream that will override any mappings from the matching index template. */ + mappings?: MappingTypeMapping + /** The mappings that are effective on this data stream, taking into account the mappings from the matching index + * template and the mappings specific to this data stream. */ + effective_mappings?: MappingTypeMapping +} + export interface IndicesPutDataStreamOptionsRequest extends RequestBase { /** Comma-separated list of data streams used to limit the request. * Supports wildcards (`*`). @@ -23262,13 +23340,24 @@ export interface InferenceInferenceRequest extends RequestBase { * > info * > Inference endpoints for the `completion` task type currently only support a single string as input. */ input: string | string[] + /** Specifies the input data type for the text embedding model. The `input_type` parameter only applies to Inference Endpoints with the `text_embedding` task type. Possible values include: + * * `SEARCH` + * * `INGEST` + * * `CLASSIFICATION` + * * `CLUSTERING` + * Not all services support all values. Unsupported values will trigger a validation exception. + * Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info. + * + * > info + * > The `input_type` parameter specified on the root level of the request body will take precedence over the `input_type` parameter specified in `task_settings`. */ + input_type?: string /** Task settings for the individual inference request. * These settings are specific to the task type you specified and override the task settings specified when initializing the service. */ task_settings?: InferenceTaskSettings /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, task_settings?: never } + body?: string | { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, input_type?: never, task_settings?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, task_settings?: never } + querystring?: { [key: string]: any } & { task_type?: never, inference_id?: never, timeout?: never, query?: never, input?: never, input_type?: never, task_settings?: never } } export type InferenceInferenceResponse = InferenceInferenceResult @@ -24842,14 +24931,10 @@ export interface IngestGetIpLocationDatabaseRequest extends RequestBase { * Wildcard (`*`) expressions are supported. * To get all database configurations, omit this parameter or use `*`. */ id?: Ids - /** The period to wait for a connection to the master node. - * If no response is received before the timeout expires, the request fails and returns an error. - * A value of `-1` indicates that the request should never time out. */ - master_timeout?: Duration /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { id?: never, master_timeout?: never } + body?: string | { [key: string]: any } & { id?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { id?: never, master_timeout?: never } + querystring?: { [key: string]: any } & { id?: never } } export interface IngestGetIpLocationDatabaseResponse { @@ -25112,13 +25197,14 @@ export interface LicensePostStartBasicResponse { export interface LicensePostStartTrialRequest extends RequestBase { /** whether the user has acknowledged acknowledge messages (default: false) */ acknowledge?: boolean - type_query_string?: string + /** The type of trial license to generate (default: "trial") */ + type?: string /** Period to wait for a connection to the master node. */ master_timeout?: Duration /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { acknowledge?: never, type_query_string?: never, master_timeout?: never } + body?: string | { [key: string]: any } & { acknowledge?: never, type?: never, master_timeout?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { acknowledge?: never, type_query_string?: never, master_timeout?: never } + querystring?: { [key: string]: any } & { acknowledge?: never, type?: never, master_timeout?: never } } export interface LicensePostStartTrialResponse { @@ -33160,15 +33246,10 @@ export interface SecurityGetUserRequest extends RequestBase { export type SecurityGetUserResponse = Record export interface SecurityGetUserPrivilegesRequest extends RequestBase { - /** The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. */ - application?: Name - /** The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. */ - priviledge?: Name - username?: Name | null /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { application?: never, priviledge?: never, username?: never } + body?: string | { [key: string]: any } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { application?: never, priviledge?: never, username?: never } + querystring?: { [key: string]: any } } export interface SecurityGetUserPrivilegesResponse { @@ -33225,6 +33306,11 @@ export interface SecurityGrantApiKeyGrantApiKey { } export interface SecurityGrantApiKeyRequest extends RequestBase { + /** If 'true', Elasticsearch refreshes the affected shards to make this operation + * visible to search. + * If 'wait_for', it waits for a refresh to make this operation visible to search. + * If 'false', nothing is done with refreshes. */ + refresh?: Refresh /** The API key. */ api_key: SecurityGrantApiKeyGrantApiKey /** The type of grant. Supported grant types are: `access_token`, `password`. */ @@ -33244,9 +33330,9 @@ export interface SecurityGrantApiKeyRequest extends RequestBase { /** The name of the user to be impersonated. */ run_as?: Username /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { api_key?: never, grant_type?: never, access_token?: never, username?: never, password?: never, run_as?: never } + body?: string | { [key: string]: any } & { refresh?: never, api_key?: never, grant_type?: never, access_token?: never, username?: never, password?: never, run_as?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { api_key?: never, grant_type?: never, access_token?: never, username?: never, password?: never, run_as?: never } + querystring?: { [key: string]: any } & { refresh?: never, api_key?: never, grant_type?: never, access_token?: never, username?: never, password?: never, run_as?: never } } export interface SecurityGrantApiKeyResponse { @@ -35176,10 +35262,13 @@ export interface SnapshotDeleteRequest extends RequestBase { * If the master node is not available before the timeout expires, the request fails and returns an error. * To indicate that the request should never timeout, set it to `-1`. */ master_timeout?: Duration + /** If `true`, the request returns a response when the matching snapshots are all deleted. + * If `false`, the request returns a response as soon as the deletes are scheduled. */ + wait_for_completion?: boolean /** All values in `body` will be added to the request body. */ - body?: string | { [key: string]: any } & { repository?: never, snapshot?: never, master_timeout?: never } + body?: string | { [key: string]: any } & { repository?: never, snapshot?: never, master_timeout?: never, wait_for_completion?: never } /** All values in `querystring` will be added to the request querystring. */ - querystring?: { [key: string]: any } & { repository?: never, snapshot?: never, master_timeout?: never } + querystring?: { [key: string]: any } & { repository?: never, snapshot?: never, master_timeout?: never, wait_for_completion?: never } } export type SnapshotDeleteResponse = AcknowledgedResponseBase