@opensearch-project/opensearch 3.5.1 → 3.9.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 (658) hide show
  1. package/api/OpenSearchApi.d.ts +366 -0
  2. package/api/OpenSearchApi.js +202 -135
  3. package/api/_core/bulk.d.ts +3 -8
  4. package/api/_core/bulk.js +3 -3
  5. package/api/_core/bulkStream.d.ts +2 -7
  6. package/api/_core/bulkStream.js +2 -2
  7. package/api/_core/clearScroll.js +3 -3
  8. package/api/_core/count.js +3 -3
  9. package/api/_core/create.js +4 -4
  10. package/api/_core/createPit.d.ts +7 -4
  11. package/api/_core/createPit.js +8 -4
  12. package/api/_core/delete.js +4 -4
  13. package/api/_core/deleteAllPits.js +1 -1
  14. package/api/_core/deleteByQuery.js +3 -3
  15. package/api/_core/deleteByQueryRethrottle.js +1 -1
  16. package/api/_core/deletePit.js +1 -1
  17. package/api/_core/deleteScript.js +1 -1
  18. package/api/_core/exists.js +4 -4
  19. package/api/_core/existsSource.js +4 -4
  20. package/api/_core/explain.d.ts +4 -2
  21. package/api/_core/explain.js +3 -3
  22. package/api/_core/fieldCaps.js +4 -4
  23. package/api/_core/get.d.ts +3 -1
  24. package/api/_core/get.js +5 -5
  25. package/api/_core/getAllPits.js +1 -1
  26. package/api/_core/getScript.js +1 -1
  27. package/api/_core/getScriptContext.js +1 -1
  28. package/api/_core/getScriptLanguages.js +1 -1
  29. package/api/_core/getSource.d.ts +1 -1
  30. package/api/_core/getSource.js +5 -5
  31. package/api/_core/index.js +4 -4
  32. package/api/_core/info.js +1 -1
  33. package/api/_core/mget.js +4 -4
  34. package/api/_core/msearch.d.ts +1 -0
  35. package/api/_core/msearch.js +3 -2
  36. package/api/_core/msearchTemplate.js +2 -2
  37. package/api/_core/mtermvectors.js +9 -9
  38. package/api/_core/ping.js +1 -1
  39. package/api/_core/putScript.js +1 -1
  40. package/api/_core/rankEval.js +2 -2
  41. package/api/_core/reindex.js +1 -1
  42. package/api/_core/reindexRethrottle.js +1 -1
  43. package/api/_core/renderSearchTemplate.js +1 -1
  44. package/api/_core/scriptsPainlessExecute.d.ts +1 -1
  45. package/api/_core/scriptsPainlessExecute.js +1 -1
  46. package/api/_core/scroll.d.ts +1 -1
  47. package/api/_core/scroll.js +1 -1
  48. package/api/_core/search.d.ts +7 -3
  49. package/api/_core/search.js +4 -3
  50. package/api/_core/searchShards.d.ts +5 -0
  51. package/api/_core/searchShards.js +3 -2
  52. package/api/_core/searchTemplate.d.ts +4 -17
  53. package/api/_core/searchTemplate.js +5 -3
  54. package/api/_core/termvectors.js +9 -9
  55. package/api/_core/update.js +2 -2
  56. package/api/_core/updateByQuery.js +3 -3
  57. package/api/_core/updateByQueryRethrottle.js +1 -1
  58. package/api/_types/_common.aggregations.d.ts +288 -386
  59. package/api/_types/_common.analysis.d.ts +12 -5
  60. package/api/_types/_common.d.ts +80 -54
  61. package/api/_types/_common.mapping.d.ts +35 -3
  62. package/api/_types/_common.query_dsl.d.ts +54 -26
  63. package/api/_types/_core.bulk.d.ts +33 -9
  64. package/api/_types/_core.explain.d.ts +1 -7
  65. package/api/_types/_core.get.d.ts +7 -3
  66. package/api/_types/_core.msearch.d.ts +1 -1
  67. package/api/_types/_core.pit.d.ts +2 -2
  68. package/api/_types/_core.search.d.ts +82 -33
  69. package/api/_types/asynchronous_search._common.d.ts +3 -4
  70. package/api/_types/cat._common.d.ts +19 -0
  71. package/api/_types/cat.indices.d.ts +28 -0
  72. package/api/_types/cat.nodes.d.ts +13 -0
  73. package/api/_types/cat.shards.d.ts +13 -0
  74. package/api/_types/cat.thread_pool.d.ts +1 -0
  75. package/api/_types/cluster._common.d.ts +2 -0
  76. package/api/_types/cluster.allocation_explain.d.ts +3 -0
  77. package/api/_types/cluster.decommission_awareness.d.ts +1 -3
  78. package/api/_types/cluster.pending_tasks.d.ts +2 -0
  79. package/api/_types/cluster.stats.d.ts +3 -3
  80. package/api/_types/cluster.weighted_routing.d.ts +1 -8
  81. package/api/_types/flow_framework.common.d.ts +5 -2
  82. package/api/_types/geospatial._common.d.ts +153 -0
  83. package/api/_types/index.d.ts +22 -0
  84. package/api/_types/indices._common.d.ts +75 -19
  85. package/api/_types/indices.modify_data_stream.d.ts +33 -0
  86. package/api/_types/ingest._common.d.ts +37 -0
  87. package/api/_types/ingestion._common.d.ts +70 -0
  88. package/api/_types/insights._common.d.ts +8 -35
  89. package/api/_types/ism._common.d.ts +3 -3
  90. package/api/_types/knn._common.d.ts +45 -6
  91. package/api/_types/list._common.d.ts +19 -0
  92. package/api/_types/ltr._common.d.ts +63 -2
  93. package/api/_types/ml._common.d.ts +218 -168
  94. package/api/_types/neural._common.d.ts +229 -0
  95. package/api/_types/nodes._common.d.ts +1 -1
  96. package/api/_types/nodes.info.d.ts +8 -2
  97. package/api/_types/nodes.stats.d.ts +51 -2
  98. package/api/_types/observability._common.d.ts +0 -16
  99. package/api/_types/ppl._common.d.ts +19 -0
  100. package/api/_types/query._common.d.ts +0 -20
  101. package/api/_types/replication._common.d.ts +4 -1
  102. package/api/_types/rollups._common.d.ts +2 -0
  103. package/api/_types/search_pipeline._common.d.ts +52 -1
  104. package/api/_types/search_relevance._common.d.ts +132 -0
  105. package/api/_types/security._common.d.ts +31 -22
  106. package/api/_types/security_analytics.alerts.d.ts +59 -0
  107. package/api/_types/security_analytics.findings.d.ts +65 -0
  108. package/api/_types/sm._common.d.ts +3 -39
  109. package/api/_types/sql._common.d.ts +8 -0
  110. package/api/_types/transforms._common.d.ts +0 -23
  111. package/api/_types/ubi._common.d.ts +19 -0
  112. package/api/_types/wlm._common.d.ts +5 -3
  113. package/api/asynchronousSearch/_api.js +12 -4
  114. package/api/asynchronousSearch/delete.js +1 -1
  115. package/api/asynchronousSearch/get.js +1 -1
  116. package/api/asynchronousSearch/search.js +1 -1
  117. package/api/asynchronousSearch/stats.js +1 -1
  118. package/api/cat/_api.js +58 -30
  119. package/api/cat/aliases.d.ts +2 -1
  120. package/api/cat/aliases.js +2 -2
  121. package/api/cat/allPitSegments.d.ts +2 -1
  122. package/api/cat/allPitSegments.js +2 -2
  123. package/api/cat/allocation.d.ts +2 -1
  124. package/api/cat/allocation.js +2 -2
  125. package/api/cat/clusterManager.d.ts +2 -1
  126. package/api/cat/clusterManager.js +2 -2
  127. package/api/cat/count.d.ts +2 -1
  128. package/api/cat/count.js +3 -3
  129. package/api/cat/fielddata.d.ts +2 -1
  130. package/api/cat/fielddata.js +2 -2
  131. package/api/cat/health.d.ts +2 -1
  132. package/api/cat/health.js +2 -2
  133. package/api/cat/help.js +1 -1
  134. package/api/cat/indices.d.ts +2 -1
  135. package/api/cat/indices.js +2 -2
  136. package/api/cat/master.d.ts +2 -1
  137. package/api/cat/master.js +2 -2
  138. package/api/cat/nodeattrs.d.ts +2 -1
  139. package/api/cat/nodeattrs.js +2 -2
  140. package/api/cat/nodes.d.ts +2 -1
  141. package/api/cat/nodes.js +3 -3
  142. package/api/cat/pendingTasks.d.ts +2 -1
  143. package/api/cat/pendingTasks.js +3 -3
  144. package/api/cat/pitSegments.d.ts +2 -1
  145. package/api/cat/pitSegments.js +2 -2
  146. package/api/cat/plugins.d.ts +2 -1
  147. package/api/cat/plugins.js +2 -2
  148. package/api/cat/recovery.d.ts +2 -1
  149. package/api/cat/recovery.js +3 -3
  150. package/api/cat/repositories.d.ts +2 -1
  151. package/api/cat/repositories.js +2 -2
  152. package/api/cat/segmentReplication.d.ts +2 -1
  153. package/api/cat/segmentReplication.js +3 -3
  154. package/api/cat/segments.d.ts +2 -1
  155. package/api/cat/segments.js +2 -2
  156. package/api/cat/shards.d.ts +2 -1
  157. package/api/cat/shards.js +3 -3
  158. package/api/cat/snapshots.d.ts +2 -1
  159. package/api/cat/snapshots.js +3 -3
  160. package/api/cat/tasks.d.ts +2 -1
  161. package/api/cat/tasks.js +3 -3
  162. package/api/cat/templates.d.ts +2 -1
  163. package/api/cat/templates.js +2 -2
  164. package/api/cat/threadPool.d.ts +2 -1
  165. package/api/cat/threadPool.js +2 -2
  166. package/api/cluster/_api.js +63 -38
  167. package/api/cluster/allocationExplain.js +1 -1
  168. package/api/cluster/deleteComponentTemplate.js +2 -2
  169. package/api/cluster/deleteDecommissionAwareness.js +1 -1
  170. package/api/cluster/deleteVotingConfigExclusions.js +1 -1
  171. package/api/cluster/deleteWeightedRouting.d.ts +5 -2
  172. package/api/cluster/deleteWeightedRouting.js +1 -1
  173. package/api/cluster/existsComponentTemplate.js +3 -3
  174. package/api/cluster/getComponentTemplate.js +2 -2
  175. package/api/cluster/getDecommissionAwareness.d.ts +1 -1
  176. package/api/cluster/getDecommissionAwareness.js +1 -1
  177. package/api/cluster/getSettings.js +2 -2
  178. package/api/cluster/getWeightedRouting.d.ts +3 -1
  179. package/api/cluster/getWeightedRouting.js +1 -1
  180. package/api/cluster/health.d.ts +2 -1
  181. package/api/cluster/health.js +3 -3
  182. package/api/cluster/pendingTasks.js +2 -2
  183. package/api/cluster/postVotingConfigExclusions.js +1 -1
  184. package/api/cluster/putComponentTemplate.js +3 -3
  185. package/api/cluster/putDecommissionAwareness.js +1 -1
  186. package/api/cluster/putSettings.js +2 -2
  187. package/api/cluster/putWeightedRouting.d.ts +5 -2
  188. package/api/cluster/putWeightedRouting.js +1 -1
  189. package/api/cluster/remoteInfo.js +1 -1
  190. package/api/cluster/reroute.js +2 -2
  191. package/api/cluster/state.js +3 -3
  192. package/api/cluster/stats.js +3 -3
  193. package/api/danglingIndices/_api.js +13 -6
  194. package/api/danglingIndices/deleteDanglingIndex.js +1 -1
  195. package/api/danglingIndices/importDanglingIndex.js +1 -1
  196. package/api/danglingIndices/listDanglingIndices.d.ts +2 -2
  197. package/api/danglingIndices/listDanglingIndices.js +1 -1
  198. package/api/flowFramework/_api.js +27 -13
  199. package/api/flowFramework/create.js +7 -7
  200. package/api/flowFramework/delete.js +4 -4
  201. package/api/flowFramework/deprovision.js +4 -4
  202. package/api/flowFramework/get.js +3 -3
  203. package/api/flowFramework/getStatus.js +4 -4
  204. package/api/flowFramework/getSteps.js +3 -3
  205. package/api/flowFramework/provision.js +3 -3
  206. package/api/flowFramework/search.js +1 -1
  207. package/api/flowFramework/searchState.js +1 -1
  208. package/api/flowFramework/update.js +8 -8
  209. package/api/geospatial/_api.js +57 -0
  210. package/api/geospatial/deleteIp2GeoDatasource.d.ts +30 -0
  211. package/api/geospatial/deleteIp2GeoDatasource.js +49 -0
  212. package/api/geospatial/geojsonUploadPost.d.ts +30 -0
  213. package/api/geospatial/geojsonUploadPost.js +49 -0
  214. package/api/geospatial/geojsonUploadPut.d.ts +30 -0
  215. package/api/geospatial/geojsonUploadPut.js +49 -0
  216. package/api/geospatial/getIp2GeoDatasource.d.ts +31 -0
  217. package/api/geospatial/getIp2GeoDatasource.js +48 -0
  218. package/api/geospatial/getUploadStats.d.ts +28 -0
  219. package/api/geospatial/getUploadStats.js +45 -0
  220. package/api/geospatial/putIp2GeoDatasource.d.ts +32 -0
  221. package/api/geospatial/putIp2GeoDatasource.js +53 -0
  222. package/api/geospatial/putIp2GeoDatasourceSettings.d.ts +32 -0
  223. package/api/geospatial/putIp2GeoDatasourceSettings.js +50 -0
  224. package/api/http/_api.js +22 -9
  225. package/api/index.d.ts +168 -10
  226. package/api/indices/_api.js +134 -78
  227. package/api/indices/addBlock.js +1 -1
  228. package/api/indices/analyze.js +1 -1
  229. package/api/indices/clearCache.js +3 -3
  230. package/api/indices/clone.js +1 -1
  231. package/api/indices/close.js +2 -2
  232. package/api/indices/create.js +2 -2
  233. package/api/indices/createDataStream.js +1 -1
  234. package/api/indices/dataStreamsStats.js +2 -2
  235. package/api/indices/delete.js +2 -2
  236. package/api/indices/deleteAlias.js +3 -3
  237. package/api/indices/deleteDataStream.js +2 -2
  238. package/api/indices/deleteIndexTemplate.js +2 -2
  239. package/api/indices/deleteTemplate.js +1 -1
  240. package/api/indices/exists.js +2 -2
  241. package/api/indices/existsAlias.js +3 -3
  242. package/api/indices/existsIndexTemplate.js +2 -2
  243. package/api/indices/existsTemplate.js +1 -1
  244. package/api/indices/flush.js +2 -2
  245. package/api/indices/forcemerge.js +1 -1
  246. package/api/indices/get.js +2 -2
  247. package/api/indices/getAlias.js +3 -3
  248. package/api/indices/getDataStream.js +2 -2
  249. package/api/indices/getFieldMapping.js +3 -3
  250. package/api/indices/getIndexTemplate.js +2 -2
  251. package/api/indices/getMapping.js +2 -2
  252. package/api/indices/getSettings.js +3 -3
  253. package/api/indices/getTemplate.js +2 -2
  254. package/api/indices/getUpgrade.js +2 -2
  255. package/api/indices/modifyDataStream.d.ts +37 -0
  256. package/api/indices/modifyDataStream.js +50 -0
  257. package/api/indices/open.js +2 -2
  258. package/api/indices/putAlias.js +2 -2
  259. package/api/indices/putIndexTemplate.js +1 -1
  260. package/api/indices/putMapping.js +1 -1
  261. package/api/indices/putSettings.js +3 -3
  262. package/api/indices/putTemplate.js +1 -1
  263. package/api/indices/recovery.js +2 -2
  264. package/api/indices/refresh.js +2 -2
  265. package/api/indices/resolveIndex.js +1 -1
  266. package/api/indices/rollover.js +2 -2
  267. package/api/indices/segments.js +2 -2
  268. package/api/indices/shardStores.js +5 -5
  269. package/api/indices/shrink.js +1 -1
  270. package/api/indices/simulateIndexTemplate.js +1 -1
  271. package/api/indices/simulateTemplate.js +3 -3
  272. package/api/indices/split.js +1 -1
  273. package/api/indices/stats.js +5 -5
  274. package/api/indices/updateAliases.js +1 -1
  275. package/api/indices/upgrade.js +2 -2
  276. package/api/indices/validateQuery.js +2 -2
  277. package/api/ingest/_api.js +18 -9
  278. package/api/ingest/deletePipeline.js +1 -1
  279. package/api/ingest/getPipeline.js +1 -1
  280. package/api/ingest/processorGrok.js +1 -1
  281. package/api/ingest/putPipeline.js +1 -1
  282. package/api/ingest/simulate.js +1 -1
  283. package/api/ingestion/_api.js +37 -0
  284. package/api/ingestion/getState.d.ts +34 -0
  285. package/api/ingestion/getState.js +52 -0
  286. package/api/ingestion/pause.d.ts +33 -0
  287. package/api/ingestion/pause.js +51 -0
  288. package/api/ingestion/resume.d.ts +34 -0
  289. package/api/ingestion/resume.js +52 -0
  290. package/api/insights/_api.js +7 -2
  291. package/api/insights/topQueries.d.ts +1 -1
  292. package/api/ism/_api.js +40 -24
  293. package/api/ism/addPolicy.d.ts +1 -1
  294. package/api/ism/addPolicy.js +2 -2
  295. package/api/ism/changePolicy.d.ts +1 -1
  296. package/api/ism/changePolicy.js +2 -2
  297. package/api/ism/deletePolicy.js +1 -1
  298. package/api/ism/existsPolicy.js +2 -2
  299. package/api/ism/explainPolicy.d.ts +1 -1
  300. package/api/ism/explainPolicy.js +3 -3
  301. package/api/ism/getPolicies.js +2 -2
  302. package/api/ism/getPolicy.js +2 -2
  303. package/api/ism/putPolicies.js +2 -2
  304. package/api/ism/putPolicy.js +1 -1
  305. package/api/ism/refreshSearchAnalyzers.d.ts +1 -1
  306. package/api/ism/refreshSearchAnalyzers.js +3 -3
  307. package/api/ism/removePolicy.d.ts +1 -1
  308. package/api/ism/removePolicy.js +2 -2
  309. package/api/ism/retryIndex.d.ts +1 -1
  310. package/api/ism/retryIndex.js +3 -3
  311. package/api/knn/_api.js +20 -10
  312. package/api/knn/deleteModel.js +1 -1
  313. package/api/knn/getModel.js +1 -1
  314. package/api/knn/searchModels.d.ts +1 -1
  315. package/api/knn/searchModels.js +5 -5
  316. package/api/knn/stats.d.ts +1 -1
  317. package/api/knn/stats.js +3 -3
  318. package/api/knn/trainModel.js +1 -1
  319. package/api/knn/warmup.js +2 -2
  320. package/api/list/_api.js +10 -3
  321. package/api/list/help.js +1 -1
  322. package/api/list/indices.d.ts +3 -2
  323. package/api/list/indices.js +5 -5
  324. package/api/list/shards.d.ts +3 -2
  325. package/api/list/shards.js +4 -4
  326. package/api/ltr/_api.js +106 -1
  327. package/api/ltr/addFeaturesToSet.d.ts +37 -0
  328. package/api/ltr/addFeaturesToSet.js +55 -0
  329. package/api/ltr/addFeaturesToSetByQuery.d.ts +35 -0
  330. package/api/ltr/addFeaturesToSetByQuery.js +57 -0
  331. package/api/ltr/cacheStats.d.ts +28 -0
  332. package/api/ltr/cacheStats.js +45 -0
  333. package/api/ltr/clearCache.d.ts +30 -0
  334. package/api/ltr/clearCache.js +48 -0
  335. package/api/ltr/createDefaultStore.d.ts +28 -0
  336. package/api/ltr/createDefaultStore.js +45 -0
  337. package/api/ltr/createFeature.d.ts +35 -0
  338. package/api/ltr/createFeature.js +53 -0
  339. package/api/ltr/createFeatureset.d.ts +35 -0
  340. package/api/ltr/createFeatureset.js +53 -0
  341. package/api/ltr/createModel.d.ts +35 -0
  342. package/api/ltr/createModel.js +53 -0
  343. package/api/ltr/createModelFromSet.d.ts +35 -0
  344. package/api/ltr/createModelFromSet.js +53 -0
  345. package/api/ltr/createStore.d.ts +30 -0
  346. package/api/ltr/createStore.js +49 -0
  347. package/api/ltr/deleteDefaultStore.d.ts +28 -0
  348. package/api/ltr/deleteDefaultStore.js +45 -0
  349. package/api/ltr/deleteFeature.d.ts +31 -0
  350. package/api/ltr/deleteFeature.js +51 -0
  351. package/api/ltr/deleteFeatureset.d.ts +31 -0
  352. package/api/ltr/deleteFeatureset.js +51 -0
  353. package/api/ltr/deleteModel.d.ts +31 -0
  354. package/api/ltr/deleteModel.js +51 -0
  355. package/api/ltr/deleteStore.d.ts +30 -0
  356. package/api/ltr/deleteStore.js +49 -0
  357. package/api/ltr/getFeature.d.ts +30 -0
  358. package/api/ltr/getFeature.js +51 -0
  359. package/api/ltr/getFeatureset.d.ts +30 -0
  360. package/api/ltr/getFeatureset.js +51 -0
  361. package/api/ltr/getModel.d.ts +30 -0
  362. package/api/ltr/getModel.js +51 -0
  363. package/api/ltr/getStore.d.ts +30 -0
  364. package/api/ltr/getStore.js +49 -0
  365. package/api/ltr/listStores.d.ts +28 -0
  366. package/api/ltr/listStores.js +45 -0
  367. package/api/ltr/searchFeatures.d.ts +33 -0
  368. package/api/ltr/searchFeatures.js +51 -0
  369. package/api/ltr/searchFeaturesets.d.ts +33 -0
  370. package/api/ltr/searchFeaturesets.js +51 -0
  371. package/api/ltr/searchModels.d.ts +33 -0
  372. package/api/ltr/searchModels.js +51 -0
  373. package/api/ltr/stats.d.ts +1 -1
  374. package/api/ltr/stats.js +2 -2
  375. package/api/ltr/updateFeature.d.ts +35 -0
  376. package/api/ltr/updateFeature.js +53 -0
  377. package/api/ltr/updateFeatureset.d.ts +35 -0
  378. package/api/ltr/updateFeatureset.js +53 -0
  379. package/api/ml/_api.js +239 -116
  380. package/api/ml/addAgenticMemory.d.ts +45 -0
  381. package/api/ml/addAgenticMemory.js +50 -0
  382. package/api/ml/createConnector.d.ts +1 -1
  383. package/api/ml/createMemoryContainer.d.ts +40 -0
  384. package/api/ml/createMemoryContainer.js +47 -0
  385. package/api/ml/createMemoryContainerSession.d.ts +41 -0
  386. package/api/ml/createMemoryContainerSession.js +50 -0
  387. package/api/ml/createModelMeta.d.ts +1 -0
  388. package/api/ml/deleteAgenticMemory.d.ts +33 -0
  389. package/api/ml/deleteAgenticMemory.js +55 -0
  390. package/api/ml/deleteAgenticMemoryQuery.d.ts +37 -0
  391. package/api/ml/deleteAgenticMemoryQuery.js +53 -0
  392. package/api/ml/deleteMemoryContainer.d.ts +33 -0
  393. package/api/ml/deleteMemoryContainer.js +51 -0
  394. package/api/ml/executeAgentStream.d.ts +35 -0
  395. package/api/ml/executeAgentStream.js +50 -0
  396. package/api/ml/executeAlgorithm.d.ts +2 -2
  397. package/api/ml/executeAlgorithm.js +1 -1
  398. package/api/ml/executeTool.d.ts +35 -0
  399. package/api/ml/executeTool.js +50 -0
  400. package/api/ml/getAgenticMemory.d.ts +32 -0
  401. package/api/ml/getAgenticMemory.js +55 -0
  402. package/api/ml/getMemoryContainer.d.ts +30 -0
  403. package/api/ml/getMemoryContainer.js +49 -0
  404. package/api/ml/getStats.d.ts +1 -1
  405. package/api/ml/getTool.d.ts +1 -1
  406. package/api/ml/loadModel.d.ts +2 -1
  407. package/api/ml/predictModel.d.ts +6 -1
  408. package/api/ml/predictModelStream.d.ts +37 -0
  409. package/api/ml/predictModelStream.js +50 -0
  410. package/api/ml/registerModel.d.ts +3 -0
  411. package/api/ml/registerModelGroup.d.ts +1 -1
  412. package/api/ml/registerModelMeta.d.ts +1 -0
  413. package/api/ml/searchAgenticMemory.d.ts +40 -0
  414. package/api/ml/searchAgenticMemory.js +53 -0
  415. package/api/ml/searchAgents.d.ts +4 -2
  416. package/api/ml/searchConnectors.d.ts +4 -2
  417. package/api/ml/searchMemory.d.ts +4 -2
  418. package/api/ml/searchMemoryContainer.d.ts +38 -0
  419. package/api/ml/searchMemoryContainer.js +47 -0
  420. package/api/ml/searchMessage.d.ts +4 -2
  421. package/api/ml/searchModelGroup.d.ts +4 -2
  422. package/api/ml/searchModels.d.ts +4 -2
  423. package/api/ml/searchTasks.d.ts +4 -2
  424. package/api/ml/updateAgenticMemory.d.ts +46 -0
  425. package/api/ml/updateAgenticMemory.js +56 -0
  426. package/api/ml/updateConnector.d.ts +2 -2
  427. package/api/ml/updateMemoryContainer.d.ts +38 -0
  428. package/api/ml/updateMemoryContainer.js +50 -0
  429. package/api/neural/_api.js +31 -0
  430. package/api/neural/stats.d.ts +36 -0
  431. package/api/neural/stats.js +55 -0
  432. package/api/nodes/_api.js +16 -7
  433. package/api/nodes/hotThreads.js +7 -7
  434. package/api/nodes/info.js +4 -4
  435. package/api/nodes/reloadSecureSettings.js +2 -2
  436. package/api/nodes/stats.js +10 -10
  437. package/api/nodes/usage.js +1 -1
  438. package/api/notifications/_api.js +31 -18
  439. package/api/notifications/createConfig.js +1 -1
  440. package/api/notifications/deleteConfig.js +1 -1
  441. package/api/notifications/deleteConfigs.js +1 -1
  442. package/api/notifications/getConfigs.js +1 -1
  443. package/api/notifications/listChannels.js +1 -1
  444. package/api/notifications/listFeatures.js +1 -1
  445. package/api/notifications/sendTest.js +1 -1
  446. package/api/notifications/updateConfig.js +1 -1
  447. package/api/observability/_api.js +25 -14
  448. package/api/observability/createObject.js +1 -1
  449. package/api/observability/deleteObject.js +1 -1
  450. package/api/observability/deleteObjects.js +2 -2
  451. package/api/observability/getObject.js +1 -1
  452. package/api/observability/updateObject.js +2 -2
  453. package/api/ppl/_api.js +14 -6
  454. package/api/ppl/explain.d.ts +2 -1
  455. package/api/ppl/explain.js +5 -5
  456. package/api/ppl/getStats.d.ts +2 -1
  457. package/api/ppl/getStats.js +4 -4
  458. package/api/ppl/postStats.d.ts +2 -1
  459. package/api/ppl/postStats.js +5 -5
  460. package/api/ppl/query.d.ts +2 -1
  461. package/api/ppl/query.js +5 -5
  462. package/api/query/_api.js +19 -10
  463. package/api/query/datasourceDelete.js +2 -2
  464. package/api/query/datasourceRetrieve.js +2 -2
  465. package/api/query/datasourcesCreate.js +2 -2
  466. package/api/query/datasourcesList.js +1 -1
  467. package/api/query/datasourcesUpdate.js +2 -2
  468. package/api/remoteStore/_api.js +6 -1
  469. package/api/remoteStore/restore.js +1 -1
  470. package/api/replication/_api.js +32 -17
  471. package/api/replication/autofollowStats.js +1 -1
  472. package/api/replication/createReplicationRule.js +1 -1
  473. package/api/replication/deleteReplicationRule.js +1 -1
  474. package/api/replication/followerStats.js +1 -1
  475. package/api/replication/leaderStats.js +1 -1
  476. package/api/replication/pause.js +1 -1
  477. package/api/replication/resume.js +1 -1
  478. package/api/replication/start.js +1 -1
  479. package/api/replication/status.js +1 -1
  480. package/api/replication/stop.js +1 -1
  481. package/api/replication/updateSettings.js +1 -1
  482. package/api/rollups/_api.js +16 -6
  483. package/api/rollups/delete.js +3 -3
  484. package/api/rollups/explain.js +3 -3
  485. package/api/rollups/get.js +3 -3
  486. package/api/rollups/put.js +6 -6
  487. package/api/rollups/start.js +3 -3
  488. package/api/rollups/stop.js +3 -3
  489. package/api/searchPipeline/_api.js +10 -3
  490. package/api/searchPipeline/put.js +1 -1
  491. package/api/searchRelevance/_api.js +117 -0
  492. package/api/searchRelevance/deleteExperiments.d.ts +30 -0
  493. package/api/searchRelevance/deleteExperiments.js +49 -0
  494. package/api/searchRelevance/deleteJudgments.d.ts +30 -0
  495. package/api/searchRelevance/deleteJudgments.js +49 -0
  496. package/api/searchRelevance/deleteQuerySets.d.ts +30 -0
  497. package/api/searchRelevance/deleteQuerySets.js +49 -0
  498. package/api/searchRelevance/deleteScheduledExperiments.d.ts +30 -0
  499. package/api/searchRelevance/deleteScheduledExperiments.js +49 -0
  500. package/api/searchRelevance/deleteSearchConfigurations.d.ts +30 -0
  501. package/api/searchRelevance/deleteSearchConfigurations.js +49 -0
  502. package/api/searchRelevance/experimentsSearch.d.ts +31 -0
  503. package/api/searchRelevance/experimentsSearch.js +47 -0
  504. package/api/searchRelevance/getExperiments.d.ts +30 -0
  505. package/api/searchRelevance/getExperiments.js +48 -0
  506. package/api/searchRelevance/getJudgments.d.ts +30 -0
  507. package/api/searchRelevance/getJudgments.js +48 -0
  508. package/api/searchRelevance/getNodeStats.d.ts +42 -0
  509. package/api/searchRelevance/getNodeStats.js +56 -0
  510. package/api/searchRelevance/getQuerySets.d.ts +30 -0
  511. package/api/searchRelevance/getQuerySets.js +48 -0
  512. package/api/searchRelevance/getScheduledExperiments.d.ts +30 -0
  513. package/api/searchRelevance/getScheduledExperiments.js +48 -0
  514. package/api/searchRelevance/getSearchConfigurations.d.ts +30 -0
  515. package/api/searchRelevance/getSearchConfigurations.js +48 -0
  516. package/api/searchRelevance/getStats.d.ts +41 -0
  517. package/api/searchRelevance/getStats.js +53 -0
  518. package/api/searchRelevance/judgmentsSearch.d.ts +31 -0
  519. package/api/searchRelevance/judgmentsSearch.js +47 -0
  520. package/api/searchRelevance/postQuerySets.d.ts +30 -0
  521. package/api/searchRelevance/postQuerySets.js +47 -0
  522. package/api/searchRelevance/postScheduledExperiments.d.ts +30 -0
  523. package/api/searchRelevance/postScheduledExperiments.js +47 -0
  524. package/api/searchRelevance/putExperiments.d.ts +32 -0
  525. package/api/searchRelevance/putExperiments.js +47 -0
  526. package/api/searchRelevance/putJudgments.d.ts +32 -0
  527. package/api/searchRelevance/putJudgments.js +47 -0
  528. package/api/searchRelevance/putQuerySets.d.ts +30 -0
  529. package/api/searchRelevance/putQuerySets.js +47 -0
  530. package/api/searchRelevance/putSearchConfigurations.d.ts +30 -0
  531. package/api/searchRelevance/putSearchConfigurations.js +47 -0
  532. package/api/searchRelevance/querySetsSearch.d.ts +31 -0
  533. package/api/searchRelevance/querySetsSearch.js +47 -0
  534. package/api/searchRelevance/searchConfigurationsSearch.d.ts +31 -0
  535. package/api/searchRelevance/searchConfigurationsSearch.js +47 -0
  536. package/api/security/_api.js +227 -147
  537. package/api/security/changePassword.js +1 -1
  538. package/api/security/configUpgradeCheck.js +1 -1
  539. package/api/security/configUpgradePerform.js +1 -1
  540. package/api/security/createActionGroup.js +1 -1
  541. package/api/security/createAllowlist.js +1 -1
  542. package/api/security/createRole.js +1 -1
  543. package/api/security/createRoleMapping.js +1 -1
  544. package/api/security/createTenant.js +1 -1
  545. package/api/security/createUpdateTenancyConfig.js +1 -1
  546. package/api/security/createUser.js +1 -1
  547. package/api/security/deleteActionGroup.js +1 -1
  548. package/api/security/deleteDistinguishedName.js +1 -1
  549. package/api/security/deleteRole.js +1 -1
  550. package/api/security/deleteRoleMapping.js +1 -1
  551. package/api/security/deleteTenant.js +1 -1
  552. package/api/security/deleteUser.js +1 -1
  553. package/api/security/flushCache.js +1 -1
  554. package/api/security/generateOboToken.js +1 -1
  555. package/api/security/getAccountDetails.js +1 -1
  556. package/api/security/getActionGroup.js +1 -1
  557. package/api/security/getActionGroups.js +1 -1
  558. package/api/security/getAllowlist.js +1 -1
  559. package/api/security/getAuditConfiguration.js +1 -1
  560. package/api/security/getCertificates.js +1 -1
  561. package/api/security/getConfiguration.js +1 -1
  562. package/api/security/getDistinguishedName.js +1 -1
  563. package/api/security/getDistinguishedNames.js +1 -1
  564. package/api/security/getRole.js +1 -1
  565. package/api/security/getRoleMapping.js +1 -1
  566. package/api/security/getRoleMappings.js +1 -1
  567. package/api/security/getRoles.js +1 -1
  568. package/api/security/getSslinfo.d.ts +2 -1
  569. package/api/security/getSslinfo.js +1 -1
  570. package/api/security/getTenancyConfig.js +1 -1
  571. package/api/security/getTenant.js +1 -1
  572. package/api/security/getTenants.js +1 -1
  573. package/api/security/getUser.js +1 -1
  574. package/api/security/getUsers.js +1 -1
  575. package/api/security/health.js +1 -1
  576. package/api/security/patchActionGroup.js +1 -1
  577. package/api/security/patchActionGroups.js +1 -1
  578. package/api/security/patchAllowlist.js +1 -1
  579. package/api/security/patchAuditConfiguration.js +1 -1
  580. package/api/security/patchConfiguration.js +1 -1
  581. package/api/security/patchDistinguishedName.d.ts +3 -1
  582. package/api/security/patchDistinguishedNames.js +1 -1
  583. package/api/security/patchRole.js +1 -1
  584. package/api/security/patchRoleMapping.js +1 -1
  585. package/api/security/patchRoleMappings.js +1 -1
  586. package/api/security/patchRoles.js +1 -1
  587. package/api/security/patchTenant.js +1 -1
  588. package/api/security/patchTenants.js +1 -1
  589. package/api/security/patchUser.js +1 -1
  590. package/api/security/patchUsers.js +1 -1
  591. package/api/security/reloadHttpCertificates.js +1 -1
  592. package/api/security/reloadTransportCertificates.js +1 -1
  593. package/api/security/updateAuditConfiguration.js +1 -1
  594. package/api/security/updateConfiguration.js +1 -1
  595. package/api/security/updateDistinguishedName.js +1 -1
  596. package/api/securityAnalytics/_api.js +41 -0
  597. package/api/securityAnalytics/getAlerts.d.ts +42 -0
  598. package/api/securityAnalytics/getAlerts.js +58 -0
  599. package/api/securityAnalytics/getFindings.d.ts +43 -0
  600. package/api/securityAnalytics/getFindings.js +59 -0
  601. package/api/securityAnalytics/searchFindingCorrelations.d.ts +33 -0
  602. package/api/securityAnalytics/searchFindingCorrelations.js +52 -0
  603. package/api/sm/_api.js +28 -16
  604. package/api/sm/deletePolicy.d.ts +2 -2
  605. package/api/sm/getPolicies.d.ts +2 -1
  606. package/api/sm/getPolicies.js +1 -1
  607. package/api/snapshot/_api.js +31 -16
  608. package/api/snapshot/cleanupRepository.js +2 -2
  609. package/api/snapshot/clone.js +2 -2
  610. package/api/snapshot/create.js +2 -2
  611. package/api/snapshot/createRepository.js +2 -2
  612. package/api/snapshot/delete.js +2 -2
  613. package/api/snapshot/deleteRepository.js +2 -2
  614. package/api/snapshot/get.js +3 -3
  615. package/api/snapshot/getRepository.js +2 -2
  616. package/api/snapshot/restore.d.ts +1 -0
  617. package/api/snapshot/restore.js +2 -2
  618. package/api/snapshot/status.js +2 -2
  619. package/api/snapshot/verifyRepository.js +2 -2
  620. package/api/sql/_api.js +18 -8
  621. package/api/sql/close.d.ts +1 -1
  622. package/api/sql/close.js +5 -5
  623. package/api/sql/explain.d.ts +1 -1
  624. package/api/sql/explain.js +5 -5
  625. package/api/sql/getStats.d.ts +2 -1
  626. package/api/sql/getStats.js +4 -4
  627. package/api/sql/postStats.d.ts +1 -1
  628. package/api/sql/postStats.js +5 -5
  629. package/api/sql/query.d.ts +1 -1
  630. package/api/sql/query.js +5 -5
  631. package/api/sql/settings.d.ts +1 -1
  632. package/api/sql/settings.js +4 -4
  633. package/api/tasks/_api.js +12 -3
  634. package/api/tasks/cancel.js +1 -1
  635. package/api/tasks/delete.d.ts +30 -0
  636. package/api/tasks/delete.js +49 -0
  637. package/api/tasks/get.js +1 -1
  638. package/api/tasks/list.js +1 -1
  639. package/api/transforms/_api.js +20 -8
  640. package/api/transforms/delete.d.ts +2 -2
  641. package/api/transforms/delete.js +1 -1
  642. package/api/transforms/explain.js +1 -1
  643. package/api/transforms/get.js +1 -1
  644. package/api/transforms/preview.js +1 -1
  645. package/api/transforms/put.js +1 -1
  646. package/api/transforms/search.js +1 -1
  647. package/api/transforms/start.js +1 -1
  648. package/api/transforms/stop.js +1 -1
  649. package/api/ubi/_api.js +31 -0
  650. package/api/ubi/initialize.d.ts +27 -0
  651. package/api/ubi/initialize.js +45 -0
  652. package/api/wlm/_api.js +16 -8
  653. package/lib/Connection.d.ts +1 -2
  654. package/lib/Connection.js +5 -3
  655. package/lib/Helpers.js +8 -8
  656. package/lib/ProxyAgent.js +125 -0
  657. package/lib/aws/shared.js +4 -3
  658. package/package.json +9 -4
@@ -0,0 +1,43 @@
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 SecurityAnalytics_Findings from '../_types/security_analytics.findings'
21
+
22
+ export interface SecurityAnalytics_GetFindings_Request extends Global.Params {
23
+ detectionType?: SecurityAnalytics_Findings.DetectionType;
24
+ detector_id?: string;
25
+ detectorType?: string;
26
+ endTime?: string;
27
+ findingIds?: string;
28
+ missing?: string;
29
+ searchString?: string;
30
+ severity?: SecurityAnalytics_Findings.RuleSeverity;
31
+ size?: number;
32
+ sortOrder?: Common.SortOrder;
33
+ sortString?: string;
34
+ startIndex?: number;
35
+ startTime?: number;
36
+ }
37
+
38
+ export interface SecurityAnalytics_GetFindings_Response extends ApiResponse {
39
+ body: SecurityAnalytics_GetFindings_ResponseBody;
40
+ }
41
+
42
+ export type SecurityAnalytics_GetFindings_ResponseBody = SecurityAnalytics_Findings.GetFindingsResponse
43
+
@@ -0,0 +1,59 @@
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 } = require('../utils');
20
+
21
+ /**
22
+ * Retrieve findings related to a specific detector type or detector ID.
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/security-analytics/api-tools/alert-finding-api/#get-findings - security_analytics.get_findings}
24
+ *
25
+ * @memberOf API-Security-Analytics
26
+ *
27
+ * @param {object} [params]
28
+ * @param {string} [params.detectionType] - The detection type that dictates the retrieval type for the findings. When the detection type is `threat`, it fetches threat intelligence feeds. When the detection type is `rule`, findings are fetched based on the detector’s rule. Optional.
29
+ * @param {string} [params.detectorType] - The type of detector used to fetch alerts. Optional when the `detector_id` is specified. Otherwise required.
30
+ * @param {string} [params.detector_id] - The ID of the detector used to fetch alerts. Optional when the `detectorType` is specified. Otherwise required.
31
+ * @param {string} [params.endTime] - The end timestamp (in ms) of the time window in which you want to retrieve findings. Optional.
32
+ * @param {string} [params.findingIds] - The comma-separated id list of findings for which you want retrieve details. Optional.
33
+ * @param {string} [params.missing] - Used to sort by whether the field `missing` exists or not in the documents associated with the finding. Optional.
34
+ * @param {string} [params.searchString] - The finding attribute you want returned in the search. To search in a specific index, specify the index name in the request path. For example, to search findings in the indexABC index, use `searchString=indexABC’. Optional.
35
+ * @param {string} [params.severity] - The rule severity for which retrieve findings. Severity can be `critical`, `high`, `medium`, or `low`. Optional.
36
+ * @param {number} [params.size=20] - The maximum number of results returned in the response. Optional.
37
+ * @param {string} [params.sortOrder] - The order used to sort the list of findings. Possible values are `asc` or `desc`. Optional.
38
+ * @param {string} [params.sortString=timestamp] - The string used by the Alerting plugin to sort the findings. Optional.
39
+ * @param {number} [params.startIndex=0] - The pagination index. Optional.
40
+ * @param {number} [params.startTime] - The beginning timestamp (in ms) of the time window in which you want to retrieve findings. Optional.
41
+ *
42
+ * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
43
+ * @param {function} [callback] - Callback that handles errors and response
44
+ *
45
+ * @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
46
+ */
47
+ function getFindingsFunc(params, options, callback) {
48
+ [params, options, callback] = normalizeArguments(params, options, callback);
49
+
50
+ let { body, ...querystring } = params;
51
+
52
+ const path = '/_plugins/_security_analytics/findings/_search';
53
+ const method = 'GET';
54
+ body = body || '';
55
+
56
+ return this.transport.request({ method, path, querystring, body }, options, callback);
57
+ }
58
+
59
+ module.exports = getFindingsFunc;
@@ -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 Global from '../_types/_global'
19
+ import * as SecurityAnalytics_Findings from '../_types/security_analytics.findings'
20
+
21
+ export interface SecurityAnalytics_SearchFindingCorrelations_Request extends Global.Params {
22
+ detector_type: string;
23
+ finding: string;
24
+ nearby_findings?: number;
25
+ time_window?: number;
26
+ }
27
+
28
+ export interface SecurityAnalytics_SearchFindingCorrelations_Response extends ApiResponse {
29
+ body: SecurityAnalytics_SearchFindingCorrelations_ResponseBody;
30
+ }
31
+
32
+ export type SecurityAnalytics_SearchFindingCorrelations_ResponseBody = SecurityAnalytics_Findings.SearchFindingCorrelationsResponse
33
+
@@ -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, handleMissingParam } = require('../utils');
20
+
21
+ /**
22
+ * List correlations for a finding.
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/security-analytics/api-tools/correlation-eng/#list-correlations-for-a-finding-belonging-to-a-log-type - security_analytics.search_finding_correlations}
24
+ *
25
+ * @memberOf API-Security-Analytics
26
+ *
27
+ * @param {object} params
28
+ * @param {string} params.detector_type - The log type of findings you want to correlate with the specified finding. Required.
29
+ * @param {string} params.finding - The finding ID for which you want to find other findings that are correlated. Required.
30
+ * @param {number} [params.nearby_findings=10] - The number of nearby findings you want to return. Optional.
31
+ * @param {number} [params.time_window=300000] - The time window (in ms) in which all of the correlations must have occurred together. Optional.
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 searchFindingCorrelationsFunc(params, options, callback) {
39
+ [params, options, callback] = normalizeArguments(params, options, callback);
40
+ if (params.detector_type == null) return handleMissingParam('detector_type', this, callback);
41
+ if (params.finding == null) return handleMissingParam('finding', this, callback);
42
+
43
+ let { body, ...querystring } = params;
44
+
45
+ const path = '/_plugins/_security_analytics/findings/correlate';
46
+ const method = 'GET';
47
+ body = body || '';
48
+
49
+ return this.transport.request({ method, path, querystring, body }, options, callback);
50
+ }
51
+
52
+ module.exports = searchFindingCorrelationsFunc;
package/api/sm/_api.js CHANGED
@@ -18,32 +18,44 @@
18
18
 
19
19
  /** @namespace API-Sm */
20
20
 
21
+ // All operation modules are required once at module load time (not per
22
+ // instance) to avoid paying `require()` resolution cost on every Client
23
+ // construction.
24
+ const createPolicyFn = require('./createPolicy');
25
+ const deletePolicyFn = require('./deletePolicy');
26
+ const explainPolicyFn = require('./explainPolicy');
27
+ const getPoliciesFn = require('./getPolicies');
28
+ const getPolicyFn = require('./getPolicy');
29
+ const startPolicyFn = require('./startPolicy');
30
+ const stopPolicyFn = require('./stopPolicy');
31
+ const updatePolicyFn = require('./updatePolicy');
32
+
21
33
  function SmApi(bindObj) {
22
- this.createPolicy = require('./createPolicy').bind(bindObj);
23
- this.deletePolicy = require('./deletePolicy').bind(bindObj);
24
- this.explainPolicy = require('./explainPolicy').bind(bindObj);
25
- this.getPolicies = require('./getPolicies').bind(bindObj);
26
- this.getPolicy = require('./getPolicy').bind(bindObj);
27
- this.startPolicy = require('./startPolicy').bind(bindObj);
28
- this.stopPolicy = require('./stopPolicy').bind(bindObj);
29
- this.updatePolicy = require('./updatePolicy').bind(bindObj);
34
+ this.createPolicy = createPolicyFn.bind(bindObj);
35
+ this.deletePolicy = deletePolicyFn.bind(bindObj);
36
+ this.explainPolicy = explainPolicyFn.bind(bindObj);
37
+ this.getPolicies = getPoliciesFn.bind(bindObj);
38
+ this.getPolicy = getPolicyFn.bind(bindObj);
39
+ this.startPolicy = startPolicyFn.bind(bindObj);
40
+ this.stopPolicy = stopPolicyFn.bind(bindObj);
41
+ this.updatePolicy = updatePolicyFn.bind(bindObj);
30
42
 
31
43
  // Deprecated: Use createPolicy instead.
32
- this.create_policy = require('./createPolicy').bind(bindObj);
44
+ this.create_policy = createPolicyFn.bind(bindObj);
33
45
  // Deprecated: Use deletePolicy instead.
34
- this.delete_policy = require('./deletePolicy').bind(bindObj);
46
+ this.delete_policy = deletePolicyFn.bind(bindObj);
35
47
  // Deprecated: Use explainPolicy instead.
36
- this.explain_policy = require('./explainPolicy').bind(bindObj);
48
+ this.explain_policy = explainPolicyFn.bind(bindObj);
37
49
  // Deprecated: Use getPolicies instead.
38
- this.get_policies = require('./getPolicies').bind(bindObj);
50
+ this.get_policies = getPoliciesFn.bind(bindObj);
39
51
  // Deprecated: Use getPolicy instead.
40
- this.get_policy = require('./getPolicy').bind(bindObj);
52
+ this.get_policy = getPolicyFn.bind(bindObj);
41
53
  // Deprecated: Use startPolicy instead.
42
- this.start_policy = require('./startPolicy').bind(bindObj);
54
+ this.start_policy = startPolicyFn.bind(bindObj);
43
55
  // Deprecated: Use stopPolicy instead.
44
- this.stop_policy = require('./stopPolicy').bind(bindObj);
56
+ this.stop_policy = stopPolicyFn.bind(bindObj);
45
57
  // Deprecated: Use updatePolicy instead.
46
- this.update_policy = require('./updatePolicy').bind(bindObj);
58
+ this.update_policy = updatePolicyFn.bind(bindObj);
47
59
  }
48
60
 
49
61
  module.exports = SmApi;
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { ApiResponse } from '../../lib/Transport'
18
+ import * as Common from '../_types/_common'
18
19
  import * as Global from '../_types/_global'
19
- import * as Sm_Common from '../_types/sm._common'
20
20
 
21
21
  export interface Sm_DeletePolicy_Request extends Global.Params {
22
22
  policy_name: string;
@@ -26,5 +26,5 @@ export interface Sm_DeletePolicy_Response extends ApiResponse {
26
26
  body: Sm_DeletePolicy_ResponseBody;
27
27
  }
28
28
 
29
- export type Sm_DeletePolicy_ResponseBody = Sm_Common.DeletePolicyResponse
29
+ export type Sm_DeletePolicy_ResponseBody = Common.WriteResponseBase
30
30
 
@@ -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 Global from '../_types/_global'
19
20
  import * as Sm_Common from '../_types/sm._common'
20
21
 
@@ -23,7 +24,7 @@ export interface Sm_GetPolicies_Request extends Global.Params {
23
24
  queryString?: string;
24
25
  size?: number;
25
26
  sortField?: string;
26
- sortOrder?: 'asc' | 'desc';
27
+ sortOrder?: Common.SortOrder;
27
28
  }
28
29
 
29
30
  export interface Sm_GetPolicies_Response extends ApiResponse {
@@ -29,7 +29,7 @@ const { normalizeArguments } = require('../utils');
29
29
  * @param {string} [params.queryString] - The query string to filter the returned snapshot management policies.
30
30
  * @param {number} [params.size] - The number of snapshot management policies to return.
31
31
  * @param {string} [params.sortField] - The name of the field to sort the snapshot management policies by.
32
- * @param {string} [params.sortOrder=asc] - The order to sort the snapshot management policies.
32
+ * @param {string} [params.sortOrder] - The order to sort the snapshot management policies.
33
33
  *
34
34
  * @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
35
35
  * @param {function} [callback] - Callback that handles errors and response
@@ -18,29 +18,44 @@
18
18
 
19
19
  /** @namespace API-Snapshot */
20
20
 
21
+ // All operation modules are required once at module load time (not per
22
+ // instance) to avoid paying `require()` resolution cost on every Client
23
+ // construction.
24
+ const cleanupRepositoryFn = require('./cleanupRepository');
25
+ const cloneFn = require('./clone');
26
+ const createFn = require('./create');
27
+ const createRepositoryFn = require('./createRepository');
28
+ const deleteFn = require('./delete');
29
+ const deleteRepositoryFn = require('./deleteRepository');
30
+ const getFn = require('./get');
31
+ const getRepositoryFn = require('./getRepository');
32
+ const restoreFn = require('./restore');
33
+ const statusFn = require('./status');
34
+ const verifyRepositoryFn = require('./verifyRepository');
35
+
21
36
  function SnapshotApi(bindObj) {
22
- this.cleanupRepository = require('./cleanupRepository').bind(bindObj);
23
- this.clone = require('./clone').bind(bindObj);
24
- this.create = require('./create').bind(bindObj);
25
- this.createRepository = require('./createRepository').bind(bindObj);
26
- this.delete = require('./delete').bind(bindObj);
27
- this.deleteRepository = require('./deleteRepository').bind(bindObj);
28
- this.get = require('./get').bind(bindObj);
29
- this.getRepository = require('./getRepository').bind(bindObj);
30
- this.restore = require('./restore').bind(bindObj);
31
- this.status = require('./status').bind(bindObj);
32
- this.verifyRepository = require('./verifyRepository').bind(bindObj);
37
+ this.cleanupRepository = cleanupRepositoryFn.bind(bindObj);
38
+ this.clone = cloneFn.bind(bindObj);
39
+ this.create = createFn.bind(bindObj);
40
+ this.createRepository = createRepositoryFn.bind(bindObj);
41
+ this.delete = deleteFn.bind(bindObj);
42
+ this.deleteRepository = deleteRepositoryFn.bind(bindObj);
43
+ this.get = getFn.bind(bindObj);
44
+ this.getRepository = getRepositoryFn.bind(bindObj);
45
+ this.restore = restoreFn.bind(bindObj);
46
+ this.status = statusFn.bind(bindObj);
47
+ this.verifyRepository = verifyRepositoryFn.bind(bindObj);
33
48
 
34
49
  // Deprecated: Use cleanupRepository instead.
35
- this.cleanup_repository = require('./cleanupRepository').bind(bindObj);
50
+ this.cleanup_repository = cleanupRepositoryFn.bind(bindObj);
36
51
  // Deprecated: Use createRepository instead.
37
- this.create_repository = require('./createRepository').bind(bindObj);
52
+ this.create_repository = createRepositoryFn.bind(bindObj);
38
53
  // Deprecated: Use deleteRepository instead.
39
- this.delete_repository = require('./deleteRepository').bind(bindObj);
54
+ this.delete_repository = deleteRepositoryFn.bind(bindObj);
40
55
  // Deprecated: Use getRepository instead.
41
- this.get_repository = require('./getRepository').bind(bindObj);
56
+ this.get_repository = getRepositoryFn.bind(bindObj);
42
57
  // Deprecated: Use verifyRepository instead.
43
- this.verify_repository = require('./verifyRepository').bind(bindObj);
58
+ this.verify_repository = verifyRepositoryFn.bind(bindObj);
44
59
  }
45
60
 
46
61
  module.exports = SnapshotApi;
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Removes any stale data from a snapshot repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest - snapshot.cleanup_repository}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/ - snapshot.cleanup_repository}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the cluster-manager node.
30
30
  * @param {string} [params.timeout] - The amount of time to wait for a response.
31
31
  * @param {string} params.repository - Snapshot repository to clean up.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Creates a clone of all or part of a snapshot in the same repository as the original snapshot.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest - snapshot.clone}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/ - snapshot.clone}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {string} params.repository - The name of repository which will contain the snapshots clone.
31
31
  * @param {string} params.snapshot - The name of the original snapshot.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Creates a snapshot within an existing repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/create-snapshot/ - snapshot.create}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/create-snapshot/ - snapshot.create}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
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
30
  * @param {boolean} [params.wait_for_completion=false] - When `true`, the request returns a response when the snapshot is complete. When `false`, the request returns a response when the snapshot initializes.
31
31
  * @param {string} params.repository - The name of the repository where the snapshot will be stored.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Creates a snapshot repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/create-repository/ - snapshot.create_repository}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/create-repository/ - snapshot.create_repository}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {string} [params.timeout] - The amount of time to wait for a response.
31
31
  * @param {boolean} [params.verify] - When `true`, verifies the creation of the snapshot repository.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Deletes a snapshot.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ - snapshot.delete}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/delete-snapshot/ - snapshot.delete}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {string} params.repository - The name of the snapshot repository to delete.
31
31
  * @param {string} params.snapshot - A comma-separated list of snapshot names to delete from the repository.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Deletes a snapshot repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ - snapshot.delete_repository}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/delete-snapshot-repository/ - snapshot.delete_repository}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {string} [params.timeout] - The amount of time to wait for a response.
31
31
  * @param {string} params.repository - The name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported.
@@ -20,15 +20,15 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Returns information about a snapshot.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest - snapshot.get}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/ - snapshot.get}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {boolean} [params.ignore_unavailable=false] - When `false`, the request returns an error for any snapshots that are unavailable.
30
30
  * @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.
31
- * @param {boolean} [params.verbose] - When `true`, returns additional information about each snapshot such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot.
31
+ * @param {boolean} [params.verbose] - When `true`, returns additional information about each snapshot, such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards contained in the snapshot. When `false`, returns only snapshot names and contained indexes. This is useful when the snapshots belong to a cloud-based repository, where each blob read is a cost or performance concern.
32
32
  * @param {string} params.repository - A comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported.
33
33
  * @param {string} params.snapshot - A comma-separated list of snapshot names to retrieve. Also accepts wildcard expressions. (`*`). - To get information about all snapshots in a registered repository, use a wildcard (`*`) or `_all`. - To get information about any snapshots that are currently running, use `_current`.
34
34
  *
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
22
  * Returns information about a snapshot repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ - snapshot.get_repository}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/get-snapshot-repository/ - snapshot.get_repository}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} [params]
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {boolean} [params.local=false] - Whether to get information from the local node.
30
30
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
31
31
  * @param {string} [params.repository] - A comma-separated list of repository names.
@@ -30,6 +30,7 @@ export interface Snapshot_Restore_Request extends Global.Params {
30
30
  }
31
31
 
32
32
  export type Snapshot_Restore_RequestBody = {
33
+ attach_to_data_stream?: boolean;
33
34
  ignore_index_settings?: string[];
34
35
  ignore_unavailable?: boolean;
35
36
  include_aliases?: boolean;
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Restores a snapshot.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ - snapshot.restore}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/restore-snapshot/ - snapshot.restore}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {boolean} [params.wait_for_completion=false] - -| Whether to return a response after the restore operation has completed. When `false`, the request returns a response when the restore operation initializes. When `true`, the request returns a response when the restore operation completes.
31
31
  * @param {string} params.repository - The name of the repository containing the snapshot
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam } = require('../utils');
20
20
 
21
21
  /**
22
22
  * Returns information about the status of a snapshot.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ - snapshot.status}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/get-snapshot-status/ - snapshot.status}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} [params]
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {boolean} [params.ignore_unavailable=false] - Whether to ignore any unavailable snapshots, When `false`, a `SnapshotMissingException` is thrown.
30
30
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
31
31
  * @param {string} [params.repository] - The name of the repository containing the snapshot.
@@ -20,12 +20,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
20
20
 
21
21
  /**
22
22
  * Verifies a repository.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ - snapshot.verify_repository}
23
+ * <br/> See Also: {@link https://docs.opensearch.org/latest/api-reference/snapshots/verify-snapshot-repository/ - snapshot.verify_repository}
24
24
  *
25
25
  * @memberOf API-Snapshot
26
26
  *
27
27
  * @param {object} params
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).
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://docs.opensearch.org/latest/api-reference/common-parameters/#time-units).
29
29
  * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to cluster-manager node
30
30
  * @param {string} [params.timeout] - The amount of time to wait for a response.
31
31
  * @param {string} params.repository - The name of the repository containing the snapshot.
package/api/sql/_api.js CHANGED
@@ -18,18 +18,28 @@
18
18
 
19
19
  /** @namespace API-Sql */
20
20
 
21
+ // All operation modules are required once at module load time (not per
22
+ // instance) to avoid paying `require()` resolution cost on every Client
23
+ // construction.
24
+ const closeFn = require('./close');
25
+ const explainFn = require('./explain');
26
+ const getStatsFn = require('./getStats');
27
+ const postStatsFn = require('./postStats');
28
+ const queryFn = require('./query');
29
+ const settingsFn = require('./settings');
30
+
21
31
  function SqlApi(bindObj) {
22
- this.close = require('./close').bind(bindObj);
23
- this.explain = require('./explain').bind(bindObj);
24
- this.getStats = require('./getStats').bind(bindObj);
25
- this.postStats = require('./postStats').bind(bindObj);
26
- this.query = require('./query').bind(bindObj);
27
- this.settings = require('./settings').bind(bindObj);
32
+ this.close = closeFn.bind(bindObj);
33
+ this.explain = explainFn.bind(bindObj);
34
+ this.getStats = getStatsFn.bind(bindObj);
35
+ this.postStats = postStatsFn.bind(bindObj);
36
+ this.query = queryFn.bind(bindObj);
37
+ this.settings = settingsFn.bind(bindObj);
28
38
 
29
39
  // Deprecated: Use getStats instead.
30
- this.get_stats = require('./getStats').bind(bindObj);
40
+ this.get_stats = getStatsFn.bind(bindObj);
31
41
  // Deprecated: Use postStats instead.
32
- this.post_stats = require('./postStats').bind(bindObj);
42
+ this.post_stats = postStatsFn.bind(bindObj);
33
43
  }
34
44
 
35
45
  module.exports = SqlApi;
@@ -20,7 +20,7 @@ import * as Sql_Common from '../_types/sql._common'
20
20
 
21
21
  export interface Sql_Close_Request extends Global.Params {
22
22
  body?: Sql_Common.SqlClose;
23
- format?: string;
23
+ format?: Sql_Common.ResponseFormat;
24
24
  sanitize?: boolean;
25
25
  }
26
26
 
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.
23
- * <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.close}
22
+ * Closes an open cursor to free server-side resources.
23
+ * <br/> See Also: {@link https://docs.opensearch.org/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=jdbc] - 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