@elastic/elasticsearch 7.15.0 → 8.0.0-beta.1

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 (344) hide show
  1. package/README.md +10 -11
  2. package/index.d.ts +4 -2971
  3. package/index.js +25 -321
  4. package/lib/api/api/async_search.d.ts +23 -0
  5. package/lib/api/api/async_search.js +130 -0
  6. package/lib/api/api/async_search.js.map +1 -0
  7. package/lib/api/api/autoscaling.d.ts +23 -0
  8. package/lib/api/api/autoscaling.js +109 -0
  9. package/lib/api/api/autoscaling.js.map +1 -0
  10. package/lib/api/api/bulk.d.ts +10 -0
  11. package/lib/api/api/bulk.js +58 -0
  12. package/lib/api/api/bulk.js.map +1 -0
  13. package/lib/api/api/cat.d.ts +86 -0
  14. package/lib/api/api/cat.js +611 -0
  15. package/lib/api/api/cat.js.map +1 -0
  16. package/lib/api/api/ccr.d.ts +50 -0
  17. package/lib/api/api/ccr.js +320 -0
  18. package/lib/api/api/ccr.js.map +1 -0
  19. package/lib/api/api/clear_scroll.d.ts +10 -0
  20. package/lib/api/api/clear_scroll.js +54 -0
  21. package/lib/api/api/clear_scroll.js.map +1 -0
  22. package/lib/api/api/close_point_in_time.d.ts +10 -0
  23. package/lib/api/api/close_point_in_time.js +53 -0
  24. package/lib/api/api/close_point_in_time.js.map +1 -0
  25. package/lib/api/api/cluster.d.ts +56 -0
  26. package/lib/api/api/cluster.js +392 -0
  27. package/lib/api/api/cluster.js.map +1 -0
  28. package/lib/api/api/count.d.ts +10 -0
  29. package/lib/api/api/count.js +62 -0
  30. package/lib/api/api/count.js.map +1 -0
  31. package/lib/api/api/create.d.ts +10 -0
  32. package/lib/api/api/create.js +46 -0
  33. package/lib/api/api/create.js.map +1 -0
  34. package/lib/api/api/dangling_indices.d.ts +20 -0
  35. package/lib/api/api/dangling_indices.js +85 -0
  36. package/lib/api/api/dangling_indices.js.map +1 -0
  37. package/lib/api/api/delete.d.ts +10 -0
  38. package/lib/api/api/delete.js +39 -0
  39. package/lib/api/api/delete.js.map +1 -0
  40. package/lib/api/api/delete_by_query.d.ts +10 -0
  41. package/lib/api/api/delete_by_query.js +53 -0
  42. package/lib/api/api/delete_by_query.js.map +1 -0
  43. package/lib/api/api/delete_by_query_rethrottle.d.ts +10 -0
  44. package/lib/api/api/delete_by_query_rethrottle.js +39 -0
  45. package/lib/api/api/delete_by_query_rethrottle.js.map +1 -0
  46. package/lib/api/api/delete_script.d.ts +10 -0
  47. package/lib/api/api/delete_script.js +39 -0
  48. package/lib/api/api/delete_script.js.map +1 -0
  49. package/lib/api/api/enrich.d.ts +26 -0
  50. package/lib/api/api/enrich.js +142 -0
  51. package/lib/api/api/enrich.js.map +1 -0
  52. package/lib/api/api/eql.d.ts +23 -0
  53. package/lib/api/api/eql.js +115 -0
  54. package/lib/api/api/eql.js.map +1 -0
  55. package/lib/api/api/exists.d.ts +10 -0
  56. package/lib/api/api/exists.js +39 -0
  57. package/lib/api/api/exists.js.map +1 -0
  58. package/lib/api/api/exists_source.d.ts +10 -0
  59. package/lib/api/api/exists_source.js +39 -0
  60. package/lib/api/api/exists_source.js.map +1 -0
  61. package/lib/api/api/explain.d.ts +10 -0
  62. package/lib/api/api/explain.js +53 -0
  63. package/lib/api/api/explain.js.map +1 -0
  64. package/lib/api/api/features.d.ts +17 -0
  65. package/lib/api/api/features.js +69 -0
  66. package/lib/api/api/features.js.map +1 -0
  67. package/lib/api/api/field_caps.d.ts +10 -0
  68. package/lib/api/api/field_caps.js +62 -0
  69. package/lib/api/api/field_caps.js.map +1 -0
  70. package/lib/api/api/fleet.d.ts +20 -0
  71. package/lib/api/api/fleet.js +92 -0
  72. package/lib/api/api/fleet.js.map +1 -0
  73. package/lib/api/api/get.d.ts +10 -0
  74. package/lib/api/api/get.js +39 -0
  75. package/lib/api/api/get.js.map +1 -0
  76. package/lib/api/api/get_script.d.ts +10 -0
  77. package/lib/api/api/get_script.js +39 -0
  78. package/lib/api/api/get_script.js.map +1 -0
  79. package/lib/api/api/get_script_context.d.ts +10 -0
  80. package/lib/api/api/get_script_context.js +40 -0
  81. package/lib/api/api/get_script_context.js.map +1 -0
  82. package/lib/api/api/get_script_languages.d.ts +10 -0
  83. package/lib/api/api/get_script_languages.js +40 -0
  84. package/lib/api/api/get_script_languages.js.map +1 -0
  85. package/lib/api/api/get_source.d.ts +10 -0
  86. package/lib/api/api/get_source.js +39 -0
  87. package/lib/api/api/get_source.js.map +1 -0
  88. package/lib/api/api/graph.d.ts +14 -0
  89. package/lib/api/api/graph.js +64 -0
  90. package/lib/api/api/graph.js.map +1 -0
  91. package/lib/api/api/ilm.d.ts +44 -0
  92. package/lib/api/api/ilm.js +260 -0
  93. package/lib/api/api/ilm.js.map +1 -0
  94. package/lib/api/api/index.d.ts +10 -0
  95. package/lib/api/api/index.js +54 -0
  96. package/lib/api/api/index.js.map +1 -0
  97. package/lib/api/api/indices.d.ts +173 -0
  98. package/lib/api/api/indices.js +1381 -0
  99. package/lib/api/api/indices.js.map +1 -0
  100. package/lib/api/api/info.d.ts +10 -0
  101. package/lib/{Serializer.d.ts → api/api/info.js} +21 -11
  102. package/lib/api/api/info.js.map +1 -0
  103. package/lib/api/api/ingest.d.ts +29 -0
  104. package/lib/api/api/ingest.js +183 -0
  105. package/lib/api/api/ingest.js.map +1 -0
  106. package/lib/api/api/knn_search.d.ts +10 -0
  107. package/lib/api/api/knn_search.js +53 -0
  108. package/lib/api/api/knn_search.js.map +1 -0
  109. package/lib/api/api/license.d.ts +32 -0
  110. package/lib/api/api/license.js +173 -0
  111. package/lib/api/api/license.js.map +1 -0
  112. package/lib/api/api/logstash.d.ts +20 -0
  113. package/lib/api/api/logstash.js +91 -0
  114. package/lib/api/api/logstash.js.map +1 -0
  115. package/lib/api/api/mget.d.ts +10 -0
  116. package/lib/api/api/mget.js +62 -0
  117. package/lib/api/api/mget.js.map +1 -0
  118. package/lib/api/api/migration.d.ts +20 -0
  119. package/lib/api/api/migration.js +93 -0
  120. package/lib/api/api/migration.js.map +1 -0
  121. package/lib/api/api/ml.d.ts +221 -0
  122. package/lib/api/api/ml.js +1818 -0
  123. package/lib/api/api/ml.js.map +1 -0
  124. package/lib/api/api/monitoring.d.ts +14 -0
  125. package/lib/api/api/monitoring.js +57 -0
  126. package/lib/api/api/monitoring.js.map +1 -0
  127. package/lib/api/api/msearch.d.ts +10 -0
  128. package/lib/api/api/msearch.js +54 -0
  129. package/lib/api/api/msearch.js.map +1 -0
  130. package/lib/api/api/msearch_template.d.ts +10 -0
  131. package/lib/api/api/msearch_template.js +54 -0
  132. package/lib/api/api/msearch_template.js.map +1 -0
  133. package/lib/api/api/mtermvectors.d.ts +10 -0
  134. package/lib/api/api/mtermvectors.js +62 -0
  135. package/lib/api/api/mtermvectors.js.map +1 -0
  136. package/lib/api/api/nodes.d.ts +32 -0
  137. package/lib/api/api/nodes.js +243 -0
  138. package/lib/api/api/nodes.js.map +1 -0
  139. package/lib/api/api/open_point_in_time.d.ts +10 -0
  140. package/lib/api/api/open_point_in_time.js +39 -0
  141. package/lib/api/api/open_point_in_time.js.map +1 -0
  142. package/lib/api/api/ping.d.ts +10 -0
  143. package/lib/api/api/ping.js +40 -0
  144. package/lib/api/api/ping.js.map +1 -0
  145. package/lib/api/api/put_script.d.ts +10 -0
  146. package/lib/api/api/put_script.js +61 -0
  147. package/lib/api/api/put_script.js.map +1 -0
  148. package/lib/api/api/rank_eval.d.ts +10 -0
  149. package/lib/api/api/rank_eval.js +61 -0
  150. package/lib/api/api/rank_eval.js.map +1 -0
  151. package/lib/api/api/reindex.d.ts +10 -0
  152. package/lib/api/api/reindex.js +54 -0
  153. package/lib/api/api/reindex.js.map +1 -0
  154. package/lib/api/api/reindex_rethrottle.d.ts +10 -0
  155. package/lib/api/api/reindex_rethrottle.js +39 -0
  156. package/lib/api/api/reindex_rethrottle.js.map +1 -0
  157. package/lib/api/api/render_search_template.d.ts +10 -0
  158. package/lib/api/api/render_search_template.js +62 -0
  159. package/lib/api/api/render_search_template.js.map +1 -0
  160. package/lib/api/api/rollup.d.ts +38 -0
  161. package/lib/api/api/rollup.js +239 -0
  162. package/lib/api/api/rollup.js.map +1 -0
  163. package/lib/api/api/scripts_painless_execute.d.ts +10 -0
  164. package/lib/api/api/scripts_painless_execute.js +54 -0
  165. package/lib/api/api/scripts_painless_execute.js.map +1 -0
  166. package/lib/api/api/scroll.d.ts +10 -0
  167. package/lib/api/api/scroll.js +53 -0
  168. package/lib/api/api/scroll.js.map +1 -0
  169. package/lib/api/api/search.d.ts +10 -0
  170. package/lib/api/api/search.js +68 -0
  171. package/lib/api/api/search.js.map +1 -0
  172. package/lib/api/api/search_mvt.d.ts +10 -0
  173. package/lib/api/api/search_mvt.js +53 -0
  174. package/lib/api/api/search_mvt.js.map +1 -0
  175. package/lib/api/api/search_shards.d.ts +10 -0
  176. package/lib/api/api/search_shards.js +48 -0
  177. package/lib/api/api/search_shards.js.map +1 -0
  178. package/lib/api/api/search_template.d.ts +10 -0
  179. package/lib/api/api/search_template.js +62 -0
  180. package/lib/api/api/search_template.js.map +1 -0
  181. package/lib/api/api/searchable_snapshots.d.ts +23 -0
  182. package/lib/api/api/searchable_snapshots.js +141 -0
  183. package/lib/api/api/searchable_snapshots.js.map +1 -0
  184. package/lib/api/api/security.d.ts +140 -0
  185. package/lib/api/api/security.js +998 -0
  186. package/lib/api/api/security.js.map +1 -0
  187. package/lib/api/api/shutdown.d.ts +20 -0
  188. package/lib/api/api/shutdown.js +93 -0
  189. package/lib/api/api/shutdown.js.map +1 -0
  190. package/lib/api/api/slm.d.ts +38 -0
  191. package/lib/api/api/slm.js +214 -0
  192. package/lib/api/api/slm.js.map +1 -0
  193. package/lib/api/api/snapshot.d.ts +47 -0
  194. package/lib/api/api/snapshot.js +315 -0
  195. package/lib/api/api/snapshot.js.map +1 -0
  196. package/lib/api/api/sql.d.ts +29 -0
  197. package/lib/api/api/sql.js +178 -0
  198. package/lib/api/api/sql.js.map +1 -0
  199. package/lib/api/api/ssl.d.ts +14 -0
  200. package/lib/api/api/ssl.js +51 -0
  201. package/lib/api/api/ssl.js.map +1 -0
  202. package/lib/api/api/tasks.d.ts +20 -0
  203. package/lib/api/api/tasks.js +94 -0
  204. package/lib/api/api/tasks.js.map +1 -0
  205. package/lib/api/api/terms_enum.d.ts +10 -0
  206. package/lib/api/api/terms_enum.js +53 -0
  207. package/lib/api/api/terms_enum.js.map +1 -0
  208. package/lib/api/api/termvectors.d.ts +10 -0
  209. package/lib/api/api/termvectors.js +61 -0
  210. package/lib/api/api/termvectors.js.map +1 -0
  211. package/lib/api/api/text_structure.d.ts +14 -0
  212. package/lib/api/api/text_structure.js +57 -0
  213. package/lib/api/api/text_structure.js.map +1 -0
  214. package/lib/api/api/transform.d.ts +38 -0
  215. package/lib/api/api/transform.js +246 -0
  216. package/lib/api/api/transform.js.map +1 -0
  217. package/lib/api/api/update.d.ts +10 -0
  218. package/lib/api/api/update.js +53 -0
  219. package/lib/api/api/update.js.map +1 -0
  220. package/lib/api/api/update_by_query.d.ts +10 -0
  221. package/lib/api/api/update_by_query.js +53 -0
  222. package/lib/api/api/update_by_query.js.map +1 -0
  223. package/lib/api/api/update_by_query_rethrottle.d.ts +10 -0
  224. package/lib/api/api/update_by_query_rethrottle.js +39 -0
  225. package/lib/api/api/update_by_query_rethrottle.js.map +1 -0
  226. package/lib/api/api/watcher.d.ts +44 -0
  227. package/lib/api/api/watcher.js +291 -0
  228. package/lib/api/api/watcher.js.map +1 -0
  229. package/lib/api/api/xpack.d.ts +17 -0
  230. package/lib/api/api/xpack.js +69 -0
  231. package/lib/api/api/xpack.js.map +1 -0
  232. package/lib/api/index.d.ts +225 -0
  233. package/lib/api/index.js +520 -0
  234. package/lib/api/index.js.map +1 -0
  235. package/lib/api/types.d.ts +13525 -0
  236. package/lib/{pool/index.js → api/types.js} +3 -12
  237. package/lib/api/types.js.map +1 -0
  238. package/lib/api/typesWithBodyKey.d.ts +13931 -0
  239. package/{index.mjs → lib/api/typesWithBodyKey.js} +3 -11
  240. package/lib/api/typesWithBodyKey.js.map +1 -0
  241. package/lib/client.d.ts +69 -0
  242. package/lib/client.js +282 -0
  243. package/lib/client.js.map +1 -0
  244. package/lib/helpers.d.ts +148 -0
  245. package/lib/helpers.js +769 -0
  246. package/lib/helpers.js.map +1 -0
  247. package/lib/sniffingTransport.d.ts +4 -0
  248. package/lib/sniffingTransport.js +56 -0
  249. package/lib/sniffingTransport.js.map +1 -0
  250. package/package.json +46 -59
  251. package/tsconfig.json +37 -0
  252. package/api/api/async_search.js +0 -141
  253. package/api/api/autoscaling.js +0 -147
  254. package/api/api/bulk.js +0 -70
  255. package/api/api/cat.js +0 -648
  256. package/api/api/ccr.js +0 -403
  257. package/api/api/clear_scroll.js +0 -55
  258. package/api/api/close_point_in_time.js +0 -50
  259. package/api/api/cluster.js +0 -420
  260. package/api/api/count.js +0 -64
  261. package/api/api/create.js +0 -69
  262. package/api/api/dangling_indices.js +0 -115
  263. package/api/api/delete.js +0 -65
  264. package/api/api/delete_by_query.js +0 -71
  265. package/api/api/delete_by_query_rethrottle.js +0 -60
  266. package/api/api/delete_script.js +0 -56
  267. package/api/api/enrich.js +0 -173
  268. package/api/api/eql.js +0 -150
  269. package/api/api/exists.js +0 -65
  270. package/api/api/exists_source.js +0 -74
  271. package/api/api/explain.js +0 -65
  272. package/api/api/features.js +0 -81
  273. package/api/api/field_caps.js +0 -55
  274. package/api/api/fleet.js +0 -65
  275. package/api/api/get.js +0 -65
  276. package/api/api/get_script.js +0 -56
  277. package/api/api/get_script_context.js +0 -50
  278. package/api/api/get_script_languages.js +0 -50
  279. package/api/api/get_source.js +0 -65
  280. package/api/api/graph.js +0 -72
  281. package/api/api/ilm.js +0 -317
  282. package/api/api/index.js +0 -71
  283. package/api/api/indices.js +0 -1753
  284. package/api/api/info.js +0 -50
  285. package/api/api/ingest.js +0 -200
  286. package/api/api/license.js +0 -188
  287. package/api/api/logstash.js +0 -125
  288. package/api/api/mget.js +0 -70
  289. package/api/api/migration.js +0 -60
  290. package/api/api/ml.js +0 -2010
  291. package/api/api/monitoring.js +0 -66
  292. package/api/api/msearch.js +0 -70
  293. package/api/api/msearch_template.js +0 -70
  294. package/api/api/mtermvectors.js +0 -64
  295. package/api/api/nodes.js +0 -268
  296. package/api/api/open_point_in_time.js +0 -56
  297. package/api/api/ping.js +0 -50
  298. package/api/api/put_script.js +0 -71
  299. package/api/api/rank_eval.js +0 -61
  300. package/api/api/reindex.js +0 -56
  301. package/api/api/reindex_rethrottle.js +0 -60
  302. package/api/api/render_search_template.js +0 -55
  303. package/api/api/rollup.js +0 -319
  304. package/api/api/scripts_painless_execute.js +0 -50
  305. package/api/api/scroll.js +0 -55
  306. package/api/api/search.js +0 -64
  307. package/api/api/search_mvt.js +0 -87
  308. package/api/api/search_shards.js +0 -55
  309. package/api/api/search_template.js +0 -70
  310. package/api/api/searchable_snapshots.js +0 -186
  311. package/api/api/security.js +0 -1261
  312. package/api/api/shutdown.js +0 -124
  313. package/api/api/slm.js +0 -256
  314. package/api/api/snapshot.js +0 -439
  315. package/api/api/sql.js +0 -203
  316. package/api/api/ssl.js +0 -55
  317. package/api/api/tasks.js +0 -108
  318. package/api/api/terms_enum.js +0 -56
  319. package/api/api/termvectors.js +0 -67
  320. package/api/api/text_structure.js +0 -65
  321. package/api/api/transform.js +0 -268
  322. package/api/api/update.js +0 -69
  323. package/api/api/update_by_query.js +0 -67
  324. package/api/api/update_by_query_rethrottle.js +0 -60
  325. package/api/api/watcher.js +0 -333
  326. package/api/api/xpack.js +0 -76
  327. package/api/index.js +0 -508
  328. package/api/new.d.ts +0 -1585
  329. package/api/requestParams.d.ts +0 -2920
  330. package/api/types.d.ts +0 -15420
  331. package/api/utils.js +0 -58
  332. package/lib/Connection.d.ts +0 -99
  333. package/lib/Connection.js +0 -392
  334. package/lib/Helpers.d.ts +0 -124
  335. package/lib/Helpers.js +0 -770
  336. package/lib/Serializer.js +0 -94
  337. package/lib/Transport.d.ts +0 -162
  338. package/lib/Transport.js +0 -689
  339. package/lib/errors.d.ts +0 -90
  340. package/lib/errors.js +0 -159
  341. package/lib/pool/BaseConnectionPool.js +0 -262
  342. package/lib/pool/CloudConnectionPool.js +0 -64
  343. package/lib/pool/ConnectionPool.js +0 -246
  344. package/lib/pool/index.d.ts +0 -220
package/api/api/delete.js DELETED
@@ -1,65 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27
- const snakeCase = { waitForActiveShards: 'wait_for_active_shards', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
28
-
29
- function deleteApi (params, options, callback) {
30
- ;[params, options, callback] = normalizeArguments(params, options, callback)
31
-
32
- // check required parameters
33
- if (params.id == null) {
34
- const err = new this[kConfigurationError]('Missing required parameter: id')
35
- return handleError(err, callback)
36
- }
37
- if (params.index == null) {
38
- const err = new this[kConfigurationError]('Missing required parameter: index')
39
- return handleError(err, callback)
40
- }
41
-
42
- let { method, body, id, index, type, ...querystring } = params
43
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
44
-
45
- let path = ''
46
- if ((index) != null && (type) != null && (id) != null) {
47
- if (method == null) method = 'DELETE'
48
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
49
- } else {
50
- if (method == null) method = 'DELETE'
51
- path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
52
- }
53
-
54
- // build request object
55
- const request = {
56
- method,
57
- path,
58
- body: body || '',
59
- querystring
60
- }
61
-
62
- return this.transport.request(request, options, callback)
63
- }
64
-
65
- module.exports = deleteApi
@@ -1,71 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27
- const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
28
-
29
- function deleteByQueryApi (params, options, callback) {
30
- ;[params, options, callback] = normalizeArguments(params, options, callback)
31
-
32
- // check required parameters
33
- if (params.index == null) {
34
- const err = new this[kConfigurationError]('Missing required parameter: index')
35
- return handleError(err, callback)
36
- }
37
- if (params.body == null) {
38
- const err = new this[kConfigurationError]('Missing required parameter: body')
39
- return handleError(err, callback)
40
- }
41
-
42
- // check required url components
43
- if (params.type != null && (params.index == null)) {
44
- const err = new this[kConfigurationError]('Missing required parameter of the url: index')
45
- return handleError(err, callback)
46
- }
47
-
48
- let { method, body, index, type, ...querystring } = params
49
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
50
-
51
- let path = ''
52
- if ((index) != null && (type) != null) {
53
- if (method == null) method = 'POST'
54
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
55
- } else {
56
- if (method == null) method = 'POST'
57
- path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'
58
- }
59
-
60
- // build request object
61
- const request = {
62
- method,
63
- path,
64
- body: body || '',
65
- querystring
66
- }
67
-
68
- return this.transport.request(request, options, callback)
69
- }
70
-
71
- module.exports = deleteByQueryApi
@@ -1,60 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['requests_per_second', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27
- const snakeCase = { requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
28
-
29
- function deleteByQueryRethrottleApi (params, options, callback) {
30
- ;[params, options, callback] = normalizeArguments(params, options, callback)
31
-
32
- // check required parameters
33
- if (params.task_id == null && params.taskId == null) {
34
- const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
35
- return handleError(err, callback)
36
- }
37
- if (params.requests_per_second == null && params.requestsPerSecond == null) {
38
- const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
39
- return handleError(err, callback)
40
- }
41
-
42
- let { method, body, taskId, task_id, ...querystring } = params
43
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
44
-
45
- let path = ''
46
- if (method == null) method = 'POST'
47
- path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
48
-
49
- // build request object
50
- const request = {
51
- method,
52
- path,
53
- body: body || '',
54
- querystring
55
- }
56
-
57
- return this.transport.request(request, options, callback)
58
- }
59
-
60
- module.exports = deleteByQueryRethrottleApi
@@ -1,56 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['timeout', 'master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27
- const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' }
28
-
29
- function deleteScriptApi (params, options, callback) {
30
- ;[params, options, callback] = normalizeArguments(params, options, callback)
31
-
32
- // check required parameters
33
- if (params.id == null) {
34
- const err = new this[kConfigurationError]('Missing required parameter: id')
35
- return handleError(err, callback)
36
- }
37
-
38
- let { method, body, id, ...querystring } = params
39
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
40
-
41
- let path = ''
42
- if (method == null) method = 'DELETE'
43
- path = '/' + '_scripts' + '/' + encodeURIComponent(id)
44
-
45
- // build request object
46
- const request = {
47
- method,
48
- path,
49
- body: body || '',
50
- querystring
51
- }
52
-
53
- return this.transport.request(request, options, callback)
54
- }
55
-
56
- module.exports = deleteScriptApi
package/api/api/enrich.js DELETED
@@ -1,173 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion']
27
- const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion' }
28
-
29
- function EnrichApi (transport, ConfigurationError) {
30
- this.transport = transport
31
- this[kConfigurationError] = ConfigurationError
32
- }
33
-
34
- EnrichApi.prototype.deletePolicy = function enrichDeletePolicyApi (params, options, callback) {
35
- ;[params, options, callback] = normalizeArguments(params, options, callback)
36
-
37
- // check required parameters
38
- if (params.name == null) {
39
- const err = new this[kConfigurationError]('Missing required parameter: name')
40
- return handleError(err, callback)
41
- }
42
-
43
- let { method, body, name, ...querystring } = params
44
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
45
-
46
- let path = ''
47
- if (method == null) method = 'DELETE'
48
- path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
49
-
50
- // build request object
51
- const request = {
52
- method,
53
- path,
54
- body: body || '',
55
- querystring
56
- }
57
-
58
- return this.transport.request(request, options, callback)
59
- }
60
-
61
- EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, options, callback) {
62
- ;[params, options, callback] = normalizeArguments(params, options, callback)
63
-
64
- // check required parameters
65
- if (params.name == null) {
66
- const err = new this[kConfigurationError]('Missing required parameter: name')
67
- return handleError(err, callback)
68
- }
69
-
70
- let { method, body, name, ...querystring } = params
71
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
72
-
73
- let path = ''
74
- if (method == null) method = 'PUT'
75
- path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute'
76
-
77
- // build request object
78
- const request = {
79
- method,
80
- path,
81
- body: body || '',
82
- querystring
83
- }
84
-
85
- return this.transport.request(request, options, callback)
86
- }
87
-
88
- EnrichApi.prototype.getPolicy = function enrichGetPolicyApi (params, options, callback) {
89
- ;[params, options, callback] = normalizeArguments(params, options, callback)
90
-
91
- let { method, body, name, ...querystring } = params
92
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
93
-
94
- let path = ''
95
- if ((name) != null) {
96
- if (method == null) method = 'GET'
97
- path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
98
- } else {
99
- if (method == null) method = 'GET'
100
- path = '/' + '_enrich' + '/' + 'policy'
101
- }
102
-
103
- // build request object
104
- const request = {
105
- method,
106
- path,
107
- body: null,
108
- querystring
109
- }
110
-
111
- return this.transport.request(request, options, callback)
112
- }
113
-
114
- EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, callback) {
115
- ;[params, options, callback] = normalizeArguments(params, options, callback)
116
-
117
- // check required parameters
118
- if (params.name == null) {
119
- const err = new this[kConfigurationError]('Missing required parameter: name')
120
- return handleError(err, callback)
121
- }
122
- if (params.body == null) {
123
- const err = new this[kConfigurationError]('Missing required parameter: body')
124
- return handleError(err, callback)
125
- }
126
-
127
- let { method, body, name, ...querystring } = params
128
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
129
-
130
- let path = ''
131
- if (method == null) method = 'PUT'
132
- path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
133
-
134
- // build request object
135
- const request = {
136
- method,
137
- path,
138
- body: body || '',
139
- querystring
140
- }
141
-
142
- return this.transport.request(request, options, callback)
143
- }
144
-
145
- EnrichApi.prototype.stats = function enrichStatsApi (params, options, callback) {
146
- ;[params, options, callback] = normalizeArguments(params, options, callback)
147
-
148
- let { method, body, ...querystring } = params
149
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
150
-
151
- let path = ''
152
- if (method == null) method = 'GET'
153
- path = '/' + '_enrich' + '/' + '_stats'
154
-
155
- // build request object
156
- const request = {
157
- method,
158
- path,
159
- body: null,
160
- querystring
161
- }
162
-
163
- return this.transport.request(request, options, callback)
164
- }
165
-
166
- Object.defineProperties(EnrichApi.prototype, {
167
- delete_policy: { get () { return this.deletePolicy } },
168
- execute_policy: { get () { return this.executePolicy } },
169
- get_policy: { get () { return this.getPolicy } },
170
- put_policy: { get () { return this.putPolicy } }
171
- })
172
-
173
- module.exports = EnrichApi
package/api/api/eql.js DELETED
@@ -1,150 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'keep_on_completion']
27
- const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', keepOnCompletion: 'keep_on_completion' }
28
-
29
- function EqlApi (transport, ConfigurationError) {
30
- this.transport = transport
31
- this[kConfigurationError] = ConfigurationError
32
- }
33
-
34
- EqlApi.prototype.delete = function eqlDeleteApi (params, options, callback) {
35
- ;[params, options, callback] = normalizeArguments(params, options, callback)
36
-
37
- // check required parameters
38
- if (params.id == null) {
39
- const err = new this[kConfigurationError]('Missing required parameter: id')
40
- return handleError(err, callback)
41
- }
42
-
43
- let { method, body, id, ...querystring } = params
44
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
45
-
46
- let path = ''
47
- if (method == null) method = 'DELETE'
48
- path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
49
-
50
- // build request object
51
- const request = {
52
- method,
53
- path,
54
- body: body || '',
55
- querystring
56
- }
57
-
58
- return this.transport.request(request, options, callback)
59
- }
60
-
61
- EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
62
- ;[params, options, callback] = normalizeArguments(params, options, callback)
63
-
64
- // check required parameters
65
- if (params.id == null) {
66
- const err = new this[kConfigurationError]('Missing required parameter: id')
67
- return handleError(err, callback)
68
- }
69
-
70
- let { method, body, id, ...querystring } = params
71
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
72
-
73
- let path = ''
74
- if (method == null) method = 'GET'
75
- path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
76
-
77
- // build request object
78
- const request = {
79
- method,
80
- path,
81
- body: null,
82
- querystring
83
- }
84
-
85
- return this.transport.request(request, options, callback)
86
- }
87
-
88
- EqlApi.prototype.getStatus = function eqlGetStatusApi (params, options, callback) {
89
- ;[params, options, callback] = normalizeArguments(params, options, callback)
90
-
91
- // check required parameters
92
- if (params.id == null) {
93
- const err = new this[kConfigurationError]('Missing required parameter: id')
94
- return handleError(err, callback)
95
- }
96
-
97
- let { method, body, id, ...querystring } = params
98
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
99
-
100
- let path = ''
101
- if (method == null) method = 'GET'
102
- path = '/' + '_eql' + '/' + 'search' + '/' + 'status' + '/' + encodeURIComponent(id)
103
-
104
- // build request object
105
- const request = {
106
- method,
107
- path,
108
- body: null,
109
- querystring
110
- }
111
-
112
- return this.transport.request(request, options, callback)
113
- }
114
-
115
- EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
116
- ;[params, options, callback] = normalizeArguments(params, options, callback)
117
-
118
- // check required parameters
119
- if (params.index == null) {
120
- const err = new this[kConfigurationError]('Missing required parameter: index')
121
- return handleError(err, callback)
122
- }
123
- if (params.body == null) {
124
- const err = new this[kConfigurationError]('Missing required parameter: body')
125
- return handleError(err, callback)
126
- }
127
-
128
- let { method, body, index, ...querystring } = params
129
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
130
-
131
- let path = ''
132
- if (method == null) method = body == null ? 'GET' : 'POST'
133
- path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search'
134
-
135
- // build request object
136
- const request = {
137
- method,
138
- path,
139
- body: body || '',
140
- querystring
141
- }
142
-
143
- return this.transport.request(request, options, callback)
144
- }
145
-
146
- Object.defineProperties(EqlApi.prototype, {
147
- get_status: { get () { return this.getStatus } }
148
- })
149
-
150
- module.exports = EqlApi
package/api/api/exists.js DELETED
@@ -1,65 +0,0 @@
1
- /*
2
- * Licensed to Elasticsearch B.V. under one or more contributor
3
- * license agreements. See the NOTICE file distributed with
4
- * this work for additional information regarding copyright
5
- * ownership. Elasticsearch B.V. licenses this file to you under
6
- * the Apache License, Version 2.0 (the "License"); you may
7
- * not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
-
20
- 'use strict'
21
-
22
- /* eslint camelcase: 0 */
23
- /* eslint no-unused-vars: 0 */
24
-
25
- const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26
- const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27
- const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
28
-
29
- function existsApi (params, options, callback) {
30
- ;[params, options, callback] = normalizeArguments(params, options, callback)
31
-
32
- // check required parameters
33
- if (params.id == null) {
34
- const err = new this[kConfigurationError]('Missing required parameter: id')
35
- return handleError(err, callback)
36
- }
37
- if (params.index == null) {
38
- const err = new this[kConfigurationError]('Missing required parameter: index')
39
- return handleError(err, callback)
40
- }
41
-
42
- let { method, body, id, index, type, ...querystring } = params
43
- querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
44
-
45
- let path = ''
46
- if ((index) != null && (type) != null && (id) != null) {
47
- if (method == null) method = 'HEAD'
48
- path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
49
- } else {
50
- if (method == null) method = 'HEAD'
51
- path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id)
52
- }
53
-
54
- // build request object
55
- const request = {
56
- method,
57
- path,
58
- body: null,
59
- querystring
60
- }
61
-
62
- return this.transport.request(request, options, callback)
63
- }
64
-
65
- module.exports = existsApi