diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index eab5e41af..3cf8ba8a8 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -3845,6 +3845,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. @@ -8169,6 +8170,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. @@ -8706,7 +8717,7 @@ The only valid task type for the model to perform is `text_embedding`. [discrete] ==== rerank -Perform rereanking inference on the service +Perform reranking inference on the service {ref}/post-inference-api.html[Endpoint documentation] [source,ts] @@ -13238,16 +13249,9 @@ To check whether a user has a specific list of privileges, use the has privilege {ref}/security-api-get-user-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.getUserPrivileges({ ... }) +client.security.getUserPrivileges() ---- -[discrete] -==== Arguments - -* *Request (object):* -** *`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)* [discrete] ==== get_user_profile @@ -13322,6 +13326,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. [discrete] ==== has_privileges @@ -14670,6 +14678,8 @@ client.snapshot.delete({ repository, snapshot }) ** *`repository` (string)*: A repository name ** *`snapshot` (string)*: A list of snapshot names ** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`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. [discrete] ==== delete_repository diff --git a/src/api/api/inference.ts b/src/api/api/inference.ts index 06e30dd75..a63390658 100644 --- a/src/api/api/inference.ts +++ b/src/api/api/inference.ts @@ -218,7 +218,7 @@ export default class Inference { async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['task_type', 'inference_id'] - const acceptedBody: string[] = ['query', 'input', 'task_settings'] + const acceptedBody: string[] = ['query', 'input', 'input_type', 'task_settings'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body @@ -1105,7 +1105,7 @@ export default class Inference { } /** - * Perform rereanking inference on the service + * Perform reranking inference on the service * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html | Elasticsearch API documentation} */ async rerank (this: That, params: T.InferenceRerankRequest | TB.InferenceRerankRequest, options?: TransportRequestOptionsWithOutMeta): Promise diff --git a/src/api/types.ts b/src/api/types.ts index 628466584..270373d22 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -9383,6 +9383,7 @@ export type ClusterExistsComponentTemplateResponse = boolean export interface ClusterGetComponentTemplateRequest extends RequestBase { name?: Name flat_settings?: boolean + settings_filter?: string | string[] include_defaults?: boolean local?: boolean master_timeout?: Duration @@ -13782,6 +13783,7 @@ export interface InferenceInferenceRequest extends RequestBase { timeout?: Duration query?: string input: string | string[] + input_type?: string task_settings?: InferenceTaskSettings } @@ -19595,9 +19597,6 @@ export interface SecurityGetUserRequest extends RequestBase { export type SecurityGetUserResponse = Record export interface SecurityGetUserPrivilegesRequest extends RequestBase { - application?: Name - priviledge?: Name - username?: Name | null } export interface SecurityGetUserPrivilegesResponse { @@ -19635,6 +19634,7 @@ export interface SecurityGrantApiKeyGrantApiKey { } export interface SecurityGrantApiKeyRequest extends RequestBase { + refresh?: Refresh api_key: SecurityGrantApiKeyGrantApiKey grant_type: SecurityGrantApiKeyApiKeyGrantType access_token?: string @@ -20596,6 +20596,7 @@ export interface SnapshotDeleteRequest extends RequestBase { repository: Name snapshot: Name master_timeout?: Duration + wait_for_completion?: boolean } export type SnapshotDeleteResponse = AcknowledgedResponseBase diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 3b1ab9c97..6d1430e1a 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -9479,6 +9479,7 @@ export type ClusterExistsComponentTemplateResponse = boolean export interface ClusterGetComponentTemplateRequest extends RequestBase { name?: Name flat_settings?: boolean + settings_filter?: string | string[] include_defaults?: boolean local?: boolean master_timeout?: Duration @@ -14030,6 +14031,7 @@ export interface InferenceInferenceRequest extends RequestBase { body?: { query?: string input: string | string[] + input_type?: string task_settings?: InferenceTaskSettings } } @@ -20097,9 +20099,6 @@ export interface SecurityGetUserRequest extends RequestBase { export type SecurityGetUserResponse = Record export interface SecurityGetUserPrivilegesRequest extends RequestBase { - application?: Name - priviledge?: Name - username?: Name | null } export interface SecurityGetUserPrivilegesResponse { @@ -20137,6 +20136,7 @@ export interface SecurityGrantApiKeyGrantApiKey { } export interface SecurityGrantApiKeyRequest extends RequestBase { + refresh?: Refresh /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { api_key: SecurityGrantApiKeyGrantApiKey @@ -21188,6 +21188,7 @@ export interface SnapshotDeleteRequest extends RequestBase { repository: Name snapshot: Name master_timeout?: Duration + wait_for_completion?: boolean } export type SnapshotDeleteResponse = AcknowledgedResponseBase