@elastic/elasticsearch 6.8.4 → 6.8.8

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 (276) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +10 -2
  3. package/api/api/bulk.js +18 -3
  4. package/api/api/cat.aliases.js +18 -3
  5. package/api/api/cat.allocation.js +18 -3
  6. package/api/api/cat.count.js +18 -3
  7. package/api/api/cat.fielddata.js +18 -3
  8. package/api/api/cat.health.js +18 -3
  9. package/api/api/cat.help.js +18 -3
  10. package/api/api/cat.indices.js +18 -3
  11. package/api/api/cat.master.js +18 -3
  12. package/api/api/cat.nodeattrs.js +18 -3
  13. package/api/api/cat.nodes.js +18 -3
  14. package/api/api/cat.pending_tasks.js +18 -3
  15. package/api/api/cat.plugins.js +18 -3
  16. package/api/api/cat.recovery.js +18 -3
  17. package/api/api/cat.repositories.js +18 -3
  18. package/api/api/cat.segments.js +18 -3
  19. package/api/api/cat.shards.js +18 -3
  20. package/api/api/cat.snapshots.js +18 -3
  21. package/api/api/cat.tasks.js +18 -3
  22. package/api/api/cat.templates.js +18 -3
  23. package/api/api/cat.thread_pool.js +18 -3
  24. package/api/api/ccr.delete_auto_follow_pattern.js +18 -3
  25. package/api/api/ccr.follow.js +18 -3
  26. package/api/api/ccr.follow_info.js +18 -3
  27. package/api/api/ccr.follow_stats.js +18 -3
  28. package/api/api/ccr.forget_follower.js +18 -3
  29. package/api/api/ccr.get_auto_follow_pattern.js +18 -3
  30. package/api/api/ccr.pause_follow.js +18 -3
  31. package/api/api/ccr.put_auto_follow_pattern.js +18 -3
  32. package/api/api/ccr.resume_follow.js +18 -3
  33. package/api/api/ccr.stats.js +18 -3
  34. package/api/api/ccr.unfollow.js +18 -3
  35. package/api/api/clear_scroll.js +18 -3
  36. package/api/api/cluster.allocation_explain.js +18 -3
  37. package/api/api/cluster.get_settings.js +18 -3
  38. package/api/api/cluster.health.js +18 -3
  39. package/api/api/cluster.pending_tasks.js +18 -3
  40. package/api/api/cluster.put_settings.js +18 -3
  41. package/api/api/cluster.remote_info.js +18 -3
  42. package/api/api/cluster.reroute.js +18 -3
  43. package/api/api/cluster.state.js +18 -3
  44. package/api/api/cluster.stats.js +18 -3
  45. package/api/api/count.js +18 -3
  46. package/api/api/create.js +18 -3
  47. package/api/api/delete.js +18 -3
  48. package/api/api/delete_by_query.js +18 -3
  49. package/api/api/delete_by_query_rethrottle.js +18 -3
  50. package/api/api/delete_script.js +18 -3
  51. package/api/api/exists.js +18 -3
  52. package/api/api/exists_source.js +18 -3
  53. package/api/api/explain.js +18 -3
  54. package/api/api/field_caps.js +18 -3
  55. package/api/api/get.js +18 -3
  56. package/api/api/get_script.js +18 -3
  57. package/api/api/get_source.js +18 -3
  58. package/api/api/ilm.delete_lifecycle.js +18 -3
  59. package/api/api/ilm.explain_lifecycle.js +18 -3
  60. package/api/api/ilm.get_lifecycle.js +18 -3
  61. package/api/api/ilm.get_status.js +18 -3
  62. package/api/api/ilm.move_to_step.js +18 -3
  63. package/api/api/ilm.put_lifecycle.js +18 -3
  64. package/api/api/ilm.remove_policy.js +18 -3
  65. package/api/api/ilm.retry.js +18 -3
  66. package/api/api/ilm.start.js +18 -3
  67. package/api/api/ilm.stop.js +18 -3
  68. package/api/api/index.js +18 -3
  69. package/api/api/indices.analyze.js +18 -3
  70. package/api/api/indices.clear_cache.js +18 -3
  71. package/api/api/indices.close.js +18 -3
  72. package/api/api/indices.create.js +18 -3
  73. package/api/api/indices.delete.js +18 -3
  74. package/api/api/indices.delete_alias.js +18 -3
  75. package/api/api/indices.delete_template.js +18 -3
  76. package/api/api/indices.exists.js +18 -3
  77. package/api/api/indices.exists_alias.js +18 -3
  78. package/api/api/indices.exists_template.js +18 -3
  79. package/api/api/indices.exists_type.js +18 -3
  80. package/api/api/indices.flush.js +18 -3
  81. package/api/api/indices.flush_synced.js +18 -3
  82. package/api/api/indices.forcemerge.js +18 -3
  83. package/api/api/indices.freeze.js +18 -3
  84. package/api/api/indices.get.js +18 -3
  85. package/api/api/indices.get_alias.js +18 -3
  86. package/api/api/indices.get_field_mapping.js +18 -3
  87. package/api/api/indices.get_mapping.js +18 -3
  88. package/api/api/indices.get_settings.js +18 -3
  89. package/api/api/indices.get_template.js +18 -3
  90. package/api/api/indices.get_upgrade.js +18 -3
  91. package/api/api/indices.open.js +18 -3
  92. package/api/api/indices.put_alias.js +18 -3
  93. package/api/api/indices.put_mapping.js +18 -3
  94. package/api/api/indices.put_settings.js +18 -3
  95. package/api/api/indices.put_template.js +18 -3
  96. package/api/api/indices.recovery.js +18 -3
  97. package/api/api/indices.refresh.js +18 -3
  98. package/api/api/indices.rollover.js +18 -3
  99. package/api/api/indices.segments.js +18 -3
  100. package/api/api/indices.shard_stores.js +18 -3
  101. package/api/api/indices.shrink.js +18 -3
  102. package/api/api/indices.split.js +18 -3
  103. package/api/api/indices.stats.js +18 -3
  104. package/api/api/indices.unfreeze.js +18 -3
  105. package/api/api/indices.update_aliases.js +18 -3
  106. package/api/api/indices.upgrade.js +18 -3
  107. package/api/api/indices.validate_query.js +18 -3
  108. package/api/api/info.js +18 -3
  109. package/api/api/ingest.delete_pipeline.js +18 -3
  110. package/api/api/ingest.get_pipeline.js +18 -3
  111. package/api/api/ingest.processor_grok.js +18 -3
  112. package/api/api/ingest.put_pipeline.js +18 -3
  113. package/api/api/ingest.simulate.js +18 -3
  114. package/api/api/mget.js +18 -3
  115. package/api/api/msearch.js +18 -3
  116. package/api/api/msearch_template.js +18 -3
  117. package/api/api/mtermvectors.js +18 -3
  118. package/api/api/nodes.hot_threads.js +18 -3
  119. package/api/api/nodes.info.js +18 -3
  120. package/api/api/nodes.reload_secure_settings.js +18 -3
  121. package/api/api/nodes.stats.js +18 -3
  122. package/api/api/nodes.usage.js +18 -3
  123. package/api/api/ping.js +18 -3
  124. package/api/api/put_script.js +18 -3
  125. package/api/api/rank_eval.js +18 -3
  126. package/api/api/reindex.js +18 -3
  127. package/api/api/reindex_rethrottle.js +18 -3
  128. package/api/api/render_search_template.js +18 -3
  129. package/api/api/scripts_painless_execute.js +18 -3
  130. package/api/api/scroll.js +18 -3
  131. package/api/api/search.js +18 -3
  132. package/api/api/search_shards.js +18 -3
  133. package/api/api/search_template.js +18 -3
  134. package/api/api/security.create_api_key.js +18 -3
  135. package/api/api/security.get_api_key.js +18 -3
  136. package/api/api/security.invalidate_api_key.js +18 -3
  137. package/api/api/snapshot.create.js +18 -3
  138. package/api/api/snapshot.create_repository.js +18 -3
  139. package/api/api/snapshot.delete.js +18 -3
  140. package/api/api/snapshot.delete_repository.js +18 -3
  141. package/api/api/snapshot.get.js +18 -3
  142. package/api/api/snapshot.get_repository.js +18 -3
  143. package/api/api/snapshot.restore.js +18 -3
  144. package/api/api/snapshot.status.js +18 -3
  145. package/api/api/snapshot.verify_repository.js +18 -3
  146. package/api/api/tasks.cancel.js +18 -3
  147. package/api/api/tasks.get.js +18 -3
  148. package/api/api/tasks.list.js +18 -3
  149. package/api/api/termvectors.js +18 -3
  150. package/api/api/update.js +18 -3
  151. package/api/api/update_by_query.js +18 -3
  152. package/api/api/update_by_query_rethrottle.js +18 -3
  153. package/api/api/xpack.graph.explore.js +18 -3
  154. package/api/api/xpack.info.js +18 -3
  155. package/api/api/xpack.license.delete.js +18 -3
  156. package/api/api/xpack.license.get.js +18 -3
  157. package/api/api/xpack.license.get_basic_status.js +18 -3
  158. package/api/api/xpack.license.get_trial_status.js +18 -3
  159. package/api/api/xpack.license.post.js +18 -3
  160. package/api/api/xpack.license.post_start_basic.js +18 -3
  161. package/api/api/xpack.license.post_start_trial.js +18 -3
  162. package/api/api/xpack.migration.deprecations.js +18 -3
  163. package/api/api/xpack.migration.get_assistance.js +18 -3
  164. package/api/api/xpack.migration.upgrade.js +18 -3
  165. package/api/api/xpack.ml.close_job.js +18 -3
  166. package/api/api/xpack.ml.delete_calendar.js +18 -3
  167. package/api/api/xpack.ml.delete_calendar_event.js +18 -3
  168. package/api/api/xpack.ml.delete_calendar_job.js +18 -3
  169. package/api/api/xpack.ml.delete_datafeed.js +18 -3
  170. package/api/api/xpack.ml.delete_expired_data.js +18 -3
  171. package/api/api/xpack.ml.delete_filter.js +18 -3
  172. package/api/api/xpack.ml.delete_forecast.js +18 -3
  173. package/api/api/xpack.ml.delete_job.js +18 -3
  174. package/api/api/xpack.ml.delete_model_snapshot.js +18 -3
  175. package/api/api/xpack.ml.find_file_structure.js +18 -3
  176. package/api/api/xpack.ml.flush_job.js +18 -3
  177. package/api/api/xpack.ml.forecast.js +18 -3
  178. package/api/api/xpack.ml.get_buckets.js +18 -3
  179. package/api/api/xpack.ml.get_calendar_events.js +18 -3
  180. package/api/api/xpack.ml.get_calendars.js +18 -3
  181. package/api/api/xpack.ml.get_categories.js +18 -3
  182. package/api/api/xpack.ml.get_datafeed_stats.js +18 -3
  183. package/api/api/xpack.ml.get_datafeeds.js +18 -3
  184. package/api/api/xpack.ml.get_filters.js +18 -3
  185. package/api/api/xpack.ml.get_influencers.js +18 -3
  186. package/api/api/xpack.ml.get_job_stats.js +18 -3
  187. package/api/api/xpack.ml.get_jobs.js +18 -3
  188. package/api/api/xpack.ml.get_model_snapshots.js +18 -3
  189. package/api/api/xpack.ml.get_overall_buckets.js +18 -3
  190. package/api/api/xpack.ml.get_records.js +18 -3
  191. package/api/api/xpack.ml.info.js +18 -3
  192. package/api/api/xpack.ml.open_job.js +18 -3
  193. package/api/api/xpack.ml.post_calendar_events.js +18 -3
  194. package/api/api/xpack.ml.post_data.js +18 -3
  195. package/api/api/xpack.ml.preview_datafeed.js +18 -3
  196. package/api/api/xpack.ml.put_calendar.js +18 -3
  197. package/api/api/xpack.ml.put_calendar_job.js +18 -3
  198. package/api/api/xpack.ml.put_datafeed.js +18 -3
  199. package/api/api/xpack.ml.put_filter.js +18 -3
  200. package/api/api/xpack.ml.put_job.js +18 -3
  201. package/api/api/xpack.ml.revert_model_snapshot.js +18 -3
  202. package/api/api/xpack.ml.set_upgrade_mode.js +18 -3
  203. package/api/api/xpack.ml.start_datafeed.js +18 -3
  204. package/api/api/xpack.ml.stop_datafeed.js +18 -3
  205. package/api/api/xpack.ml.update_datafeed.js +18 -3
  206. package/api/api/xpack.ml.update_filter.js +18 -3
  207. package/api/api/xpack.ml.update_job.js +18 -3
  208. package/api/api/xpack.ml.update_model_snapshot.js +18 -3
  209. package/api/api/xpack.ml.validate.js +18 -3
  210. package/api/api/xpack.ml.validate_detector.js +18 -3
  211. package/api/api/xpack.monitoring.bulk.js +18 -3
  212. package/api/api/xpack.rollup.delete_job.js +18 -3
  213. package/api/api/xpack.rollup.get_jobs.js +18 -3
  214. package/api/api/xpack.rollup.get_rollup_caps.js +18 -3
  215. package/api/api/xpack.rollup.get_rollup_index_caps.js +18 -3
  216. package/api/api/xpack.rollup.put_job.js +18 -3
  217. package/api/api/xpack.rollup.rollup_search.js +18 -3
  218. package/api/api/xpack.rollup.start_job.js +18 -3
  219. package/api/api/xpack.rollup.stop_job.js +18 -3
  220. package/api/api/xpack.security.authenticate.js +18 -3
  221. package/api/api/xpack.security.change_password.js +18 -3
  222. package/api/api/xpack.security.clear_cached_realms.js +18 -3
  223. package/api/api/xpack.security.clear_cached_roles.js +18 -3
  224. package/api/api/xpack.security.delete_privileges.js +18 -3
  225. package/api/api/xpack.security.delete_role.js +18 -3
  226. package/api/api/xpack.security.delete_role_mapping.js +18 -3
  227. package/api/api/xpack.security.delete_user.js +18 -3
  228. package/api/api/xpack.security.disable_user.js +18 -3
  229. package/api/api/xpack.security.enable_user.js +18 -3
  230. package/api/api/xpack.security.get_privileges.js +18 -3
  231. package/api/api/xpack.security.get_role.js +18 -3
  232. package/api/api/xpack.security.get_role_mapping.js +18 -3
  233. package/api/api/xpack.security.get_token.js +18 -3
  234. package/api/api/xpack.security.get_user.js +18 -3
  235. package/api/api/xpack.security.get_user_privileges.js +18 -3
  236. package/api/api/xpack.security.has_privileges.js +18 -3
  237. package/api/api/xpack.security.invalidate_token.js +18 -3
  238. package/api/api/xpack.security.put_privileges.js +18 -3
  239. package/api/api/xpack.security.put_role.js +18 -3
  240. package/api/api/xpack.security.put_role_mapping.js +18 -3
  241. package/api/api/xpack.security.put_user.js +18 -3
  242. package/api/api/xpack.sql.clear_cursor.js +18 -3
  243. package/api/api/xpack.sql.query.js +18 -3
  244. package/api/api/xpack.sql.translate.js +18 -3
  245. package/api/api/xpack.ssl.certificates.js +18 -3
  246. package/api/api/xpack.usage.js +18 -3
  247. package/api/api/xpack.watcher.ack_watch.js +18 -3
  248. package/api/api/xpack.watcher.activate_watch.js +18 -3
  249. package/api/api/xpack.watcher.deactivate_watch.js +18 -3
  250. package/api/api/xpack.watcher.delete_watch.js +18 -3
  251. package/api/api/xpack.watcher.execute_watch.js +18 -3
  252. package/api/api/xpack.watcher.get_watch.js +18 -3
  253. package/api/api/xpack.watcher.put_watch.js +18 -3
  254. package/api/api/xpack.watcher.restart.js +18 -3
  255. package/api/api/xpack.watcher.start.js +18 -3
  256. package/api/api/xpack.watcher.stats.js +18 -3
  257. package/api/api/xpack.watcher.stop.js +18 -3
  258. package/api/index.js +18 -3
  259. package/api/requestParams.d.ts +18 -3
  260. package/{.codecov.yml → codecov.yml} +1 -1
  261. package/index.d.ts +20 -5
  262. package/index.js +18 -3
  263. package/lib/Connection.d.ts +18 -3
  264. package/lib/Connection.js +20 -7
  265. package/lib/Serializer.d.ts +18 -3
  266. package/lib/Serializer.js +20 -4
  267. package/lib/Transport.d.ts +19 -4
  268. package/lib/Transport.js +29 -13
  269. package/lib/errors.d.ts +18 -3
  270. package/lib/errors.js +19 -4
  271. package/lib/pool/BaseConnectionPool.js +21 -6
  272. package/lib/pool/CloudConnectionPool.js +18 -3
  273. package/lib/pool/ConnectionPool.js +34 -19
  274. package/lib/pool/index.d.ts +19 -4
  275. package/lib/pool/index.js +18 -3
  276. package/package.json +4 -5
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
package/api/index.js CHANGED
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  export interface Generic {
6
21
  method?: string;
@@ -3,7 +3,7 @@ comment: off
3
3
  coverage:
4
4
  precision: 2
5
5
  round: down
6
- range: "90...100"
6
+ range: "95...100"
7
7
 
8
8
  status:
9
9
  project: yes
package/index.d.ts CHANGED
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  /// <reference types="node" />
6
21
 
@@ -101,8 +116,8 @@ interface ClientOptions {
101
116
  cloud?: {
102
117
  id: string;
103
118
  // TODO: remove username and password here in 8
104
- username: string;
105
- password: string;
119
+ username?: string;
120
+ password?: string;
106
121
  }
107
122
  }
108
123
 
package/index.js CHANGED
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  /// <reference types="node" />
6
21
 
package/lib/Connection.js CHANGED
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  'use strict'
6
21
 
@@ -294,16 +309,14 @@ function resolve (host, path) {
294
309
 
295
310
  function prepareHeaders (headers = {}, auth) {
296
311
  if (auth != null && headers.authorization == null) {
297
- if (auth.username && auth.password) {
298
- headers.authorization = 'Basic ' + Buffer.from(`${auth.username}:${auth.password}`).toString('base64')
299
- }
300
-
301
312
  if (auth.apiKey) {
302
313
  if (typeof auth.apiKey === 'object') {
303
314
  headers.authorization = 'ApiKey ' + Buffer.from(`${auth.apiKey.id}:${auth.apiKey.api_key}`).toString('base64')
304
315
  } else {
305
316
  headers.authorization = `ApiKey ${auth.apiKey}`
306
317
  }
318
+ } else if (auth.username && auth.password) {
319
+ headers.authorization = 'Basic ' + Buffer.from(`${auth.username}:${auth.password}`).toString('base64')
307
320
  }
308
321
  }
309
322
  return headers
@@ -1,6 +1,21 @@
1
- // Licensed to Elasticsearch B.V under one or more agreements.
2
- // Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- // See the LICENSE file in the project root for more information
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
+ */
4
19
 
5
20
  export default class Serializer {
6
21
  serialize(object: any): string;