Skip to content
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
254 changes: 254 additions & 0 deletions api/OpenSearchApi.d.ts

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions api/OpenSearchApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,18 @@ class OpenSearchAPI {
cluster: new(require('./cluster/_api'))(this),
danglingIndices: new(require('./danglingIndices/_api'))(this),
flowFramework: new(require('./flowFramework/_api'))(this),
geospatial: new(require('./geospatial/_api'))(this),
http: new(require('./http/_api'))(this),
indices: new(require('./indices/_api'))(this),
ingest: new(require('./ingest/_api'))(this),
ingestion: new(require('./ingestion/_api'))(this),
insights: new(require('./insights/_api'))(this),
ism: new(require('./ism/_api'))(this),
knn: new(require('./knn/_api'))(this),
list: new(require('./list/_api'))(this),
ltr: new(require('./ltr/_api'))(this),
ml: new(require('./ml/_api'))(this),
neural: new(require('./neural/_api'))(this),
nodes: new(require('./nodes/_api'))(this),
notifications: new(require('./notifications/_api'))(this),
observability: new(require('./observability/_api'))(this),
Expand All @@ -46,6 +49,8 @@ class OpenSearchAPI {
replication: new(require('./replication/_api'))(this),
rollups: new(require('./rollups/_api'))(this),
searchPipeline: new(require('./searchPipeline/_api'))(this),
searchRelevance: new(require('./searchRelevance/_api'))(this),
securityAnalytics: new(require('./securityAnalytics/_api'))(this),
security: new(require('./security/_api'))(this),
sm: new(require('./sm/_api'))(this),
snapshot: new(require('./snapshot/_api'))(this),
Expand Down Expand Up @@ -159,15 +164,18 @@ class OpenSearchAPI {
cluster: { get() { return this[kApiModules].cluster } },
danglingIndices: { get() { return this[kApiModules].danglingIndices } },
flowFramework: { get() { return this[kApiModules].flowFramework } },
geospatial: { get() { return this[kApiModules].geospatial } },
http: { get() { return this[kApiModules].http } },
indices: { get() { return this[kApiModules].indices } },
ingest: { get() { return this[kApiModules].ingest } },
ingestion: { get() { return this[kApiModules].ingestion } },
insights: { get() { return this[kApiModules].insights } },
ism: { get() { return this[kApiModules].ism } },
knn: { get() { return this[kApiModules].knn } },
list: { get() { return this[kApiModules].list } },
ltr: { get() { return this[kApiModules].ltr } },
ml: { get() { return this[kApiModules].ml } },
neural: { get() { return this[kApiModules].neural } },
nodes: { get() { return this[kApiModules].nodes } },
notifications: { get() { return this[kApiModules].notifications } },
observability: { get() { return this[kApiModules].observability } },
Expand All @@ -177,6 +185,8 @@ class OpenSearchAPI {
replication: { get() { return this[kApiModules].replication } },
rollups: { get() { return this[kApiModules].rollups } },
searchPipeline: { get() { return this[kApiModules].searchPipeline } },
searchRelevance: { get() { return this[kApiModules].searchRelevance } },
securityAnalytics: { get() { return this[kApiModules].securityAnalytics } },
security: { get() { return this[kApiModules].security } },
sm: { get() { return this[kApiModules].sm } },
snapshot: { get() { return this[kApiModules].snapshot } },
Expand All @@ -195,6 +205,10 @@ class OpenSearchAPI {
remote_store: { get() { return this[kApiModules].remoteStore } },
// Deprecated: Use searchPipeline instead.
search_pipeline: { get() { return this[kApiModules].searchPipeline } },
// Deprecated: Use searchRelevance instead.
search_relevance: { get() { return this[kApiModules].searchRelevance } },
// Deprecated: Use securityAnalytics instead.
security_analytics: { get() { return this[kApiModules].securityAnalytics } },
})
}
}
Expand Down
9 changes: 2 additions & 7 deletions api/_core/bulk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface Bulk_Request extends Global.Params {
pipeline?: string;
refresh?: Common.Refresh;
require_alias?: boolean;
routing?: Common.RoutingInQueryString;
routing?: Common.Routing;
timeout?: Common.Duration;
type?: string;
wait_for_active_shards?: Common.WaitForActiveShards;
Expand All @@ -41,10 +41,5 @@ export interface Bulk_Response extends ApiResponse {
body: Bulk_ResponseBody;
}

export type Bulk_ResponseBody = {
errors: boolean;
ingest_took?: number;
items: Record<string, Core_Bulk.ResponseItem>[];
took: number;
}
export type Bulk_ResponseBody = Core_Bulk.BulkResponseBase

2 changes: 1 addition & 1 deletion api/_core/bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @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.
* @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`.
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @param {string} [params.type] - Default document type for items which don't provide one.
* @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`).
Expand Down
7 changes: 1 addition & 6 deletions api/_core/bulkStream.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,5 @@ export interface BulkStream_Response extends ApiResponse {
body: BulkStream_ResponseBody;
}

export type BulkStream_ResponseBody = {
errors: boolean;
ingest_took?: number;
items: Record<string, Core_Bulk.ResponseItem>[];
took: number;
}
export type BulkStream_ResponseBody = Core_Bulk.BulkResponseBase

2 changes: 1 addition & 1 deletion api/_core/bulkStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @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.
* @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`.
* @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @param {string} [params.type] - Default document type for items which don't provide one.
* @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`).
Expand Down
4 changes: 2 additions & 2 deletions api/_core/clearScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @memberOf API-Core
*
* @param {object} [params]
* @param {string} [params.scroll_id] DEPRECATED - Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`.
* @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter
* @param {string} [params.scroll_id] DEPRECATED - A comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`.
* @param {object} [params.body] - A comma-separated list of scroll IDs to clear if none was specified using the `scroll_id` parameter
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
4 changes: 2 additions & 2 deletions api/_core/count.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @param {number} [params.min_score] - Sets the minimum `_score` value that documents must have to be included in the result.
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
* @param {string} [params.q] - Query in the Lucene query string syntax.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @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.
* @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`.
* @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`.
* @param {object} [params.body] - Query to restrict the results specified with the Query DSL (optional)
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
6 changes: 3 additions & 3 deletions api/_core/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ Returns a 409 response when a document with a same ID already exists in the inde
* @param {object} params
* @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.
* @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`.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards.
* @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.
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
* @param {string} [params.version_type] - The specific version type: `external`, `external_gte`.
* @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`).
* @param {string} params.id - Unique identifier for the document.
* @param {string} params.id - The unique identifier for the document.
* @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.
* @param {object} params.body - The document
*
Expand Down
4 changes: 2 additions & 2 deletions api/_core/createPit.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
* @param {string} [params.keep_alive] - Specify the keep alive for point in time.
* @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on.
* @param {string} [params.routing] - Comma-separated list of specific routing values.
* @param {array} params.index - Comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
* @param {string} [params.routing] - A comma-separated list of specific routing values.
* @param {array} params.index - A comma-separated list of indexes; use `_all` or empty string to perform the operation on all indexes.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
6 changes: 3 additions & 3 deletions api/_core/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term.
* @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number.
* @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`.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.timeout] - Period to wait for active shards.
* @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.
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
* @param {string} [params.version_type] - The specific version type: `external`, `external_gte`.
* @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`).
* @param {string} params.id - Unique identifier for the document.
* @param {string} params.id - The unique identifier for the document.
* @param {string} params.index - Name of the target index.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
4 changes: 2 additions & 2 deletions api/_core/deleteByQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes.
* @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. Defaults to the index-level setting.
* @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second.
* @param {string} [params.routing] - Custom value used to route operations to a specific shard.
* @param {string} [params.routing] - A custom value used to route operations to a specific shard.
* @param {string} [params.scroll] - Period to retain the search context for scrolling.
* @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation.
* @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout.
Expand All @@ -58,7 +58,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {boolean} [params.version] - If `true`, returns the document version as part of a hit.
* @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`).
* @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete.
* @param {string} params.index - Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`.
* @param {string} params.index - A comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`.
* @param {object} params.body - The search definition using the Query DSL
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
6 changes: 3 additions & 3 deletions api/_core/exists.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response.
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response.
* @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default.
* @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time.
* @param {boolean} [params.realtime] - If `true`, the request is real time as opposed to near real time.
* @param {string} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes.
* @param {string} [params.routing] - Target the specified primary shard.
* @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false.
* @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.
* @param {string} [params.version_type] - Specific version type: `external`, `external_gte`.
* @param {string} [params.version_type] - The specific version type: `external`, `external_gte`.
* @param {string} params.id - Identifier of the document.
* @param {string} params.index - Comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`).
* @param {string} params.index - A comma-separated list of data streams, indexes, and aliases. Supports wildcards (`*`).
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
Loading
Loading