@elastic/elasticsearch 8.17.1 → 9.0.0-alpha.2

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 (268) hide show
  1. package/lib/api/api/async_search.d.ts +16 -17
  2. package/lib/api/api/async_search.js +50 -20
  3. package/lib/api/api/async_search.js.map +1 -1
  4. package/lib/api/api/autoscaling.d.ts +16 -17
  5. package/lib/api/api/autoscaling.js +42 -12
  6. package/lib/api/api/autoscaling.js.map +1 -1
  7. package/lib/api/api/bulk.d.ts +4 -5
  8. package/lib/api/api/bulk.js +3 -3
  9. package/lib/api/api/bulk.js.map +1 -1
  10. package/lib/api/api/capabilities.d.ts +3 -4
  11. package/lib/api/api/capabilities.js +13 -3
  12. package/lib/api/api/capabilities.js.map +1 -1
  13. package/lib/api/api/cat.d.ts +104 -105
  14. package/lib/api/api/cat.js +338 -78
  15. package/lib/api/api/cat.js.map +1 -1
  16. package/lib/api/api/ccr.d.ts +52 -53
  17. package/lib/api/api/ccr.js +162 -64
  18. package/lib/api/api/ccr.js.map +1 -1
  19. package/lib/api/api/clear_scroll.d.ts +4 -5
  20. package/lib/api/api/clear_scroll.js +11 -9
  21. package/lib/api/api/clear_scroll.js.map +1 -1
  22. package/lib/api/api/close_point_in_time.d.ts +4 -5
  23. package/lib/api/api/close_point_in_time.js +11 -9
  24. package/lib/api/api/close_point_in_time.js.map +1 -1
  25. package/lib/api/api/cluster.d.ts +64 -65
  26. package/lib/api/api/cluster.js +200 -72
  27. package/lib/api/api/cluster.js.map +1 -1
  28. package/lib/api/api/connector.d.ts +132 -133
  29. package/lib/api/api/connector.js +402 -222
  30. package/lib/api/api/connector.js.map +1 -1
  31. package/lib/api/api/count.d.ts +5 -6
  32. package/lib/api/api/count.js +11 -9
  33. package/lib/api/api/count.js.map +1 -1
  34. package/lib/api/api/create.d.ts +5 -6
  35. package/lib/api/api/create.js +3 -3
  36. package/lib/api/api/create.js.map +1 -1
  37. package/lib/api/api/dangling_indices.d.ts +12 -13
  38. package/lib/api/api/dangling_indices.js +39 -9
  39. package/lib/api/api/dangling_indices.js.map +1 -1
  40. package/lib/api/api/delete.d.ts +4 -5
  41. package/lib/api/api/delete.js +13 -3
  42. package/lib/api/api/delete.js.map +1 -1
  43. package/lib/api/api/delete_by_query.d.ts +4 -5
  44. package/lib/api/api/delete_by_query.js +11 -9
  45. package/lib/api/api/delete_by_query.js.map +1 -1
  46. package/lib/api/api/delete_by_query_rethrottle.d.ts +4 -5
  47. package/lib/api/api/delete_by_query_rethrottle.js +13 -3
  48. package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
  49. package/lib/api/api/delete_script.d.ts +4 -5
  50. package/lib/api/api/delete_script.js +13 -3
  51. package/lib/api/api/delete_script.js.map +1 -1
  52. package/lib/api/api/enrich.d.ts +20 -21
  53. package/lib/api/api/enrich.js +63 -21
  54. package/lib/api/api/enrich.js.map +1 -1
  55. package/lib/api/api/eql.d.ts +16 -17
  56. package/lib/api/api/eql.js +51 -19
  57. package/lib/api/api/eql.js.map +1 -1
  58. package/lib/api/api/esql.d.ts +16 -17
  59. package/lib/api/api/esql.js +50 -26
  60. package/lib/api/api/esql.js.map +1 -1
  61. package/lib/api/api/exists.d.ts +4 -5
  62. package/lib/api/api/exists.js +13 -3
  63. package/lib/api/api/exists.js.map +1 -1
  64. package/lib/api/api/exists_source.d.ts +4 -5
  65. package/lib/api/api/exists_source.js +13 -3
  66. package/lib/api/api/exists_source.js.map +1 -1
  67. package/lib/api/api/explain.d.ts +5 -6
  68. package/lib/api/api/explain.js +11 -9
  69. package/lib/api/api/explain.js.map +1 -1
  70. package/lib/api/api/features.d.ts +8 -9
  71. package/lib/api/api/features.js +26 -6
  72. package/lib/api/api/features.js.map +1 -1
  73. package/lib/api/api/field_caps.d.ts +4 -5
  74. package/lib/api/api/field_caps.js +11 -9
  75. package/lib/api/api/field_caps.js.map +1 -1
  76. package/lib/api/api/fleet.d.ts +22 -23
  77. package/lib/api/api/fleet.js +66 -24
  78. package/lib/api/api/fleet.js.map +1 -1
  79. package/lib/api/api/get.d.ts +4 -5
  80. package/lib/api/api/get.js +13 -3
  81. package/lib/api/api/get.js.map +1 -1
  82. package/lib/api/api/get_script.d.ts +4 -5
  83. package/lib/api/api/get_script.js +13 -3
  84. package/lib/api/api/get_script.js.map +1 -1
  85. package/lib/api/api/get_script_context.d.ts +4 -5
  86. package/lib/api/api/get_script_context.js +13 -3
  87. package/lib/api/api/get_script_context.js.map +1 -1
  88. package/lib/api/api/get_script_languages.d.ts +4 -5
  89. package/lib/api/api/get_script_languages.js +13 -3
  90. package/lib/api/api/get_script_languages.js.map +1 -1
  91. package/lib/api/api/get_source.d.ts +4 -5
  92. package/lib/api/api/get_source.js +13 -3
  93. package/lib/api/api/get_source.js.map +1 -1
  94. package/lib/api/api/graph.d.ts +4 -5
  95. package/lib/api/api/graph.js +11 -9
  96. package/lib/api/api/graph.js.map +1 -1
  97. package/lib/api/api/health_report.d.ts +4 -5
  98. package/lib/api/api/health_report.js +13 -3
  99. package/lib/api/api/health_report.js.map +1 -1
  100. package/lib/api/api/ilm.d.ts +44 -45
  101. package/lib/api/api/ilm.js +137 -51
  102. package/lib/api/api/ilm.js.map +1 -1
  103. package/lib/api/api/index.d.ts +5 -6
  104. package/lib/api/api/index.js +3 -3
  105. package/lib/api/api/index.js.map +1 -1
  106. package/lib/api/api/indices.d.ts +264 -244
  107. package/lib/api/api/indices.js +837 -295
  108. package/lib/api/api/indices.js.map +1 -1
  109. package/lib/api/api/inference.d.ts +31 -25
  110. package/lib/api/api/inference.js +102 -30
  111. package/lib/api/api/inference.js.map +1 -1
  112. package/lib/api/api/info.d.ts +4 -5
  113. package/lib/api/api/info.js +13 -3
  114. package/lib/api/api/info.js.map +1 -1
  115. package/lib/api/api/ingest.d.ts +48 -49
  116. package/lib/api/api/ingest.js +140 -54
  117. package/lib/api/api/ingest.js.map +1 -1
  118. package/lib/api/api/knn_search.d.ts +5 -6
  119. package/lib/api/api/knn_search.js +11 -9
  120. package/lib/api/api/knn_search.js.map +1 -1
  121. package/lib/api/api/license.d.ts +28 -29
  122. package/lib/api/api/license.js +89 -27
  123. package/lib/api/api/license.js.map +1 -1
  124. package/lib/api/api/logstash.d.ts +12 -13
  125. package/lib/api/api/logstash.js +29 -9
  126. package/lib/api/api/logstash.js.map +1 -1
  127. package/lib/api/api/mget.d.ts +5 -6
  128. package/lib/api/api/mget.js +11 -9
  129. package/lib/api/api/mget.js.map +1 -1
  130. package/lib/api/api/migration.d.ts +12 -13
  131. package/lib/api/api/migration.js +39 -9
  132. package/lib/api/api/migration.js.map +1 -1
  133. package/lib/api/api/ml.d.ts +292 -293
  134. package/lib/api/api/ml.js +855 -441
  135. package/lib/api/api/ml.js.map +1 -1
  136. package/lib/api/api/monitoring.d.ts +4 -5
  137. package/lib/api/api/monitoring.js +3 -3
  138. package/lib/api/api/monitoring.js.map +1 -1
  139. package/lib/api/api/msearch.d.ts +4 -5
  140. package/lib/api/api/msearch.js +3 -3
  141. package/lib/api/api/msearch.js.map +1 -1
  142. package/lib/api/api/msearch_template.d.ts +5 -6
  143. package/lib/api/api/msearch_template.js +3 -3
  144. package/lib/api/api/msearch_template.js.map +1 -1
  145. package/lib/api/api/mtermvectors.d.ts +5 -6
  146. package/lib/api/api/mtermvectors.js +11 -9
  147. package/lib/api/api/mtermvectors.js.map +1 -1
  148. package/lib/api/api/nodes.d.ts +28 -29
  149. package/lib/api/api/nodes.js +89 -27
  150. package/lib/api/api/nodes.js.map +1 -1
  151. package/lib/api/api/open_point_in_time.d.ts +4 -5
  152. package/lib/api/api/open_point_in_time.js +11 -9
  153. package/lib/api/api/open_point_in_time.js.map +1 -1
  154. package/lib/api/api/ping.d.ts +4 -5
  155. package/lib/api/api/ping.js +13 -3
  156. package/lib/api/api/ping.js.map +1 -1
  157. package/lib/api/api/profiling.d.ts +16 -17
  158. package/lib/api/api/profiling.js +52 -12
  159. package/lib/api/api/profiling.js.map +1 -1
  160. package/lib/api/api/put_script.d.ts +4 -5
  161. package/lib/api/api/put_script.js +11 -9
  162. package/lib/api/api/put_script.js.map +1 -1
  163. package/lib/api/api/query_rules.d.ts +32 -33
  164. package/lib/api/api/query_rules.js +98 -42
  165. package/lib/api/api/query_rules.js.map +1 -1
  166. package/lib/api/api/rank_eval.d.ts +4 -5
  167. package/lib/api/api/rank_eval.js +11 -9
  168. package/lib/api/api/rank_eval.js.map +1 -1
  169. package/lib/api/api/reindex.d.ts +5 -6
  170. package/lib/api/api/reindex.js +11 -9
  171. package/lib/api/api/reindex.js.map +1 -1
  172. package/lib/api/api/reindex_rethrottle.d.ts +4 -5
  173. package/lib/api/api/reindex_rethrottle.js +13 -3
  174. package/lib/api/api/reindex_rethrottle.js.map +1 -1
  175. package/lib/api/api/render_search_template.d.ts +4 -5
  176. package/lib/api/api/render_search_template.js +13 -11
  177. package/lib/api/api/render_search_template.js.map +1 -1
  178. package/lib/api/api/rollup.d.ts +32 -33
  179. package/lib/api/api/rollup.js +100 -36
  180. package/lib/api/api/rollup.js.map +1 -1
  181. package/lib/api/api/scripts_painless_execute.d.ts +5 -6
  182. package/lib/api/api/scripts_painless_execute.js +11 -9
  183. package/lib/api/api/scripts_painless_execute.js.map +1 -1
  184. package/lib/api/api/scroll.d.ts +4 -5
  185. package/lib/api/api/scroll.js +11 -9
  186. package/lib/api/api/scroll.js.map +1 -1
  187. package/lib/api/api/search.d.ts +4 -5
  188. package/lib/api/api/search.js +11 -11
  189. package/lib/api/api/search.js.map +1 -1
  190. package/lib/api/api/search_application.d.ts +40 -41
  191. package/lib/api/api/search_application.js +106 -42
  192. package/lib/api/api/search_application.js.map +1 -1
  193. package/lib/api/api/search_mvt.d.ts +5 -6
  194. package/lib/api/api/search_mvt.js +11 -9
  195. package/lib/api/api/search_mvt.js.map +1 -1
  196. package/lib/api/api/search_shards.d.ts +5 -6
  197. package/lib/api/api/search_shards.js +13 -3
  198. package/lib/api/api/search_shards.js.map +1 -1
  199. package/lib/api/api/search_template.d.ts +4 -5
  200. package/lib/api/api/search_template.js +11 -9
  201. package/lib/api/api/search_template.js.map +1 -1
  202. package/lib/api/api/searchable_snapshots.d.ts +16 -17
  203. package/lib/api/api/searchable_snapshots.js +50 -18
  204. package/lib/api/api/searchable_snapshots.js.map +1 -1
  205. package/lib/api/api/security.d.ts +256 -257
  206. package/lib/api/api/security.js +756 -390
  207. package/lib/api/api/security.js.map +1 -1
  208. package/lib/api/api/shutdown.d.ts +12 -13
  209. package/lib/api/api/shutdown.js +37 -15
  210. package/lib/api/api/shutdown.js.map +1 -1
  211. package/lib/api/api/simulate.d.ts +4 -5
  212. package/lib/api/api/simulate.js +11 -9
  213. package/lib/api/api/simulate.js.map +1 -1
  214. package/lib/api/api/slm.d.ts +36 -37
  215. package/lib/api/api/slm.js +115 -33
  216. package/lib/api/api/slm.js.map +1 -1
  217. package/lib/api/api/snapshot.d.ts +56 -57
  218. package/lib/api/api/snapshot.js +154 -58
  219. package/lib/api/api/snapshot.js.map +1 -1
  220. package/lib/api/api/sql.d.ts +24 -25
  221. package/lib/api/api/sql.js +72 -36
  222. package/lib/api/api/sql.js.map +1 -1
  223. package/lib/api/api/ssl.d.ts +4 -5
  224. package/lib/api/api/ssl.js +13 -3
  225. package/lib/api/api/ssl.js.map +1 -1
  226. package/lib/api/api/synonyms.d.ts +28 -29
  227. package/lib/api/api/synonyms.js +87 -33
  228. package/lib/api/api/synonyms.js.map +1 -1
  229. package/lib/api/api/tasks.d.ts +12 -13
  230. package/lib/api/api/tasks.js +39 -9
  231. package/lib/api/api/tasks.js.map +1 -1
  232. package/lib/api/api/terms_enum.d.ts +5 -6
  233. package/lib/api/api/terms_enum.js +11 -9
  234. package/lib/api/api/terms_enum.js.map +1 -1
  235. package/lib/api/api/termvectors.d.ts +5 -6
  236. package/lib/api/api/termvectors.js +11 -9
  237. package/lib/api/api/termvectors.js.map +1 -1
  238. package/lib/api/api/text_structure.d.ts +16 -17
  239. package/lib/api/api/text_structure.js +38 -24
  240. package/lib/api/api/text_structure.js.map +1 -1
  241. package/lib/api/api/transform.d.ts +48 -49
  242. package/lib/api/api/transform.js +150 -54
  243. package/lib/api/api/transform.js.map +1 -1
  244. package/lib/api/api/update.d.ts +4 -5
  245. package/lib/api/api/update.js +11 -9
  246. package/lib/api/api/update.js.map +1 -1
  247. package/lib/api/api/update_by_query.d.ts +4 -5
  248. package/lib/api/api/update_by_query.js +11 -9
  249. package/lib/api/api/update_by_query.js.map +1 -1
  250. package/lib/api/api/update_by_query_rethrottle.d.ts +4 -5
  251. package/lib/api/api/update_by_query_rethrottle.js +13 -3
  252. package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
  253. package/lib/api/api/watcher.d.ts +52 -53
  254. package/lib/api/api/watcher.js +161 -63
  255. package/lib/api/api/watcher.js.map +1 -1
  256. package/lib/api/api/xpack.d.ts +8 -9
  257. package/lib/api/api/xpack.js +26 -6
  258. package/lib/api/api/xpack.js.map +1 -1
  259. package/lib/api/types.d.ts +12987 -170
  260. package/lib/client.js +4 -12
  261. package/lib/client.js.map +1 -1
  262. package/lib/helpers.js +1 -1
  263. package/lib/helpers.js.map +1 -1
  264. package/package.json +6 -7
  265. package/renovate.json +26 -0
  266. package/lib/api/typesWithBodyKey.d.ts +0 -18871
  267. package/lib/api/typesWithBodyKey.js +0 -21
  268. package/lib/api/typesWithBodyKey.js.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import { Transport, TransportRequestOptions, TransportRequestOptionsWithMeta, TransportRequestOptionsWithOutMeta, TransportResult } from '@elastic/transport';
2
2
  import * as T from '../types';
3
- import * as TB from '../typesWithBodyKey';
4
3
  interface That {
5
4
  transport: Transport;
6
5
  }
@@ -9,94 +8,94 @@ export default class Snapshot {
9
8
  constructor(transport: Transport);
10
9
  /**
11
10
  * Clean up the snapshot repository. Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.
12
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clean-up-snapshot-repo-api.html | Elasticsearch API documentation}
11
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html | Elasticsearch API documentation}
13
12
  */
14
- cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCleanupRepositoryResponse>;
15
- cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCleanupRepositoryResponse, unknown>>;
16
- cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCleanupRepositoryResponse>;
13
+ cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCleanupRepositoryResponse>;
14
+ cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCleanupRepositoryResponse, unknown>>;
15
+ cleanupRepository(this: That, params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCleanupRepositoryResponse>;
17
16
  /**
18
17
  * Clone a snapshot. Clone part of all of a snapshot into another snapshot in the same repository.
19
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clone-snapshot-api.html | Elasticsearch API documentation}
18
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/clone-snapshot-api.html | Elasticsearch API documentation}
20
19
  */
21
- clone(this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCloneResponse>;
22
- clone(this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCloneResponse, unknown>>;
23
- clone(this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptions): Promise<T.SnapshotCloneResponse>;
20
+ clone(this: That, params: T.SnapshotCloneRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCloneResponse>;
21
+ clone(this: That, params: T.SnapshotCloneRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCloneResponse, unknown>>;
22
+ clone(this: That, params: T.SnapshotCloneRequest, options?: TransportRequestOptions): Promise<T.SnapshotCloneResponse>;
24
23
  /**
25
24
  * Create a snapshot. Take a snapshot of a cluster or of data streams and indices.
26
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-snapshot-api.html | Elasticsearch API documentation}
25
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/create-snapshot-api.html | Elasticsearch API documentation}
27
26
  */
28
- create(this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCreateResponse>;
29
- create(this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCreateResponse, unknown>>;
30
- create(this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateResponse>;
27
+ create(this: That, params: T.SnapshotCreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCreateResponse>;
28
+ create(this: That, params: T.SnapshotCreateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCreateResponse, unknown>>;
29
+ create(this: That, params: T.SnapshotCreateRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateResponse>;
31
30
  /**
32
- * Create or update a snapshot repository. IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. To register a snapshot repository, the cluster's global metadata must be writeable. Ensure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access.
33
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/modules-snapshots.html | Elasticsearch API documentation}
31
+ * Create or update a snapshot repository. IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters. To register a snapshot repository, the cluster's global metadata must be writeable. Ensure there are no cluster blocks (for example, `cluster.blocks.read_only` and `clsuter.blocks.read_only_allow_delete` settings) that prevent write access. Several options for this API can be specified using a query parameter or a request body parameter. If both parameters are specified, only the query parameter is used.
32
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-snapshot-repo-api.html | Elasticsearch API documentation}
34
33
  */
35
- createRepository(this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCreateRepositoryResponse>;
36
- createRepository(this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCreateRepositoryResponse, unknown>>;
37
- createRepository(this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateRepositoryResponse>;
34
+ createRepository(this: That, params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotCreateRepositoryResponse>;
35
+ createRepository(this: That, params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotCreateRepositoryResponse, unknown>>;
36
+ createRepository(this: That, params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateRepositoryResponse>;
38
37
  /**
39
38
  * Delete snapshots.
40
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-api.html | Elasticsearch API documentation}
39
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-snapshot-api.html | Elasticsearch API documentation}
41
40
  */
42
- delete(this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotDeleteResponse>;
43
- delete(this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotDeleteResponse, unknown>>;
44
- delete(this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteResponse>;
41
+ delete(this: That, params: T.SnapshotDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotDeleteResponse>;
42
+ delete(this: That, params: T.SnapshotDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotDeleteResponse, unknown>>;
43
+ delete(this: That, params: T.SnapshotDeleteRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteResponse>;
45
44
  /**
46
45
  * Delete snapshot repositories. When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots. The snapshots themselves are left untouched and in place.
47
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-snapshot-repo-api.html | Elasticsearch API documentation}
46
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-snapshot-repo-api.html | Elasticsearch API documentation}
48
47
  */
49
- deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotDeleteRepositoryResponse>;
50
- deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotDeleteRepositoryResponse, unknown>>;
51
- deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteRepositoryResponse>;
48
+ deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotDeleteRepositoryResponse>;
49
+ deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotDeleteRepositoryResponse, unknown>>;
50
+ deleteRepository(this: That, params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteRepositoryResponse>;
52
51
  /**
53
- * Get snapshot information.
54
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-api.html | Elasticsearch API documentation}
52
+ * Get snapshot information. NOTE: The `after` parameter and `next` field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots. It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration. Snapshots concurrently created may be seen during an iteration.
53
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-snapshot-api.html | Elasticsearch API documentation}
55
54
  */
56
- get(this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotGetResponse>;
57
- get(this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotGetResponse, unknown>>;
58
- get(this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetResponse>;
55
+ get(this: That, params: T.SnapshotGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotGetResponse>;
56
+ get(this: That, params: T.SnapshotGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotGetResponse, unknown>>;
57
+ get(this: That, params: T.SnapshotGetRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetResponse>;
59
58
  /**
60
59
  * Get snapshot repository information.
61
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-repo-api.html | Elasticsearch API documentation}
60
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-snapshot-repo-api.html | Elasticsearch API documentation}
62
61
  */
63
- getRepository(this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotGetRepositoryResponse>;
64
- getRepository(this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotGetRepositoryResponse, unknown>>;
65
- getRepository(this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetRepositoryResponse>;
62
+ getRepository(this: That, params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotGetRepositoryResponse>;
63
+ getRepository(this: That, params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotGetRepositoryResponse, unknown>>;
64
+ getRepository(this: That, params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetRepositoryResponse>;
66
65
  /**
67
66
  * Analyze a snapshot repository. Analyze the performance characteristics and any incorrect behaviour found in a repository. The response exposes implementation details of the analysis which may change from version to version. The response body format is therefore not considered stable and may be different in newer versions. There are a large number of third-party storage systems available, not all of which are suitable for use as a snapshot repository by Elasticsearch. Some storage systems behave incorrectly, or perform poorly, especially when accessed concurrently by multiple clients as the nodes of an Elasticsearch cluster do. This API performs a collection of read and write operations on your repository which are designed to detect incorrect behaviour and to measure the performance characteristics of your storage system. The default values for the parameters are deliberately low to reduce the impact of running an analysis inadvertently and to provide a sensible starting point for your investigations. Run your first analysis with the default parameter values to check for simple problems. If successful, run a sequence of increasingly large analyses until you encounter a failure or you reach a `blob_count` of at least `2000`, a `max_blob_size` of at least `2gb`, a `max_total_data_size` of at least `1tb`, and a `register_operation_count` of at least `100`. Always specify a generous timeout, possibly `1h` or longer, to allow time for each analysis to run to completion. Perform the analyses using a multi-node cluster of a similar size to your production cluster so that it can detect any problems that only arise when the repository is accessed by many nodes at once. If the analysis fails, Elasticsearch detected that your repository behaved unexpectedly. This usually means you are using a third-party storage system with an incorrect or incompatible implementation of the API it claims to support. If so, this storage system is not suitable for use as a snapshot repository. You will need to work with the supplier of your storage system to address the incompatibilities that Elasticsearch detects. If the analysis is successful, the API returns details of the testing process, optionally including how long each operation took. You can use this information to determine the performance of your storage system. If any operation fails or returns an incorrect result, the API returns an error. If the API returns an error, it may not have removed all the data it wrote to the repository. The error will indicate the location of any leftover data and this path is also recorded in the Elasticsearch logs. You should verify that this location has been cleaned up correctly. If there is still leftover data at the specified location, you should manually remove it. If the connection from your client to Elasticsearch is closed while the client is waiting for the result of the analysis, the test is cancelled. Some clients are configured to close their connection if no response is received within a certain timeout. An analysis takes a long time to complete so you might need to relax any such client-side timeouts. On cancellation the analysis attempts to clean up the data it was writing, but it may not be able to remove it all. The path to the leftover data is recorded in the Elasticsearch logs. You should verify that this location has been cleaned up correctly. If there is still leftover data at the specified location, you should manually remove it. If the analysis is successful then it detected no incorrect behaviour, but this does not mean that correct behaviour is guaranteed. The analysis attempts to detect common bugs but it does not offer 100% coverage. Additionally, it does not test the following: * Your repository must perform durable writes. Once a blob has been written it must remain in place until it is deleted, even after a power loss or similar disaster. * Your repository must not suffer from silent data corruption. Once a blob has been written, its contents must remain unchanged until it is deliberately modified or deleted. * Your repository must behave correctly even if connectivity from the cluster is disrupted. Reads and writes may fail in this case, but they must not return incorrect results. IMPORTANT: An analysis writes a substantial amount of data to your repository and then reads it back again. This consumes bandwidth on the network between the cluster and the repository, and storage space and I/O bandwidth on the repository itself. You must ensure this load does not affect other users of these systems. Analyses respect the repository settings `max_snapshot_bytes_per_sec` and `max_restore_bytes_per_sec` if available and the cluster setting `indices.recovery.max_bytes_per_sec` which you can use to limit the bandwidth they consume. NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. NOTE: Different versions of Elasticsearch may perform different checks for repository compatibility, with newer versions typically being stricter than older ones. A storage system that passes repository analysis with one version of Elasticsearch may fail with a different version. This indicates it behaves incorrectly in ways that the former version did not detect. You must work with the supplier of your storage system to address the incompatibilities detected by the repository analysis API in any version of Elasticsearch. NOTE: This API may not work correctly in a mixed-version cluster. *Implementation details* NOTE: This section of documentation describes how the repository analysis API works in this version of Elasticsearch, but you should expect the implementation to vary between versions. The request parameters and response format depend on details of the implementation so may also be different in newer versions. The analysis comprises a number of blob-level tasks, as set by the `blob_count` parameter and a number of compare-and-exchange operations on linearizable registers, as set by the `register_operation_count` parameter. These tasks are distributed over the data and master-eligible nodes in the cluster for execution. For most blob-level tasks, the executing node first writes a blob to the repository and then instructs some of the other nodes in the cluster to attempt to read the data it just wrote. The size of the blob is chosen randomly, according to the `max_blob_size` and `max_total_data_size` parameters. If any of these reads fails then the repository does not implement the necessary read-after-write semantics that Elasticsearch requires. For some blob-level tasks, the executing node will instruct some of its peers to attempt to read the data before the writing process completes. These reads are permitted to fail, but must not return partial data. If any read returns partial data then the repository does not implement the necessary atomicity semantics that Elasticsearch requires. For some blob-level tasks, the executing node will overwrite the blob while its peers are reading it. In this case the data read may come from either the original or the overwritten blob, but the read operation must not return partial data or a mix of data from the two blobs. If any of these reads returns partial data or a mix of the two blobs then the repository does not implement the necessary atomicity semantics that Elasticsearch requires for overwrites. The executing node will use a variety of different methods to write the blob. For instance, where applicable, it will use both single-part and multi-part uploads. Similarly, the reading nodes will use a variety of different methods to read the data back again. For instance they may read the entire blob from start to end or may read only a subset of the data. For some blob-level tasks, the executing node will cancel the write before it is complete. In this case, it still instructs some of the other nodes in the cluster to attempt to read the blob but all of these reads must fail to find the blob. Linearizable registers are special blobs that Elasticsearch manipulates using an atomic compare-and-exchange operation. This operation ensures correct and strongly-consistent behavior even when the blob is accessed by multiple nodes at the same time. The detailed implementation of the compare-and-exchange operation on linearizable registers varies by repository type. Repository analysis verifies that that uncontended compare-and-exchange operations on a linearizable register blob always succeed. Repository analysis also verifies that contended operations either succeed or report the contention but do not return incorrect results. If an operation fails due to contention, Elasticsearch retries the operation until it succeeds. Most of the compare-and-exchange operations performed by repository analysis atomically increment a counter which is represented as an 8-byte blob. Some operations also verify the behavior on small blobs with sizes other than 8 bytes.
68
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/repo-analysis-api.html | Elasticsearch API documentation}
67
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/repo-analysis-api.html | Elasticsearch API documentation}
69
68
  */
70
- repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest | TB.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRepositoryAnalyzeResponse>;
71
- repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest | TB.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRepositoryAnalyzeResponse, unknown>>;
72
- repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest | TB.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptions): Promise<T.SnapshotRepositoryAnalyzeResponse>;
69
+ repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRepositoryAnalyzeResponse>;
70
+ repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRepositoryAnalyzeResponse, unknown>>;
71
+ repositoryAnalyze(this: That, params: T.SnapshotRepositoryAnalyzeRequest, options?: TransportRequestOptions): Promise<T.SnapshotRepositoryAnalyzeResponse>;
73
72
  /**
74
- * Verify the repository integrity. Verify the integrity of the contents of a snapshot repository. This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail. If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity. Until you do so: * It may not be possible to restore some snapshots from this repository. * Searchable snapshots may report errors when searched or may have unassigned shards. * Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored. * Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk. * Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents. If the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage. The only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred. You must also identify what caused the damage and take action to prevent it from happening again. If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations. In some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository. Avoid all operations which write to the repository while the verify repository integrity API is running. If something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes. It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting. NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. NOTE: This API may not work correctly in a mixed-version cluster.
75
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-repo-integrity-api.html | Elasticsearch API documentation}
73
+ * Verify the repository integrity. Verify the integrity of the contents of a snapshot repository. This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail. If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its `read_only` option to `true`, and use this API to verify its integrity. Until you do so: * It may not be possible to restore some snapshots from this repository. * Searchable snapshots may report errors when searched or may have unassigned shards. * Taking snapshots into this repository may fail or may appear to succeed but have created a snapshot which cannot be restored. * Deleting snapshots from this repository may fail or may appear to succeed but leave the underlying data on disk. * Continuing to write to the repository while it is in an invalid state may causing additional damage to its contents. If the API finds any problems with the integrity of the contents of your repository, Elasticsearch will not be able to repair the damage. The only way to bring the repository back into a fully working state after its contents have been damaged is by restoring its contents from a repository backup which was taken before the damage occurred. You must also identify what caused the damage and take action to prevent it from happening again. If you cannot restore a repository backup, register a new repository and use this for all future snapshot operations. In some cases it may be possible to recover some of the contents of a damaged repository, either by restoring as many of its snapshots as needed and taking new snapshots of the restored data, or by using the reindex API to copy data from any searchable snapshots mounted from the damaged repository. Avoid all operations which write to the repository while the verify repository integrity API is running. If something changes the repository contents while an integrity verification is running then Elasticsearch may incorrectly report having detected some anomalies in its contents due to the concurrent writes. It may also incorrectly fail to report some anomalies that the concurrent writes prevented it from detecting. NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions. NOTE: This API may not work correctly in a mixed-version cluster. The default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster. For instance, by default it will only use at most half of the `snapshot_meta` threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool. If you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster. For large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API. The response exposes implementation details of the analysis which may change from version to version. The response body format is therefore not considered stable and may be different in newer versions.
74
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/verify-repo-integrity-api.html | Elasticsearch API documentation}
76
75
  */
77
- repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRepositoryVerifyIntegrityResponse>;
78
- repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRepositoryVerifyIntegrityResponse, unknown>>;
79
- repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest | TB.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptions): Promise<T.SnapshotRepositoryVerifyIntegrityResponse>;
76
+ repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRepositoryVerifyIntegrityResponse>;
77
+ repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRepositoryVerifyIntegrityResponse, unknown>>;
78
+ repositoryVerifyIntegrity(this: That, params: T.SnapshotRepositoryVerifyIntegrityRequest, options?: TransportRequestOptions): Promise<T.SnapshotRepositoryVerifyIntegrityResponse>;
80
79
  /**
81
80
  * Restore a snapshot. Restore a snapshot of a cluster or data streams and indices. You can restore a snapshot only to a running cluster with an elected master node. The snapshot repository must be registered and available to the cluster. The snapshot and cluster versions must be compatible. To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks. Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API: ``` GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream ``` If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices. If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.
82
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/restore-snapshot-api.html | Elasticsearch API documentation}
81
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/restore-snapshot-api.html | Elasticsearch API documentation}
83
82
  */
84
- restore(this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRestoreResponse>;
85
- restore(this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRestoreResponse, unknown>>;
86
- restore(this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptions): Promise<T.SnapshotRestoreResponse>;
83
+ restore(this: That, params: T.SnapshotRestoreRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotRestoreResponse>;
84
+ restore(this: That, params: T.SnapshotRestoreRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotRestoreResponse, unknown>>;
85
+ restore(this: That, params: T.SnapshotRestoreRequest, options?: TransportRequestOptions): Promise<T.SnapshotRestoreResponse>;
87
86
  /**
88
- * Get the snapshot status. Get a detailed description of the current state for each shard participating in the snapshot. Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. The API requires a read from the repository for each shard in each snapshot. For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). Depending on the latency of your storage, such requests can take an extremely long time to return results. These requests can also tax machine resources and, when using cloud storage, incur high processing costs.
89
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-snapshot-status-api.html | Elasticsearch API documentation}
87
+ * Get the snapshot status. Get a detailed description of the current state for each shard participating in the snapshot. Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. If you omit the `<snapshot>` request path parameter, the request retrieves information only for currently running snapshots. This usage is preferred. If needed, you can specify `<repository>` and `<snapshot>` to retrieve information for specific snapshots, even if they're not currently running. WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. The API requires a read from the repository for each shard in each snapshot. For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). Depending on the latency of your storage, such requests can take an extremely long time to return results. These requests can also tax machine resources and, when using cloud storage, incur high processing costs.
88
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-snapshot-status-api.html | Elasticsearch API documentation}
90
89
  */
91
- status(this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotStatusResponse>;
92
- status(this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotStatusResponse, unknown>>;
93
- status(this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptions): Promise<T.SnapshotStatusResponse>;
90
+ status(this: That, params?: T.SnapshotStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotStatusResponse>;
91
+ status(this: That, params?: T.SnapshotStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotStatusResponse, unknown>>;
92
+ status(this: That, params?: T.SnapshotStatusRequest, options?: TransportRequestOptions): Promise<T.SnapshotStatusResponse>;
94
93
  /**
95
94
  * Verify a snapshot repository. Check for common misconfigurations in a snapshot repository.
96
- * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.17/verify-snapshot-repo-api.html | Elasticsearch API documentation}
95
+ * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/verify-snapshot-repo-api.html | Elasticsearch API documentation}
97
96
  */
98
- verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotVerifyRepositoryResponse>;
99
- verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotVerifyRepositoryResponse, unknown>>;
100
- verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotVerifyRepositoryResponse>;
97
+ verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SnapshotVerifyRepositoryResponse>;
98
+ verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SnapshotVerifyRepositoryResponse, unknown>>;
99
+ verifyRepository(this: That, params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotVerifyRepositoryResponse>;
101
100
  }
102
101
  export {};
@@ -30,13 +30,23 @@ class Snapshot {
30
30
  }
31
31
  async cleanupRepository(params, options) {
32
32
  const acceptedPath = ['name'];
33
- const querystring = {};
34
- const body = undefined;
33
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
34
+ const querystring = userQuery != null ? { ...userQuery } : {};
35
+ let body;
36
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
37
+ if (userBody != null) {
38
+ if (typeof userBody === 'string') {
39
+ body = userBody;
40
+ }
41
+ else {
42
+ body = { ...userBody };
43
+ }
44
+ }
35
45
  for (const key in params) {
36
46
  if (acceptedPath.includes(key)) {
37
47
  continue;
38
48
  }
39
- else if (key !== 'body') {
49
+ else if (key !== 'body' && key !== 'querystring') {
40
50
  // @ts-expect-error
41
51
  querystring[key] = params[key];
42
52
  }
@@ -54,15 +64,17 @@ class Snapshot {
54
64
  async clone(params, options) {
55
65
  const acceptedPath = ['repository', 'snapshot', 'target_snapshot'];
56
66
  const acceptedBody = ['indices'];
57
- const querystring = {};
58
- // @ts-expect-error
59
- const userBody = params === null || params === void 0 ? void 0 : params.body;
67
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
68
+ const querystring = userQuery != null ? { ...userQuery } : {};
60
69
  let body;
61
- if (typeof userBody === 'string') {
62
- body = userBody;
63
- }
64
- else {
65
- body = userBody != null ? { ...userBody } : undefined;
70
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
71
+ if (userBody != null) {
72
+ if (typeof userBody === 'string') {
73
+ body = userBody;
74
+ }
75
+ else {
76
+ body = { ...userBody };
77
+ }
66
78
  }
67
79
  for (const key in params) {
68
80
  if (acceptedBody.includes(key)) {
@@ -73,7 +85,7 @@ class Snapshot {
73
85
  else if (acceptedPath.includes(key)) {
74
86
  continue;
75
87
  }
76
- else if (key !== 'body') {
88
+ else if (key !== 'body' && key !== 'querystring') {
77
89
  // @ts-expect-error
78
90
  querystring[key] = params[key];
79
91
  }
@@ -92,16 +104,18 @@ class Snapshot {
92
104
  }
93
105
  async create(params, options) {
94
106
  const acceptedPath = ['repository', 'snapshot'];
95
- const acceptedBody = ['ignore_unavailable', 'include_global_state', 'indices', 'feature_states', 'metadata', 'partial'];
96
- const querystring = {};
97
- // @ts-expect-error
98
- const userBody = params === null || params === void 0 ? void 0 : params.body;
107
+ const acceptedBody = ['expand_wildcards', 'feature_states', 'ignore_unavailable', 'include_global_state', 'indices', 'metadata', 'partial'];
108
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
109
+ const querystring = userQuery != null ? { ...userQuery } : {};
99
110
  let body;
100
- if (typeof userBody === 'string') {
101
- body = userBody;
102
- }
103
- else {
104
- body = userBody != null ? { ...userBody } : undefined;
111
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
112
+ if (userBody != null) {
113
+ if (typeof userBody === 'string') {
114
+ body = userBody;
115
+ }
116
+ else {
117
+ body = { ...userBody };
118
+ }
105
119
  }
106
120
  for (const key in params) {
107
121
  if (acceptedBody.includes(key)) {
@@ -112,7 +126,7 @@ class Snapshot {
112
126
  else if (acceptedPath.includes(key)) {
113
127
  continue;
114
128
  }
115
- else if (key !== 'body') {
129
+ else if (key !== 'body' && key !== 'querystring') {
116
130
  // @ts-expect-error
117
131
  querystring[key] = params[key];
118
132
  }
@@ -132,8 +146,8 @@ class Snapshot {
132
146
  var _a;
133
147
  const acceptedPath = ['name'];
134
148
  const acceptedBody = ['repository'];
135
- const querystring = {};
136
- // @ts-expect-error
149
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
150
+ const querystring = userQuery != null ? { ...userQuery } : {};
137
151
  let body = (_a = params.body) !== null && _a !== void 0 ? _a : undefined;
138
152
  for (const key in params) {
139
153
  if (acceptedBody.includes(key)) {
@@ -143,7 +157,7 @@ class Snapshot {
143
157
  else if (acceptedPath.includes(key)) {
144
158
  continue;
145
159
  }
146
- else if (key !== 'body') {
160
+ else if (key !== 'body' && key !== 'querystring') {
147
161
  // @ts-expect-error
148
162
  querystring[key] = params[key];
149
163
  }
@@ -160,13 +174,23 @@ class Snapshot {
160
174
  }
161
175
  async delete(params, options) {
162
176
  const acceptedPath = ['repository', 'snapshot'];
163
- const querystring = {};
164
- const body = undefined;
177
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
178
+ const querystring = userQuery != null ? { ...userQuery } : {};
179
+ let body;
180
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
181
+ if (userBody != null) {
182
+ if (typeof userBody === 'string') {
183
+ body = userBody;
184
+ }
185
+ else {
186
+ body = { ...userBody };
187
+ }
188
+ }
165
189
  for (const key in params) {
166
190
  if (acceptedPath.includes(key)) {
167
191
  continue;
168
192
  }
169
- else if (key !== 'body') {
193
+ else if (key !== 'body' && key !== 'querystring') {
170
194
  // @ts-expect-error
171
195
  querystring[key] = params[key];
172
196
  }
@@ -184,13 +208,23 @@ class Snapshot {
184
208
  }
185
209
  async deleteRepository(params, options) {
186
210
  const acceptedPath = ['name'];
187
- const querystring = {};
188
- const body = undefined;
211
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
212
+ const querystring = userQuery != null ? { ...userQuery } : {};
213
+ let body;
214
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
215
+ if (userBody != null) {
216
+ if (typeof userBody === 'string') {
217
+ body = userBody;
218
+ }
219
+ else {
220
+ body = { ...userBody };
221
+ }
222
+ }
189
223
  for (const key in params) {
190
224
  if (acceptedPath.includes(key)) {
191
225
  continue;
192
226
  }
193
- else if (key !== 'body') {
227
+ else if (key !== 'body' && key !== 'querystring') {
194
228
  // @ts-expect-error
195
229
  querystring[key] = params[key];
196
230
  }
@@ -207,13 +241,23 @@ class Snapshot {
207
241
  }
208
242
  async get(params, options) {
209
243
  const acceptedPath = ['repository', 'snapshot'];
210
- const querystring = {};
211
- const body = undefined;
244
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
245
+ const querystring = userQuery != null ? { ...userQuery } : {};
246
+ let body;
247
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
248
+ if (userBody != null) {
249
+ if (typeof userBody === 'string') {
250
+ body = userBody;
251
+ }
252
+ else {
253
+ body = { ...userBody };
254
+ }
255
+ }
212
256
  for (const key in params) {
213
257
  if (acceptedPath.includes(key)) {
214
258
  continue;
215
259
  }
216
- else if (key !== 'body') {
260
+ else if (key !== 'body' && key !== 'querystring') {
217
261
  // @ts-expect-error
218
262
  querystring[key] = params[key];
219
263
  }
@@ -231,14 +275,24 @@ class Snapshot {
231
275
  }
232
276
  async getRepository(params, options) {
233
277
  const acceptedPath = ['name'];
234
- const querystring = {};
235
- const body = undefined;
278
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
279
+ const querystring = userQuery != null ? { ...userQuery } : {};
280
+ let body;
281
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
282
+ if (userBody != null) {
283
+ if (typeof userBody === 'string') {
284
+ body = userBody;
285
+ }
286
+ else {
287
+ body = { ...userBody };
288
+ }
289
+ }
236
290
  params = params !== null && params !== void 0 ? params : {};
237
291
  for (const key in params) {
238
292
  if (acceptedPath.includes(key)) {
239
293
  continue;
240
294
  }
241
- else if (key !== 'body') {
295
+ else if (key !== 'body' && key !== 'querystring') {
242
296
  // @ts-expect-error
243
297
  querystring[key] = params[key];
244
298
  }
@@ -263,13 +317,23 @@ class Snapshot {
263
317
  }
264
318
  async repositoryAnalyze(params, options) {
265
319
  const acceptedPath = ['name'];
266
- const querystring = {};
267
- const body = undefined;
320
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
321
+ const querystring = userQuery != null ? { ...userQuery } : {};
322
+ let body;
323
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
324
+ if (userBody != null) {
325
+ if (typeof userBody === 'string') {
326
+ body = userBody;
327
+ }
328
+ else {
329
+ body = { ...userBody };
330
+ }
331
+ }
268
332
  for (const key in params) {
269
333
  if (acceptedPath.includes(key)) {
270
334
  continue;
271
335
  }
272
- else if (key !== 'body') {
336
+ else if (key !== 'body' && key !== 'querystring') {
273
337
  // @ts-expect-error
274
338
  querystring[key] = params[key];
275
339
  }
@@ -286,13 +350,23 @@ class Snapshot {
286
350
  }
287
351
  async repositoryVerifyIntegrity(params, options) {
288
352
  const acceptedPath = ['name'];
289
- const querystring = {};
290
- const body = undefined;
353
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
354
+ const querystring = userQuery != null ? { ...userQuery } : {};
355
+ let body;
356
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
357
+ if (userBody != null) {
358
+ if (typeof userBody === 'string') {
359
+ body = userBody;
360
+ }
361
+ else {
362
+ body = { ...userBody };
363
+ }
364
+ }
291
365
  for (const key in params) {
292
366
  if (acceptedPath.includes(key)) {
293
367
  continue;
294
368
  }
295
- else if (key !== 'body') {
369
+ else if (key !== 'body' && key !== 'querystring') {
296
370
  // @ts-expect-error
297
371
  querystring[key] = params[key];
298
372
  }
@@ -310,15 +384,17 @@ class Snapshot {
310
384
  async restore(params, options) {
311
385
  const acceptedPath = ['repository', 'snapshot'];
312
386
  const acceptedBody = ['feature_states', 'ignore_index_settings', 'ignore_unavailable', 'include_aliases', 'include_global_state', 'index_settings', 'indices', 'partial', 'rename_pattern', 'rename_replacement'];
313
- const querystring = {};
314
- // @ts-expect-error
315
- const userBody = params === null || params === void 0 ? void 0 : params.body;
387
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
388
+ const querystring = userQuery != null ? { ...userQuery } : {};
316
389
  let body;
317
- if (typeof userBody === 'string') {
318
- body = userBody;
319
- }
320
- else {
321
- body = userBody != null ? { ...userBody } : undefined;
390
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
391
+ if (userBody != null) {
392
+ if (typeof userBody === 'string') {
393
+ body = userBody;
394
+ }
395
+ else {
396
+ body = { ...userBody };
397
+ }
322
398
  }
323
399
  for (const key in params) {
324
400
  if (acceptedBody.includes(key)) {
@@ -329,7 +405,7 @@ class Snapshot {
329
405
  else if (acceptedPath.includes(key)) {
330
406
  continue;
331
407
  }
332
- else if (key !== 'body') {
408
+ else if (key !== 'body' && key !== 'querystring') {
333
409
  // @ts-expect-error
334
410
  querystring[key] = params[key];
335
411
  }
@@ -347,14 +423,24 @@ class Snapshot {
347
423
  }
348
424
  async status(params, options) {
349
425
  const acceptedPath = ['repository', 'snapshot'];
350
- const querystring = {};
351
- const body = undefined;
426
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
427
+ const querystring = userQuery != null ? { ...userQuery } : {};
428
+ let body;
429
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
430
+ if (userBody != null) {
431
+ if (typeof userBody === 'string') {
432
+ body = userBody;
433
+ }
434
+ else {
435
+ body = { ...userBody };
436
+ }
437
+ }
352
438
  params = params !== null && params !== void 0 ? params : {};
353
439
  for (const key in params) {
354
440
  if (acceptedPath.includes(key)) {
355
441
  continue;
356
442
  }
357
- else if (key !== 'body') {
443
+ else if (key !== 'body' && key !== 'querystring') {
358
444
  // @ts-expect-error
359
445
  querystring[key] = params[key];
360
446
  }
@@ -384,13 +470,23 @@ class Snapshot {
384
470
  }
385
471
  async verifyRepository(params, options) {
386
472
  const acceptedPath = ['name'];
387
- const querystring = {};
388
- const body = undefined;
473
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
474
+ const querystring = userQuery != null ? { ...userQuery } : {};
475
+ let body;
476
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
477
+ if (userBody != null) {
478
+ if (typeof userBody === 'string') {
479
+ body = userBody;
480
+ }
481
+ else {
482
+ body = { ...userBody };
483
+ }
484
+ }
389
485
  for (const key in params) {
390
486
  if (acceptedPath.includes(key)) {
391
487
  continue;
392
488
  }
393
- else if (key !== 'body') {
489
+ else if (key !== 'body' && key !== 'querystring') {
394
490
  // @ts-expect-error
395
491
  querystring[key] = params[key];
396
492
  }