Skip to content

Commit 1e94717

Browse files
Auto-generated API code (#2905)
1 parent fdd4227 commit 1e94717

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

docs/reference.asciidoc

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3845,6 +3845,7 @@ client.cluster.getComponentTemplate({ ... })
38453845
** *`name` (Optional, string)*: List of component template names used to limit the request.
38463846
Wildcard (`*`) expressions are supported.
38473847
** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
3848+
** *`settings_filter` (Optional, string | string[])*: Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
38483849
** *`include_defaults` (Optional, boolean)*: Return all default configurations for the component template (default: false)
38493850
** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only.
38503851
If `false`, information is retrieved from the master node.
@@ -8169,6 +8170,16 @@ It can be a single string or an array.
81698170
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion" | "chat_completion"))*: The type of inference task that the model performs.
81708171
** *`query` (Optional, string)*: The query input, which is required only for the `rerank` task.
81718172
It is not required for other tasks.
8173+
** *`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:
8174+
* `SEARCH`
8175+
* `INGEST`
8176+
* `CLASSIFICATION`
8177+
* `CLUSTERING`
8178+
Not all services support all values. Unsupported values will trigger a validation exception.
8179+
Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.
8180+
8181+
> info
8182+
> 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`.
81728183
** *`task_settings` (Optional, User-defined value)*: Task settings for the individual inference request.
81738184
These settings are specific to the task type you specified and override the task settings specified when initializing the service.
81748185
** *`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`.
87068717

87078718
[discrete]
87088719
==== rerank
8709-
Perform rereanking inference on the service
8720+
Perform reranking inference on the service
87108721

87118722
{ref}/post-inference-api.html[Endpoint documentation]
87128723
[source,ts]
@@ -13238,16 +13249,9 @@ To check whether a user has a specific list of privileges, use the has privilege
1323813249
{ref}/security-api-get-user-privileges.html[Endpoint documentation]
1323913250
[source,ts]
1324013251
----
13241-
client.security.getUserPrivileges({ ... })
13252+
client.security.getUserPrivileges()
1324213253
----
1324313254

13244-
[discrete]
13245-
==== Arguments
13246-
13247-
* *Request (object):*
13248-
** *`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.
13249-
** *`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.
13250-
** *`username` (Optional, string | null)*
1325113255

1325213256
[discrete]
1325313257
==== get_user_profile
@@ -13322,6 +13326,10 @@ It is not valid with other grant types.
1332213326
If you specify the `password` grant type, this parameter is required.
1332313327
It is not valid with other grant types.
1332413328
** *`run_as` (Optional, string)*: The name of the user to be impersonated.
13329+
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation
13330+
visible to search.
13331+
If 'wait_for', it waits for a refresh to make this operation visible to search.
13332+
If 'false', nothing is done with refreshes.
1332513333

1332613334
[discrete]
1332713335
==== has_privileges
@@ -14670,6 +14678,8 @@ client.snapshot.delete({ repository, snapshot })
1467014678
** *`repository` (string)*: A repository name
1467114679
** *`snapshot` (string)*: A list of snapshot names
1467214680
** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node
14681+
** *`wait_for_completion` (Optional, boolean)*: If `true`, the request returns a response when the matching snapshots are all deleted.
14682+
If `false`, the request returns a response as soon as the deletes are scheduled.
1467314683

1467414684
[discrete]
1467514685
==== delete_repository

src/api/api/inference.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default class Inference {
218218
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceInferenceResponse>
219219
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<any> {
220220
const acceptedPath: string[] = ['task_type', 'inference_id']
221-
const acceptedBody: string[] = ['query', 'input', 'task_settings']
221+
const acceptedBody: string[] = ['query', 'input', 'input_type', 'task_settings']
222222
const querystring: Record<string, any> = {}
223223
// @ts-expect-error
224224
const userBody: any = params?.body
@@ -1105,7 +1105,7 @@ export default class Inference {
11051105
}
11061106

11071107
/**
1108-
* Perform rereanking inference on the service
1108+
* Perform reranking inference on the service
11091109
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/post-inference-api.html | Elasticsearch API documentation}
11101110
*/
11111111
async rerank (this: That, params: T.InferenceRerankRequest | TB.InferenceRerankRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceRerankResponse>

src/api/types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9383,6 +9383,7 @@ export type ClusterExistsComponentTemplateResponse = boolean
93839383
export interface ClusterGetComponentTemplateRequest extends RequestBase {
93849384
name?: Name
93859385
flat_settings?: boolean
9386+
settings_filter?: string | string[]
93869387
include_defaults?: boolean
93879388
local?: boolean
93889389
master_timeout?: Duration
@@ -13782,6 +13783,7 @@ export interface InferenceInferenceRequest extends RequestBase {
1378213783
timeout?: Duration
1378313784
query?: string
1378413785
input: string | string[]
13786+
input_type?: string
1378513787
task_settings?: InferenceTaskSettings
1378613788
}
1378713789

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

1959719599
export interface SecurityGetUserPrivilegesRequest extends RequestBase {
19598-
application?: Name
19599-
priviledge?: Name
19600-
username?: Name | null
1960119600
}
1960219601

1960319602
export interface SecurityGetUserPrivilegesResponse {
@@ -19635,6 +19634,7 @@ export interface SecurityGrantApiKeyGrantApiKey {
1963519634
}
1963619635

1963719636
export interface SecurityGrantApiKeyRequest extends RequestBase {
19637+
refresh?: Refresh
1963819638
api_key: SecurityGrantApiKeyGrantApiKey
1963919639
grant_type: SecurityGrantApiKeyApiKeyGrantType
1964019640
access_token?: string
@@ -20596,6 +20596,7 @@ export interface SnapshotDeleteRequest extends RequestBase {
2059620596
repository: Name
2059720597
snapshot: Name
2059820598
master_timeout?: Duration
20599+
wait_for_completion?: boolean
2059920600
}
2060020601

2060120602
export type SnapshotDeleteResponse = AcknowledgedResponseBase

src/api/typesWithBodyKey.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9479,6 +9479,7 @@ export type ClusterExistsComponentTemplateResponse = boolean
94799479
export interface ClusterGetComponentTemplateRequest extends RequestBase {
94809480
name?: Name
94819481
flat_settings?: boolean
9482+
settings_filter?: string | string[]
94829483
include_defaults?: boolean
94839484
local?: boolean
94849485
master_timeout?: Duration
@@ -14030,6 +14031,7 @@ export interface InferenceInferenceRequest extends RequestBase {
1403014031
body?: {
1403114032
query?: string
1403214033
input: string | string[]
14034+
input_type?: string
1403314035
task_settings?: InferenceTaskSettings
1403414036
}
1403514037
}
@@ -20097,9 +20099,6 @@ export interface SecurityGetUserRequest extends RequestBase {
2009720099
export type SecurityGetUserResponse = Record<string, SecurityUser>
2009820100

2009920101
export interface SecurityGetUserPrivilegesRequest extends RequestBase {
20100-
application?: Name
20101-
priviledge?: Name
20102-
username?: Name | null
2010320102
}
2010420103

2010520104
export interface SecurityGetUserPrivilegesResponse {
@@ -20137,6 +20136,7 @@ export interface SecurityGrantApiKeyGrantApiKey {
2013720136
}
2013820137

2013920138
export interface SecurityGrantApiKeyRequest extends RequestBase {
20139+
refresh?: Refresh
2014020140
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
2014120141
body?: {
2014220142
api_key: SecurityGrantApiKeyGrantApiKey
@@ -21188,6 +21188,7 @@ export interface SnapshotDeleteRequest extends RequestBase {
2118821188
repository: Name
2118921189
snapshot: Name
2119021190
master_timeout?: Duration
21191+
wait_for_completion?: boolean
2119121192
}
2119221193

2119321194
export type SnapshotDeleteResponse = AcknowledgedResponseBase

0 commit comments

Comments
 (0)