@elastic/elasticsearch 8.0.0-alpha.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/README.md +13 -62
  2. package/free-report-junit.xml +13 -0
  3. package/index.d.ts +4 -3
  4. package/index.js +31 -3
  5. package/lib/api/api/async_search.js +28 -40
  6. package/lib/api/api/async_search.js.map +1 -1
  7. package/lib/api/api/autoscaling.js +13 -37
  8. package/lib/api/api/autoscaling.js.map +1 -1
  9. package/lib/api/api/bulk.d.ts +3 -3
  10. package/lib/api/api/bulk.js +6 -10
  11. package/lib/api/api/bulk.js.map +1 -1
  12. package/lib/api/api/cat.js +75 -275
  13. package/lib/api/api/cat.js.map +1 -1
  14. package/lib/api/api/ccr.js +79 -127
  15. package/lib/api/api/ccr.js.map +1 -1
  16. package/lib/api/api/clear_scroll.js +13 -7
  17. package/lib/api/api/clear_scroll.js.map +1 -1
  18. package/lib/api/api/close_point_in_time.js +13 -7
  19. package/lib/api/api/close_point_in_time.js.map +1 -1
  20. package/lib/api/api/cluster.js +85 -149
  21. package/lib/api/api/cluster.js.map +1 -1
  22. package/lib/api/api/count.js +13 -7
  23. package/lib/api/api/count.js.map +1 -1
  24. package/lib/api/api/create.js +5 -5
  25. package/lib/api/api/create.js.map +1 -1
  26. package/lib/api/api/dangling_indices.js +9 -33
  27. package/lib/api/api/dangling_indices.js.map +1 -1
  28. package/lib/api/api/delete.js +4 -12
  29. package/lib/api/api/delete.js.map +1 -1
  30. package/lib/api/api/delete_by_query.js +13 -7
  31. package/lib/api/api/delete_by_query.js.map +1 -1
  32. package/lib/api/api/delete_by_query_rethrottle.js +3 -11
  33. package/lib/api/api/delete_by_query_rethrottle.js.map +1 -1
  34. package/lib/api/api/delete_script.js +3 -11
  35. package/lib/api/api/delete_script.js.map +1 -1
  36. package/lib/api/api/enrich.js +25 -51
  37. package/lib/api/api/enrich.js.map +1 -1
  38. package/lib/api/api/eql.js +22 -40
  39. package/lib/api/api/eql.js.map +1 -1
  40. package/lib/api/api/exists.js +3 -11
  41. package/lib/api/api/exists.js.map +1 -1
  42. package/lib/api/api/exists_source.js +4 -12
  43. package/lib/api/api/exists_source.js.map +1 -1
  44. package/lib/api/api/explain.js +13 -7
  45. package/lib/api/api/explain.js.map +1 -1
  46. package/lib/api/api/features.js +6 -22
  47. package/lib/api/api/features.js.map +1 -1
  48. package/lib/api/api/field_caps.js +13 -7
  49. package/lib/api/api/field_caps.js.map +1 -1
  50. package/lib/api/api/fleet.d.ts +9 -3
  51. package/lib/api/api/fleet.js +64 -7
  52. package/lib/api/api/fleet.js.map +1 -1
  53. package/lib/api/api/get.js +3 -11
  54. package/lib/api/api/get.js.map +1 -1
  55. package/lib/api/api/get_script.js +3 -11
  56. package/lib/api/api/get_script.js.map +1 -1
  57. package/lib/api/api/get_script_context.js +3 -11
  58. package/lib/api/api/get_script_context.js.map +1 -1
  59. package/lib/api/api/get_script_languages.js +3 -11
  60. package/lib/api/api/get_script_languages.js.map +1 -1
  61. package/lib/api/api/get_source.js +3 -11
  62. package/lib/api/api/get_source.js.map +1 -1
  63. package/lib/api/api/graph.js +13 -7
  64. package/lib/api/api/graph.js.map +1 -1
  65. package/lib/api/api/ilm.d.ts +3 -3
  66. package/lib/api/api/ilm.js +73 -116
  67. package/lib/api/api/ilm.js.map +1 -1
  68. package/lib/api/api/index.js +4 -4
  69. package/lib/api/api/index.js.map +1 -1
  70. package/lib/api/api/indices.d.ts +9 -6
  71. package/lib/api/api/indices.js +320 -519
  72. package/lib/api/api/indices.js.map +1 -1
  73. package/lib/api/api/info.js +3 -11
  74. package/lib/api/api/info.js.map +1 -1
  75. package/lib/api/api/ingest.js +38 -58
  76. package/lib/api/api/ingest.js.map +1 -1
  77. package/lib/api/api/knn_search.d.ts +10 -0
  78. package/lib/api/api/knn_search.js +53 -0
  79. package/lib/api/api/knn_search.js.map +1 -0
  80. package/lib/api/api/license.d.ts +3 -3
  81. package/lib/api/api/license.js +31 -74
  82. package/lib/api/api/license.js.map +1 -1
  83. package/lib/api/api/logstash.js +10 -26
  84. package/lib/api/api/logstash.js.map +1 -1
  85. package/lib/api/api/mget.js +13 -7
  86. package/lib/api/api/mget.js.map +1 -1
  87. package/lib/api/api/migration.d.ts +6 -0
  88. package/lib/api/api/migration.js +39 -11
  89. package/lib/api/api/migration.js.map +1 -1
  90. package/lib/api/api/ml.d.ts +24 -24
  91. package/lib/api/api/ml.js +601 -626
  92. package/lib/api/api/ml.js.map +1 -1
  93. package/lib/api/api/monitoring.d.ts +3 -3
  94. package/lib/api/api/monitoring.js +4 -4
  95. package/lib/api/api/monitoring.js.map +1 -1
  96. package/lib/api/api/msearch.d.ts +3 -3
  97. package/lib/api/api/msearch.js +4 -4
  98. package/lib/api/api/msearch.js.map +1 -1
  99. package/lib/api/api/msearch_template.d.ts +3 -3
  100. package/lib/api/api/msearch_template.js +4 -4
  101. package/lib/api/api/msearch_template.js.map +1 -1
  102. package/lib/api/api/mtermvectors.js +13 -7
  103. package/lib/api/api/mtermvectors.js.map +1 -1
  104. package/lib/api/api/nodes.d.ts +6 -6
  105. package/lib/api/api/nodes.js +33 -71
  106. package/lib/api/api/nodes.js.map +1 -1
  107. package/lib/api/api/open_point_in_time.js +3 -11
  108. package/lib/api/api/open_point_in_time.js.map +1 -1
  109. package/lib/api/api/ping.js +3 -11
  110. package/lib/api/api/ping.js.map +1 -1
  111. package/lib/api/api/put_script.js +13 -7
  112. package/lib/api/api/put_script.js.map +1 -1
  113. package/lib/api/api/rank_eval.js +13 -7
  114. package/lib/api/api/rank_eval.js.map +1 -1
  115. package/lib/api/api/reindex.js +13 -7
  116. package/lib/api/api/reindex.js.map +1 -1
  117. package/lib/api/api/reindex_rethrottle.js +3 -11
  118. package/lib/api/api/reindex_rethrottle.js.map +1 -1
  119. package/lib/api/api/render_search_template.js +13 -7
  120. package/lib/api/api/render_search_template.js.map +1 -1
  121. package/lib/api/api/rollup.d.ts +3 -3
  122. package/lib/api/api/rollup.js +49 -85
  123. package/lib/api/api/rollup.js.map +1 -1
  124. package/lib/api/api/scripts_painless_execute.js +13 -7
  125. package/lib/api/api/scripts_painless_execute.js.map +1 -1
  126. package/lib/api/api/scroll.d.ts +3 -3
  127. package/lib/api/api/scroll.js +13 -7
  128. package/lib/api/api/scroll.js.map +1 -1
  129. package/lib/api/api/search.d.ts +3 -3
  130. package/lib/api/api/search.js +19 -7
  131. package/lib/api/api/search.js.map +1 -1
  132. package/lib/api/api/search_mvt.js +13 -7
  133. package/lib/api/api/search_mvt.js.map +1 -1
  134. package/lib/api/api/search_shards.js +3 -11
  135. package/lib/api/api/search_shards.js.map +1 -1
  136. package/lib/api/api/search_template.js +13 -7
  137. package/lib/api/api/search_template.js.map +1 -1
  138. package/lib/api/api/searchable_snapshots.d.ts +3 -3
  139. package/lib/api/api/searchable_snapshots.js +23 -38
  140. package/lib/api/api/searchable_snapshots.js.map +1 -1
  141. package/lib/api/api/security.d.ts +27 -27
  142. package/lib/api/api/security.js +311 -401
  143. package/lib/api/api/security.js.map +1 -1
  144. package/lib/api/api/shutdown.js +9 -33
  145. package/lib/api/api/shutdown.js.map +1 -1
  146. package/lib/api/api/slm.js +37 -95
  147. package/lib/api/api/slm.js.map +1 -1
  148. package/lib/api/api/snapshot.js +87 -125
  149. package/lib/api/api/snapshot.js.map +1 -1
  150. package/lib/api/api/sql.d.ts +9 -9
  151. package/lib/api/api/sql.js +51 -51
  152. package/lib/api/api/sql.js.map +1 -1
  153. package/lib/api/api/ssl.js +3 -11
  154. package/lib/api/api/ssl.js.map +1 -1
  155. package/lib/api/api/tasks.js +9 -33
  156. package/lib/api/api/tasks.js.map +1 -1
  157. package/lib/api/api/terms_enum.js +13 -7
  158. package/lib/api/api/terms_enum.js.map +1 -1
  159. package/lib/api/api/termvectors.js +13 -7
  160. package/lib/api/api/termvectors.js.map +1 -1
  161. package/lib/api/api/text_structure.js +4 -4
  162. package/lib/api/api/text_structure.js.map +1 -1
  163. package/lib/api/api/transform.d.ts +3 -0
  164. package/lib/api/api/transform.js +74 -78
  165. package/lib/api/api/transform.js.map +1 -1
  166. package/lib/api/api/update.js +14 -8
  167. package/lib/api/api/update.js.map +1 -1
  168. package/lib/api/api/update_by_query.js +13 -7
  169. package/lib/api/api/update_by_query.js.map +1 -1
  170. package/lib/api/api/update_by_query_rethrottle.js +3 -11
  171. package/lib/api/api/update_by_query_rethrottle.js.map +1 -1
  172. package/lib/api/api/watcher.js +63 -109
  173. package/lib/api/api/watcher.js.map +1 -1
  174. package/lib/api/api/xpack.js +6 -22
  175. package/lib/api/api/xpack.js.map +1 -1
  176. package/lib/api/index.d.ts +2 -0
  177. package/lib/api/index.js +2 -0
  178. package/lib/api/index.js.map +1 -1
  179. package/lib/api/types.d.ts +2945 -1413
  180. package/lib/api/typesWithBodyKey.d.ts +3076 -1437
  181. package/lib/{Client.d.ts → client.d.ts} +3 -4
  182. package/lib/{Client.js → client.js} +11 -6
  183. package/lib/{Client.js.map → client.js.map} +1 -1
  184. package/lib/{Helpers.d.ts → helpers.d.ts} +2 -2
  185. package/lib/{Helpers.js → helpers.js} +2 -4
  186. package/lib/helpers.js.map +1 -0
  187. package/lib/{SniffingTransport.d.ts → sniffingTransport.d.ts} +0 -0
  188. package/lib/{SniffingTransport.js → sniffingTransport.js} +1 -1
  189. package/lib/{SniffingTransport.js.map → sniffingTransport.js.map} +1 -1
  190. package/package.json +3 -3
  191. package/platinum-report-junit.xml +13 -0
  192. package/tsconfig.json +1 -1
  193. package/lib/Helpers.js.map +0 -1
@@ -29,25 +29,17 @@ class Cat {
29
29
  this.transport = transport;
30
30
  }
31
31
  async aliases(params, options) {
32
- var _a;
33
32
  const acceptedPath = ['name'];
34
- const acceptedQuery = ['expand_wildcards', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
35
33
  const querystring = {};
36
- // @ts-expect-error
37
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
34
+ const body = undefined;
38
35
  params = params !== null && params !== void 0 ? params : {};
39
36
  for (const key in params) {
40
- if (acceptedQuery.includes(key)) {
41
- // @ts-expect-error
42
- querystring[key] = params[key];
43
- }
44
- else if (acceptedPath.includes(key)) {
37
+ if (acceptedPath.includes(key)) {
45
38
  continue;
46
39
  }
47
40
  else if (key !== 'body') {
48
- body = body !== null && body !== void 0 ? body : {};
49
41
  // @ts-expect-error
50
- body[key] = params[key];
42
+ querystring[key] = params[key];
51
43
  }
52
44
  }
53
45
  let method = '';
@@ -63,25 +55,17 @@ class Cat {
63
55
  return await this.transport.request({ path, method, querystring, body }, options);
64
56
  }
65
57
  async allocation(params, options) {
66
- var _a;
67
58
  const acceptedPath = ['node_id'];
68
- const acceptedQuery = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
69
59
  const querystring = {};
70
- // @ts-expect-error
71
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
60
+ const body = undefined;
72
61
  params = params !== null && params !== void 0 ? params : {};
73
62
  for (const key in params) {
74
- if (acceptedQuery.includes(key)) {
75
- // @ts-expect-error
76
- querystring[key] = params[key];
77
- }
78
- else if (acceptedPath.includes(key)) {
63
+ if (acceptedPath.includes(key)) {
79
64
  continue;
80
65
  }
81
66
  else if (key !== 'body') {
82
- body = body !== null && body !== void 0 ? body : {};
83
67
  // @ts-expect-error
84
- body[key] = params[key];
68
+ querystring[key] = params[key];
85
69
  }
86
70
  }
87
71
  let method = '';
@@ -97,25 +81,17 @@ class Cat {
97
81
  return await this.transport.request({ path, method, querystring, body }, options);
98
82
  }
99
83
  async count(params, options) {
100
- var _a;
101
84
  const acceptedPath = ['index'];
102
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
103
85
  const querystring = {};
104
- // @ts-expect-error
105
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
86
+ const body = undefined;
106
87
  params = params !== null && params !== void 0 ? params : {};
107
88
  for (const key in params) {
108
- if (acceptedQuery.includes(key)) {
109
- // @ts-expect-error
110
- querystring[key] = params[key];
111
- }
112
- else if (acceptedPath.includes(key)) {
89
+ if (acceptedPath.includes(key)) {
113
90
  continue;
114
91
  }
115
92
  else if (key !== 'body') {
116
- body = body !== null && body !== void 0 ? body : {};
117
93
  // @ts-expect-error
118
- body[key] = params[key];
94
+ querystring[key] = params[key];
119
95
  }
120
96
  }
121
97
  let method = '';
@@ -131,25 +107,17 @@ class Cat {
131
107
  return await this.transport.request({ path, method, querystring, body }, options);
132
108
  }
133
109
  async fielddata(params, options) {
134
- var _a;
135
110
  const acceptedPath = ['fields'];
136
- const acceptedQuery = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
137
111
  const querystring = {};
138
- // @ts-expect-error
139
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
112
+ const body = undefined;
140
113
  params = params !== null && params !== void 0 ? params : {};
141
114
  for (const key in params) {
142
- if (acceptedQuery.includes(key)) {
143
- // @ts-expect-error
144
- querystring[key] = params[key];
145
- }
146
- else if (acceptedPath.includes(key)) {
115
+ if (acceptedPath.includes(key)) {
147
116
  continue;
148
117
  }
149
118
  else if (key !== 'body') {
150
- body = body !== null && body !== void 0 ? body : {};
151
119
  // @ts-expect-error
152
- body[key] = params[key];
120
+ querystring[key] = params[key];
153
121
  }
154
122
  }
155
123
  let method = '';
@@ -165,25 +133,17 @@ class Cat {
165
133
  return await this.transport.request({ path, method, querystring, body }, options);
166
134
  }
167
135
  async health(params, options) {
168
- var _a;
169
136
  const acceptedPath = [];
170
- const acceptedQuery = ['include_timestamp', 'ts', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
171
137
  const querystring = {};
172
- // @ts-expect-error
173
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
138
+ const body = undefined;
174
139
  params = params !== null && params !== void 0 ? params : {};
175
140
  for (const key in params) {
176
- if (acceptedQuery.includes(key)) {
177
- // @ts-expect-error
178
- querystring[key] = params[key];
179
- }
180
- else if (acceptedPath.includes(key)) {
141
+ if (acceptedPath.includes(key)) {
181
142
  continue;
182
143
  }
183
144
  else if (key !== 'body') {
184
- body = body !== null && body !== void 0 ? body : {};
185
145
  // @ts-expect-error
186
- body[key] = params[key];
146
+ querystring[key] = params[key];
187
147
  }
188
148
  }
189
149
  const method = 'GET';
@@ -191,25 +151,17 @@ class Cat {
191
151
  return await this.transport.request({ path, method, querystring, body }, options);
192
152
  }
193
153
  async help(params, options) {
194
- var _a;
195
154
  const acceptedPath = [];
196
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
197
155
  const querystring = {};
198
- // @ts-expect-error
199
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
156
+ const body = undefined;
200
157
  params = params !== null && params !== void 0 ? params : {};
201
158
  for (const key in params) {
202
- if (acceptedQuery.includes(key)) {
203
- // @ts-expect-error
204
- querystring[key] = params[key];
205
- }
206
- else if (acceptedPath.includes(key)) {
159
+ if (acceptedPath.includes(key)) {
207
160
  continue;
208
161
  }
209
162
  else if (key !== 'body') {
210
- body = body !== null && body !== void 0 ? body : {};
211
163
  // @ts-expect-error
212
- body[key] = params[key];
164
+ querystring[key] = params[key];
213
165
  }
214
166
  }
215
167
  const method = 'GET';
@@ -217,25 +169,17 @@ class Cat {
217
169
  return await this.transport.request({ path, method, querystring, body }, options);
218
170
  }
219
171
  async indices(params, options) {
220
- var _a;
221
172
  const acceptedPath = ['index'];
222
- const acceptedQuery = ['bytes', 'expand_wildcards', 'health', 'include_unloaded_segments', 'pri', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
223
173
  const querystring = {};
224
- // @ts-expect-error
225
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
174
+ const body = undefined;
226
175
  params = params !== null && params !== void 0 ? params : {};
227
176
  for (const key in params) {
228
- if (acceptedQuery.includes(key)) {
229
- // @ts-expect-error
230
- querystring[key] = params[key];
231
- }
232
- else if (acceptedPath.includes(key)) {
177
+ if (acceptedPath.includes(key)) {
233
178
  continue;
234
179
  }
235
180
  else if (key !== 'body') {
236
- body = body !== null && body !== void 0 ? body : {};
237
181
  // @ts-expect-error
238
- body[key] = params[key];
182
+ querystring[key] = params[key];
239
183
  }
240
184
  }
241
185
  let method = '';
@@ -251,25 +195,17 @@ class Cat {
251
195
  return await this.transport.request({ path, method, querystring, body }, options);
252
196
  }
253
197
  async master(params, options) {
254
- var _a;
255
198
  const acceptedPath = [];
256
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
257
199
  const querystring = {};
258
- // @ts-expect-error
259
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
200
+ const body = undefined;
260
201
  params = params !== null && params !== void 0 ? params : {};
261
202
  for (const key in params) {
262
- if (acceptedQuery.includes(key)) {
263
- // @ts-expect-error
264
- querystring[key] = params[key];
265
- }
266
- else if (acceptedPath.includes(key)) {
203
+ if (acceptedPath.includes(key)) {
267
204
  continue;
268
205
  }
269
206
  else if (key !== 'body') {
270
- body = body !== null && body !== void 0 ? body : {};
271
207
  // @ts-expect-error
272
- body[key] = params[key];
208
+ querystring[key] = params[key];
273
209
  }
274
210
  }
275
211
  const method = 'GET';
@@ -277,25 +213,17 @@ class Cat {
277
213
  return await this.transport.request({ path, method, querystring, body }, options);
278
214
  }
279
215
  async mlDataFrameAnalytics(params, options) {
280
- var _a;
281
216
  const acceptedPath = ['id'];
282
- const acceptedQuery = ['allow_no_match', 'bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
283
217
  const querystring = {};
284
- // @ts-expect-error
285
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
218
+ const body = undefined;
286
219
  params = params !== null && params !== void 0 ? params : {};
287
220
  for (const key in params) {
288
- if (acceptedQuery.includes(key)) {
289
- // @ts-expect-error
290
- querystring[key] = params[key];
291
- }
292
- else if (acceptedPath.includes(key)) {
221
+ if (acceptedPath.includes(key)) {
293
222
  continue;
294
223
  }
295
224
  else if (key !== 'body') {
296
- body = body !== null && body !== void 0 ? body : {};
297
225
  // @ts-expect-error
298
- body[key] = params[key];
226
+ querystring[key] = params[key];
299
227
  }
300
228
  }
301
229
  let method = '';
@@ -311,25 +239,17 @@ class Cat {
311
239
  return await this.transport.request({ path, method, querystring, body }, options);
312
240
  }
313
241
  async mlDatafeeds(params, options) {
314
- var _a;
315
242
  const acceptedPath = ['datafeed_id'];
316
- const acceptedQuery = ['allow_no_datafeeds', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
317
243
  const querystring = {};
318
- // @ts-expect-error
319
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
244
+ const body = undefined;
320
245
  params = params !== null && params !== void 0 ? params : {};
321
246
  for (const key in params) {
322
- if (acceptedQuery.includes(key)) {
323
- // @ts-expect-error
324
- querystring[key] = params[key];
325
- }
326
- else if (acceptedPath.includes(key)) {
247
+ if (acceptedPath.includes(key)) {
327
248
  continue;
328
249
  }
329
250
  else if (key !== 'body') {
330
- body = body !== null && body !== void 0 ? body : {};
331
251
  // @ts-expect-error
332
- body[key] = params[key];
252
+ querystring[key] = params[key];
333
253
  }
334
254
  }
335
255
  let method = '';
@@ -345,25 +265,17 @@ class Cat {
345
265
  return await this.transport.request({ path, method, querystring, body }, options);
346
266
  }
347
267
  async mlJobs(params, options) {
348
- var _a;
349
268
  const acceptedPath = ['job_id'];
350
- const acceptedQuery = ['allow_no_jobs', 'bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
351
269
  const querystring = {};
352
- // @ts-expect-error
353
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
270
+ const body = undefined;
354
271
  params = params !== null && params !== void 0 ? params : {};
355
272
  for (const key in params) {
356
- if (acceptedQuery.includes(key)) {
357
- // @ts-expect-error
358
- querystring[key] = params[key];
359
- }
360
- else if (acceptedPath.includes(key)) {
273
+ if (acceptedPath.includes(key)) {
361
274
  continue;
362
275
  }
363
276
  else if (key !== 'body') {
364
- body = body !== null && body !== void 0 ? body : {};
365
277
  // @ts-expect-error
366
- body[key] = params[key];
278
+ querystring[key] = params[key];
367
279
  }
368
280
  }
369
281
  let method = '';
@@ -379,25 +291,17 @@ class Cat {
379
291
  return await this.transport.request({ path, method, querystring, body }, options);
380
292
  }
381
293
  async mlTrainedModels(params, options) {
382
- var _a;
383
294
  const acceptedPath = ['model_id'];
384
- const acceptedQuery = ['allow_no_match', 'bytes', 'from', 'size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
385
295
  const querystring = {};
386
- // @ts-expect-error
387
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
296
+ const body = undefined;
388
297
  params = params !== null && params !== void 0 ? params : {};
389
298
  for (const key in params) {
390
- if (acceptedQuery.includes(key)) {
391
- // @ts-expect-error
392
- querystring[key] = params[key];
393
- }
394
- else if (acceptedPath.includes(key)) {
299
+ if (acceptedPath.includes(key)) {
395
300
  continue;
396
301
  }
397
302
  else if (key !== 'body') {
398
- body = body !== null && body !== void 0 ? body : {};
399
303
  // @ts-expect-error
400
- body[key] = params[key];
304
+ querystring[key] = params[key];
401
305
  }
402
306
  }
403
307
  let method = '';
@@ -413,25 +317,17 @@ class Cat {
413
317
  return await this.transport.request({ path, method, querystring, body }, options);
414
318
  }
415
319
  async nodeattrs(params, options) {
416
- var _a;
417
320
  const acceptedPath = [];
418
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
419
321
  const querystring = {};
420
- // @ts-expect-error
421
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
322
+ const body = undefined;
422
323
  params = params !== null && params !== void 0 ? params : {};
423
324
  for (const key in params) {
424
- if (acceptedQuery.includes(key)) {
425
- // @ts-expect-error
426
- querystring[key] = params[key];
427
- }
428
- else if (acceptedPath.includes(key)) {
325
+ if (acceptedPath.includes(key)) {
429
326
  continue;
430
327
  }
431
328
  else if (key !== 'body') {
432
- body = body !== null && body !== void 0 ? body : {};
433
329
  // @ts-expect-error
434
- body[key] = params[key];
330
+ querystring[key] = params[key];
435
331
  }
436
332
  }
437
333
  const method = 'GET';
@@ -439,25 +335,17 @@ class Cat {
439
335
  return await this.transport.request({ path, method, querystring, body }, options);
440
336
  }
441
337
  async nodes(params, options) {
442
- var _a;
443
338
  const acceptedPath = [];
444
- const acceptedQuery = ['bytes', 'full_id', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
445
339
  const querystring = {};
446
- // @ts-expect-error
447
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
340
+ const body = undefined;
448
341
  params = params !== null && params !== void 0 ? params : {};
449
342
  for (const key in params) {
450
- if (acceptedQuery.includes(key)) {
451
- // @ts-expect-error
452
- querystring[key] = params[key];
453
- }
454
- else if (acceptedPath.includes(key)) {
343
+ if (acceptedPath.includes(key)) {
455
344
  continue;
456
345
  }
457
346
  else if (key !== 'body') {
458
- body = body !== null && body !== void 0 ? body : {};
459
347
  // @ts-expect-error
460
- body[key] = params[key];
348
+ querystring[key] = params[key];
461
349
  }
462
350
  }
463
351
  const method = 'GET';
@@ -465,25 +353,17 @@ class Cat {
465
353
  return await this.transport.request({ path, method, querystring, body }, options);
466
354
  }
467
355
  async pendingTasks(params, options) {
468
- var _a;
469
356
  const acceptedPath = [];
470
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
471
357
  const querystring = {};
472
- // @ts-expect-error
473
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
358
+ const body = undefined;
474
359
  params = params !== null && params !== void 0 ? params : {};
475
360
  for (const key in params) {
476
- if (acceptedQuery.includes(key)) {
477
- // @ts-expect-error
478
- querystring[key] = params[key];
479
- }
480
- else if (acceptedPath.includes(key)) {
361
+ if (acceptedPath.includes(key)) {
481
362
  continue;
482
363
  }
483
364
  else if (key !== 'body') {
484
- body = body !== null && body !== void 0 ? body : {};
485
365
  // @ts-expect-error
486
- body[key] = params[key];
366
+ querystring[key] = params[key];
487
367
  }
488
368
  }
489
369
  const method = 'GET';
@@ -491,25 +371,17 @@ class Cat {
491
371
  return await this.transport.request({ path, method, querystring, body }, options);
492
372
  }
493
373
  async plugins(params, options) {
494
- var _a;
495
374
  const acceptedPath = [];
496
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
497
375
  const querystring = {};
498
- // @ts-expect-error
499
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
376
+ const body = undefined;
500
377
  params = params !== null && params !== void 0 ? params : {};
501
378
  for (const key in params) {
502
- if (acceptedQuery.includes(key)) {
503
- // @ts-expect-error
504
- querystring[key] = params[key];
505
- }
506
- else if (acceptedPath.includes(key)) {
379
+ if (acceptedPath.includes(key)) {
507
380
  continue;
508
381
  }
509
382
  else if (key !== 'body') {
510
- body = body !== null && body !== void 0 ? body : {};
511
383
  // @ts-expect-error
512
- body[key] = params[key];
384
+ querystring[key] = params[key];
513
385
  }
514
386
  }
515
387
  const method = 'GET';
@@ -517,25 +389,17 @@ class Cat {
517
389
  return await this.transport.request({ path, method, querystring, body }, options);
518
390
  }
519
391
  async recovery(params, options) {
520
- var _a;
521
392
  const acceptedPath = ['index'];
522
- const acceptedQuery = ['active_only', 'bytes', 'detailed', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
523
393
  const querystring = {};
524
- // @ts-expect-error
525
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
394
+ const body = undefined;
526
395
  params = params !== null && params !== void 0 ? params : {};
527
396
  for (const key in params) {
528
- if (acceptedQuery.includes(key)) {
529
- // @ts-expect-error
530
- querystring[key] = params[key];
531
- }
532
- else if (acceptedPath.includes(key)) {
397
+ if (acceptedPath.includes(key)) {
533
398
  continue;
534
399
  }
535
400
  else if (key !== 'body') {
536
- body = body !== null && body !== void 0 ? body : {};
537
401
  // @ts-expect-error
538
- body[key] = params[key];
402
+ querystring[key] = params[key];
539
403
  }
540
404
  }
541
405
  let method = '';
@@ -551,25 +415,17 @@ class Cat {
551
415
  return await this.transport.request({ path, method, querystring, body }, options);
552
416
  }
553
417
  async repositories(params, options) {
554
- var _a;
555
418
  const acceptedPath = [];
556
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
557
419
  const querystring = {};
558
- // @ts-expect-error
559
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
420
+ const body = undefined;
560
421
  params = params !== null && params !== void 0 ? params : {};
561
422
  for (const key in params) {
562
- if (acceptedQuery.includes(key)) {
563
- // @ts-expect-error
564
- querystring[key] = params[key];
565
- }
566
- else if (acceptedPath.includes(key)) {
423
+ if (acceptedPath.includes(key)) {
567
424
  continue;
568
425
  }
569
426
  else if (key !== 'body') {
570
- body = body !== null && body !== void 0 ? body : {};
571
427
  // @ts-expect-error
572
- body[key] = params[key];
428
+ querystring[key] = params[key];
573
429
  }
574
430
  }
575
431
  const method = 'GET';
@@ -577,25 +433,17 @@ class Cat {
577
433
  return await this.transport.request({ path, method, querystring, body }, options);
578
434
  }
579
435
  async segments(params, options) {
580
- var _a;
581
436
  const acceptedPath = ['index'];
582
- const acceptedQuery = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
583
437
  const querystring = {};
584
- // @ts-expect-error
585
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
438
+ const body = undefined;
586
439
  params = params !== null && params !== void 0 ? params : {};
587
440
  for (const key in params) {
588
- if (acceptedQuery.includes(key)) {
589
- // @ts-expect-error
590
- querystring[key] = params[key];
591
- }
592
- else if (acceptedPath.includes(key)) {
441
+ if (acceptedPath.includes(key)) {
593
442
  continue;
594
443
  }
595
444
  else if (key !== 'body') {
596
- body = body !== null && body !== void 0 ? body : {};
597
445
  // @ts-expect-error
598
- body[key] = params[key];
446
+ querystring[key] = params[key];
599
447
  }
600
448
  }
601
449
  let method = '';
@@ -611,25 +459,17 @@ class Cat {
611
459
  return await this.transport.request({ path, method, querystring, body }, options);
612
460
  }
613
461
  async shards(params, options) {
614
- var _a;
615
462
  const acceptedPath = ['index'];
616
- const acceptedQuery = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
617
463
  const querystring = {};
618
- // @ts-expect-error
619
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
464
+ const body = undefined;
620
465
  params = params !== null && params !== void 0 ? params : {};
621
466
  for (const key in params) {
622
- if (acceptedQuery.includes(key)) {
623
- // @ts-expect-error
624
- querystring[key] = params[key];
625
- }
626
- else if (acceptedPath.includes(key)) {
467
+ if (acceptedPath.includes(key)) {
627
468
  continue;
628
469
  }
629
470
  else if (key !== 'body') {
630
- body = body !== null && body !== void 0 ? body : {};
631
471
  // @ts-expect-error
632
- body[key] = params[key];
472
+ querystring[key] = params[key];
633
473
  }
634
474
  }
635
475
  let method = '';
@@ -645,25 +485,17 @@ class Cat {
645
485
  return await this.transport.request({ path, method, querystring, body }, options);
646
486
  }
647
487
  async snapshots(params, options) {
648
- var _a;
649
488
  const acceptedPath = ['repository'];
650
- const acceptedQuery = ['ignore_unavailable', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
651
489
  const querystring = {};
652
- // @ts-expect-error
653
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
490
+ const body = undefined;
654
491
  params = params !== null && params !== void 0 ? params : {};
655
492
  for (const key in params) {
656
- if (acceptedQuery.includes(key)) {
657
- // @ts-expect-error
658
- querystring[key] = params[key];
659
- }
660
- else if (acceptedPath.includes(key)) {
493
+ if (acceptedPath.includes(key)) {
661
494
  continue;
662
495
  }
663
496
  else if (key !== 'body') {
664
- body = body !== null && body !== void 0 ? body : {};
665
497
  // @ts-expect-error
666
- body[key] = params[key];
498
+ querystring[key] = params[key];
667
499
  }
668
500
  }
669
501
  let method = '';
@@ -679,25 +511,17 @@ class Cat {
679
511
  return await this.transport.request({ path, method, querystring, body }, options);
680
512
  }
681
513
  async tasks(params, options) {
682
- var _a;
683
514
  const acceptedPath = [];
684
- const acceptedQuery = ['actions', 'detailed', 'node_id', 'parent_task', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
685
515
  const querystring = {};
686
- // @ts-expect-error
687
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
516
+ const body = undefined;
688
517
  params = params !== null && params !== void 0 ? params : {};
689
518
  for (const key in params) {
690
- if (acceptedQuery.includes(key)) {
691
- // @ts-expect-error
692
- querystring[key] = params[key];
693
- }
694
- else if (acceptedPath.includes(key)) {
519
+ if (acceptedPath.includes(key)) {
695
520
  continue;
696
521
  }
697
522
  else if (key !== 'body') {
698
- body = body !== null && body !== void 0 ? body : {};
699
523
  // @ts-expect-error
700
- body[key] = params[key];
524
+ querystring[key] = params[key];
701
525
  }
702
526
  }
703
527
  const method = 'GET';
@@ -705,25 +529,17 @@ class Cat {
705
529
  return await this.transport.request({ path, method, querystring, body }, options);
706
530
  }
707
531
  async templates(params, options) {
708
- var _a;
709
532
  const acceptedPath = ['name'];
710
- const acceptedQuery = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
711
533
  const querystring = {};
712
- // @ts-expect-error
713
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
534
+ const body = undefined;
714
535
  params = params !== null && params !== void 0 ? params : {};
715
536
  for (const key in params) {
716
- if (acceptedQuery.includes(key)) {
717
- // @ts-expect-error
718
- querystring[key] = params[key];
719
- }
720
- else if (acceptedPath.includes(key)) {
537
+ if (acceptedPath.includes(key)) {
721
538
  continue;
722
539
  }
723
540
  else if (key !== 'body') {
724
- body = body !== null && body !== void 0 ? body : {};
725
541
  // @ts-expect-error
726
- body[key] = params[key];
542
+ querystring[key] = params[key];
727
543
  }
728
544
  }
729
545
  let method = '';
@@ -739,25 +555,17 @@ class Cat {
739
555
  return await this.transport.request({ path, method, querystring, body }, options);
740
556
  }
741
557
  async threadPool(params, options) {
742
- var _a;
743
558
  const acceptedPath = ['thread_pool_patterns'];
744
- const acceptedQuery = ['size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
745
559
  const querystring = {};
746
- // @ts-expect-error
747
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
560
+ const body = undefined;
748
561
  params = params !== null && params !== void 0 ? params : {};
749
562
  for (const key in params) {
750
- if (acceptedQuery.includes(key)) {
751
- // @ts-expect-error
752
- querystring[key] = params[key];
753
- }
754
- else if (acceptedPath.includes(key)) {
563
+ if (acceptedPath.includes(key)) {
755
564
  continue;
756
565
  }
757
566
  else if (key !== 'body') {
758
- body = body !== null && body !== void 0 ? body : {};
759
567
  // @ts-expect-error
760
- body[key] = params[key];
568
+ querystring[key] = params[key];
761
569
  }
762
570
  }
763
571
  let method = '';
@@ -773,25 +581,17 @@ class Cat {
773
581
  return await this.transport.request({ path, method, querystring, body }, options);
774
582
  }
775
583
  async transforms(params, options) {
776
- var _a;
777
584
  const acceptedPath = ['transform_id'];
778
- const acceptedQuery = ['allow_no_match', 'from', 'size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string'];
779
585
  const querystring = {};
780
- // @ts-expect-error
781
- let body = (_a = params === null || params === void 0 ? void 0 : params.body) !== null && _a !== void 0 ? _a : undefined;
586
+ const body = undefined;
782
587
  params = params !== null && params !== void 0 ? params : {};
783
588
  for (const key in params) {
784
- if (acceptedQuery.includes(key)) {
785
- // @ts-expect-error
786
- querystring[key] = params[key];
787
- }
788
- else if (acceptedPath.includes(key)) {
589
+ if (acceptedPath.includes(key)) {
789
590
  continue;
790
591
  }
791
592
  else if (key !== 'body') {
792
- body = body !== null && body !== void 0 ? body : {};
793
593
  // @ts-expect-error
794
- body[key] = params[key];
594
+ querystring[key] = params[key];
795
595
  }
796
596
  }
797
597
  let method = '';