Skip to content

Commit abc8597

Browse files
Auto-generated API code
1 parent 355e108 commit abc8597

File tree

4 files changed

+101
-40
lines changed

4 files changed

+101
-40
lines changed

docs/reference.asciidoc

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ client.bulk({ ... })
149149
* *Request (object):*
150150
** *`index` (Optional, string)*: The name of the data stream, index, or index alias to perform bulk actions on.
151151
** *`operations` (Optional, { index, create, update, delete } | { detect_noop, doc, doc_as_upsert, script, scripted_upsert, _source, upsert } | object[])*
152+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
152153
** *`list_executed_pipelines` (Optional, boolean)*: If `true`, the response will include the ingest pipelines that were run for each index or create.
153154
** *`pipeline` (Optional, string)*: The pipeline identifier to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. If a final pipeline is configured, it will always run regardless of the value of this parameter.
154155
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search. If `wait_for`, wait for a refresh to make this operation visible to search. If `false`, do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
@@ -323,6 +324,7 @@ client.create({ id, index })
323324
** *`id` (string)*: A unique identifier for the document. To automatically generate a document ID, use the `POST /<target>/_doc/` request format.
324325
** *`index` (string)*: The name of the data stream or index to target. If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. If the target doesn't exist and doesn’t match a data stream template, this request creates the index.
325326
** *`document` (Optional, object)*: A document.
327+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
326328
** *`pipeline` (Optional, string)*: The ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request. If a final pipeline is configured, it will always run regardless of the value of this parameter.
327329
** *`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`, it does nothing with refreshes.
328330
** *`routing` (Optional, string)*: A custom value that is used to route operations to a specific shard.
@@ -1031,6 +1033,7 @@ client.index({ index })
10311033
** *`document` (Optional, object)*: A document.
10321034
** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
10331035
** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
1036+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
10341037
** *`op_type` (Optional, Enum("index" | "create"))*: Set to `create` to only index the document if it does not already exist (put if absent). If a document with the specified `_id` already exists, the indexing operation will fail. The behavior is the same as using the `<index>/_create` endpoint. If a document ID is specified, this paramater defaults to `index`. Otherwise, it defaults to `create`. If the request targets a data stream, an `op_type` of `create` is required.
10351038
** *`pipeline` (Optional, string)*: The ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
10361039
** *`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`, it does nothing with refreshes.
@@ -2141,6 +2144,7 @@ client.update({ id, index })
21412144
** *`upsert` (Optional, object)*: If the document does not already exist, the contents of 'upsert' are inserted as a new document. If the document exists, the 'script' is run.
21422145
** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term.
21432146
** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number.
2147+
** *`include_source_on_error` (Optional, boolean)*: True or false if to include the document source in the error message in case of parsing errors.
21442148
** *`lang` (Optional, string)*: The script language.
21452149
** *`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', it does nothing with refreshes.
21462150
** *`require_alias` (Optional, boolean)*: If `true`, the destination must be an index alias.
@@ -2342,7 +2346,7 @@ client.asyncSearch.get({ id })
23422346

23432347
* *Request (object):*
23442348
** *`id` (string)*: A unique identifier for the async search.
2345-
** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search should be available in the cluster.
2349+
** *`keep_alive` (Optional, string | -1 | 0)*: The length of time that the async search should be available in the cluster.
23462350
When not specified, the `keep_alive` set with the corresponding submit async request will be used.
23472351
Otherwise, it is possible to override the value and extend the validity of the request.
23482352
When this period expires, the search, if still running, is cancelled.
@@ -2357,7 +2361,10 @@ By default no timeout is set meaning that the currently available results will b
23572361
Get the async search status.
23582362

23592363
Get the status of a previously submitted async search request given its identifier, without retrieving search results.
2360-
If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
2364+
If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:
2365+
2366+
* The user or API key that submitted the original async search request.
2367+
* Users that have the `monitor` cluster privilege or greater privileges.
23612368

23622369
{ref}/async-search.html[Endpoint documentation]
23632370
[source,ts]
@@ -2370,7 +2377,7 @@ client.asyncSearch.status({ id })
23702377

23712378
* *Request (object):*
23722379
** *`id` (string)*: A unique identifier for the async search.
2373-
** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available.
2380+
** *`keep_alive` (Optional, string | -1 | 0)*: The length of time that the async search needs to be available.
23742381
Ongoing async searches and any saved search results are deleted after this period.
23752382

23762383
[discrete]
@@ -3286,6 +3293,7 @@ If `false`, the request returns a 404 status code when there are no matches or o
32863293
[discrete]
32873294
==== delete_auto_follow_pattern
32883295
Delete auto-follow patterns.
3296+
32893297
Delete a collection of cross-cluster replication auto-follow patterns.
32903298

32913299
{ref}/ccr-delete-auto-follow-pattern.html[Endpoint documentation]
@@ -3298,8 +3306,10 @@ client.ccr.deleteAutoFollowPattern({ name })
32983306
==== Arguments
32993307

33003308
* *Request (object):*
3301-
** *`name` (string)*: The name of the auto follow pattern.
3302-
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
3309+
** *`name` (string)*: The auto-follow pattern collection to delete.
3310+
** *`master_timeout` (Optional, string | -1 | 0)*: The period to wait for a connection to the master node.
3311+
If the master node is not available before the timeout expires, the request fails and returns an error.
3312+
It can also be set to `-1` to indicate that the request should never timeout.
33033313

33043314
[discrete]
33053315
==== follow
@@ -3346,6 +3356,7 @@ remote Lucene segment files to the follower index.
33463356
[discrete]
33473357
==== follow_info
33483358
Get follower information.
3359+
33493360
Get information about all cross-cluster replication follower indices.
33503361
For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.
33513362

@@ -3359,8 +3370,10 @@ client.ccr.followInfo({ index })
33593370
==== Arguments
33603371

33613372
* *Request (object):*
3362-
** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices
3363-
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
3373+
** *`index` (string | string[])*: A comma-delimited list of follower index patterns.
3374+
** *`master_timeout` (Optional, string | -1 | 0)*: The period to wait for a connection to the master node.
3375+
If the master node is not available before the timeout expires, the request fails and returns an error.
3376+
It can also be set to `-1` to indicate that the request should never timeout.
33643377

33653378
[discrete]
33663379
==== follow_stats

src/api/api/async_search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class AsyncSearch {
109109
}
110110

111111
/**
112-
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
112+
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: * The user or API key that submitted the original async search request. * Users that have the `monitor` cluster privilege or greater privileges.
113113
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.x/async-search.html | Elasticsearch API documentation}
114114
*/
115115
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>

src/api/types.ts

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export interface BulkCreateOperation extends BulkWriteOperation {
3434
export interface BulkDeleteOperation extends BulkOperationBase {
3535
}
3636

37+
export type BulkFailureStoreStatus = 'not_applicable_or_unknown' | 'used' | 'not_enabled' | 'failed'
38+
3739
export interface BulkIndexOperation extends BulkWriteOperation {
3840
}
3941

@@ -58,6 +60,7 @@ export type BulkOperationType = 'index' | 'create' | 'update' | 'delete'
5860

5961
export interface BulkRequest<TDocument = unknown, TPartialDocument = unknown> extends RequestBase {
6062
index?: IndexName
63+
include_source_on_error?: boolean
6164
list_executed_pipelines?: boolean
6265
pipeline?: string
6366
refresh?: Refresh
@@ -83,6 +86,7 @@ export interface BulkResponseItem {
8386
_id?: string | null
8487
_index: string
8588
status: integer
89+
failure_store?: BulkFailureStoreStatus
8690
error?: ErrorCause
8791
_primary_term?: long
8892
result?: string
@@ -159,6 +163,7 @@ export interface CountResponse {
159163
export interface CreateRequest<TDocument = unknown> extends RequestBase {
160164
id: Id
161165
index: IndexName
166+
include_source_on_error?: boolean
162167
pipeline?: string
163168
refresh?: Refresh
164169
routing?: Routing
@@ -639,6 +644,7 @@ export interface IndexRequest<TDocument = unknown> extends RequestBase {
639644
index: IndexName
640645
if_primary_term?: long
641646
if_seq_no?: SequenceNumber
647+
include_source_on_error?: boolean
642648
op_type?: OpType
643649
pipeline?: string
644650
refresh?: Refresh
@@ -1989,6 +1995,7 @@ export interface UpdateRequest<TDocument = unknown, TPartialDocument = unknown>
19891995
index: IndexName
19901996
if_primary_term?: long
19911997
if_seq_no?: SequenceNumber
1998+
include_source_on_error?: boolean
19921999
lang?: string
19932000
refresh?: Refresh
19942001
require_alias?: boolean
@@ -13884,20 +13891,21 @@ export interface MlAnomaly {
1388413891
}
1388513892

1388613893
export interface MlAnomalyCause {
13887-
actual: double[]
13888-
by_field_name: Name
13889-
by_field_value: string
13890-
correlated_by_field_value: string
13891-
field_name: Field
13892-
function: string
13893-
function_description: string
13894-
influencers: MlInfluence[]
13895-
over_field_name: Name
13896-
over_field_value: string
13897-
partition_field_name: string
13898-
partition_field_value: string
13894+
actual?: double[]
13895+
by_field_name?: Name
13896+
by_field_value?: string
13897+
correlated_by_field_value?: string
13898+
field_name?: Field
13899+
function?: string
13900+
function_description?: string
13901+
geo_results?: MlGeoResults
13902+
influencers?: MlInfluence[]
13903+
over_field_name?: Name
13904+
over_field_value?: string
13905+
partition_field_name?: string
13906+
partition_field_value?: string
1389913907
probability: double
13900-
typical: double[]
13908+
typical?: double[]
1390113909
}
1390213910

1390313911
export interface MlAnomalyExplanation {
@@ -14466,8 +14474,8 @@ export interface MlFilterRef {
1446614474
export type MlFilterType = 'include' | 'exclude'
1446714475

1446814476
export interface MlGeoResults {
14469-
actual_point: string
14470-
typical_point: string
14477+
actual_point?: string
14478+
typical_point?: string
1447114479
}
1447214480

1447314481
export interface MlHyperparameter {
@@ -19031,6 +19039,18 @@ export interface ShutdownPutNodeRequest extends RequestBase {
1903119039

1903219040
export type ShutdownPutNodeResponse = AcknowledgedResponseBase
1903319041

19042+
export interface SimulateIngestIngestDocumentSimulationKeys {
19043+
_id: Id
19044+
_index: IndexName
19045+
_source: Record<string, any>
19046+
_version: SpecUtilsStringified<VersionNumber>
19047+
executed_pipelines: string[]
19048+
ignored_fields?: Record<string, string>[]
19049+
error?: ErrorCause
19050+
}
19051+
export type SimulateIngestIngestDocumentSimulation = SimulateIngestIngestDocumentSimulationKeys
19052+
& { [property: string]: string | Id | IndexName | Record<string, any> | SpecUtilsStringified<VersionNumber> | string[] | Record<string, string>[] | ErrorCause }
19053+
1903419054
export interface SimulateIngestRequest extends RequestBase {
1903519055
index?: IndexName
1903619056
pipeline?: PipelineName
@@ -19042,7 +19062,11 @@ export interface SimulateIngestRequest extends RequestBase {
1904219062
}
1904319063

1904419064
export interface SimulateIngestResponse {
19045-
docs: IngestSimulateDocumentResult[]
19065+
docs: SimulateIngestSimulateIngestDocumentResult[]
19066+
}
19067+
19068+
export interface SimulateIngestSimulateIngestDocumentResult {
19069+
doc?: SimulateIngestIngestDocumentSimulation
1904619070
}
1904719071

1904819072
export interface SlmConfiguration {

src/api/typesWithBodyKey.ts

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export interface BulkCreateOperation extends BulkWriteOperation {
3434
export interface BulkDeleteOperation extends BulkOperationBase {
3535
}
3636

37+
export type BulkFailureStoreStatus = 'not_applicable_or_unknown' | 'used' | 'not_enabled' | 'failed'
38+
3739
export interface BulkIndexOperation extends BulkWriteOperation {
3840
}
3941

@@ -58,6 +60,7 @@ export type BulkOperationType = 'index' | 'create' | 'update' | 'delete'
5860

5961
export interface BulkRequest<TDocument = unknown, TPartialDocument = unknown> extends RequestBase {
6062
index?: IndexName
63+
include_source_on_error?: boolean
6164
list_executed_pipelines?: boolean
6265
pipeline?: string
6366
refresh?: Refresh
@@ -84,6 +87,7 @@ export interface BulkResponseItem {
8487
_id?: string | null
8588
_index: string
8689
status: integer
90+
failure_store?: BulkFailureStoreStatus
8791
error?: ErrorCause
8892
_primary_term?: long
8993
result?: string
@@ -170,6 +174,7 @@ export interface CountResponse {
170174
export interface CreateRequest<TDocument = unknown> extends RequestBase {
171175
id: Id
172176
index: IndexName
177+
include_source_on_error?: boolean
173178
pipeline?: string
174179
refresh?: Refresh
175180
routing?: Routing
@@ -660,6 +665,7 @@ export interface IndexRequest<TDocument = unknown> extends RequestBase {
660665
index: IndexName
661666
if_primary_term?: long
662667
if_seq_no?: SequenceNumber
668+
include_source_on_error?: boolean
663669
op_type?: OpType
664670
pipeline?: string
665671
refresh?: Refresh
@@ -2060,6 +2066,7 @@ export interface UpdateRequest<TDocument = unknown, TPartialDocument = unknown>
20602066
index: IndexName
20612067
if_primary_term?: long
20622068
if_seq_no?: SequenceNumber
2069+
include_source_on_error?: boolean
20632070
lang?: string
20642071
refresh?: Refresh
20652072
require_alias?: boolean
@@ -14149,20 +14156,21 @@ export interface MlAnomaly {
1414914156
}
1415014157

1415114158
export interface MlAnomalyCause {
14152-
actual: double[]
14153-
by_field_name: Name
14154-
by_field_value: string
14155-
correlated_by_field_value: string
14156-
field_name: Field
14157-
function: string
14158-
function_description: string
14159-
influencers: MlInfluence[]
14160-
over_field_name: Name
14161-
over_field_value: string
14162-
partition_field_name: string
14163-
partition_field_value: string
14159+
actual?: double[]
14160+
by_field_name?: Name
14161+
by_field_value?: string
14162+
correlated_by_field_value?: string
14163+
field_name?: Field
14164+
function?: string
14165+
function_description?: string
14166+
geo_results?: MlGeoResults
14167+
influencers?: MlInfluence[]
14168+
over_field_name?: Name
14169+
over_field_value?: string
14170+
partition_field_name?: string
14171+
partition_field_value?: string
1416414172
probability: double
14165-
typical: double[]
14173+
typical?: double[]
1416614174
}
1416714175

1416814176
export interface MlAnomalyExplanation {
@@ -14731,8 +14739,8 @@ export interface MlFilterRef {
1473114739
export type MlFilterType = 'include' | 'exclude'
1473214740

1473314741
export interface MlGeoResults {
14734-
actual_point: string
14735-
typical_point: string
14742+
actual_point?: string
14743+
typical_point?: string
1473614744
}
1473714745

1473814746
export interface MlHyperparameter {
@@ -19544,6 +19552,18 @@ export interface ShutdownPutNodeRequest extends RequestBase {
1954419552

1954519553
export type ShutdownPutNodeResponse = AcknowledgedResponseBase
1954619554

19555+
export interface SimulateIngestIngestDocumentSimulationKeys {
19556+
_id: Id
19557+
_index: IndexName
19558+
_source: Record<string, any>
19559+
_version: SpecUtilsStringified<VersionNumber>
19560+
executed_pipelines: string[]
19561+
ignored_fields?: Record<string, string>[]
19562+
error?: ErrorCause
19563+
}
19564+
export type SimulateIngestIngestDocumentSimulation = SimulateIngestIngestDocumentSimulationKeys
19565+
& { [property: string]: string | Id | IndexName | Record<string, any> | SpecUtilsStringified<VersionNumber> | string[] | Record<string, string>[] | ErrorCause }
19566+
1954719567
export interface SimulateIngestRequest extends RequestBase {
1954819568
index?: IndexName
1954919569
pipeline?: PipelineName
@@ -19558,7 +19578,11 @@ export interface SimulateIngestRequest extends RequestBase {
1955819578
}
1955919579

1956019580
export interface SimulateIngestResponse {
19561-
docs: IngestSimulateDocumentResult[]
19581+
docs: SimulateIngestSimulateIngestDocumentResult[]
19582+
}
19583+
19584+
export interface SimulateIngestSimulateIngestDocumentResult {
19585+
doc?: SimulateIngestIngestDocumentSimulation
1956219586
}
1956319587

1956419588
export interface SlmConfiguration {

0 commit comments

Comments
 (0)