mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
26 lines
2.6 KiB
Markdown
26 lines
2.6 KiB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [kibana-plugin-plugins-expressions-public](./kibana-plugin-plugins-expressions-public.md) > [ExecutionContext](./kibana-plugin-plugins-expressions-public.executioncontext.md)
|
|
|
|
## ExecutionContext interface
|
|
|
|
`ExecutionContext` is an object available to all functions during a single execution; it provides various methods to perform side-effects.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
export interface ExecutionContext<InspectorAdapters extends Adapters = Adapters, ExecutionContextSearch extends SerializableState = SerializableState>
|
|
```
|
|
|
|
## Properties
|
|
|
|
| Property | Type | Description |
|
|
| --- | --- | --- |
|
|
| [abortSignal](./kibana-plugin-plugins-expressions-public.executioncontext.abortsignal.md) | <code>AbortSignal</code> | Adds ability to abort current execution. |
|
|
| [getSavedObject](./kibana-plugin-plugins-expressions-public.executioncontext.getsavedobject.md) | <code><T extends SavedObjectAttributes = SavedObjectAttributes>(type: string, id: string) => Promise<SavedObject<T>></code> | Allows to fetch saved objects from ElasticSearch. In browser <code>getSavedObject</code> function is provided automatically by the Expressions plugin. On the server the caller of the expression has to provide this context function. The reason is because on the browser we always know the user who tries to fetch a saved object, thus saved object client is scoped automatically to that user. However, on the server we can scope that saved object client to any user, or even not scope it at all and execute it as an "internal" user. |
|
|
| [getSearchContext](./kibana-plugin-plugins-expressions-public.executioncontext.getsearchcontext.md) | <code>() => ExecutionContextSearch</code> | Get search context of the expression. |
|
|
| [getSearchSessionId](./kibana-plugin-plugins-expressions-public.executioncontext.getsearchsessionid.md) | <code>() => string | undefined</code> | Search context in which expression should operate. |
|
|
| [inspectorAdapters](./kibana-plugin-plugins-expressions-public.executioncontext.inspectoradapters.md) | <code>InspectorAdapters</code> | Adapters for <code>inspector</code> plugin. |
|
|
| [types](./kibana-plugin-plugins-expressions-public.executioncontext.types.md) | <code>Record<string, ExpressionType></code> | A map of available expression types. |
|
|
| [variables](./kibana-plugin-plugins-expressions-public.executioncontext.variables.md) | <code>Record<string, unknown></code> | Context variables that can be consumed using <code>var</code> and <code>var_set</code> functions. |
|
|
|