diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md
new file mode 100644
index 0000000000000..7466e4b9cf658
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IIndexPattern](./kibana-plugin-plugins-data-public.iindexpattern.md) > [getFormatterForField](./kibana-plugin-plugins-data-public.iindexpattern.getformatterforfield.md)
+
+## IIndexPattern.getFormatterForField property
+
+Signature:
+
+```typescript
+getFormatterForField?: (field: IndexPatternField | IndexPatternField['spec'] | IFieldType) => FieldFormat;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.md
index 0c7aad3e6c227..f57ece2d964f3 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iindexpattern.md
@@ -16,6 +16,7 @@ export interface IIndexPattern
| --- | --- | --- |
| [fieldFormatMap](./kibana-plugin-plugins-data-public.iindexpattern.fieldformatmap.md) | Record<string, {
id: string;
params: unknown;
}>
| |
| [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
| |
| [intervalName](./kibana-plugin-plugins-data-public.iindexpattern.intervalname.md) | string | null
| |
| [timeFieldName](./kibana-plugin-plugins-data-public.iindexpattern.timefieldname.md) | string
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md
index 7984f7aff1d2d..180b2d8a7b03a 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md
@@ -7,14 +7,14 @@
Signature:
```typescript
-getFormatterForField(field: IndexPatternField | IndexPatternField['spec']): FieldFormat;
+getFormatterForField(field: IndexPatternField | IndexPatternField['spec'] | IFieldType): FieldFormat;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| field | IndexPatternField | IndexPatternField['spec']
| |
+| field | IndexPatternField | IndexPatternField['spec'] | IFieldType
| |
Returns:
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: Record | undefined;
- name: string;
- type: string;
- esTypes: string[] | undefined;
- scripted: boolean;
- searchable: boolean;
- aggregatable: boolean;
- readFromDocValues: boolean;
- subType: import("../types").IFieldSubType | undefined;
- format: {
- id: any;
- params: any;
- } | undefined;
- };
+ }): FieldSpec;
```
## Parameters
@@ -37,22 +20,5 @@ toSpec({ getFormatterForField, }?: {
Returns:
-`{
- count: number;
- script: string | undefined;
- lang: string | undefined;
- conflictDescriptions: Record | undefined;
- name: string;
- type: string;
- esTypes: string[] | undefined;
- scripted: boolean;
- searchable: boolean;
- aggregatable: boolean;
- readFromDocValues: boolean;
- subType: import("../types").IFieldSubType | undefined;
- format: {
- id: any;
- params: any;
- } | undefined;
- }`
+`FieldSpec`
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
index f51549c81fb62..71f66a1b46d85 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
@@ -57,7 +57,6 @@
| [EsQueryConfig](./kibana-plugin-plugins-data-public.esqueryconfig.md) | |
| [FieldFormatConfig](./kibana-plugin-plugins-data-public.fieldformatconfig.md) | |
| [FieldMappingSpec](./kibana-plugin-plugins-data-public.fieldmappingspec.md) | |
-| [Filter](./kibana-plugin-plugins-data-public.filter.md) | |
| [IDataPluginServices](./kibana-plugin-plugins-data-public.idatapluginservices.md) | |
| [IEsSearchRequest](./kibana-plugin-plugins-data-public.iessearchrequest.md) | |
| [IEsSearchResponse](./kibana-plugin-plugins-data-public.iessearchresponse.md) | |
@@ -75,7 +74,6 @@
| [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md) | high level search service |
| [KueryNode](./kibana-plugin-plugins-data-public.kuerynode.md) | |
| [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) | |
-| [Query](./kibana-plugin-plugins-data-public.query.md) | |
| [QueryState](./kibana-plugin-plugins-data-public.querystate.md) | All query state service state |
| [QueryStateChange](./kibana-plugin-plugins-data-public.querystatechange.md) | |
| [QuerySuggestionBasic](./kibana-plugin-plugins-data-public.querysuggestionbasic.md) | \* |
@@ -90,7 +88,6 @@
| [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | search source fields |
| [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) | \* |
| [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) | \* |
-| [TimeRange](./kibana-plugin-plugins-data-public.timerange.md) | |
## Variables
@@ -145,6 +142,7 @@
| [FieldFormatsContentType](./kibana-plugin-plugins-data-public.fieldformatscontenttype.md) | \* |
| [FieldFormatsGetConfigFn](./kibana-plugin-plugins-data-public.fieldformatsgetconfigfn.md) | |
| [FieldFormatsStart](./kibana-plugin-plugins-data-public.fieldformatsstart.md) | |
+| [Filter](./kibana-plugin-plugins-data-public.filter.md) | |
| [IAggConfig](./kibana-plugin-plugins-data-public.iaggconfig.md) | AggConfig This class represents an aggregation, which is displayed in the left-hand nav of the Visualize app. |
| [IAggType](./kibana-plugin-plugins-data-public.iaggtype.md) | |
| [IFieldFormat](./kibana-plugin-plugins-data-public.ifieldformat.md) | |
@@ -162,6 +160,7 @@
| [ParsedInterval](./kibana-plugin-plugins-data-public.parsedinterval.md) | |
| [PhraseFilter](./kibana-plugin-plugins-data-public.phrasefilter.md) | |
| [PhrasesFilter](./kibana-plugin-plugins-data-public.phrasesfilter.md) | |
+| [Query](./kibana-plugin-plugins-data-public.query.md) | |
| [QueryStart](./kibana-plugin-plugins-data-public.querystart.md) | |
| [QuerySuggestion](./kibana-plugin-plugins-data-public.querysuggestion.md) | \* |
| [QuerySuggestionGetFn](./kibana-plugin-plugins-data-public.querysuggestiongetfn.md) | |
@@ -173,4 +172,5 @@
| [TabbedAggRow](./kibana-plugin-plugins-data-public.tabbedaggrow.md) | \* |
| [TimefilterContract](./kibana-plugin-plugins-data-public.timefiltercontract.md) | |
| [TimeHistoryContract](./kibana-plugin-plugins-data-public.timehistorycontract.md) | |
+| [TimeRange](./kibana-plugin-plugins-data-public.timerange.md) | |
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.aggregatable.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.aggregatable.md
new file mode 100644
index 0000000000000..2889ee34ad77b
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.aggregatable.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) > [aggregatable](./kibana-plugin-plugins-data-server.fielddescriptor.aggregatable.md)
+
+## FieldDescriptor.aggregatable property
+
+Signature:
+
+```typescript
+aggregatable: boolean;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.estypes.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.estypes.md
new file mode 100644
index 0000000000000..9caa374d8da48
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.estypes.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) > [esTypes](./kibana-plugin-plugins-data-server.fielddescriptor.estypes.md)
+
+## FieldDescriptor.esTypes property
+
+Signature:
+
+```typescript
+esTypes: string[];
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.md
new file mode 100644
index 0000000000000..693de675da940
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.fielddescriptor.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md)
+
+## FieldDescriptor interface
+
+Signature:
+
+```typescript
+export interface FieldDescriptor
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [aggregatable](./kibana-plugin-plugins-data-server.fielddescriptor.aggregatable.md) | boolean
| |
+| [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?: Record;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fields.md
deleted file mode 100644
index fb6d046ff2174..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.fields.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) > [fields](./kibana-plugin-plugins-data-server.iindexpattern.fields.md)
-
-## IIndexPattern.fields property
-
-Signature:
-
-```typescript
-fields: IFieldType[];
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md
deleted file mode 100644
index a4d6abcf86a94..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) > [getTimeField](./kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md)
-
-## IIndexPattern.getTimeField() method
-
-Signature:
-
-```typescript
-getTimeField?(): IFieldType | undefined;
-```
-Returns:
-
-`IFieldType | undefined`
-
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.id.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.id.md
deleted file mode 100644
index cac263df0f9aa..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.id.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) > [id](./kibana-plugin-plugins-data-server.iindexpattern.id.md)
-
-## IIndexPattern.id property
-
-Signature:
-
-```typescript
-id?: string;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.intervalname.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.intervalname.md
deleted file mode 100644
index 70858119a4723..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.intervalname.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) > [intervalName](./kibana-plugin-plugins-data-server.iindexpattern.intervalname.md)
-
-## IIndexPattern.intervalName property
-
-Signature:
-
-```typescript
-intervalName?: string | null;
-```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.md
deleted file mode 100644
index 4774203c9a8a4..0000000000000
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iindexpattern.md
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md)
-
-## IIndexPattern interface
-
-Signature:
-
-```typescript
-export interface IIndexPattern
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [fieldFormatMap](./kibana-plugin-plugins-data-server.iindexpattern.fieldformatmap.md) | Record<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
| |
-| [intervalName](./kibana-plugin-plugins-data-server.iindexpattern.intervalname.md) | string | null
| |
-| [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..b725f4672b2db
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._constructor_.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) > [(constructor)](./kibana-plugin-plugins-data-server.indexpattern._constructor_.md)
+
+## IndexPattern.(constructor)
+
+Constructs a new instance of the `IndexPattern` class
+
+Signature:
+
+```typescript
+constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, shortDotsEnable, metaFields, }: IndexPatternDeps);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| id | string | undefined
| |
+| { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, shortDotsEnable, metaFields, } | IndexPatternDeps
| |
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._fetchfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._fetchfields.md
new file mode 100644
index 0000000000000..d1dabe59d4c45
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern._fetchfields.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) > [\_fetchFields](./kibana-plugin-plugins-data-server.indexpattern._fetchfields.md)
+
+## IndexPattern.\_fetchFields() method
+
+Signature:
+
+```typescript
+_fetchFields(): Promise;
+```
+Returns:
+
+`Promise`
+
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..320698b05e323
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md
@@ -0,0 +1,25 @@
+
+
+[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
+
+Signature:
+
+```typescript
+addScriptedField(name: string, script: string, fieldType: string | undefined, lang: string): Promise;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| name | string
| |
+| script | string
| |
+| fieldType | string | undefined
| |
+| lang | string
| |
+
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.create.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.create.md
new file mode 100644
index 0000000000000..82367e79480f1
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.create.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) > [create](./kibana-plugin-plugins-data-server.indexpattern.create.md)
+
+## IndexPattern.create() method
+
+Signature:
+
+```typescript
+create(allowOverride?: boolean): Promise;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| allowOverride | boolean
| |
+
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldformatmap.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldformatmap.md
new file mode 100644
index 0000000000000..77e5d112a3db2
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldformatmap.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) > [fieldFormatMap](./kibana-plugin-plugins-data-server.indexpattern.fieldformatmap.md)
+
+## IndexPattern.fieldFormatMap property
+
+Signature:
+
+```typescript
+fieldFormatMap: any;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fields.md
new file mode 100644
index 0000000000000..17a63be92fedf
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fields.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) > [fields](./kibana-plugin-plugins-data-server.indexpattern.fields.md)
+
+## IndexPattern.fields property
+
+Signature:
+
+```typescript
+fields: IIndexPatternFieldList & {
+ toSpec: () => FieldSpec[];
+ };
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldsfetcher.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldsfetcher.md
new file mode 100644
index 0000000000000..31683934e2252
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.fieldsfetcher.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) > [fieldsFetcher](./kibana-plugin-plugins-data-server.indexpattern.fieldsfetcher.md)
+
+## IndexPattern.fieldsFetcher property
+
+Signature:
+
+```typescript
+fieldsFetcher: any;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.flattenhit.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.flattenhit.md
new file mode 100644
index 0000000000000..3f4851daaf488
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.flattenhit.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) > [flattenHit](./kibana-plugin-plugins-data-server.indexpattern.flattenhit.md)
+
+## IndexPattern.flattenHit property
+
+Signature:
+
+```typescript
+flattenHit: any;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formatfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formatfield.md
new file mode 100644
index 0000000000000..9019904cf2b65
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formatfield.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) > [formatField](./kibana-plugin-plugins-data-server.indexpattern.formatfield.md)
+
+## IndexPattern.formatField property
+
+Signature:
+
+```typescript
+formatField: any;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formathit.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formathit.md
new file mode 100644
index 0000000000000..0bfd7466fb3a5
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.formathit.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) > [formatHit](./kibana-plugin-plugins-data-server.indexpattern.formathit.md)
+
+## IndexPattern.formatHit property
+
+Signature:
+
+```typescript
+formatHit: any;
+```
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md
new file mode 100644
index 0000000000000..b655e779e4fa4
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md
@@ -0,0 +1,29 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getAggregationRestrictions](./kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md)
+
+## IndexPattern.getAggregationRestrictions() method
+
+Signature:
+
+```typescript
+getAggregationRestrictions(): Record> | undefined;
+```
+Returns:
+
+`Record> | undefined`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getcomputedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getcomputedfields.md
new file mode 100644
index 0000000000000..eab6ae9bf9033
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getcomputedfields.md
@@ -0,0 +1,29 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getComputedFields](./kibana-plugin-plugins-data-server.indexpattern.getcomputedfields.md)
+
+## IndexPattern.getComputedFields() method
+
+Signature:
+
+```typescript
+getComputedFields(): {
+ storedFields: string[];
+ scriptFields: any;
+ docvalueFields: {
+ field: any;
+ format: string;
+ }[];
+ };
+```
+Returns:
+
+`{
+ storedFields: string[];
+ scriptFields: any;
+ docvalueFields: {
+ field: any;
+ format: string;
+ }[];
+ }`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getfieldbyname.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getfieldbyname.md
new file mode 100644
index 0000000000000..712be3b72828a
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getfieldbyname.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) > [getFieldByName](./kibana-plugin-plugins-data-server.indexpattern.getfieldbyname.md)
+
+## IndexPattern.getFieldByName() method
+
+Signature:
+
+```typescript
+getFieldByName(name: string): IndexPatternField | undefined;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| name | string
| |
+
+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..3218187696918
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.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) > [getFormatterForField](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md)
+
+## IndexPattern.getFormatterForField() method
+
+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.getindex.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getindex.md
new file mode 100644
index 0000000000000..f6adf7cf73f2e
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getindex.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) > [getIndex](./kibana-plugin-plugins-data-server.indexpattern.getindex.md)
+
+## IndexPattern.getIndex() method
+
+Signature:
+
+```typescript
+getIndex(): string;
+```
+Returns:
+
+`string`
+
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.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..f463dcd29a2e4
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md
@@ -0,0 +1,19 @@
+
+
+[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
+
+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.init.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.init.md
new file mode 100644
index 0000000000000..bc17ff00cc9cf
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.init.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) > [init](./kibana-plugin-plugins-data-server.indexpattern.init.md)
+
+## IndexPattern.init() method
+
+Signature:
+
+```typescript
+init(): Promise;
+```
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.initfromspec.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.initfromspec.md
new file mode 100644
index 0000000000000..6fbf621254ff3
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.initfromspec.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) > [initFromSpec](./kibana-plugin-plugins-data-server.indexpattern.initfromspec.md)
+
+## IndexPattern.initFromSpec() method
+
+Signature:
+
+```typescript
+initFromSpec(spec: IndexPatternSpec): this;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| spec | IndexPatternSpec
| |
+
+Returns:
+
+`this`
+
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..783cfb589f042
--- /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 | null;
+```
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.isunsupportedtimepattern.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.isunsupportedtimepattern.md
new file mode 100644
index 0000000000000..31d956190ad64
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.isunsupportedtimepattern.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) > [isUnsupportedTimePattern](./kibana-plugin-plugins-data-server.indexpattern.isunsupportedtimepattern.md)
+
+## IndexPattern.isUnsupportedTimePattern() method
+
+Signature:
+
+```typescript
+isUnsupportedTimePattern(): boolean;
+```
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.iswildcard.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.iswildcard.md
new file mode 100644
index 0000000000000..e0adf71b45efa
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.iswildcard.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) > [isWildcard](./kibana-plugin-plugins-data-server.indexpattern.iswildcard.md)
+
+## IndexPattern.isWildcard() method
+
+Signature:
+
+```typescript
+isWildcard(): 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..8e02e58f021e9
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md
@@ -0,0 +1,69 @@
+
+
+[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)(id, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, 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) | | any
| |
+| [fields](./kibana-plugin-plugins-data-server.indexpattern.fields.md) | | IIndexPatternFieldList & {
toSpec: () => FieldSpec[];
}
| |
+| [fieldsFetcher](./kibana-plugin-plugins-data-server.indexpattern.fieldsfetcher.md) | | any
| |
+| [flattenHit](./kibana-plugin-plugins-data-server.indexpattern.flattenhit.md) | | any
| |
+| [formatField](./kibana-plugin-plugins-data-server.indexpattern.formatfield.md) | | any
| |
+| [formatHit](./kibana-plugin-plugins-data-server.indexpattern.formathit.md) | | any
| |
+| [id](./kibana-plugin-plugins-data-server.indexpattern.id.md) | | string
| |
+| [intervalName](./kibana-plugin-plugins-data-server.indexpattern.intervalname.md) | | string | undefined | null
| |
+| [metaFields](./kibana-plugin-plugins-data-server.indexpattern.metafields.md) | | string[]
| |
+| [originalBody](./kibana-plugin-plugins-data-server.indexpattern.originalbody.md) | | {
[key: string]: any;
}
| |
+| [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 |
+| --- | --- | --- |
+| [\_fetchFields()](./kibana-plugin-plugins-data-server.indexpattern._fetchfields.md) | | |
+| [addScriptedField(name, script, fieldType, lang)](./kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md) | | |
+| [create(allowOverride)](./kibana-plugin-plugins-data-server.indexpattern.create.md) | | |
+| [getAggregationRestrictions()](./kibana-plugin-plugins-data-server.indexpattern.getaggregationrestrictions.md) | | |
+| [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) | | |
+| [getIndex()](./kibana-plugin-plugins-data-server.indexpattern.getindex.md) | | |
+| [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) | | |
+| [getTimeField()](./kibana-plugin-plugins-data-server.indexpattern.gettimefield.md) | | |
+| [init()](./kibana-plugin-plugins-data-server.indexpattern.init.md) | | |
+| [initFromSpec(spec)](./kibana-plugin-plugins-data-server.indexpattern.initfromspec.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) | | |
+| [isUnsupportedTimePattern()](./kibana-plugin-plugins-data-server.indexpattern.isunsupportedtimepattern.md) | | |
+| [isWildcard()](./kibana-plugin-plugins-data-server.indexpattern.iswildcard.md) | | |
+| [migrate(newTitle)](./kibana-plugin-plugins-data-server.indexpattern.migrate.md) | | |
+| [popularizeField(fieldName, unit)](./kibana-plugin-plugins-data-server.indexpattern.popularizefield.md) | | |
+| [prepBody()](./kibana-plugin-plugins-data-server.indexpattern.prepbody.md) | | |
+| [refreshFields()](./kibana-plugin-plugins-data-server.indexpattern.refreshfields.md) | | |
+| [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md) | | |
+| [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.migrate.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.migrate.md
new file mode 100644
index 0000000000000..9c9245f2b7767
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.migrate.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) > [migrate](./kibana-plugin-plugins-data-server.indexpattern.migrate.md)
+
+## IndexPattern.migrate() method
+
+Signature:
+
+```typescript
+migrate(newTitle: string): Promise;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| newTitle | string
| |
+
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.originalbody.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.originalbody.md
new file mode 100644
index 0000000000000..b7357d6e85ae7
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.originalbody.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) > [originalBody](./kibana-plugin-plugins-data-server.indexpattern.originalbody.md)
+
+## IndexPattern.originalBody property
+
+Signature:
+
+```typescript
+originalBody: {
+ [key: string]: any;
+ };
+```
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): Promise;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| fieldName | string
| |
+| unit | number
| |
+
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.prepbody.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.prepbody.md
new file mode 100644
index 0000000000000..6f81ebfd68c25
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.prepbody.md
@@ -0,0 +1,33 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [prepBody](./kibana-plugin-plugins-data-server.indexpattern.prepbody.md)
+
+## IndexPattern.prepBody() method
+
+Signature:
+
+```typescript
+prepBody(): {
+ title: string;
+ timeFieldName: string | undefined;
+ intervalName: string | null | undefined;
+ sourceFilters: string | undefined;
+ fields: string | undefined;
+ fieldFormatMap: string | undefined;
+ type: string | undefined;
+ typeMeta: string | undefined;
+ };
+```
+Returns:
+
+`{
+ title: string;
+ timeFieldName: string | undefined;
+ intervalName: string | null | undefined;
+ sourceFilters: string | undefined;
+ fields: string | undefined;
+ fieldFormatMap: string | undefined;
+ type: string | undefined;
+ typeMeta: string | undefined;
+ }`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.refreshfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.refreshfields.md
new file mode 100644
index 0000000000000..168e131937eea
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.refreshfields.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) > [refreshFields](./kibana-plugin-plugins-data-server.indexpattern.refreshfields.md)
+
+## IndexPattern.refreshFields() method
+
+Signature:
+
+```typescript
+refreshFields(): Promise;
+```
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md
new file mode 100644
index 0000000000000..8205175485398
--- /dev/null
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.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) > [removeScriptedField](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md)
+
+## IndexPattern.removeScriptedField() method
+
+Signature:
+
+```typescript
+removeScriptedField(fieldName: string): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| fieldName | string
| |
+
+Returns:
+
+`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.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.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md
index 3c477e17503f4..dea79f5dc4a9f 100644
--- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md
+++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.md
@@ -9,6 +9,7 @@
| Class | Description |
| --- | --- |
| [AggParamType](./kibana-plugin-plugins-data-server.aggparamtype.md) | |
+| [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) | |
| [IndexPatternsFetcher](./kibana-plugin-plugins-data-server.indexpatternsfetcher.md) | |
| [OptionedParamType](./kibana-plugin-plugins-data-server.optionedparamtype.md) | |
| [Plugin](./kibana-plugin-plugins-data-server.plugin.md) | |
@@ -41,14 +42,13 @@
| --- | --- |
| [AggParamOption](./kibana-plugin-plugins-data-server.aggparamoption.md) | |
| [EsQueryConfig](./kibana-plugin-plugins-data-server.esqueryconfig.md) | |
+| [FieldDescriptor](./kibana-plugin-plugins-data-server.fielddescriptor.md) | |
| [FieldFormatConfig](./kibana-plugin-plugins-data-server.fieldformatconfig.md) | |
| [IEsSearchRequest](./kibana-plugin-plugins-data-server.iessearchrequest.md) | |
| [IEsSearchResponse](./kibana-plugin-plugins-data-server.iessearchresponse.md) | |
| [IFieldSubType](./kibana-plugin-plugins-data-server.ifieldsubtype.md) | |
| [IFieldType](./kibana-plugin-plugins-data-server.ifieldtype.md) | |
-| [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) | |
| [IndexPatternAttributes](./kibana-plugin-plugins-data-server.indexpatternattributes.md) | Use data plugin interface instead |
-| [IndexPatternFieldDescriptor](./kibana-plugin-plugins-data-server.indexpatternfielddescriptor.md) | |
| [ISearchOptions](./kibana-plugin-plugins-data-server.isearchoptions.md) | |
| [ISearchSetup](./kibana-plugin-plugins-data-server.isearchsetup.md) | |
| [ISearchStart](./kibana-plugin-plugins-data-server.isearchstart.md) | |
diff --git a/src/plugins/data/common/index_patterns/fields/index_pattern_field.ts b/src/plugins/data/common/index_patterns/fields/index_pattern_field.ts
index 7f72bfe55c7cd..b83323ea19556 100644
--- a/src/plugins/data/common/index_patterns/fields/index_pattern_field.ts
+++ b/src/plugins/data/common/index_patterns/fields/index_pattern_field.ts
@@ -152,7 +152,7 @@ export class IndexPatternField implements IFieldType {
getFormatterForField,
}: {
getFormatterForField?: IndexPattern['getFormatterForField'];
- } = {}) {
+ } = {}): FieldSpec {
return {
count: this.count,
script: this.script,
diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts
index 2cce8ed69a15d..fa78928d9cbc3 100644
--- a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts
+++ b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts
@@ -29,6 +29,7 @@ import {
IIndexPattern,
FieldTypeUnknownError,
FieldFormatNotFoundError,
+ IFieldType,
} from '../../../common';
import { findByTitle } from '../utils';
import { IndexPatternMissingIndices } from '../lib';
@@ -546,7 +547,9 @@ export class IndexPattern implements IIndexPattern {
};
}
- getFormatterForField(field: IndexPatternField | IndexPatternField['spec']): FieldFormat {
+ getFormatterForField(
+ field: IndexPatternField | IndexPatternField['spec'] | IFieldType
+ ): FieldFormat {
return (
this.fieldFormatMap[field.name] ||
this.fieldFormats.getDefaultInstance(
diff --git a/src/plugins/data/common/index_patterns/types.ts b/src/plugins/data/common/index_patterns/types.ts
index 7cb70f2dfda16..60a4c597a0a07 100644
--- a/src/plugins/data/common/index_patterns/types.ts
+++ b/src/plugins/data/common/index_patterns/types.ts
@@ -22,10 +22,9 @@ import { ToastInputFields, ErrorToastOptions } from 'src/core/public/notificatio
import type { SavedObject } from 'src/core/server';
import { IFieldType } from './fields';
import { SerializedFieldFormat } from '../../../expressions/common';
-import { KBN_FIELD_TYPES } from '..';
+import { KBN_FIELD_TYPES, IndexPatternField, FieldFormat } from '..';
export interface IIndexPattern {
- [key: string]: any;
fields: IFieldType[];
title: string;
id?: string;
@@ -33,6 +32,9 @@ export interface IIndexPattern {
timeFieldName?: string;
intervalName?: string | null;
getTimeField?(): IFieldType | undefined;
+ getFormatterForField?: (
+ field: IndexPatternField | IndexPatternField['spec'] | IFieldType
+ ) => FieldFormat;
fieldFormatMap?: Record<
string,
{
diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md
index 82b21dd9a451a..b1f31c2c63fe1 100644
--- a/src/plugins/data/public/public.api.md
+++ b/src/plugins/data/public/public.api.md
@@ -1004,8 +1004,6 @@ export interface IFieldType {
//
// @public (undocumented)
export interface IIndexPattern {
- // (undocumented)
- [key: string]: any;
// (undocumented)
fieldFormatMap?: Record FieldFormat;
+ // (undocumented)
getTimeField?(): IFieldType | undefined;
// (undocumented)
id?: string;
@@ -1123,7 +1123,7 @@ export class IndexPattern implements IIndexPattern {
// (undocumented)
getFieldByName(name: string): IndexPatternField | undefined;
// (undocumented)
- getFormatterForField(field: IndexPatternField | IndexPatternField['spec']): FieldFormat;
+ getFormatterForField(field: IndexPatternField | IndexPatternField['spec'] | IFieldType): FieldFormat;
// (undocumented)
getIndex(): string;
// (undocumented)
@@ -1290,24 +1290,7 @@ export class IndexPatternField implements IFieldType {
// (undocumented)
toSpec({ getFormatterForField, }?: {
getFormatterForField?: IndexPattern['getFormatterForField'];
- }): {
- count: number;
- script: string | undefined;
- lang: string | undefined;
- conflictDescriptions: Record | undefined;
- name: string;
- type: string;
- esTypes: string[] | undefined;
- scripted: boolean;
- searchable: boolean;
- aggregatable: boolean;
- readFromDocValues: boolean;
- subType: import("../types").IFieldSubType | undefined;
- format: {
- id: any;
- params: any;
- } | undefined;
- };
+ }): FieldSpec;
// (undocumented)
get type(): string;
// (undocumented)
diff --git a/src/plugins/data/server/index.ts b/src/plugins/data/server/index.ts
index 03baff4910309..9be8ef1b53423 100644
--- a/src/plugins/data/server/index.ts
+++ b/src/plugins/data/server/index.ts
@@ -133,16 +133,17 @@ export {
IndexPatternsFetcher,
FieldDescriptor as IndexPatternFieldDescriptor,
shouldReadFieldFromDocValues, // used only in logstash_fields fixture
+ FieldDescriptor,
} from './index_patterns';
export {
- IIndexPattern,
IFieldType,
IFieldSubType,
ES_FIELD_TYPES,
KBN_FIELD_TYPES,
IndexPatternAttributes,
UI_SETTINGS,
+ IndexPattern,
} from '../common';
/**
diff --git a/src/plugins/data/server/index_patterns/utils.ts b/src/plugins/data/server/index_patterns/utils.ts
index e841097fe49c2..1e7a85599612c 100644
--- a/src/plugins/data/server/index_patterns/utils.ts
+++ b/src/plugins/data/server/index_patterns/utils.ts
@@ -18,11 +18,11 @@
*/
import { SavedObjectsClientContract } from 'kibana/server';
-import { IIndexPattern, IFieldType } from '../../common';
+import { IFieldType, IndexPatternAttributes, SavedObject } from '../../common';
export const getFieldByName = (
fieldName: string,
- indexPattern: IIndexPattern
+ indexPattern: SavedObject
): IFieldType | undefined => {
const fields: IFieldType[] = indexPattern && JSON.parse(indexPattern.attributes.fields);
const field = fields && fields.find((f) => f.name === fieldName);
@@ -33,8 +33,8 @@ export const getFieldByName = (
export const findIndexPatternById = async (
savedObjectsClient: SavedObjectsClientContract,
index: string
-): Promise => {
- const savedObjectsResponse = await savedObjectsClient.find({
+): Promise | undefined> => {
+ const savedObjectsResponse = await savedObjectsClient.find({
type: 'index-pattern',
fields: ['fields'],
search: `"${index}"`,
@@ -42,6 +42,6 @@ export const findIndexPatternById = async (
});
if (savedObjectsResponse.total > 0) {
- return (savedObjectsResponse.saved_objects[0] as unknown) as IIndexPattern;
+ return savedObjectsResponse.saved_objects[0];
}
};
diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md
index b73f19fffda4a..a820e9bf9ec35 100644
--- a/src/plugins/data/server/server.api.md
+++ b/src/plugins/data/server/server.api.md
@@ -396,6 +396,32 @@ export interface EsQueryConfig {
queryStringOptions: Record;
}
+// Warning: (ae-missing-release-tag) "FieldDescriptor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public (undocumented)
+interface FieldDescriptor {
+ // (undocumented)
+ aggregatable: boolean;
+ // (undocumented)
+ esTypes: string[];
+ // (undocumented)
+ name: string;
+ // (undocumented)
+ readFromDocValues: boolean;
+ // (undocumented)
+ searchable: boolean;
+ // Warning: (ae-forgotten-export) The symbol "FieldSubType" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ subType?: FieldSubType;
+ // (undocumented)
+ type: string;
+}
+
+export { FieldDescriptor }
+
+export { FieldDescriptor as IndexPatternFieldDescriptor }
+
// Warning: (ae-missing-release-tag) "FieldFormatConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -467,6 +493,7 @@ export function getShardTimeout(config: SharedGlobalConfig): {
timeout?: undefined;
};
+// Warning: (ae-forgotten-export) The symbol "IIndexPattern" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "getTime" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -590,39 +617,141 @@ export interface IFieldType {
visualizable?: boolean;
}
-// Warning: (ae-missing-release-tag) "IIndexPattern" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+// Warning: (ae-forgotten-export) The symbol "MetricAggType" needs to be exported by the entry point index.d.ts
+// Warning: (ae-missing-release-tag) "IMetricAggType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
-export interface IIndexPattern {
+export type IMetricAggType = MetricAggType;
+
+// Warning: (ae-missing-release-tag) "IndexPattern" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public (undocumented)
+export class IndexPattern implements IIndexPattern {
+ // Warning: (ae-forgotten-export) The symbol "IndexPatternDeps" needs to be exported by the entry point index.d.ts
+ constructor(id: string | undefined, { savedObjectsClient, apiClient, patternCache, fieldFormats, indexPatternsService, onNotification, onError, onUnsupportedTimePattern, shortDotsEnable, metaFields, }: IndexPatternDeps);
// (undocumented)
- [key: string]: any;
+ addScriptedField(name: string, script: string, fieldType: string | undefined, lang: string): Promise;
// (undocumented)
- fieldFormatMap?: Record;
+ create(allowOverride?: boolean): Promise;
// (undocumented)
- fields: IFieldType[];
+ _fetchFields(): Promise;
// (undocumented)
- getTimeField?(): IFieldType | undefined;
+ fieldFormatMap: any;
+ // Warning: (ae-forgotten-export) The symbol "IIndexPatternFieldList" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ fields: IIndexPatternFieldList & {
+ toSpec: () => FieldSpec[];
+ };
+ // (undocumented)
+ fieldsFetcher: any;
+ // (undocumented)
+ flattenHit: any;
+ // (undocumented)
+ formatField: any;
+ // (undocumented)
+ formatHit: any;
+ // (undocumented)
+ getAggregationRestrictions(): Record> | undefined;
+ // (undocumented)
+ getComputedFields(): {
+ storedFields: string[];
+ scriptFields: any;
+ docvalueFields: {
+ field: any;
+ format: string;
+ }[];
+ };
+ // (undocumented)
+ getFieldByName(name: string): IndexPatternField | undefined;
+ // (undocumented)
+ getFormatterForField(field: IndexPatternField | IndexPatternField['spec'] | IFieldType): FieldFormat;
+ // (undocumented)
+ getIndex(): string;
+ // Warning: (ae-forgotten-export) The symbol "IndexPatternField" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ getNonScriptedFields(): IndexPatternField[];
+ // (undocumented)
+ getScriptedFields(): IndexPatternField[];
+ // (undocumented)
+ getSourceFiltering(): {
+ excludes: any[];
+ };
+ // (undocumented)
+ getTimeField(): IndexPatternField | undefined;
// (undocumented)
id?: string;
// (undocumented)
- intervalName?: string | null;
+ init(): Promise;
+ // Warning: (ae-forgotten-export) The symbol "IndexPatternSpec" needs to be exported by the entry point index.d.ts
+ //
// (undocumented)
- timeFieldName?: string;
+ initFromSpec(spec: IndexPatternSpec): this;
+ // (undocumented)
+ intervalName: string | undefined | null;
+ // (undocumented)
+ isTimeBased(): boolean;
+ // (undocumented)
+ isTimeBasedWildcard(): boolean;
+ // (undocumented)
+ isTimeNanosBased(): boolean;
+ // (undocumented)
+ isUnsupportedTimePattern(): boolean;
+ // (undocumented)
+ isWildcard(): boolean;
+ // (undocumented)
+ metaFields: string[];
+ // (undocumented)
+ migrate(newTitle: string): Promise;
+ // (undocumented)
+ originalBody: {
+ [key: string]: any;
+ };
+ // (undocumented)
+ popularizeField(fieldName: string, unit?: number): Promise;
+ // (undocumented)
+ prepBody(): {
+ title: string;
+ timeFieldName: string | undefined;
+ intervalName: string | null | undefined;
+ sourceFilters: string | undefined;
+ fields: string | undefined;
+ fieldFormatMap: string | undefined;
+ type: string | undefined;
+ typeMeta: string | undefined;
+ };
+ // (undocumented)
+ refreshFields(): Promise;
+ // (undocumented)
+ removeScriptedField(fieldName: string): void;
+ // Warning: (ae-forgotten-export) The symbol "SourceFilter" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ sourceFilters?: SourceFilter[];
+ // (undocumented)
+ timeFieldName: string | undefined;
// (undocumented)
title: string;
// (undocumented)
- type?: string;
+ toSpec(): IndexPatternSpec;
+ // (undocumented)
+ type: string | undefined;
+ // Warning: (ae-forgotten-export) The symbol "TypeMeta" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ typeMeta?: TypeMeta;
+ // (undocumented)
+ version: string | undefined;
}
-// Warning: (ae-forgotten-export) The symbol "MetricAggType" needs to be exported by the entry point index.d.ts
-// Warning: (ae-missing-release-tag) "IMetricAggType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
-//
-// @public (undocumented)
-export type IMetricAggType = MetricAggType;
-
// Warning: (ae-missing-release-tag) "IndexPatternAttributes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public @deprecated
@@ -645,28 +774,6 @@ export interface IndexPatternAttributes {
typeMeta: string;
}
-// Warning: (ae-missing-release-tag) "FieldDescriptor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
-//
-// @public (undocumented)
-export interface IndexPatternFieldDescriptor {
- // (undocumented)
- aggregatable: boolean;
- // (undocumented)
- esTypes: string[];
- // (undocumented)
- name: string;
- // (undocumented)
- readFromDocValues: boolean;
- // (undocumented)
- searchable: boolean;
- // Warning: (ae-forgotten-export) The symbol "FieldSubType" needs to be exported by the entry point index.d.ts
- //
- // (undocumented)
- subType?: FieldSubType;
- // (undocumented)
- type: string;
-}
-
// Warning: (ae-missing-release-tag) "indexPatterns" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -685,14 +792,14 @@ export class IndexPatternsFetcher {
metaFields: string[];
lookBack: number;
interval: string;
- }): Promise;
+ }): Promise;
getFieldsForWildcard(options: {
pattern: string | string[];
metaFields?: string[];
fieldCapsOptions?: {
allowNoIndices: boolean;
};
- }): Promise;
+ }): Promise;
}
// Warning: (ae-missing-release-tag) "ISearchOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -1115,7 +1222,6 @@ export function usageProvider(core: CoreSetup_2): SearchUsage;
//
// src/plugins/data/common/es_query/filters/meta_filter.ts:53:3 - (ae-forgotten-export) The symbol "FilterState" needs to be exported by the entry point index.d.ts
// src/plugins/data/common/es_query/filters/meta_filter.ts:54:3 - (ae-forgotten-export) The symbol "FilterMeta" needs to be exported by the entry point index.d.ts
-// src/plugins/data/common/index_patterns/fields/types.ts:41:25 - (ae-forgotten-export) The symbol "IndexPattern" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:40:23 - (ae-forgotten-export) The symbol "buildCustomFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:40:23 - (ae-forgotten-export) The symbol "buildFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:71:21 - (ae-forgotten-export) The symbol "getEsQueryConfig" needs to be exported by the entry point index.d.ts
@@ -1137,19 +1243,19 @@ export function usageProvider(core: CoreSetup_2): SearchUsage;
// src/plugins/data/server/index.ts:101:26 - (ae-forgotten-export) The symbol "TruncateFormat" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:127:27 - (ae-forgotten-export) The symbol "isFilterable" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:127:27 - (ae-forgotten-export) The symbol "isNestedField" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:225:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:225:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:225:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:225:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:227:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:228:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:237:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:238:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:239:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:243:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:244:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:248:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
-// src/plugins/data/server/index.ts:251:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:226:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:226:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:226:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:226:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:228:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:229:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:238:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:239:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:240:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:244:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:245:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:249:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
+// src/plugins/data/server/index.ts:252:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/plugin.ts:88:66 - (ae-forgotten-export) The symbol "DataEnhancements" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
diff --git a/src/plugins/discover/public/application/components/discover_legacy.tsx b/src/plugins/discover/public/application/components/discover_legacy.tsx
index 1a98843649259..9c3d833d73b23 100644
--- a/src/plugins/discover/public/application/components/discover_legacy.tsx
+++ b/src/plugins/discover/public/application/components/discover_legacy.tsx
@@ -25,7 +25,7 @@ import { IUiSettingsClient, MountPoint } from 'kibana/public';
import { HitsCounter } from './hits_counter';
import { TimechartHeader } from './timechart_header';
import { DiscoverSidebar } from './sidebar';
-import { getServices, IIndexPattern } from '../../kibana_services';
+import { getServices, IndexPattern } from '../../kibana_services';
// @ts-ignore
import { DiscoverNoResults } from '../angular/directives/no_results';
import { DiscoverUninitialized } from '../angular/directives/uninitialized';
@@ -58,7 +58,7 @@ export interface DiscoverLegacyProps {
fieldCounts: Record;
histogramData: Chart;
hits: number;
- indexPattern: IIndexPattern;
+ indexPattern: IndexPattern;
minimumVisibleRows: number;
onAddFilter: (field: IndexPatternField | string, value: string, type: '+' | '-') => void;
onChangeInterval: (interval: string) => void;
diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx
index 9689265872958..d23afc9aab5a9 100644
--- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx
+++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.test.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import { shallow } from 'enzyme';
-import { IndexPatternField, IIndexPattern } from 'src/plugins/data/public';
+import { IndexPatternField, IndexPattern } from 'src/plugins/data/public';
import { IndexedFieldsTable } from './indexed_fields_table';
import { IndexedFieldItem } from './types';
@@ -44,7 +44,7 @@ const helpers = {
const indexPattern = ({
getNonScriptedFields: () => fields,
-} as unknown) as IIndexPattern;
+} as unknown) as IndexPattern;
const mockFieldToIndexPatternField = (spec: Record) => {
return new IndexPatternField(
diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx
index 9505592cff448..7be420e2af50d 100644
--- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx
+++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/indexed_fields_table/indexed_fields_table.tsx
@@ -19,23 +19,19 @@
import React, { Component } from 'react';
import { createSelector } from 'reselect';
-import {
- IndexPatternField,
- IIndexPattern,
- IFieldType,
-} from '../../../../../../plugins/data/public';
+import { IndexPatternField, IndexPattern, IFieldType } from '../../../../../../plugins/data/public';
import { Table } from './components/table';
import { getFieldFormat } from './lib';
import { IndexedFieldItem } from './types';
interface IndexedFieldsTableProps {
fields: IndexPatternField[];
- indexPattern: IIndexPattern;
+ indexPattern: IndexPattern;
fieldFilter?: string;
indexedFieldTypeFilter?: string;
helpers: {
- redirectToRoute: Function;
- getFieldInfo: (indexPattern: IIndexPattern, field: IFieldType) => string[];
+ redirectToRoute: (obj: any) => void;
+ getFieldInfo: (indexPattern: IndexPattern, field: IFieldType) => string[];
};
fieldWildcardMatcher: (filters: any[]) => (val: any) => boolean;
}
diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx
index e43ee2e55eeca..2d3a61b42c3a4 100644
--- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx
+++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.test.tsx
@@ -22,13 +22,13 @@ import { shallow, ShallowWrapper } from 'enzyme';
import { Table, TableProps, TableState } from './table';
import { EuiTableFieldDataColumnType, keys } from '@elastic/eui';
-import { IIndexPattern } from 'src/plugins/data/public';
+import { IndexPattern } from 'src/plugins/data/public';
import { SourceFiltersTableFilter } from '../../types';
-const indexPattern = {} as IIndexPattern;
+const indexPattern = {} as IndexPattern;
const items: SourceFiltersTableFilter[] = [{ value: 'tim*', clientId: '' }];
-const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as IIndexPattern);
+const getIndexPatternMock = (mockedFields: any = {}) => ({ ...mockedFields } as IndexPattern);
const getTableColumnRender = (
component: ShallowWrapper,
diff --git a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx
index f73d756f28116..c5b09961f25fc 100644
--- a/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx
+++ b/src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx
@@ -30,7 +30,7 @@ import {
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
-import { IIndexPattern } from 'src/plugins/data/public';
+import { IndexPattern } from 'src/plugins/data/public';
import { SourceFiltersTableFilter } from '../../types';
const filterHeader = i18n.translate(
@@ -80,7 +80,7 @@ const cancelAria = i18n.translate(
);
export interface TableProps {
- indexPattern: IIndexPattern;
+ indexPattern: IndexPattern;
items: SourceFiltersTableFilter[];
deleteFilter: Function;
fieldWildcardMatcher: Function;
diff --git a/x-pack/plugins/apm/server/lib/index_pattern/get_dynamic_index_pattern.ts b/x-pack/plugins/apm/server/lib/index_pattern/get_dynamic_index_pattern.ts
index cb30c6c064848..49030dc8cacc5 100644
--- a/x-pack/plugins/apm/server/lib/index_pattern/get_dynamic_index_pattern.ts
+++ b/x-pack/plugins/apm/server/lib/index_pattern/get_dynamic_index_pattern.ts
@@ -8,7 +8,7 @@ import LRU from 'lru-cache';
import { LegacyAPICaller } from '../../../../../../src/core/server';
import {
IndexPatternsFetcher,
- IIndexPattern,
+ FieldDescriptor,
} from '../../../../../../src/plugins/data/server';
import { ApmIndicesConfig } from '../settings/apm_indices/get_apm_indices';
import {
@@ -17,7 +17,12 @@ import {
} from '../../../common/processor_event';
import { APMRequestHandlerContext } from '../../routes/typings';
-const cache = new LRU({
+interface IndexPatternTitleAndFields {
+ title: string;
+ fields: FieldDescriptor[];
+}
+
+const cache = new LRU({
max: 100,
maxAge: 1000 * 60,
});
@@ -53,7 +58,7 @@ export const getDynamicIndexPattern = async ({
pattern: patternIndices,
});
- const indexPattern: IIndexPattern = {
+ const indexPattern: IndexPatternTitleAndFields = {
fields,
title: indexPatternTitle,
};
diff --git a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
index 8688bbe549f51..2af6413da039b 100644
--- a/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
+++ b/x-pack/plugins/maps/server/maps_telemetry/maps_telemetry.ts
@@ -6,11 +6,12 @@
import _ from 'lodash';
import {
+ SavedObject,
SavedObjectAttribute,
SavedObjectAttributes,
SavedObjectsClientContract,
} from 'kibana/server';
-import { IFieldType, IIndexPattern } from 'src/plugins/data/public';
+import { IFieldType, IndexPatternAttributes } from 'src/plugins/data/public';
import {
ES_GEO_FIELD_TYPE,
LAYER_TYPE,
@@ -64,7 +65,9 @@ function getUniqueLayerCounts(layerCountsList: ILayerTypeCount[], mapsCount: num
}, {});
}
-function getIndexPatternsWithGeoFieldCount(indexPatterns: IIndexPattern[]) {
+function getIndexPatternsWithGeoFieldCount(
+ indexPatterns: Array>
+) {
const fieldLists = indexPatterns.map((indexPattern) =>
indexPattern.attributes && indexPattern.attributes.fields
? JSON.parse(indexPattern.attributes.fields)
@@ -112,7 +115,7 @@ function getEMSLayerCount(layerLists: LayerDescriptor[][]): ILayerTypeCount[] {
}
function isFieldGeoShape(
- indexPatterns: IIndexPattern[],
+ indexPatterns: Array>,
indexPatternId: string,
geoField: string | undefined
): boolean {
@@ -120,9 +123,11 @@ function isFieldGeoShape(
return false;
}
- const matchIndexPattern = indexPatterns.find((indexPattern: IIndexPattern) => {
- return indexPattern.id === indexPatternId;
- });
+ const matchIndexPattern = indexPatterns.find(
+ (indexPattern: SavedObject) => {
+ return indexPattern.id === indexPatternId;
+ }
+ );
if (!matchIndexPattern) {
return false;
@@ -140,7 +145,10 @@ function isFieldGeoShape(
return !!matchField && matchField.type === ES_GEO_FIELD_TYPE.GEO_SHAPE;
}
-function isGeoShapeAggLayer(indexPatterns: IIndexPattern[], layer: LayerDescriptor): boolean {
+function isGeoShapeAggLayer(
+ indexPatterns: Array>,
+ layer: LayerDescriptor
+): boolean {
if (layer.sourceDescriptor === null) {
return false;
}
@@ -176,7 +184,7 @@ function isGeoShapeAggLayer(indexPatterns: IIndexPattern[], layer: LayerDescript
function getGeoShapeAggCount(
layerLists: LayerDescriptor[][],
- indexPatterns: IIndexPattern[]
+ indexPatterns: Array>
): number {
const countsPerMap: number[] = layerLists.map((layerList: LayerDescriptor[]) => {
const geoShapeAggLayers = layerList.filter((layerDescriptor) => {
@@ -204,7 +212,7 @@ export function buildMapsTelemetry({
settings,
}: {
mapSavedObjects: MapSavedObject[];
- indexPatternSavedObjects: IIndexPattern[];
+ indexPatternSavedObjects: Array>;
settings: SavedObjectAttribute;
}): SavedObjectAttributes {
const layerLists: LayerDescriptor[][] = getLayerLists(mapSavedObjects);
@@ -283,10 +291,12 @@ export async function getMapsTelemetry(config: MapsConfigType) {
const savedObjectsClient = getInternalRepository();
// @ts-ignore
const mapSavedObjects: MapSavedObject[] = await getMapSavedObjects(savedObjectsClient);
- const indexPatternSavedObjects: IIndexPattern[] = (await getIndexPatternSavedObjects(
+ const indexPatternSavedObjects: Array> = (await getIndexPatternSavedObjects(
// @ts-ignore
savedObjectsClient
- )) as IIndexPattern[];
+ )) as Array>;
const settings: SavedObjectAttribute = {
showMapVisualizationTypes: config.showMapVisualizationTypes,
};
diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts
index d1a4df768a6ae..394dff1408134 100644
--- a/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts
+++ b/x-pack/plugins/ml/server/models/data_frame_analytics/index_patterns.ts
@@ -5,13 +5,13 @@
*/
import { SavedObjectsClientContract } from 'kibana/server';
-import { IIndexPattern } from 'src/plugins/data/server';
+import { IndexPatternAttributes } from 'src/plugins/data/server';
export class IndexPatternHandler {
constructor(private savedObjectsClient: SavedObjectsClientContract) {}
// returns a id based on an index pattern name
async getIndexPatternId(indexName: string) {
- const response = await this.savedObjectsClient.find({
+ const response = await this.savedObjectsClient.find({
type: 'index-pattern',
perPage: 10,
search: `"${indexName}"`,
diff --git a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts
index 1fe64a25ebcaa..513f38122527b 100644
--- a/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts
+++ b/x-pack/plugins/reporting/server/export_types/csv_from_savedobject/lib/get_csv_job.ts
@@ -6,12 +6,7 @@
import { IUiSettingsClient, SavedObjectsClientContract } from 'kibana/server';
import { EsQueryConfig } from 'src/plugins/data/server';
-import {
- esQuery,
- Filter,
- IIndexPattern,
- Query,
-} from '../../../../../../../src/plugins/data/server';
+import { esQuery, Filter, Query } from '../../../../../../../src/plugins/data/server';
import { TimeRangeParams } from '../../common';
import { GenerateCsvParams } from '../../csv/generate_csv';
import {
@@ -126,7 +121,9 @@ export const getGenerateCsvParams = async (
_source: { includes },
docvalue_fields: docValueFields,
query: esQuery.buildEsQuery(
- indexPatternSavedObject as IIndexPattern,
+ // compromise made while factoring out IIndexPattern type
+ // @ts-expect-error
+ indexPatternSavedObject,
(searchSourceQuery as unknown) as Query,
(combinedFilter as unknown) as Filter,
esQueryConfig
diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx
index f2eb5cf5b94f3..2ce9d1ea68b3c 100644
--- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx
@@ -13,6 +13,7 @@ import {
esFilters,
FilterManager,
UI_SETTINGS,
+ IndexPattern,
} from '../../../../../../../../src/plugins/data/public';
import { SeverityBadge } from '../severity_badge';
@@ -140,11 +141,11 @@ describe('helpers', () => {
filterManager: mockFilterManager,
query: mockQueryBarWithFilters.query,
savedId: mockQueryBarWithFilters.saved_id,
- indexPatterns: {
+ indexPatterns: ({
fields: [{ name: 'event.category', type: 'test type' }],
title: 'test title',
getFormatterForField: () => ({ convert: (val: unknown) => val }),
- },
+ } as unknown) as IndexPattern,
});
const wrapper = shallow(result[0].description as React.ReactElement);
const filterLabelComponent = wrapper.find(esFilters.FilterLabel).at(0);
diff --git a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts
index b9dc7945e9579..3fc26811d46eb 100644
--- a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts
+++ b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts
@@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema';
import { i18n } from '@kbn/i18n';
import Mustache from 'mustache';
import { UptimeAlertTypeFactory } from './types';
-import { esKuery, IIndexPattern } from '../../../../../../src/plugins/data/server';
+import { esKuery } from '../../../../../../src/plugins/data/server';
import { JsonObject } from '../../../../../../src/plugins/kibana_utils/common';
import {
StatusCheckFilters,
@@ -26,7 +26,7 @@ import { UNNAMED_LOCATION } from '../../../common/constants';
import { uptimeAlertWrapper } from './uptime_alert_wrapper';
import { MonitorStatusTranslations } from '../../../common/translations';
import { ESAPICaller } from '../adapters/framework';
-import { getUptimeIndexPattern } from '../requests/get_index_pattern';
+import { getUptimeIndexPattern, IndexPatternTitleAndFields } from '../requests/get_index_pattern';
import { UMServerLibs } from '../lib';
const { MONITOR_STATUS } = ACTION_GROUP_DEFINITIONS;
@@ -58,7 +58,7 @@ export const hasFilters = (filters?: StatusCheckFilters) => {
};
export const generateFilterDSL = async (
- getIndexPattern: () => Promise,
+ getIndexPattern: () => Promise,
filters: StatusCheckFilters,
search: string
): Promise => {
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_index_pattern.ts b/x-pack/plugins/uptime/server/lib/requests/get_index_pattern.ts
index 345d02b990eb7..1d284143a1ab0 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_index_pattern.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_index_pattern.ts
@@ -6,12 +6,17 @@
import { LegacyAPICaller, LegacyCallAPIOptions } from 'src/core/server';
import { UMElasticsearchQueryFn } from '../adapters';
-import { IndexPatternsFetcher, IIndexPattern } from '../../../../../../src/plugins/data/server';
+import { IndexPatternsFetcher, FieldDescriptor } from '../../../../../../src/plugins/data/server';
-export const getUptimeIndexPattern: UMElasticsearchQueryFn<{}, IIndexPattern | undefined> = async ({
- callES,
- dynamicSettings,
-}) => {
+export interface IndexPatternTitleAndFields {
+ title: string;
+ fields: FieldDescriptor[];
+}
+
+export const getUptimeIndexPattern: UMElasticsearchQueryFn<
+ {},
+ IndexPatternTitleAndFields | undefined
+> = async ({ callES, dynamicSettings }) => {
const callAsCurrentUser: LegacyAPICaller = async (
endpoint: string,
clientParams: Record = {},
@@ -28,7 +33,7 @@ export const getUptimeIndexPattern: UMElasticsearchQueryFn<{}, IIndexPattern | u
pattern: dynamicSettings.heartbeatIndices,
});
- const indexPattern: IIndexPattern = {
+ const indexPattern: IndexPatternTitleAndFields = {
fields,
title: dynamicSettings.heartbeatIndices,
};