@opensearch-project/opensearch 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/api/OpenSearchApi.d.ts +78 -0
  2. package/api/OpenSearchApi.js +4 -0
  3. package/api/_core/bulk.d.ts +1 -1
  4. package/api/_core/explain.d.ts +1 -1
  5. package/api/_core/search.d.ts +1 -0
  6. package/api/_core/search.js +1 -0
  7. package/api/_core/searchShards.d.ts +5 -0
  8. package/api/_core/searchShards.js +1 -0
  9. package/api/_types/_common.aggregations.d.ts +111 -266
  10. package/api/_types/_common.analysis.d.ts +2 -2
  11. package/api/_types/_common.d.ts +13 -7
  12. package/api/_types/_common.mapping.d.ts +1 -1
  13. package/api/_types/_common.query_dsl.d.ts +10 -6
  14. package/api/_types/_core.bulk.d.ts +16 -8
  15. package/api/_types/_core.explain.d.ts +1 -7
  16. package/api/_types/_core.search.d.ts +23 -7
  17. package/api/_types/cluster._common.d.ts +2 -0
  18. package/api/_types/cluster.stats.d.ts +3 -3
  19. package/api/_types/geospatial._common.d.ts +147 -0
  20. package/api/_types/index.d.ts +4 -0
  21. package/api/_types/indices._common.d.ts +6 -3
  22. package/api/_types/ltr._common.d.ts +54 -0
  23. package/api/_types/ml._common.d.ts +9 -0
  24. package/api/_types/neural._common.d.ts +94 -0
  25. package/api/_types/nodes._common.d.ts +1 -1
  26. package/api/_types/nodes.stats.d.ts +1 -0
  27. package/api/_types/search_pipeline._common.d.ts +19 -1
  28. package/api/_types/security._common.d.ts +6 -6
  29. package/api/cluster/existsComponentTemplate.js +1 -1
  30. package/api/cluster/health.d.ts +2 -1
  31. package/api/flowFramework/create.js +6 -6
  32. package/api/flowFramework/delete.js +3 -3
  33. package/api/flowFramework/deprovision.js +3 -3
  34. package/api/flowFramework/get.js +2 -2
  35. package/api/flowFramework/getStatus.js +3 -3
  36. package/api/flowFramework/getSteps.js +2 -2
  37. package/api/flowFramework/provision.js +2 -2
  38. package/api/flowFramework/update.js +7 -7
  39. package/api/geospatial/_api.js +46 -0
  40. package/api/geospatial/deleteIp2GeoDatasource.d.ts +30 -0
  41. package/api/geospatial/deleteIp2GeoDatasource.js +49 -0
  42. package/api/geospatial/geojsonUploadPost.d.ts +30 -0
  43. package/api/geospatial/geojsonUploadPost.js +49 -0
  44. package/api/geospatial/geojsonUploadPut.d.ts +30 -0
  45. package/api/geospatial/geojsonUploadPut.js +49 -0
  46. package/api/geospatial/getIp2GeoDatasource.d.ts +31 -0
  47. package/api/geospatial/getIp2GeoDatasource.js +48 -0
  48. package/api/geospatial/getUploadStats.d.ts +28 -0
  49. package/api/geospatial/getUploadStats.js +45 -0
  50. package/api/geospatial/putIp2GeoDatasource.d.ts +32 -0
  51. package/api/geospatial/putIp2GeoDatasource.js +53 -0
  52. package/api/geospatial/putIp2GeoDatasourceSettings.d.ts +32 -0
  53. package/api/geospatial/putIp2GeoDatasourceSettings.js +50 -0
  54. package/api/index.d.ts +36 -4
  55. package/api/indices/putSettings.js +1 -1
  56. package/api/indices/simulateTemplate.js +1 -1
  57. package/api/ism/addPolicy.js +1 -1
  58. package/api/ism/changePolicy.js +1 -1
  59. package/api/ism/existsPolicy.js +1 -1
  60. package/api/ism/explainPolicy.js +2 -2
  61. package/api/ism/getPolicies.js +1 -1
  62. package/api/ism/getPolicy.js +1 -1
  63. package/api/ism/putPolicies.js +1 -1
  64. package/api/ism/refreshSearchAnalyzers.js +2 -2
  65. package/api/ism/removePolicy.js +1 -1
  66. package/api/ism/retryIndex.js +2 -2
  67. package/api/ltr/_api.js +24 -0
  68. package/api/ltr/cacheStats.d.ts +28 -0
  69. package/api/ltr/cacheStats.js +45 -0
  70. package/api/ltr/clearCache.d.ts +30 -0
  71. package/api/ltr/clearCache.js +48 -0
  72. package/api/ltr/createDefaultStore.d.ts +28 -0
  73. package/api/ltr/createDefaultStore.js +45 -0
  74. package/api/ltr/createStore.d.ts +30 -0
  75. package/api/ltr/createStore.js +49 -0
  76. package/api/ltr/deleteDefaultStore.d.ts +28 -0
  77. package/api/ltr/deleteDefaultStore.js +45 -0
  78. package/api/ltr/deleteStore.d.ts +30 -0
  79. package/api/ltr/deleteStore.js +49 -0
  80. package/api/ltr/getStore.d.ts +30 -0
  81. package/api/ltr/getStore.js +49 -0
  82. package/api/ltr/listStores.d.ts +28 -0
  83. package/api/ltr/listStores.js +45 -0
  84. package/api/ml/getTool.d.ts +1 -1
  85. package/api/neural/_api.js +26 -0
  86. package/api/neural/stats.d.ts +33 -0
  87. package/api/neural/stats.js +52 -0
  88. package/api/nodes/hotThreads.js +6 -6
  89. package/api/nodes/info.js +3 -3
  90. package/api/nodes/reloadSecureSettings.js +1 -1
  91. package/api/nodes/stats.js +9 -9
  92. package/api/observability/createObject.js +1 -1
  93. package/api/observability/deleteObject.js +1 -1
  94. package/api/observability/deleteObjects.js +2 -2
  95. package/api/observability/getObject.js +1 -1
  96. package/api/observability/updateObject.js +2 -2
  97. package/api/ppl/explain.js +4 -4
  98. package/api/ppl/getStats.js +3 -3
  99. package/api/ppl/postStats.js +4 -4
  100. package/api/ppl/query.js +4 -4
  101. package/api/query/datasourceDelete.js +2 -2
  102. package/api/query/datasourceRetrieve.js +2 -2
  103. package/api/query/datasourcesCreate.js +2 -2
  104. package/api/query/datasourcesList.js +1 -1
  105. package/api/query/datasourcesUpdate.js +2 -2
  106. package/api/rollups/delete.js +2 -2
  107. package/api/rollups/explain.js +2 -2
  108. package/api/rollups/get.js +2 -2
  109. package/api/rollups/put.js +5 -5
  110. package/api/rollups/start.js +2 -2
  111. package/api/rollups/stop.js +2 -2
  112. package/api/sql/close.js +4 -4
  113. package/api/sql/explain.js +4 -4
  114. package/api/sql/getStats.js +3 -3
  115. package/api/sql/postStats.js +4 -4
  116. package/api/sql/query.js +4 -4
  117. package/api/sql/settings.js +3 -3
  118. package/lib/Connection.js +2 -0
  119. package/lib/aws/shared.js +3 -2
  120. package/package.json +2 -2
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Copyright OpenSearch Contributors
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ * The OpenSearch Contributors require contributions made to
6
+ * this file be licensed under the Apache-2.0 license or a
7
+ * compatible open source license.
8
+ *
9
+ */
10
+
11
+ /*
12
+ * This file was generated from the OpenSearch API Spec. Do NOT edit it
13
+ * manually. If you want to make changes, either update the spec or
14
+ * modify the API generator.
15
+ */
16
+
17
+ 'use strict';
18
+
19
+ const { normalizeArguments, parsePathParam } = require('../utils');
20
+
21
+ /**
22
+ * Provides information about the current status of the neural-search plugin.
23
+ * <br/> See Also: {@link undefined - neural.stats}
24
+ *
25
+ * @memberOf API-Neural
26
+ *
27
+ * @param {object} [params]
28
+ * @param {boolean} [params.flat_stat_paths=false] - Whether to return stats in the flat form, which can improve readability, especially for heavily nested stats. For example, the flat form of `"processors": { "ingest": { "text_embedding_executions": 20181212 } }` is `"processors.ingest.text_embedding_executions": "20181212"`.
29
+ * @param {boolean} [params.include_metadata=false] - Whether to return stat metadata instead of the raw stat value, includes additional information about the stat. These can include things like type hints, time since last stats being recorded, or recent rolling interval values
30
+ * @param {string} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; leave empty to get information from all nodes.
31
+ * @param {string} [params.stat] - Comma-separated list of stats to retrieve; use empty string to retrieve all stats.
32
+ *
33
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
+ * @param {function} [callback] - Callback that handles errors and response
35
+ *
36
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
37
+ */
38
+ function statsFunc(params, options, callback) {
39
+ [params, options, callback] = normalizeArguments(params, options, callback);
40
+
41
+ let { body, node_id, stat, ...querystring } = params;
42
+ node_id = parsePathParam(node_id);
43
+ stat = parsePathParam(stat);
44
+
45
+ const path = ['/_plugins/_neural', node_id, 'stats', stat].filter(c => c != null).join('/');
46
+ const method = 'GET';
47
+ body = body || '';
48
+
49
+ return this.transport.request({ method, path, querystring, body }, options, callback);
50
+ }
51
+
52
+ module.exports = statsFunc;
@@ -25,13 +25,13 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Nodes
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.ignore_idle_threads=true] - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue.
29
- * @param {string} [params.interval] - The interval for the second sampling of threads.
30
- * @param {number} [params.snapshots=10] - Number of samples of thread stack trace.
31
- * @param {number} [params.threads=3] - Specify the number of threads to provide information for.
32
- * @param {string} [params.timeout] - Operation timeout.
28
+ * @param {boolean} [params.ignore_idle_threads=true] - Whether to show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue.
29
+ * @param {string} [params.interval] - The time interval between thread stack trace samples.
30
+ * @param {number} [params.snapshots=10] - The number of thread stack trace samples to collect.
31
+ * @param {number} [params.threads=3] - The number of threads to provide information for.
32
+ * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
33
33
  * @param {string} [params.type] - The type to sample.
34
- * @param {array} [params.node_id] - 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.
34
+ * @param {array} [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.
35
35
  *
36
36
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
37
37
  * @param {function} [callback] - Callback that handles errors and response
package/api/nodes/info.js CHANGED
@@ -25,10 +25,10 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Nodes
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
29
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
28
+ * @param {boolean} [params.flat_settings=false] - When `true`, returns settings in flat format.
29
+ * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
30
30
  * @param {array} [params.metric] - Limits the information returned to the specific metrics. Supports a comma-separated list, such as `http,ingest`.
31
- * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information.
31
+ * @param {string} [params.node_id] - A comma-separated list of node IDs or names used to limit returned information.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Nodes
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
28
+ * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
29
29
  * @param {string} [params.node_id] - The names of particular nodes in the cluster to target.
30
30
  * @param {object} [params.body] - An object containing the password for the OpenSearch keystore.
31
31
  *
@@ -25,17 +25,17 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Nodes
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.completion_fields] - Comma-separated list or wildcard expressions of fields to include in field data and suggest statistics.
29
- * @param {string} [params.fielddata_fields] - Comma-separated list or wildcard expressions of fields to include in field data statistics.
30
- * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics.
31
- * @param {array} [params.groups] - Comma-separated list of search groups to include in the search statistics.
32
- * @param {boolean} [params.include_segment_file_sizes=false] - If `true`, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).
28
+ * @param {string} [params.completion_fields] - A comma-separated list or wildcard expressions of fields to include in field data and suggest statistics.
29
+ * @param {string} [params.fielddata_fields] - A comma-separated list or wildcard expressions of fields to include in field data statistics.
30
+ * @param {string} [params.fields] - A comma-separated list or wildcard expressions of fields to include in the statistics.
31
+ * @param {array} [params.groups] - A comma-separated list of search groups to include in the search statistics.
32
+ * @param {boolean} [params.include_segment_file_sizes=false] - When `true`, reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).
33
33
  * @param {string} [params.level] - Indicates whether statistics are aggregated at the cluster, index, or shard level.
34
- * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
34
+ * @param {string} [params.timeout] - The amount of time to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
35
35
  * @param {array} [params.types] - A comma-separated list of document types for the indexing index metric.
36
- * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information.
37
- * @param {array} [params.metric] - Limit the information returned to the specified metrics
38
- * @param {array} [params.index_metric] - Limit the information returned for indexes metric to the specific index metrics. It can be used only if indexes (or all) metric is specified.
36
+ * @param {string} [params.node_id] - A comma-separated list of node IDs or names used to limit returned information.
37
+ * @param {array} [params.metric] - Limit the information returned to the specified metrics.
38
+ * @param {array} [params.index_metric] - Limit the information returned for indexes metric to the specified index metrics. It can be used only if indexes (or all) metric is specified.
39
39
  *
40
40
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
41
41
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments } = require('../utils');
25
25
  * @memberOf API-Observability
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {object} [params.body]
28
+ * @param {object} [params.body] - The core observability object containing visualization and query data.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Observability
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.object_id - The ID of the Observability Object.
28
+ * @param {string} params.object_id - The ID of the observability object to delete.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,8 +25,8 @@ const { normalizeArguments } = require('../utils');
25
25
  * @memberOf API-Observability
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.objectId] - The ID of a single Observability Object to delete.
29
- * @param {string} [params.objectIdList] - A comma-separated list of Observability Object IDs to delete.
28
+ * @param {string} [params.objectId] - The ID of a single observability object to delete.
29
+ * @param {string} [params.objectIdList] - A comma-separated list of observability object IDs to delete.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Observability
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.object_id - The ID of the Observability Object.
28
+ * @param {string} params.object_id - The ID of the observability object to retrieve.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -25,8 +25,8 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Observability
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.object_id - The ID of the Observability Object.
29
- * @param {object} [params.body]
28
+ * @param {string} params.object_id - The ID of the observability object to update.
29
+ * @param {object} [params.body] - The core observability object containing visualization and query data.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Shows how a query is executed against OpenSearch.
22
+ * Returns the execution plan for a PPL query.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - ppl.explain}
24
24
  *
25
25
  * @memberOf API-Ppl
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results.
30
- * @param {object} params.body
28
+ * @param {string} [params.format] - Specifies the response format (JSON, YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} params.body - Contains the PPL query to explain.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Collect metrics for the plugin within the interval.
22
+ * Retrieves performance metrics for the PPL plugin.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - ppl.get_stats}
24
24
  *
25
25
  * @memberOf API-Ppl
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results.
28
+ * @param {string} [params.format] - Specifies the response format (JSON, YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * By a stats endpoint, you are able to collect metrics for the plugin within the interval.
22
+ * Retrieves filtered performance metrics for the PPL plugin.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - ppl.post_stats}
24
24
  *
25
25
  * @memberOf API-Ppl
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results.
30
- * @param {object} params.body
28
+ * @param {string} [params.format] - Specifies the response format (JSON, YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} params.body - Defines the statistics collection parameters.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
package/api/ppl/query.js CHANGED
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Send a PPL query to the PPL plugin.
22
+ * Executes a PPL query against OpenSearch indexes.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - ppl.query}
24
24
  *
25
25
  * @memberOf API-Ppl
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results.
30
- * @param {object} params.body
28
+ * @param {string} [params.format] - Specifies the response format (JSON OR YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to sanitize special characters in the results.
30
+ * @param {object} params.body - Contains the PPL query to execute.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Deletes specific datasource specified by name.
22
+ * Deletes a specific data source by name.
23
23
  * <br/> See Also: {@link undefined - query.datasource_delete}
24
24
  *
25
25
  * @memberOf API-Query
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.datasource_name - The Name of the DataSource to delete.
28
+ * @param {string} params.datasource_name - The name of the data source to delete.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Retrieves specific datasource specified by name.
22
+ * Retrieves a specific data source by name.
23
23
  * <br/> See Also: {@link undefined - query.datasource_retrieve}
24
24
  *
25
25
  * @memberOf API-Query
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.datasource_name - The Name of the DataSource to retrieve.
28
+ * @param {string} params.datasource_name - The name of the data source to retrieve.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Creates a new query datasource.
22
+ * Creates a new query data source.
23
23
  * <br/> See Also: {@link undefined - query.datasources_create}
24
24
  *
25
25
  * @memberOf API-Query
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {object} [params.body]
28
+ * @param {object} [params.body] - The data source configuration to create.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Retrieves list of all datasources.
22
+ * Retrieves a list of all available data sources.
23
23
  * <br/> See Also: {@link undefined - query.datasources_list}
24
24
  *
25
25
  * @memberOf API-Query
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Updates an existing query datasource.
22
+ * Updates an existing query data source.
23
23
  * <br/> See Also: {@link undefined - query.datasources_update}
24
24
  *
25
25
  * @memberOf API-Query
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {object} [params.body]
28
+ * @param {object} [params.body] - The updated data source configuration.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Delete index rollup.
22
+ * Deletes an index rollup job configuration.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job - rollups.delete}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.id - Rollup to access
28
+ * @param {string} params.id - The ID of the rollup job.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Get a rollup's current status.
22
+ * Retrieves the execution status information for an index rollup job.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job - rollups.explain}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.id - Rollup to access
28
+ * @param {string} params.id - The ID of the rollup job.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Get an index rollup.
22
+ * Retrieves an index rollup job configuration by ID.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job - rollups.get}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.id - Rollup to access
28
+ * @param {string} params.id - The ID of the rollup job.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,16 +19,16 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Create or update index rollup.
22
+ * Creates or updates an index rollup job configuration.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job - rollups.put}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term.
29
- * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number.
30
- * @param {string} params.id - Rollup to access
31
- * @param {object} [params.body]
28
+ * @param {number} [params.if_primary_term] - Only performs the operation if the document has the specified primary term.
29
+ * @param {number} [params.if_seq_no] - Only performs the operation if the document has the specified sequence number.
30
+ * @param {string} params.id - The ID of the rollup job.
31
+ * @param {object} [params.body] - Updates the rollup job configuration.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Start rollup.
22
+ * Starts the execution of an index rollup job.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.start}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.id - Rollup to access
28
+ * @param {string} params.id - The ID of the rollup job.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Stop rollup.
22
+ * Stops the execution of an index rollup job.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.stop}
24
24
  *
25
25
  * @memberOf API-Rollups
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.id - Rollup to access
28
+ * @param {string} params.id - The ID of the rollup job.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
package/api/sql/close.js CHANGED
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Clear the cursor context.
22
+ * Closes an open cursor to free server-side resources.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.close}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results
30
- * @param {object} [params.body]
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} [params.body] - Contains the cursor identifier to close.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Shows how a query is executed against OpenSearch.
22
+ * Returns the execution plan for a SQL or PPL query.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.explain}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results
30
- * @param {object} [params.body]
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} [params.body] - Contains the SQL or PPL query to explain.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Collect metrics for the plugin within the interval.
22
+ * Retrieves performance metrics for the SQL plugin.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - sql.get_stats}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * By a stats endpoint, you are able to collect metrics for the plugin within the interval.
22
+ * Retrieves filtered performance metrics for the SQL plugin.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - sql.post_stats}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results
30
- * @param {object} [params.body]
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} [params.body] - Defines the statistics collection parameters.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
package/api/sql/query.js CHANGED
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Send a SQL/PPL query to the SQL plugin.
22
+ * Executes SQL or PPL queries against OpenSearch indexes.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.query}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results
30
- * @param {object} [params.body]
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {boolean} [params.sanitize=true] - Whether to escape special characters in the results.
30
+ * @param {object} [params.body] - Contains the SQL or PPL query to execute.
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
33
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Adds SQL settings to the standard OpenSearch cluster settings.
22
+ * Updates SQL plugin settings in the OpenSearch cluster configuration.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/settings/ - sql.settings}
24
24
  *
25
25
  * @memberOf API-Sql
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.format] - A short version of the Accept header (for example, `json`, `yaml`).
29
- * @param {string} [params.body]
28
+ * @param {string} [params.format] - Specifies the response format (JSON or YAML).
29
+ * @param {string} [params.body] - Contains SQL plugin configuration settings.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
package/lib/Connection.js CHANGED
@@ -112,6 +112,8 @@ class Connection {
112
112
  const onResponse = (response) => {
113
113
  cleanListeners();
114
114
  this._openRequests--;
115
+ // re-add an error listener
116
+ request.addListener('error', (err) => {console.log('ignoring error after response', err)});
115
117
  callback(null, response);
116
118
  };
117
119
 
package/lib/aws/shared.js CHANGED
@@ -65,11 +65,12 @@ function giveAwsV4Signer(awsDefaultCredentialsProvider) {
65
65
  request.service = awssigv4Cred.service;
66
66
  delete request['auth'];
67
67
  }
68
- const signed = aws4.sign(request, credentialsState.credentials);
69
- signed.headers['x-amz-content-sha256'] = crypto
68
+
69
+ request.headers['x-amz-content-sha256'] = crypto
70
70
  .createHash('sha256')
71
71
  .update(request.body || '', 'utf8')
72
72
  .digest('hex');
73
+ const signed = aws4.sign(request, credentialsState.credentials);
73
74
  return signed;
74
75
  }
75
76
 
package/package.json CHANGED
@@ -36,7 +36,7 @@
36
36
  "LICENSE.txt"
37
37
  ],
38
38
  "homepage": "https://www.opensearch.org/",
39
- "version": "3.5.1",
39
+ "version": "3.6.0",
40
40
  "versionCanary": "7.10.0-canary.6",
41
41
  "keywords": [
42
42
  "opensearch",
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@aws-sdk/types": "^3.160.0",
73
73
  "@babel/eslint-parser": "^7.19.1",
74
- "@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
74
+ "@sinonjs/fake-timers": "^15.3.2",
75
75
  "@types/node": "^22.0.0",
76
76
  "convert-hrtime": "^5.0.0",
77
77
  "cross-zip": "^4.0.0",