Remove data <--> expressions circular dependencies. (#82685)

This commit is contained in:
Luke Elmers 2020-11-09 13:01:22 -07:00 committed by GitHub
parent 729631a76d
commit c6afc47f32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
124 changed files with 473 additions and 484 deletions

View file

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ExecutionContextSearch](./kibana-plugin-plugins-data-public.executioncontextsearch.md)
## ExecutionContextSearch type
<b>Signature:</b>
```typescript
export declare type ExecutionContextSearch = {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
};
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ExpressionFunctionKibana](./kibana-plugin-plugins-data-public.expressionfunctionkibana.md)
## ExpressionFunctionKibana type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext, ExecutionContext<Adapters, ExecutionContextSearch>>;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ExpressionFunctionKibanaContext](./kibana-plugin-plugins-data-public.expressionfunctionkibanacontext.md)
## ExpressionFunctionKibanaContext type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition<'kibana_context', KibanaContext | null, Arguments, Promise<KibanaContext>, ExecutionContext<Adapters, ExecutionContextSearch>>;
```

View file

@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [ExpressionValueSearchContext](./kibana-plugin-plugins-expressions-server.expressionvaluesearchcontext.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ExpressionValueSearchContext](./kibana-plugin-plugins-data-public.expressionvaluesearchcontext.md)
## ExpressionValueSearchContext type

View file

@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [KibanaContext](./kibana-plugin-plugins-expressions-public.kibanacontext.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [KibanaContext](./kibana-plugin-plugins-data-public.kibanacontext.md)
## KibanaContext type

View file

@ -142,7 +142,11 @@
| [EsdslExpressionFunctionDefinition](./kibana-plugin-plugins-data-public.esdslexpressionfunctiondefinition.md) | |
| [EsQuerySortValue](./kibana-plugin-plugins-data-public.esquerysortvalue.md) | |
| [EsRawResponseExpressionTypeDefinition](./kibana-plugin-plugins-data-public.esrawresponseexpressiontypedefinition.md) | |
| [ExecutionContextSearch](./kibana-plugin-plugins-data-public.executioncontextsearch.md) | |
| [ExistsFilter](./kibana-plugin-plugins-data-public.existsfilter.md) | |
| [ExpressionFunctionKibana](./kibana-plugin-plugins-data-public.expressionfunctionkibana.md) | |
| [ExpressionFunctionKibanaContext](./kibana-plugin-plugins-data-public.expressionfunctionkibanacontext.md) | |
| [ExpressionValueSearchContext](./kibana-plugin-plugins-data-public.expressionvaluesearchcontext.md) | |
| [FieldFormatId](./kibana-plugin-plugins-data-public.fieldformatid.md) | id type is needed for creating custom converters. |
| [FieldFormatsContentType](./kibana-plugin-plugins-data-public.fieldformatscontenttype.md) | \* |
| [FieldFormatsGetConfigFn](./kibana-plugin-plugins-data-public.fieldformatsgetconfigfn.md) | |
@ -161,6 +165,7 @@
| [InputTimeRange](./kibana-plugin-plugins-data-public.inputtimerange.md) | |
| [ISearchGeneric](./kibana-plugin-plugins-data-public.isearchgeneric.md) | |
| [ISearchSource](./kibana-plugin-plugins-data-public.isearchsource.md) | search source interface |
| [KibanaContext](./kibana-plugin-plugins-data-public.kibanacontext.md) | |
| [MatchAllFilter](./kibana-plugin-plugins-data-public.matchallfilter.md) | |
| [ParsedInterval](./kibana-plugin-plugins-data-public.parsedinterval.md) | |
| [PhraseFilter](./kibana-plugin-plugins-data-public.phrasefilter.md) | |

View file

@ -7,7 +7,7 @@
<b>Signature:</b>
```typescript
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated"> & ReactIntl.InjectedIntlProps>;
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
}
```

View file

@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ExecutionContextSearch](./kibana-plugin-plugins-data-server.executioncontextsearch.md)
## ExecutionContextSearch type
<b>Signature:</b>
```typescript
export declare type ExecutionContextSearch = {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
};
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ExpressionFunctionKibana](./kibana-plugin-plugins-data-server.expressionfunctionkibana.md)
## ExpressionFunctionKibana type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext, ExecutionContext<Adapters, ExecutionContextSearch>>;
```

View file

@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ExpressionFunctionKibanaContext](./kibana-plugin-plugins-data-server.expressionfunctionkibanacontext.md)
## ExpressionFunctionKibanaContext type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition<'kibana_context', KibanaContext | null, Arguments, Promise<KibanaContext>, ExecutionContext<Adapters, ExecutionContextSearch>>;
```

View file

@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [ExpressionValueSearchContext](./kibana-plugin-plugins-expressions-public.expressionvaluesearchcontext.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ExpressionValueSearchContext](./kibana-plugin-plugins-data-server.expressionvaluesearchcontext.md)
## ExpressionValueSearchContext type

View file

@ -1,6 +1,6 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [KibanaContext](./kibana-plugin-plugins-expressions-server.kibanacontext.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [KibanaContext](./kibana-plugin-plugins-data-server.kibanacontext.md)
## KibanaContext type

View file

@ -88,6 +88,10 @@
| [AggGroupName](./kibana-plugin-plugins-data-server.agggroupname.md) | |
| [AggParam](./kibana-plugin-plugins-data-server.aggparam.md) | |
| [EsaggsExpressionFunctionDefinition](./kibana-plugin-plugins-data-server.esaggsexpressionfunctiondefinition.md) | |
| [ExecutionContextSearch](./kibana-plugin-plugins-data-server.executioncontextsearch.md) | |
| [ExpressionFunctionKibana](./kibana-plugin-plugins-data-server.expressionfunctionkibana.md) | |
| [ExpressionFunctionKibanaContext](./kibana-plugin-plugins-data-server.expressionfunctionkibanacontext.md) | |
| [ExpressionValueSearchContext](./kibana-plugin-plugins-data-server.expressionvaluesearchcontext.md) | |
| [FieldFormatsGetConfigFn](./kibana-plugin-plugins-data-server.fieldformatsgetconfigfn.md) | |
| [Filter](./kibana-plugin-plugins-data-server.filter.md) | |
| [IAggConfig](./kibana-plugin-plugins-data-server.iaggconfig.md) | AggConfig This class represents an aggregation, which is displayed in the left-hand nav of the Visualize app. |
@ -96,6 +100,7 @@
| [IFieldFormatsRegistry](./kibana-plugin-plugins-data-server.ifieldformatsregistry.md) | |
| [IFieldParamType](./kibana-plugin-plugins-data-server.ifieldparamtype.md) | |
| [IMetricAggType](./kibana-plugin-plugins-data-server.imetricaggtype.md) | |
| [KibanaContext](./kibana-plugin-plugins-data-server.kibanacontext.md) | |
| [ParsedInterval](./kibana-plugin-plugins-data-server.parsedinterval.md) | |
| [Query](./kibana-plugin-plugins-data-server.query.md) | |
| [TabbedAggRow](./kibana-plugin-plugins-data-server.tabbedaggrow.md) | \* |

View file

@ -11,7 +11,7 @@ setup(core: CoreSetup<DataPluginStartDependencies, DataPluginStart>, { expressio
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
};
};
```
@ -29,7 +29,7 @@ setup(core: CoreSetup<DataPluginStartDependencies, DataPluginStart>, { expressio
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
};
}`

View file

@ -12,7 +12,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("src/core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../public").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../common").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
};
@ -31,7 +31,7 @@ start(core: CoreStart): {
fieldFormatServiceFactory: (uiSettings: import("src/core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../public").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../common").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
}`

View file

@ -9,7 +9,7 @@
<b>Signature:</b>
```typescript
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters>
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState = SerializableState>
```
## Properties

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.md) &gt; [kibana](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana.md)
## ExpressionFunctionDefinitions.kibana property
<b>Signature:</b>
```typescript
kibana: ExpressionFunctionKibana;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.md) &gt; [kibana\_context](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana_context.md)
## ExpressionFunctionDefinitions.kibana\_context property
<b>Signature:</b>
```typescript
kibana_context: ExpressionFunctionKibanaContext;
```

View file

@ -20,8 +20,6 @@ export interface ExpressionFunctionDefinitions
| [cumulative\_sum](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.cumulative_sum.md) | <code>ExpressionFunctionCumulativeSum</code> | |
| [derivative](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.derivative.md) | <code>ExpressionFunctionDerivative</code> | |
| [font](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.font.md) | <code>ExpressionFunctionFont</code> | |
| [kibana\_context](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana_context.md) | <code>ExpressionFunctionKibanaContext</code> | |
| [kibana](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.kibana.md) | <code>ExpressionFunctionKibana</code> | |
| [moving\_average](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.moving_average.md) | <code>ExpressionFunctionMovingAverage</code> | |
| [theme](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.theme.md) | <code>ExpressionFunctionTheme</code> | |
| [var\_set](./kibana-plugin-plugins-expressions-public.expressionfunctiondefinitions.var_set.md) | <code>ExpressionFunctionVarSet</code> | |

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [ExpressionFunctionKibana](./kibana-plugin-plugins-expressions-public.expressionfunctionkibana.md)
## ExpressionFunctionKibana type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext>;
```

View file

@ -21,7 +21,7 @@ export interface IExpressionLoaderParams
| [disableCaching](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.disablecaching.md) | <code>boolean</code> | |
| [inspectorAdapters](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.inspectoradapters.md) | <code>Adapters</code> | |
| [onRenderError](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.onrendererror.md) | <code>RenderErrorHandlerFnType</code> | |
| [searchContext](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.searchcontext.md) | <code>ExecutionContextSearch</code> | |
| [searchContext](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.searchcontext.md) | <code>SerializableState</code> | |
| [searchSessionId](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.searchsessionid.md) | <code>string</code> | |
| [uiState](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.uistate.md) | <code>unknown</code> | |
| [variables](./kibana-plugin-plugins-expressions-public.iexpressionloaderparams.variables.md) | <code>Record&lt;string, any&gt;</code> | |

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
searchContext?: ExecutionContextSearch;
searchContext?: SerializableState;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) &gt; [KIBANA\_CONTEXT\_NAME](./kibana-plugin-plugins-expressions-public.kibana_context_name.md)
## KIBANA\_CONTEXT\_NAME type
<b>Signature:</b>
```typescript
export declare type KIBANA_CONTEXT_NAME = 'kibana_context';
```

View file

@ -99,7 +99,6 @@
| [ExpressionAstExpression](./kibana-plugin-plugins-expressions-public.expressionastexpression.md) | |
| [ExpressionAstFunction](./kibana-plugin-plugins-expressions-public.expressionastfunction.md) | |
| [ExpressionAstNode](./kibana-plugin-plugins-expressions-public.expressionastnode.md) | |
| [ExpressionFunctionKibana](./kibana-plugin-plugins-expressions-public.expressionfunctionkibana.md) | |
| [ExpressionRendererComponent](./kibana-plugin-plugins-expressions-public.expressionrenderercomponent.md) | |
| [ExpressionsServiceSetup](./kibana-plugin-plugins-expressions-public.expressionsservicesetup.md) | The public contract that <code>ExpressionsService</code> provides to other plugins in Kibana Platform in \*setup\* life-cycle. |
| [ExpressionsSetup](./kibana-plugin-plugins-expressions-public.expressionssetup.md) | Expressions public setup contract, extends [ExpressionsServiceSetup](./kibana-plugin-plugins-expressions-public.expressionsservicesetup.md) |
@ -110,13 +109,10 @@
| [ExpressionValueFilter](./kibana-plugin-plugins-expressions-public.expressionvaluefilter.md) | Represents an object that is a Filter. |
| [ExpressionValueNum](./kibana-plugin-plugins-expressions-public.expressionvaluenum.md) | |
| [ExpressionValueRender](./kibana-plugin-plugins-expressions-public.expressionvaluerender.md) | Represents an object that is intended to be rendered. |
| [ExpressionValueSearchContext](./kibana-plugin-plugins-expressions-public.expressionvaluesearchcontext.md) | |
| [ExpressionValueUnboxed](./kibana-plugin-plugins-expressions-public.expressionvalueunboxed.md) | |
| [FontLabel](./kibana-plugin-plugins-expressions-public.fontlabel.md) | This type contains a unions of all supported font labels, or the the name of the font the user would see in a UI. |
| [FontValue](./kibana-plugin-plugins-expressions-public.fontvalue.md) | This type contains a union of all supported font values, equivalent to the CSS <code>font-value</code> property. |
| [InterpreterErrorType](./kibana-plugin-plugins-expressions-public.interpretererrortype.md) | |
| [KIBANA\_CONTEXT\_NAME](./kibana-plugin-plugins-expressions-public.kibana_context_name.md) | |
| [KibanaContext](./kibana-plugin-plugins-expressions-public.kibanacontext.md) | |
| [KnownTypeToString](./kibana-plugin-plugins-expressions-public.knowntypetostring.md) | Map the type of the generic to a string-based representation of the type.<!-- -->If the provided generic is its own type interface, we use the value of the <code>type</code> key as a string literal type for it. |
| [PointSeries](./kibana-plugin-plugins-expressions-public.pointseries.md) | A <code>PointSeries</code> is a unique structure that represents dots on a chart. |
| [PointSeriesColumnName](./kibana-plugin-plugins-expressions-public.pointseriescolumnname.md) | Allowed column names in a PointSeries |

View file

@ -9,7 +9,7 @@
<b>Signature:</b>
```typescript
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters>
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState = SerializableState>
```
## Properties

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.md) &gt; [kibana](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana.md)
## ExpressionFunctionDefinitions.kibana property
<b>Signature:</b>
```typescript
kibana: ExpressionFunctionKibana;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [ExpressionFunctionDefinitions](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.md) &gt; [kibana\_context](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana_context.md)
## ExpressionFunctionDefinitions.kibana\_context property
<b>Signature:</b>
```typescript
kibana_context: ExpressionFunctionKibanaContext;
```

View file

@ -20,8 +20,6 @@ export interface ExpressionFunctionDefinitions
| [cumulative\_sum](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.cumulative_sum.md) | <code>ExpressionFunctionCumulativeSum</code> | |
| [derivative](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.derivative.md) | <code>ExpressionFunctionDerivative</code> | |
| [font](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.font.md) | <code>ExpressionFunctionFont</code> | |
| [kibana\_context](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana_context.md) | <code>ExpressionFunctionKibanaContext</code> | |
| [kibana](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.kibana.md) | <code>ExpressionFunctionKibana</code> | |
| [moving\_average](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.moving_average.md) | <code>ExpressionFunctionMovingAverage</code> | |
| [theme](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.theme.md) | <code>ExpressionFunctionTheme</code> | |
| [var\_set](./kibana-plugin-plugins-expressions-server.expressionfunctiondefinitions.var_set.md) | <code>ExpressionFunctionVarSet</code> | |

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [ExpressionFunctionKibana](./kibana-plugin-plugins-expressions-server.expressionfunctionkibana.md)
## ExpressionFunctionKibana type
<b>Signature:</b>
```typescript
export declare type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext>;
```

View file

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-plugins-expressions-server](./kibana-plugin-plugins-expressions-server.md) &gt; [KIBANA\_CONTEXT\_NAME](./kibana-plugin-plugins-expressions-server.kibana_context_name.md)
## KIBANA\_CONTEXT\_NAME type
<b>Signature:</b>
```typescript
export declare type KIBANA_CONTEXT_NAME = 'kibana_context';
```

View file

@ -83,7 +83,6 @@
| [ExpressionAstExpression](./kibana-plugin-plugins-expressions-server.expressionastexpression.md) | |
| [ExpressionAstFunction](./kibana-plugin-plugins-expressions-server.expressionastfunction.md) | |
| [ExpressionAstNode](./kibana-plugin-plugins-expressions-server.expressionastnode.md) | |
| [ExpressionFunctionKibana](./kibana-plugin-plugins-expressions-server.expressionfunctionkibana.md) | |
| [ExpressionsServerSetup](./kibana-plugin-plugins-expressions-server.expressionsserversetup.md) | |
| [ExpressionsServerStart](./kibana-plugin-plugins-expressions-server.expressionsserverstart.md) | |
| [ExpressionValue](./kibana-plugin-plugins-expressions-server.expressionvalue.md) | |
@ -93,13 +92,10 @@
| [ExpressionValueFilter](./kibana-plugin-plugins-expressions-server.expressionvaluefilter.md) | Represents an object that is a Filter. |
| [ExpressionValueNum](./kibana-plugin-plugins-expressions-server.expressionvaluenum.md) | |
| [ExpressionValueRender](./kibana-plugin-plugins-expressions-server.expressionvaluerender.md) | Represents an object that is intended to be rendered. |
| [ExpressionValueSearchContext](./kibana-plugin-plugins-expressions-server.expressionvaluesearchcontext.md) | |
| [ExpressionValueUnboxed](./kibana-plugin-plugins-expressions-server.expressionvalueunboxed.md) | |
| [FontLabel](./kibana-plugin-plugins-expressions-server.fontlabel.md) | This type contains a unions of all supported font labels, or the the name of the font the user would see in a UI. |
| [FontValue](./kibana-plugin-plugins-expressions-server.fontvalue.md) | This type contains a union of all supported font values, equivalent to the CSS <code>font-value</code> property. |
| [InterpreterErrorType](./kibana-plugin-plugins-expressions-server.interpretererrortype.md) | |
| [KIBANA\_CONTEXT\_NAME](./kibana-plugin-plugins-expressions-server.kibana_context_name.md) | |
| [KibanaContext](./kibana-plugin-plugins-expressions-server.kibanacontext.md) | |
| [KnownTypeToString](./kibana-plugin-plugins-expressions-server.knowntypetostring.md) | Map the type of the generic to a string-based representation of the type.<!-- -->If the provided generic is its own type interface, we use the value of the <code>type</code> key as a string literal type for it. |
| [PointSeries](./kibana-plugin-plugins-expressions-server.pointseries.md) | A <code>PointSeries</code> is a unique structure that represents dots on a chart. |
| [PointSeriesColumnName](./kibana-plugin-plugins-expressions-server.pointseriescolumnname.md) | Allowed column names in a PointSeries |

View file

@ -11,5 +11,5 @@
<b>Signature:</b>
```typescript
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: ActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">) => void;
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: ActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">) => void;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getAction: <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">;
readonly getAction: <T extends ActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">;
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[];
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">[];
```

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[]>;
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">[]>;
```

View file

@ -21,19 +21,19 @@ export declare class UiActionsService
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [actions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.actions.md) | | <code>ActionRegistry</code> | |
| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, action: ActionDefinition&lt;TriggerContextMapping[T]&gt; &#124; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot;&gt;) =&gt; void</code> | <code>addTriggerAction</code> is similar to <code>attachAction</code> as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.<code>addTriggerAction</code> also infers better typing of the <code>action</code> argument. |
| [addTriggerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.addtriggeraction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, action: ActionDefinition&lt;TriggerContextMapping[T]&gt; &#124; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot;&gt;) =&gt; void</code> | <code>addTriggerAction</code> is similar to <code>attachAction</code> as it attaches action to a trigger, but it also registers the action, if it has not been registered, yet.<code>addTriggerAction</code> also infers better typing of the <code>action</code> argument. |
| [attachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.attachaction.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, actionId: string) =&gt; void</code> | |
| [clear](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.clear.md) | | <code>() =&gt; void</code> | Removes all registered triggers and actions. |
| [detachAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.detachaction.md) | | <code>(triggerId: TriggerId, actionId: string) =&gt; void</code> | |
| [executeTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executetriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContext&lt;T&gt;) =&gt; Promise&lt;void&gt;</code> | |
| [executionService](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.executionservice.md) | | <code>UiActionsExecutionService</code> | |
| [fork](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.fork.md) | | <code>() =&gt; UiActionsService</code> | "Fork" a separate instance of <code>UiActionsService</code> that inherits all existing triggers and actions, but going forward all new triggers and actions added to this instance of <code>UiActionsService</code> are only available within this instance. |
| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <code>&lt;T extends ActionDefinition&lt;{}&gt;&gt;(id: string) =&gt; Action&lt;ActionContext&lt;T&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot;&gt;</code> | |
| [getAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.getaction.md) | | <code>&lt;T extends ActionDefinition&lt;{}&gt;&gt;(id: string) =&gt; Action&lt;ActionContext&lt;T&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot;&gt;</code> | |
| [getTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettrigger.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T) =&gt; TriggerContract&lt;T&gt;</code> | |
| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T) =&gt; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot;&gt;[]</code> | |
| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContextMapping[T]) =&gt; Promise&lt;Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot;&gt;[]&gt;</code> | |
| [getTriggerActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggeractions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T) =&gt; Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot;&gt;[]</code> | |
| [getTriggerCompatibleActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.gettriggercompatibleactions.md) | | <code>&lt;T extends &quot;&quot; &#124; &quot;SELECT_RANGE_TRIGGER&quot; &#124; &quot;VALUE_CLICK_TRIGGER&quot; &#124; &quot;FILTER_TRIGGER&quot; &#124; &quot;VISUALIZE_FIELD_TRIGGER&quot; &#124; &quot;VISUALIZE_GEO_FIELD_TRIGGER&quot; &#124; &quot;CONTEXT_MENU_TRIGGER&quot; &#124; &quot;PANEL_BADGE_TRIGGER&quot; &#124; &quot;PANEL_NOTIFICATION_TRIGGER&quot;&gt;(triggerId: T, context: TriggerContextMapping[T]) =&gt; Promise&lt;Action&lt;TriggerContextMapping[T], &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot;&gt;[]&gt;</code> | |
| [hasAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.hasaction.md) | | <code>(actionId: string) =&gt; boolean</code> | |
| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <code>&lt;A extends ActionDefinition&lt;{}&gt;&gt;(definition: A) =&gt; Action&lt;ActionContext&lt;A&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot;&gt;</code> | |
| [registerAction](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registeraction.md) | | <code>&lt;A extends ActionDefinition&lt;{}&gt;&gt;(definition: A) =&gt; Action&lt;ActionContext&lt;A&gt;, &quot;&quot; &#124; &quot;ACTION_VISUALIZE_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_GEO_FIELD&quot; &#124; &quot;ACTION_VISUALIZE_LENS_FIELD&quot; &#124; &quot;ACTION_GLOBAL_APPLY_FILTER&quot; &#124; &quot;ACTION_SELECT_RANGE&quot; &#124; &quot;ACTION_VALUE_CLICK&quot; &#124; &quot;ACTION_CUSTOMIZE_PANEL&quot; &#124; &quot;ACTION_ADD_PANEL&quot; &#124; &quot;openInspector&quot; &#124; &quot;deletePanel&quot; &#124; &quot;editPanel&quot; &#124; &quot;togglePanel&quot; &#124; &quot;replacePanel&quot; &#124; &quot;clonePanel&quot; &#124; &quot;addToFromLibrary&quot; &#124; &quot;unlinkFromLibrary&quot; &#124; &quot;ACTION_LIBRARY_NOTIFICATION&quot;&gt;</code> | |
| [registerTrigger](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.registertrigger.md) | | <code>(trigger: Trigger) =&gt; void</code> | |
| [triggers](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggers.md) | | <code>TriggerRegistry</code> | |
| [triggerToActions](./kibana-plugin-plugins-ui_actions-public.uiactionsservice.triggertoactions.md) | | <code>TriggerToActionsRegistry</code> | |

View file

@ -7,5 +7,5 @@
<b>Signature:</b>
```typescript
readonly registerAction: <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">;
readonly registerAction: <A extends ActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">;
```

View file

@ -17,11 +17,8 @@
* under the License.
*/
import {
KibanaContext,
Datatable,
ExpressionFunctionDefinition,
} from '../../../../../plugins/expressions/common';
import { Datatable, ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { KibanaContext } from './kibana_context_type';
type Input = KibanaContext | null;
type Output = Promise<Datatable>;

View file

@ -17,5 +17,8 @@
* under the License.
*/
export * from './kibana';
export * from './kibana_context';
export * from './kibana_context_type';
export * from './esaggs';
export * from './utils';

View file

@ -17,14 +17,14 @@
* under the License.
*/
import { ExecutionContext } from 'src/plugins/expressions/common';
import { kibana } from './kibana';
import { ExpressionValueSearchContext } from './kibana_context_type';
import { functionWrapper } from './utils';
import { kibana } from '../kibana';
import { ExecutionContext } from '../../../execution/types';
import { KibanaContext, ExpressionValueSearchContext } from '../../../expression_types';
describe('interpreter/functions#kibana', () => {
const fn = functionWrapper(kibana);
let input: Partial<KibanaContext>;
let input: Partial<ExpressionValueSearchContext>;
let search: ExpressionValueSearchContext;
let context: ExecutionContext;

View file

@ -18,8 +18,9 @@
*/
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition } from '../types';
import { ExpressionValueSearchContext } from '../../expression_types';
import { ExecutionContext, ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { Adapters } from 'src/plugins/inspector/common';
import { ExpressionValueSearchContext, ExecutionContextSearch } from './kibana_context_type';
const toArray = <T>(query: undefined | T | T[]): T[] =>
!query ? [] : Array.isArray(query) ? query : [query];
@ -29,7 +30,8 @@ export type ExpressionFunctionKibana = ExpressionFunctionDefinition<
// TODO: Get rid of the `null` type below.
ExpressionValueSearchContext | null,
object,
ExpressionValueSearchContext
ExpressionValueSearchContext,
ExecutionContext<Adapters, ExecutionContextSearch>
>;
export const kibana: ExpressionFunctionKibana = {
@ -38,7 +40,7 @@ export const kibana: ExpressionFunctionKibana = {
inputTypes: ['kibana_context', 'null'],
help: i18n.translate('expressions.functions.kibana.help', {
help: i18n.translate('data.search.functions.kibana.help', {
defaultMessage: 'Gets kibana global context',
}),

View file

@ -16,11 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
import { uniqBy } from 'lodash';
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition } from '../../expression_functions';
import { KibanaContext } from '../../expression_types';
import { Query, uniqFilters } from '../../../../data/common';
import { ExpressionFunctionDefinition, ExecutionContext } from 'src/plugins/expressions/common';
import { Adapters } from 'src/plugins/inspector/common';
import { Query, uniqFilters } from '../../query';
import { ExecutionContextSearch, KibanaContext } from './kibana_context_type';
interface Arguments {
q?: string | null;
@ -33,7 +35,8 @@ export type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition<
'kibana_context',
KibanaContext | null,
Arguments,
Promise<KibanaContext>
Promise<KibanaContext>,
ExecutionContext<Adapters, ExecutionContextSearch>
>;
const getParsedValue = (data: any, defaultValue: any) =>
@ -49,7 +52,7 @@ export const kibanaContextFunction: ExpressionFunctionKibanaContext = {
name: 'kibana_context',
type: 'kibana_context',
inputTypes: ['kibana_context', 'null'],
help: i18n.translate('expressions.functions.kibana_context.help', {
help: i18n.translate('data.search.functions.kibana_context.help', {
defaultMessage: 'Updates kibana global context',
}),
args: {
@ -57,28 +60,28 @@ export const kibanaContextFunction: ExpressionFunctionKibanaContext = {
types: ['string', 'null'],
aliases: ['query', '_'],
default: null,
help: i18n.translate('expressions.functions.kibana_context.q.help', {
help: i18n.translate('data.search.functions.kibana_context.q.help', {
defaultMessage: 'Specify Kibana free form text query',
}),
},
filters: {
types: ['string', 'null'],
default: '"[]"',
help: i18n.translate('expressions.functions.kibana_context.filters.help', {
help: i18n.translate('data.search.functions.kibana_context.filters.help', {
defaultMessage: 'Specify Kibana generic filters',
}),
},
timeRange: {
types: ['string', 'null'],
default: null,
help: i18n.translate('expressions.functions.kibana_context.timeRange.help', {
help: i18n.translate('data.search.functions.kibana_context.timeRange.help', {
defaultMessage: 'Specify Kibana time range filter',
}),
},
savedSearchId: {
types: ['string', 'null'],
default: null,
help: i18n.translate('expressions.functions.kibana_context.savedSearchId.help', {
help: i18n.translate('data.search.functions.kibana_context.savedSearchId.help', {
defaultMessage: 'Specify saved search ID to be used for queries and filters',
}),
},

View file

@ -17,8 +17,16 @@
* under the License.
*/
import { ExpressionValueBoxed } from '../types';
import { ExecutionContextSearch } from '../../execution/types';
import { ExpressionValueBoxed } from 'src/plugins/expressions/common';
import { Filter } from '../../es_query';
import { Query, TimeRange } from '../../query';
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export type ExecutionContextSearch = {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
};
export type ExpressionValueSearchContext = ExpressionValueBoxed<
'kibana_context',

View file

@ -0,0 +1,34 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { mapValues } from 'lodash';
import { AnyExpressionFunctionDefinition, ExecutionContext } from 'src/plugins/expressions/common';
/**
* Takes a function spec and passes in default args,
* overriding with any provided args.
*/
export const functionWrapper = (spec: AnyExpressionFunctionDefinition) => {
const defaultArgs = mapValues(spec.args, (argSpec) => argSpec.default);
return (
context: object | null,
args: Record<string, any> = {},
handlers: ExecutionContext = {} as ExecutionContext
) => spec.fn(context, { ...defaultArgs, ...args }, handlers);
};

View file

@ -18,3 +18,4 @@
*/
export * from './courier_inspector_stats';
export * from './function_wrapper';

View file

@ -19,4 +19,3 @@
/** @internal */
export { shortenDottedString } from './shorten_dotted_string';
export { AbortError, toPromise, getCombinedSignal } from './abort_utils';

View file

@ -8,7 +8,7 @@
"uiActions"
],
"optionalPlugins": ["usageCollection"],
"extraPublicDirs": ["common", "common/utils/abort_utils"],
"extraPublicDirs": ["common"],
"requiredBundles": [
"usageCollection",
"kibanaUtils",

View file

@ -338,6 +338,12 @@ export {
OptionedParamType,
OptionedValueProp,
ParsedInterval,
// expressions
ExecutionContextSearch,
ExpressionFunctionKibana,
ExpressionFunctionKibanaContext,
ExpressionValueSearchContext,
KibanaContext,
// tabify
TabbedAggColumn,
TabbedAggRow,

View file

@ -6,6 +6,7 @@
import { $Values } from '@kbn/utility-types';
import { Action } from 'history';
import { Adapters as Adapters_2 } from 'src/plugins/inspector/common';
import { ApiResponse } from '@elastic/elasticsearch';
import { ApiResponse as ApiResponse_2 } from '@elastic/elasticsearch/lib/Transport';
import { ApplicationStart } from 'kibana/public';
@ -16,6 +17,7 @@ import { CoreSetup } from 'src/core/public';
import { CoreSetup as CoreSetup_2 } from 'kibana/public';
import { CoreStart } from 'kibana/public';
import { CoreStart as CoreStart_2 } from 'src/core/public';
import { Datatable as Datatable_2 } from 'src/plugins/expressions/common';
import { DatatableColumn as DatatableColumn_2 } from 'src/plugins/expressions';
import { Ensure } from '@kbn/utility-types';
import { EnvironmentMode } from '@kbn/config';
@ -26,8 +28,12 @@ import { EuiComboBoxProps } from '@elastic/eui';
import { EuiConfirmModalProps } from '@elastic/eui';
import { EuiGlobalToastListToast } from '@elastic/eui';
import { ExclusiveUnion } from '@elastic/eui';
import { ExecutionContext } from 'src/plugins/expressions/common';
import { ExpressionAstFunction } from 'src/plugins/expressions/common';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { ExpressionFunctionDefinition as ExpressionFunctionDefinition_2 } from 'src/plugins/expressions/public';
import { ExpressionsSetup } from 'src/plugins/expressions/public';
import { ExpressionValueBoxed } from 'src/plugins/expressions/common';
import { History } from 'history';
import { Href } from 'history';
import { IconType } from '@elastic/eui';
@ -65,7 +71,7 @@ import { Required } from '@kbn/utility-types';
import * as Rx from 'rxjs';
import { SavedObject } from 'src/core/server';
import { SavedObject as SavedObject_2 } from 'src/core/public';
import { SavedObjectReference as SavedObjectReference_2 } from 'src/core/types';
import { SavedObjectReference } from 'src/core/types';
import { SavedObjectsClientContract } from 'src/core/public';
import { Search } from '@elastic/elasticsearch/api/requestParams';
import { SearchResponse } from 'elasticsearch';
@ -80,7 +86,6 @@ import { UiActionsSetup } from 'src/plugins/ui_actions/public';
import { UiActionsStart } from 'src/plugins/ui_actions/public';
import { Unit } from '@elastic/datemath';
import { UnregisterCallback } from 'history';
import { UnwrapPromiseOrReturn } from '@kbn/utility-types';
import { UserProvidedValues } from 'src/core/server/types';
// Warning: (ae-missing-release-tag) "ACTION_GLOBAL_APPLY_FILTER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@ -525,7 +530,6 @@ export enum ES_FIELD_TYPES {
// @public (undocumented)
export const ES_SEARCH_STRATEGY = "es";
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionDefinition" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Input" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Arguments" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Output" needs to be exported by the entry point index.d.ts
@ -541,7 +545,7 @@ export type EsaggsExpressionFunctionDefinition = ExpressionFunctionDefinition<'e
// Warning: (ae-missing-release-tag) "EsdslExpressionFunctionDefinition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type EsdslExpressionFunctionDefinition = ExpressionFunctionDefinition<typeof name_2, Input_2, Arguments_2, Output_2>;
export type EsdslExpressionFunctionDefinition = ExpressionFunctionDefinition_2<typeof name_2, Input_2, Arguments_3, Output_2>;
// Warning: (ae-missing-release-tag) "esFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@ -647,6 +651,15 @@ export type EsQuerySortValue = Record<string, SortDirection | SortDirectionNumer
// @public (undocumented)
export type EsRawResponseExpressionTypeDefinition = ExpressionTypeDefinition<typeof name_3, EsRawResponse, EsRawResponse>;
// Warning: (ae-missing-release-tag) "ExecutionContextSearch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExecutionContextSearch = {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
};
// Warning: (ae-missing-release-tag) "ExistsFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -655,12 +668,28 @@ export type ExistsFilter = Filter & {
exists?: FilterExistsProperty;
};
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibana" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext, ExecutionContext<Adapters_2, ExecutionContextSearch>>;
// Warning: (ae-forgotten-export) The symbol "Arguments" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition<'kibana_context', KibanaContext | null, Arguments_2, Promise<KibanaContext>, ExecutionContext<Adapters_2, ExecutionContextSearch>>;
// Warning: (ae-missing-release-tag) "ExpressionValueSearchContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionValueSearchContext = ExpressionValueBoxed<'kibana_context', ExecutionContextSearch>;
// Warning: (ae-missing-release-tag) "extractReferences" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const extractSearchSourceReferences: (state: SearchSourceFields) => [SearchSourceFields & {
indexRefName?: string;
}, SavedObjectReference_2[]];
}, SavedObjectReference[]];
// Warning: (ae-missing-release-tag) "FieldFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@ -1368,7 +1397,7 @@ export interface IndexPatternTypeMeta {
// @public (undocumented)
export const injectSearchSourceReferences: (searchSourceFields: SearchSourceFields & {
indexRefName: string;
}, references: SavedObjectReference_2[]) => SearchSourceFields;
}, references: SavedObjectReference[]) => SearchSourceFields;
// Warning: (ae-missing-release-tag) "InputTimeRange" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@ -1510,6 +1539,11 @@ export enum KBN_FIELD_TYPES {
UNKNOWN = "unknown"
}
// Warning: (ae-missing-release-tag) "KibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KibanaContext = ExpressionValueSearchContext;
// Warning: (ae-missing-release-tag) "KueryNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -1962,8 +1996,8 @@ export const search: {
// Warning: (ae-missing-release-tag) "SearchBar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "timeHistory" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "onFiltersUpdated"> & ReactIntl.InjectedIntlProps>;
export const SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "showQueryInput" | "showDatePicker" | "showAutoRefreshOnly" | "dateRangeFrom" | "dateRangeTo" | "isRefreshPaused" | "customSubmitButton" | "timeHistory" | "indicateNoData" | "onFiltersUpdated" | "savedQuery" | "showSaveQuery" | "onClearSavedQuery" | "showQueryBar" | "showFilterBar" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated"> & ReactIntl.InjectedIntlProps>;
};
// Warning: (ae-forgotten-export) The symbol "SearchBarOwnProps" needs to be exported by the entry point index.d.ts
@ -2321,21 +2355,21 @@ export const UI_SETTINGS: {
// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:236:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:387:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:387:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:387:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:387:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:389:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:401:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:402:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:406:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:407:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:410:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:411:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:414:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:393:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:393:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:393:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:393:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:396:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:405:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:406:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:407:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:408:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:412:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:413:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:416:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:417:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:420:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/query/state_sync/connect_to_query_state.ts:45:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)

View file

@ -23,7 +23,7 @@ import { coreMock } from '../../../../../core/public/mocks';
const startMock = coreMock.createStart();
import { mount } from 'enzyme';
import { AbortError } from 'src/plugins/data/common';
import { AbortError } from '../../../../kibana_utils/public';
describe('SearchTimeoutError', () => {
beforeEach(() => {

View file

@ -18,15 +18,12 @@
*/
import { i18n } from '@kbn/i18n';
import {
KibanaContext,
ExpressionFunctionDefinition,
} from '../../../../../plugins/expressions/public';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
import { getSearchService, getUiSettings } from '../../services';
import { EsRawResponse } from './es_raw_response';
import { RequestStatistics, RequestAdapter } from '../../../../inspector/common';
import { IEsSearchResponse } from '../../../common/search/es_search';
import { IEsSearchResponse, KibanaContext } from '../../../common/search';
import { buildEsQuery, getEsQueryConfig } from '../../../common/es_query/es_query';
import { DataPublicPluginStart } from '../../types';

View file

@ -21,7 +21,7 @@ import { CoreSetup, CoreStart } from '../../../../core/public';
import { coreMock } from '../../../../core/public/mocks';
import { IEsSearchRequest } from '../../common/search';
import { SearchInterceptor } from './search_interceptor';
import { AbortError } from '../../common';
import { AbortError } from '../../../kibana_utils/public';
import { SearchTimeoutError, PainlessError, TimeoutErrorMode } from './errors';
import { searchServiceMock } from './mocks';
import { ISearchStart } from '.';

View file

@ -24,13 +24,11 @@ import { PublicMethodsOf } from '@kbn/utility-types';
import { CoreStart, CoreSetup, ToastsSetup } from 'kibana/public';
import { i18n } from '@kbn/i18n';
import {
AbortError,
IKibanaSearchRequest,
IKibanaSearchResponse,
ISearchOptions,
ES_SEARCH_STRATEGY,
ISessionService,
getCombinedSignal,
} from '../../common';
import { SearchUsageCollector } from './collectors';
import {
@ -43,6 +41,7 @@ import {
getHttpError,
} from './errors';
import { toMountPoint } from '../../../kibana_react/public';
import { AbortError, getCombinedAbortSignal } from '../../../kibana_utils/public';
export interface SearchInterceptorDeps {
http: CoreSetup['http'];
@ -170,7 +169,9 @@ export class SearchInterceptor {
...(abortSignal ? [abortSignal] : []),
];
const { signal: combinedSignal, cleanup: cleanupCombinedSignal } = getCombinedSignal(signals);
const { signal: combinedSignal, cleanup: cleanupCombinedSignal } = getCombinedAbortSignal(
signals
);
const cleanup = () => {
subscription.unsubscribe();
combinedSignal.removeEventListener('abort', cleanup);

View file

@ -23,10 +23,13 @@ import { ISearchSetup, ISearchStart, SearchEnhancements } from './types';
import { handleResponse } from './fetch';
import {
kibana,
kibanaContext,
kibanaContextFunction,
ISearchGeneric,
SearchSourceService,
SearchSourceDependencies,
ISessionService,
SearchSourceDependencies,
SearchSourceService,
} from '../../common/search';
import { getCallMsearch } from './legacy';
import { AggsService, AggsStartDependencies } from './aggs';
@ -85,6 +88,10 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
session: this.sessionService,
});
expressions.registerFunction(kibana);
expressions.registerFunction(kibanaContextFunction);
expressions.registerType(kibanaContext);
expressions.registerFunction(esdsl);
expressions.registerType(esRawResponse);

View file

@ -206,6 +206,12 @@ export {
OptionedParamType,
OptionedValueProp,
ParsedInterval,
// expressions
ExecutionContextSearch,
ExpressionFunctionKibana,
ExpressionFunctionKibanaContext,
ExpressionValueSearchContext,
KibanaContext,
// search
ISearchOptions,
IEsSearchRequest,

View file

@ -96,7 +96,7 @@ export class DataServerPlugin
core.uiSettings.register(getUiSettings());
const searchSetup = this.searchService.setup(core, {
registerFunction: expressions.registerFunction,
expressions,
usageCollection,
});

View file

@ -44,7 +44,10 @@ describe('Search service', () => {
it('exposes proper contract', async () => {
const setup = plugin.setup(mockCoreSetup, ({
packageInfo: { version: '8' },
registerFunction: jest.fn(),
expressions: {
registerFunction: jest.fn(),
registerType: jest.fn(),
},
} as unknown) as SearchServiceSetupDependencies);
expect(setup).toHaveProperty('aggs');
expect(setup).toHaveProperty('registerSearchStrategy');

View file

@ -30,6 +30,7 @@ import {
StartServicesAccessor,
} from 'src/core/server';
import { first } from 'rxjs/operators';
import { ExpressionsServerSetup } from 'src/plugins/expressions/server';
import {
ISearchSetup,
ISearchStart,
@ -38,7 +39,7 @@ import {
SearchStrategyDependencies,
} from './types';
import { AggsService, AggsSetupDependencies } from './aggs';
import { AggsService } from './aggs';
import { FieldFormatsStart } from '../field_formats';
import { IndexPatternsServiceStart } from '../index_patterns';
@ -50,15 +51,18 @@ import { registerUsageCollector } from './collectors/register';
import { usageProvider } from './collectors/usage';
import { searchTelemetry } from '../saved_objects';
import {
IKibanaSearchRequest,
IKibanaSearchResponse,
IEsSearchRequest,
IEsSearchResponse,
SearchSourceDependencies,
SearchSourceService,
searchSourceRequiredUiSettings,
ISearchOptions,
IKibanaSearchRequest,
IKibanaSearchResponse,
ISearchClient,
ISearchOptions,
kibana,
kibanaContext,
kibanaContextFunction,
SearchSourceDependencies,
searchSourceRequiredUiSettings,
SearchSourceService,
} from '../../common/search';
import {
getShardDelayBucketAgg,
@ -77,7 +81,7 @@ type StrategyMap = Record<string, ISearchStrategy<any, any>>;
/** @internal */
export interface SearchServiceSetupDependencies {
registerFunction: AggsSetupDependencies['registerFunction'];
expressions: ExpressionsServerSetup;
usageCollection?: UsageCollectionSetup;
}
@ -106,7 +110,7 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
public setup(
core: CoreSetup<{}, DataPluginStart>,
{ registerFunction, usageCollection }: SearchServiceSetupDependencies
{ expressions, usageCollection }: SearchServiceSetupDependencies
): ISearchSetup {
const usage = usageCollection ? usageProvider(core) : undefined;
@ -137,7 +141,11 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
registerUsageCollector(usageCollection, this.initializerContext);
}
const aggs = this.aggsService.setup({ registerFunction });
expressions.registerFunction(kibana);
expressions.registerFunction(kibanaContextFunction);
expressions.registerType(kibanaContext);
const aggs = this.aggsService.setup({ registerFunction: expressions.registerFunction });
this.initializerContext.config
.create<ConfigSchema>()
@ -146,7 +154,7 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
.then((value) => {
if (value.search.aggs.shardDelay.enabled) {
aggs.types.registerBucket(SHARD_DELAY_AGG_NAME, getShardDelayBucketAgg);
registerFunction(aggShardDelay);
expressions.registerFunction(aggShardDelay);
}
});

View file

@ -5,6 +5,7 @@
```ts
import { $Values } from '@kbn/utility-types';
import { Adapters } from 'src/plugins/inspector/common';
import { ApiResponse } from '@elastic/elasticsearch';
import { Assign } from '@kbn/utility-types';
import { BehaviorSubject } from 'rxjs';
@ -13,14 +14,18 @@ import { CoreSetup } from 'src/core/server';
import { CoreSetup as CoreSetup_2 } from 'kibana/server';
import { CoreStart } from 'src/core/server';
import { CoreStart as CoreStart_2 } from 'kibana/server';
import { Datatable } from 'src/plugins/expressions/common';
import { DatatableColumn } from 'src/plugins/expressions';
import { Duration } from 'moment';
import { ElasticsearchClient } from 'kibana/server';
import { Ensure } from '@kbn/utility-types';
import { EnvironmentMode } from '@kbn/config';
import { ErrorToastOptions } from 'src/core/public/notifications';
import { ExecutionContext } from 'src/plugins/expressions/common';
import { ExpressionAstFunction } from 'src/plugins/expressions/common';
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/common';
import { ExpressionsServerSetup } from 'src/plugins/expressions/server';
import { ExpressionValueBoxed } from 'src/plugins/expressions/common';
import { ISavedObjectsRepository } from 'kibana/server';
import { IScopedClusterClient } from 'src/core/server';
import { ISearchOptions as ISearchOptions_2 } from 'src/plugins/data/public';
@ -55,7 +60,6 @@ import { ToastInputFields } from 'src/core/public/notifications';
import { Type } from '@kbn/config-schema';
import { TypeOf } from '@kbn/config-schema';
import { Unit } from '@elastic/datemath';
import { UnwrapPromiseOrReturn } from '@kbn/utility-types';
// Warning: (ae-forgotten-export) The symbol "AggConfigSerialized" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "AggConfigOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@ -224,7 +228,6 @@ export enum ES_FIELD_TYPES {
// @public (undocumented)
export const ES_SEARCH_STRATEGY = "es";
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionDefinition" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Input" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Arguments" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Output" needs to be exported by the entry point index.d.ts
@ -285,6 +288,31 @@ export interface EsQueryConfig {
queryStringOptions: Record<string, any>;
}
// Warning: (ae-missing-release-tag) "ExecutionContextSearch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExecutionContextSearch = {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
};
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibana" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext, ExecutionContext<Adapters, ExecutionContextSearch>>;
// Warning: (ae-forgotten-export) The symbol "Arguments" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibanaContext = ExpressionFunctionDefinition<'kibana_context', KibanaContext | null, Arguments_2, Promise<KibanaContext>, ExecutionContext<Adapters, ExecutionContextSearch>>;
// Warning: (ae-missing-release-tag) "ExpressionValueSearchContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionValueSearchContext = ExpressionValueBoxed<'kibana_context', ExecutionContextSearch>;
// 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)
@ -779,6 +807,11 @@ export enum KBN_FIELD_TYPES {
UNKNOWN = "unknown"
}
// Warning: (ae-missing-release-tag) "KibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KibanaContext = ExpressionValueSearchContext;
// Warning: (ae-missing-release-tag) "KueryNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -885,7 +918,7 @@ export class Plugin implements Plugin_2<PluginSetup, PluginStart, DataPluginSetu
__enhance: (enhancements: DataEnhancements) => void;
search: ISearchSetup;
fieldFormats: {
register: (customFieldFormat: import("../public").FieldFormatInstanceType) => number;
register: (customFieldFormat: import("../common").FieldFormatInstanceType) => number;
};
};
// (undocumented)
@ -894,7 +927,7 @@ export class Plugin implements Plugin_2<PluginSetup, PluginStart, DataPluginSetu
fieldFormatServiceFactory: (uiSettings: import("src/core/server").IUiSettingsClient) => Promise<import("../common").FieldFormatsRegistry>;
};
indexPatterns: {
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../public").IndexPatternsService>;
indexPatternsServiceFactory: (savedObjectsClient: Pick<import("src/core/server").SavedObjectsClient, "update" | "find" | "get" | "delete" | "errors" | "create" | "bulkCreate" | "checkConflicts" | "bulkGet" | "addToNamespaces" | "deleteFromNamespaces" | "bulkUpdate" | "removeReferencesTo">) => Promise<import("../common").IndexPatternsService>;
};
search: ISearchStart<import("./search").IEsSearchRequest, import("./search").IEsSearchResponse<any>>;
};
@ -1162,21 +1195,21 @@ 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:235:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:235:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:235:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:235:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:250:5 - (ae-forgotten-export) The symbol "getTotalLoaded" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:251:5 - (ae-forgotten-export) The symbol "toSnakeCase" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:255:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:256:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:265:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:266:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:267:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:271:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:272:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:276:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:279:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:241:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:256:5 - (ae-forgotten-export) The symbol "getTotalLoaded" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:257:5 - (ae-forgotten-export) The symbol "toSnakeCase" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:261:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:262:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:271:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:272:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:273:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:277:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:278:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:282:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index.ts:285:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/server/index_patterns/index_patterns_service.ts:50:14 - (ae-forgotten-export) The symbol "IndexPatternsService" 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
// src/plugins/data/server/search/types.ts:104:5 - (ae-forgotten-export) The symbol "ISearchStartSearchSource" needs to be exported by the entry point index.d.ts

View file

@ -22,8 +22,7 @@ import { keys, last, mapValues, reduce, zipObject } from 'lodash';
import { Executor } from '../executor';
import { createExecutionContainer, ExecutionContainer } from './container';
import { createError } from '../util';
import { Defer, now } from '../../../kibana_utils/common';
import { toPromise } from '../../../data/common/utils/abort_utils';
import { abortSignalToPromise, Defer, now } from '../../../kibana_utils/common';
import { RequestAdapter, DataAdapter, Adapters } from '../../../inspector/common';
import { isExpressionValueError, ExpressionValueError } from '../expression_types/specs/error';
import {
@ -93,7 +92,7 @@ export class Execution<
/**
* Promise that rejects if/when abort controller sends "abort" signal.
*/
private readonly abortRejection = toPromise(this.abortController.signal);
private readonly abortRejection = abortSignalToPromise(this.abortController.signal);
/**
* Races a given promise against the "abort" event of `abortController`.

View file

@ -17,16 +17,18 @@
* under the License.
*/
import { ExpressionType } from '../expression_types';
import { ExpressionType, SerializableState } from '../expression_types';
import { Adapters, DataAdapter, RequestAdapter } from '../../../inspector/common';
import { TimeRange, Query, Filter } from '../../../data/common';
import { SavedObject, SavedObjectAttributes } from '../../../../core/public';
/**
* `ExecutionContext` is an object available to all functions during a single execution;
* it provides various methods to perform side-effects.
*/
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters> {
export interface ExecutionContext<
InspectorAdapters extends Adapters = Adapters,
ExecutionContextSearch extends SerializableState = SerializableState
> {
/**
* Get search context of the expression.
*/
@ -79,9 +81,3 @@ export interface DefaultInspectorAdapters extends Adapters {
requests: RequestAdapter;
data: DataAdapter;
}
export interface ExecutionContextSearch {
filters?: Filter[];
query?: Query | Query[];
timeRange?: TimeRange;
}

View file

@ -19,8 +19,6 @@
import { clog } from './clog';
import { font } from './font';
import { kibana } from './kibana';
import { kibanaContextFunction } from './kibana_context';
import { variableSet } from './var_set';
import { variable } from './var';
import { AnyExpressionFunctionDefinition } from '../types';
@ -32,8 +30,6 @@ import { movingAverage } from './moving_average';
export const functionSpecs: AnyExpressionFunctionDefinition[] = [
clog,
font,
kibana,
kibanaContextFunction,
variableSet,
variable,
theme,
@ -44,8 +40,6 @@ export const functionSpecs: AnyExpressionFunctionDefinition[] = [
export * from './clog';
export * from './font';
export * from './kibana';
export * from './kibana_context';
export * from './var_set';
export * from './var';
export * from './theme';

View file

@ -20,12 +20,11 @@
import { functionWrapper } from './utils';
import { variable } from '../var';
import { ExecutionContext } from '../../../execution/types';
import { KibanaContext } from '../../../expression_types';
describe('expression_functions', () => {
describe('var', () => {
const fn = functionWrapper(variable);
let input: Partial<KibanaContext>;
let input: Partial<ReturnType<ExecutionContext['getSearchContext']>>;
let context: ExecutionContext;
beforeEach(() => {

View file

@ -20,12 +20,11 @@
import { functionWrapper } from './utils';
import { variableSet } from '../var_set';
import { ExecutionContext } from '../../../execution/types';
import { KibanaContext } from '../../../expression_types';
describe('expression_functions', () => {
describe('var_set', () => {
const fn = functionWrapper(variableSet);
let input: Partial<KibanaContext>;
let input: Partial<ReturnType<ExecutionContext['getSearchContext']>>;
let context: ExecutionContext;
let variables: Record<string, any>;

View file

@ -24,8 +24,6 @@ import { ExecutionContext } from '../execution/types';
import {
ExpressionFunctionClog,
ExpressionFunctionFont,
ExpressionFunctionKibanaContext,
ExpressionFunctionKibana,
ExpressionFunctionVarSet,
ExpressionFunctionVar,
ExpressionFunctionTheme,
@ -129,8 +127,6 @@ export type AnyExpressionFunctionDefinition = ExpressionFunctionDefinition<
export interface ExpressionFunctionDefinitions {
clog: ExpressionFunctionClog;
font: ExpressionFunctionFont;
kibana_context: ExpressionFunctionKibanaContext;
kibana: ExpressionFunctionKibana;
var_set: ExpressionFunctionVarSet;
var: ExpressionFunctionVar;
theme: ExpressionFunctionTheme;

View file

@ -22,7 +22,6 @@ import { datatable } from './datatable';
import { error } from './error';
import { filter } from './filter';
import { image } from './image';
import { kibanaContext } from './kibana_context';
import { nullType } from './null';
import { num } from './num';
import { number } from './number';
@ -40,7 +39,6 @@ export const typeSpecs: AnyExpressionTypeDefinition[] = [
error,
filter,
image,
kibanaContext,
nullType,
num,
number,
@ -57,7 +55,6 @@ export * from './datatable';
export * from './error';
export * from './filter';
export * from './image';
export * from './kibana_context';
export * from './null';
export * from './num';
export * from './number';

View file

@ -26,7 +26,6 @@ import { AnyExpressionFunctionDefinition } from '../expression_functions';
import { SavedObjectReference } from '../../../../core/types';
import { PersistableStateService, SerializableState } from '../../../kibana_utils/common';
import { Adapters } from '../../../inspector/common/adapters';
import { ExecutionContextSearch } from '../execution';
/**
* The public contract that `ExpressionsService` provides to other plugins
@ -48,7 +47,7 @@ export type ExpressionsServiceSetup = Pick<
>;
export interface ExpressionExecutionParams {
searchContext?: ExecutionContextSearch;
searchContext?: SerializableState;
variables?: Record<string, any>;

View file

@ -6,7 +6,6 @@
"extraPublicDirs": ["common", "common/fonts"],
"requiredBundles": [
"kibanaUtils",
"inspector",
"data"
"inspector"
]
}

View file

@ -66,7 +66,6 @@ export {
ExpressionFunction,
ExpressionFunctionDefinition,
ExpressionFunctionDefinitions,
ExpressionFunctionKibana,
ExpressionFunctionParameter,
ExpressionImage,
ExpressionRenderDefinition,
@ -81,7 +80,6 @@ export {
ExpressionValueError,
ExpressionValueNum,
ExpressionValueRender,
ExpressionValueSearchContext,
ExpressionValueUnboxed,
ExpressionValueFilter,
Font,
@ -96,8 +94,6 @@ export {
InterpreterErrorType,
IRegistry,
isExpressionAstBuilder,
KIBANA_CONTEXT_NAME,
KibanaContext,
KnownTypeToString,
Overflow,
parse,

View file

@ -50,14 +50,6 @@ describe('ExpressionsPublicPlugin', () => {
const bar = await setup.run('var_set name="foo" value="bar" | var name="foo"', null);
expect(bar).toBe('bar');
});
test('kibana_context function is available', async () => {
const { setup } = await expressionsPluginMock.createPlugin();
const result = await setup.run('kibana_context', null);
expect(result).toMatchObject({
type: 'kibana_context',
});
});
});
});
@ -81,15 +73,6 @@ describe('ExpressionsPublicPlugin', () => {
}
`);
});
test('"kibana" function return value of type "kibana_context"', async () => {
const { doStart } = await expressionsPluginMock.createPlugin();
const start = await doStart();
const execution = start.execute('kibana', null);
const result = await execution.getData();
expect((result as any).type).toBe('kibana_context');
});
});
});
});

View file

@ -130,15 +130,15 @@ export class Execution<Input = unknown, Output = unknown, InspectorAdapters exte
// @public (undocumented)
export type ExecutionContainer<Output = ExpressionValue> = StateContainer<ExecutionState<Output>, ExecutionPureTransitions<Output>>;
// Warning: (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ExecutionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters> {
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState_2 = SerializableState_2> {
abortSignal: AbortSignal;
// Warning: (ae-forgotten-export) The symbol "SavedObjectAttributes" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "SavedObject" needs to be exported by the entry point index.d.ts
getSavedObject?: <T extends SavedObjectAttributes = SavedObjectAttributes>(type: string, id: string) => Promise<SavedObject<T>>;
// Warning: (ae-forgotten-export) The symbol "ExecutionContextSearch" needs to be exported by the entry point index.d.ts
getSearchContext: () => ExecutionContextSearch;
getSearchSessionId: () => string | undefined;
inspectorAdapters: InspectorAdapters;
@ -396,12 +396,6 @@ export interface ExpressionFunctionDefinitions {
//
// (undocumented)
font: ExpressionFunctionFont;
// (undocumented)
kibana: ExpressionFunctionKibana;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionKibanaContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
kibana_context: ExpressionFunctionKibanaContext;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionMovingAverage" needs to be exported by the entry point index.d.ts
//
// (undocumented)
@ -420,11 +414,6 @@ export interface ExpressionFunctionDefinitions {
var_set: ExpressionFunctionVarSet;
}
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibana" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext>;
// Warning: (ae-missing-release-tag) "ExpressionFunctionParameter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -789,11 +778,6 @@ export { ExpressionValueRender }
export { ExpressionValueRender as Render }
// Warning: (ae-missing-release-tag) "ExpressionValueSearchContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionValueSearchContext = ExpressionValueBoxed<'kibana_context', ExecutionContextSearch>;
// Warning: (ae-missing-release-tag) "ExpressionValueUnboxed" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -908,7 +892,7 @@ export interface IExpressionLoaderParams {
// (undocumented)
onRenderError?: RenderErrorHandlerFnType;
// (undocumented)
searchContext?: ExecutionContextSearch;
searchContext?: SerializableState_2;
// (undocumented)
searchSessionId?: string;
// (undocumented)
@ -956,16 +940,6 @@ export interface IRegistry<T> {
// @public
export function isExpressionAstBuilder(val: any): val is ExpressionAstExpressionBuilder;
// Warning: (ae-missing-release-tag) "KIBANA_CONTEXT_NAME" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KIBANA_CONTEXT_NAME = 'kibana_context';
// Warning: (ae-missing-release-tag) "KibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KibanaContext = ExpressionValueSearchContext;
// Warning: (ae-missing-release-tag) "KnownTypeToString" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public

View file

@ -21,8 +21,8 @@ import { Adapters } from '../../../inspector/public';
import {
IInterpreterRenderHandlers,
ExpressionValue,
ExecutionContextSearch,
ExpressionsService,
SerializableState,
} from '../../common';
/**
@ -42,7 +42,7 @@ export interface ExpressionInterpreter {
}
export interface IExpressionLoaderParams {
searchContext?: ExecutionContextSearch;
searchContext?: SerializableState;
context?: ExpressionValue;
variables?: Record<string, any>;
// Enables debug tracking on each expression in the AST

View file

@ -57,7 +57,6 @@ export {
ExpressionFunction,
ExpressionFunctionDefinition,
ExpressionFunctionDefinitions,
ExpressionFunctionKibana,
ExpressionFunctionParameter,
ExpressionImage,
ExpressionRenderDefinition,
@ -72,7 +71,6 @@ export {
ExpressionValueError,
ExpressionValueNum,
ExpressionValueRender,
ExpressionValueSearchContext,
ExpressionValueUnboxed,
ExpressionValueFilter,
Font,
@ -87,8 +85,6 @@ export {
InterpreterErrorType,
IRegistry,
isExpressionAstBuilder,
KIBANA_CONTEXT_NAME,
KibanaContext,
KnownTypeToString,
Overflow,
parse,

View file

@ -128,15 +128,15 @@ export class Execution<Input = unknown, Output = unknown, InspectorAdapters exte
// @public (undocumented)
export type ExecutionContainer<Output = ExpressionValue> = StateContainer<ExecutionState<Output>, ExecutionPureTransitions<Output>>;
// Warning: (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "ExecutionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters> {
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState_2 = SerializableState_2> {
abortSignal: AbortSignal;
// Warning: (ae-forgotten-export) The symbol "SavedObjectAttributes" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "SavedObject" needs to be exported by the entry point index.d.ts
getSavedObject?: <T extends SavedObjectAttributes = SavedObjectAttributes>(type: string, id: string) => Promise<SavedObject<T>>;
// Warning: (ae-forgotten-export) The symbol "ExecutionContextSearch" needs to be exported by the entry point index.d.ts
getSearchContext: () => ExecutionContextSearch;
getSearchSessionId: () => string | undefined;
inspectorAdapters: InspectorAdapters;
@ -368,12 +368,6 @@ export interface ExpressionFunctionDefinitions {
//
// (undocumented)
font: ExpressionFunctionFont;
// (undocumented)
kibana: ExpressionFunctionKibana;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionKibanaContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
kibana_context: ExpressionFunctionKibanaContext;
// Warning: (ae-forgotten-export) The symbol "ExpressionFunctionMovingAverage" needs to be exported by the entry point index.d.ts
//
// (undocumented)
@ -392,11 +386,6 @@ export interface ExpressionFunctionDefinitions {
var_set: ExpressionFunctionVarSet;
}
// Warning: (ae-missing-release-tag) "ExpressionFunctionKibana" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionFunctionKibana = ExpressionFunctionDefinition<'kibana', ExpressionValueSearchContext | null, object, ExpressionValueSearchContext>;
// Warning: (ae-missing-release-tag) "ExpressionFunctionParameter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -640,11 +629,6 @@ export { ExpressionValueRender }
export { ExpressionValueRender as Render }
// Warning: (ae-missing-release-tag) "ExpressionValueSearchContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ExpressionValueSearchContext = ExpressionValueBoxed<'kibana_context', ExecutionContextSearch>;
// Warning: (ae-missing-release-tag) "ExpressionValueUnboxed" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@ -777,16 +761,6 @@ export interface IRegistry<T> {
// @public
export function isExpressionAstBuilder(val: any): val is ExpressionAstExpressionBuilder;
// Warning: (ae-missing-release-tag) "KIBANA_CONTEXT_NAME" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KIBANA_CONTEXT_NAME = 'kibana_context';
// Warning: (ae-missing-release-tag) "KibanaContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type KibanaContext = ExpressionValueSearchContext;
// Warning: (ae-missing-release-tag) "KnownTypeToString" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public

View file

@ -17,7 +17,7 @@
* under the License.
*/
import { AbortError, toPromise, getCombinedSignal } from './abort_utils';
import { AbortError, abortSignalToPromise, getCombinedAbortSignal } from './abort_utils';
jest.useFakeTimers();
@ -37,11 +37,11 @@ describe('AbortUtils', () => {
});
});
describe('toPromise', () => {
describe('abortSignalToPromise', () => {
describe('rejects', () => {
test('should not reject if the signal does not abort', async () => {
const controller = new AbortController();
const promise = toPromise(controller.signal).promise;
const promise = abortSignalToPromise(controller.signal).promise;
const whenRejected = jest.fn();
promise.catch(whenRejected);
await flushPromises();
@ -50,7 +50,7 @@ describe('AbortUtils', () => {
test('should reject if the signal does abort', async () => {
const controller = new AbortController();
const promise = toPromise(controller.signal).promise;
const promise = abortSignalToPromise(controller.signal).promise;
const whenRejected = jest.fn();
promise.catch(whenRejected);
controller.abort();
@ -61,13 +61,13 @@ describe('AbortUtils', () => {
test('should expose cleanup handler', () => {
const controller = new AbortController();
const promise = toPromise(controller.signal);
const promise = abortSignalToPromise(controller.signal);
expect(promise.cleanup).toBeDefined();
});
test('calling clean up handler prevents rejects', async () => {
const controller = new AbortController();
const { promise, cleanup } = toPromise(controller.signal);
const { promise, cleanup } = abortSignalToPromise(controller.signal);
const whenRejected = jest.fn();
promise.catch(whenRejected);
cleanup();
@ -78,9 +78,9 @@ describe('AbortUtils', () => {
});
});
describe('getCombinedSignal', () => {
describe('getCombinedAbortSignal', () => {
test('should return an AbortSignal', () => {
const signal = getCombinedSignal([]).signal;
const signal = getCombinedAbortSignal([]).signal;
expect(signal).toBeInstanceOf(AbortSignal);
});
@ -89,7 +89,7 @@ describe('AbortUtils', () => {
const controller2 = new AbortController();
setTimeout(() => controller1.abort(), 2000);
setTimeout(() => controller2.abort(), 1000);
const signal = getCombinedSignal([controller1.signal, controller2.signal]).signal;
const signal = getCombinedAbortSignal([controller1.signal, controller2.signal]).signal;
expect(signal.aborted).toBe(false);
jest.advanceTimersByTime(500);
await flushPromises();
@ -101,7 +101,7 @@ describe('AbortUtils', () => {
const controller2 = new AbortController();
setTimeout(() => controller1.abort(), 2000);
setTimeout(() => controller2.abort(), 1000);
const signal = getCombinedSignal([controller1.signal, controller2.signal]).signal;
const signal = getCombinedAbortSignal([controller1.signal, controller2.signal]).signal;
expect(signal.aborted).toBe(false);
jest.advanceTimersByTime(1000);
await flushPromises();
@ -112,7 +112,7 @@ describe('AbortUtils', () => {
const controller1 = new AbortController();
const controller2 = new AbortController();
controller1.abort();
const signal = getCombinedSignal([controller1.signal, controller2.signal]).signal;
const signal = getCombinedAbortSignal([controller1.signal, controller2.signal]).signal;
expect(signal.aborted).toBe(true);
});
@ -132,7 +132,7 @@ describe('AbortUtils', () => {
const controller1 = createMockController();
const controller2 = createMockController();
const { cleanup } = getCombinedSignal([
const { cleanup } = getCombinedAbortSignal([
controller1.controller.signal,
controller2.controller.signal,
]);
@ -150,7 +150,7 @@ describe('AbortUtils', () => {
const controller1 = createMockController();
const controller2 = createMockController();
getCombinedSignal([controller1.controller.signal, controller2.controller.signal]);
getCombinedAbortSignal([controller1.controller.signal, controller2.controller.signal]);
expect(controller1.getTotalListeners()).toBe(1);
expect(controller2.getTotalListeners()).toBe(1);

View file

@ -36,7 +36,9 @@ export class AbortError extends Error {
*
* @param signal The `AbortSignal` to generate the `Promise` from
*/
export function toPromise(signal: AbortSignal): { promise: Promise<never>; cleanup: () => void } {
export function abortSignalToPromise(
signal: AbortSignal
): { promise: Promise<never>; cleanup: () => void } {
let abortHandler: () => void;
const cleanup = () => {
if (abortHandler) {
@ -60,7 +62,7 @@ export function toPromise(signal: AbortSignal): { promise: Promise<never>; clean
*
* @param signals
*/
export function getCombinedSignal(
export function getCombinedAbortSignal(
signals: AbortSignal[]
): { signal: AbortSignal; cleanup: () => void } {
const controller = new AbortController();
@ -69,7 +71,7 @@ export function getCombinedSignal(
if (signals.some((signal) => signal.aborted)) {
controller.abort();
} else {
const promises = signals.map((signal) => toPromise(signal));
const promises = signals.map((signal) => abortSignalToPromise(signal));
cleanup = () => {
promises.forEach((p) => p.cleanup());
controller.signal.removeEventListener('abort', cleanup);

View file

@ -24,6 +24,7 @@ export * from './ui';
export * from './state_containers';
export * from './typed_json';
export * from './errors';
export { AbortError, abortSignalToPromise, getCombinedAbortSignal } from './abort_utils';
export { createGetterSetter, Get, Set } from './create_getter_setter';
export { distinctUntilChangedWithInitialValue } from './distinct_until_changed_with_initial_value';
export { url } from './url';

View file

@ -18,12 +18,15 @@
*/
export {
AbortError,
abortSignalToPromise,
calculateObjectHash,
defer,
Defer,
fieldWildcardFilter,
fieldWildcardMatcher,
Get,
getCombinedAbortSignal,
JsonArray,
JsonObject,
JsonValue,

View file

@ -18,10 +18,13 @@
*/
export {
AbortError,
abortSignalToPromise,
createGetterSetter,
fieldWildcardFilter,
fieldWildcardMatcher,
Get,
getCombinedAbortSignal,
Set,
url,
} from '../common';

View file

@ -233,7 +233,7 @@ export class UiActionsService {
//
// (undocumented)
protected readonly actions: ActionRegistry;
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: UiActionsActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">) => void;
readonly addTriggerAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, action: UiActionsActionDefinition<TriggerContextMapping[T]> | Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">) => void;
// (undocumented)
readonly attachAction: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, actionId: string) => void;
readonly clear: () => void;
@ -247,21 +247,21 @@ export class UiActionsService {
readonly executionService: UiActionsExecutionService;
readonly fork: () => UiActionsService;
// (undocumented)
readonly getAction: <T extends UiActionsActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">;
readonly getAction: <T extends UiActionsActionDefinition<{}>>(id: string) => Action<ActionContext<T>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">;
// Warning: (ae-forgotten-export) The symbol "TriggerContract" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly getTrigger: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => TriggerContract<T>;
// (undocumented)
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[];
readonly getTriggerActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T) => Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">[];
// (undocumented)
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">[]>;
readonly getTriggerCompatibleActions: <T extends "" | "SELECT_RANGE_TRIGGER" | "VALUE_CLICK_TRIGGER" | "FILTER_TRIGGER" | "VISUALIZE_FIELD_TRIGGER" | "VISUALIZE_GEO_FIELD_TRIGGER" | "CONTEXT_MENU_TRIGGER" | "PANEL_BADGE_TRIGGER" | "PANEL_NOTIFICATION_TRIGGER">(triggerId: T, context: TriggerContextMapping[T]) => Promise<Action<TriggerContextMapping[T], "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">[]>;
// (undocumented)
readonly hasAction: (actionId: string) => boolean;
// Warning: (ae-forgotten-export) The symbol "ActionContext" needs to be exported by the entry point index.d.ts
//
// (undocumented)
readonly registerAction: <A extends UiActionsActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK">;
readonly registerAction: <A extends UiActionsActionDefinition<{}>>(definition: A) => Action<ActionContext<A>, "" | "ACTION_VISUALIZE_FIELD" | "ACTION_VISUALIZE_GEO_FIELD" | "ACTION_VISUALIZE_LENS_FIELD" | "ACTION_GLOBAL_APPLY_FILTER" | "ACTION_SELECT_RANGE" | "ACTION_VALUE_CLICK" | "ACTION_CUSTOMIZE_PANEL" | "ACTION_ADD_PANEL" | "openInspector" | "deletePanel" | "editPanel" | "togglePanel" | "replacePanel" | "clonePanel" | "addToFromLibrary" | "unlinkFromLibrary" | "ACTION_LIBRARY_NOTIFICATION">;
// (undocumented)
readonly registerTrigger: (trigger: Trigger) => void;
// Warning: (ae-forgotten-export) The symbol "TriggerRegistry" needs to be exported by the entry point index.d.ts

View file

@ -18,8 +18,7 @@
*/
import { i18n } from '@kbn/i18n';
import { KIBANA_CONTEXT_NAME } from 'src/plugins/expressions/public';
import { TimeRange, Filter, esQuery, Query } from '../../../data/public';
import { KibanaContext, TimeRange, Filter, esQuery, Query } from '../../../data/public';
import { TimelionVisDependencies } from '../plugin';
import { getTimezone } from './get_timezone';
import { TimelionVisParams } from '../timelion_vis_fn';
@ -59,7 +58,7 @@ export interface TimelionSuccessResponse {
sheet: Sheet[];
stats: Stats;
visType: string;
type: KIBANA_CONTEXT_NAME;
type: KibanaContext['type'];
}
export function getTimelionRequestHandler({

View file

@ -19,18 +19,14 @@
import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import {
ExpressionFunctionDefinition,
KibanaContext,
Render,
} from 'src/plugins/expressions/public';
import { ExpressionFunctionDefinition, Render } from 'src/plugins/expressions/public';
import {
getTimelionRequestHandler,
TimelionSuccessResponse,
} from './helpers/timelion_request_handler';
import { TIMELION_VIS_NAME } from './timelion_vis_type';
import { TimelionVisDependencies } from './plugin';
import { Filter, Query, TimeRange } from '../../data/common';
import { KibanaContext, Filter, Query, TimeRange } from '../../data/public';
type Input = KibanaContext | null;
type Output = Promise<Render<TimelionRenderValue>>;

View file

@ -19,7 +19,8 @@
import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import { ExpressionFunctionDefinition, KibanaContext, Render } from '../../expressions/public';
import { KibanaContext } from '../../data/public';
import { ExpressionFunctionDefinition, Render } from '../../expressions/public';
// @ts-ignore
import { metricsRequestHandler } from './request_handler';

View file

@ -19,16 +19,12 @@
import { get } from 'lodash';
import { i18n } from '@kbn/i18n';
import {
ExecutionContext,
ExpressionFunctionDefinition,
KibanaContext,
Render,
} from '../../expressions/public';
import { ExecutionContextSearch } from '../../data/public';
import { ExecutionContext, ExpressionFunctionDefinition, Render } from '../../expressions/public';
import { VegaVisualizationDependencies } from './plugin';
import { createVegaRequestHandler } from './vega_request_handler';
import { VegaInspectorAdapters } from './vega_inspector/index';
import { TimeRange, Query } from '../../data/public';
import { KibanaContext, TimeRange, Query } from '../../data/public';
import { VegaParser } from './data_model/vega_parser';
type Input = KibanaContext | null;
@ -51,7 +47,7 @@ export type VegaExpressionFunctionDefinition = ExpressionFunctionDefinition<
Input,
Arguments,
Output,
ExecutionContext<VegaInspectorAdapters>
ExecutionContext<VegaInspectorAdapters, ExecutionContextSearch>
>;
export const createVegaFn = (

View file

@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { KibanaContext } from 'src/plugins/data/common';
import {
Datatable,
ExpressionValueFilter,
ExpressionImage,
ExpressionFunction,
KibanaContext,
PointSeries,
Render,
Style,

View file

@ -8,11 +8,11 @@ import { of, merge, timer, throwError } from 'rxjs';
import { takeWhile, switchMap, expand, mergeMap, tap } from 'rxjs/operators';
import {
AbortError,
doSearch,
IKibanaSearchResponse,
isErrorResponse,
} from '../../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../../src/plugins/kibana_utils/common';
import type { IKibanaSearchRequest } from '../../../../../../src/plugins/data/common';
import type { IAsyncSearchOptions } from '../../../common/search/types';

View file

@ -7,7 +7,8 @@ import type { MockedKeys } from '@kbn/utility-types/jest';
import { coreMock } from '../../../../../src/core/public/mocks';
import { EnhancedSearchInterceptor } from './search_interceptor';
import { CoreSetup, CoreStart } from 'kibana/public';
import { AbortError, UI_SETTINGS } from '../../../../../src/plugins/data/common';
import { UI_SETTINGS } from '../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../src/plugins/kibana_utils/public';
import { SearchTimeoutError } from 'src/plugins/data/public';
import { dataPluginMock } from '../../../../../src/plugins/data/public/mocks';

View file

@ -13,7 +13,7 @@ import {
SearchInterceptorDeps,
UI_SETTINGS,
} from '../../../../../src/plugins/data/public';
import { AbortError, toPromise } from '../../../../../src/plugins/data/common';
import { AbortError, abortSignalToPromise } from '../../../../../src/plugins/kibana_utils/public';
import {
IAsyncSearchRequest,
@ -70,7 +70,7 @@ export class EnhancedSearchInterceptor extends SearchInterceptor {
abortSignal: options.abortSignal,
timeout: this.searchTimeout,
});
const abortedPromise = toPromise(combinedSignal);
const abortedPromise = abortSignalToPromise(combinedSignal);
const strategy = options?.strategy ?? ENHANCED_ES_SEARCH_STRATEGY;
this.pendingCount$.next(this.pendingCount$.getValue() + 1);

View file

@ -23,7 +23,7 @@ import { IconType } from '@elastic/eui/src/components/icon/icon';
import { Ast, toExpression } from '@kbn/interpreter/common';
import { i18n } from '@kbn/i18n';
import classNames from 'classnames';
import { ExecutionContextSearch } from 'src/plugins/expressions';
import { DataPublicPluginStart, ExecutionContextSearch } from 'src/plugins/data/public';
import { Action, PreviewState } from './state_management';
import { Datasource, Visualization, FramePublicAPI, DatasourcePublicAPI } from '../../types';
import { getSuggestions, switchToSuggestion } from './suggestion_helpers';
@ -33,7 +33,6 @@ import {
} from '../../../../../../src/plugins/expressions/public';
import { prependDatasourceExpression } from './expression_helpers';
import { trackUiEvent, trackSuggestionEvent } from '../../lens_ui_telemetry';
import { DataPublicPluginStart } from '../../../../../../src/plugins/data/public';
import { validateDatasourceAndVisualization } from './state_helpers';
const MAX_SUGGESTIONS_DISPLAYED = 5;

View file

@ -20,7 +20,11 @@ import {
EuiTitle,
} from '@elastic/eui';
import { CoreStart, CoreSetup } from 'kibana/public';
import { ExecutionContextSearch } from 'src/plugins/expressions';
import {
DataPublicPluginStart,
ExecutionContextSearch,
TimefilterContract,
} from 'src/plugins/data/public';
import {
ExpressionRendererEvent,
ExpressionRenderError,
@ -44,10 +48,6 @@ import {
VisualizeFieldContext,
} from '../../../../../../../src/plugins/ui_actions/public';
import { VIS_EVENT_TO_TRIGGER } from '../../../../../../../src/plugins/visualizations/public';
import {
DataPublicPluginStart,
TimefilterContract,
} from '../../../../../../../src/plugins/data/public';
import { WorkspacePanelWrapper } from './workspace_panel_wrapper';
import { DropIllustration } from '../../../assets/drop_illustration';
import { LensInspectorAdapters } from '../../types';

View file

@ -8,6 +8,7 @@ import _ from 'lodash';
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import {
ExecutionContextSearch,
Filter,
IIndexPattern,
Query,
@ -15,7 +16,6 @@ import {
TimeRange,
IndexPattern,
} from 'src/plugins/data/public';
import { ExecutionContextSearch } from 'src/plugins/expressions';
import { PaletteOutput } from 'src/plugins/charts/public';
import { Subscription } from 'rxjs';

View file

@ -12,7 +12,7 @@ import {
ExpressionRendererEvent,
ReactExpressionRendererType,
} from 'src/plugins/expressions/public';
import { ExecutionContextSearch } from 'src/plugins/expressions';
import { ExecutionContextSearch } from 'src/plugins/data/public';
import { getOriginalRequestErrorMessage } from '../error_helper';
export interface ExpressionWrapperProps {

View file

@ -6,6 +6,7 @@
import moment from 'moment';
import { mergeTables } from './merge_tables';
import { ExpressionValueSearchContext } from 'src/plugins/data/public';
import { Datatable, ExecutionContext } from 'src/plugins/expressions';
import { LensInspectorAdapters } from './types';
@ -52,7 +53,7 @@ describe('lens_merge_tables', () => {
const adapters: LensInspectorAdapters = { tables: {} };
mergeTables.fn(null, { layerIds: ['first', 'second'], tables: [sampleTable1, sampleTable2] }, {
inspectorAdapters: adapters,
} as ExecutionContext<LensInspectorAdapters>);
} as ExecutionContext<LensInspectorAdapters, ExpressionValueSearchContext>);
expect(adapters.tables!.first).toBe(sampleTable1);
expect(adapters.tables!.second).toBe(sampleTable2);
});

View file

@ -9,9 +9,8 @@ import {
ExecutionContext,
Datatable,
ExpressionFunctionDefinition,
ExpressionValueSearchContext,
} from 'src/plugins/expressions/public';
import { search } from '../../../../../src/plugins/data/public';
import { ExpressionValueSearchContext, search } from '../../../../../src/plugins/data/public';
const { toAbsoluteDates } = search.aggs;
import { LensMultiTable } from '../types';
@ -27,7 +26,7 @@ export const mergeTables: ExpressionFunctionDefinition<
ExpressionValueSearchContext | null,
MergeTables,
LensMultiTable,
ExecutionContext<LensInspectorAdapters>
ExecutionContext<LensInspectorAdapters, ExpressionValueSearchContext>
> = {
name: 'lens_merge_tables',
type: 'lens_multitable',

View file

@ -29,7 +29,6 @@ import { I18nProvider } from '@kbn/i18n/react';
import {
ExpressionFunctionDefinition,
ExpressionRenderDefinition,
ExpressionValueSearchContext,
Datatable,
DatatableRow,
} from 'src/plugins/expressions/public';
@ -45,7 +44,7 @@ import {
import { XYArgs, SeriesType, visualizationTypes } from './types';
import { VisualizationContainer } from '../visualization_container';
import { isHorizontalChart, getSeriesColor } from './state_helpers';
import { parseInterval } from '../../../../../src/plugins/data/common';
import { ExpressionValueSearchContext, search } from '../../../../../src/plugins/data/public';
import {
ChartsPluginSetup,
PaletteRegistry,
@ -384,7 +383,8 @@ export function XYChart({
// add minInterval only for single point in domain
if (data.dateRange && isSingleTimestampInXDomain()) {
const params = xAxisColumn?.meta?.sourceParams?.params as Record<string, string>;
if (params?.interval !== 'auto') return parseInterval(params?.interval)?.asMilliseconds();
if (params?.interval !== 'auto')
return search.aggs.parseInterval(params?.interval)?.asMilliseconds();
const { fromDate, toDate } = data.dateRange;
const duration = moment(toDate).diff(moment(fromDate));

View file

@ -18,10 +18,10 @@ import {
LastEventIndexKey,
} from '../../../../../common/search_strategy/timeline';
import {
AbortError,
isCompleteResponse,
isErrorResponse,
} from '../../../../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../../../../src/plugins/kibana_utils/common';
import * as i18n from './translations';
import { DocValueFields } from '../../../../../common/search_strategy';

View file

@ -18,11 +18,8 @@ import {
MatrixHistogramStrategyResponse,
MatrixHistogramData,
} from '../../../../common/search_strategy/security_solution';
import {
AbortError,
isErrorResponse,
isCompleteResponse,
} from '../../../../../../../src/plugins/data/common';
import { isErrorResponse, isCompleteResponse } from '../../../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../../../src/plugins/kibana_utils/common';
import { getInspectResponse } from '../../../helpers';
import { InspectResponse } from '../../../types';
import * as i18n from './translations';

View file

@ -18,7 +18,7 @@ import {
BrowserField,
BrowserFields,
} from '../../../../common/search_strategy/index_fields';
import { AbortError } from '../../../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../../../src/plugins/kibana_utils/common';
import { useShallowEqualSelector } from '../../../common/hooks/use_selector';
import * as i18n from './translations';
import { SourcererScopeName } from '../../store/sourcerer/model';

View file

@ -11,11 +11,11 @@ import { takeUntil } from 'rxjs/operators';
import * as i18n from '../translations';
import { useKibana } from '../../../common/lib/kibana';
import {
AbortError,
isCompleteResponse,
isErrorResponse,
isPartialResponse,
} from '../../../../../../../src/plugins/data/common';
import { AbortError } from '../../../../../../../src/plugins/kibana_utils/common';
import {
EqlSearchStrategyRequest,
EqlSearchStrategyResponse,

Some files were not shown because too many files have changed in this diff Show more