string
| |
| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | string
| |
| [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string | string[]
| |
+| [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined>
| This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type
and namespaces
fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |
diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md
new file mode 100644
index 0000000000000..4af8c9ddeaff4
--- /dev/null
+++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [SavedObjectsFindOptions](./kibana-plugin-core-public.savedobjectsfindoptions.md) > [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md)
+
+## SavedObjectsFindOptions.typeToNamespacesMap property
+
+This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the `type` and `namespaces` fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace.
+
+Signature:
+
+```typescript
+typeToNamespacesMap?: MapIKibanaSocket
| [IKibanaSocket](./kibana-plugin-core-server.ikibanasocket.md) |
| [url](./kibana-plugin-core-server.kibanarequest.url.md) | | Url
| a WHATWG URL standard object. |
+| [uuid](./kibana-plugin-core-server.kibanarequest.uuid.md) | | string
| A UUID to identify this request. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanarequest.uuid.md b/docs/development/core/server/kibana-plugin-core-server.kibanarequest.uuid.md
new file mode 100644
index 0000000000000..8b980b82d0adb
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.kibanarequest.uuid.md
@@ -0,0 +1,18 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [KibanaRequest](./kibana-plugin-core-server.kibanarequest.md) > [uuid](./kibana-plugin-core-server.kibanarequest.uuid.md)
+
+## KibanaRequest.uuid property
+
+A UUID to identify this request.
+
+Signature:
+
+```typescript
+readonly uuid: string;
+```
+
+## Remarks
+
+This value is NOT sourced from the incoming request's `X-Opaque-Id` header. it is always a UUID uniquely identifying the request.
+
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
index 804c83f7c1b48..ce5c20e60ca11 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md
@@ -29,4 +29,5 @@ export interface SavedObjectsFindOptions
| [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string
| |
| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | string
| |
| [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string | string[]
| |
+| [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined>
| This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type
and namespaces
fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md
new file mode 100644
index 0000000000000..8bec759f05580
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsFindOptions](./kibana-plugin-core-server.savedobjectsfindoptions.md) > [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md)
+
+## SavedObjectsFindOptions.typeToNamespacesMap property
+
+This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the `type` and `namespaces` fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace.
+
+Signature:
+
+```typescript
+typeToNamespacesMap?: MapSavedObjectsFindOptions
| |
+| options | SavedObjectsFindOptions
| |
Returns:
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
index 14d3741425987..1d11d5262a9c4 100644
--- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsrepository.md
@@ -24,7 +24,7 @@ export declare class SavedObjectsRepository
| [delete(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.delete.md) | | Deletes an object |
| [deleteByNamespace(namespace, options)](./kibana-plugin-core-server.savedobjectsrepository.deletebynamespace.md) | | Deletes all objects from the provided namespace. |
| [deleteFromNamespaces(type, id, namespaces, options)](./kibana-plugin-core-server.savedobjectsrepository.deletefromnamespaces.md) | | Removes one or more namespaces from a given multi-namespace saved object. If no namespaces remain, the saved object is deleted entirely. This method and \[addToNamespaces
\][SavedObjectsRepository.addToNamespaces()](./kibana-plugin-core-server.savedobjectsrepository.addtonamespaces.md) are the only ways to change which Spaces a multi-namespace saved object is shared to. |
-| [find({ search, defaultSearchOperator, searchFields, rootSearchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, })](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
+| [find(options)](./kibana-plugin-core-server.savedobjectsrepository.find.md) | | |
| [get(type, id, options)](./kibana-plugin-core-server.savedobjectsrepository.get.md) | | Gets a single object |
| [incrementCounter(type, id, counterFieldName, options)](./kibana-plugin-core-server.savedobjectsrepository.incrementcounter.md) | | Increases a counter field by one. Creates the document if one doesn't exist for the given id. |
| [update(type, id, attributes, options)](./kibana-plugin-core-server.savedobjectsrepository.update.md) | | Updates an object |
diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md
new file mode 100644
index 0000000000000..40e865cb02ce8
--- /dev/null
+++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsUtils](./kibana-plugin-core-server.savedobjectsutils.md) > [createEmptyFindResponse](./kibana-plugin-core-server.savedobjectsutils.createemptyfindresponse.md)
+
+## SavedObjectsUtils.createEmptyFindResponse property
+
+Creates an empty response for a find operation. This is only intended to be used by saved objects client wrappers.
+
+Signature:
+
+```typescript
+static createEmptyFindResponse: static
| <T>({ page, perPage, }: SavedObjectsFindOptions) => SavedObjectsFindResponse<T>
| Creates an empty response for a find operation. This is only intended to be used by saved objects client wrappers. |
| [namespaceIdToString](./kibana-plugin-core-server.savedobjectsutils.namespaceidtostring.md) | static
| (namespace?: string | undefined) => string
| Converts a given saved object namespace ID to its string representation. All namespace IDs have an identical string representation, with the exception of the undefined
namespace ID (which has a namespace string of 'default'
). |
| [namespaceStringToId](./kibana-plugin-core-server.savedobjectsutils.namespacestringtoid.md) | static
| (namespace: string) => string | undefined
| Converts a given saved object namespace string to its ID representation. All namespace strings have an identical ID representation, with the exception of the 'default'
namespace string (which has a namespace ID of undefined
). |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md
new file mode 100644
index 0000000000000..676f1a2c785f8
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DuplicateIndexPatternError](./kibana-plugin-plugins-data-public.duplicateindexpatternerror.md) > [(constructor)](./kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md)
+
+## DuplicateIndexPatternError.(constructor)
+
+Constructs a new instance of the `DuplicateIndexPatternError` class
+
+Signature:
+
+```typescript
+constructor(message: string);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| message | string
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror.md
new file mode 100644
index 0000000000000..7ed8f97976464
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.duplicateindexpatternerror.md
@@ -0,0 +1,18 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DuplicateIndexPatternError](./kibana-plugin-plugins-data-public.duplicateindexpatternerror.md)
+
+## DuplicateIndexPatternError class
+
+Signature:
+
+```typescript
+export declare class DuplicateIndexPatternError extends Error
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)(message)](./kibana-plugin-plugins-data-public.duplicateindexpatternerror._constructor_.md) | | Constructs a new instance of the DuplicateIndexPatternError
class |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md
index 2c131c6da9937..60ac95bc21af2 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md
@@ -7,8 +7,5 @@
Signature:
```typescript
-fieldFormatMap?: RecordRecord<string, {
id: string;
params: unknown;
}>
| |
+| [fieldFormatMap](./kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md) | Record<string, SerializedFieldFormat<unknown> | undefined>
| |
| [fields](./kibana-plugin-plugins-data-public.iindexpattern.fields.md) | IFieldType[]
| |
+| [getFormatterForField](./kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md) | (field: IndexPatternField | IndexPatternField['spec'] | IFieldType) => FieldFormat
| |
| [id](./kibana-plugin-plugins-data-public.iindexpattern.id.md) | string
| |
| [timeFieldName](./kibana-plugin-plugins-data-public.iindexpattern.timefieldname.md) | string
| |
| [title](./kibana-plugin-plugins-data-public.iindexpattern.title.md) | string
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.tospec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.tospec.md
index fd20f2944c5be..0fe62f575a927 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.tospec.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpatternfieldlist.tospec.md
@@ -9,7 +9,7 @@
```typescript
toSpec(options?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
- }): FieldSpec[];
+ }): IndexPatternFieldMap;
```
## Parameters
@@ -20,5 +20,5 @@ toSpec(options?: {
Returns:
-`FieldSpec[]`
+`IndexPatternFieldMap`
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md
index a5bb15c963978..4baf98038f89a 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._constructor_.md
@@ -9,13 +9,12 @@ Constructs a new instance of the `IndexPattern` class
Signature:
```typescript
-constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, }: IndexPatternDeps);
+constructor({ spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| id | string | undefined
| |
-| { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, } | IndexPatternDeps
| |
+| { spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, } | IndexPatternDeps
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._fetchfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._fetchfields.md
deleted file mode 100644
index 8fff8baa71139..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern._fetchfields.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [\_fetchFields](./kibana-plugin-plugins-data-public.indexpattern._fetchfields.md)
-
-## IndexPattern.\_fetchFields() method
-
-Signature:
-
-```typescript
-_fetchFields(): Promisestring
| |
| script | string
| |
-| fieldType | string | undefined
| |
+| fieldType | string
| |
| lang | string
| |
Returns:
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.create.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.create.md
deleted file mode 100644
index 5c122b835f59d..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.create.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [create](./kibana-plugin-plugins-data-public.indexpattern.create.md)
-
-## IndexPattern.create() method
-
-Signature:
-
-```typescript
-create(allowOverride?: boolean): Promiseboolean
| |
-
-Returns:
-
-`PromiseIndexPatternField | IndexPatternField['spec']
| |
+| field | IndexPatternField | IndexPatternField['spec'] | IFieldType
| |
Returns:
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md
new file mode 100644
index 0000000000000..349da63c13ca7
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md)
+
+## IndexPattern.getOriginalSavedObjectBody property
+
+Get last saved saved object fields
+
+Signature:
+
+```typescript
+getOriginalSavedObjectBody: () => {
+ title?: string | undefined;
+ timeFieldName?: string | undefined;
+ intervalName?: string | undefined;
+ fields?: string | undefined;
+ sourceFilters?: string | undefined;
+ fieldFormatMap?: string | undefined;
+ typeMeta?: string | undefined;
+ type?: string | undefined;
+ };
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md
index 121d32c7c40c8..4ce0144b73882 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md
@@ -4,6 +4,8 @@
## IndexPattern.getSourceFiltering() method
+Get the source filtering configuration for that index.
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.init.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.init.md
deleted file mode 100644
index 595992dc82b74..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.init.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [init](./kibana-plugin-plugins-data-public.indexpattern.init.md)
-
-## IndexPattern.init() method
-
-Signature:
-
-```typescript
-init(): PromiseIndexPatternSpec
| |
-
-Returns:
-
-`this`
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.iswildcard.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.iswildcard.md
deleted file mode 100644
index e5ea55ef1dd48..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.iswildcard.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [isWildcard](./kibana-plugin-plugins-data-public.indexpattern.iswildcard.md)
-
-## IndexPattern.isWildcard() method
-
-Signature:
-
-```typescript
-isWildcard(): boolean;
-```
-Returns:
-
-`boolean`
-
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
index 87ce1e258712a..2ff575bc4fc22 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
@@ -14,22 +14,22 @@ export declare class IndexPattern implements IIndexPattern
| Constructor | Modifiers | Description |
| --- | --- | --- |
-| [(constructor)(id, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, shortDotsEnable, metaFields, })](./kibana-plugin-plugins-data-public.indexpattern._constructor_.md) | | Constructs a new instance of the IndexPattern
class |
+| [(constructor)({ spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, })](./kibana-plugin-plugins-data-public.indexpattern._constructor_.md) | | Constructs a new instance of the IndexPattern
class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
-| [fieldFormatMap](./kibana-plugin-plugins-data-public.indexpattern.fieldformatmap.md) | | any
| |
-| [fields](./kibana-plugin-plugins-data-public.indexpattern.fields.md) | | IIndexPatternFieldList & {
toSpec: () => FieldSpec[];
}
| |
-| [fieldsFetcher](./kibana-plugin-plugins-data-public.indexpattern.fieldsfetcher.md) | | any
| |
-| [flattenHit](./kibana-plugin-plugins-data-public.indexpattern.flattenhit.md) | | any
| |
-| [formatField](./kibana-plugin-plugins-data-public.indexpattern.formatfield.md) | | any
| |
-| [formatHit](./kibana-plugin-plugins-data-public.indexpattern.formathit.md) | | any
| |
+| [fieldFormatMap](./kibana-plugin-plugins-data-public.indexpattern.fieldformatmap.md) | | Record<string, any>
| |
+| [fields](./kibana-plugin-plugins-data-public.indexpattern.fields.md) | | IIndexPatternFieldList & {
toSpec: () => IndexPatternFieldMap;
}
| |
+| [flattenHit](./kibana-plugin-plugins-data-public.indexpattern.flattenhit.md) | | (hit: Record<string, any>, deep?: boolean) => Record<string, any>
| |
+| [formatField](./kibana-plugin-plugins-data-public.indexpattern.formatfield.md) | | FormatFieldFn
| |
+| [formatHit](./kibana-plugin-plugins-data-public.indexpattern.formathit.md) | | {
(hit: Record<string, any>, type?: string): any;
formatField: FormatFieldFn;
}
| |
+| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-public.indexpattern.getoriginalsavedobjectbody.md) | | () => {
title?: string | undefined;
timeFieldName?: string | undefined;
intervalName?: string | undefined;
fields?: string | undefined;
sourceFilters?: string | undefined;
fieldFormatMap?: string | undefined;
typeMeta?: string | undefined;
type?: string | undefined;
}
| Get last saved saved object fields |
| [id](./kibana-plugin-plugins-data-public.indexpattern.id.md) | | string
| |
| [intervalName](./kibana-plugin-plugins-data-public.indexpattern.intervalname.md) | | string | undefined
| |
| [metaFields](./kibana-plugin-plugins-data-public.indexpattern.metafields.md) | | string[]
| |
-| [originalBody](./kibana-plugin-plugins-data-public.indexpattern.originalbody.md) | | {
[key: string]: any;
}
| |
+| [resetOriginalSavedObjectBody](./kibana-plugin-plugins-data-public.indexpattern.resetoriginalsavedobjectbody.md) | | () => void
| Reset last saved saved object fields. used after saving |
| [sourceFilters](./kibana-plugin-plugins-data-public.indexpattern.sourcefilters.md) | | SourceFilter[]
| |
| [timeFieldName](./kibana-plugin-plugins-data-public.indexpattern.timefieldname.md) | | string | undefined
| |
| [title](./kibana-plugin-plugins-data-public.indexpattern.title.md) | | string
| |
@@ -41,26 +41,20 @@ export declare class IndexPattern implements IIndexPattern
| Method | Modifiers | Description |
| --- | --- | --- |
-| [\_fetchFields()](./kibana-plugin-plugins-data-public.indexpattern._fetchfields.md) | | |
-| [addScriptedField(name, script, fieldType, lang)](./kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md) | | |
-| [create(allowOverride)](./kibana-plugin-plugins-data-public.indexpattern.create.md) | | |
+| [addScriptedField(name, script, fieldType, lang)](./kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md) | | Add scripted field to field list |
| [getAggregationRestrictions()](./kibana-plugin-plugins-data-public.indexpattern.getaggregationrestrictions.md) | | |
+| [getAsSavedObjectBody()](./kibana-plugin-plugins-data-public.indexpattern.getassavedobjectbody.md) | | Returns index pattern as saved object body for saving |
| [getComputedFields()](./kibana-plugin-plugins-data-public.indexpattern.getcomputedfields.md) | | |
| [getFieldByName(name)](./kibana-plugin-plugins-data-public.indexpattern.getfieldbyname.md) | | |
-| [getFormatterForField(field)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md) | | |
+| [getFormatterForField(field)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter |
| [getNonScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md) | | |
| [getScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md) | | |
-| [getSourceFiltering()](./kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md) | | |
+| [getSourceFiltering()](./kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. |
| [getTimeField()](./kibana-plugin-plugins-data-public.indexpattern.gettimefield.md) | | |
-| [init()](./kibana-plugin-plugins-data-public.indexpattern.init.md) | | |
-| [initFromSpec(spec)](./kibana-plugin-plugins-data-public.indexpattern.initfromspec.md) | | |
| [isTimeBased()](./kibana-plugin-plugins-data-public.indexpattern.istimebased.md) | | |
| [isTimeBasedWildcard()](./kibana-plugin-plugins-data-public.indexpattern.istimebasedwildcard.md) | | |
| [isTimeNanosBased()](./kibana-plugin-plugins-data-public.indexpattern.istimenanosbased.md) | | |
-| [isWildcard()](./kibana-plugin-plugins-data-public.indexpattern.iswildcard.md) | | |
| [popularizeField(fieldName, unit)](./kibana-plugin-plugins-data-public.indexpattern.popularizefield.md) | | |
-| [prepBody()](./kibana-plugin-plugins-data-public.indexpattern.prepbody.md) | | |
-| [refreshFields()](./kibana-plugin-plugins-data-public.indexpattern.refreshfields.md) | | |
-| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | |
+| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | Remove scripted field from field list |
| [toSpec()](./kibana-plugin-plugins-data-public.indexpattern.tospec.md) | | |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.originalbody.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.originalbody.md
deleted file mode 100644
index 4bc3c76afbae9..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.originalbody.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [originalBody](./kibana-plugin-plugins-data-public.indexpattern.originalbody.md)
-
-## IndexPattern.originalBody property
-
-Signature:
-
-```typescript
-originalBody: {
- [key: string]: any;
- };
-```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.refreshfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.refreshfields.md
deleted file mode 100644
index 271d0c45a4244..0000000000000
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.refreshfields.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [refreshFields](./kibana-plugin-plugins-data-public.indexpattern.refreshfields.md)
-
-## IndexPattern.refreshFields() method
-
-Signature:
-
-```typescript
-refreshFields(): Promiseboolean
| |
-| [conflictDescriptions](./kibana-plugin-plugins-data-public.indexpatternfield.conflictdescriptions.md) | | Record<string, string[]> | undefined
| |
-| [count](./kibana-plugin-plugins-data-public.indexpatternfield.count.md) | | number
| |
+| [conflictDescriptions](./kibana-plugin-plugins-data-public.indexpatternfield.conflictdescriptions.md) | | Record<string, string[]> | undefined
| Description of field type conflicts across different indices in the same index pattern |
+| [count](./kibana-plugin-plugins-data-public.indexpatternfield.count.md) | | number
| Count is used for field popularity |
| [displayName](./kibana-plugin-plugins-data-public.indexpatternfield.displayname.md) | | string
| |
| [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | undefined
| |
| [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean
| |
-| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | undefined
| |
+| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | undefined
| Script field language |
| [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string
| |
| [readFromDocValues](./kibana-plugin-plugins-data-public.indexpatternfield.readfromdocvalues.md) | | boolean
| |
-| [script](./kibana-plugin-plugins-data-public.indexpatternfield.script.md) | | string | undefined
| |
+| [script](./kibana-plugin-plugins-data-public.indexpatternfield.script.md) | | string | undefined
| Script field code |
| [scripted](./kibana-plugin-plugins-data-public.indexpatternfield.scripted.md) | | boolean
| |
| [searchable](./kibana-plugin-plugins-data-public.indexpatternfield.searchable.md) | | boolean
| |
| [sortable](./kibana-plugin-plugins-data-public.indexpatternfield.sortable.md) | | boolean
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md
index 27f9c797c92f2..7501e191d9363 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.script.md
@@ -4,6 +4,8 @@
## IndexPatternField.script property
+Script field code
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
index 1d80c90991f55..711d6ad660450 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tospec.md
@@ -9,24 +9,7 @@
```typescript
toSpec({ getFormatterForField, }?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
- }): {
- count: number;
- script: string | undefined;
- lang: string | undefined;
- conflictDescriptions: RecordIndexPatternFieldMap
| |
+| [id](./kibana-plugin-plugins-data-public.indexpatternspec.id.md) | string
| |
+| [intervalName](./kibana-plugin-plugins-data-public.indexpatternspec.intervalname.md) | string
| |
+| [sourceFilters](./kibana-plugin-plugins-data-public.indexpatternspec.sourcefilters.md) | SourceFilter[]
| |
+| [timeFieldName](./kibana-plugin-plugins-data-public.indexpatternspec.timefieldname.md) | string
| |
+| [title](./kibana-plugin-plugins-data-public.indexpatternspec.title.md) | string
| |
+| [type](./kibana-plugin-plugins-data-public.indexpatternspec.type.md) | string
| |
+| [typeMeta](./kibana-plugin-plugins-data-public.indexpatternspec.typemeta.md) | TypeMeta
| |
+| [version](./kibana-plugin-plugins-data-public.indexpatternspec.version.md) | string
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.sourcefilters.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.sourcefilters.md
new file mode 100644
index 0000000000000..cda5285730135
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.sourcefilters.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [sourceFilters](./kibana-plugin-plugins-data-public.indexpatternspec.sourcefilters.md)
+
+## IndexPatternSpec.sourceFilters property
+
+Signature:
+
+```typescript
+sourceFilters?: SourceFilter[];
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.timefieldname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.timefieldname.md
new file mode 100644
index 0000000000000..a527e3ac0658b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.timefieldname.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [timeFieldName](./kibana-plugin-plugins-data-public.indexpatternspec.timefieldname.md)
+
+## IndexPatternSpec.timeFieldName property
+
+Signature:
+
+```typescript
+timeFieldName?: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.title.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.title.md
new file mode 100644
index 0000000000000..4cc6d3c2524a7
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.title.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [title](./kibana-plugin-plugins-data-public.indexpatternspec.title.md)
+
+## IndexPatternSpec.title property
+
+Signature:
+
+```typescript
+title?: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.type.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.type.md
new file mode 100644
index 0000000000000..d1c49be1b706f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.type.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [type](./kibana-plugin-plugins-data-public.indexpatternspec.type.md)
+
+## IndexPatternSpec.type property
+
+Signature:
+
+```typescript
+type?: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.typemeta.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.typemeta.md
new file mode 100644
index 0000000000000..9303047e905d3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.typemeta.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [typeMeta](./kibana-plugin-plugins-data-public.indexpatternspec.typemeta.md)
+
+## IndexPatternSpec.typeMeta property
+
+Signature:
+
+```typescript
+typeMeta?: TypeMeta;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.version.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.version.md
new file mode 100644
index 0000000000000..43f7cf0226fb0
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternspec.version.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternSpec](./kibana-plugin-plugins-data-public.indexpatternspec.md) > [version](./kibana-plugin-plugins-data-public.indexpatternspec.version.md)
+
+## IndexPatternSpec.version property
+
+Signature:
+
+```typescript
+version?: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice._constructor_.md
new file mode 100644
index 0000000000000..ab397efb1fe0e
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice._constructor_.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [(constructor)](./kibana-plugin-plugins-data-public.indexpatternsservice._constructor_.md)
+
+## IndexPatternsService.(constructor)
+
+Constructs a new instance of the `IndexPatternsService` class
+
+Signature:
+
+```typescript
+constructor({ uiSettings, savedObjectsClient, apiClient, fieldFormats, onNotification, onError, onRedirectNoIndexPattern, }: IndexPatternsServiceDeps);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| { uiSettings, savedObjectsClient, apiClient, fieldFormats, onNotification, onError, onRedirectNoIndexPattern, } | IndexPatternsServiceDeps
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md
new file mode 100644
index 0000000000000..b371218325086
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [clearCache](./kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md)
+
+## IndexPatternsService.clearCache property
+
+Clear index pattern list cache
+
+Signature:
+
+```typescript
+clearCache: (id?: string | undefined) => void;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.create.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.create.md
new file mode 100644
index 0000000000000..d7152ba617cc6
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.create.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [create](./kibana-plugin-plugins-data-public.indexpatternsservice.create.md)
+
+## IndexPatternsService.create() method
+
+Create a new index pattern instance
+
+Signature:
+
+```typescript
+create(spec: IndexPatternSpec, skipFetchFields?: boolean): PromiseIndexPatternSpec
| |
+| skipFetchFields | boolean
| |
+
+Returns:
+
+`PromiseIndexPatternSpec
| |
+| override | boolean
| |
+| skipFetchFields | boolean
| |
+
+Returns:
+
+`PromiseIndexPattern
| |
+| override | boolean
| |
+
+Returns:
+
+`Promisestring
| |
+
+Returns:
+
+`Promise<{}>`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md
new file mode 100644
index 0000000000000..3b6a8c7e4a04f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [ensureDefaultIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md)
+
+## IndexPatternsService.ensureDefaultIndexPattern property
+
+Signature:
+
+```typescript
+ensureDefaultIndexPattern: EnsureDefaultIndexPattern;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md
new file mode 100644
index 0000000000000..ed365fe03f980
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [fieldArrayToMap](./kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md)
+
+## IndexPatternsService.fieldArrayToMap property
+
+Converts field array to map
+
+Signature:
+
+```typescript
+fieldArrayToMap: (fields: FieldSpec[]) => RecordIndexPatternsService
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [clearCache](./kibana-plugin-plugins-data-public.indexpatternsservice.clearcache.md) | | (id?: string | undefined) => void
| Clear index pattern list cache |
+| [ensureDefaultIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.ensuredefaultindexpattern.md) | | EnsureDefaultIndexPattern
| |
+| [fieldArrayToMap](./kibana-plugin-plugins-data-public.indexpatternsservice.fieldarraytomap.md) | | (fields: FieldSpec[]) => Record<string, FieldSpec>
| Converts field array to map |
+| [get](./kibana-plugin-plugins-data-public.indexpatternsservice.get.md) | | (id: string) => Promise<IndexPattern>
| Get an index pattern by id. Cache optimized |
+| [getCache](./kibana-plugin-plugins-data-public.indexpatternsservice.getcache.md) | | () => Promise<SavedObject<IndexPatternSavedObjectAttrs>[] | null | undefined>
| |
+| [getDefault](./kibana-plugin-plugins-data-public.indexpatternsservice.getdefault.md) | | () => Promise<IndexPattern | null>
| Get default index pattern |
+| [getFieldsForIndexPattern](./kibana-plugin-plugins-data-public.indexpatternsservice.getfieldsforindexpattern.md) | | (indexPattern: IndexPattern | IndexPatternSpec, options?: GetFieldsOptions) => Promise<any>
| Get field list by providing an index patttern (or spec) |
+| [getFieldsForWildcard](./kibana-plugin-plugins-data-public.indexpatternsservice.getfieldsforwildcard.md) | | (options?: GetFieldsOptions) => Promise<any>
| Get field list by providing { pattern } |
+| [getIds](./kibana-plugin-plugins-data-public.indexpatternsservice.getids.md) | | (refresh?: boolean) => Promise<string[]>
| Get list of index pattern ids |
+| [getTitles](./kibana-plugin-plugins-data-public.indexpatternsservice.gettitles.md) | | (refresh?: boolean) => Promise<string[]>
| Get list of index pattern titles |
+| [refreshFields](./kibana-plugin-plugins-data-public.indexpatternsservice.refreshfields.md) | | (indexPattern: IndexPattern) => Promise<void>
| Refresh field list for a given index pattern |
+| [savedObjectToSpec](./kibana-plugin-plugins-data-public.indexpatternsservice.savedobjecttospec.md) | | (savedObject: SavedObject<IndexPatternAttributes>) => IndexPatternSpec
| Converts index pattern saved object to index pattern spec |
+| [setDefault](./kibana-plugin-plugins-data-public.indexpatternsservice.setdefault.md) | | (id: string, force?: boolean) => Promise<void>
| Optionally set default index pattern, unless force = true |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [create(spec, skipFetchFields)](./kibana-plugin-plugins-data-public.indexpatternsservice.create.md) | | Create a new index pattern instance |
+| [createAndSave(spec, override, skipFetchFields)](./kibana-plugin-plugins-data-public.indexpatternsservice.createandsave.md) | | Create a new index pattern and save it right away |
+| [createSavedObject(indexPattern, override)](./kibana-plugin-plugins-data-public.indexpatternsservice.createsavedobject.md) | | Save a new index pattern |
+| [delete(indexPatternId)](./kibana-plugin-plugins-data-public.indexpatternsservice.delete.md) | | Deletes an index pattern from .kibana index |
+| [updateSavedObject(indexPattern, saveAttempts)](./kibana-plugin-plugins-data-public.indexpatternsservice.updatesavedobject.md) | | Save existing index pattern. Will attempt to merge differences if there are conflicts |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.refreshfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.refreshfields.md
new file mode 100644
index 0000000000000..b7c47efbb445a
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternsservice.refreshfields.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPatternsService](./kibana-plugin-plugins-data-public.indexpatternsservice.md) > [refreshFields](./kibana-plugin-plugins-data-public.indexpatternsservice.refreshfields.md)
+
+## IndexPatternsService.refreshFields property
+
+Refresh field list for a given index pattern
+
+Signature:
+
+```typescript
+refreshFields: (indexPattern: IndexPattern) => PromiseIndexPattern
| |
+| saveAttempts | number
| |
+
+Returns:
+
+`Promiseboolean
| |
+| [esTypes](./kibana-plugin-plugins-data-server.fielddescriptor.estypes.md) | string[]
| |
+| [name](./kibana-plugin-plugins-data-server.fielddescriptor.name.md) | string
| |
+| [readFromDocValues](./kibana-plugin-plugins-data-server.fielddescriptor.readfromdocvalues.md) | boolean
| |
+| [searchable](./kibana-plugin-plugins-data-server.fielddescriptor.searchable.md) | boolean
| |
+| [subType](./kibana-plugin-plugins-data-server.fielddescriptor.subtype.md) | FieldSubType
| |
+| [type](./kibana-plugin-plugins-data-server.fielddescriptor.type.md) | string
| |
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.name.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.name.md
new file mode 100644
index 0000000000000..178880a34cd4d
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.name.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) > [name](./kibana-plugin-plugins-data-server.fielddescriptor.name.md)
+
+## FieldDescriptor.name property
+
+Signature:
+
+```typescript
+name: string;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.readfromdocvalues.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.readfromdocvalues.md
new file mode 100644
index 0000000000000..b60dc5d0dfed0
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.readfromdocvalues.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) > [readFromDocValues](./kibana-plugin-plugins-data-server.fielddescriptor.readfromdocvalues.md)
+
+## FieldDescriptor.readFromDocValues property
+
+Signature:
+
+```typescript
+readFromDocValues: boolean;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.searchable.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.searchable.md
new file mode 100644
index 0000000000000..efc7b4219a355
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.searchable.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) > [searchable](./kibana-plugin-plugins-data-server.fielddescriptor.searchable.md)
+
+## FieldDescriptor.searchable property
+
+Signature:
+
+```typescript
+searchable: boolean;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.subtype.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.subtype.md
new file mode 100644
index 0000000000000..b08179f12f250
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.subtype.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) > [subType](./kibana-plugin-plugins-data-server.fielddescriptor.subtype.md)
+
+## FieldDescriptor.subType property
+
+Signature:
+
+```typescript
+subType?: FieldSubType;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.type.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.type.md
new file mode 100644
index 0000000000000..7b0513a60c90e
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.type.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) > [type](./kibana-plugin-plugins-data-server.fielddescriptor.type.md)
+
+## FieldDescriptor.type property
+
+Signature:
+
+```typescript
+type: string;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fieldformatmap.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fieldformatmap.md
deleted file mode 100644
index ab9e3171d7d7b..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fieldformatmap.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [fieldFormatMap](./kibana-plugin-plugins-data-server.iindexpattern.fieldformatmap.md)
-
-## IIndexPattern.fieldFormatMap property
-
-Signature:
-
-```typescript
-fieldFormatMap?: RecordRecord<string, {
id: string;
params: unknown;
}>
| |
-| [fields](./kibana-plugin-plugins-data-server.iindexpattern.fields.md) | IFieldType[]
| |
-| [id](./kibana-plugin-plugins-data-server.iindexpattern.id.md) | string
| |
-| [timeFieldName](./kibana-plugin-plugins-data-server.iindexpattern.timefieldname.md) | string
| |
-| [title](./kibana-plugin-plugins-data-server.iindexpattern.title.md) | string
| |
-| [type](./kibana-plugin-plugins-data-server.iindexpattern.type.md) | string
| |
-
-## Methods
-
-| Method | Description |
-| --- | --- |
-| [getTimeField()](./kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md) | |
-
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.timefieldname.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.timefieldname.md
deleted file mode 100644
index 14cf514477da4..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.timefieldname.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [timeFieldName](./kibana-plugin-plugins-data-server.iindexpattern.timefieldname.md)
-
-## IIndexPattern.timeFieldName property
-
-Signature:
-
-```typescript
-timeFieldName?: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.title.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.title.md
deleted file mode 100644
index 119963d7ff95d..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.title.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [title](./kibana-plugin-plugins-data-server.iindexpattern.title.md)
-
-## IIndexPattern.title property
-
-Signature:
-
-```typescript
-title: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.type.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.type.md
deleted file mode 100644
index 6b89b71664b23..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.type.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [type](./kibana-plugin-plugins-data-server.iindexpattern.type.md)
-
-## IIndexPattern.type property
-
-Signature:
-
-```typescript
-type?: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._constructor_.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._constructor_.md
new file mode 100644
index 0000000000000..f7f8e51c4b632
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._constructor_.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [(constructor)](./kibana-plugin-plugins-data-server.indexpattern._constructor_.md)
+
+## IndexPattern.(constructor)
+
+Constructs a new instance of the `IndexPattern` class
+
+Signature:
+
+```typescript
+constructor({ spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| { spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, } | IndexPatternDeps
| |
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md
new file mode 100644
index 0000000000000..6d206e88b5b56
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md
@@ -0,0 +1,27 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [addScriptedField](./kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md)
+
+## IndexPattern.addScriptedField() method
+
+Add scripted field to field list
+
+Signature:
+
+```typescript
+addScriptedField(name: string, script: string, fieldType?: string, lang?: string): Promisestring
| |
+| script | string
| |
+| fieldType | string
| |
+| lang | string
| |
+
+Returns:
+
+`Promisestring
| |
+
+Returns:
+
+`IndexPatternField | undefined`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md
new file mode 100644
index 0000000000000..7dc2756009f4e
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getFormatterForField](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md)
+
+## IndexPattern.getFormatterForField() method
+
+Provide a field, get its formatter
+
+Signature:
+
+```typescript
+getFormatterForField(field: IndexPatternField | IndexPatternField['spec'] | IFieldType): FieldFormat;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| field | IndexPatternField | IndexPatternField['spec'] | IFieldType
| |
+
+Returns:
+
+`FieldFormat`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md
new file mode 100644
index 0000000000000..89d79d9b750fa
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getNonScriptedFields](./kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md)
+
+## IndexPattern.getNonScriptedFields() method
+
+Signature:
+
+```typescript
+getNonScriptedFields(): IndexPatternField[];
+```
+Returns:
+
+`IndexPatternField[]`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md
new file mode 100644
index 0000000000000..324f9d0152ab5
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md)
+
+## IndexPattern.getOriginalSavedObjectBody property
+
+Get last saved saved object fields
+
+Signature:
+
+```typescript
+getOriginalSavedObjectBody: () => {
+ title?: string | undefined;
+ timeFieldName?: string | undefined;
+ intervalName?: string | undefined;
+ fields?: string | undefined;
+ sourceFilters?: string | undefined;
+ fieldFormatMap?: string | undefined;
+ typeMeta?: string | undefined;
+ type?: string | undefined;
+ };
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md
new file mode 100644
index 0000000000000..edfff8ec5efac
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getScriptedFields](./kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md)
+
+## IndexPattern.getScriptedFields() method
+
+Signature:
+
+```typescript
+getScriptedFields(): IndexPatternField[];
+```
+Returns:
+
+`IndexPatternField[]`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md
new file mode 100644
index 0000000000000..240f9b4fb0aa2
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getSourceFiltering](./kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md)
+
+## IndexPattern.getSourceFiltering() method
+
+Get the source filtering configuration for that index.
+
+Signature:
+
+```typescript
+getSourceFiltering(): {
+ excludes: any[];
+ };
+```
+Returns:
+
+`{
+ excludes: any[];
+ }`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.gettimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.gettimefield.md
new file mode 100644
index 0000000000000..b5806f883fb9f
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.gettimefield.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getTimeField](./kibana-plugin-plugins-data-server.indexpattern.gettimefield.md)
+
+## IndexPattern.getTimeField() method
+
+Signature:
+
+```typescript
+getTimeField(): IndexPatternField | undefined;
+```
+Returns:
+
+`IndexPatternField | undefined`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.id.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.id.md
new file mode 100644
index 0000000000000..8fad82bd06705
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.id.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [id](./kibana-plugin-plugins-data-server.indexpattern.id.md)
+
+## IndexPattern.id property
+
+Signature:
+
+```typescript
+id?: string;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.intervalname.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.intervalname.md
new file mode 100644
index 0000000000000..caaa6929235f8
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.intervalname.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [intervalName](./kibana-plugin-plugins-data-server.indexpattern.intervalname.md)
+
+## IndexPattern.intervalName property
+
+Signature:
+
+```typescript
+intervalName: string | undefined;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebased.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebased.md
new file mode 100644
index 0000000000000..790744979942d
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebased.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [isTimeBased](./kibana-plugin-plugins-data-server.indexpattern.istimebased.md)
+
+## IndexPattern.isTimeBased() method
+
+Signature:
+
+```typescript
+isTimeBased(): boolean;
+```
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebasedwildcard.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebasedwildcard.md
new file mode 100644
index 0000000000000..7ef5e8318040a
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimebasedwildcard.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [isTimeBasedWildcard](./kibana-plugin-plugins-data-server.indexpattern.istimebasedwildcard.md)
+
+## IndexPattern.isTimeBasedWildcard() method
+
+Signature:
+
+```typescript
+isTimeBasedWildcard(): boolean;
+```
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md
new file mode 100644
index 0000000000000..22fb60eba4f6e
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [isTimeNanosBased](./kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md)
+
+## IndexPattern.isTimeNanosBased() method
+
+Signature:
+
+```typescript
+isTimeNanosBased(): boolean;
+```
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md
new file mode 100644
index 0000000000000..d877854444a09
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md
@@ -0,0 +1,60 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md)
+
+## IndexPattern class
+
+Signature:
+
+```typescript
+export declare class IndexPattern implements IIndexPattern
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)({ spec, savedObjectsClient, fieldFormats, shortDotsEnable, metaFields, })](./kibana-plugin-plugins-data-server.indexpattern._constructor_.md) | | Constructs a new instance of the IndexPattern
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [fieldFormatMap](./kibana-plugin-plugins-data-server.indexpattern.fieldformatmap.md) | | Record<string, any>
| |
+| [fields](./kibana-plugin-plugins-data-server.indexpattern.fields.md) | | IIndexPatternFieldList & {
toSpec: () => IndexPatternFieldMap;
}
| |
+| [flattenHit](./kibana-plugin-plugins-data-server.indexpattern.flattenhit.md) | | (hit: Record<string, any>, deep?: boolean) => Record<string, any>
| |
+| [formatField](./kibana-plugin-plugins-data-server.indexpattern.formatfield.md) | | FormatFieldFn
| |
+| [formatHit](./kibana-plugin-plugins-data-server.indexpattern.formathit.md) | | {
(hit: Record<string, any>, type?: string): any;
formatField: FormatFieldFn;
}
| |
+| [getOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.getoriginalsavedobjectbody.md) | | () => {
title?: string | undefined;
timeFieldName?: string | undefined;
intervalName?: string | undefined;
fields?: string | undefined;
sourceFilters?: string | undefined;
fieldFormatMap?: string | undefined;
typeMeta?: string | undefined;
type?: string | undefined;
}
| Get last saved saved object fields |
+| [id](./kibana-plugin-plugins-data-server.indexpattern.id.md) | | string
| |
+| [intervalName](./kibana-plugin-plugins-data-server.indexpattern.intervalname.md) | | string | undefined
| |
+| [metaFields](./kibana-plugin-plugins-data-server.indexpattern.metafields.md) | | string[]
| |
+| [resetOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.resetoriginalsavedobjectbody.md) | | () => void
| Reset last saved saved object fields. used after saving |
+| [sourceFilters](./kibana-plugin-plugins-data-server.indexpattern.sourcefilters.md) | | SourceFilter[]
| |
+| [timeFieldName](./kibana-plugin-plugins-data-server.indexpattern.timefieldname.md) | | string | undefined
| |
+| [title](./kibana-plugin-plugins-data-server.indexpattern.title.md) | | string
| |
+| [type](./kibana-plugin-plugins-data-server.indexpattern.type.md) | | string | undefined
| |
+| [typeMeta](./kibana-plugin-plugins-data-server.indexpattern.typemeta.md) | | TypeMeta
| |
+| [version](./kibana-plugin-plugins-data-server.indexpattern.version.md) | | string | undefined
| |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [addScriptedField(name, script, fieldType, lang)](./kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md) | | Add scripted field to field list |
+| [getAggregationRestrictions()](./kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md) | | |
+| [getAsSavedObjectBody()](./kibana-plugin-plugins-data-server.indexpattern.getassavedobjectbody.md) | | Returns index pattern as saved object body for saving |
+| [getComputedFields()](./kibana-plugin-plugins-data-server.indexpattern.getcomputedfields.md) | | |
+| [getFieldByName(name)](./kibana-plugin-plugins-data-server.indexpattern.getfieldbyname.md) | | |
+| [getFormatterForField(field)](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter |
+| [getNonScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md) | | |
+| [getScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md) | | |
+| [getSourceFiltering()](./kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. |
+| [getTimeField()](./kibana-plugin-plugins-data-server.indexpattern.gettimefield.md) | | |
+| [isTimeBased()](./kibana-plugin-plugins-data-server.indexpattern.istimebased.md) | | |
+| [isTimeBasedWildcard()](./kibana-plugin-plugins-data-server.indexpattern.istimebasedwildcard.md) | | |
+| [isTimeNanosBased()](./kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md) | | |
+| [popularizeField(fieldName, unit)](./kibana-plugin-plugins-data-server.indexpattern.popularizefield.md) | | |
+| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md) | | Remove scripted field from field list |
+| [toSpec()](./kibana-plugin-plugins-data-server.indexpattern.tospec.md) | | |
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.metafields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.metafields.md
new file mode 100644
index 0000000000000..a2c7c806d6057
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.metafields.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [metaFields](./kibana-plugin-plugins-data-server.indexpattern.metafields.md)
+
+## IndexPattern.metaFields property
+
+Signature:
+
+```typescript
+metaFields: string[];
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.popularizefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.popularizefield.md
new file mode 100644
index 0000000000000..8b2c9242a6256
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.popularizefield.md
@@ -0,0 +1,23 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [popularizeField](./kibana-plugin-plugins-data-server.indexpattern.popularizefield.md)
+
+## IndexPattern.popularizeField() method
+
+Signature:
+
+```typescript
+popularizeField(fieldName: string, unit?: number): Promisestring
| |
+| unit | number
| |
+
+Returns:
+
+`Promisestring
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.resetoriginalsavedobjectbody.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.resetoriginalsavedobjectbody.md
new file mode 100644
index 0000000000000..18ec7070bd577
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.resetoriginalsavedobjectbody.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [resetOriginalSavedObjectBody](./kibana-plugin-plugins-data-server.indexpattern.resetoriginalsavedobjectbody.md)
+
+## IndexPattern.resetOriginalSavedObjectBody property
+
+Reset last saved saved object fields. used after saving
+
+Signature:
+
+```typescript
+resetOriginalSavedObjectBody: () => void;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.sourcefilters.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.sourcefilters.md
new file mode 100644
index 0000000000000..d359bef2f30a9
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.sourcefilters.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [sourceFilters](./kibana-plugin-plugins-data-server.indexpattern.sourcefilters.md)
+
+## IndexPattern.sourceFilters property
+
+Signature:
+
+```typescript
+sourceFilters?: SourceFilter[];
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.timefieldname.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.timefieldname.md
new file mode 100644
index 0000000000000..35740afa4e3dc
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.timefieldname.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [timeFieldName](./kibana-plugin-plugins-data-server.indexpattern.timefieldname.md)
+
+## IndexPattern.timeFieldName property
+
+Signature:
+
+```typescript
+timeFieldName: string | undefined;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.title.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.title.md
new file mode 100644
index 0000000000000..4cebde989aebd
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.title.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [title](./kibana-plugin-plugins-data-server.indexpattern.title.md)
+
+## IndexPattern.title property
+
+Signature:
+
+```typescript
+title: string;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.tospec.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.tospec.md
new file mode 100644
index 0000000000000..5d76b8f00853b
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.tospec.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [toSpec](./kibana-plugin-plugins-data-server.indexpattern.tospec.md)
+
+## IndexPattern.toSpec() method
+
+Signature:
+
+```typescript
+toSpec(): IndexPatternSpec;
+```
+Returns:
+
+`IndexPatternSpec`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.type.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.type.md
new file mode 100644
index 0000000000000..01154ab5444d1
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.type.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [type](./kibana-plugin-plugins-data-server.indexpattern.type.md)
+
+## IndexPattern.type property
+
+Signature:
+
+```typescript
+type: string | undefined;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.typemeta.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.typemeta.md
new file mode 100644
index 0000000000000..b16bcec404d97
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.typemeta.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [typeMeta](./kibana-plugin-plugins-data-server.indexpattern.typemeta.md)
+
+## IndexPattern.typeMeta property
+
+Signature:
+
+```typescript
+typeMeta?: TypeMeta;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.version.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.version.md
new file mode 100644
index 0000000000000..e4297d8389111
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.version.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [version](./kibana-plugin-plugins-data-server.indexpattern.version.md)
+
+## IndexPattern.version property
+
+Signature:
+
+```typescript
+version: string | undefined;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternattributes.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternattributes.md
index 4a5b61f5c179b..40b029da00469 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternattributes.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternattributes.md
@@ -4,12 +4,6 @@
## IndexPatternAttributes interface
-> Warning: This API is now obsolete.
->
->
-
-Use data plugin interface instead
-
Signature:
```typescript
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.aggregatable.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.aggregatable.md
deleted file mode 100644
index 92994b851ec85..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.aggregatable.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [aggregatable](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.aggregatable.md)
-
-## IndexPatternFieldDescriptor.aggregatable property
-
-Signature:
-
-```typescript
-aggregatable: boolean;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.estypes.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.estypes.md
deleted file mode 100644
index f24ba9a48d85e..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.estypes.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [esTypes](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.estypes.md)
-
-## IndexPatternFieldDescriptor.esTypes property
-
-Signature:
-
-```typescript
-esTypes: string[];
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md
deleted file mode 100644
index d84d0cba06ac6..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md)
-
-## IndexPatternFieldDescriptor interface
-
-Signature:
-
-```typescript
-export interface FieldDescriptor
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [aggregatable](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.aggregatable.md) | boolean
| |
-| [esTypes](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.estypes.md) | string[]
| |
-| [name](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.name.md) | string
| |
-| [readFromDocValues](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.readfromdocvalues.md) | boolean
| |
-| [searchable](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.searchable.md) | boolean
| |
-| [subType](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.subtype.md) | FieldSubType
| |
-| [type](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.type.md) | string
| |
-
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.name.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.name.md
deleted file mode 100644
index 16ea60c5b8ae2..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.name.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [name](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.name.md)
-
-## IndexPatternFieldDescriptor.name property
-
-Signature:
-
-```typescript
-name: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.readfromdocvalues.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.readfromdocvalues.md
deleted file mode 100644
index fc8667196c879..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.readfromdocvalues.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [readFromDocValues](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.readfromdocvalues.md)
-
-## IndexPatternFieldDescriptor.readFromDocValues property
-
-Signature:
-
-```typescript
-readFromDocValues: boolean;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.searchable.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.searchable.md
deleted file mode 100644
index 7d159c65b40bd..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.searchable.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [searchable](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.searchable.md)
-
-## IndexPatternFieldDescriptor.searchable property
-
-Signature:
-
-```typescript
-searchable: boolean;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.subtype.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.subtype.md
deleted file mode 100644
index 7053eaf08138c..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.subtype.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [subType](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.subtype.md)
-
-## IndexPatternFieldDescriptor.subType property
-
-Signature:
-
-```typescript
-subType?: FieldSubType;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.type.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.type.md
deleted file mode 100644
index bb571d1bee14a..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternfielddescriptor.type.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) > [type](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.type.md)
-
-## IndexPatternFieldDescriptor.type property
-
-Signature:
-
-```typescript
-type: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md
index 6bd3bbf2433cd..52382372d6d96 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsfetcher.getfieldsforwildcard.md
@@ -12,6 +12,9 @@ Get a list of field objects for an index pattern that may contain wildcards
getFieldsForWildcard(options: {
pattern: string | string[];
metaFields?: string[];
+ fieldCapsOptions?: {
+ allowNoIndices: boolean;
+ };
}): Promise{
pattern: string | string[];
metaFields?: string[];
}
| |
+| options | {
pattern: string | string[];
metaFields?: string[];
fieldCapsOptions?: {
allowNoIndices: boolean;
};
}
| |
Returns:
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.md
new file mode 100644
index 0000000000000..aa78c055f4f5c
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.md
@@ -0,0 +1,19 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternsService](./kibana-plugin-plugins-data-server.indexpatternsservice.md)
+
+## IndexPatternsService class
+
+Signature:
+
+```typescript
+export declare class IndexPatternsService implements PluginCoreSetup
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.start.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.start.md
new file mode 100644
index 0000000000000..d35dc3aa11000
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpatternsservice.start.md
@@ -0,0 +1,27 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPatternsService](./kibana-plugin-plugins-data-server.indexpatternsservice.md) > [start](./kibana-plugin-plugins-data-server.indexpatternsservice.start.md)
+
+## IndexPatternsService.start() method
+
+Signature:
+
+```typescript
+start(core: CoreStart, { fieldFormats, logger }: IndexPatternsServiceStartDeps): {
+ indexPatternsServiceFactory: (kibanaRequest: KibanaRequest) => PromiseCoreStart
| |
+| { fieldFormats, logger } | IndexPatternsServiceStartDeps
| |
+
+Returns:
+
+`{
+ indexPatternsServiceFactory: (kibanaRequest: KibanaRequest) => Promise({ routeAuthRequired, validation = {}, kibanaRouteOptions = { xsrfRequired: true }, - kibanaRequestState = { requestId: '123' }, + kibanaRequestState = { requestId: '123', requestUuid: '123e4567-e89b-12d3-a456-426614174000' }, auth = { isAuthenticated: true }, }: RequestFixtureOptions
= {}) {
const queryString = stringify(query, { sort: false });
diff --git a/src/core/server/http/http_server.ts b/src/core/server/http/http_server.ts
index 7609f23fe0c51..2440f2b1da0bd 100644
--- a/src/core/server/http/http_server.ts
+++ b/src/core/server/http/http_server.ts
@@ -19,6 +19,7 @@
import { Server } from 'hapi';
import HapiStaticFiles from 'inert';
import url from 'url';
+import uuid from 'uuid';
import { Logger, LoggerFactory } from '../logging';
import { HttpConfig } from './http_config';
@@ -315,6 +316,7 @@ export class HttpServer {
request.app = {
...(request.app ?? {}),
requestId: getRequestId(request, config.requestId),
+ requestUuid: uuid.v4(),
} as KibanaRequestState;
return responseToolkit.continue;
});
diff --git a/src/core/server/http/integration_tests/request.test.ts b/src/core/server/http/integration_tests/request.test.ts
index 0727ff848c189..0170e94867c06 100644
--- a/src/core/server/http/integration_tests/request.test.ts
+++ b/src/core/server/http/integration_tests/request.test.ts
@@ -16,6 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+jest.mock('uuid', () => ({
+ v4: jest.fn().mockReturnValue('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'),
+}));
+
import supertest from 'supertest';
import { HttpService } from '../http_service';
@@ -308,4 +313,20 @@ describe('KibanaRequest', () => {
expect(resp3.body).toEqual({ requestId: 'gamma' });
});
});
+
+ describe('request uuid', () => {
+ it('generates a UUID', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
+ router.get({ path: '/', validate: false }, async (context, req, res) => {
+ return res.ok({ body: { requestUuid: req.uuid } });
+ });
+ await server.start();
+
+ const st = supertest(innerServer.listener);
+
+ const resp1 = await st.get('/').expect(200);
+ expect(resp1.body.requestUuid).toBe('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
+ });
+ });
});
diff --git a/src/core/server/http/router/request.test.ts b/src/core/server/http/router/request.test.ts
index e741121f3d70c..0bf81a7aca852 100644
--- a/src/core/server/http/router/request.test.ts
+++ b/src/core/server/http/router/request.test.ts
@@ -55,6 +55,34 @@ describe('KibanaRequest', () => {
});
});
+ describe('uuid property', () => {
+ it('uses the request.app.requestUuid property if present', () => {
+ const request = httpServerMock.createRawRequest({
+ app: { requestUuid: '123e4567-e89b-12d3-a456-426614174000' },
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.uuid).toEqual('123e4567-e89b-12d3-a456-426614174000');
+ });
+
+ it('generates a new UUID if request.app property is not present', () => {
+ // Undefined app property
+ const request = httpServerMock.createRawRequest({
+ app: undefined,
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.uuid).toEqual('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
+ });
+
+ it('generates a new UUID if request.app.requestUuid property is not present', () => {
+ // Undefined app.requestUuid property
+ const request = httpServerMock.createRawRequest({
+ app: {},
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.uuid).toEqual('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
+ });
+ });
+
describe('get all headers', () => {
it('returns all headers', () => {
const request = httpServerMock.createRawRequest({
diff --git a/src/core/server/http/router/request.ts b/src/core/server/http/router/request.ts
index e04f8585981b5..903eb75022df3 100644
--- a/src/core/server/http/router/request.ts
+++ b/src/core/server/http/router/request.ts
@@ -44,6 +44,7 @@ export interface KibanaRouteOptions extends RouteOptionsApp {
*/
export interface KibanaRequestState extends ApplicationState {
requestId: string;
+ requestUuid: string;
}
/**
@@ -152,6 +153,14 @@ export class KibanaRequest<
* per request.
*/
public readonly id: string;
+ /**
+ * A UUID to identify this request.
+ *
+ * @remarks
+ * This value is NOT sourced from the incoming request's `X-Opaque-Id` header. it
+ * is always a UUID uniquely identifying the request.
+ */
+ public readonly uuid: string;
/** a WHATWG URL standard object. */
public readonly url: Url;
/** matched route details */
@@ -189,10 +198,11 @@ export class KibanaRequest<
// until that time we have to expose all the headers
private readonly withoutSecretHeaders: boolean
) {
- // The `requestId` property will not be populated for requests that are 'faked' by internal systems that leverage
+ // The `requestId` and `requestUuid` properties will not be populated for requests that are 'faked' by internal systems that leverage
// KibanaRequest in conjunction with scoped Elaticcsearch and SavedObjectsClient in order to pass credentials.
- // In these cases, the id defaults to a newly generated UUID.
+ // In these cases, the ids default to a newly generated UUID.
this.id = (request.app as KibanaRequestState | undefined)?.requestId ?? uuid.v4();
+ this.uuid = (request.app as KibanaRequestState | undefined)?.requestUuid ?? uuid.v4();
this.url = request.url;
this.headers = deepFreeze({ ...request.headers });
diff --git a/src/core/server/index.ts b/src/core/server/index.ts
index e136c699f7246..70ef93963c69f 100644
--- a/src/core/server/index.ts
+++ b/src/core/server/index.ts
@@ -339,14 +339,7 @@ export {
SavedObjectsMigrationVersion,
} from './types';
-export {
- LegacyServiceSetupDeps,
- LegacyServiceStartDeps,
- LegacyServiceDiscoverPlugins,
- LegacyConfig,
- LegacyUiExports,
- LegacyInternals,
-} from './legacy';
+export { LegacyServiceSetupDeps, LegacyServiceStartDeps, LegacyConfig } from './legacy';
export {
CoreStatus,
diff --git a/src/core/server/legacy/config/ensure_valid_configuration.test.ts b/src/core/server/legacy/config/ensure_valid_configuration.test.ts
index 702840b8a0a6a..700fe69954655 100644
--- a/src/core/server/legacy/config/ensure_valid_configuration.test.ts
+++ b/src/core/server/legacy/config/ensure_valid_configuration.test.ts
@@ -39,17 +39,12 @@ describe('ensureValidConfiguration', () => {
configService as any,
{
settings: 'settings',
- pluginSpecs: 'pluginSpecs',
- disabledPluginSpecs: 'disabledPluginSpecs',
- pluginExtendedConfig: 'pluginExtendedConfig',
- uiExports: 'uiExports',
+ legacyConfig: 'pluginExtendedConfig',
} as any
);
expect(getUnusedConfigKeys).toHaveBeenCalledTimes(1);
expect(getUnusedConfigKeys).toHaveBeenCalledWith({
coreHandledConfigPaths: ['core', 'elastic'],
- pluginSpecs: 'pluginSpecs',
- disabledPluginSpecs: 'disabledPluginSpecs',
settings: 'settings',
legacyConfig: 'pluginExtendedConfig',
});
diff --git a/src/core/server/legacy/config/ensure_valid_configuration.ts b/src/core/server/legacy/config/ensure_valid_configuration.ts
index 5cd1603ea65fb..34f98b9b3a795 100644
--- a/src/core/server/legacy/config/ensure_valid_configuration.ts
+++ b/src/core/server/legacy/config/ensure_valid_configuration.ts
@@ -19,19 +19,17 @@
import { getUnusedConfigKeys } from './get_unused_config_keys';
import { ConfigService } from '../../config';
-import { LegacyServiceDiscoverPlugins } from '../types';
import { CriticalError } from '../../errors';
+import { LegacyServiceSetupConfig } from '../types';
export async function ensureValidConfiguration(
configService: ConfigService,
- { pluginSpecs, disabledPluginSpecs, pluginExtendedConfig, settings }: LegacyServiceDiscoverPlugins
+ { legacyConfig, settings }: LegacyServiceSetupConfig
) {
const unusedConfigKeys = await getUnusedConfigKeys({
coreHandledConfigPaths: await configService.getUsedPaths(),
- pluginSpecs,
- disabledPluginSpecs,
settings,
- legacyConfig: pluginExtendedConfig,
+ legacyConfig,
});
if (unusedConfigKeys.length > 0) {
diff --git a/src/core/server/legacy/config/get_unused_config_keys.test.ts b/src/core/server/legacy/config/get_unused_config_keys.test.ts
index f8506b5744030..6ce69fca0270a 100644
--- a/src/core/server/legacy/config/get_unused_config_keys.test.ts
+++ b/src/core/server/legacy/config/get_unused_config_keys.test.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { LegacyPluginSpec, LegacyConfig, LegacyVars } from '../types';
+import { LegacyConfig, LegacyVars } from '../types';
import { getUnusedConfigKeys } from './get_unused_config_keys';
describe('getUnusedConfigKeys', () => {
@@ -35,8 +35,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {},
legacyConfig: getConfig(),
})
@@ -47,8 +45,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
presentInBoth: true,
alsoInBoth: 'someValue',
@@ -65,8 +61,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
presentInBoth: true,
},
@@ -82,8 +76,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
presentInBoth: true,
onlyInSetting: 'value',
@@ -99,8 +91,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
elasticsearch: {
username: 'foo',
@@ -121,8 +111,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
env: 'development',
},
@@ -139,8 +127,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
prop: ['a', 'b', 'c'],
},
@@ -152,40 +138,10 @@ describe('getUnusedConfigKeys', () => {
});
});
- it('ignores config for plugins that are disabled', async () => {
- expect(
- await getUnusedConfigKeys({
- coreHandledConfigPaths: [],
- pluginSpecs: [],
- disabledPluginSpecs: [
- ({
- id: 'foo',
- getConfigPrefix: () => 'foo.bar',
- } as unknown) as LegacyPluginSpec,
- ],
- settings: {
- foo: {
- bar: {
- unused: true,
- },
- },
- plugin: {
- missingProp: false,
- },
- },
- legacyConfig: getConfig({
- prop: 'a',
- }),
- })
- ).toEqual(['plugin.missingProp']);
- });
-
it('ignores properties managed by the new platform', async () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: ['core', 'foo.bar'],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
core: {
prop: 'value',
@@ -204,8 +160,6 @@ describe('getUnusedConfigKeys', () => {
expect(
await getUnusedConfigKeys({
coreHandledConfigPaths: ['core', 'array'],
- pluginSpecs: [],
- disabledPluginSpecs: [],
settings: {
core: {
prop: 'value',
diff --git a/src/core/server/legacy/config/get_unused_config_keys.ts b/src/core/server/legacy/config/get_unused_config_keys.ts
index c15c3b270df05..5bbe169033e39 100644
--- a/src/core/server/legacy/config/get_unused_config_keys.ts
+++ b/src/core/server/legacy/config/get_unused_config_keys.ts
@@ -19,30 +19,20 @@
import { difference } from 'lodash';
import { getFlattenedObject } from '@kbn/std';
-import { unset } from '../../../../legacy/utils';
import { hasConfigPathIntersection } from '../../config';
-import { LegacyPluginSpec, LegacyConfig, LegacyVars } from '../types';
+import { LegacyConfig, LegacyVars } from '../types';
const getFlattenedKeys = (object: object) => Object.keys(getFlattenedObject(object));
export async function getUnusedConfigKeys({
coreHandledConfigPaths,
- pluginSpecs,
- disabledPluginSpecs,
settings,
legacyConfig,
}: {
coreHandledConfigPaths: string[];
- pluginSpecs: LegacyPluginSpec[];
- disabledPluginSpecs: LegacyPluginSpec[];
settings: LegacyVars;
legacyConfig: LegacyConfig;
}) {
- // remove config values from disabled plugins
- for (const spec of disabledPluginSpecs) {
- unset(settings, spec.getConfigPrefix());
- }
-
const inputKeys = getFlattenedKeys(settings);
const appliedKeys = getFlattenedKeys(legacyConfig.get());
diff --git a/src/core/server/legacy/index.ts b/src/core/server/legacy/index.ts
index 6b0963e3129c6..1a0bc8955be0f 100644
--- a/src/core/server/legacy/index.ts
+++ b/src/core/server/legacy/index.ts
@@ -20,8 +20,6 @@
/** @internal */
export { ensureValidConfiguration } from './config';
/** @internal */
-export { LegacyInternals } from './legacy_internals';
-/** @internal */
export { LegacyService, ILegacyService } from './legacy_service';
/** @internal */
export * from './types';
diff --git a/src/core/server/legacy/legacy_internals.test.ts b/src/core/server/legacy/legacy_internals.test.ts
deleted file mode 100644
index 935e36a989a0c..0000000000000
--- a/src/core/server/legacy/legacy_internals.test.ts
+++ /dev/null
@@ -1,211 +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 { Server } from 'hapi';
-
-import { configMock } from '../config/mocks';
-import { httpServiceMock } from '../http/http_service.mock';
-import { httpServerMock } from '../http/http_server.mocks';
-import { findLegacyPluginSpecsMock } from './legacy_service.test.mocks';
-import { LegacyInternals } from './legacy_internals';
-import { ILegacyInternals, LegacyConfig, LegacyVars, LegacyUiExports } from './types';
-
-function varsProvider(vars: LegacyVars, configValue?: any) {
- return {
- fn: jest.fn().mockReturnValue(vars),
- pluginSpec: {
- readConfigValue: jest.fn().mockReturnValue(configValue),
- },
- };
-}
-
-describe('LegacyInternals', () => {
- describe('getInjectedUiAppVars()', () => {
- let uiExports: LegacyUiExports;
- let config: LegacyConfig;
- let server: Server;
- let legacyInternals: ILegacyInternals;
-
- beforeEach(async () => {
- uiExports = findLegacyPluginSpecsMock().uiExports;
- config = configMock.create() as any;
- server = httpServiceMock.createInternalSetupContract().server;
- legacyInternals = new LegacyInternals(uiExports, config, server);
- });
-
- it('gets with no injectors', async () => {
- await expect(legacyInternals.getInjectedUiAppVars('core')).resolves.toMatchInlineSnapshot(
- `Object {}`
- );
- });
-
- it('gets with no matching injectors', async () => {
- const injector = jest.fn().mockResolvedValue({ not: 'core' });
- legacyInternals.injectUiAppVars('not-core', injector);
-
- await expect(legacyInternals.getInjectedUiAppVars('core')).resolves.toMatchInlineSnapshot(
- `Object {}`
- );
- expect(injector).not.toHaveBeenCalled();
- });
-
- it('gets with single matching injector', async () => {
- const injector = jest.fn().mockResolvedValue({ is: 'core' });
- legacyInternals.injectUiAppVars('core', injector);
-
- await expect(legacyInternals.getInjectedUiAppVars('core')).resolves.toMatchInlineSnapshot(`
- Object {
- "is": "core",
- }
- `);
- expect(injector).toHaveBeenCalled();
- });
-
- it('gets with multiple matching injectors', async () => {
- const injectors = [
- jest.fn().mockResolvedValue({ is: 'core' }),
- jest.fn().mockReturnValue({ sync: 'injector' }),
- jest.fn().mockResolvedValue({ is: 'merged-core' }),
- ];
-
- injectors.forEach((injector) => legacyInternals.injectUiAppVars('core', injector));
-
- await expect(legacyInternals.getInjectedUiAppVars('core')).resolves.toMatchInlineSnapshot(`
- Object {
- "is": "merged-core",
- "sync": "injector",
- }
- `);
- expect(injectors[0]).toHaveBeenCalled();
- expect(injectors[1]).toHaveBeenCalled();
- expect(injectors[2]).toHaveBeenCalled();
- });
- });
-
- describe('getVars()', () => {
- let uiExports: LegacyUiExports;
- let config: LegacyConfig;
- let server: Server;
- let legacyInternals: LegacyInternals;
-
- beforeEach(async () => {
- uiExports = findLegacyPluginSpecsMock().uiExports;
- config = configMock.create() as any;
- server = httpServiceMock.createInternalSetupContract().server;
- legacyInternals = new LegacyInternals(uiExports, config, server);
- });
-
- it('gets: no default injectors, no injected vars replacers, no ui app injectors, no inject arg', async () => {
- const vars = await legacyInternals.getVars('core', httpServerMock.createRawRequest());
-
- expect(vars).toMatchInlineSnapshot(`Object {}`);
- });
-
- it('gets: with default injectors, no injected vars replacers, no ui app injectors, no inject arg', async () => {
- uiExports.defaultInjectedVarProviders = [
- varsProvider({ alpha: 'alpha' }),
- varsProvider({ gamma: 'gamma' }),
- varsProvider({ alpha: 'beta' }),
- ];
-
- const vars = await legacyInternals.getVars('core', httpServerMock.createRawRequest());
-
- expect(vars).toMatchInlineSnapshot(`
- Object {
- "alpha": "beta",
- "gamma": "gamma",
- }
- `);
- });
-
- it('gets: no default injectors, with injected vars replacers, with ui app injectors, no inject arg', async () => {
- uiExports.injectedVarsReplacers = [
- jest.fn(async (vars) => ({ ...vars, added: 'key' })),
- jest.fn((vars) => vars),
- jest.fn((vars) => ({ replaced: 'all' })),
- jest.fn(async (vars) => ({ ...vars, added: 'last-key' })),
- ];
-
- const request = httpServerMock.createRawRequest();
- const vars = await legacyInternals.getVars('core', request);
-
- expect(vars).toMatchInlineSnapshot(`
- Object {
- "added": "last-key",
- "replaced": "all",
- }
- `);
- });
-
- it('gets: no default injectors, no injected vars replacers, with ui app injectors, no inject arg', async () => {
- legacyInternals.injectUiAppVars('core', async () => ({ is: 'core' }));
- legacyInternals.injectUiAppVars('core', () => ({ sync: 'injector' }));
- legacyInternals.injectUiAppVars('core', async () => ({ is: 'merged-core' }));
-
- const vars = await legacyInternals.getVars('core', httpServerMock.createRawRequest());
-
- expect(vars).toMatchInlineSnapshot(`
- Object {
- "is": "merged-core",
- "sync": "injector",
- }
- `);
- });
-
- it('gets: no default injectors, no injected vars replacers, no ui app injectors, with inject arg', async () => {
- const vars = await legacyInternals.getVars('core', httpServerMock.createRawRequest(), {
- injected: 'arg',
- });
-
- expect(vars).toMatchInlineSnapshot(`
- Object {
- "injected": "arg",
- }
- `);
- });
-
- it('gets: with default injectors, with injected vars replacers, with ui app injectors, with inject arg', async () => {
- uiExports.defaultInjectedVarProviders = [
- varsProvider({ alpha: 'alpha' }),
- varsProvider({ gamma: 'gamma' }),
- varsProvider({ alpha: 'beta' }),
- ];
- uiExports.injectedVarsReplacers = [jest.fn(async (vars) => ({ ...vars, gamma: 'delta' }))];
-
- legacyInternals.injectUiAppVars('core', async () => ({ is: 'core' }));
- legacyInternals.injectUiAppVars('core', () => ({ sync: 'injector' }));
- legacyInternals.injectUiAppVars('core', async () => ({ is: 'merged-core' }));
-
- const vars = await legacyInternals.getVars('core', httpServerMock.createRawRequest(), {
- injected: 'arg',
- sync: 'arg',
- });
-
- expect(vars).toMatchInlineSnapshot(`
- Object {
- "alpha": "beta",
- "gamma": "delta",
- "injected": "arg",
- "is": "merged-core",
- "sync": "arg",
- }
- `);
- });
- });
-});
diff --git a/src/core/server/legacy/legacy_internals.ts b/src/core/server/legacy/legacy_internals.ts
deleted file mode 100644
index 628ca4ed12f6b..0000000000000
--- a/src/core/server/legacy/legacy_internals.ts
+++ /dev/null
@@ -1,93 +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 { Server } from 'hapi';
-
-import { KibanaRequest, LegacyRequest } from '../http';
-import { ensureRawRequest } from '../http/router';
-import { mergeVars } from './merge_vars';
-import { ILegacyInternals, LegacyVars, VarsInjector, LegacyConfig, LegacyUiExports } from './types';
-
-/**
- * @internal
- * @deprecated
- */
-export class LegacyInternals implements ILegacyInternals {
- private readonly injectors = new Map