@opensearch-project/opensearch
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -10,3 +10,6 @@ { | ||
], | ||
"parser": "babel-eslint", | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"requireConfigFile": false | ||
}, | ||
"plugins": [ | ||
@@ -13,0 +16,0 @@ "prettier" |
@@ -66,2 +66,25 @@ /* | ||
/** | ||
* The bulk operation lets you add, update, or delete many documents in a single request. | ||
* Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits. | ||
* Whenever practical, we recommend batching indexing operations into bulk requests. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/|OpenSearch - Bulk} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {Object[]} params.body - {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#request-body|Request Body} | ||
* @param {string} [params.index] - Specifying the index means you don’t need to include it in the request body. | ||
* @param {string} [params.pipeline] - The pipeline ID for preprocessing documents. | ||
* @param {string} [params.routing] - Routes the request to the specified shard. | ||
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. | ||
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. | ||
* @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#response|Bulk Response} | ||
*/ | ||
function bulkApi(params, options, callback) { | ||
@@ -68,0 +91,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-CAT */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -73,2 +75,3 @@ const acceptedQuerystring = [ | ||
'parent_task_id', | ||
'pri', | ||
]; | ||
@@ -97,2 +100,18 @@ const snakeCase = { | ||
/** | ||
* The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ OpenSearch - CAT aliases} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.name] - To limit the information to specific aliases, provide the alias names seperated by commas. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/#response CAT aliases Response} | ||
*/ | ||
CatApi.prototype.aliases = function catAliasesApi(params, options, callback) { | ||
@@ -124,2 +143,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT allocation operation lists the allocation of disk space for indices and the number of shards on each node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ OpenSearch - CAT allocation} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.node_id] - To limit the information to specific nodes, provide the node names seperated by commas. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/#response CAT allocation Response} | ||
*/ | ||
CatApi.prototype.allocation = function catAllocationApi(params, options, callback) { | ||
@@ -151,2 +187,16 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT count operation lists the number of documents in your cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/ OpenSearch - CAT count} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.index] - To see the number of documents in specific indices or aliases, provide the index/alias names seperated by commas. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/#response CAT count Response} | ||
*/ | ||
CatApi.prototype.count = function catCountApi(params, options, callback) { | ||
@@ -178,2 +228,16 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT fielddata operation lists the memory size used by each field per node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ OpenSearch - CAT fielddata} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.fields] - To limit the information to specific fields, provide the field names seperated by commas. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/#response CAT fielddata Response} | ||
*/ | ||
CatApi.prototype.fielddata = function catFielddataApi(params, options, callback) { | ||
@@ -205,2 +269,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes, | ||
* and other useful information that helps you analyze the health of your cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/ OpenSearch - CAT health} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* @param {boolean} [params.ts=true] - If true, returns HH:MM:SS and Unix epoch timestamps. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/#response CAT health Response} | ||
*/ | ||
CatApi.prototype.health = function catHealthApi(params, options, callback) { | ||
@@ -227,2 +307,14 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* See the available operations in the CAT API | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/index OpenSearch - CAT} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - (ignored) | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
CatApi.prototype.help = function catHelpApi(params, options, callback) { | ||
@@ -249,2 +341,23 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT indices operation lists information related to indices—how much disk space they are using, how many shards they have, their health status, and so on. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ OpenSearch - CAT indices} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.index] - To limit the information to specific indices, provide the index names seperated by commas. | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* @param {string} [params.health] - Limit indices based on their health status. Supported values are 'green', 'yellow', and 'red'. | ||
* @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {boolean} [params.pri=false] - Whether to return information only from the primary shards. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/#response CAT indices Response} | ||
*/ | ||
CatApi.prototype.indices = function catIndicesApi(params, options, callback) { | ||
@@ -276,2 +389,14 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT cluster manager operation lists information that helps identify the elected cluster manager node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ OpenSearch - CAT cluster manager} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/#response CAT cluster manager Response} | ||
*/ | ||
CatApi.prototype.cluster_manager = function catClusterManagerApi(params, options, callback) { | ||
@@ -323,2 +448,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT nodeattrs operation lists the attributes of custom nodes. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ OpenSearch - CAT aliases} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/#response CAT nodeattrs Response} | ||
*/ | ||
CatApi.prototype.nodeattrs = function catNodeattrsApi(params, options, callback) { | ||
@@ -345,2 +485,21 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT nodes operation lists node-level information, including node roles and load metrics. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ OpenSearch - CAT nodes} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* @param {boolean} [params.full_id=false] - If true, return the full node ID. If false, return the shortened node ID. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/#response CAT nodes Response} | ||
*/ | ||
CatApi.prototype.nodes = function catNodesApi(params, options, callback) { | ||
@@ -367,2 +526,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ OpenSearch - CAT pending tasks} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/#response CAT pending tasks Response} | ||
*/ | ||
CatApi.prototype.pendingTasks = function catPendingTasksApi(params, options, callback) { | ||
@@ -389,2 +564,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT plugins operation lists the names, components, and versions of the installed plugins. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ OpenSearch - CAT plugins} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/#response CAT plugins Response} | ||
*/ | ||
CatApi.prototype.plugins = function catPluginsApi(params, options, callback) { | ||
@@ -411,2 +601,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT recovery operation lists all completed and ongoing index and shard recoveries. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/ OpenSearch - CAT recovery} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* @param {boolean} [params.active_only=false] - Whether to only include ongoing shard recoveries. | ||
* @param {boolean} [params.detailed=false] - Whether to only include ongoing shard recoveries. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/#response CAT recovery Response} | ||
*/ | ||
CatApi.prototype.recovery = function catRecoveryApi(params, options, callback) { | ||
@@ -438,2 +645,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT repositories operation lists all completed and ongoing index and shard recoveries. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ OpenSearch - CAT repositories} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/#response CAT repositories Response} | ||
*/ | ||
CatApi.prototype.repositories = function catRepositoriesApi(params, options, callback) { | ||
@@ -460,2 +682,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The cat segments operation lists Lucene segment-level information for each index. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ OpenSearch - CAT segments} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.index] - To see only the information about segments of specific indices, provide the index names seperated by commas. | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/#response CAT segments Response} | ||
*/ | ||
CatApi.prototype.segments = function catSegmentsApi(params, options, callback) { | ||
@@ -487,2 +725,20 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT shards operation lists the state of all primary and replica shards and how they are distributed. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ OpenSearch - CAT shards} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.index] - To see only the information about shards of specific indices, provide the index names seperated by commas. | ||
* @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/#response CAT shards Response} | ||
*/ | ||
CatApi.prototype.shards = function catShardsApi(params, options, callback) { | ||
@@ -514,2 +770,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT snapshots operation lists all snapshots for a repository. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ OpenSearch - CAT snapshots} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/#response CAT snapshots Response} | ||
*/ | ||
CatApi.prototype.snapshots = function catSnapshotsApi(params, options, callback) { | ||
@@ -541,2 +812,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT tasks operation lists the progress of all tasks currently running on your cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ OpenSearch - CAT tasks} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information. Use '_local' to return information from the node you’re connecting to, specify the node name to get information from specific nodes, or keep the parameter empty to get information from all nodes. | ||
* @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. | ||
* @param {boolean} [params.detailed=false] - Returns detailed task information. | ||
* @param {string} [params.parent_task_id] - Returns tasks with a specified parent task ID (node_id:task_number). Keep empty or set to -1 to return all. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/#response CAT tasks Response} | ||
*/ | ||
CatApi.prototype.tasks = function catTasksApi(params, options, callback) { | ||
@@ -563,2 +851,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ OpenSearch - CAT templates} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.name] - If you want to limit it to a specific template or pattern, provide the template name or pattern. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/#response CAT templates Response} | ||
*/ | ||
CatApi.prototype.templates = function catTemplatesApi(params, options, callback) { | ||
@@ -590,2 +894,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ OpenSearch - CAT thread pool} | ||
* | ||
* @memberOf API-CAT | ||
* | ||
* @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/#response CAT thread pool Response} | ||
*/ | ||
CatApi.prototype.threadPool = function catThreadPoolApi(params, options, callback) { | ||
@@ -592,0 +911,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,16 @@ /* | ||
/** | ||
* Close the search context when you’re done scrolling, because the scroll operation continues to consume computing resources until the timeout. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ OpenSearch - Scroll } | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.scroll_id] The ID of the scroll to be terminated. Use `_all` to close all open scroll contexts. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function clearScrollApi(params, options, callback) { | ||
@@ -41,0 +55,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Cluster */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -104,2 +106,22 @@ const acceptedQuerystring = [ | ||
/** | ||
* The most basic cluster allocation explain request finds an unassigned shard and explains why it can’t be allocated to a node. If you add some options, you can instead get information on a specific shard, including why OpenSearch assigned it to its current node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-allocation/ OpenSearch - Cluster allocation explain} | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.include_yes_decisions=false] - OpenSearch makes a series of yes or no decisions when trying to allocate a shard to a node. If this parameter is true, OpenSearch includes the (generally more numerous) “yes” decisions in its response. | ||
* @param {boolean} [params.include_disk_info=false] - Whether to include information about disk usage in the response. | ||
* @param {Object} [params.body] | ||
* @param {string} [params.body.current_node] - If you only want an explanation if the shard happens to be on a particular node, specify that node name here. | ||
* @param {string} [params.body.index] - The name of the shard’s index. | ||
* @param {boolean} [params.body.primary] - Whether to provide an explanation for the primary shard (true) or its first replica (false), which share the same shard ID. | ||
* @param {number} [params.body.shard] - The shard ID that you want an explanation for. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-allocation/#response Cluster allocation explain Response} | ||
*/ | ||
ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi( | ||
@@ -130,2 +152,15 @@ params, | ||
/** | ||
* Delete Component Template(s) | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.name] The name of the component template to be deleted. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTemplateApi( | ||
@@ -162,2 +197,15 @@ params, | ||
/** | ||
* Clears cluster voting config exclusions. | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.wait_for_removal] Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi( | ||
@@ -188,2 +236,15 @@ params, | ||
/** | ||
* Information about whether a particular component template exist | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.name] Name of the template | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTemplateApi( | ||
@@ -220,2 +281,15 @@ params, | ||
/** | ||
* Returns one or more component templates | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string | string[]} [params.name] Name(s) of the template(s) | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi( | ||
@@ -251,2 +325,17 @@ params, | ||
/** | ||
* Get Cluster Settings | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-settings/ OpenSearch - Cluster Settings} | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* ç | ||
* @param {boolean} [params.include_defaults] Whether to include default settings as part of the response. This parameter is useful for identifying the names and current values of settings you want to update. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.getSettings = function clusterGetSettingsApi(params, options, callback) { | ||
@@ -273,2 +362,26 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren’t. A red status means at least one primary shard is not allocated to any node. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-health/ OpenSearch - Cluster Health} | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {} [params.index] - To get the status of a specific index, provide the index name. | ||
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. | ||
* @param {string} [params.level=cluster] - The level of detail for returned health information. Supported values are 'cluster', 'indices', and 'shards'. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.timeout=30s] - The amount of time to wait for a response from the cluster. | ||
* @param {string} [params.wait_for_active_shards=0] - Wait until the specified number of shards is active before returning a response. 'all' for all shards | ||
* @param {string} [params.wait_for_nodes] - Wait for N number of nodes. Use 12 for exact match, >12 and <12 for range. | ||
* @param {string} [params.wait_for_events] - Wait until all currently queued events with the given priority are processed. Supported values are 'immediate', 'urgent', 'high', 'normal', 'low', and 'languid'. | ||
* @param {boolean} [params.wait_for_no_relocating_shards=false] - Whether to wait until there are no relocating shards in the cluster. | ||
* @param {boolean} [params.wait_for_no_initializing_shards=false] - Whether to wait until there are no initializing shards in the cluster. | ||
* @param {string} [params.wait_for_status] - Wait until the cluster health reaches the specified status or better. Supported values are 'green', 'yellow', and 'red'. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-health/#response Cluster Health Response} | ||
*/ | ||
ClusterApi.prototype.health = function clusterHealthApi(params, options, callback) { | ||
@@ -300,2 +413,15 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Get a list of any cluster-level changes | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi(params, options, callback) { | ||
@@ -322,2 +448,15 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Updates the cluster voting config exclusions by node ids or node names. | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_names] - A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify node_names. | ||
* @param {string} [params.node_ids] - A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify node_ids. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi( | ||
@@ -348,2 +487,18 @@ params, | ||
/** | ||
* Creates or updates a component template | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string} params.name - The name of the component template. | ||
* @param {object} params.body - The template definition. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {boolean} [params.create=false] - Whether the index template should only be added if new or can also replace an existing one. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplateApi( | ||
@@ -384,2 +539,18 @@ params, | ||
/** | ||
* Updates the cluster settings. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-settings/ OpenSearch - Cluster Settings} | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.flat_settings] Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {string} [params.timeout=30s] - The amount of time to wait for a response from the cluster. | ||
* @param {object} params.body - The settings to be updated. Can be either 'transient' or 'persistent' (survives cluster restart). | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.putSettings = function clusterPutSettingsApi(params, options, callback) { | ||
@@ -412,2 +583,13 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* This operation provides connection information for any remote OpenSearch clusters that you’ve configured for the local cluster, such as the remote cluster alias, connection mode (sniff or proxy), IP addresses for seed nodes, and timeout settings. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/remote-info/ OpenSearch - Remote cluster information} | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/remote-info/#response Remote cluster information } | ||
*/ | ||
ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi(params, options, callback) { | ||
@@ -434,2 +616,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Allows to manually change the allocation of individual shards in the cluster. | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {object} [params.body] - The definition of 'commands' to perform ('move', 'cancel', 'allocate') | ||
* @param {boolean} [params.dry_run] - Simulate the operation only and return the resulting state | ||
* @param {boolean} [params.explain] - Return an explanation of why the commands can or cannot be executed | ||
* @param {boolean} [params.retry_failed] - Retries allocation of shards that are blocked due to too many subsequent allocation failures | ||
* @param {string | string[]} [params.metric] - Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version) | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.reroute = function clusterRerouteApi(params, options, callback) { | ||
@@ -456,2 +655,24 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Get comprehensive information about the state of the cluster. | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string | string[]} [params.metric] - Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version). | ||
* @param {string | string[]} [params.index] - List of index names; use '_all' or empty string to perform the operation on all indices. | ||
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. | ||
* @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. | ||
* @param {boolean} [params.flat_settings=false] - Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. | ||
* @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version. | ||
* @param {string} [params.wait_for_timeout=30s] - The maximum time to wait for wait_for_metadata_version before timing out | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
ClusterApi.prototype.state = function clusterStateApi(params, options, callback) { | ||
@@ -500,2 +721,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-stats/ OpenSearch - Cluster stats} | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params | ||
* @param {string | string[]} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use '_local' to return information from the node you're connecting to, leave empty to get information from all nodes. | ||
* | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-stats/#response Cluster stats Response} | ||
*/ | ||
ClusterApi.prototype.stats = function clusterStatsApi(params, options, callback) { | ||
@@ -502,0 +739,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Count */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -71,2 +73,28 @@ const acceptedQuerystring = [ | ||
/** | ||
* The count API gives you quick access to the number of documents that match a query. You can also use it to check the document count of an index, data stream, or cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/count/ OpenSearch - Bulk} | ||
* | ||
* @memberOf API-Count | ||
* | ||
* @param {Object} params | ||
* @param {boolean} [params.allow_no_indices=false] - If false, the request returns an error if any wildcard expression or index alias targets any closed or missing indices. | ||
* @param {string} [params.analyzer] - The analyzer to use in the query string. | ||
* @param {boolean} [params.analyze_wildcard=false] - Specifies whether to analyze wildcard and prefix queries. | ||
* @param {string} [params.default_operator='OR'] - Indicates whether the default operator for a string query should be 'AND' or 'OR'. | ||
* @param {string} [params.df] - The default field in case a field prefix is not provided in the query string. | ||
* @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. | ||
* @param {boolean} [params.ignore_unavailable=false] - Specifies whether to include missing or closed indices in the response. | ||
* @param {boolean} [params.lenient=false] - Specifies whether OpenSearch should accept requests if queries have format errors (for example, querying a text field for an integer). | ||
* @param {number} [params.min_score] - Include only documents with a minimum '_score' value in the result. | ||
* @param {string} [params.routing] - Value used to route the operation to a specific shard. | ||
* @param {string} [params.preference] - Specifies which shard or node OpenSearch should perform the count operation on. | ||
* @param {number} [params.terminate_after] - The maximum number of documents OpenSearch should process before terminating the request. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/count/#response Count Response} | ||
*/ | ||
function countApi(params, options, callback) { | ||
@@ -73,0 +101,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -57,2 +57,28 @@ /* | ||
/** | ||
* Adds a document with a predefined ID to an index. | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/ OpenSearch - Index Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - A unique identifier to attach to the document. | ||
* @param {Object} params.body - The content of the document. | ||
* @param {number} [params.if_seq_no] - Only perform the index operation if the document has the specified sequence number. | ||
* @param {number} [params.if_primary_term] - Only perform the index operation if the document has the specified primary term. | ||
* @param {string} [params.pipeline] - Route the index operation to a certain pipeline. | ||
* @param {string} [params.routing] - value used to assign the index operation to a specific shard. | ||
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. | ||
* @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/#response Index Response} | ||
*/ | ||
function createApi(params, options, callback) { | ||
@@ -59,0 +85,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Dangling-Indices */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -61,2 +63,18 @@ const acceptedQuerystring = [ | ||
/** | ||
* Deletes the specified dangling index | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} | ||
* @memberOf API-Dangling-Indices | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index_uuid - The UUID of the dangling index | ||
* @param {boolean} [params.accept_data_loss] - Must be set to true in order to delete the dangling index | ||
* @param {string} [params.timeout=30s] - Explicit operation timeout | ||
* @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDeleteDanglingIndexApi( | ||
@@ -95,2 +113,18 @@ params, | ||
/** | ||
* Imports the specified dangling index | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} | ||
* @memberOf API-Dangling-Indices | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index_uuid - The UUID of the dangling index | ||
* @param {boolean} [params.accept_data_loss] - Must be set to true in order to delete the dangling index | ||
* @param {string} [params.timeout=30s] - Explicit operation timeout | ||
* @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImportDanglingIndexApi( | ||
@@ -129,2 +163,13 @@ params, | ||
/** | ||
* Retrieve all dangling indices. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} | ||
* @memberOf API-Dangling-Indices | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi( | ||
@@ -131,0 +176,0 @@ params, |
@@ -50,2 +50,16 @@ /* | ||
/** | ||
* Changes the number of requests per second for a particular Delete By Query operation. | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.task_id - The task id to rethrottle | ||
* @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function deleteByQueryRethrottleApi(params, options, callback) { | ||
@@ -52,0 +66,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -101,2 +101,50 @@ /* | ||
/** | ||
* Deletes documents matching the provided query. | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/delete-by-query/ OpenSearch - Delete by query} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to search; use '_all' or empty string to perform the operation on all indices | ||
* @param {Object} params.body - The search definition using the Query DSL | ||
* @param {string} [params.analyzer] - The analyzer to use for the query string | ||
* @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed | ||
* @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) | ||
* @param {string} [params.df] - The field to use as default where no field prefix is given in the query string | ||
* @param {number} [params.from=0] - Starting offset | ||
* @param {boolean} [params.ignore_unavailable=false] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices=true] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes '_all' string or when no indices have been specified) | ||
* @param {string} [params.conflicts] - What to do when the delete-by-query hits version conflicts? (options: abort, proceed) | ||
* @param {string} [params.expand_wildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {boolean} [params.lenient=false] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.q] - Query in the Lucene query string syntax | ||
* @param {string} [params.routing] - A comma-separated list of specific routing values | ||
* @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. | ||
* @param {number} [params.size] - Deprecated, please use 'max_docs' instead | ||
* @param {number} [params.max_docs] - Maximum number of documents to process (default: all documents) | ||
* @param {string} [params.sort] - A comma-separated list of <field>:<direction> pairs | ||
* @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return | ||
* @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field | ||
* @param {string} [params._source_includes] - A list of fields to extract and return from the _source field | ||
* @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. | ||
* @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes | ||
* @param {boolean} [params.version] - Specify whether to return document version as part of a hit | ||
* @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting | ||
* @param {boolean} [params.refresh=false] - Should the effected indexes be refreshed? | ||
* @param {string} [params.timeout=1m] - time each individual bulk request should wait for shards that are unavailable. | ||
* @param {string} [params.wait_for_active_shards=1] - Sets the number of shard copies that must be active before proceeding with the delete-by-query operation. 1 means the primary shard only. Set to 'all' for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) | ||
* @param {number} [params.scroll_size=1000] - Size on the scroll request powering the delete-by-query | ||
* @param {boolean} [params.wait_for_completion] - Should the request should block until the delete-by-query is complete. | ||
* @param {number} [params.requests_per_second=-1] - The throttle for this request in sub-requests per second. -1 means no throttle. | ||
* @param {string} [params.slices=1] - The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to 'auto'. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/delete-by-query/#response Delete by query Response} | ||
*/ | ||
function deleteByQueryApi(params, options, callback) { | ||
@@ -103,0 +151,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -53,2 +53,16 @@ /* | ||
/** | ||
* Delete a stored script. | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params | ||
* @param {string} params.id - Stored script or search template name | ||
* @param {string} [params.timeout=30s] - Explicit operation timeout | ||
* @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function deleteScriptApi(params, options, callback) { | ||
@@ -55,0 +69,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -60,2 +60,25 @@ /* | ||
/** | ||
* Delete a document | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/ OpenSearch - Update Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - A unique identifier to attach to the document. | ||
* @param {number} [params.if_seq_no] - Only perform the delete operation if the document has the specified sequence number. | ||
* @param {number} [params.if_primary_term] - Only perform the delete operation if the document has the specified primary term. | ||
* @param {string} [params.routing] - Value used to assign the index operation to a specific shard. | ||
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. | ||
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/#response Update Response} | ||
*/ | ||
function deleteApi(params, options, callback) { | ||
@@ -62,0 +85,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,27 @@ /* | ||
/** | ||
* Check whether a document source exists | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - Document ID. | ||
* @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. | ||
* @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. | ||
* @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.routing] - A value used to route the operation to a specific shard. | ||
* @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} | ||
*/ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -37,0 +62,0 @@ const acceptedQuerystring = [ |
@@ -66,2 +66,27 @@ /* | ||
/** | ||
* Check whether a document exists | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - Document ID. | ||
* @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. | ||
* @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. | ||
* @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.routing] - A value used to route the operation to a specific shard. | ||
* @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} | ||
*/ | ||
function existsApi(params, options, callback) { | ||
@@ -68,0 +93,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -69,2 +69,29 @@ /* | ||
/** | ||
* Returns information about why a specific matches (or doesn't match) a query. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/explain/ OpenSearch - Explain} | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.id] - The document ID | ||
* @param {string} [params.index] - The name of the index | ||
* @param {Object} [params.body] - The query definition using the Query DSL | ||
* @param {string} [params.analyzer] - The analyzer to use for the query string | ||
* @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed | ||
* @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) | ||
* @param {string} [params.df] - The default field for query string query (default: _all) | ||
* @param {string} [params.stored_fields] - A comma-separated list of stored fields to return in the response | ||
* @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.q] - Query in the Lucene query string syntax | ||
* @param {string} [params.routing] - Specific routing value | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function explainApi(params, options, callback) { | ||
@@ -71,0 +98,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Features */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -58,2 +60,14 @@ const acceptedQuerystring = [ | ||
/** | ||
* Gets a list of features | ||
* @memberOf API-Features | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
FeaturesApi.prototype.getFeatures = function featuresGetFeaturesApi(params, options, callback) { | ||
@@ -80,2 +94,12 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Resets the internal state of features, usually by deleting system indices | ||
* @memberOf API-Features | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
FeaturesApi.prototype.resetFeatures = function featuresResetFeaturesApi(params, options, callback) { | ||
@@ -82,0 +106,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -57,2 +57,21 @@ /* | ||
/** | ||
* Returns the information about the capabilities of fields among multiple indices. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/opensearch/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations OpenSearch - Alias} | ||
* @memberOf API-Index | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices | ||
* @param {string} [params.fields] - A comma-separated list of field names | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {boolean} [params.include_unmapped] - Indicates whether unmapped fields should be included in the response. | ||
* @param {Object} [params.body] - An index filter specified with the Query DSL | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function fieldCapsApi(params, options, callback) { | ||
@@ -59,0 +78,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,13 @@ /* | ||
/** | ||
* Retrieves all contexts for stored scripts. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-contexts/ OpenSearch - Get stored script contexts} | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function getScriptContextApi(params, options, callback) { | ||
@@ -41,0 +52,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,13 @@ /* | ||
/** | ||
* The get script language API operation retrieves all supported script languages and their contexts. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-language/ OpenSearch - Get script language} | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function getScriptLanguagesApi(params, options, callback) { | ||
@@ -41,0 +52,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Script */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -53,2 +55,16 @@ const acceptedQuerystring = [ | ||
/** | ||
* Retrieves a stored script. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-stored-script/ OpenSearch - Get Stored Script} | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params | ||
* @param {string} params.id - Stored script or search template name | ||
* @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function getScriptApi(params, options, callback) { | ||
@@ -55,0 +71,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -64,2 +64,27 @@ /* | ||
/** | ||
* Retrieve the source of a document | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - Document ID. | ||
* @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. | ||
* @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. | ||
* @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.routing] - A value used to route the operation to a specific shard. | ||
* @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} | ||
*/ | ||
function getSourceApi(params, options, callback) { | ||
@@ -66,0 +91,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -66,2 +66,27 @@ /* | ||
/** | ||
* Retrieve a document | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - Document ID. | ||
* @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. | ||
* @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. | ||
* @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.routing] - A value used to route the operation to a specific shard. | ||
* @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} | ||
*/ | ||
function getApi(params, options, callback) { | ||
@@ -68,0 +93,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Document */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -66,2 +68,29 @@ const acceptedQuerystring = [ | ||
/** | ||
* Adds a document to an index. | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/ OpenSearch - Index Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {Object} params.body - The content of the document. | ||
* @param {string} [params.id] - A unique identifier to attach to the document. | ||
* @param {number} [params.if_seq_no] - Only perform the index operation if the document has the specified sequence number. | ||
* @param {number} [params.if_primary_term] - Only perform the index operation if the document has the specified primary term. | ||
* @param {string} [params.pipeline] - Route the index operation to a certain pipeline. | ||
* @param {string} [params.routing] - value used to assign the index operation to a specific shard. | ||
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. | ||
* @param {number} [params.version] - The document’s version number. | ||
* @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') | ||
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. | ||
* @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/#response Index Response} | ||
*/ | ||
function indexApi(params, options, callback) { | ||
@@ -68,0 +97,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,13 @@ /* | ||
/** | ||
* Returns basic information about the cluster. | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function infoApi(params, options, callback) { | ||
@@ -41,0 +52,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Ingest */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -61,2 +63,18 @@ const acceptedQuerystring = [ | ||
/** | ||
* Deletes a pipeline. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ OpenSearch - Delete a pipeline} | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params | ||
* @param {string} params.id - Pipeline ID | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/#response Delete Pipeline Response} | ||
*/ | ||
IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi(params, options, callback) { | ||
@@ -89,2 +107,13 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns statistical information about geoip databases | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
IngestApi.prototype.geoIpStats = function ingestGeoIpStatsApi(params, options, callback) { | ||
@@ -111,2 +140,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns a pipeline. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ OpenSearch - Get pipeline} | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.id] - Comma separated list of pipeline ids. Wildcards supported | ||
* @param {boolean} [params.summary=false] - Return pipelines without their definitions | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/#response Get Pipeline Response} | ||
*/ | ||
IngestApi.prototype.getPipeline = function ingestGetPipelineApi(params, options, callback) { | ||
@@ -138,2 +183,13 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns a list of the built-in patterns. | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
IngestApi.prototype.processorGrok = function ingestProcessorGrokApi(params, options, callback) { | ||
@@ -160,2 +216,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Creates or updates a pipeline. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ OpenSearch - Create/Update pipeline} | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params | ||
* @param {string} params.id - Pipeline ID | ||
* @param {Object} params.body - Ingest definition | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/#response Create/Update Pipeline Response} | ||
*/ | ||
IngestApi.prototype.putPipeline = function ingestPutPipelineApi(params, options, callback) { | ||
@@ -192,2 +265,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Allows to simulate a pipeline with example documents. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ OpenSearch - Simulate Pipeline} | ||
* | ||
* @memberOf API-Ingest | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.id] - Pipeline ID | ||
* @param {boolean} [params.verbose] - Verbose mode. Display data output for each processor in executed pipeline | ||
* @param {Object} params.body - Simulate definition | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
IngestApi.prototype.simulate = function ingestSimulateApi(params, options, callback) { | ||
@@ -194,0 +283,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -63,2 +63,26 @@ /* | ||
/** | ||
* Retrieve multiple documents | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/ OpenSearch - Multi-get Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - Document ID. | ||
* @param {string} params.body - {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/#request-body Multi-get Request Body} | ||
* @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. | ||
* @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. | ||
* @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {string} [params.routing] - A value used to route the operation to a specific shard. | ||
* @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/#response Multi-get Response} | ||
*/ | ||
function mgetApi(params, options, callback) { | ||
@@ -65,0 +89,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -58,2 +58,21 @@ /* | ||
/** | ||
* Allows to execute several search template operations in one request. | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to use as default | ||
* @param {Object} params.body - The request definitions (metadata-search request definition pairs), separated by newlines | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response | ||
* @param {number} [params.max_concurrent_searches] - Controls the maximum number of concurrent searches the multi search api will execute | ||
* @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response | ||
* @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function msearchTemplateApi(params, options, callback) { | ||
@@ -60,0 +79,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -62,2 +62,24 @@ /* | ||
/** | ||
* Allows to execute several search operations in one request. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/multi-search/ OpenSearch - Multi-Search} | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to use as default | ||
* @param {Object} params.body - The request definitions (metadata-search request definition pairs), separated by newlines | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {number} [params.max_concurrent_searches] - Controls the maximum number of concurrent searches the multi search api will execute | ||
* @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response | ||
* @param {number} [params.pre_filter_shard_size] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. | ||
* @param {number} [params.max_concurrent_shard_requests] - The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests | ||
* @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response | ||
* @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/multi-search/#response Multi-search Response} | ||
*/ | ||
function msearchApi(params, options, callback) { | ||
@@ -64,0 +86,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Nodes */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -159,2 +161,21 @@ const acceptedQuerystring = [ | ||
/** | ||
* Returns information about hot threads on each node in the cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ OpenSearch - Nodes Hot Threads} | ||
* @memberOf API-Nodes | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.interval] - The interval for the second sampling of threads | ||
* @param {number} [params.snapshots] - Number of samples of thread stacktrace (default: 10) | ||
* @param {number} [params.threads] - Specify the number of threads to provide information for (default: 3) | ||
* @param {boolean} [params.ignore_idle_threads] - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) | ||
* @param {string} [params.type] - The type to sample (default: cpu) (options: cpu, wait, block) | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
NodesApi.prototype.hotThreads = function nodesHotThreadsApi(params, options, callback) { | ||
@@ -211,2 +232,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns information about hot threads on each node in the cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ OpenSearch - Nodes Info} | ||
* @memberOf API-Nodes | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.metric] - A comma-separated list of metrics you wish returned. Leave empty to return all. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest) | ||
* @param {boolean} [params.flat_settings] - Return settings in flat format (default: false) | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
NodesApi.prototype.info = function nodesInfoApi(params, options, callback) { | ||
@@ -250,2 +287,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Reloads secure settings. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ OpenSearch - Nodes Reload Security Settings} | ||
* @memberOf API-Nodes | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_id] - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* @param {Object} [params.body] - An object containing the password for the opensearch keystore | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi( | ||
@@ -282,2 +334,26 @@ params, | ||
/** | ||
* Returns statistical information about nodes in the cluster. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-stats/ OpenSearch - Nodes Stats} | ||
* @memberOf API-Nodes | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.metric] - Limit the information returned to the specified metrics (options: _all, breaker, fs, http, indices, jvm, os, process, thread_pool, transport, discovery, indexing_pressure) | ||
* @param {string} [params.index_metric] - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, suggest) | ||
* @param {string} [params.completion_fields] - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) | ||
* @param {string} [params.fielddata_fields] - A comma-separated list of fields for `fielddata` index metric (supports wildcards) | ||
* @param {string} [params.fields] - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) | ||
* @param {boolean} [params.groups] - A comma-separated list of search groups for `search` index metric | ||
* @param {string} [params.level] - Return indices stats aggregated at index, node or shard level (options: indices, node, shards) | ||
* @param {string} [params.types] - A comma-separated list of document types for the `indexing` index metric | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* @param {boolean} [params.include_segment_file_sizes] - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) | ||
* @param {boolean} [params.include_unloaded_segments] - If set to true segment stats will include stats for segments that are not currently loaded into memory | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
NodesApi.prototype.stats = function nodesStatsApi(params, options, callback) { | ||
@@ -347,2 +423,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns low-level information about REST actions usage on nodes. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ OpenSearch - Nodes Usage} | ||
* @memberOf API-Nodes | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.metric] - Limit the information returned to the specified metrics (options: _all, rest_actions) | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
NodesApi.prototype.usage = function nodesUsageApi(params, options, callback) { | ||
@@ -349,0 +440,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,13 @@ /* | ||
/** | ||
* Returns whether the cluster is running. | ||
* | ||
* @memberOf API-Cluster | ||
* | ||
* @param {Object} params - (Unused) | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function pingApi(params, options, callback) { | ||
@@ -41,0 +52,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -54,2 +54,19 @@ /* | ||
/** | ||
* Creates or updates a script. | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/create-stored-script/ OpenSearch - Create or update stored script} | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params | ||
* @param {string} params.id - Stored script or search template name | ||
* @param {string} params.body - The script | ||
* @param {string} [params.context] - Context in which the script or search template is to run. To prevent errors, the API immediately compiles the script or template in this context. | ||
* @param {string} [params.timeout=30s] - Explicit operation timeout | ||
* @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function putScriptApi(params, options, callback) { | ||
@@ -56,0 +73,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -56,2 +56,21 @@ /* | ||
/** | ||
* Allows to evaluate the quality of ranked search results over a set of typical search queries | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/rank-eval/ OpenSearch - Ranking evaluation} | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.index] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices | ||
* @param {Object} params.body - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/rank-eval/#sample-response Ranking Evaluation Response} | ||
*/ | ||
function rankEvalApi(params, options, callback) { | ||
@@ -58,0 +77,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -50,2 +50,16 @@ /* | ||
/** | ||
* Changes the number of requests per second for a particular Reindex operation. | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.task_id - The task id to rethrottle | ||
* @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function reindexRethrottleApi(params, options, callback) { | ||
@@ -52,0 +66,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -60,2 +60,24 @@ /* | ||
/** | ||
* Copy all or a subset of your data from a source index into a destination index. | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/reindex/ OpenSearch - Reindex Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {Object} params.body The search definition using the Query DSL and the prototype for the index request. | ||
* @param {boolean} [params.refresh=false] Should the affected indexes be refreshed? | ||
* @param {string} [params.timeout=30s] Time each individual bulk request should wait for shards that are unavailable. | ||
* @param {string} [params.wait_for_active_shards] Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) | ||
* @param {boolean} [params.wait_for_completion=false] Should the request should block until the reindex is complete. | ||
* @param {number} [params.requests_per_second=-1] The throttle to set on this request in sub-requests per second. -1 means no throttle. | ||
* @param {string} [params.scroll=5m] Control how long to keep the search context alive | ||
* @param {number|string} [params.slices=1] The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to `auto`. | ||
* @param {number} [params.max_docs] Maximum number of documents to process (default: all documents) | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/reindex/#response Reindex Document Response} | ||
*/ | ||
function reindexApi(params, options, callback) { | ||
@@ -62,0 +84,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,16 @@ /* | ||
/** | ||
* Allows to use the Mustache language to pre-render a search definition. | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.id] - The id of the stored search template | ||
* @param {Object} [params.body] - The search definition template and its params | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function renderSearchTemplateApi(params, options, callback) { | ||
@@ -41,0 +55,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,15 @@ /* | ||
/** | ||
* Execute Painless script | ||
* <br/> See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/exec-script/ OpenSearch - Execute Painless script} | ||
* @memberOf API-Script | ||
* | ||
* @param {Object} params | ||
* @param {string} params.body - The painless script | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function scriptsPainlessExecuteApi(params, options, callback) { | ||
@@ -41,0 +54,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -53,2 +53,19 @@ /* | ||
/** | ||
* Allows to retrieve a large numbers of results from a single search request. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ OpenSearch - Scroll } | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.scroll_id] - The scroll ID *Deprecated* | ||
* @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search | ||
* @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response | ||
* @param {Object} [params.body] - The scroll ID if not passed by URL or query parameter. | ||
* | ||
* @param {Object} [options] - Options for {@link Transport#request} | ||
* @param {function} [callback] - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function scrollApi(params, options, callback) { | ||
@@ -55,0 +72,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -57,2 +57,21 @@ /* | ||
/** | ||
* Returns information about the indices and shards that a search request would be executed against. | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.index] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.routing] - Specific routing value | ||
* @param {boolean} [params.local] - Return local information, do not retrieve the state from cluster_manager node (default: false) | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function searchShardsApi(params, options, callback) { | ||
@@ -59,0 +78,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -69,2 +69,29 @@ /* | ||
/** | ||
* Allows to use the Mustache language to pre-render a search definition. | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices | ||
* @param {Object} params.body - The search definition template and its params | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.routing] - A comma-separated list of specific routing values | ||
* @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit | ||
* @param {boolean} [params.profile] - Specify whether to profile the query execution | ||
* @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response | ||
* @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response | ||
* @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function searchTemplateApi(params, options, callback) { | ||
@@ -71,0 +98,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Search */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -124,2 +126,60 @@ const acceptedQuerystring = [ | ||
/** | ||
* Allows to execute several search operations in one request. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/search/ OpenSearch - Search} | ||
* | ||
* @memberOf API-Search | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices | ||
* @param {string} [params.analyzer] - The analyzer to use for the query string | ||
* @param {boolean} [params.analyze_wildcard] - Specify whether wildcard and prefix queries should be analyzed (default: false) | ||
* @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution | ||
* @param {string} [params.default_operator] - The default operator for query string query (AND or OR) (options: AND, OR) | ||
* @param {string} [params.df] - The field to use as default where no field prefix is given in the query string | ||
* @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit | ||
* @param {string} [params.stored_fields] - A comma-separated list of stored fields to return as part of a hit | ||
* @param {string} [params.docvalue_fields] - A comma-separated list of fields to return as the docvalue representation of a field for each hit | ||
* @param {number} [params.from] - Starting offset (default: 0) | ||
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled | ||
* @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) | ||
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.q] - Query in the Lucene query string syntax | ||
* @param {string} [params.routing] - A comma-separated list of specific routing values | ||
* @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search | ||
* @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {number} [params.size] - Number of hits to return (default: 10) | ||
* @param {string} [params.sort] - A comma-separated list of <field>:<direction> pairs | ||
* @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return | ||
* @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field | ||
* @param {string} [params._source_includes] - A list of fields to extract and return from the _source field | ||
* @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. | ||
* @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes | ||
* @param {string} [params.suggest_field] - Specify which field to use for suggestions | ||
* @param {string} [params.suggest_mode] - Specify suggest mode (options: missing, popular, always) | ||
* @param {number} [params.suggest_size] - How many suggestions to return in response | ||
* @param {string} [params.suggest_text] - The source text for which the suggestions should be returned | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* @param {boolean} [params.track_scores] - Whether to calculate and return scores even if they are not used for sorting | ||
* @param {boolean} [params.track_total_hits] - Indicate if the number of documents that match the query should be tracked | ||
* @param {boolean} [params.allow_partial_search_results] - Indicate if an error should be returned if there is a partial search failure or timeout | ||
* @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response | ||
* @param {boolean} [params.version] - Specify whether to return document version as part of a hit | ||
* @param {boolean} [params.seq_no_primary_term] - Specify whether to return sequence number and primary term of the last modification of each hit | ||
* @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting | ||
* @param {number} [params.batched_reduce_size] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. | ||
* @param {number} [params.max_concurrent_shard_requests] - The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests | ||
* @param {number} [params.pre_filter_shard_size] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. | ||
* @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response | ||
* @param {string} [params.min_compatible_shard_node] - The minimum compatible version that all shards involved in search should have for this request to be successful | ||
* @param {Object} [params.body] - The search definition using the Query DSL | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/latest/api-reference/search/#response-body Search Response} | ||
*/ | ||
function searchApi(params, options, callback) { | ||
@@ -126,0 +186,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -44,2 +44,3 @@ /* | ||
// TODO: Remove. Added in ES 7.15 | ||
ShutdownApi.prototype.deleteNode = function shutdownDeleteNodeApi(params, options, callback) { | ||
@@ -72,2 +73,3 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
// TODO: Remove. Added in ES 7.15 | ||
ShutdownApi.prototype.getNode = function shutdownGetNodeApi(params, options, callback) { | ||
@@ -99,2 +101,3 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
// TODO: Remove. Added in ES 7.15 | ||
ShutdownApi.prototype.putNode = function shutdownPutNodeApi(params, options, callback) { | ||
@@ -101,0 +104,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Snapshot */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -87,2 +89,17 @@ const acceptedQuerystring = [ | ||
/** | ||
* Removes stale data from repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} params.repository - A repository name | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi( | ||
@@ -119,2 +136,19 @@ params, | ||
/** | ||
* Clones indices from one snapshot into another snapshot in the same repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} params.repository - A repository name | ||
* @param {string} params.snapshot - The name of the snapshot to clone from | ||
* @param {Object} params.body - The snapshot clone definition | ||
* @param {string} [params.target_snapshot] - The name of the cloned snapshot to create | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.clone = function snapshotCloneApi(params, options, callback) { | ||
@@ -186,2 +220,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Creates a snapshot in a repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} params.repository - A repository name | ||
* @param {string} params.snapshot - A snapshot name | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {boolean} [params.wait_for_completion] - Should this request wait until the operation has completed before returning | ||
* @param {Object} [params.body] - The snapshot definition | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.create = function snapshotCreateApi(params, options, callback) { | ||
@@ -225,2 +276,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Creates a repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} params.repository - A repository name | ||
* @param {Object} params.body - The repository definition | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* @param {boolean} [params.verify] - Whether to verify the repository after creation | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi( | ||
@@ -261,2 +329,18 @@ params, | ||
/** | ||
* Deletes a snapshot. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {string} [params.snapshot] - A snapshot name | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.delete = function snapshotDeleteApi(params, options, callback) { | ||
@@ -300,2 +384,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Deletes a repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi( | ||
@@ -332,2 +432,22 @@ params, | ||
/** | ||
* Returns information about a snapshot. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {string} [params.snapshot] - A comma-separated list of snapshot names | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {boolean} [params.ignore_unavailable] - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown | ||
* @param {boolean} [params.index_details] - Whether to include details of each index in the snapshot, if those details are available. Defaults to false. | ||
* @param {boolean} [params.include_repository] - Whether to include the repository name in the snapshot info. Defaults to true. | ||
* @param {boolean} [params.verbose] - Whether to show verbose snapshot info or only show the basic info found in the repository index blob | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.get = function snapshotGetApi(params, options, callback) { | ||
@@ -371,2 +491,17 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns information about a snapshot. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A comma-separated list of repository names | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to cluster_manager node | ||
* @param {boolean} [params.local] - Return local information, do not retrieve the state from cluster_manager node (default: false) | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi(params, options, callback) { | ||
@@ -398,2 +533,26 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Analyzes a repository for correctness and performance | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {number} [params.blob_count] - Number of blobs to create during the test. Defaults to 100. | ||
* @param {number} [params.concurrency] - Number of operations to run concurrently during the test. Defaults to 10. | ||
* @param {number} [params.read_node_count] - Number of nodes on which to read a blob after writing. Defaults to 10. | ||
* @param {number} [params.early_read_node_count] - Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. | ||
* @param {number} [params.seed] - Seed for the random number generator used to create the test workload. Defaults to a random value. | ||
* @param {number} [params.rare_action_probability] - Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. | ||
* @param {string} [params.max_blob_size] - Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. | ||
* @param {string} [params.max_total_data_size] - Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. | ||
* @param {string} [params.timeout] - Explicit operation timeout. Defaults to '30s'. | ||
* @param {boolean} [params.detailed] - Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. | ||
* @param {boolean} [params.rarely_abort_writes] - Whether to rarely abort writes before they complete. Defaults to 'true'. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi( | ||
@@ -430,2 +589,20 @@ params, | ||
/** | ||
* Restores a snapshot. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {string} [params.snapshot] - A snapshot name | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {boolean} [params.wait_for_completion] - Should this request wait until the operation has completed before returning | ||
* @param {Object} [params.body] - Details of what to restore | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.restore = function snapshotRestoreApi(params, options, callback) { | ||
@@ -476,2 +653,19 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns information about the status of a snapshot. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {string} [params.snapshot] - A comma-separated list of snapshot names | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {boolean} [params.ignore_unavailable] - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.status = function snapshotStatusApi(params, options, callback) { | ||
@@ -520,2 +714,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Verifies a repository. | ||
* | ||
* @memberOf API-Snapshot | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.repository] - A repository name | ||
* @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node | ||
* @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi( | ||
@@ -522,0 +732,0 @@ params, |
@@ -35,2 +35,4 @@ /* | ||
/** @namespace API-Tasks */ | ||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); | ||
@@ -64,2 +66,20 @@ const acceptedQuerystring = [ | ||
/** | ||
* Cancels a task, if it can be cancelled through an API. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling OpenSearch - Task Cancelling} | ||
* | ||
* @memberOf API-Tasks | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.task_id] - Cancel the task with specified task id (node_id:task_number) | ||
* @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.actions] - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. | ||
* @param {string} [params.parent_task_id] - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. | ||
* @param {boolean} [params.wait_for_completion] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
TasksApi.prototype.cancel = function tasksCancelApi(params, options, callback) { | ||
@@ -91,2 +111,18 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns information about a task. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks OpenSearch - Tasks} | ||
* | ||
* @memberOf API-Tasks | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.task_id] - Return the task with specified id (node_id:task_number) | ||
* @param {boolean} [params.wait_for_completion] - Wait for the matching tasks to complete (default: false) | ||
* @param {string} [params.timeout] - Explicit operation timeoutompletion] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
TasksApi.prototype.get = function tasksGetApi(params, options, callback) { | ||
@@ -119,2 +155,22 @@ [params, options, callback] = normalizeArguments(params, options, callback); | ||
/** | ||
* Returns a list of tasks. | ||
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks OpenSearch - Tasks} | ||
* | ||
* @memberOf API-Tasks | ||
* | ||
* @param {Object} params | ||
* @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes | ||
* @param {string} [params.actions] - A comma-separated list of actions that should be returned. Leave empty to return all. | ||
* @param {boolean} [params.detailed] - Return detailed task information (default: false) | ||
* @param {string} [params.parent_task_id] - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. | ||
* @param {boolean} [params.wait_for_completion] - Wait for the matching tasks to complete (default: false) | ||
* @param {string} [params.group_by] - Group tasks by nodes or parent/child relationships (options: nodes, parents, none) | ||
* @param {string} [params.timeout] - Explicit operation timeout | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
TasksApi.prototype.list = function tasksListApi(params, options, callback) { | ||
@@ -121,0 +177,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -39,2 +39,3 @@ /* | ||
// TODO: Remove. Added in ES 7.14 | ||
function termsEnumApi(params, options, callback) { | ||
@@ -41,0 +42,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -62,2 +62,28 @@ /* | ||
/** | ||
* Returns information and statistics about terms in the fields of a particular document. | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - The index in which the document resides. | ||
* @param {string} [params.id] - The id of the document, when not specified a doc param should be supplied. | ||
* @param {boolean} [params.term_statistics] - Specifies if total term frequency and document frequency should be returned. | ||
* @param {boolean} [params.field_statistics] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. | ||
* @param {string} [params.fields] - A comma-separated list of fields to return. | ||
* @param {boolean} [params.offsets] - Specifies if term offsets should be returned. | ||
* @param {boolean} [params.positions] - Specifies if term positions should be returned. | ||
* @param {boolean} [params.payloads] - Specifies if term payloads should be returned. | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random). | ||
* @param {string} [params.routing] - Specific routing value. | ||
* @param {boolean} [params.realtime] - Specifies if request is real-time as opposed to near-real-time (default: true). | ||
* @param {number} [params.version] - Explicit version number for concurrency control | ||
* @param {string} [params.version_type] - Specific version type (options: internal, external, external_gte, force) | ||
* @param {Object} [params.body] - Define parameters and or supply a document to get termvectors for. See documentation. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function termvectorsApi(params, options, callback) { | ||
@@ -64,0 +90,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -50,2 +50,16 @@ /* | ||
/** | ||
* Changes the number of requests per second for a particular Update By Query operation. | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.task_id - The task id to rethrottle | ||
* @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} | ||
*/ | ||
function updateByQueryRethrottleApi(params, options, callback) { | ||
@@ -52,0 +66,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -104,2 +104,52 @@ /* | ||
/** | ||
* Run a script to update all documents that match the query. | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-by-query/ OpenSearch - Update by query} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - A comma-separated list of index names to search; use '_all' or empty string to perform the operation on all indices | ||
* @param {Object} [params.body] - The search definition using the Query DSL | ||
* @param {string} [params.analyzer] - The analyzer to use for the query string | ||
* @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed (default: false) | ||
* @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) | ||
* @param {string} [params.df] - The field to use as default where no field prefix is given in the query string | ||
* @param {number} [params.from=0] - Starting offset | ||
* @param {boolean} [params.ignore_unavailable=false] - Whether specified concrete indices should be ignored when unavailable (missing or closed) | ||
* @param {boolean} [params.allow_no_indices=true] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes '_all' string or when no indices have been specified) | ||
* @param {string} [params.conflicts=abort] - What to do when the update by query hits version conflicts? (options: abort, proceed) | ||
* @param {string} [params.expand_wildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) | ||
* @param {boolean} [params.lenient=false] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored | ||
* @param {string} [params.pipeline] - Ingest pipeline to set on index requests made by this action. (default: none) | ||
* @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) | ||
* @param {string} [params.q] - Query in the Lucene query string syntax | ||
* @param {string} [params.routing] - A comma-separated list of specific routing values | ||
* @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search | ||
* @param {string} [params.search_type=query_then_fetch] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) | ||
* @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. | ||
* @param {number} [params.size] - Deprecated, please use 'max_docs' instead | ||
* @param {number} [params.max_docs] - Maximum number of documents to process (default: all documents) | ||
* @param {string} [params.sort] - A comma-separated list of <field>:<direction> pairs | ||
* @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return | ||
* @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field | ||
* @param {string} [params._source_includes] - A list of fields to extract and return from the _source field | ||
* @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. | ||
* @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes | ||
* @param {boolean} [params.version] - Specify whether to return document version as part of a hit | ||
* @param {boolean} [params.version_type] - Should the document increment the version number (internal) on hit or not (reindex) | ||
* @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting | ||
* @param {boolean} [params.refresh=false] - Should the affected indexes be refreshed? | ||
* @param {string} [params.timeout] - Time each individual bulk request should wait for shards that are unavailable. | ||
* @param {string} [params.wait_for_active_shards=1] - Sets the number of shard copies that must be active before proceeding with the update by query operation. 1 means the primary shard only. Set to 'all' for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) | ||
* @param {number} [params.scroll_size=1000] - Size on the scroll request powering the update by query | ||
* @param {boolean} [params.wait_for_completion=true] - Should the request should block until the update by query operation is complete. | ||
* @param {number} [params.requests_per_second=-1] - The throttle to set on this request in sub-requests per second. -1 means no throttle. | ||
* @param {string} [params.slices=1] - The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to 'auto'. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-by-query/#response Update by query Response} | ||
*/ | ||
function updateByQueryApi(params, options, callback) { | ||
@@ -106,0 +156,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -71,2 +71,30 @@ /* | ||
/** | ||
* Update an existing document | ||
* <br/> See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/ OpenSearch - Update Document} | ||
* | ||
* @memberOf API-Document | ||
* | ||
* @param {Object} params | ||
* @param {string} params.index - Name of the index. | ||
* @param {string} params.id - A unique identifier to attach to the document. | ||
* @param {Object} params.body - The request definition requires either `script` or partial `doc`. | ||
* @param {number} [params.if_seq_no] - Only perform the update operation if the document has the specified sequence number. | ||
* @param {number} [params.if_primary_term] - Only perform the update operation if the document has the specified primary term. | ||
* @param {string} [params.lang=painless] - Language of the script. | ||
* @param {string} [params.routing] - Value used to assign the index operation to a specific shard. | ||
* @param {string} [params._source=true] - Whether to include the '_source' field in the response body. | ||
* @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. | ||
* @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. | ||
* @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. | ||
* @param {number} [params.retry_on_conflict=0] - The amount of times OpenSearch should retry the operation if there’s a document conflict. | ||
* @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. | ||
* @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. | ||
* @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. | ||
* | ||
* @param {Object} options - Options for {@link Transport#request} | ||
* @param {function} callback - Callback that handles errors and response | ||
* | ||
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/#response Update Response} | ||
*/ | ||
function updateApi(params, options, callback) { | ||
@@ -73,0 +101,0 @@ [params, options, callback] = normalizeArguments(params, options, callback); |
@@ -38,6 +38,9 @@ /* | ||
const createApi = require('./api/create'); | ||
const createPitApi = require('./api/create_pit'); | ||
const DanglingIndicesApi = require('./api/dangling_indices'); | ||
const deleteApi = require('./api/delete'); | ||
const deleteAllPitsApi = require('./api/delete_all_pits'); | ||
const deleteByQueryApi = require('./api/delete_by_query'); | ||
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle'); | ||
const deletePitApi = require('./api/delete_pit'); | ||
const deleteScriptApi = require('./api/delete_script'); | ||
@@ -50,2 +53,3 @@ const existsApi = require('./api/exists'); | ||
const getApi = require('./api/get'); | ||
const getAllPitsApi = require('./api/get_all_pits'); | ||
const getScriptApi = require('./api/get_script'); | ||
@@ -114,5 +118,8 @@ const getScriptContextApi = require('./api/get_script_context'); | ||
OpenSearchAPI.prototype.create = createApi; | ||
OpenSearchAPI.prototype.createPit = createPitApi; | ||
OpenSearchAPI.prototype.delete = deleteApi; | ||
OpenSearchAPI.prototype.deleteAllPits = deleteAllPitsApi; | ||
OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi; | ||
OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi; | ||
OpenSearchAPI.prototype.deletePit = deletePitApi; | ||
OpenSearchAPI.prototype.deleteScript = deleteScriptApi; | ||
@@ -124,2 +131,3 @@ OpenSearchAPI.prototype.exists = existsApi; | ||
OpenSearchAPI.prototype.get = getApi; | ||
OpenSearchAPI.prototype.getAllPits = getAllPitsApi; | ||
OpenSearchAPI.prototype.getScript = getScriptApi; | ||
@@ -174,2 +182,7 @@ OpenSearchAPI.prototype.getScriptContext = getScriptContextApi; | ||
}, | ||
create_pit: { | ||
get() { | ||
return this.createPit; | ||
}, | ||
}, | ||
danglingIndices: { | ||
@@ -188,2 +201,7 @@ get() { | ||
}, | ||
delete_all_pits: { | ||
get() { | ||
return this.deleteAllPits; | ||
}, | ||
}, | ||
delete_by_query: { | ||
@@ -199,2 +217,7 @@ get() { | ||
}, | ||
delete_pit: { | ||
get() { | ||
return this.deletePit; | ||
}, | ||
}, | ||
delete_script: { | ||
@@ -223,2 +246,7 @@ get() { | ||
}, | ||
get_all_pits: { | ||
get() { | ||
return this.getAllPits; | ||
}, | ||
}, | ||
get_script: { | ||
@@ -225,0 +253,0 @@ get() { |
@@ -139,2 +139,3 @@ /* | ||
create<TDocument = unknown, TContext = unknown>(params: T.CreateRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CreateResponse, TContext>> | ||
createPit<TContext = unknown>(params?: T.PointInTimeCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PointInTimeCreateResponse, TContext>> | ||
danglingIndices: { | ||
@@ -146,4 +147,6 @@ deleteDanglingIndex<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>> | ||
delete<TContext = unknown>(params: T.DeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteResponse, TContext>> | ||
deleteAllPits<TContext = unknown>(params: T.PointInTimeDeleteAllRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PointInTimeDeleteAllResponse, TContext>> | ||
deleteByQuery<TContext = unknown>(params: T.DeleteByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryResponse, TContext>> | ||
deleteByQueryRethrottle<TContext = unknown>(params: T.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryRethrottleResponse, TContext>> | ||
deletePit<TContext = unknown>(params: T.PointInTimeDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PointInTimeDeleteResponse, TContext>> | ||
deleteScript<TContext = unknown>(params: T.DeleteScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteScriptResponse, TContext>> | ||
@@ -159,2 +162,3 @@ exists<TContext = unknown>(params: T.ExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsResponse, TContext>> | ||
get<TDocument = unknown, TContext = unknown>(params: T.GetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetResponse<TDocument>, TContext>> | ||
getAllPits<TContext = unknown>(params: T.PointInTimeGetAllRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PointInTimeGetAllResponse, TContext>> | ||
getScript<TContext = unknown>(params: T.GetScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptResponse, TContext>> | ||
@@ -161,0 +165,0 @@ getScriptContext<TContext = unknown>(params?: T.GetScriptContextRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptContextResponse, TContext>> |
@@ -526,2 +526,10 @@ /* | ||
export interface CreatePit extends Generic { | ||
index: string | string[]; | ||
allow_partial_pit_creation?: boolean; | ||
keep_alive: string; | ||
preference?: string; | ||
routing?: string | string[]; | ||
} | ||
export interface DanglingIndicesDeleteDanglingIndex extends Generic { | ||
@@ -564,2 +572,4 @@ index_uuid: string; | ||
export interface DeleteAllPits extends Generic { } | ||
export interface DeleteByQuery<T = RequestBody> extends Generic { | ||
@@ -610,2 +620,6 @@ index: string | string[]; | ||
export interface DeletePit<T = RequestBody> extends Generic { | ||
body: T; | ||
} | ||
export interface DeleteScript extends Generic { | ||
@@ -711,2 +725,4 @@ id: string; | ||
export interface GetAllPits extends Generic { } | ||
export interface GetScript extends Generic { | ||
@@ -713,0 +729,0 @@ id: string; |
@@ -6,4 +6,42 @@ # CHANGELOG | ||
### Added | ||
- Add release details to releasing.md ([319](https://github.com/opensearch-project/opensearch-js/pull/319)) | ||
- Allow overriding the aws service identifier in AwsSigv4Signer ([333](https://github.com/opensearch-project/opensearch-js/pull/333)) | ||
- Added skip-changelog label ([339](https://github.com/opensearch-project/opensearch-js/pull/339)) | ||
- Added jsdoc for documentation generation ([#335](https://github.com/opensearch-project/opensearch-js/issues/335)) | ||
- Documented Transport#request ([#335](https://github.com/opensearch-project/opensearch-js/issues/335)) | ||
- Documented all API methods ([#335](https://github.com/opensearch-project/opensearch-js/issues/335)) | ||
- Added point in time APIs ([#348](https://github.com/opensearch-project/opensearch-js/pull/348)) | ||
- Added support for Amazon OpenSearch Serverless ([#356](https://github.com/opensearch-project/opensearch-js/issues/356)) | ||
### Dependencies | ||
- Bumps `xmlbuilder2` from 2.4.1 to 3.0.2 | ||
- Bumps `minimatch` from 3.0.4 to 3.1.2 | ||
- Bumps `eslint` from 8.30.0 to 8.32.0 | ||
- Bumps `eslint` from 7.32.0 to 8.32.0 | ||
- Replaced `babel-eslint` with `@babel/eslint-parser` | ||
- Bumps `eslint-plugin-prettier` from 4.0.0 to 4.2.1 | ||
- Bumps `minimist` from 1.2.6 to 1.2.7 | ||
- Bumps `@aws-sdk/types` from 3.190.0 to 3.226.0 | ||
- Bumps `json5` from 2.2.0 to 2.2.3 | ||
- Bumps `split2` from 3.2.2 to 4.1.0 | ||
- Bumps `@types/node` from 15.14.7 to 18.11.18 | ||
- Bumps `prettier` from 2.7.1 to 2.8.3 | ||
- Bumps `hpagent` from 0.1.2 to 1.2.0 | ||
- Bumps `eslint-config-prettier` from 8.5.0 to 8.6.0 | ||
- Bumps `rimraf` from 3.0.2 to 4.1.1 | ||
### Dependencies | ||
### Changed | ||
- Remove test artifacts from gh_pages workflow ([#335](https://github.com/opensearch-project/opensearch-js/issues/335)) | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
### Security | ||
- [CVE-2022-25912] Bumps simple-git from 3.4.0 to 3.15.0 ([#341](https://github.com/opensearch-project/opensearch-js/pull/341)) | ||
## [2.1] | ||
### Added | ||
- Github workflow for changelog verification ([#306](https://github.com/opensearch-project/opensearch-js/pull/306)) | ||
- Add GitHub and Jenkins release workflow ([#317](https://github.com/opensearch-project/opensearch-js/pull/317)) | ||
### Dependencies | ||
@@ -13,14 +51,6 @@ - Bumps `tsd` from 0.22.0 to 0.24.1 | ||
### Changed | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
- Fix mutability of connection headers ([#291](https://github.com/opensearch-project/opensearch-js/issues/291)) | ||
### Security | ||
[Unreleased]: https://github.com/opensearch-project/opensearch-js/compare/2.0...HEAD | ||
[2.1]: https://github.com/opensearch-project/opensearch-js/releases/tag/2.1.0 | ||
[Unreleased]: https://github.com/opensearch-project/opensearch-js/compare/2.1...HEAD |
@@ -16,2 +16,3 @@ /* | ||
const AwsSigv4SignerError = require('./errors'); | ||
const crypto = require('crypto'); | ||
@@ -62,10 +63,13 @@ const getAwsSDKCredentialsProvider = async () => { | ||
function AwsSigv4Signer(opts) { | ||
function AwsSigv4Signer(opts = {}) { | ||
const credentialsState = { | ||
credentials: null, | ||
}; | ||
if (opts && (!opts.region || opts.region === null || opts.region === '')) { | ||
if (!opts.region) { | ||
throw new AwsSigv4SignerError('Region cannot be empty'); | ||
} | ||
if (opts && typeof opts.getCredentials !== 'function') { | ||
if (!opts.service) { | ||
opts.service = 'es'; | ||
} | ||
if (typeof opts.getCredentials !== 'function') { | ||
opts.getCredentials = awsDefaultCredentialsProvider; | ||
@@ -75,7 +79,12 @@ } | ||
function buildSignedRequestObject(request = {}) { | ||
request.service = 'es'; | ||
request.service = opts.service; | ||
request.region = opts.region; | ||
request.headers = request.headers || {}; | ||
request.headers['host'] = request.hostname; | ||
return aws4.sign(request, credentialsState.credentials); | ||
const signed = aws4.sign(request, credentialsState.credentials); | ||
signed.headers['x-amz-content-sha256'] = crypto | ||
.createHash('sha256') | ||
.update(request.body || '', 'utf8') | ||
.digest('hex'); | ||
return signed; | ||
} | ||
@@ -82,0 +91,0 @@ |
@@ -93,3 +93,3 @@ /* | ||
const key = keys[i]; | ||
// OpenSearch will complain for keys without a value | ||
// OpenSearch will complain about keys without a value | ||
if (object[key] === undefined) { | ||
@@ -96,0 +96,0 @@ delete object[key]; |
@@ -59,2 +59,3 @@ /* | ||
/** Default Transport Layer */ | ||
class Transport { | ||
@@ -114,2 +115,23 @@ constructor(opts) { | ||
/** | ||
* @param {Object} params | ||
* @param {string} params.method - HTTP Method (e.g. HEAD, GET, POST...) | ||
* @param {string} params.path - Relative URL path | ||
* @param {Object | string} [params.body] - Body of a standard request. | ||
* @param {Object[] | string} [params.bulkBody] - Body of a bulk request. | ||
* @param {Object[] | string} [params.querystring] - Querystring params. | ||
* | ||
* @param {Object} options | ||
* @param {number} [options.id] - Request ID | ||
* @param {Object} [options.context] - Object used for observability | ||
* @param {number} [options.maxRetries] - Max number of retries | ||
* @param {false | 'gzip'} [options.compression] - Request body compression, if any | ||
* @param {boolean} [options.asStream] - Whether to emit the response as stream | ||
* @param {number[]} [options.ignore] - Response's Error Status Codes to ignore | ||
* @param {Object} [options.headers] - Request headers | ||
* @param {Object | string} [options.querystring] - Request's query string | ||
* @param {number} [options.requestTimeout] - Max request timeout in milliseconds | ||
* | ||
* @param {function} callback - Callback that handles errors and response | ||
*/ | ||
request(params, options, callback) { | ||
@@ -391,3 +413,3 @@ options = options || {}; | ||
this.connectionPool.markDead(meta.connection); | ||
// retry logic (we shoukd not retry on "429 - Too Many Requests") | ||
// retry logic (we should not retry on "429 - Too Many Requests") | ||
if (meta.attempts < maxRetries && result.statusCode !== 429) { | ||
@@ -394,0 +416,0 @@ meta.attempts++; |
@@ -1,7 +0,9 @@ | ||
# OpenSearch JavaScript Client Maintainers | ||
## Overview | ||
This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md). | ||
## Current Maintainers | ||
| Maintainer | GitHub ID | Affiliation | | ||
|-----------------------|-----------------------------------------------|-------------| | ||
| --------------------- | --------------------------------------------- | ----------- | | ||
| Anan Zhuang | [ananzh](https://github.com/ananzh) | Amazon | | ||
@@ -15,5 +17,1 @@ | Bishoy Boktor | [boktorbb](https://github.com/boktorbb) | Amazon | | ||
| Theo Truong | [nhtruong](https://github.com/nhtruong) | Amazon | | ||
[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) | ||
explains what maintainers do in this repo, and how they should be doing it. | ||
If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). |
@@ -26,3 +26,3 @@ { | ||
"homepage": "https://www.opensearch.org/", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"versionCanary": "7.10.0-canary.6", | ||
@@ -61,5 +61,5 @@ "keywords": [ | ||
"@aws-sdk/types": "^3.160.0", | ||
"@babel/eslint-parser": "^7.19.1", | ||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1", | ||
"@types/node": "^15.3.1", | ||
"babel-eslint": "^10.1.0", | ||
"@types/node": "^18.11.18", | ||
"convert-hrtime": "^5.0.0", | ||
@@ -70,3 +70,3 @@ "cross-zip": "^4.0.0", | ||
"dezalgo": "^1.0.3", | ||
"eslint": "^7.32.0", | ||
"eslint": "^8.30.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
@@ -77,2 +77,3 @@ "eslint-plugin-prettier": "^4.0.0", | ||
"js-yaml": "^4.1.0", | ||
"jsdoc": "^4.0.0", | ||
"license-checker": "^25.0.1", | ||
@@ -85,7 +86,7 @@ "minimist": "^1.2.5", | ||
"proxy": "^1.0.2", | ||
"rimraf": "^3.0.2", | ||
"rimraf": "^4.1.1", | ||
"semver": "^7.3.5", | ||
"simple-git": "^3.5.0", | ||
"simple-git": "^3.15.0", | ||
"simple-statistics": "^7.7.0", | ||
"split2": "^3.2.2", | ||
"split2": "^4.1.0", | ||
"stoppable": "^1.1.0", | ||
@@ -95,3 +96,3 @@ "tap": "^16.3.0", | ||
"workq": "^3.0.0", | ||
"xmlbuilder2": "^2.4.1" | ||
"xmlbuilder2": "^3.0.2" | ||
}, | ||
@@ -101,3 +102,3 @@ "dependencies": { | ||
"debug": "^4.3.1", | ||
"hpagent": "^0.1.1", | ||
"hpagent": "^1.2.0", | ||
"ms": "^2.1.3", | ||
@@ -104,0 +105,0 @@ "secure-json-parse": "^2.4.0" |
@@ -34,2 +34,8 @@ - [Overview](#overview) | ||
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md). | ||
The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [maintainers](MAINTAINERS.md). | ||
1. Create a tag, e.g. v2.1.0, and push it to the GitHub repo. | ||
1. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and a draft release will be created. | ||
1. This draft release triggers the [jenkins release workflow](https://build.ci.opensearch.org/job/opensearch-js-release/) as a result of which opensearch-js client is released on [npmjs](https://www.npmjs.com/package/@opensearch-project/opensearch). | ||
1. Once the above release workflow is successful, the drafted release on GitHub is published automatically. | ||
1. Increment "version" in package.json to the next patch release, e.g. v2.1.1. See [example](https://github.com/opensearch-project/opensearch-js/pull/318) |
@@ -15,2 +15,3 @@ # User Guide | ||
## Initializing a Client | ||
```javascript | ||
@@ -74,3 +75,3 @@ 'use strict'; | ||
}), | ||
node: "https://search-xxx.region.es.amazonaws.com", // OpenSearch domain URL | ||
node: 'https://search-xxx.region.es.amazonaws.com', // OpenSearch domain URL | ||
}); | ||
@@ -82,3 +83,3 @@ ``` | ||
```javascript | ||
const { defaultProvider } = require("@aws-sdk/credential-provider-node"); // V3 SDK. | ||
const { defaultProvider } = require('@aws-sdk/credential-provider-node'); // V3 SDK. | ||
const { Client } = require('@opensearch-project/opensearch'); | ||
@@ -103,3 +104,3 @@ const { AwsSigv4Signer } = require('@opensearch-project/opensearch/aws'); | ||
}), | ||
node: "https://search-xxx.region.es.amazonaws.com", // OpenSearch domain URL | ||
node: 'https://search-xxx.region.es.amazonaws.com', // OpenSearch domain URL | ||
}); | ||
@@ -111,20 +112,20 @@ ``` | ||
```javascript | ||
console.log('Creating index:'); | ||
var index_name = 'books'; | ||
var settings = { | ||
settings: { | ||
index: { | ||
number_of_shards: 4, | ||
number_of_replicas: 3, | ||
}, | ||
console.log('Creating index:'); | ||
var index_name = 'books'; | ||
var settings = { | ||
settings: { | ||
index: { | ||
number_of_shards: 4, | ||
number_of_replicas: 3, | ||
}, | ||
}; | ||
}, | ||
}; | ||
var response = await client.indices.create({ | ||
index: index_name, | ||
body: settings, | ||
}); | ||
var response = await client.indices.create({ | ||
index: index_name, | ||
body: settings, | ||
}); | ||
console.log(response.body); | ||
console.log(response.body); | ||
``` | ||
@@ -135,21 +136,21 @@ | ||
```javascript | ||
console.log('Adding document:'); | ||
console.log('Adding document:'); | ||
var document = { | ||
title: 'The Outsider', | ||
author: 'Stephen King', | ||
year: '2018', | ||
genre: 'Crime fiction', | ||
}; | ||
var document = { | ||
title: 'The Outsider', | ||
author: 'Stephen King', | ||
year: '2018', | ||
genre: 'Crime fiction', | ||
}; | ||
var id = '1'; | ||
var id = '1'; | ||
var response = await client.index({ | ||
id: id, | ||
index: index_name, | ||
body: document, | ||
refresh: true, | ||
}); | ||
var response = await client.index({ | ||
id: id, | ||
index: index_name, | ||
body: document, | ||
refresh: true, | ||
}); | ||
console.log(response.body); | ||
console.log(response.body); | ||
``` | ||
@@ -160,20 +161,20 @@ | ||
```javascript | ||
console.log('Search results:'); | ||
console.log('Search results:'); | ||
var query = { | ||
query: { | ||
match: { | ||
title: { | ||
query: 'The Outsider', | ||
}, | ||
var query = { | ||
query: { | ||
match: { | ||
title: { | ||
query: 'The Outsider', | ||
}, | ||
}, | ||
}; | ||
}, | ||
}; | ||
var response = await client.search({ | ||
index: index_name, | ||
body: query, | ||
}); | ||
var response = await client.search({ | ||
index: index_name, | ||
body: query, | ||
}); | ||
console.log(response.body.hits); | ||
console.log(response.body.hits); | ||
``` | ||
@@ -184,10 +185,10 @@ | ||
```javascript | ||
console.log('Deleting document:'); | ||
console.log('Deleting document:'); | ||
var response = await client.delete({ | ||
index: index_name, | ||
id: id, | ||
}); | ||
var response = await client.delete({ | ||
index: index_name, | ||
id: id, | ||
}); | ||
console.log(response.body); | ||
console.log(response.body); | ||
``` | ||
@@ -198,9 +199,59 @@ | ||
```javascript | ||
console.log('Deleting index:'); | ||
console.log('Deleting index:'); | ||
var response = await client.indices.delete({ | ||
index: index_name, | ||
}); | ||
var response = await client.indices.delete({ | ||
index: index_name, | ||
}); | ||
console.log(response.body); | ||
console.log(response.body); | ||
``` | ||
## Create a Point in Time | ||
```javascript | ||
console.log('Creating a PIT:'); | ||
var response = await client.createPit({ | ||
index: 'books*', | ||
keep_alive: '100m', | ||
expand_wildcards: 'all', | ||
}); | ||
console.log(response.body); | ||
``` | ||
## Get all PITs | ||
```javascript | ||
console.log('Getting all PITs:'); | ||
var response = await client.getAllPits(); | ||
console.log(response.body); | ||
``` | ||
## Delete a Point in Time | ||
```javascript | ||
console.log('Deleting a PIT:'); | ||
var response = await client.deletePit({ | ||
body: { | ||
pit_id: [ | ||
'o463QQEPbXktaW5kZXgtMDAwMDAxFkhGN09fMVlPUkVPLXh6MUExZ1hpaEEAFjBGbmVEZHdGU1EtaFhhUFc4ZkR5cWcAAAAAAAAAAAEWaXBPNVJtZEhTZDZXTWFFR05waXdWZwEWSEY3T18xWU9SRU8teHoxQTFnWGloQQAA', | ||
], | ||
}, | ||
}); | ||
console.log(response.body); | ||
``` | ||
## Delete all PITs | ||
```javascript | ||
console.log('Deleting all PITs:'); | ||
var response = await client.deleteAllPits(); | ||
console.log(response.body); | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1299984
101
33000
2
33
+ Addedhpagent@1.2.0(transitive)
- Removedhpagent@0.1.2(transitive)
Updatedhpagent@^1.2.0