* Introduce disablePrototypePoisoningProtection option
* Updated test
* Updated docs
* Fix bundler test
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
* API generation
* X-Opaque-Id support (#997)
* Added X-Opaque-Id support
* Updated type definitions
* Updated test
* Updated docs
* Skip data_frame_transform_deprecated.* apis
* API generation
* Fix docs link
* Fix CI configuration
* Added enrich_user to default roles
* Added transform_admin ad transform_user to default roles
* Update code generation (#969)
* Updated code generation scripts to use the new spec
* API generation
* Fix bad link
* Updated API reference doc (#945)
* Updated API reference doc
* Updated docs script
* Fix issue; node roles are defaulting to true when undefined (fal… (#967)
* Fix issue; nodeFilter was unable to filter because master, data, and ingest role were true if even they were false on the node.
* Test nodesToHost of BaseConnectionPool correctly maps node roles
* API generation
* Docker: use 7.4-SNAPSHOT
* API generation
* Use 7.4 stable
* API generation
* Add 7.2.0 to testing matrix
* Use 7.2.0-SNAPSHOT
* API generation
* Updated custom skips
* Updated ES version
* Updated esDefaultRoles
With this pr we introduce the `client.child` API, which returns a new client instance that shares the connection pool with the parent client.
This feature can be handy if you need to have multiple client instances with different configurations, but with a shared connection pool.
Example:
```js
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
const child = client.child({
headers: { 'x-foo': 'bar' },
requestTimeout: 1000
})
client.info(console.log)
child.info(console.log)
```
**Open questions:**
* Currently, the event emitter is shared between the parent and the child(ren), is it ok?
* Currently, if you extend the parent client, the child client will have the same extensions, while if the child client adds an extension, the parent client will not be extended. Is it ok?
**Caveats:**
* You can override _any_ option except for the connection pool specific options (`ssl`, `agent`, `pingTimeout`, `Connection`, and `resurrectStrategy`).
* You can't specify a new `Connection` class.
* If you call `close` in any of the parent/child clients, every client will be closed.
_Note: the `nodeFilter` and `nodeSelector` options are now `Transport` options and no longer `ConnectionPool` options._