Skip to content

Auto-generated code for 8.19 #2905

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

Open
wants to merge 1 commit into
base: 8.19
Choose a base branch
from
Open
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
28 changes: 19 additions & 9 deletions docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/api/api/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export default class Inference {
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceInferenceResponse>
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<any> {
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<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
Expand Down Expand Up @@ -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<T.InferenceRerankResponse>
Expand Down
7 changes: 4 additions & 3 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -13782,6 +13783,7 @@ export interface InferenceInferenceRequest extends RequestBase {
timeout?: Duration
query?: string
input: string | string[]
input_type?: string
task_settings?: InferenceTaskSettings
}

Expand Down Expand Up @@ -19595,9 +19597,6 @@ export interface SecurityGetUserRequest extends RequestBase {
export type SecurityGetUserResponse = Record<string, SecurityUser>

export interface SecurityGetUserPrivilegesRequest extends RequestBase {
application?: Name
priviledge?: Name
username?: Name | null
}

export interface SecurityGetUserPrivilegesResponse {
Expand Down Expand Up @@ -19635,6 +19634,7 @@ export interface SecurityGrantApiKeyGrantApiKey {
}

export interface SecurityGrantApiKeyRequest extends RequestBase {
refresh?: Refresh
api_key: SecurityGrantApiKeyGrantApiKey
grant_type: SecurityGrantApiKeyApiKeyGrantType
access_token?: string
Expand Down Expand Up @@ -20596,6 +20596,7 @@ export interface SnapshotDeleteRequest extends RequestBase {
repository: Name
snapshot: Name
master_timeout?: Duration
wait_for_completion?: boolean
}

export type SnapshotDeleteResponse = AcknowledgedResponseBase
Expand Down
7 changes: 4 additions & 3 deletions src/api/typesWithBodyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -14030,6 +14031,7 @@ export interface InferenceInferenceRequest extends RequestBase {
body?: {
query?: string
input: string | string[]
input_type?: string
task_settings?: InferenceTaskSettings
}
}
Expand Down Expand Up @@ -20097,9 +20099,6 @@ export interface SecurityGetUserRequest extends RequestBase {
export type SecurityGetUserResponse = Record<string, SecurityUser>

export interface SecurityGetUserPrivilegesRequest extends RequestBase {
application?: Name
priviledge?: Name
username?: Name | null
}

export interface SecurityGetUserPrivilegesResponse {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -21188,6 +21188,7 @@ export interface SnapshotDeleteRequest extends RequestBase {
repository: Name
snapshot: Name
master_timeout?: Duration
wait_for_completion?: boolean
}

export type SnapshotDeleteResponse = AcknowledgedResponseBase
Expand Down
Loading