Skip to content

Commit 0d27832

Browse files
nhtruonggithub-actions[bot]
authored andcommitted
Updated opensearch-js to reflect the latest OpenSearch API spec (2026-03-15)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 591a0c9 commit 0d27832

File tree

281 files changed

+6967
-798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+6967
-798
lines changed

api/OpenSearchApi.d.ts

Lines changed: 260 additions & 0 deletions
Large diffs are not rendered by default.

api/OpenSearchApi.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class OpenSearchAPI {
3232
http: new(require('./http/_api'))(this),
3333
indices: new(require('./indices/_api'))(this),
3434
ingest: new(require('./ingest/_api'))(this),
35+
ingestion: new(require('./ingestion/_api'))(this),
3536
insights: new(require('./insights/_api'))(this),
3637
ism: new(require('./ism/_api'))(this),
3738
knn: new(require('./knn/_api'))(this),
@@ -48,12 +49,15 @@ class OpenSearchAPI {
4849
replication: new(require('./replication/_api'))(this),
4950
rollups: new(require('./rollups/_api'))(this),
5051
searchPipeline: new(require('./searchPipeline/_api'))(this),
52+
searchRelevance: new(require('./searchRelevance/_api'))(this),
53+
securityAnalytics: new(require('./securityAnalytics/_api'))(this),
5154
security: new(require('./security/_api'))(this),
5255
sm: new(require('./sm/_api'))(this),
5356
snapshot: new(require('./snapshot/_api'))(this),
5457
sql: new(require('./sql/_api'))(this),
5558
tasks: new(require('./tasks/_api'))(this),
5659
transforms: new(require('./transforms/_api'))(this),
60+
ubi: new(require('./ubi/_api'))(this),
5761
wlm: new(require('./wlm/_api'))(this),
5862
}
5963

@@ -165,6 +169,7 @@ class OpenSearchAPI {
165169
http: { get() { return this[kApiModules].http } },
166170
indices: { get() { return this[kApiModules].indices } },
167171
ingest: { get() { return this[kApiModules].ingest } },
172+
ingestion: { get() { return this[kApiModules].ingestion } },
168173
insights: { get() { return this[kApiModules].insights } },
169174
ism: { get() { return this[kApiModules].ism } },
170175
knn: { get() { return this[kApiModules].knn } },
@@ -181,12 +186,15 @@ class OpenSearchAPI {
181186
replication: { get() { return this[kApiModules].replication } },
182187
rollups: { get() { return this[kApiModules].rollups } },
183188
searchPipeline: { get() { return this[kApiModules].searchPipeline } },
189+
searchRelevance: { get() { return this[kApiModules].searchRelevance } },
190+
securityAnalytics: { get() { return this[kApiModules].securityAnalytics } },
184191
security: { get() { return this[kApiModules].security } },
185192
sm: { get() { return this[kApiModules].sm } },
186193
snapshot: { get() { return this[kApiModules].snapshot } },
187194
sql: { get() { return this[kApiModules].sql } },
188195
tasks: { get() { return this[kApiModules].tasks } },
189196
transforms: { get() { return this[kApiModules].transforms } },
197+
ubi: { get() { return this[kApiModules].ubi } },
190198
wlm: { get() { return this[kApiModules].wlm } },
191199

192200
// Deprecated: Use asynchronousSearch instead.
@@ -199,6 +207,10 @@ class OpenSearchAPI {
199207
remote_store: { get() { return this[kApiModules].remoteStore } },
200208
// Deprecated: Use searchPipeline instead.
201209
search_pipeline: { get() { return this[kApiModules].searchPipeline } },
210+
// Deprecated: Use searchRelevance instead.
211+
search_relevance: { get() { return this[kApiModules].searchRelevance } },
212+
// Deprecated: Use securityAnalytics instead.
213+
security_analytics: { get() { return this[kApiModules].securityAnalytics } },
202214
})
203215
}
204216
}

api/_core/bulk.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,5 @@ export interface Bulk_Response extends ApiResponse {
4141
body: Bulk_ResponseBody;
4242
}
4343

44-
export type Bulk_ResponseBody = {
45-
errors: boolean;
46-
ingest_took?: number;
47-
items: Record<string, Core_Bulk.ResponseItem>[];
48-
took: number;
49-
}
44+
export type Bulk_ResponseBody = Core_Bulk.BulkResponse
5045

api/_core/bulk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
2828
* @param {string} [params._source] - `true` or `false` to return the `_source` field or not, or a list of fields to return.
2929
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response.
3030
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response.
31+
* @param {string} [params.index] - Name of the data stream, index, or index alias to perform bulk actions on.
3132
* @param {string} [params.pipeline] - 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.
3233
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
3334
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
34-
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
35+
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
3536
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
3637
* @param {string} [params.type] - Default document type for items which don't provide one.
3738
* @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
38-
* @param {string} [params.index] - Name of the data stream, index, or index alias to perform bulk actions on.
3939
* @param {array} params.body - The operation definition and data (action-data pairs), separated by newlines
4040
*
4141
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}

api/_core/bulkStream.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,5 @@ export interface BulkStream_Response extends ApiResponse {
4343
body: BulkStream_ResponseBody;
4444
}
4545

46-
export type BulkStream_ResponseBody = {
47-
errors: boolean;
48-
ingest_took?: number;
49-
items: Record<string, Core_Bulk.ResponseItem>[];
50-
took: number;
51-
}
46+
export type BulkStream_ResponseBody = Core_Bulk.BulkResponse
5247

api/_core/bulkStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
3333
* @param {string} [params.pipeline] - 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.
3434
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
3535
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
36-
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
36+
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
3737
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
3838
* @param {string} [params.type] - Default document type for items which don't provide one.
3939
* @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).

api/_core/clearScroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const { normalizeArguments, parsePathParam } = require('../utils');
2525
* @memberOf API-Core
2626
*
2727
* @param {object} [params]
28-
* @param {string} [params.scroll_id] DEPRECATED - Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`.
29-
* @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter
28+
* @param {string} [params.scroll_id] DEPRECATED - A comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`.
29+
* @param {object} [params.body] - A comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter
3030
*
3131
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
3232
* @param {function} [callback] - Callback that handles errors and response

api/_core/count.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ const { normalizeArguments, parsePathParam } = require('../utils');
3737
* @param {number} [params.min_score] - Sets the minimum `_score` value that documents must have to be included in the result.
3838
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
3939
* @param {string} [params.q] - Query in the Lucene query string syntax.
40-
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
40+
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
4141
* @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting.
42-
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`.
42+
* @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams and indexes, omit this parameter or use `*` or `_all`.
4343
* @param {object} [params.body] - Query to restrict the results specified with the Query DSL (optional)
4444
*
4545
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}

api/_core/create.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Returns a 409 response when a document with a same ID already exists in the inde
2929
* @param {object} params
3030
* @param {string} [params.pipeline] - 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.
3131
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`.
32-
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
32+
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
3333
* @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
3434
* @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.
35-
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
35+
* @param {string} [params.version_type] - The specific version type: `external`, `external_gte`.
3636
* @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
37-
* @param {string} params.id - Unique identifier for the document.
37+
* @param {string} params.id - The unique identifier for the document.
3838
* @param {string} params.index - 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.
3939
* @param {object} params.body - The document
4040
*

api/_core/createPit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
2929
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
3030
* @param {string} [params.keep_alive] - Specify the keep alive for point in time.
3131
* @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on.
32-
* @param {string} [params.routing] - Comma-separated list of specific routing values.
33-
* @param {array} params.index - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
32+
* @param {string} [params.routing] - A comma-separated list of specific routing values.
33+
* @param {array} params.index - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
3434
*
3535
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
3636
* @param {function} [callback] - Callback that handles errors and response

0 commit comments

Comments
 (0)