Skip to content

Auto-generated code for main #2805

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
Apr 28, 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
13 changes: 9 additions & 4 deletions docs/reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,6 @@ PUT my-index-000001/_doc/1?version=2&version_type=external
"id": "elkbee"
}
}
```

In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
Expand Down Expand Up @@ -9211,7 +9210,7 @@ retrieval. This allows the configuration to be in an acceptable format to
be retrieved and then added to another cluster.

## client.ml.getDataFrameAnalyticsStats [_ml.get_data_frame_analytics_stats]
Get data frame analytics jobs usage info.
Get data frame analytics job stats.

[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats)

Expand Down Expand Up @@ -9241,7 +9240,7 @@ there are no matches or only partial matches.
- **`verbose` (Optional, boolean)**: Defines whether the stats response should be verbose.

## client.ml.getDatafeedStats [_ml.get_datafeed_stats]
Get datafeeds usage info.
Get datafeed stats.
You can get statistics for multiple datafeeds in a single API request by
using a list of datafeeds or a wildcard expression. You can
get statistics for all datafeeds by using `_all`, by specifying `*` as the
Expand Down Expand Up @@ -9357,7 +9356,7 @@ influencers are sorted by the `influencer_score` value.
means it is unset and results are not limited to specific timestamps.

## client.ml.getJobStats [_ml.get_job_stats]
Get anomaly detection jobs usage info.
Get anomaly detection job stats.

[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats)

Expand Down Expand Up @@ -14245,6 +14244,8 @@ client.synonyms.deleteSynonymRule({ set_id, rule_id })
#### Request (object) [_request_synonyms.delete_synonym_rule]
- **`set_id` (string)**: The ID of the synonym set to update.
- **`rule_id` (string)**: The ID of the synonym rule to delete.
- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning.
If `false`, analyzers will not be reloaded with the deleted synonym rule

## client.synonyms.getSynonym [_synonyms.get_synonym]
Get a synonym set.
Expand Down Expand Up @@ -14313,6 +14314,8 @@ client.synonyms.putSynonym({ id, synonyms_set })
#### Request (object) [_request_synonyms.put_synonym]
- **`id` (string)**: The ID of the synonyms set to be created or updated.
- **`synonyms_set` ({ id, synonyms } | { id, synonyms }[])**: The synonym rules definitions for the synonyms set.
- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.
If `false`, analyzers will not be reloaded with the new synonym set

## client.synonyms.putSynonymRule [_synonyms.put_synonym_rule]
Create or update a synonym rule.
Expand All @@ -14334,6 +14337,8 @@ client.synonyms.putSynonymRule({ set_id, rule_id, synonyms })
- **`set_id` (string)**: The ID of the synonym set.
- **`rule_id` (string)**: The ID of the synonym rule to be updated or created.
- **`synonyms` (string)**: The synonym rule information definition, which must be in Solr format.
- **`refresh` (Optional, boolean)**: If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.
If `false`, analyzers will not be reloaded with the new synonym rule

## client.tasks.cancel [_tasks.cancel]
Cancel a task.
Expand Down
6 changes: 3 additions & 3 deletions src/api/api/ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ export default class Ml {
}

/**
* Get data frame analytics jobs usage info.
* Get data frame analytics job stats.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats | Elasticsearch API documentation}
*/
async getDataFrameAnalyticsStats (this: That, params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetDataFrameAnalyticsStatsResponse>
Expand Down Expand Up @@ -2283,7 +2283,7 @@ export default class Ml {
}

/**
* Get datafeeds usage info. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using `_all`, by specifying `*` as the `<feed_id>`, or by omitting the `<feed_id>`. If the datafeed is stopped, the only information you receive is the `datafeed_id` and the `state`. This API returns a maximum of 10,000 datafeeds.
* Get datafeed stats. You can get statistics for multiple datafeeds in a single API request by using a comma-separated list of datafeeds or a wildcard expression. You can get statistics for all datafeeds by using `_all`, by specifying `*` as the `<feed_id>`, or by omitting the `<feed_id>`. If the datafeed is stopped, the only information you receive is the `datafeed_id` and the `state`. This API returns a maximum of 10,000 datafeeds.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats | Elasticsearch API documentation}
*/
async getDatafeedStats (this: That, params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetDatafeedStatsResponse>
Expand Down Expand Up @@ -2499,7 +2499,7 @@ export default class Ml {
}

/**
* Get anomaly detection jobs usage info.
* Get anomaly detection job stats.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats | Elasticsearch API documentation}
*/
async getJobStats (this: That, params?: T.MlGetJobStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetJobStatsResponse>
Expand Down
12 changes: 9 additions & 3 deletions src/api/api/synonyms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export default class Synonyms {
'rule_id'
],
body: [],
query: []
query: [
'refresh'
]
},
'synonyms.get_synonym': {
path: [
Expand Down Expand Up @@ -83,7 +85,9 @@ export default class Synonyms {
body: [
'synonyms_set'
],
query: []
query: [
'refresh'
]
},
'synonyms.put_synonym_rule': {
path: [
Expand All @@ -93,7 +97,9 @@ export default class Synonyms {
body: [
'synonyms'
],
query: []
query: [
'refresh'
]
}
}
}
Expand Down
33 changes: 24 additions & 9 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34908,9 +34908,9 @@ export type SynonymsSynonymString = string
export interface SynonymsSynonymsUpdateResult {
/** The update operation result. */
result: Result
/** Updating synonyms in a synonym set reloads the associated analyzers.
/** Updating synonyms in a synonym set can reload the associated analyzers in case refresh is set to true.
* This information is the analyzers reloading result. */
reload_analyzers_details: IndicesReloadSearchAnalyzersReloadResult
reload_analyzers_details?: IndicesReloadSearchAnalyzersReloadResult
}

export interface SynonymsDeleteSynonymRequest extends RequestBase {
Expand All @@ -34929,10 +34929,14 @@ export interface SynonymsDeleteSynonymRuleRequest extends RequestBase {
set_id: Id
/** The ID of the synonym rule to delete. */
rule_id: Id
/** If `true`, the request will refresh the analyzers with the deleted synonym rule and wait for the new synonyms to be available before returning.
* If `false`, analyzers will not be reloaded with the deleted synonym rule
* @remarks This property is not supported on Elastic Cloud Serverless. */
refresh?: boolean
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never }
body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never }
querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never }
}

export type SynonymsDeleteSynonymRuleResponse = SynonymsSynonymsUpdateResult
Expand Down Expand Up @@ -34998,30 +35002,41 @@ export interface SynonymsGetSynonymsSetsSynonymsSetItem {
export interface SynonymsPutSynonymRequest extends RequestBase {
/** The ID of the synonyms set to be created or updated. */
id: Id
/** If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning.
* If `false`, analyzers will not be reloaded with the new synonym set
* @remarks This property is not supported on Elastic Cloud Serverless. */
refresh?: boolean
/** The synonym rules definitions for the synonyms set. */
synonyms_set: SynonymsSynonymRule | SynonymsSynonymRule[]
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { id?: never, synonyms_set?: never }
body?: string | { [key: string]: any } & { id?: never, refresh?: never, synonyms_set?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { id?: never, synonyms_set?: never }
querystring?: { [key: string]: any } & { id?: never, refresh?: never, synonyms_set?: never }
}

export interface SynonymsPutSynonymResponse {
/** The update operation result. */
result: Result
reload_analyzers_details: IndicesReloadSearchAnalyzersReloadResult
/** Updating a synonyms set can reload the associated analyzers in case refresh is set to true.
* This information is the analyzers reloading result. */
reload_analyzers_details?: IndicesReloadSearchAnalyzersReloadResult
}

export interface SynonymsPutSynonymRuleRequest extends RequestBase {
/** The ID of the synonym set. */
set_id: Id
/** The ID of the synonym rule to be updated or created. */
rule_id: Id
/** If `true`, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.
* If `false`, analyzers will not be reloaded with the new synonym rule
* @remarks This property is not supported on Elastic Cloud Serverless. */
refresh?: boolean
/** The synonym rule information definition, which must be in Solr format. */
synonyms: SynonymsSynonymString
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, synonyms?: never }
body?: string | { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never, synonyms?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, synonyms?: never }
querystring?: { [key: string]: any } & { set_id?: never, rule_id?: never, refresh?: never, synonyms?: never }
}

export type SynonymsPutSynonymRuleResponse = SynonymsSynonymsUpdateResult
Expand Down