@opensearch-project/opensearch 3.3.0 → 3.5.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 (151) hide show
  1. package/api/OpenSearchApi.d.ts +8 -0
  2. package/api/OpenSearchApi.js +2 -0
  3. package/api/_core/exists.d.ts +1 -3
  4. package/api/_core/existsSource.d.ts +1 -3
  5. package/api/_core/ping.d.ts +1 -3
  6. package/api/_types/_common.aggregations.d.ts +143 -71
  7. package/api/_types/_common.analysis.d.ts +11 -1
  8. package/api/_types/_common.d.ts +2 -1
  9. package/api/_types/_common.mapping.d.ts +1 -0
  10. package/api/_types/_common.query_dsl.d.ts +11 -2
  11. package/api/_types/_core.explain.d.ts +2 -2
  12. package/api/_types/_core.search.d.ts +134 -7
  13. package/api/_types/cluster.stats.d.ts +1 -0
  14. package/api/_types/flow_framework.common.d.ts +12 -16
  15. package/api/_types/index.d.ts +2 -0
  16. package/api/_types/indices._common.d.ts +1 -0
  17. package/api/_types/insights._common.d.ts +4 -0
  18. package/api/_types/knn._common.d.ts +8 -7
  19. package/api/_types/ltr._common.d.ts +55 -0
  20. package/api/_types/nodes.info.d.ts +2 -2
  21. package/api/_types/nodes.stats.d.ts +22 -13
  22. package/api/_types/search_pipeline._common.d.ts +2 -60
  23. package/api/_types/security._common.d.ts +5 -0
  24. package/api/_types/snapshot._common.d.ts +38 -38
  25. package/api/cluster/allocationExplain.js +1 -1
  26. package/api/cluster/deleteComponentTemplate.js +3 -3
  27. package/api/cluster/existsComponentTemplate.d.ts +1 -3
  28. package/api/cluster/existsComponentTemplate.js +2 -2
  29. package/api/cluster/getComponentTemplate.js +3 -3
  30. package/api/cluster/getSettings.js +4 -4
  31. package/api/cluster/health.js +5 -5
  32. package/api/cluster/pendingTasks.js +2 -2
  33. package/api/cluster/postVotingConfigExclusions.js +2 -2
  34. package/api/cluster/putComponentTemplate.js +4 -4
  35. package/api/cluster/putDecommissionAwareness.js +1 -1
  36. package/api/cluster/putSettings.js +4 -4
  37. package/api/cluster/putWeightedRouting.js +1 -1
  38. package/api/cluster/reroute.js +4 -4
  39. package/api/cluster/state.js +4 -4
  40. package/api/cluster/stats.js +2 -2
  41. package/api/flowFramework/delete.d.ts +2 -1
  42. package/api/index.d.ts +2 -0
  43. package/api/indices/exists.d.ts +1 -3
  44. package/api/indices/existsAlias.d.ts +1 -3
  45. package/api/indices/existsIndexTemplate.d.ts +1 -3
  46. package/api/indices/existsTemplate.d.ts +1 -3
  47. package/api/ingest/deletePipeline.js +4 -4
  48. package/api/ingest/getPipeline.js +3 -3
  49. package/api/ingest/processorGrok.js +2 -2
  50. package/api/ingest/putPipeline.js +5 -5
  51. package/api/ingest/simulate.js +3 -3
  52. package/api/ism/existsPolicy.d.ts +1 -3
  53. package/api/knn/searchModels.d.ts +4 -4
  54. package/api/ltr/_api.js +26 -0
  55. package/api/ltr/stats.d.ts +33 -0
  56. package/api/ltr/stats.js +51 -0
  57. package/api/replication/autofollowStats.js +1 -1
  58. package/api/replication/createReplicationRule.js +1 -1
  59. package/api/replication/followerStats.js +1 -1
  60. package/api/replication/leaderStats.js +1 -1
  61. package/api/replication/pause.js +2 -2
  62. package/api/replication/resume.js +1 -1
  63. package/api/replication/start.js +2 -2
  64. package/api/replication/status.js +2 -2
  65. package/api/replication/stop.js +2 -2
  66. package/api/replication/updateSettings.js +2 -2
  67. package/api/security/authinfo.js +3 -3
  68. package/api/security/authtoken.js +1 -1
  69. package/api/security/configUpgradeCheck.js +1 -1
  70. package/api/security/configUpgradePerform.js +1 -1
  71. package/api/security/createAllowlist.js +1 -1
  72. package/api/security/createRole.js +1 -1
  73. package/api/security/createRoleMapping.js +1 -1
  74. package/api/security/createTenant.js +1 -1
  75. package/api/security/createUpdateTenancyConfig.js +1 -1
  76. package/api/security/createUser.js +1 -1
  77. package/api/security/createUserLegacy.js +1 -1
  78. package/api/security/deleteActionGroup.js +1 -1
  79. package/api/security/deleteDistinguishedName.js +2 -2
  80. package/api/security/deleteRole.js +1 -1
  81. package/api/security/deleteRoleMapping.js +1 -1
  82. package/api/security/deleteTenant.js +1 -1
  83. package/api/security/deleteUser.js +1 -1
  84. package/api/security/flushCache.js +1 -1
  85. package/api/security/generateOboToken.js +1 -1
  86. package/api/security/generateUserToken.js +2 -2
  87. package/api/security/generateUserTokenLegacy.js +1 -1
  88. package/api/security/getAccountDetails.js +1 -1
  89. package/api/security/getAllCertificates.js +2 -2
  90. package/api/security/getAllowlist.js +1 -1
  91. package/api/security/getConfiguration.js +1 -1
  92. package/api/security/getDashboardsInfo.js +1 -1
  93. package/api/security/getDistinguishedName.js +3 -3
  94. package/api/security/getDistinguishedNames.js +2 -2
  95. package/api/security/getNodeCertificates.js +4 -4
  96. package/api/security/getPermissionsInfo.js +1 -1
  97. package/api/security/getRole.js +1 -1
  98. package/api/security/getRoleMapping.js +2 -2
  99. package/api/security/getSslinfo.js +2 -2
  100. package/api/security/getTenancyConfig.js +1 -1
  101. package/api/security/getTenant.js +1 -1
  102. package/api/security/getUser.js +1 -1
  103. package/api/security/health.js +2 -2
  104. package/api/security/migrate.js +1 -1
  105. package/api/security/patchActionGroup.js +1 -1
  106. package/api/security/patchActionGroups.js +1 -1
  107. package/api/security/patchAllowlist.js +1 -1
  108. package/api/security/patchAuditConfiguration.js +1 -1
  109. package/api/security/patchConfiguration.js +1 -1
  110. package/api/security/patchDistinguishedName.js +2 -2
  111. package/api/security/patchDistinguishedNames.js +1 -1
  112. package/api/security/patchRole.js +1 -1
  113. package/api/security/patchRoleMapping.js +2 -2
  114. package/api/security/patchRoleMappings.js +1 -1
  115. package/api/security/patchTenant.js +1 -1
  116. package/api/security/patchTenants.js +1 -1
  117. package/api/security/patchUser.js +1 -1
  118. package/api/security/patchUsers.js +1 -1
  119. package/api/security/postDashboardsInfo.js +1 -1
  120. package/api/security/reloadHttpCertificates.js +1 -1
  121. package/api/security/reloadTransportCertificates.js +1 -1
  122. package/api/security/tenantInfo.js +1 -1
  123. package/api/security/updateConfiguration.js +1 -1
  124. package/api/security/updateDistinguishedName.js +2 -2
  125. package/api/security/validate.js +1 -1
  126. package/api/security/whoAmI.js +1 -1
  127. package/api/security/whoAmIProtected.js +1 -1
  128. package/api/sm/createPolicy.js +1 -1
  129. package/api/sm/deletePolicy.js +1 -1
  130. package/api/sm/explainPolicy.js +1 -1
  131. package/api/sm/getPolicies.js +5 -5
  132. package/api/sm/getPolicy.js +1 -1
  133. package/api/sm/startPolicy.js +1 -1
  134. package/api/sm/stopPolicy.js +1 -1
  135. package/api/sm/updatePolicy.js +1 -1
  136. package/api/snapshot/cleanupRepository.js +3 -3
  137. package/api/snapshot/clone.js +6 -6
  138. package/api/snapshot/create.js +6 -6
  139. package/api/snapshot/createRepository.js +6 -6
  140. package/api/snapshot/delete.js +3 -3
  141. package/api/snapshot/deleteRepository.js +4 -4
  142. package/api/snapshot/get.js +5 -5
  143. package/api/snapshot/getRepository.js +4 -4
  144. package/api/snapshot/restore.js +5 -5
  145. package/api/snapshot/status.js +4 -4
  146. package/api/snapshot/verifyRepository.js +3 -3
  147. package/api/tasks/cancel.js +5 -5
  148. package/api/tasks/get.js +3 -3
  149. package/api/tasks/list.js +7 -7
  150. package/lib/pool/BaseConnectionPool.js +6 -0
  151. package/package.json +1 -1
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.attribute - The name of the awareness attribute.
28
+ * @param {string} params.attribute - The name of awareness attribute, usually `zone`.
29
29
  * @param {string} [params.body]
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -25,13 +25,13 @@ const { normalizeArguments } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @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.
28
+ * @param {string} [params.cluster_manager_timeout] - The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {boolean} [params.dry_run] - When `true`, the request simulates the operation and returns the resulting state.
30
- * @param {boolean} [params.explain] - When `true`, the response contains an explanation of why certain commands can or cannot be executed.
31
- * @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.
30
+ * @param {boolean} [params.explain] - When `true`, the response contains an explanation of why reroute certain commands can or cannot be executed.
31
+ * @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.
32
32
  * @param {string} [params.metric] - Limits the information returned to the specified metrics.
33
33
  * @param {boolean} [params.retry_failed] - When `true`, retries shard allocation if it was blocked because of too many subsequent failures.
34
- * @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.
34
+ * @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.
35
35
  * @param {object} [params.body] - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
36
36
  *
37
37
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -26,15 +26,15 @@ const { normalizeArguments, parsePathParam } = require('../utils');
26
26
  *
27
27
  * @param {object} [params]
28
28
  * @param {boolean} [params.allow_no_indices] - Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the `_all` string or when no indexes have been specified.
29
- * @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.
29
+ * @param {string} [params.cluster_manager_timeout] - The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
30
30
  * @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
31
- * @param {boolean} [params.flat_settings=false] - Returns settings in a flat format.
31
+ * @param {boolean} [params.flat_settings=false] - Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of `"cluster": { "max_shards_per_node": 500 }` is `"cluster.max_shards_per_node": "500"`.
32
32
  * @param {boolean} [params.ignore_unavailable] - Whether the specified concrete indexes should be ignored when unavailable (missing or closed).
33
33
  * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
34
- * @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.
34
+ * @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.
35
35
  * @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version.
36
36
  * @param {string} [params.wait_for_timeout] - The maximum time to wait for `wait_for_metadata_version` before timing out.
37
- * @param {array} [params.metric] - Limits the information returned to only the specified metrics.
37
+ * @param {array} [params.metric] - Limits the information returned to only the [specified metric groups](https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/#metric-groups).
38
38
  * @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`.
39
39
  *
40
40
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -25,9 +25,9 @@ const { normalizeArguments, parsePathParam } = require('../utils');
25
25
  * @memberOf API-Cluster
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.flat_settings=false] - When `true`, returns settings in a flat format.
28
+ * @param {boolean} [params.flat_settings=false] - Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of `"cluster": { "max_shards_per_node": 500 }` is `"cluster.max_shards_per_node": "500"`.
29
29
  * @param {string} [params.timeout] - The amount of time to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout.
30
- * @param {array} [params.index_metric] - A comma-separated list of index metric groups, for example, `docs,store`.
30
+ * @param {array} [params.index_metric] - A comma-separated list of [index metric groups](https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/#index-metric-groups), for example, `docs,store`.
31
31
  * @param {array} [params.metric] - Limit the information returned to the specified metrics.
32
32
  * @param {string} [params.node_id] - A comma-separated list of node IDs used to filter results. Supports [node filters](https://opensearch.org/docs/latest/api-reference/nodes-apis/index/#node-filters).
33
33
  *
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import { ApiResponse } from '../../lib/Transport'
18
+ import * as Common from '../_types/_common'
18
19
  import * as FlowFramework_Common from '../_types/flow_framework.common'
19
20
  import * as Global from '../_types/_global'
20
21
 
@@ -27,5 +28,5 @@ export interface FlowFramework_Delete_Response extends ApiResponse {
27
28
  body: FlowFramework_Delete_ResponseBody;
28
29
  }
29
30
 
30
- export type FlowFramework_Delete_ResponseBody = FlowFramework_Common.FlowFrameworkDeleteResponse
31
+ export type FlowFramework_Delete_ResponseBody = Common.WriteResponseBase
31
32
 
package/api/index.d.ts CHANGED
@@ -275,6 +275,7 @@ import { Knn_TrainModel_Request, Knn_TrainModel_Response, Knn_TrainModel_Respons
275
275
  import { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody } from './knn/deleteModel';
276
276
  import { Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody } from './knn/getModel';
277
277
  import { Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody } from './knn/warmup';
278
+ import { Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody } from './ltr/stats';
278
279
  import { Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody } from './ml/executeAlgorithm';
279
280
  import { Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody } from './ml/predict';
280
281
  import { Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody } from './ml/trainPredict';
@@ -683,6 +684,7 @@ export {
683
684
  Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody,
684
685
  Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody,
685
686
  Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody,
687
+ Ltr_Stats_Request, Ltr_Stats_Response, Ltr_Stats_ResponseBody,
686
688
  Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody,
687
689
  Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody,
688
690
  Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody,
@@ -29,9 +29,7 @@ export interface Indices_Exists_Request extends Global.Params {
29
29
  local?: boolean;
30
30
  }
31
31
 
32
- export interface Indices_Exists_Response extends ApiResponse {
33
- body: Indices_Exists_ResponseBody;
34
- }
32
+ export type Indices_Exists_Response = boolean
35
33
 
36
34
  export type Indices_Exists_ResponseBody = Record<string, any>
37
35
 
@@ -27,9 +27,7 @@ export interface Indices_ExistsAlias_Request extends Global.Params {
27
27
  name: Common.Names;
28
28
  }
29
29
 
30
- export interface Indices_ExistsAlias_Response extends ApiResponse {
31
- body: Indices_ExistsAlias_ResponseBody;
32
- }
30
+ export type Indices_ExistsAlias_Response = boolean
33
31
 
34
32
  export type Indices_ExistsAlias_ResponseBody = Record<string, any>
35
33
 
@@ -26,9 +26,7 @@ export interface Indices_ExistsIndexTemplate_Request extends Global.Params {
26
26
  name: Common.Name;
27
27
  }
28
28
 
29
- export interface Indices_ExistsIndexTemplate_Response extends ApiResponse {
30
- body: Indices_ExistsIndexTemplate_ResponseBody;
31
- }
29
+ export type Indices_ExistsIndexTemplate_Response = boolean
32
30
 
33
31
  export type Indices_ExistsIndexTemplate_ResponseBody = Record<string, any>
34
32
 
@@ -26,9 +26,7 @@ export interface Indices_ExistsTemplate_Request extends Global.Params {
26
26
  name: Common.Names;
27
27
  }
28
28
 
29
- export interface Indices_ExistsTemplate_Response extends ApiResponse {
30
- body: Indices_ExistsTemplate_ResponseBody;
31
- }
29
+ export type Indices_ExistsTemplate_Response = boolean
32
30
 
33
31
  export type Indices_ExistsTemplate_ResponseBody = Record<string, any>
34
32
 
@@ -19,16 +19,16 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Deletes a pipeline.
22
+ * Deletes an ingest pipeline.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ - ingest.delete_pipeline}
24
24
  *
25
25
  * @memberOf API-Ingest
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
28
+ * @param {string} [params.cluster_manager_timeout] - The amount of time allowed to establish a connection to the cluster manager node.
29
29
  * @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.
30
- * @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.
31
- * @param {string} params.id - Pipeline ID or wildcard expression of pipeline IDs used to limit the request. To delete all ingest pipelines in a cluster, use a value of `*`.
30
+ * @param {string} [params.timeout] - The amount of time to wait for a response.
31
+ * @param {string} params.id - The pipeline ID or wildcard expression of pipeline IDs used to limit the request. To delete all ingest pipelines in a cluster, use a value of `*`.
32
32
  *
33
33
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
34
34
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,15 +19,15 @@
19
19
  const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns a pipeline.
22
+ * Returns an ingest pipeline.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ - ingest.get_pipeline}
24
24
  *
25
25
  * @memberOf API-Ingest
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
28
+ * @param {string} [params.cluster_manager_timeout] - The amount of time allowed to establish a connection to the cluster manager node.
29
29
  * @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.
30
- * @param {string} [params.id] - Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions are supported. To get all ingest pipelines, omit this parameter or use `*`.
30
+ * @param {string} [params.id] - A comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions are supported. To get all ingest pipelines, omit this parameter or use `*`.
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 } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns a list of the built-in patterns.
22
+ * Returns a list of built-in grok patterns.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest - ingest.processor_grok}
24
24
  *
25
25
  * @memberOf API-Ingest
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {boolean} [params.s=false] - Sort returned patterns by key name.
28
+ * @param {boolean} [params.s=false] - Determines how to sort returned grok patterns by key name.
29
29
  *
30
30
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
31
31
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,17 +19,17 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Creates or updates a pipeline.
22
+ * Creates or updates an ingest pipeline.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ - ingest.put_pipeline}
24
24
  *
25
25
  * @memberOf API-Ingest
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
28
+ * @param {string} [params.cluster_manager_timeout] - The amount of time allowed to establish a connection to the cluster manager node.
29
29
  * @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.
30
- * @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.
31
- * @param {string} params.id - ID of the ingest pipeline to create or update.
32
- * @param {object} params.body - The ingest definition
30
+ * @param {string} [params.timeout] - The amount of time to wait for a response.
31
+ * @param {string} params.id - The ID of the ingest pipeline.
32
+ * @param {object} params.body - The ingest definition.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Allows to simulate a pipeline with example documents.
22
+ * Simulates an ingest pipeline with example documents.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ - ingest.simulate}
24
24
  *
25
25
  * @memberOf API-Ingest
26
26
  *
27
27
  * @param {object} params
28
- * @param {boolean} [params.verbose=false] - If `true`, the response includes output data for each processor in the executed pipeline.
29
- * @param {string} [params.id] - Pipeline to test. If you don't specify a `pipeline` in the request body, this parameter is required.
28
+ * @param {boolean} [params.verbose=false] - When `true`, the response includes output data for each processor in the pipeline
29
+ * @param {string} [params.id] - The pipeline to test. If you don't specify a `pipeline` in the request body, this parameter is required.
30
30
  * @param {object} params.body - The simulate definition
31
31
  *
32
32
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -21,9 +21,7 @@ export interface Ism_ExistsPolicy_Request extends Global.Params {
21
21
  policy_id: string;
22
22
  }
23
23
 
24
- export interface Ism_ExistsPolicy_Response extends ApiResponse {
25
- body: Ism_ExistsPolicy_ResponseBody;
26
- }
24
+ export type Ism_ExistsPolicy_Response = boolean
27
25
 
28
26
  export type Ism_ExistsPolicy_ResponseBody = any
29
27
 
@@ -16,9 +16,9 @@
16
16
 
17
17
  import { ApiResponse } from '../../lib/Transport'
18
18
  import * as Common from '../_types/_common'
19
+ import * as Common_QueryDsl from '../_types/_common.query_dsl'
19
20
  import * as Core_Search from '../_types/_core.search'
20
21
  import * as Global from '../_types/_global'
21
- import * as Knn_Common from '../_types/knn._common'
22
22
 
23
23
  export interface Knn_SearchModels_Request extends Global.Params {
24
24
  _source?: string[];
@@ -31,7 +31,7 @@ export interface Knn_SearchModels_Request extends Global.Params {
31
31
  batched_reduce_size?: number;
32
32
  body?: Knn_SearchModels_RequestBody;
33
33
  ccs_minimize_roundtrips?: boolean;
34
- default_operator?: Knn_Common.DefaultOperator;
34
+ default_operator?: Common_QueryDsl.Operator;
35
35
  df?: string;
36
36
  docvalue_fields?: string[];
37
37
  expand_wildcards?: Common.ExpandWildcards;
@@ -48,14 +48,14 @@ export interface Knn_SearchModels_Request extends Global.Params {
48
48
  rest_total_hits_as_int?: boolean;
49
49
  routing?: Common.RoutingInQueryString;
50
50
  scroll?: Common.Duration;
51
- search_type?: Knn_Common.SearchType;
51
+ search_type?: Common.SearchType;
52
52
  seq_no_primary_term?: boolean;
53
53
  size?: number;
54
54
  sort?: string[];
55
55
  stats?: string[];
56
56
  stored_fields?: string[];
57
57
  suggest_field?: string;
58
- suggest_mode?: Knn_Common.SuggestMode;
58
+ suggest_mode?: Common.SuggestMode;
59
59
  suggest_size?: number;
60
60
  suggest_text?: string;
61
61
  terminate_after?: number;
@@ -0,0 +1,26 @@
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
+ /** @namespace API-Ltr */
20
+
21
+ function LtrApi(bindObj) {
22
+ this.stats = require('./stats').bind(bindObj);
23
+
24
+ }
25
+
26
+ module.exports = LtrApi;
@@ -0,0 +1,33 @@
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
+ import { ApiResponse } from '../../lib/Transport'
18
+ import * as Common from '../_types/_common'
19
+ import * as Global from '../_types/_global'
20
+ import * as Ltr_Common from '../_types/ltr._common'
21
+
22
+ export interface Ltr_Stats_Request extends Global.Params {
23
+ node_id?: string[];
24
+ stat?: 'cache' | 'request_error_count' | 'request_total_count'[];
25
+ timeout?: Common.Duration;
26
+ }
27
+
28
+ export interface Ltr_Stats_Response extends ApiResponse {
29
+ body: Ltr_Stats_ResponseBody;
30
+ }
31
+
32
+ export type Ltr_Stats_ResponseBody = Ltr_Common.Stats
33
+
@@ -0,0 +1,51 @@
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 LTR plugin.
23
+ * <br/> See Also: {@link undefined - ltr.stats}
24
+ *
25
+ * @memberOf API-Ltr
26
+ *
27
+ * @param {object} [params]
28
+ * @param {string} [params.timeout] - The time in milliseconds to wait for a response.
29
+ * @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.
30
+ * @param {array} [params.stat] - Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats.
31
+ *
32
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
33
+ * @param {function} [callback] - Callback that handles errors and response
34
+ *
35
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
36
+ */
37
+ function statsFunc(params, options, callback) {
38
+ [params, options, callback] = normalizeArguments(params, options, callback);
39
+
40
+ let { body, node_id, stat, ...querystring } = params;
41
+ node_id = parsePathParam(node_id);
42
+ stat = parsePathParam(stat);
43
+
44
+ const path = ['/_plugins/_ltr', node_id, 'stats', stat].filter(c => c != null).join('/');
45
+ const method = 'GET';
46
+ body = body || '';
47
+
48
+ return this.transport.request({ method, path, querystring, body }, options, callback);
49
+ }
50
+
51
+ module.exports = statsFunc;
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Gets information about auto-follow activity and any replication rules configured on the specified cluster.
22
+ * Retrieves information about any auto-follow activity and any replication rules configured on the specified cluster.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-auto-follow-stats - replication.autofollow_stats}
24
24
  *
25
25
  * @memberOf API-Replication
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Automatically starts replication on indexes matching a specified pattern.
22
+ * Automatically starts the replication on indexes matching a specified pattern.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#create-replication-rule - replication.create_replication_rule}
24
24
  *
25
25
  * @memberOf API-Replication
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Gets information about follower (syncing) indexes on a specified cluster.
22
+ * Retrieves information about any follower (syncing) indexes on a specified cluster.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-follower-cluster-stats - replication.follower_stats}
24
24
  *
25
25
  * @memberOf API-Replication
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Gets information about replicated leader indexes on a specified cluster.
22
+ * Retrieves information about any replicated leader indexes on a specified cluster.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-leader-cluster-stats - replication.leader_stats}
24
24
  *
25
25
  * @memberOf API-Replication
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Pauses replication of the leader index.
22
+ * Pauses the replication of the leader index.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#pause-replication - replication.pause}
24
24
  *
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Initiate replication of an index from the leader cluster to the follower cluster.
22
+ * Initiates the replication of an index from the leader cluster to the follower cluster.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#start-replication - replication.start}
24
24
  *
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Gets the status of index replication.
22
+ * Retrieves the the status of an index replication.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-replication-status - replication.status}
24
24
  *
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
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
- * Terminates replication and converts the follower index to a standard index.
22
+ * Terminates the replication and converts the follower index to a standard index.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#stop-replication - replication.stop}
24
24
  *
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,13 +19,13 @@
19
19
  const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Updates settings on the follower index.
22
+ * Updates any settings on the follower index.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#update-settings - replication.update_settings}
24
24
  *
25
25
  * @memberOf API-Replication
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.index - Name of the data stream, index, or index alias to perform bulk actions on.
28
+ * @param {string} params.index - The name of the data stream, index, or index alias to perform bulk actions on.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
@@ -19,14 +19,14 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns the authentication information.
22
+ * Returns or updates authentication information for the currently authenticated user.
23
23
  * <br/> See Also: {@link undefined - security.authinfo}
24
24
  *
25
25
  * @memberOf API-Security
26
26
  *
27
27
  * @param {object} [params]
28
- * @param {string} [params.auth_type] - The type of current authentication request.
29
- * @param {boolean} [params.verbose] - Indicates whether a verbose response should be returned.
28
+ * @param {string} [params.auth_type] - The type of the current authentication request.
29
+ * @param {boolean} [params.verbose] - Whether to return a verbose response.
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
32
32
  * @param {function} [callback] - Callback that handles errors and response
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Returns the authorization token.
22
+ * Returns the authorization token for the current user.
23
23
  * <br/> See Also: {@link undefined - security.authtoken}
24
24
  *
25
25
  * @memberOf API-Security
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Check whether or not an upgrade can be performed and what resources can be updated.
22
+ * Checks whether or not an upgrade can be performed and which security resources can be updated.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check - security.config_upgrade_check}
24
24
  *
25
25
  * @memberOf API-Security
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments } = require('../utils');
20
20
 
21
21
  /**
22
- * Helps cluster operator upgrade missing defaults and stale default definitions.
22
+ * Assists the cluster operator with upgrading missing default values and stale default definitions.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade - security.config_upgrade_perform}
24
24
  *
25
25
  * @memberOf API-Security
@@ -19,7 +19,7 @@
19
19
  const { normalizeArguments, handleMissingParam } = require('../utils');
20
20
 
21
21
  /**
22
- * Creates or replaces the permitted APIs. Accessible using Super Admin certificate or REST API permission.
22
+ * Creates or replaces APIs permitted for users on the allow list. Requires a super admin certificate or REST API permissions.
23
23
  * <br/> See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api - security.create_allowlist}
24
24
  *
25
25
  * @memberOf API-Security
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
25
25
  * @memberOf API-Security
26
26
  *
27
27
  * @param {object} params
28
- * @param {string} params.role - The name of the role to be created.
28
+ * @param {string} params.role - The name of the role to create.
29
29
  * @param {object} params.body
30
30
  *
31
31
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}