diff --git a/docs/development/core/public/kibana-plugin-public.savedobject.md b/docs/development/core/public/kibana-plugin-public.savedobject.md
index b1bb3e267bf0e..542d7d3a063ec 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobject.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobject.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObject
+export interface SavedObject
```
## Properties
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsbatchresponse.md b/docs/development/core/public/kibana-plugin-public.savedobjectsbatchresponse.md
index 5a08b3f97f429..97772112ff006 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsbatchresponse.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsbatchresponse.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBatchResponse
+export interface SavedObjectsBatchResponse
```
## Properties
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsbulkcreateobject.md b/docs/development/core/public/kibana-plugin-public.savedobjectsbulkcreateobject.md
index c479e9f9f3e3f..ef83acb8fd73d 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsbulkcreateobject.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsbulkcreateobject.md
@@ -7,7 +7,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions
+export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions
```
## Properties
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsbulkupdateobject.md b/docs/development/core/public/kibana-plugin-public.savedobjectsbulkupdateobject.md
index ca0eabb265901..a57702c305f50 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsbulkupdateobject.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsbulkupdateobject.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkUpdateObject
+export interface SavedObjectsBulkUpdateObject
```
## Properties
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkcreate.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkcreate.md
index 391b2f57205d5..c5072bea5b50e 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkcreate.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkcreate.md
@@ -9,5 +9,5 @@ Creates multiple documents at once
Signature:
```typescript
-bulkCreate: (objects?: SavedObjectsBulkCreateObject[], options?: SavedObjectsBulkCreateOptions) => Promise>;
+bulkCreate: (objects?: SavedObjectsBulkCreateObject[], options?: SavedObjectsBulkCreateOptions) => Promise>;
```
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkget.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkget.md
index a54dfe72167a7..37b9f6d6c951d 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkget.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkget.md
@@ -12,7 +12,7 @@ Returns an array of objects by id
bulkGet: (objects?: {
id: string;
type: string;
- }[]) => Promise>;
+ }[]) => Promise>;
```
## Example
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkupdate.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkupdate.md
index 94ae9bb70ccda..2f8565def3d40 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkupdate.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.bulkupdate.md
@@ -9,7 +9,7 @@ Update multiple documents at once
Signature:
```typescript
-bulkUpdate(objects?: SavedObjectsBulkUpdateObject[]): Promise>;
+bulkUpdate(objects?: SavedObjectsBulkUpdateObject[]): Promise>;
```
## Parameters
@@ -20,7 +20,7 @@ bulkUpdate(objects?: SavedObjectsBulkUpdateObje
Returns:
-`Promise>`
+`Promise>`
The result of the update operation containing both failed and updated saved objects.
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.create.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.create.md
index 5a7666084ea0f..ea3fbe31ca8a5 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.create.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.create.md
@@ -9,5 +9,5 @@ Persists an object
Signature:
```typescript
-create: (type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise>;
+create: (type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise>;
```
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.find.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.find.md
index d3494045952ad..3d8005c9390b7 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.find.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.find.md
@@ -9,5 +9,5 @@ Search for objects
Signature:
```typescript
-find: (options: Pick) => Promise>;
+find: (options: Pick) => Promise>;
```
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.get.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.get.md
index bddbadd3e1361..37a91f7211da5 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.get.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.get.md
@@ -9,5 +9,5 @@ Fetches a single object
Signature:
```typescript
-get: (type: string, id: string) => Promise>;
+get: (type: string, id: string) => Promise>;
```
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.md
index 7aa17eae2da87..5c22a2a0bdd91 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.md
@@ -20,12 +20,12 @@ The constructor for this class is marked as internal. Third-party code should no
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
-| [bulkCreate](./kibana-plugin-public.savedobjectsclient.bulkcreate.md) | | (objects?: SavedObjectsBulkCreateObject<SavedObjectAttributes>[], options?: SavedObjectsBulkCreateOptions) => Promise<SavedObjectsBatchResponse<SavedObjectAttributes>>
| Creates multiple documents at once |
-| [bulkGet](./kibana-plugin-public.savedobjectsclient.bulkget.md) | | (objects?: {
id: string;
type: string;
}[]) => Promise<SavedObjectsBatchResponse<SavedObjectAttributes>>
| Returns an array of objects by id |
-| [create](./kibana-plugin-public.savedobjectsclient.create.md) | | <T extends SavedObjectAttributes>(type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise<SimpleSavedObject<T>>
| Persists an object |
+| [bulkCreate](./kibana-plugin-public.savedobjectsclient.bulkcreate.md) | | (objects?: SavedObjectsBulkCreateObject<unknown>[], options?: SavedObjectsBulkCreateOptions) => Promise<SavedObjectsBatchResponse<unknown>>
| Creates multiple documents at once |
+| [bulkGet](./kibana-plugin-public.savedobjectsclient.bulkget.md) | | (objects?: {
id: string;
type: string;
}[]) => Promise<SavedObjectsBatchResponse<unknown>>
| Returns an array of objects by id |
+| [create](./kibana-plugin-public.savedobjectsclient.create.md) | | <T = unknown>(type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise<SimpleSavedObject<T>>
| Persists an object |
| [delete](./kibana-plugin-public.savedobjectsclient.delete.md) | | (type: string, id: string) => Promise<{}>
| Deletes an object |
-| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <T extends SavedObjectAttributes>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "page" | "perPage" | "sortField" | "fields" | "searchFields" | "hasReference" | "defaultSearchOperator">) => Promise<SavedObjectsFindResponsePublic<T>>
| Search for objects |
-| [get](./kibana-plugin-public.savedobjectsclient.get.md) | | <T extends SavedObjectAttributes>(type: string, id: string) => Promise<SimpleSavedObject<T>>
| Fetches a single object |
+| [find](./kibana-plugin-public.savedobjectsclient.find.md) | | <T = unknown>(options: Pick<SavedObjectFindOptionsServer, "search" | "filter" | "type" | "page" | "perPage" | "sortField" | "fields" | "searchFields" | "hasReference" | "defaultSearchOperator">) => Promise<SavedObjectsFindResponsePublic<T>>
| Search for objects |
+| [get](./kibana-plugin-public.savedobjectsclient.get.md) | | <T = unknown>(type: string, id: string) => Promise<SimpleSavedObject<T>>
| Fetches a single object |
## Methods
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.update.md b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.update.md
index 9f7e46943bbd5..d1049a75edf1f 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsclient.update.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsclient.update.md
@@ -9,7 +9,7 @@ Updates an object
Signature:
```typescript
-update(type: string, id: string, attributes: T, { version, migrationVersion, references }?: SavedObjectsUpdateOptions): Promise>;
+update(type: string, id: string, attributes: T, { version, migrationVersion, references }?: SavedObjectsUpdateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/public/kibana-plugin-public.savedobjectsfindresponsepublic.md b/docs/development/core/public/kibana-plugin-public.savedobjectsfindresponsepublic.md
index f60e7305fba34..31ab73464dfd9 100644
--- a/docs/development/core/public/kibana-plugin-public.savedobjectsfindresponsepublic.md
+++ b/docs/development/core/public/kibana-plugin-public.savedobjectsfindresponsepublic.md
@@ -11,7 +11,7 @@ Return type of the Saved Objects `find()` method.
Signature:
```typescript
-export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse
+export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse
```
## Properties
diff --git a/docs/development/core/public/kibana-plugin-public.simplesavedobject.md b/docs/development/core/public/kibana-plugin-public.simplesavedobject.md
index 1f6de163ec17d..4906d5967f7df 100644
--- a/docs/development/core/public/kibana-plugin-public.simplesavedobject.md
+++ b/docs/development/core/public/kibana-plugin-public.simplesavedobject.md
@@ -11,7 +11,7 @@ It provides basic functionality for creating/saving/deleting saved objects, but
Signature:
```typescript
-export declare class SimpleSavedObject
+export declare class SimpleSavedObject
```
## Constructors
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig._constructor_.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig._constructor_.md
new file mode 100644
index 0000000000000..55e5cf74fc512
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig._constructor_.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [(constructor)](./kibana-plugin-server.elasticsearchconfig._constructor_.md)
+
+## ElasticsearchConfig.(constructor)
+
+Constructs a new instance of the `ElasticsearchConfig` class
+
+Signature:
+
+```typescript
+constructor(rawConfig: ElasticsearchConfigType);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| rawConfig | ElasticsearchConfigType
| |
+
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.apiversion.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.apiversion.md
new file mode 100644
index 0000000000000..097654f1fb090
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.apiversion.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [apiVersion](./kibana-plugin-server.elasticsearchconfig.apiversion.md)
+
+## ElasticsearchConfig.apiVersion property
+
+Version of the Elasticsearch (6.7, 7.1 or `master`) client will be connecting to.
+
+Signature:
+
+```typescript
+readonly apiVersion: string;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.customheaders.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.customheaders.md
new file mode 100644
index 0000000000000..0b3998e59c5df
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.customheaders.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [customHeaders](./kibana-plugin-server.elasticsearchconfig.customheaders.md)
+
+## ElasticsearchConfig.customHeaders property
+
+Header names and values to send to Elasticsearch with every request. These headers cannot be overwritten by client-side headers and aren't affected by `requestHeadersWhitelist` configuration.
+
+Signature:
+
+```typescript
+readonly customHeaders: ElasticsearchConfigType['customHeaders'];
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.healthcheckdelay.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.healthcheckdelay.md
new file mode 100644
index 0000000000000..b5589727d80aa
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.healthcheckdelay.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [healthCheckDelay](./kibana-plugin-server.elasticsearchconfig.healthcheckdelay.md)
+
+## ElasticsearchConfig.healthCheckDelay property
+
+The interval between health check requests Kibana sends to the Elasticsearch.
+
+Signature:
+
+```typescript
+readonly healthCheckDelay: Duration;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.hosts.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.hosts.md
new file mode 100644
index 0000000000000..29770ba5e0795
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.hosts.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [hosts](./kibana-plugin-server.elasticsearchconfig.hosts.md)
+
+## ElasticsearchConfig.hosts property
+
+Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster.
+
+Signature:
+
+```typescript
+readonly hosts: string[];
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ignoreversionmismatch.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ignoreversionmismatch.md
new file mode 100644
index 0000000000000..42e32f920c1db
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ignoreversionmismatch.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [ignoreVersionMismatch](./kibana-plugin-server.elasticsearchconfig.ignoreversionmismatch.md)
+
+## ElasticsearchConfig.ignoreVersionMismatch property
+
+Whether to allow kibana to connect to a non-compatible elasticsearch node.
+
+Signature:
+
+```typescript
+readonly ignoreVersionMismatch: boolean;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.logqueries.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.logqueries.md
new file mode 100644
index 0000000000000..64de7f6504450
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.logqueries.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [logQueries](./kibana-plugin-server.elasticsearchconfig.logqueries.md)
+
+## ElasticsearchConfig.logQueries property
+
+Specifies whether all queries to the client should be logged (status code, method, query etc.).
+
+Signature:
+
+```typescript
+readonly logQueries: boolean;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.md
new file mode 100644
index 0000000000000..e478dc7b966a2
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.md
@@ -0,0 +1,41 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md)
+
+## ElasticsearchConfig class
+
+Wrapper of config schema.
+
+Signature:
+
+```typescript
+export declare class ElasticsearchConfig
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)(rawConfig)](./kibana-plugin-server.elasticsearchconfig._constructor_.md) | | Constructs a new instance of the ElasticsearchConfig
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [apiVersion](./kibana-plugin-server.elasticsearchconfig.apiversion.md) | | string
| Version of the Elasticsearch (6.7, 7.1 or master
) client will be connecting to. |
+| [customHeaders](./kibana-plugin-server.elasticsearchconfig.customheaders.md) | | ElasticsearchConfigType['customHeaders']
| Header names and values to send to Elasticsearch with every request. These headers cannot be overwritten by client-side headers and aren't affected by requestHeadersWhitelist
configuration. |
+| [healthCheckDelay](./kibana-plugin-server.elasticsearchconfig.healthcheckdelay.md) | | Duration
| The interval between health check requests Kibana sends to the Elasticsearch. |
+| [hosts](./kibana-plugin-server.elasticsearchconfig.hosts.md) | | string[]
| Hosts that the client will connect to. If sniffing is enabled, this list will be used as seeds to discover the rest of your cluster. |
+| [ignoreVersionMismatch](./kibana-plugin-server.elasticsearchconfig.ignoreversionmismatch.md) | | boolean
| Whether to allow kibana to connect to a non-compatible elasticsearch node. |
+| [logQueries](./kibana-plugin-server.elasticsearchconfig.logqueries.md) | | boolean
| Specifies whether all queries to the client should be logged (status code, method, query etc.). |
+| [password](./kibana-plugin-server.elasticsearchconfig.password.md) | | string
| If Elasticsearch is protected with basic authentication, this setting provides the password that the Kibana server uses to perform its administrative functions. |
+| [pingTimeout](./kibana-plugin-server.elasticsearchconfig.pingtimeout.md) | | Duration
| Timeout after which PING HTTP request will be aborted and retried. |
+| [requestHeadersWhitelist](./kibana-plugin-server.elasticsearchconfig.requestheaderswhitelist.md) | | string[]
| List of Kibana client-side headers to send to Elasticsearch when request scoped cluster client is used. If this is an empty array then \*no\* client-side will be sent. |
+| [requestTimeout](./kibana-plugin-server.elasticsearchconfig.requesttimeout.md) | | Duration
| Timeout after which HTTP request will be aborted and retried. |
+| [shardTimeout](./kibana-plugin-server.elasticsearchconfig.shardtimeout.md) | | Duration
| Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable. |
+| [sniffInterval](./kibana-plugin-server.elasticsearchconfig.sniffinterval.md) | | false | Duration
| Interval to perform a sniff operation and make sure the list of nodes is complete. If false
then sniffing is disabled. |
+| [sniffOnConnectionFault](./kibana-plugin-server.elasticsearchconfig.sniffonconnectionfault.md) | | boolean
| Specifies whether the client should immediately sniff for a more current list of nodes when a connection dies. |
+| [sniffOnStart](./kibana-plugin-server.elasticsearchconfig.sniffonstart.md) | | boolean
| Specifies whether the client should attempt to detect the rest of the cluster when it is first instantiated. |
+| [ssl](./kibana-plugin-server.elasticsearchconfig.ssl.md) | | Pick<SslConfigSchema, Exclude<keyof SslConfigSchema, 'certificateAuthorities' | 'keystore' | 'truststore'>> & {
certificateAuthorities?: string[];
}
| Set of settings configure SSL connection between Kibana and Elasticsearch that are required when xpack.ssl.verification_mode
in Elasticsearch is set to either certificate
or full
. |
+| [username](./kibana-plugin-server.elasticsearchconfig.username.md) | | string
| If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions. |
+
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.password.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.password.md
new file mode 100644
index 0000000000000..ffe6f75e9874d
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.password.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [password](./kibana-plugin-server.elasticsearchconfig.password.md)
+
+## ElasticsearchConfig.password property
+
+If Elasticsearch is protected with basic authentication, this setting provides the password that the Kibana server uses to perform its administrative functions.
+
+Signature:
+
+```typescript
+readonly password?: string;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.pingtimeout.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.pingtimeout.md
new file mode 100644
index 0000000000000..09123f0969b60
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.pingtimeout.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [pingTimeout](./kibana-plugin-server.elasticsearchconfig.pingtimeout.md)
+
+## ElasticsearchConfig.pingTimeout property
+
+Timeout after which PING HTTP request will be aborted and retried.
+
+Signature:
+
+```typescript
+readonly pingTimeout: Duration;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requestheaderswhitelist.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requestheaderswhitelist.md
new file mode 100644
index 0000000000000..eeced56e3103f
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requestheaderswhitelist.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [requestHeadersWhitelist](./kibana-plugin-server.elasticsearchconfig.requestheaderswhitelist.md)
+
+## ElasticsearchConfig.requestHeadersWhitelist property
+
+List of Kibana client-side headers to send to Elasticsearch when request scoped cluster client is used. If this is an empty array then \*no\* client-side will be sent.
+
+Signature:
+
+```typescript
+readonly requestHeadersWhitelist: string[];
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requesttimeout.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requesttimeout.md
new file mode 100644
index 0000000000000..dbd5ecb939673
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.requesttimeout.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [requestTimeout](./kibana-plugin-server.elasticsearchconfig.requesttimeout.md)
+
+## ElasticsearchConfig.requestTimeout property
+
+Timeout after which HTTP request will be aborted and retried.
+
+Signature:
+
+```typescript
+readonly requestTimeout: Duration;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.shardtimeout.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.shardtimeout.md
new file mode 100644
index 0000000000000..aa923042bf64f
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.shardtimeout.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [shardTimeout](./kibana-plugin-server.elasticsearchconfig.shardtimeout.md)
+
+## ElasticsearchConfig.shardTimeout property
+
+Timeout for Elasticsearch to wait for responses from shards. Set to 0 to disable.
+
+Signature:
+
+```typescript
+readonly shardTimeout: Duration;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffinterval.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffinterval.md
new file mode 100644
index 0000000000000..37fd2a7439535
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffinterval.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [sniffInterval](./kibana-plugin-server.elasticsearchconfig.sniffinterval.md)
+
+## ElasticsearchConfig.sniffInterval property
+
+Interval to perform a sniff operation and make sure the list of nodes is complete. If `false` then sniffing is disabled.
+
+Signature:
+
+```typescript
+readonly sniffInterval: false | Duration;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonconnectionfault.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonconnectionfault.md
new file mode 100644
index 0000000000000..c703be548d34b
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonconnectionfault.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [sniffOnConnectionFault](./kibana-plugin-server.elasticsearchconfig.sniffonconnectionfault.md)
+
+## ElasticsearchConfig.sniffOnConnectionFault property
+
+Specifies whether the client should immediately sniff for a more current list of nodes when a connection dies.
+
+Signature:
+
+```typescript
+readonly sniffOnConnectionFault: boolean;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonstart.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonstart.md
new file mode 100644
index 0000000000000..26a7d9cc11a80
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.sniffonstart.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [sniffOnStart](./kibana-plugin-server.elasticsearchconfig.sniffonstart.md)
+
+## ElasticsearchConfig.sniffOnStart property
+
+Specifies whether the client should attempt to detect the rest of the cluster when it is first instantiated.
+
+Signature:
+
+```typescript
+readonly sniffOnStart: boolean;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ssl.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ssl.md
new file mode 100644
index 0000000000000..4d23c410f59fa
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.ssl.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [ssl](./kibana-plugin-server.elasticsearchconfig.ssl.md)
+
+## ElasticsearchConfig.ssl property
+
+Set of settings configure SSL connection between Kibana and Elasticsearch that are required when `xpack.ssl.verification_mode` in Elasticsearch is set to either `certificate` or `full`.
+
+Signature:
+
+```typescript
+readonly ssl: Pick> & {
+ certificateAuthorities?: string[];
+ };
+```
diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.username.md b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.username.md
new file mode 100644
index 0000000000000..d0098d656befb
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-server.elasticsearchconfig.username.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) > [username](./kibana-plugin-server.elasticsearchconfig.username.md)
+
+## ElasticsearchConfig.username property
+
+If Elasticsearch is protected with basic authentication, this setting provides the username that the Kibana server uses to perform its administrative functions.
+
+Signature:
+
+```typescript
+readonly username?: string;
+```
diff --git a/docs/development/core/server/kibana-plugin-server.md b/docs/development/core/server/kibana-plugin-server.md
index 482f014b226b9..9ec443d6482e8 100644
--- a/docs/development/core/server/kibana-plugin-server.md
+++ b/docs/development/core/server/kibana-plugin-server.md
@@ -19,6 +19,7 @@ The plugin integrates with the core system via lifecycle events: `setup`
| [BasePath](./kibana-plugin-server.basepath.md) | Access or manipulate the Kibana base path |
| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via asScoped(...)
).See [ClusterClient](./kibana-plugin-server.clusterclient.md). |
| [CspConfig](./kibana-plugin-server.cspconfig.md) | CSP configuration for use in Kibana. |
+| [ElasticsearchConfig](./kibana-plugin-server.elasticsearchconfig.md) | Wrapper of config schema. |
| [ElasticsearchErrorHelpers](./kibana-plugin-server.elasticsearcherrorhelpers.md) | Helpers for working with errors returned from the Elasticsearch service.Since the internal data of errors are subject to change, consumers of the Elasticsearch service should always use these helpers to classify errors instead of checking error internals such as body.error.header[WWW-Authenticate]
|
| [KibanaRequest](./kibana-plugin-server.kibanarequest.md) | Kibana specific abstraction for an incoming request. |
| [RouteValidationError](./kibana-plugin-server.routevalidationerror.md) | Error to return when the validation is not successful. |
diff --git a/docs/development/core/server/kibana-plugin-server.savedobject.md b/docs/development/core/server/kibana-plugin-server.savedobject.md
index b3184fd38ad93..5ab08f4eadf2e 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobject.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobject.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObject
+export interface SavedObject
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkcreateobject.md b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkcreateobject.md
index 87386b986009d..7b765055de6c1 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkcreateobject.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkcreateobject.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkCreateObject
+export interface SavedObjectsBulkCreateObject
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkresponse.md b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkresponse.md
index 20a1194c87eda..2ced4f4c8e1a0 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkresponse.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkresponse.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkResponse
+export interface SavedObjectsBulkResponse
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateobject.md b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateobject.md
index 8e4e3d761148e..67013290a629d 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateobject.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateobject.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkUpdateObject extends Pick
+export interface SavedObjectsBulkUpdateObject extends Pick
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateresponse.md b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateresponse.md
index 065b9df0823cd..3468991611608 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateresponse.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsbulkupdateresponse.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsBulkUpdateResponse
+export interface SavedObjectsBulkUpdateResponse
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkcreate.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkcreate.md
index 40f947188de54..47da795631a3a 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkcreate.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkcreate.md
@@ -9,7 +9,7 @@ Persists multiple documents batched together as a single request
Signature:
```typescript
-bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
+bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkget.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkget.md
index c86c30d14db3b..71006e2afa3ee 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkget.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkget.md
@@ -9,7 +9,7 @@ Returns an array of objects by id
Signature:
```typescript
-bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
+bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkupdate.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkupdate.md
index 33958837ebca3..cceeb9c1ca320 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkupdate.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkupdate.md
@@ -9,7 +9,7 @@ Bulk Updates multiple SavedObject at once
Signature:
```typescript
-bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
+bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.create.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.create.md
index ddb78a57e71bc..7f6fc117937cb 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.create.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.create.md
@@ -9,7 +9,7 @@ Persists a SavedObject
Signature:
```typescript
-create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>;
+create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.find.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.find.md
index f72691d3ce0c8..c8804e2a97851 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.find.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.find.md
@@ -9,7 +9,7 @@ Find all SavedObjects matching the search query
Signature:
```typescript
-find(options: SavedObjectsFindOptions): Promise>;
+find(options: SavedObjectsFindOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.get.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.get.md
index 3906462184d4f..b48cef25ca3d1 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.get.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.get.md
@@ -9,7 +9,7 @@ Retrieves a single object
Signature:
```typescript
-get(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>;
+get(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.update.md b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.update.md
index 2c71e518b7b05..ed6243c409fa4 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsclient.update.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsclient.update.md
@@ -9,7 +9,7 @@ Updates an SavedObject
Signature:
```typescript
-update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>;
+update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsfindresponse.md b/docs/development/core/server/kibana-plugin-server.savedobjectsfindresponse.md
index efdc07cea88fd..a79a23db967cc 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsfindresponse.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsfindresponse.md
@@ -11,7 +11,7 @@ Return type of the Saved Objects `find()` method.
Signature:
```typescript
-export interface SavedObjectsFindResponse
+export interface SavedObjectsFindResponse
```
## Properties
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkcreate.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkcreate.md
index dfe9e51e62483..f0d8d9edfbe79 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkcreate.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkcreate.md
@@ -9,7 +9,7 @@ Creates multiple documents at once
Signature:
```typescript
-bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
+bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkget.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkget.md
index 34b113bce5410..e27c5fc3bec9a 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkget.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkget.md
@@ -9,7 +9,7 @@ Returns an array of objects by id
Signature:
```typescript
-bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
+bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkupdate.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkupdate.md
index 23c7a92624957..5ad09d59f4061 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkupdate.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.bulkupdate.md
@@ -9,7 +9,7 @@ Updates multiple objects in bulk
Signature:
```typescript
-bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
+bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.create.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.create.md
index 29e3c3ab24654..fd6495bd2d3c4 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.create.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.create.md
@@ -9,7 +9,7 @@ Persists an object
Signature:
```typescript
-create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>;
+create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.find.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.find.md
index dbf6d59e78d85..ccb9feca1669e 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.find.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.find.md
@@ -7,7 +7,7 @@
Signature:
```typescript
-find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespace, type, filter, }: SavedObjectsFindOptions): Promise>;
+find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespace, type, filter, }: SavedObjectsFindOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.get.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.get.md
index 930a4647ca175..b3ccbc7277b4e 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.get.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.get.md
@@ -9,7 +9,7 @@ Gets a single object
Signature:
```typescript
-get(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>;
+get(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.update.md b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.update.md
index 5e9f69ecc567b..bb215cdb97af5 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.update.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsrepository.update.md
@@ -9,7 +9,7 @@ Updates an object
Signature:
```typescript
-update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>;
+update(type: string, id: string, attributes: Partial, options?: SavedObjectsUpdateOptions): Promise>;
```
## Parameters
diff --git a/docs/development/core/server/kibana-plugin-server.savedobjectsupdateresponse.md b/docs/development/core/server/kibana-plugin-server.savedobjectsupdateresponse.md
index 64c9037735358..130b0b4faaa07 100644
--- a/docs/development/core/server/kibana-plugin-server.savedobjectsupdateresponse.md
+++ b/docs/development/core/server/kibana-plugin-server.savedobjectsupdateresponse.md
@@ -8,7 +8,7 @@
Signature:
```typescript
-export interface SavedObjectsUpdateResponse extends Omit, 'attributes' | 'references'>
+export interface SavedObjectsUpdateResponse extends Omit, 'attributes' | 'references'>
```
## Properties
diff --git a/package.json b/package.json
index b11234b6312e9..c3fe290e7934f 100644
--- a/package.json
+++ b/package.json
@@ -117,7 +117,7 @@
"@babel/core": "^7.5.5",
"@babel/register": "^7.7.0",
"@elastic/apm-rum": "^4.6.0",
- "@elastic/charts": "^17.0.2",
+ "@elastic/charts": "^17.1.1",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "7.6.0",
"@elastic/eui": "19.0.0",
@@ -205,7 +205,7 @@
"leaflet.heat": "0.2.0",
"less": "^2.7.3",
"less-loader": "5.0.0",
- "lodash": "npm:@elastic/lodash@3.10.1-kibana3",
+ "lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"lodash.clonedeep": "^4.5.0",
"lru-cache": "4.1.5",
"markdown-it": "^10.0.0",
diff --git a/packages/kbn-config-schema/src/types/array_type.test.ts b/packages/kbn-config-schema/src/types/array_type.test.ts
index 73661ef849cf4..66b72096a593d 100644
--- a/packages/kbn-config-schema/src/types/array_type.test.ts
+++ b/packages/kbn-config-schema/src/types/array_type.test.ts
@@ -85,14 +85,29 @@ test('fails if mixed types of content in array', () => {
);
});
-test('returns empty array if input is empty but type has default value', () => {
- const type = schema.arrayOf(schema.string({ defaultValue: 'test' }));
+test('fails if sparse content in array', () => {
+ const type = schema.arrayOf(schema.string());
expect(type.validate([])).toEqual([]);
+ expect(() => type.validate([undefined])).toThrowErrorMatchingInlineSnapshot(
+ `"[0]: sparse array are not allowed"`
+ );
});
-test('returns empty array if input is empty even if type is required', () => {
- const type = schema.arrayOf(schema.string());
+test('fails if sparse content in array if optional', () => {
+ const type = schema.arrayOf(schema.maybe(schema.string()));
+ expect(type.validate([])).toEqual([]);
+ expect(() => type.validate([undefined])).toThrowErrorMatchingInlineSnapshot(
+ `"[0]: sparse array are not allowed"`
+ );
+});
+
+test('fails if sparse content in array if nullable', () => {
+ const type = schema.arrayOf(schema.nullable(schema.string()));
expect(type.validate([])).toEqual([]);
+ expect(type.validate([null])).toEqual([null]);
+ expect(() => type.validate([undefined])).toThrowErrorMatchingInlineSnapshot(
+ `"[0]: sparse array are not allowed"`
+ );
});
test('fails for null values if optional', () => {
@@ -102,9 +117,19 @@ test('fails for null values if optional', () => {
);
});
+test('returns empty array if input is empty but type has default value', () => {
+ const type = schema.arrayOf(schema.string({ defaultValue: 'test' }));
+ expect(type.validate([])).toEqual([]);
+});
+
+test('returns empty array if input is empty even if type is required', () => {
+ const type = schema.arrayOf(schema.string());
+ expect(type.validate([])).toEqual([]);
+});
+
test('handles default values for undefined values', () => {
- const type = schema.arrayOf(schema.string({ defaultValue: 'foo' }));
- expect(type.validate([undefined])).toEqual(['foo']);
+ const type = schema.arrayOf(schema.string(), { defaultValue: ['foo'] });
+ expect(type.validate(undefined)).toEqual(['foo']);
});
test('array within array', () => {
diff --git a/packages/kbn-config-schema/src/types/array_type.ts b/packages/kbn-config-schema/src/types/array_type.ts
index ad74f375588ad..a0353e8348ddd 100644
--- a/packages/kbn-config-schema/src/types/array_type.ts
+++ b/packages/kbn-config-schema/src/types/array_type.ts
@@ -31,7 +31,7 @@ export class ArrayType extends Type {
let schema = internals
.array()
.items(type.getSchema().optional())
- .sparse();
+ .sparse(false);
if (options.minSize !== undefined) {
schema = schema.min(options.minSize);
@@ -49,6 +49,8 @@ export class ArrayType extends Type {
case 'any.required':
case 'array.base':
return `expected value of type [array] but got [${typeDetect(value)}]`;
+ case 'array.sparse':
+ return `sparse array are not allowed`;
case 'array.parse':
return `could not parse array value from [${value}]`;
case 'array.min':
diff --git a/packages/kbn-interpreter/package.json b/packages/kbn-interpreter/package.json
index d2f0b0c358284..5dede7fbf1aaa 100644
--- a/packages/kbn-interpreter/package.json
+++ b/packages/kbn-interpreter/package.json
@@ -11,7 +11,7 @@
"dependencies": {
"@babel/runtime": "^7.5.5",
"@kbn/i18n": "1.0.0",
- "lodash": "npm:@elastic/lodash@3.10.1-kibana3",
+ "lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"lodash.clone": "^4.5.0",
"uuid": "3.3.2"
},
diff --git a/packages/kbn-optimizer/src/index.ts b/packages/kbn-optimizer/src/index.ts
index 9798391d47da4..48777f1d54aaf 100644
--- a/packages/kbn-optimizer/src/index.ts
+++ b/packages/kbn-optimizer/src/index.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-// cache buster - https://github.com/elastic/kibana/issues/58077 - 1
export { OptimizerConfig } from './optimizer';
export * from './run_optimizer';
export * from './log_optimizer_state';
diff --git a/packages/kbn-optimizer/src/optimizer/cache_keys.test.ts b/packages/kbn-optimizer/src/optimizer/cache_keys.test.ts
deleted file mode 100644
index 44234acd897dc..0000000000000
--- a/packages/kbn-optimizer/src/optimizer/cache_keys.test.ts
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import jestDiff from 'jest-diff';
-import { REPO_ROOT, createAbsolutePathSerializer } from '@kbn/dev-utils';
-
-import { reformatJestDiff, getOptimizerCacheKey, diffCacheKey } from './cache_keys';
-import { OptimizerConfig } from './optimizer_config';
-
-jest.mock('./get_changes.ts');
-jest.mock('execa');
-expect.addSnapshotSerializer(createAbsolutePathSerializer());
-
-jest.requireMock('execa').mockImplementation(async (cmd: string, args: string[], opts: object) => {
- expect(cmd).toBe('git');
- expect(args).toEqual([
- 'log',
- '-n',
- '1',
- '--pretty=format:%H',
- '--',
- expect.stringContaining('kbn-optimizer'),
- ]);
- expect(opts).toEqual({
- cwd: REPO_ROOT,
- });
-
- return {
- stdout: '',
- };
-});
-
-jest.requireMock('./get_changes.ts').getChanges.mockImplementation(
- async () =>
- new Map([
- ['/foo/bar/a', 'modified'],
- ['/foo/bar/b', 'modified'],
- ['/foo/bar/c', 'deleted'],
- ])
-);
-
-describe('getOptimizerCacheKey()', () => {
- it('uses latest commit and changes files to create unique value', async () => {
- const config = OptimizerConfig.create({
- repoRoot: REPO_ROOT,
- });
-
- await expect(getOptimizerCacheKey(config)).resolves.toMatchInlineSnapshot(`
- Object {
- "deletedPaths": Array [
- "/foo/bar/c",
- ],
- "lastCommit": "",
- "modifiedPaths": Object {},
- "workerConfig": Object {
- "browserslistEnv": "dev",
- "cache": true,
- "dist": false,
- "optimizerCacheKey": "♻",
- "profileWebpack": false,
- "repoRoot": ,
- "watch": false,
- },
- }
- `);
- });
-});
-
-describe('diffCacheKey()', () => {
- it('returns undefined if values are equal', () => {
- expect(diffCacheKey('1', '1')).toBe(undefined);
- expect(diffCacheKey(1, 1)).toBe(undefined);
- expect(diffCacheKey(['1', '2', { a: 'b' }], ['1', '2', { a: 'b' }])).toBe(undefined);
- expect(
- diffCacheKey(
- {
- a: '1',
- b: '2',
- },
- {
- b: '2',
- a: '1',
- }
- )
- ).toBe(undefined);
- });
-
- it('returns a diff if the values are different', () => {
- expect(diffCacheKey(['1', '2', { a: 'b' }], ['1', '2', { b: 'a' }])).toMatchInlineSnapshot(`
- "[32m- Expected[39m
- [31m+ Received[39m
-
- [2m Array [[22m
- [2m \\"1\\",[22m
- [2m \\"2\\",[22m
- [2m Object {[22m
- [32m- \\"a\\": \\"b\\",[39m
- [31m+ \\"b\\": \\"a\\",[39m
- [2m },[22m
- [2m ][22m"
- `);
- expect(
- diffCacheKey(
- {
- a: '1',
- b: '1',
- },
- {
- b: '2',
- a: '2',
- }
- )
- ).toMatchInlineSnapshot(`
- "[32m- Expected[39m
- [31m+ Received[39m
-
- [2m Object {[22m
- [32m- \\"a\\": \\"1\\",[39m
- [32m- \\"b\\": \\"1\\",[39m
- [31m+ \\"a\\": \\"2\\",[39m
- [31m+ \\"b\\": \\"2\\",[39m
- [2m }[22m"
- `);
- });
-});
-
-describe('reformatJestDiff()', () => {
- it('reformats large jestDiff output to focus on the changed lines', () => {
- const diff = jestDiff(
- {
- a: ['1', '1', '1', '1', '1', '1', '1', '2', '1', '1', '1', '1', '1', '1', '1', '1', '1'],
- },
- {
- b: ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '2', '1', '1', '1', '1'],
- }
- );
-
- expect(reformatJestDiff(diff)).toMatchInlineSnapshot(`
- "[32m- Expected[39m
- [31m+ Received[39m
-
- [2m Object {[22m
- [32m- \\"a\\": Array [[39m
- [31m+ \\"b\\": Array [[39m
- [2m \\"1\\",[22m
- [2m \\"1\\",[22m
- [2m ...[22m
- [2m \\"1\\",[22m
- [2m \\"1\\",[22m
- [32m- \\"2\\",[39m
- [2m \\"1\\",[22m
- [2m \\"1\\",[22m
- [2m ...[22m
- [2m \\"1\\",[22m
- [2m \\"1\\",[22m
- [31m+ \\"2\\",[39m
- [2m \\"1\\",[22m
- [2m \\"1\\",[22m
- [2m ...[22m"
- `);
- });
-});
diff --git a/packages/kbn-optimizer/src/optimizer/cache_keys.ts b/packages/kbn-optimizer/src/optimizer/cache_keys.ts
index 3529ffa587f16..af6a8a648d29c 100644
--- a/packages/kbn-optimizer/src/optimizer/cache_keys.ts
+++ b/packages/kbn-optimizer/src/optimizer/cache_keys.ts
@@ -18,6 +18,8 @@
*/
import Path from 'path';
+import Fs from 'fs';
+import { promisify } from 'util';
import Chalk from 'chalk';
import execa from 'execa';
@@ -116,9 +118,10 @@ export function reformatJestDiff(diff: string | null) {
export interface OptimizerCacheKey {
readonly lastCommit: string | undefined;
+ readonly bootstrap: string | undefined;
readonly workerConfig: WorkerConfig;
readonly deletedPaths: string[];
- readonly modifiedPaths: Record;
+ readonly modifiedTimes: Record;
}
async function getLastCommit() {
@@ -133,21 +136,45 @@ async function getLastCommit() {
return stdout.trim() || undefined;
}
+async function getBootstrapCacheKey() {
+ try {
+ return await promisify(Fs.readFile)(
+ Path.resolve(OPTIMIZER_DIR, 'target/.bootstrap-cache'),
+ 'utf8'
+ );
+ } catch (error) {
+ if (error?.code !== 'ENOENT') {
+ throw error;
+ }
+ return undefined;
+ }
+}
+
export async function getOptimizerCacheKey(config: OptimizerConfig) {
- const changes = Array.from((await getChanges(OPTIMIZER_DIR)).entries());
+ const [changes, lastCommit, bootstrap] = await Promise.all([
+ getChanges(OPTIMIZER_DIR),
+ getLastCommit(),
+ getBootstrapCacheKey(),
+ ] as const);
+
+ const deletedPaths: string[] = [];
+ const modifiedPaths: string[] = [];
+ for (const [path, type] of changes) {
+ (type === 'deleted' ? deletedPaths : modifiedPaths).push(path);
+ }
const cacheKeys: OptimizerCacheKey = {
- lastCommit: await getLastCommit(),
workerConfig: config.getWorkerConfig('♻'),
- deletedPaths: changes.filter(e => e[1] === 'deleted').map(e => e[0]),
- modifiedPaths: {} as Record,
+ lastCommit,
+ bootstrap,
+ deletedPaths,
+ modifiedTimes: {} as Record,
};
- const modified = changes.filter(e => e[1] === 'modified').map(e => e[0]);
- const mtimes = await getMtimes(modified);
+ const mtimes = await getMtimes(modifiedPaths);
for (const [path, mtime] of Array.from(mtimes.entries()).sort(ascending(e => e[0]))) {
if (typeof mtime === 'number') {
- cacheKeys.modifiedPaths[path] = mtime;
+ cacheKeys.modifiedTimes[path] = mtime;
}
}
diff --git a/packages/kbn-storybook/index.js b/packages/kbn-storybook/index.js
index 353a273881343..b595de8ea1c07 100644
--- a/packages/kbn-storybook/index.js
+++ b/packages/kbn-storybook/index.js
@@ -66,12 +66,17 @@ exports.runStorybookCli = config => {
// storybook never completes, so neither will this promise
const configDir = join(__dirname, 'storybook_config');
log.debug('Config dir:', configDir);
- await storybook({
+
+ const config = {
mode: flags.site ? 'static' : 'dev',
port: 9001,
configDir,
- outputDir: flags.site ? join(ASSET_DIR, name) : undefined,
- });
+ };
+ if (flags.site) {
+ config.outputDir = join(ASSET_DIR, name);
+ }
+
+ await storybook(config);
// Line is only reached when building the static version
if (flags.site) process.exit();
diff --git a/packages/kbn-ui-framework/package.json b/packages/kbn-ui-framework/package.json
index fc245ca3fe921..0402a83d3d274 100644
--- a/packages/kbn-ui-framework/package.json
+++ b/packages/kbn-ui-framework/package.json
@@ -17,7 +17,7 @@
"dependencies": {
"classnames": "2.2.6",
"focus-trap-react": "^3.1.1",
- "lodash": "npm:@elastic/lodash@3.10.1-kibana3",
+ "lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"prop-types": "15.6.0",
"react": "^16.12.0",
"react-ace": "^5.9.0",
diff --git a/packages/kbn-ui-shared-deps/package.json b/packages/kbn-ui-shared-deps/package.json
index acb2b48e12278..e9ad227b235fa 100644
--- a/packages/kbn-ui-shared-deps/package.json
+++ b/packages/kbn-ui-shared-deps/package.json
@@ -9,7 +9,7 @@
"kbn:watch": "node scripts/build --watch"
},
"devDependencies": {
- "@elastic/charts": "^17.0.2",
+ "@elastic/charts": "^17.1.1",
"abortcontroller-polyfill": "^1.4.0",
"@elastic/eui": "19.0.0",
"@kbn/babel-preset": "1.0.0",
diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md
index ca2f6789bebee..ba1988b857385 100644
--- a/src/core/public/public.api.md
+++ b/src/core/public/public.api.md
@@ -932,7 +932,7 @@ export type RecursiveReadonly = T extends (...args: any[]) => any ? T : T ext
}> : T;
// @public (undocumented)
-export interface SavedObject {
+export interface SavedObject {
attributes: T;
// (undocumented)
error?: {
@@ -975,13 +975,13 @@ export interface SavedObjectsBaseOptions {
}
// @public (undocumented)
-export interface SavedObjectsBatchResponse {
+export interface SavedObjectsBatchResponse {
// (undocumented)
savedObjects: Array>;
}
// @public (undocumented)
-export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions {
+export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions {
// (undocumented)
attributes: T;
// (undocumented)
@@ -994,7 +994,7 @@ export interface SavedObjectsBulkCreateOptions {
}
// @public (undocumented)
-export interface SavedObjectsBulkUpdateObject {
+export interface SavedObjectsBulkUpdateObject {
// (undocumented)
attributes: T;
// (undocumented)
@@ -1017,17 +1017,17 @@ export interface SavedObjectsBulkUpdateOptions {
export class SavedObjectsClient {
// @internal
constructor(http: HttpSetup);
- bulkCreate: (objects?: SavedObjectsBulkCreateObject[], options?: SavedObjectsBulkCreateOptions) => Promise>;
+ bulkCreate: (objects?: SavedObjectsBulkCreateObject[], options?: SavedObjectsBulkCreateOptions) => Promise>;
bulkGet: (objects?: {
id: string;
type: string;
- }[]) => Promise>;
- bulkUpdate(objects?: SavedObjectsBulkUpdateObject[]): Promise>;
- create: (type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise>;
+ }[]) => Promise>;
+ bulkUpdate(objects?: SavedObjectsBulkUpdateObject[]): Promise>;
+ create: (type: string, attributes: T, options?: SavedObjectsCreateOptions) => Promise>;
delete: (type: string, id: string) => Promise<{}>;
- find: (options: Pick) => Promise>;
- get: (type: string, id: string) => Promise>;
- update(type: string, id: string, attributes: T, { version, migrationVersion, references }?: SavedObjectsUpdateOptions): Promise>;
+ find: (options: Pick) => Promise>;
+ get: (type: string, id: string) => Promise>;
+ update(type: string, id: string, attributes: T, { version, migrationVersion, references }?: SavedObjectsUpdateOptions): Promise>;
}
// @public
@@ -1069,7 +1069,7 @@ export interface SavedObjectsFindOptions extends SavedObjectsBaseOptions {
}
// @public
-export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse {
+export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse {
// (undocumented)
page: number;
// (undocumented)
@@ -1176,7 +1176,7 @@ export interface SavedObjectsUpdateOptions {
}
// @public
-export class SimpleSavedObject {
+export class SimpleSavedObject {
constructor(client: SavedObjectsClientContract, { id, type, version, attributes, error, references, migrationVersion }: SavedObject);
// (undocumented)
attributes: T;
diff --git a/src/core/public/saved_objects/saved_objects_client.ts b/src/core/public/saved_objects/saved_objects_client.ts
index ccb23793a8534..afc77806afb91 100644
--- a/src/core/public/saved_objects/saved_objects_client.ts
+++ b/src/core/public/saved_objects/saved_objects_client.ts
@@ -22,7 +22,6 @@ import { resolve as resolveUrl } from 'url';
import {
SavedObject,
- SavedObjectAttributes,
SavedObjectReference,
SavedObjectsClientContract as SavedObjectsApi,
SavedObjectsFindOptions as SavedObjectFindOptionsServer,
@@ -61,9 +60,7 @@ export interface SavedObjectsCreateOptions {
*
* @public
*/
-export interface SavedObjectsBulkCreateObject<
- T extends SavedObjectAttributes = SavedObjectAttributes
-> extends SavedObjectsCreateOptions {
+export interface SavedObjectsBulkCreateObject extends SavedObjectsCreateOptions {
type: string;
attributes: T;
}
@@ -75,9 +72,7 @@ export interface SavedObjectsBulkCreateOptions {
}
/** @public */
-export interface SavedObjectsBulkUpdateObject<
- T extends SavedObjectAttributes = SavedObjectAttributes
-> {
+export interface SavedObjectsBulkUpdateObject {
type: string;
id: string;
attributes: T;
@@ -99,9 +94,7 @@ export interface SavedObjectsUpdateOptions {
}
/** @public */
-export interface SavedObjectsBatchResponse<
- T extends SavedObjectAttributes = SavedObjectAttributes
-> {
+export interface SavedObjectsBatchResponse {
savedObjects: Array>;
}
@@ -113,9 +106,7 @@ export interface SavedObjectsBatchResponse<
*
* @public
*/
-export interface SavedObjectsFindResponsePublic<
- T extends SavedObjectAttributes = SavedObjectAttributes
-> extends SavedObjectsBatchResponse {
+export interface SavedObjectsFindResponsePublic extends SavedObjectsBatchResponse {
total: number;
perPage: number;
page: number;
@@ -124,7 +115,7 @@ export interface SavedObjectsFindResponsePublic<
interface BatchQueueEntry {
type: string;
id: string;
- resolve: (value: SimpleSavedObject | SavedObject) => void;
+ resolve: (value: SimpleSavedObject | SavedObject) => void;
reject: (reason?: any) => void;
}
@@ -207,7 +198,7 @@ export class SavedObjectsClient {
* @param options
* @returns
*/
- public create = (
+ public create = (
type: string,
attributes: T,
options: SavedObjectsCreateOptions = {}
@@ -300,7 +291,7 @@ export class SavedObjectsClient {
* @property {object} [options.hasReference] - { type, id }
* @returns A find result with objects matching the specified search.
*/
- public find = (
+ public find = (
options: SavedObjectsFindOptions
): Promise> => {
const path = this.getPath(['_find']);
@@ -348,10 +339,7 @@ export class SavedObjectsClient {
* @param {string} id
* @returns The saved object for the given type and id.
*/
- public get = (
- type: string,
- id: string
- ): Promise> => {
+ public get = (type: string, id: string): Promise> => {
if (!type || !id) {
return Promise.reject(new Error('requires type and id'));
}
@@ -402,7 +390,7 @@ export class SavedObjectsClient {
* @prop {object} options.migrationVersion - The optional migrationVersion of this document
* @returns
*/
- public update(
+ public update(
type: string,
id: string,
attributes: T,
@@ -434,7 +422,7 @@ export class SavedObjectsClient {
* @param {array} objects - [{ type, id, attributes, options: { version, references } }]
* @returns The result of the update operation containing both failed and updated saved objects.
*/
- public bulkUpdate(objects: SavedObjectsBulkUpdateObject[] = []) {
+ public bulkUpdate(objects: SavedObjectsBulkUpdateObject[] = []) {
const path = this.getPath(['_bulk_update']);
return this.savedObjectsFetch(path, {
@@ -449,9 +437,7 @@ export class SavedObjectsClient {
});
}
- private createSavedObject(
- options: SavedObject
- ): SimpleSavedObject {
+ private createSavedObject(options: SavedObject): SimpleSavedObject {
return new SimpleSavedObject(this, options);
}
diff --git a/src/core/public/saved_objects/simple_saved_object.ts b/src/core/public/saved_objects/simple_saved_object.ts
index 8e464680bcf17..d3ba506b865a4 100644
--- a/src/core/public/saved_objects/simple_saved_object.ts
+++ b/src/core/public/saved_objects/simple_saved_object.ts
@@ -18,7 +18,7 @@
*/
import { get, has, set } from 'lodash';
-import { SavedObject as SavedObjectType, SavedObjectAttributes } from '../../server';
+import { SavedObject as SavedObjectType } from '../../server';
import { SavedObjectsClientContract } from './saved_objects_client';
/**
@@ -30,7 +30,7 @@ import { SavedObjectsClientContract } from './saved_objects_client';
*
* @public
*/
-export class SimpleSavedObject {
+export class SimpleSavedObject {
public attributes: T;
// We want to use the same interface this class had in JS
public _version?: SavedObjectType['version'];
@@ -46,7 +46,7 @@ export class SimpleSavedObject {
) {
this.id = id;
this.type = type;
- this.attributes = attributes || {};
+ this.attributes = attributes || ({} as T);
this.references = references || [];
this._version = version;
this.migrationVersion = migrationVersion;
diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/src/core/server/elasticsearch/elasticsearch_config.ts
index 50866e5550d8e..b2f4e388b337d 100644
--- a/src/core/server/elasticsearch/elasticsearch_config.ts
+++ b/src/core/server/elasticsearch/elasticsearch_config.ts
@@ -31,7 +31,12 @@ export const DEFAULT_API_VERSION = 'master';
export type ElasticsearchConfigType = TypeOf;
type SslConfigSchema = ElasticsearchConfigType['ssl'];
-const configSchema = schema.object({
+/**
+ * Validation schema for elasticsearch service config. It can be reused when plugins allow users
+ * to specify a local elasticsearch config.
+ * @public
+ */
+export const configSchema = schema.object({
sniffOnStart: schema.boolean({ defaultValue: false }),
sniffInterval: schema.oneOf([schema.duration(), schema.literal(false)], {
defaultValue: false,
@@ -148,6 +153,10 @@ export const config: ServiceConfigDescriptor = {
deprecations,
};
+/**
+ * Wrapper of config schema.
+ * @public
+ */
export class ElasticsearchConfig {
/**
* The interval between health check requests Kibana sends to the Elasticsearch.
diff --git a/src/core/server/elasticsearch/index.ts b/src/core/server/elasticsearch/index.ts
index 5d64fadfaa184..cfd72a6fd5e47 100644
--- a/src/core/server/elasticsearch/index.ts
+++ b/src/core/server/elasticsearch/index.ts
@@ -27,7 +27,7 @@ export {
} from './cluster_client';
export { IScopedClusterClient, ScopedClusterClient, Headers } from './scoped_cluster_client';
export { ElasticsearchClientConfig } from './elasticsearch_client_config';
-export { config } from './elasticsearch_config';
+export { config, configSchema, ElasticsearchConfig } from './elasticsearch_config';
export { ElasticsearchError, ElasticsearchErrorHelpers } from './errors';
export * from './api_types';
export * from './types';
diff --git a/src/core/server/index.ts b/src/core/server/index.ts
index cc838ddd1351d..52827b72ee0cc 100644
--- a/src/core/server/index.ts
+++ b/src/core/server/index.ts
@@ -39,7 +39,12 @@
* @packageDocumentation
*/
-import { ElasticsearchServiceSetup, IScopedClusterClient } from './elasticsearch';
+import {
+ ElasticsearchServiceSetup,
+ IScopedClusterClient,
+ configSchema as elasticsearchConfigSchema,
+} from './elasticsearch';
+
import { HttpServiceSetup } from './http';
import { IScopedRenderingClient } from './rendering';
import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plugins';
@@ -78,6 +83,7 @@ export {
Headers,
ScopedClusterClient,
IScopedClusterClient,
+ ElasticsearchConfig,
ElasticsearchClientConfig,
ElasticsearchError,
ElasticsearchErrorHelpers,
@@ -347,3 +353,14 @@ export {
PluginOpaqueId,
UuidServiceSetup,
};
+
+/**
+ * Config schemas for the platform services.
+ *
+ * @alpha
+ */
+export const config = {
+ elasticsearch: {
+ schema: elasticsearchConfigSchema,
+ },
+};
diff --git a/src/core/server/logging/README.md b/src/core/server/logging/README.md
index 3fbec7a45148d..ed64e7c4ce0b1 100644
--- a/src/core/server/logging/README.md
+++ b/src/core/server/logging/README.md
@@ -7,6 +7,8 @@
- [JSON layout](#json-layout)
- [Configuration](#configuration)
- [Usage](#usage)
+- [Logging config migration](#logging-config-migration)
+- [Log record format changes](#log-record-format-changes)
The way logging works in Kibana is inspired by `log4j 2` logging framework used by [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#logging).
The main idea is to have consistent logging behaviour (configuration, log format etc.) across the entire Elastic Stack
@@ -321,3 +323,23 @@ Define a custom logger for a specific context.
#### logging.filter
TBD
+
+### Log record format changes
+
+| Parameter | Platform log record in **pattern** format | Legacy Platform log record **text** format |
+| --------------- | ------------------------------------------ | ------------------------------------------ |
+| @timestamp | ISO8601 `2012-01-31T23:33:22.011Z` | Absolute `23:33:22.011` |
+| context | `parent.child` | `['parent', 'child']` |
+| level | `DEBUG` | `['debug']` |
+| meta | stringified JSON object `{"to": "v8"}` | N/A |
+| pid | can be configured as `%pid` | N/A |
+
+| Parameter | Platform log record in **json** format | Legacy Platform log record **json** format |
+| --------------- | ------------------------------------------ | -------------------------------------------- |
+| @timestamp | ISO8601_TZ `2012-01-31T23:33:22.011-05:00` | ISO8601 `2012-01-31T23:33:22.011Z` |
+| context | `context: parent.child` | `tags: ['parent', 'child']` |
+| level | `level: DEBUG` | `tags: ['debug']` |
+| meta | separate property `"meta": {"to": "v8"}` | merged in log record `{... "to": "v8"}` |
+| pid | `pid: 12345` | `pid: 12345` |
+| type | N/A | `type: log` |
+| error | `{ message, name, stack }` | `{ message, name, stack, code, signal }` |
\ No newline at end of file
diff --git a/src/core/server/saved_objects/import/collect_saved_objects.ts b/src/core/server/saved_objects/import/collect_saved_objects.ts
index 65ffd4d9a1d57..1a8ede41d0b2c 100644
--- a/src/core/server/saved_objects/import/collect_saved_objects.ts
+++ b/src/core/server/saved_objects/import/collect_saved_objects.ts
@@ -42,10 +42,10 @@ export async function collectSavedObjects({
supportedTypes,
}: CollectSavedObjectsOptions) {
const errors: SavedObjectsImportError[] = [];
- const collectedObjects: SavedObject[] = await createPromiseFromStreams([
+ const collectedObjects: Array> = await createPromiseFromStreams([
readStream,
createLimitStream(objectLimit),
- createFilterStream(obj => {
+ createFilterStream>(obj => {
if (supportedTypes.includes(obj.type)) {
return true;
}
diff --git a/src/core/server/saved_objects/import/extract_errors.ts b/src/core/server/saved_objects/import/extract_errors.ts
index 725e935f6e21d..5728ce8b7b59f 100644
--- a/src/core/server/saved_objects/import/extract_errors.ts
+++ b/src/core/server/saved_objects/import/extract_errors.ts
@@ -20,11 +20,12 @@ import { SavedObject } from '../types';
import { SavedObjectsImportError } from './types';
export function extractErrors(
- savedObjectResults: SavedObject[],
- savedObjectsToImport: SavedObject[]
+ // TODO: define saved object type
+ savedObjectResults: Array>,
+ savedObjectsToImport: Array>
) {
const errors: SavedObjectsImportError[] = [];
- const originalSavedObjectsMap = new Map();
+ const originalSavedObjectsMap = new Map>();
for (const savedObject of savedObjectsToImport) {
originalSavedObjectsMap.set(`${savedObject.type}:${savedObject.id}`, savedObject);
}
diff --git a/src/core/server/saved_objects/import/validate_references.ts b/src/core/server/saved_objects/import/validate_references.ts
index 4d9ee59f9df15..f0c033c1d00b4 100644
--- a/src/core/server/saved_objects/import/validate_references.ts
+++ b/src/core/server/saved_objects/import/validate_references.ts
@@ -77,7 +77,7 @@ export async function getNonExistingReferenceAsKeys(
}
export async function validateReferences(
- savedObjects: SavedObject[],
+ savedObjects: Array>,
savedObjectsClient: SavedObjectsClientContract,
namespace?: string
) {
diff --git a/src/core/server/saved_objects/management/management.ts b/src/core/server/saved_objects/management/management.ts
index 7b5274da91fc8..b7dce2c087c5f 100644
--- a/src/core/server/saved_objects/management/management.ts
+++ b/src/core/server/saved_objects/management/management.ts
@@ -23,9 +23,9 @@ interface SavedObjectsManagementTypeDefinition {
isImportableAndExportable?: boolean;
defaultSearchField?: string;
icon?: string;
- getTitle?: (savedObject: SavedObject) => string;
- getEditUrl?: (savedObject: SavedObject) => string;
- getInAppUrl?: (savedObject: SavedObject) => { path: string; uiCapabilitiesPath: string };
+ getTitle?: (savedObject: SavedObject) => string;
+ getEditUrl?: (savedObject: SavedObject) => string;
+ getInAppUrl?: (savedObject: SavedObject) => { path: string; uiCapabilitiesPath: string };
}
export interface SavedObjectsManagementDefinition {
diff --git a/src/core/server/saved_objects/serialization/types.ts b/src/core/server/saved_objects/serialization/types.ts
index aaf6f45c244ec..524c2c8ffae7a 100644
--- a/src/core/server/saved_objects/serialization/types.ts
+++ b/src/core/server/saved_objects/serialization/types.ts
@@ -50,7 +50,7 @@ export interface SavedObjectsRawDocSource {
* scenario out of the box.
*/
interface SavedObjectDoc {
- attributes: object;
+ attributes: unknown;
id?: string; // NOTE: SavedObjectDoc is used for uncreated objects where `id` is optional
type: string;
namespace?: string;
diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts
index b485b8dfe398c..72a7867854b60 100644
--- a/src/core/server/saved_objects/service/lib/repository.ts
+++ b/src/core/server/saved_objects/service/lib/repository.ts
@@ -48,7 +48,6 @@ import {
} from '../saved_objects_client';
import {
SavedObject,
- SavedObjectAttributes,
SavedObjectsBaseOptions,
SavedObjectsFindOptions,
SavedObjectsMigrationVersion,
@@ -213,7 +212,7 @@ export class SavedObjectsRepository {
* @property {array} [options.references=[]] - [{ name, type, id }]
* @returns {promise} - { id, type, version, attributes }
*/
- public async create(
+ public async create(
type: string,
attributes: T,
options: SavedObjectsCreateOptions = {}
@@ -254,7 +253,7 @@ export class SavedObjectsRepository {
body: raw._source,
});
- return this._rawToSavedObject({
+ return this._rawToSavedObject({
...raw,
...response,
});
@@ -277,7 +276,7 @@ export class SavedObjectsRepository {
* @property {string} [options.namespace]
* @returns {promise} - {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}
*/
- async bulkCreate(
+ async bulkCreate(
objects: Array>,
options: SavedObjectsCreateOptions = {}
): Promise> {
@@ -464,7 +463,7 @@ export class SavedObjectsRepository {
* @property {object} [options.hasReference] - { type, id }
* @returns {promise} - { saved_objects: [{ id, type, version, attributes }], total, per_page, page }
*/
- async find({
+ async find({
search,
defaultSearchOperator = 'OR',
searchFields,
@@ -577,7 +576,7 @@ export class SavedObjectsRepository {
* { id: 'foo', type: 'index-pattern' }
* ])
*/
- async bulkGet(
+ async bulkGet(
objects: SavedObjectsBulkGetObject[] = [],
options: SavedObjectsBaseOptions = {}
): Promise> {
@@ -648,7 +647,7 @@ export class SavedObjectsRepository {
* @property {string} [options.namespace]
* @returns {promise} - { id, type, version, attributes }
*/
- async get(
+ async get(
type: string,
id: string,
options: SavedObjectsBaseOptions = {}
@@ -696,7 +695,7 @@ export class SavedObjectsRepository {
* @property {array} [options.references] - [{ name, type, id }]
* @returns {promise}
*/
- async update(
+ async update(
type: string,
id: string,
attributes: Partial,
@@ -753,7 +752,7 @@ export class SavedObjectsRepository {
* @property {string} [options.namespace]
* @returns {promise} - {saved_objects: [[{ id, type, version, references, attributes, error: { message } }]}
*/
- async bulkUpdate