Skip to content

Commit

Permalink
Updated opensearch-js to reflect the latest OpenSearch API spec (2025…
Browse files Browse the repository at this point in the history
…-01-26)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
nhtruong authored and github-actions[bot] committed Jan 26, 2025
1 parent a6b4593 commit 242b9e0
Show file tree
Hide file tree
Showing 22 changed files with 90 additions and 89 deletions.
1 change: 1 addition & 0 deletions api/_types/_common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ export type GetStats = {
missing_time?: Duration;
missing_time_in_millis: DurationValueUnitMillis;
missing_total: number;
time?: Duration;
time_in_millis: DurationValueUnitMillis;
total: number;
}
Expand Down
6 changes: 3 additions & 3 deletions api/asynchronousSearch/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const { normalizeArguments } = require('../utils');
*
* @param {object} [params]
* @param {string} [params.index] - The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names.
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query overruns this time, the process cancels this query automatically.
* @param {boolean} [params.keep_on_completion] - Whether you want to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
* @param {string} [params.wait_for_completion_timeout] - The amount of time that you plan to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query exceeds this amount of time, the process cancels this query automatically.
* @param {boolean} [params.keep_on_completion] - Whether to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
* @param {string} [params.wait_for_completion_timeout] - The amount of time to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
* @param {object} [params.body] - The search definition using the Query DSL.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
Expand Down
2 changes: 1 addition & 1 deletion api/asynchronousSearch/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const { normalizeArguments } = require('../utils');

/**
* Monitors any asynchronous searches that are `running`, `completed`, `persisted`.
* Monitors any asynchronous searches that are `running`, `completed`, or `persisted`.
* <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats - asynchronous_search.stats}
*
* @memberOf API-Asynchronous-Search
Expand Down
8 changes: 4 additions & 4 deletions api/cluster/allocationExplain.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
const { normalizeArguments } = require('../utils');

/**
* Provides explanations for shard allocations in the cluster.
* Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ - cluster.allocation_explain}
*
* @memberOf API-Cluster
*
* @param {object} [params]
* @param {boolean} [params.include_disk_info=false] - If `true`, returns information about disk usage and shard sizes.
* @param {boolean} [params.include_yes_decisions=false] - If `true`, returns YES decisions in explanation.
* @param {object} [params.body] - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
* @param {boolean} [params.include_disk_info=false] - When `true`, returns information about disk usage and shard sizes.
* @param {boolean} [params.include_yes_decisions=false] - When `true`, returns any `YES` decisions in the allocation explanation.
* @param {object} [params.body] - The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
6 changes: 3 additions & 3 deletions api/cluster/deleteComponentTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
*
* @param {object} params
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
* @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
* @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.
* @param {string} params.name - Name of the component template to delete. Wildcard (*) expressions are supported.
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} params.name - The name of the component template to delete. Supports wildcard (*) expressions.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
2 changes: 1 addition & 1 deletion api/cluster/deleteDecommissionAwareness.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const { normalizeArguments } = require('../utils');

/**
* Delete any existing decommission.
* Recommissions a decommissioned zone.
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.delete_decommission_awareness}
*
* @memberOf API-Cluster
Expand Down
4 changes: 2 additions & 2 deletions api/cluster/deleteVotingConfigExclusions.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
const { normalizeArguments } = require('../utils');

/**
* Clears cluster voting config exclusions.
* Clears any cluster voting configuration exclusions.
* <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.delete_voting_config_exclusions}
*
* @memberOf API-Cluster
*
* @param {object} [params]
* @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. Defaults to true, meaning that all excluded nodes must be removed from the cluster before this API takes any action. If set to `false` then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
* @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. When `true`, all excluded nodes are removed from the cluster before this API takes any action. When `false`, the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
8 changes: 4 additions & 4 deletions api/cluster/existsComponentTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @memberOf API-Cluster
*
* @param {object} params
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
* @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.
* @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
* @param {string} params.name - Name of the component template to check existence of. Wildcard (*) expressions are supported.
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false, information is retrieved from the cluster manager node.
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} params.name - The name of the component template. Wildcard (*) expressions are supported.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
8 changes: 4 additions & 4 deletions api/cluster/getComponentTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @memberOf API-Cluster
*
* @param {object} [params]
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
* @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the cluster-manager node.
* @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
* @param {string} [params.name] - Name of the component template to retrieve. Wildcard (`*`) expressions are supported.
* @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.name] - The name of the component template to retrieve. Wildcard (`*`) expressions are supported.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
4 changes: 2 additions & 2 deletions api/cluster/getDecommissionAwareness.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');

/**
* Get details and status of decommissioned attribute.
* Retrieves the decommission status for all zones.
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-getting-zone-decommission-status - cluster.get_decommission_awareness}
*
* @memberOf API-Cluster
*
* @param {object} params
* @param {string} params.awareness_attribute_name - Awareness attribute name.
* @param {string} params.awareness_attribute_name - The name of the awareness attribute.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
10 changes: 5 additions & 5 deletions api/cluster/getSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const { normalizeArguments } = require('../utils');
* @memberOf API-Cluster
*
* @param {object} [params]
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
* @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
* @param {boolean} [params.include_defaults=false] - If `true`, returns default cluster settings from the local node.
* @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
* @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.
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {boolean} [params.flat_settings=false] - When `true`, returns cluster settings in a flat format.
* @param {boolean} [params.include_defaults=false] - When `true`, returns default cluster settings from the local node.
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
2 changes: 1 addition & 1 deletion api/cluster/getWeightedRouting.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
* @memberOf API-Cluster
*
* @param {object} params
* @param {string} params.attribute - Awareness attribute name.
* @param {string} params.attribute - The name of the awareness attribute.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
28 changes: 14 additions & 14 deletions api/cluster/health.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ const { normalizeArguments, parsePathParam } = require('../utils');
* @memberOf API-Cluster
*
* @param {object} [params]
* @param {string} [params.awareness_attribute] - The awareness attribute for which the health is required.
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
* @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indexes that are open, closed or both.
* @param {string} [params.level] - Can be one of cluster, indexes or shards. Controls the details level of the health information returned.
* @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the cluster-manager node.
* @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.
* @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.
* @param {string} [params.wait_for_active_shards] - A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.
* @param {string} [params.wait_for_events] - Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.
* @param {boolean} [params.wait_for_no_initializing_shards] - A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards.
* @param {boolean} [params.wait_for_no_relocating_shards] - A Boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards.
* @param {string} [params.wait_for_nodes] - The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation.
* @param {string} [params.wait_for_status] - One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status.
* @param {string} [params.index] - Comma-separated list of data streams, indexes, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indexes in a cluster, omit this parameter or use `_all` or `*`.
* @param {string} [params.awareness_attribute] - The name of the awareness attribute for which to return the cluster health status (for example, `zone`). Applicable only if `level` is set to `awareness_attributes`.
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
* @param {string} [params.level]
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* @param {string} [params.wait_for_active_shards] - Waits until the specified number of shards is active before returning a response. Use `all` for all shards.
* @param {string} [params.wait_for_events] - Waits until all currently queued events with the given priority are processed.
* @param {boolean} [params.wait_for_no_initializing_shards=false] - Whether to wait until there are no initializing shards in the cluster.
* @param {boolean} [params.wait_for_no_relocating_shards] - Whether to wait until there are no relocating shards in the cluster.
* @param {string} [params.wait_for_nodes] - Waits until the specified number of nodes (`N`) is available. Accepts `>=N`, `<=N`, `>N`, and `<N`. You can also use `ge(N)`, `le(N)`, `gt(N)`, and `lt(N)` notation.
* @param {string} [params.wait_for_status] - Waits until the cluster health reaches the specified status or better.
* @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
*
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
* @param {function} [callback] - Callback that handles errors and response
Expand Down
Loading

0 comments on commit 242b9e0

Please sign in to comment.