@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
@@ -30,14 +30,24 @@ class Cat {
30
30
  }
31
31
  async aliases(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
  params = params !== null && params !== void 0 ? params : {};
36
46
  for (const key in params) {
37
47
  if (acceptedPath.includes(key)) {
38
48
  continue;
39
49
  }
40
- else if (key !== 'body') {
50
+ else if (key !== 'body' && key !== 'querystring') {
41
51
  // @ts-expect-error
42
52
  querystring[key] = params[key];
43
53
  }
@@ -62,14 +72,24 @@ class Cat {
62
72
  }
63
73
  async allocation(params, options) {
64
74
  const acceptedPath = ['node_id'];
65
- const querystring = {};
66
- const body = undefined;
75
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
76
+ const querystring = userQuery != null ? { ...userQuery } : {};
77
+ let body;
78
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
79
+ if (userBody != null) {
80
+ if (typeof userBody === 'string') {
81
+ body = userBody;
82
+ }
83
+ else {
84
+ body = { ...userBody };
85
+ }
86
+ }
67
87
  params = params !== null && params !== void 0 ? params : {};
68
88
  for (const key in params) {
69
89
  if (acceptedPath.includes(key)) {
70
90
  continue;
71
91
  }
72
- else if (key !== 'body') {
92
+ else if (key !== 'body' && key !== 'querystring') {
73
93
  // @ts-expect-error
74
94
  querystring[key] = params[key];
75
95
  }
@@ -94,14 +114,24 @@ class Cat {
94
114
  }
95
115
  async componentTemplates(params, options) {
96
116
  const acceptedPath = ['name'];
97
- const querystring = {};
98
- const body = undefined;
117
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
118
+ const querystring = userQuery != null ? { ...userQuery } : {};
119
+ let body;
120
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
121
+ if (userBody != null) {
122
+ if (typeof userBody === 'string') {
123
+ body = userBody;
124
+ }
125
+ else {
126
+ body = { ...userBody };
127
+ }
128
+ }
99
129
  params = params !== null && params !== void 0 ? params : {};
100
130
  for (const key in params) {
101
131
  if (acceptedPath.includes(key)) {
102
132
  continue;
103
133
  }
104
- else if (key !== 'body') {
134
+ else if (key !== 'body' && key !== 'querystring') {
105
135
  // @ts-expect-error
106
136
  querystring[key] = params[key];
107
137
  }
@@ -126,14 +156,24 @@ class Cat {
126
156
  }
127
157
  async count(params, options) {
128
158
  const acceptedPath = ['index'];
129
- const querystring = {};
130
- const body = undefined;
159
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
160
+ const querystring = userQuery != null ? { ...userQuery } : {};
161
+ let body;
162
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
163
+ if (userBody != null) {
164
+ if (typeof userBody === 'string') {
165
+ body = userBody;
166
+ }
167
+ else {
168
+ body = { ...userBody };
169
+ }
170
+ }
131
171
  params = params !== null && params !== void 0 ? params : {};
132
172
  for (const key in params) {
133
173
  if (acceptedPath.includes(key)) {
134
174
  continue;
135
175
  }
136
- else if (key !== 'body') {
176
+ else if (key !== 'body' && key !== 'querystring') {
137
177
  // @ts-expect-error
138
178
  querystring[key] = params[key];
139
179
  }
@@ -158,14 +198,24 @@ class Cat {
158
198
  }
159
199
  async fielddata(params, options) {
160
200
  const acceptedPath = ['fields'];
161
- const querystring = {};
162
- const body = undefined;
201
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
202
+ const querystring = userQuery != null ? { ...userQuery } : {};
203
+ let body;
204
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
205
+ if (userBody != null) {
206
+ if (typeof userBody === 'string') {
207
+ body = userBody;
208
+ }
209
+ else {
210
+ body = { ...userBody };
211
+ }
212
+ }
163
213
  params = params !== null && params !== void 0 ? params : {};
164
214
  for (const key in params) {
165
215
  if (acceptedPath.includes(key)) {
166
216
  continue;
167
217
  }
168
- else if (key !== 'body') {
218
+ else if (key !== 'body' && key !== 'querystring') {
169
219
  // @ts-expect-error
170
220
  querystring[key] = params[key];
171
221
  }
@@ -190,14 +240,24 @@ class Cat {
190
240
  }
191
241
  async health(params, options) {
192
242
  const acceptedPath = [];
193
- const querystring = {};
194
- const body = undefined;
243
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
244
+ const querystring = userQuery != null ? { ...userQuery } : {};
245
+ let body;
246
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
247
+ if (userBody != null) {
248
+ if (typeof userBody === 'string') {
249
+ body = userBody;
250
+ }
251
+ else {
252
+ body = { ...userBody };
253
+ }
254
+ }
195
255
  params = params !== null && params !== void 0 ? params : {};
196
256
  for (const key in params) {
197
257
  if (acceptedPath.includes(key)) {
198
258
  continue;
199
259
  }
200
- else if (key !== 'body') {
260
+ else if (key !== 'body' && key !== 'querystring') {
201
261
  // @ts-expect-error
202
262
  querystring[key] = params[key];
203
263
  }
@@ -211,14 +271,24 @@ class Cat {
211
271
  }
212
272
  async help(params, options) {
213
273
  const acceptedPath = [];
214
- const querystring = {};
215
- const body = undefined;
274
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
275
+ const querystring = userQuery != null ? { ...userQuery } : {};
276
+ let body;
277
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
278
+ if (userBody != null) {
279
+ if (typeof userBody === 'string') {
280
+ body = userBody;
281
+ }
282
+ else {
283
+ body = { ...userBody };
284
+ }
285
+ }
216
286
  params = params !== null && params !== void 0 ? params : {};
217
287
  for (const key in params) {
218
288
  if (acceptedPath.includes(key)) {
219
289
  continue;
220
290
  }
221
- else if (key !== 'body') {
291
+ else if (key !== 'body' && key !== 'querystring') {
222
292
  // @ts-expect-error
223
293
  querystring[key] = params[key];
224
294
  }
@@ -232,14 +302,24 @@ class Cat {
232
302
  }
233
303
  async indices(params, options) {
234
304
  const acceptedPath = ['index'];
235
- const querystring = {};
236
- const body = undefined;
305
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
306
+ const querystring = userQuery != null ? { ...userQuery } : {};
307
+ let body;
308
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
309
+ if (userBody != null) {
310
+ if (typeof userBody === 'string') {
311
+ body = userBody;
312
+ }
313
+ else {
314
+ body = { ...userBody };
315
+ }
316
+ }
237
317
  params = params !== null && params !== void 0 ? params : {};
238
318
  for (const key in params) {
239
319
  if (acceptedPath.includes(key)) {
240
320
  continue;
241
321
  }
242
- else if (key !== 'body') {
322
+ else if (key !== 'body' && key !== 'querystring') {
243
323
  // @ts-expect-error
244
324
  querystring[key] = params[key];
245
325
  }
@@ -264,14 +344,24 @@ class Cat {
264
344
  }
265
345
  async master(params, options) {
266
346
  const acceptedPath = [];
267
- const querystring = {};
268
- const body = undefined;
347
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
348
+ const querystring = userQuery != null ? { ...userQuery } : {};
349
+ let body;
350
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
351
+ if (userBody != null) {
352
+ if (typeof userBody === 'string') {
353
+ body = userBody;
354
+ }
355
+ else {
356
+ body = { ...userBody };
357
+ }
358
+ }
269
359
  params = params !== null && params !== void 0 ? params : {};
270
360
  for (const key in params) {
271
361
  if (acceptedPath.includes(key)) {
272
362
  continue;
273
363
  }
274
- else if (key !== 'body') {
364
+ else if (key !== 'body' && key !== 'querystring') {
275
365
  // @ts-expect-error
276
366
  querystring[key] = params[key];
277
367
  }
@@ -285,14 +375,24 @@ class Cat {
285
375
  }
286
376
  async mlDataFrameAnalytics(params, options) {
287
377
  const acceptedPath = ['id'];
288
- const querystring = {};
289
- const body = undefined;
378
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
379
+ const querystring = userQuery != null ? { ...userQuery } : {};
380
+ let body;
381
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
382
+ if (userBody != null) {
383
+ if (typeof userBody === 'string') {
384
+ body = userBody;
385
+ }
386
+ else {
387
+ body = { ...userBody };
388
+ }
389
+ }
290
390
  params = params !== null && params !== void 0 ? params : {};
291
391
  for (const key in params) {
292
392
  if (acceptedPath.includes(key)) {
293
393
  continue;
294
394
  }
295
- else if (key !== 'body') {
395
+ else if (key !== 'body' && key !== 'querystring') {
296
396
  // @ts-expect-error
297
397
  querystring[key] = params[key];
298
398
  }
@@ -317,14 +417,24 @@ class Cat {
317
417
  }
318
418
  async mlDatafeeds(params, options) {
319
419
  const acceptedPath = ['datafeed_id'];
320
- const querystring = {};
321
- const body = undefined;
420
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
421
+ const querystring = userQuery != null ? { ...userQuery } : {};
422
+ let body;
423
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
424
+ if (userBody != null) {
425
+ if (typeof userBody === 'string') {
426
+ body = userBody;
427
+ }
428
+ else {
429
+ body = { ...userBody };
430
+ }
431
+ }
322
432
  params = params !== null && params !== void 0 ? params : {};
323
433
  for (const key in params) {
324
434
  if (acceptedPath.includes(key)) {
325
435
  continue;
326
436
  }
327
- else if (key !== 'body') {
437
+ else if (key !== 'body' && key !== 'querystring') {
328
438
  // @ts-expect-error
329
439
  querystring[key] = params[key];
330
440
  }
@@ -349,14 +459,24 @@ class Cat {
349
459
  }
350
460
  async mlJobs(params, options) {
351
461
  const acceptedPath = ['job_id'];
352
- const querystring = {};
353
- const body = undefined;
462
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
463
+ const querystring = userQuery != null ? { ...userQuery } : {};
464
+ let body;
465
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
466
+ if (userBody != null) {
467
+ if (typeof userBody === 'string') {
468
+ body = userBody;
469
+ }
470
+ else {
471
+ body = { ...userBody };
472
+ }
473
+ }
354
474
  params = params !== null && params !== void 0 ? params : {};
355
475
  for (const key in params) {
356
476
  if (acceptedPath.includes(key)) {
357
477
  continue;
358
478
  }
359
- else if (key !== 'body') {
479
+ else if (key !== 'body' && key !== 'querystring') {
360
480
  // @ts-expect-error
361
481
  querystring[key] = params[key];
362
482
  }
@@ -381,14 +501,24 @@ class Cat {
381
501
  }
382
502
  async mlTrainedModels(params, options) {
383
503
  const acceptedPath = ['model_id'];
384
- const querystring = {};
385
- const body = undefined;
504
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
505
+ const querystring = userQuery != null ? { ...userQuery } : {};
506
+ let body;
507
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
508
+ if (userBody != null) {
509
+ if (typeof userBody === 'string') {
510
+ body = userBody;
511
+ }
512
+ else {
513
+ body = { ...userBody };
514
+ }
515
+ }
386
516
  params = params !== null && params !== void 0 ? params : {};
387
517
  for (const key in params) {
388
518
  if (acceptedPath.includes(key)) {
389
519
  continue;
390
520
  }
391
- else if (key !== 'body') {
521
+ else if (key !== 'body' && key !== 'querystring') {
392
522
  // @ts-expect-error
393
523
  querystring[key] = params[key];
394
524
  }
@@ -413,14 +543,24 @@ class Cat {
413
543
  }
414
544
  async nodeattrs(params, options) {
415
545
  const acceptedPath = [];
416
- const querystring = {};
417
- const body = undefined;
546
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
547
+ const querystring = userQuery != null ? { ...userQuery } : {};
548
+ let body;
549
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
550
+ if (userBody != null) {
551
+ if (typeof userBody === 'string') {
552
+ body = userBody;
553
+ }
554
+ else {
555
+ body = { ...userBody };
556
+ }
557
+ }
418
558
  params = params !== null && params !== void 0 ? params : {};
419
559
  for (const key in params) {
420
560
  if (acceptedPath.includes(key)) {
421
561
  continue;
422
562
  }
423
- else if (key !== 'body') {
563
+ else if (key !== 'body' && key !== 'querystring') {
424
564
  // @ts-expect-error
425
565
  querystring[key] = params[key];
426
566
  }
@@ -434,14 +574,24 @@ class Cat {
434
574
  }
435
575
  async nodes(params, options) {
436
576
  const acceptedPath = [];
437
- const querystring = {};
438
- const body = undefined;
577
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
578
+ const querystring = userQuery != null ? { ...userQuery } : {};
579
+ let body;
580
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
581
+ if (userBody != null) {
582
+ if (typeof userBody === 'string') {
583
+ body = userBody;
584
+ }
585
+ else {
586
+ body = { ...userBody };
587
+ }
588
+ }
439
589
  params = params !== null && params !== void 0 ? params : {};
440
590
  for (const key in params) {
441
591
  if (acceptedPath.includes(key)) {
442
592
  continue;
443
593
  }
444
- else if (key !== 'body') {
594
+ else if (key !== 'body' && key !== 'querystring') {
445
595
  // @ts-expect-error
446
596
  querystring[key] = params[key];
447
597
  }
@@ -455,14 +605,24 @@ class Cat {
455
605
  }
456
606
  async pendingTasks(params, options) {
457
607
  const acceptedPath = [];
458
- const querystring = {};
459
- const body = undefined;
608
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
609
+ const querystring = userQuery != null ? { ...userQuery } : {};
610
+ let body;
611
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
612
+ if (userBody != null) {
613
+ if (typeof userBody === 'string') {
614
+ body = userBody;
615
+ }
616
+ else {
617
+ body = { ...userBody };
618
+ }
619
+ }
460
620
  params = params !== null && params !== void 0 ? params : {};
461
621
  for (const key in params) {
462
622
  if (acceptedPath.includes(key)) {
463
623
  continue;
464
624
  }
465
- else if (key !== 'body') {
625
+ else if (key !== 'body' && key !== 'querystring') {
466
626
  // @ts-expect-error
467
627
  querystring[key] = params[key];
468
628
  }
@@ -476,14 +636,24 @@ class Cat {
476
636
  }
477
637
  async plugins(params, options) {
478
638
  const acceptedPath = [];
479
- const querystring = {};
480
- const body = undefined;
639
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
640
+ const querystring = userQuery != null ? { ...userQuery } : {};
641
+ let body;
642
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
643
+ if (userBody != null) {
644
+ if (typeof userBody === 'string') {
645
+ body = userBody;
646
+ }
647
+ else {
648
+ body = { ...userBody };
649
+ }
650
+ }
481
651
  params = params !== null && params !== void 0 ? params : {};
482
652
  for (const key in params) {
483
653
  if (acceptedPath.includes(key)) {
484
654
  continue;
485
655
  }
486
- else if (key !== 'body') {
656
+ else if (key !== 'body' && key !== 'querystring') {
487
657
  // @ts-expect-error
488
658
  querystring[key] = params[key];
489
659
  }
@@ -497,14 +667,24 @@ class Cat {
497
667
  }
498
668
  async recovery(params, options) {
499
669
  const acceptedPath = ['index'];
500
- const querystring = {};
501
- const body = undefined;
670
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
671
+ const querystring = userQuery != null ? { ...userQuery } : {};
672
+ let body;
673
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
674
+ if (userBody != null) {
675
+ if (typeof userBody === 'string') {
676
+ body = userBody;
677
+ }
678
+ else {
679
+ body = { ...userBody };
680
+ }
681
+ }
502
682
  params = params !== null && params !== void 0 ? params : {};
503
683
  for (const key in params) {
504
684
  if (acceptedPath.includes(key)) {
505
685
  continue;
506
686
  }
507
- else if (key !== 'body') {
687
+ else if (key !== 'body' && key !== 'querystring') {
508
688
  // @ts-expect-error
509
689
  querystring[key] = params[key];
510
690
  }
@@ -529,14 +709,24 @@ class Cat {
529
709
  }
530
710
  async repositories(params, options) {
531
711
  const acceptedPath = [];
532
- const querystring = {};
533
- const body = undefined;
712
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
713
+ const querystring = userQuery != null ? { ...userQuery } : {};
714
+ let body;
715
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
716
+ if (userBody != null) {
717
+ if (typeof userBody === 'string') {
718
+ body = userBody;
719
+ }
720
+ else {
721
+ body = { ...userBody };
722
+ }
723
+ }
534
724
  params = params !== null && params !== void 0 ? params : {};
535
725
  for (const key in params) {
536
726
  if (acceptedPath.includes(key)) {
537
727
  continue;
538
728
  }
539
- else if (key !== 'body') {
729
+ else if (key !== 'body' && key !== 'querystring') {
540
730
  // @ts-expect-error
541
731
  querystring[key] = params[key];
542
732
  }
@@ -550,14 +740,24 @@ class Cat {
550
740
  }
551
741
  async segments(params, options) {
552
742
  const acceptedPath = ['index'];
553
- const querystring = {};
554
- const body = undefined;
743
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
744
+ const querystring = userQuery != null ? { ...userQuery } : {};
745
+ let body;
746
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
747
+ if (userBody != null) {
748
+ if (typeof userBody === 'string') {
749
+ body = userBody;
750
+ }
751
+ else {
752
+ body = { ...userBody };
753
+ }
754
+ }
555
755
  params = params !== null && params !== void 0 ? params : {};
556
756
  for (const key in params) {
557
757
  if (acceptedPath.includes(key)) {
558
758
  continue;
559
759
  }
560
- else if (key !== 'body') {
760
+ else if (key !== 'body' && key !== 'querystring') {
561
761
  // @ts-expect-error
562
762
  querystring[key] = params[key];
563
763
  }
@@ -582,14 +782,24 @@ class Cat {
582
782
  }
583
783
  async shards(params, options) {
584
784
  const acceptedPath = ['index'];
585
- const querystring = {};
586
- const body = undefined;
785
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
786
+ const querystring = userQuery != null ? { ...userQuery } : {};
787
+ let body;
788
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
789
+ if (userBody != null) {
790
+ if (typeof userBody === 'string') {
791
+ body = userBody;
792
+ }
793
+ else {
794
+ body = { ...userBody };
795
+ }
796
+ }
587
797
  params = params !== null && params !== void 0 ? params : {};
588
798
  for (const key in params) {
589
799
  if (acceptedPath.includes(key)) {
590
800
  continue;
591
801
  }
592
- else if (key !== 'body') {
802
+ else if (key !== 'body' && key !== 'querystring') {
593
803
  // @ts-expect-error
594
804
  querystring[key] = params[key];
595
805
  }
@@ -614,14 +824,24 @@ class Cat {
614
824
  }
615
825
  async snapshots(params, options) {
616
826
  const acceptedPath = ['repository'];
617
- const querystring = {};
618
- const body = undefined;
827
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
828
+ const querystring = userQuery != null ? { ...userQuery } : {};
829
+ let body;
830
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
831
+ if (userBody != null) {
832
+ if (typeof userBody === 'string') {
833
+ body = userBody;
834
+ }
835
+ else {
836
+ body = { ...userBody };
837
+ }
838
+ }
619
839
  params = params !== null && params !== void 0 ? params : {};
620
840
  for (const key in params) {
621
841
  if (acceptedPath.includes(key)) {
622
842
  continue;
623
843
  }
624
- else if (key !== 'body') {
844
+ else if (key !== 'body' && key !== 'querystring') {
625
845
  // @ts-expect-error
626
846
  querystring[key] = params[key];
627
847
  }
@@ -646,14 +866,24 @@ class Cat {
646
866
  }
647
867
  async tasks(params, options) {
648
868
  const acceptedPath = [];
649
- const querystring = {};
650
- const body = undefined;
869
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
870
+ const querystring = userQuery != null ? { ...userQuery } : {};
871
+ let body;
872
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
873
+ if (userBody != null) {
874
+ if (typeof userBody === 'string') {
875
+ body = userBody;
876
+ }
877
+ else {
878
+ body = { ...userBody };
879
+ }
880
+ }
651
881
  params = params !== null && params !== void 0 ? params : {};
652
882
  for (const key in params) {
653
883
  if (acceptedPath.includes(key)) {
654
884
  continue;
655
885
  }
656
- else if (key !== 'body') {
886
+ else if (key !== 'body' && key !== 'querystring') {
657
887
  // @ts-expect-error
658
888
  querystring[key] = params[key];
659
889
  }
@@ -667,14 +897,24 @@ class Cat {
667
897
  }
668
898
  async templates(params, options) {
669
899
  const acceptedPath = ['name'];
670
- const querystring = {};
671
- const body = undefined;
900
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
901
+ const querystring = userQuery != null ? { ...userQuery } : {};
902
+ let body;
903
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
904
+ if (userBody != null) {
905
+ if (typeof userBody === 'string') {
906
+ body = userBody;
907
+ }
908
+ else {
909
+ body = { ...userBody };
910
+ }
911
+ }
672
912
  params = params !== null && params !== void 0 ? params : {};
673
913
  for (const key in params) {
674
914
  if (acceptedPath.includes(key)) {
675
915
  continue;
676
916
  }
677
- else if (key !== 'body') {
917
+ else if (key !== 'body' && key !== 'querystring') {
678
918
  // @ts-expect-error
679
919
  querystring[key] = params[key];
680
920
  }
@@ -699,14 +939,24 @@ class Cat {
699
939
  }
700
940
  async threadPool(params, options) {
701
941
  const acceptedPath = ['thread_pool_patterns'];
702
- const querystring = {};
703
- const body = undefined;
942
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
943
+ const querystring = userQuery != null ? { ...userQuery } : {};
944
+ let body;
945
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
946
+ if (userBody != null) {
947
+ if (typeof userBody === 'string') {
948
+ body = userBody;
949
+ }
950
+ else {
951
+ body = { ...userBody };
952
+ }
953
+ }
704
954
  params = params !== null && params !== void 0 ? params : {};
705
955
  for (const key in params) {
706
956
  if (acceptedPath.includes(key)) {
707
957
  continue;
708
958
  }
709
- else if (key !== 'body') {
959
+ else if (key !== 'body' && key !== 'querystring') {
710
960
  // @ts-expect-error
711
961
  querystring[key] = params[key];
712
962
  }
@@ -731,14 +981,24 @@ class Cat {
731
981
  }
732
982
  async transforms(params, options) {
733
983
  const acceptedPath = ['transform_id'];
734
- const querystring = {};
735
- const body = undefined;
984
+ const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
985
+ const querystring = userQuery != null ? { ...userQuery } : {};
986
+ let body;
987
+ const userBody = params === null || params === void 0 ? void 0 : params.body;
988
+ if (userBody != null) {
989
+ if (typeof userBody === 'string') {
990
+ body = userBody;
991
+ }
992
+ else {
993
+ body = { ...userBody };
994
+ }
995
+ }
736
996
  params = params !== null && params !== void 0 ? params : {};
737
997
  for (const key in params) {
738
998
  if (acceptedPath.includes(key)) {
739
999
  continue;
740
1000
  }
741
- else if (key !== 'body') {
1001
+ else if (key !== 'body' && key !== 'querystring') {
742
1002
  // @ts-expect-error
743
1003
  querystring[key] = params[key];
744
1004
  }