mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* Generate core API docs from TSDoc comments (#32148) * Generate core API docs from TSDoc comments Uses api-extractor and api-documenter to generate documentation for the Kibana core API from TSDoc comments in the source code. Documentation can be generated using `npm run docs:api`. I used --no-verify to ignore the following pre-commit hook errors: 1. Filenames MUST use snake_case - api-extractor.json It's possible to specify a different config file, but I prefer to keep the "standard" config file name. 2. UNHANDLED ERROR: Unable to find tsconfig.json file selecting "common/core_api_review/kibana.api.ts". Ensure one exists and it is listed in "src/dev/typescript/projects.ts" This is not a source file, so safe to ignore. * Flesh out API docs a little bit * Ignore snake_case check for api-extractor.json * Ignore api-extractor's review file from pre-commit check * Try to fix build failing by using masters yarn.lock * I'm being stupid * Found a better home for ignoring common/core_api_review/kibana.api.ts * Node script for detecting core API changes I initially wanted to include this as a precommit hook, but it takes quite long to execute (~12s) so might be better suited as a test or as part of the release process. The script currently fails because api-extractor uses an older version of typescript. * Fix tslint precommit hook ignore condition * Write tsdoc-metadata.json into ./build * Add LogMeta and ElasticSearch to exported types & docs * Suppress logging when running api-extractor from script * Improve check_core_api_changes script and run as test * Inline api-extractor.json config * Fix check_core_api_changes --help flag * LogMeta TSDoc comments * check_core_api_changes: fail if api-extractor produces warnings or errors And print more useful messages to the console * Move ignored ts files list into dev/file * Add back build:types since api-exporter cannot operate on source files * Upgrade api-exporter/documenter * api-extractor: independantly analyze core/public and core/server Becasue of https://github.com/Microsoft/web-build-tools/issues/1029 api-extractor can't use core/index.ts as a single entry point for analyzing the public and server API's as isolated namespaces. Instead we analyze these projects separately. This introduces other problems like the api review files and documentation always being called "kibana." from the package.json filename. * Build types as part of build task * Include types in typescript browser compilation * Force inclusion of core/public for building types * Fix api review filename in api-exporter errors * Update docs and API review files * Fix api-extractor warnings * Remove ts file ignored list since it's no longer necessary * Rename exported api package name * Review comments * Export other missing types * Upgrade api-documenter to latest beta * Export more missing types * Fix warnings and add api-exporter to Jenkins tests * Correctly handle runBuildTypes() exceptions * Fix another swallowed exception * Fix api-extractor warnings after master merge * Update yarn.lock * Fix erraneous type * Revert "Update yarn.lock" This reverts commit85a8093015
. * Revert "Fix erraneous type" This reverts commit7f0550c0ae
. * Backport https://github.com/elastic/kibana/pull/32440 * Update core api signature and docs
This commit is contained in:
parent
e97b329082
commit
8945b56fe2
138 changed files with 2630 additions and 84 deletions
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [BasePathSetup](./kibana-plugin-public.basepathsetup.md)
|
||||
|
||||
## BasePathSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type BasePathSetup = ReturnType<BasePathService['setup']>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md) > [logo](./kibana-plugin-public.chromebrand.logo.md)
|
||||
|
||||
## ChromeBrand.logo property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
logo?: string;
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md)
|
||||
|
||||
## ChromeBrand interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface ChromeBrand
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [logo](./kibana-plugin-public.chromebrand.logo.md) | <code>string</code> | |
|
||||
| [smallLogo](./kibana-plugin-public.chromebrand.smalllogo.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md) > [smallLogo](./kibana-plugin-public.chromebrand.smalllogo.md)
|
||||
|
||||
## ChromeBrand.smallLogo property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
smallLogo?: string;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [data-test-subj](./kibana-plugin-public.chromebreadcrumb.data-test-subj.md)
|
||||
|
||||
## ChromeBreadcrumb.data-test-subj property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
'data-test-subj'?: string;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [href](./kibana-plugin-public.chromebreadcrumb.href.md)
|
||||
|
||||
## ChromeBreadcrumb.href property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
href?: string;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md)
|
||||
|
||||
## ChromeBreadcrumb interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface ChromeBreadcrumb
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [data-test-subj](./kibana-plugin-public.chromebreadcrumb.data-test-subj.md) | <code>string</code> | |
|
||||
| [href](./kibana-plugin-public.chromebreadcrumb.href.md) | <code>string</code> | |
|
||||
| [text](./kibana-plugin-public.chromebreadcrumb.text.md) | <code>string</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) > [text](./kibana-plugin-public.chromebreadcrumb.text.md)
|
||||
|
||||
## ChromeBreadcrumb.text property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
text: string;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md)
|
||||
|
||||
## ChromeHelpExtension type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ChromeHelpExtension = (element: HTMLDivElement) => (() => void);
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeSetup](./kibana-plugin-public.chromesetup.md)
|
||||
|
||||
## ChromeSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ChromeSetup = ReturnType<ChromeService['setup']>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [basePath](./kibana-plugin-public.coresetup.basepath.md)
|
||||
|
||||
## CoreSetup.basePath property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
basePath: BasePathSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [chrome](./kibana-plugin-public.coresetup.chrome.md)
|
||||
|
||||
## CoreSetup.chrome property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
chrome: ChromeSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md)
|
||||
|
||||
## CoreSetup.fatalErrors property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatalErrors: FatalErrorsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [http](./kibana-plugin-public.coresetup.http.md)
|
||||
|
||||
## CoreSetup.http property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
http: HttpSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [i18n](./kibana-plugin-public.coresetup.i18n.md)
|
||||
|
||||
## CoreSetup.i18n property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
i18n: I18nSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md)
|
||||
|
||||
## CoreSetup.injectedMetadata property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
injectedMetadata: InjectedMetadataSetup;
|
||||
```
|
|
@ -0,0 +1,25 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md)
|
||||
|
||||
## CoreSetup interface
|
||||
|
||||
Core services exposed to the start lifecycle
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CoreSetup
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [basePath](./kibana-plugin-public.coresetup.basepath.md) | <code>BasePathSetup</code> | |
|
||||
| [chrome](./kibana-plugin-public.coresetup.chrome.md) | <code>ChromeSetup</code> | |
|
||||
| [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md) | <code>FatalErrorsSetup</code> | |
|
||||
| [http](./kibana-plugin-public.coresetup.http.md) | <code>HttpSetup</code> | |
|
||||
| [i18n](./kibana-plugin-public.coresetup.i18n.md) | <code>I18nSetup</code> | |
|
||||
| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | <code>InjectedMetadataSetup</code> | |
|
||||
| [notifications](./kibana-plugin-public.coresetup.notifications.md) | <code>NotificationsSetup</code> | |
|
||||
| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | <code>UiSettingsSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [notifications](./kibana-plugin-public.coresetup.notifications.md)
|
||||
|
||||
## CoreSetup.notifications property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
notifications: NotificationsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [CoreSetup](./kibana-plugin-public.coresetup.md) > [uiSettings](./kibana-plugin-public.coresetup.uisettings.md)
|
||||
|
||||
## CoreSetup.uiSettings property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
uiSettings: UiSettingsSetup;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md)
|
||||
|
||||
## FatalErrorsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type FatalErrorsSetup = ReturnType<FatalErrorsService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpSetup](./kibana-plugin-public.httpsetup.md)
|
||||
|
||||
## HttpSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type HttpSetup = ReturnType<HttpService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [I18nSetup](./kibana-plugin-public.i18nsetup.md)
|
||||
|
||||
## I18nSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type I18nSetup = ReturnType<I18nService['setup']>;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md)
|
||||
|
||||
## InjectedMetadataSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type InjectedMetadataSetup = ReturnType<InjectedMetadataService['setup']>;
|
||||
```
|
39
docs/development/core/public/kibana-plugin-public.md
Normal file
39
docs/development/core/public/kibana-plugin-public.md
Normal file
|
@ -0,0 +1,39 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md)
|
||||
|
||||
## kibana-plugin-public package
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [ToastsSetup](./kibana-plugin-public.toastssetup.md) | |
|
||||
| [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) | |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [ChromeBrand](./kibana-plugin-public.chromebrand.md) | |
|
||||
| [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) | |
|
||||
| [CoreSetup](./kibana-plugin-public.coresetup.md) | Core services exposed to the start lifecycle |
|
||||
| [Plugin](./kibana-plugin-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
|
||||
| [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
|
||||
| [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) | The available core services passed to a plugin's <code>Plugin#setup</code> method. |
|
||||
| [UiSettingsState](./kibana-plugin-public.uisettingsstate.md) | |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [BasePathSetup](./kibana-plugin-public.basepathsetup.md) | |
|
||||
| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | |
|
||||
| [ChromeSetup](./kibana-plugin-public.chromesetup.md) | |
|
||||
| [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) | |
|
||||
| [HttpSetup](./kibana-plugin-public.httpsetup.md) | |
|
||||
| [I18nSetup](./kibana-plugin-public.i18nsetup.md) | |
|
||||
| [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md) | |
|
||||
| [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) | |
|
||||
| [PluginInitializer](./kibana-plugin-public.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>public</code> directory should conform to this interface. |
|
||||
| [ToastInput](./kibana-plugin-public.toastinput.md) | |
|
||||
| [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md) | |
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [NotificationsSetup](./kibana-plugin-public.notificationssetup.md)
|
||||
|
||||
## NotificationsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type NotificationsSetup = ReturnType<NotificationsService['setup']>;
|
||||
```
|
19
docs/development/core/public/kibana-plugin-public.plugin.md
Normal file
19
docs/development/core/public/kibana-plugin-public.plugin.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md)
|
||||
|
||||
## Plugin interface
|
||||
|
||||
The interface that should be returned by a `PluginInitializer`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Plugin<TSetup, TDependencies extends Record<string, unknown> =
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [setup](./kibana-plugin-public.plugin.setup.md) | <code>(core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise<TSetup></code> | |
|
||||
| [stop](./kibana-plugin-public.plugin.stop.md) | <code>() => void</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [setup](./kibana-plugin-public.plugin.setup.md)
|
||||
|
||||
## Plugin.setup property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
setup: (core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise<TSetup>;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [stop](./kibana-plugin-public.plugin.stop.md)
|
||||
|
||||
## Plugin.stop property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
stop?: () => void;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializer](./kibana-plugin-public.plugininitializer.md)
|
||||
|
||||
## PluginInitializer type
|
||||
|
||||
The `plugin` export at the root of a plugin's `public` directory should conform to this interface.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type PluginInitializer<TSetup, TDependencies extends Record<string, unknown> = {}> = (core: PluginInitializerContext) => Plugin<TSetup, TDependencies>;
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md)
|
||||
|
||||
## PluginInitializerContext interface
|
||||
|
||||
The available core services passed to a `PluginInitializer`
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginInitializerContext
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md)
|
||||
|
||||
## PluginSetupContext.basePath property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
basePath: BasePathSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md)
|
||||
|
||||
## PluginSetupContext.chrome property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
chrome: ChromeSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md)
|
||||
|
||||
## PluginSetupContext.fatalErrors property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatalErrors: FatalErrorsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md)
|
||||
|
||||
## PluginSetupContext.i18n property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
i18n: I18nSetup;
|
||||
```
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md)
|
||||
|
||||
## PluginSetupContext interface
|
||||
|
||||
The available core services passed to a plugin's `Plugin#setup` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginSetupContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md) | <code>BasePathSetup</code> | |
|
||||
| [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md) | <code>ChromeSetup</code> | |
|
||||
| [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md) | <code>FatalErrorsSetup</code> | |
|
||||
| [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md) | <code>I18nSetup</code> | |
|
||||
| [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md) | <code>NotificationsSetup</code> | |
|
||||
| [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md) | <code>UiSettingsSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md)
|
||||
|
||||
## PluginSetupContext.notifications property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
notifications: NotificationsSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md)
|
||||
|
||||
## PluginSetupContext.uiSettings property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
uiSettings: UiSettingsSetup;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastInput](./kibana-plugin-public.toastinput.md)
|
||||
|
||||
## ToastInput type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ToastInput = string | Pick<Toast, Exclude<keyof Toast, 'id'>>;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [add](./kibana-plugin-public.toastssetup.add.md)
|
||||
|
||||
## ToastsSetup.add() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
add(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addDanger](./kibana-plugin-public.toastssetup.adddanger.md)
|
||||
|
||||
## ToastsSetup.addDanger() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addDanger(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addSuccess](./kibana-plugin-public.toastssetup.addsuccess.md)
|
||||
|
||||
## ToastsSetup.addSuccess() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addSuccess(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [addWarning](./kibana-plugin-public.toastssetup.addwarning.md)
|
||||
|
||||
## ToastsSetup.addWarning() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
addWarning(toastOrTitle: ToastInput): Toast;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toastOrTitle | <code>ToastInput</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Toast`
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [get$](./kibana-plugin-public.toastssetup.get$.md)
|
||||
|
||||
## ToastsSetup.get$() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get$(): Rx.Observable<Toast[]>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<Toast[]>`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md)
|
||||
|
||||
## ToastsSetup class
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class ToastsSetup
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [add(toastOrTitle)](./kibana-plugin-public.toastssetup.add.md) | | |
|
||||
| [addDanger(toastOrTitle)](./kibana-plugin-public.toastssetup.adddanger.md) | | |
|
||||
| [addSuccess(toastOrTitle)](./kibana-plugin-public.toastssetup.addsuccess.md) | | |
|
||||
| [addWarning(toastOrTitle)](./kibana-plugin-public.toastssetup.addwarning.md) | | |
|
||||
| [get$()](./kibana-plugin-public.toastssetup.get$.md) | | |
|
||||
| [remove(toast)](./kibana-plugin-public.toastssetup.remove.md) | | |
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) > [remove](./kibana-plugin-public.toastssetup.remove.md)
|
||||
|
||||
## ToastsSetup.remove() method
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
remove(toast: Toast): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| toast | <code>Toast</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [get$](./kibana-plugin-public.uisettingsclient.get$.md)
|
||||
|
||||
## UiSettingsClient.get$() method
|
||||
|
||||
Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a `defaultOverride` argument behaves the same as it does in \#get()
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get$(key: string, defaultOverride?: any): Rx.Observable<any>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| defaultOverride | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<any>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [get](./kibana-plugin-public.uisettingsclient.get.md)
|
||||
|
||||
## UiSettingsClient.get() method
|
||||
|
||||
Gets the value for a specific uiSetting. If this setting has no user-defined value then the `defaultOverride` parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not defined by a uiSettingDefaults then an error is thrown, otherwise the default is read from the uiSettingDefaults.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get(key: string, defaultOverride?: any): any;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| defaultOverride | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`any`
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getAll](./kibana-plugin-public.uisettingsclient.getall.md)
|
||||
|
||||
## UiSettingsClient.getAll() method
|
||||
|
||||
Gets the metadata about all uiSettings, including the type, default value, and user value for each key.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getAll(): UiSettingsState;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`UiSettingsState`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getSaved$](./kibana-plugin-public.uisettingsclient.getsaved$.md)
|
||||
|
||||
## UiSettingsClient.getSaved$() method
|
||||
|
||||
Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getSaved$(): Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [getUpdate$](./kibana-plugin-public.uisettingsclient.getupdate$.md)
|
||||
|
||||
## UiSettingsClient.getUpdate$() method
|
||||
|
||||
Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
getUpdate$(): Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Rx.Observable<{
|
||||
key: string;
|
||||
newValue: any;
|
||||
oldValue: any;
|
||||
}>`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isCustom](./kibana-plugin-public.uisettingsclient.iscustom.md)
|
||||
|
||||
## UiSettingsClient.isCustom() method
|
||||
|
||||
Returns true if the setting is not a part of the uiSettingDefaults, but was either added directly via `set()`<!-- -->, or is an unknown setting found in the uiSettings saved object
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isCustom(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isDeclared](./kibana-plugin-public.uisettingsclient.isdeclared.md)
|
||||
|
||||
## UiSettingsClient.isDeclared() method
|
||||
|
||||
Returns true if the key is a "known" uiSetting, meaning it is either defined in the uiSettingDefaults or was previously added as a custom setting via the `set()` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isDeclared(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isDefault](./kibana-plugin-public.uisettingsclient.isdefault.md)
|
||||
|
||||
## UiSettingsClient.isDefault() method
|
||||
|
||||
Returns true if the setting has no user-defined value or is unknown
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isDefault(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [isOverridden](./kibana-plugin-public.uisettingsclient.isoverridden.md)
|
||||
|
||||
## UiSettingsClient.isOverridden() method
|
||||
|
||||
Returns true if a settings value is overridden by the server. When a setting is overridden its value can not be changed via `set()` or `remove()`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
isOverridden(key: string): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`boolean`
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md)
|
||||
|
||||
## UiSettingsClient class
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class UiSettingsClient
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [params](./kibana-plugin-public.uisettingsclient.params.md) | | <code>UiSettingsClientParams</code> | |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [get(key, defaultOverride)](./kibana-plugin-public.uisettingsclient.get.md) | | Gets the value for a specific uiSetting. If this setting has no user-defined value then the <code>defaultOverride</code> parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not defined by a uiSettingDefaults then an error is thrown, otherwise the default is read from the uiSettingDefaults. |
|
||||
| [get$(key, defaultOverride)](./kibana-plugin-public.uisettingsclient.get$.md) | | Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a <code>defaultOverride</code> argument behaves the same as it does in \#get() |
|
||||
| [getAll()](./kibana-plugin-public.uisettingsclient.getall.md) | | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. |
|
||||
| [getSaved$()](./kibana-plugin-public.uisettingsclient.getsaved$.md) | | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
|
||||
| [getUpdate$()](./kibana-plugin-public.uisettingsclient.getupdate$.md) | | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
|
||||
| [isCustom(key)](./kibana-plugin-public.uisettingsclient.iscustom.md) | | Returns true if the setting is not a part of the uiSettingDefaults, but was either added directly via <code>set()</code>, or is an unknown setting found in the uiSettings saved object |
|
||||
| [isDeclared(key)](./kibana-plugin-public.uisettingsclient.isdeclared.md) | | Returns true if the key is a "known" uiSetting, meaning it is either defined in the uiSettingDefaults or was previously added as a custom setting via the <code>set()</code> method. |
|
||||
| [isDefault(key)](./kibana-plugin-public.uisettingsclient.isdefault.md) | | Returns true if the setting has no user-defined value or is unknown |
|
||||
| [isOverridden(key)](./kibana-plugin-public.uisettingsclient.isoverridden.md) | | Returns true if a settings value is overridden by the server. When a setting is overridden its value can not be changed via <code>set()</code> or <code>remove()</code>. |
|
||||
| [overrideLocalDefault(key, newDefault)](./kibana-plugin-public.uisettingsclient.overridelocaldefault.md) | | Overrides the default value for a setting in this specific browser tab. If the page is reloaded the default override is lost. |
|
||||
| [remove(key)](./kibana-plugin-public.uisettingsclient.remove.md) | | Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling <code>set(key, null)</code>, including the synchronization, custom setting, and error behavior of that method. |
|
||||
| [set(key, val)](./kibana-plugin-public.uisettingsclient.set.md) | | Sets the value for a uiSetting. If the setting is not defined in the uiSettingDefaults it will be stored as a custom setting. The new value will be synchronously available via the <code>get()</code> method and sent to the server in the background. If the request to the server fails then a toast notification will be displayed and the setting will be reverted it its value before <code>set()</code> was called. |
|
||||
| [stop()](./kibana-plugin-public.uisettingsclient.stop.md) | | Prepares the uiSettingsClient to be discarded, completing any update$ observables that have been created. |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [overrideLocalDefault](./kibana-plugin-public.uisettingsclient.overridelocaldefault.md)
|
||||
|
||||
## UiSettingsClient.overrideLocalDefault() method
|
||||
|
||||
Overrides the default value for a setting in this specific browser tab. If the page is reloaded the default override is lost.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
overrideLocalDefault(key: string, newDefault: any): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| newDefault | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [params](./kibana-plugin-public.uisettingsclient.params.md)
|
||||
|
||||
## UiSettingsClient.params property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
readonly params: UiSettingsClientParams;
|
||||
```
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [remove](./kibana-plugin-public.uisettingsclient.remove.md)
|
||||
|
||||
## UiSettingsClient.remove() method
|
||||
|
||||
Removes the user-defined value for a setting, causing it to revert to the default. This method behaves the same as calling `set(key, null)`<!-- -->, including the synchronization, custom setting, and error behavior of that method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
remove(key: string): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<boolean>`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [set](./kibana-plugin-public.uisettingsclient.set.md)
|
||||
|
||||
## UiSettingsClient.set() method
|
||||
|
||||
Sets the value for a uiSetting. If the setting is not defined in the uiSettingDefaults it will be stored as a custom setting. The new value will be synchronously available via the `get()` method and sent to the server in the background. If the request to the server fails then a toast notification will be displayed and the setting will be reverted it its value before `set()` was called.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
set(key: string, val: any): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | <code>string</code> | |
|
||||
| val | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<boolean>`
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) > [stop](./kibana-plugin-public.uisettingsclient.stop.md)
|
||||
|
||||
## UiSettingsClient.stop() method
|
||||
|
||||
Prepares the uiSettingsClient to be discarded, completing any update$ observables that have been created.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
stop(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md)
|
||||
|
||||
## UiSettingsSetup type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type UiSettingsSetup = UiSettingsClient;
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsState](./kibana-plugin-public.uisettingsstate.md)
|
||||
|
||||
## UiSettingsState interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface UiSettingsState
|
||||
```
|
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [APICaller](./kibana-plugin-server.apicaller.md)
|
||||
|
||||
## APICaller type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type APICaller = (endpoint: string, clientParams: Record<string, unknown>, options?: CallAPIOptions) => Promise<unknown>;
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CallAPIOptions](./kibana-plugin-server.callapioptions.md)
|
||||
|
||||
## CallAPIOptions interface
|
||||
|
||||
The set of options that defines how API call should be made and result be processed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CallAPIOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [wrap401Errors](./kibana-plugin-server.callapioptions.wrap401errors.md) | <code>boolean</code> | Indicates whether <code>401 Unauthorized</code> errors returned from the Elasticsearch API should be wrapped into <code>Boom</code> error instances with properly set <code>WWW-Authenticate</code> header that could have been returned by the API itself. If API didn't specify that then <code>Basic realm="Authorization Required"</code> is used as <code>WWW-Authenticate</code>. |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CallAPIOptions](./kibana-plugin-server.callapioptions.md) > [wrap401Errors](./kibana-plugin-server.callapioptions.wrap401errors.md)
|
||||
|
||||
## CallAPIOptions.wrap401Errors property
|
||||
|
||||
Indicates whether `401 Unauthorized` errors returned from the Elasticsearch API should be wrapped into `Boom` error instances with properly set `WWW-Authenticate` header that could have been returned by the API itself. If API didn't specify that then `Basic realm="Authorization Required"` is used as `WWW-Authenticate`<!-- -->.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
wrap401Errors: boolean;
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [asScoped](./kibana-plugin-server.clusterclient.asscoped.md)
|
||||
|
||||
## ClusterClient.asScoped() method
|
||||
|
||||
Creates an instance of `ScopedClusterClient` based on the configuration the current cluster client that exposes additional `callAsCurrentUser` method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
asScoped(req?: {
|
||||
headers?: Headers;
|
||||
}): ScopedClusterClient;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| req | <code>{`<p/>` headers?: Headers;`<p/>` }</code> | Request the <code>ScopedClusterClient</code> instance will be scoped to. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`ScopedClusterClient`
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [callAsInternalUser](./kibana-plugin-server.clusterclient.callasinternaluser.md)
|
||||
|
||||
## ClusterClient.callAsInternalUser property
|
||||
|
||||
Calls specified endpoint with provided clientParams on behalf of the Kibana internal user.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
callAsInternalUser: (endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any>;
|
||||
```
|
|
@ -0,0 +1,15 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md) > [close](./kibana-plugin-server.clusterclient.close.md)
|
||||
|
||||
## ClusterClient.close() method
|
||||
|
||||
Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
close(): void;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ClusterClient](./kibana-plugin-server.clusterclient.md)
|
||||
|
||||
## ClusterClient class
|
||||
|
||||
Represents an Elasticsearch cluster API client and allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class ClusterClient
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| [callAsInternalUser](./kibana-plugin-server.clusterclient.callasinternaluser.md) | | <code>(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any></code> | Calls specified endpoint with provided clientParams on behalf of the Kibana internal user. |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [asScoped(req)](./kibana-plugin-server.clusterclient.asscoped.md) | | Creates an instance of <code>ScopedClusterClient</code> based on the configuration the current cluster client that exposes additional <code>callAsCurrentUser</code> method scoped to the provided req. Consumers shouldn't worry about closing scoped client instances, these will be automatically closed as soon as the original cluster client isn't needed anymore and closed. |
|
||||
| [close()](./kibana-plugin-server.clusterclient.close.md) | | Closes the cluster client. After that client cannot be used and one should create a new client instance to be able to interact with Elasticsearch API. |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md)
|
||||
|
||||
## CoreSetup.elasticsearch property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
elasticsearch: ElasticsearchServiceSetup;
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [http](./kibana-plugin-server.coresetup.http.md)
|
||||
|
||||
## CoreSetup.http property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
http: HttpServiceSetup;
|
||||
```
|
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md)
|
||||
|
||||
## CoreSetup interface
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface CoreSetup
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | <code>ElasticsearchServiceSetup</code> | |
|
||||
| [http](./kibana-plugin-server.coresetup.http.md) | <code>HttpServiceSetup</code> | |
|
||||
| [plugins](./kibana-plugin-server.coresetup.plugins.md) | <code>PluginsServiceSetup</code> | |
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) > [plugins](./kibana-plugin-server.coresetup.plugins.md)
|
||||
|
||||
## CoreSetup.plugins property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
plugins: PluginsServiceSetup;
|
||||
```
|
|
@ -0,0 +1,14 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md)
|
||||
|
||||
## ElasticsearchClientConfig type
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type ElasticsearchClientConfig = Pick<ConfigOptions, 'keepAlive' | 'log' | 'plugins'> & Pick<ElasticsearchConfig, 'apiVersion' | 'customHeaders' | 'logQueries' | 'requestHeadersWhitelist' | 'sniffOnStart' | 'sniffOnConnectionFault' | 'hosts' | 'username' | 'password'> & {
|
||||
pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout'];
|
||||
requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout'];
|
||||
sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval'];
|
||||
ssl?: Partial<ElasticsearchConfig['ssl']>;
|
||||
};
|
||||
```
|
10
docs/development/core/server/kibana-plugin-server.headers.md
Normal file
10
docs/development/core/server/kibana-plugin-server.headers.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Headers](./kibana-plugin-server.headers.md)
|
||||
|
||||
## Headers type
|
||||
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type Headers = Record<string, string | string[] | undefined>;
|
||||
```
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [debug](./kibana-plugin-server.logger.debug.md)
|
||||
|
||||
## Logger.debug() method
|
||||
|
||||
Log messages useful for debugging and interactive investigation
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
debug(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [error](./kibana-plugin-server.logger.error.md)
|
||||
|
||||
## Logger.error() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages that caused a failure in the application flow
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
error(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [fatal](./kibana-plugin-server.logger.fatal.md)
|
||||
|
||||
## Logger.fatal() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages that caused an unrecoverable failure
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
fatal(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [info](./kibana-plugin-server.logger.info.md)
|
||||
|
||||
## Logger.info() method
|
||||
|
||||
Logs messages related to general application flow
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
info(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
23
docs/development/core/server/kibana-plugin-server.logger.md
Normal file
23
docs/development/core/server/kibana-plugin-server.logger.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md)
|
||||
|
||||
## Logger interface
|
||||
|
||||
Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface Logger
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [debug(message, meta)](./kibana-plugin-server.logger.debug.md) | Log messages useful for debugging and interactive investigation |
|
||||
| [error(errorOrMessage, meta)](./kibana-plugin-server.logger.error.md) | Logs abnormal or unexpected errors or messages that caused a failure in the application flow |
|
||||
| [fatal(errorOrMessage, meta)](./kibana-plugin-server.logger.fatal.md) | Logs abnormal or unexpected errors or messages that caused an unrecoverable failure |
|
||||
| [info(message, meta)](./kibana-plugin-server.logger.info.md) | Logs messages related to general application flow |
|
||||
| [trace(message, meta)](./kibana-plugin-server.logger.trace.md) | Log messages at the most detailed log level |
|
||||
| [warn(errorOrMessage, meta)](./kibana-plugin-server.logger.warn.md) | Logs abnormal or unexpected errors or messages |
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [trace](./kibana-plugin-server.logger.trace.md)
|
||||
|
||||
## Logger.trace() method
|
||||
|
||||
Log messages at the most detailed log level
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
trace(message: string, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| message | <code>string</code> | The log message |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Logger](./kibana-plugin-server.logger.md) > [warn](./kibana-plugin-server.logger.warn.md)
|
||||
|
||||
## Logger.warn() method
|
||||
|
||||
Logs abnormal or unexpected errors or messages
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
warn(errorOrMessage: string | Error, meta?: LogMeta): void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| errorOrMessage | <code>string | Error</code> | An Error object or message string to log |
|
||||
| meta | <code>LogMeta</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LoggerFactory](./kibana-plugin-server.loggerfactory.md) > [get](./kibana-plugin-server.loggerfactory.get.md)
|
||||
|
||||
## LoggerFactory.get() method
|
||||
|
||||
Returns a `Logger` instance for the specified context.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
get(...contextParts: string[]): Logger;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| contextParts | <code>string[]</code> | Parts of the context to return logger for. For example get('plugins', 'pid') will return a logger for the <code>plugins.pid</code> context. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Logger`
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LoggerFactory](./kibana-plugin-server.loggerfactory.md)
|
||||
|
||||
## LoggerFactory interface
|
||||
|
||||
The single purpose of `LoggerFactory` interface is to define a way to retrieve a context-based logger instance.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface LoggerFactory
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [get(contextParts)](./kibana-plugin-server.loggerfactory.get.md) | Returns a <code>Logger</code> instance for the specified context. |
|
||||
|
11
docs/development/core/server/kibana-plugin-server.logmeta.md
Normal file
11
docs/development/core/server/kibana-plugin-server.logmeta.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LogMeta](./kibana-plugin-server.logmeta.md)
|
||||
|
||||
## LogMeta interface
|
||||
|
||||
Contextual metadata
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface LogMeta
|
||||
```
|
32
docs/development/core/server/kibana-plugin-server.md
Normal file
32
docs/development/core/server/kibana-plugin-server.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md)
|
||||
|
||||
## kibana-plugin-server package
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [ClusterClient](./kibana-plugin-server.clusterclient.md) | Represents an Elasticsearch cluster API client and allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via <code>asScoped(...)</code>). |
|
||||
| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | Serves the same purpose as "normal" <code>ClusterClient</code> but exposes additional <code>callAsCurrentUser</code> method that doesn't use credentials of the Kibana internal user (as <code>callAsInternalUser</code> does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. |
|
||||
| [CoreSetup](./kibana-plugin-server.coresetup.md) | |
|
||||
| [Logger](./kibana-plugin-server.logger.md) | Logger exposes all the necessary methods to log any type of information and this is the interface used by the logging consumers including plugins. |
|
||||
| [LoggerFactory](./kibana-plugin-server.loggerfactory.md) | The single purpose of <code>LoggerFactory</code> interface is to define a way to retrieve a context-based logger instance. |
|
||||
| [LogMeta](./kibana-plugin-server.logmeta.md) | Contextual metadata |
|
||||
| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. |
|
||||
| [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md) | Context passed to the plugins <code>setup</code> method. |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [APICaller](./kibana-plugin-server.apicaller.md) | |
|
||||
| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | |
|
||||
| [Headers](./kibana-plugin-server.headers.md) | |
|
||||
| [PluginName](./kibana-plugin-server.pluginname.md) | Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious. |
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [config](./kibana-plugin-server.plugininitializercontext.config.md)
|
||||
|
||||
## PluginInitializerContext.config property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
config: {
|
||||
create: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config>;
|
||||
createIfExists: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config | undefined>;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [env](./kibana-plugin-server.plugininitializercontext.env.md)
|
||||
|
||||
## PluginInitializerContext.env property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
env: {
|
||||
mode: EnvironmentMode;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,9 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) > [logger](./kibana-plugin-server.plugininitializercontext.logger.md)
|
||||
|
||||
## PluginInitializerContext.logger property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
logger: LoggerFactory;
|
||||
```
|
|
@ -0,0 +1,20 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md)
|
||||
|
||||
## PluginInitializerContext interface
|
||||
|
||||
Context that's available to plugins during initialization stage.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginInitializerContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [config](./kibana-plugin-server.plugininitializercontext.config.md) | <code>{`<p/>` create: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config>;`<p/>` createIfExists: <Schema extends Type<any>, Config>(ConfigClass: ConfigWithSchema<Schema, Config>) => Observable<Config | undefined>;`<p/>` }</code> | |
|
||||
| [env](./kibana-plugin-server.plugininitializercontext.env.md) | <code>{`<p/>` mode: EnvironmentMode;`<p/>` }</code> | |
|
||||
| [logger](./kibana-plugin-server.plugininitializercontext.logger.md) | <code>LoggerFactory</code> | |
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginName](./kibana-plugin-server.pluginname.md)
|
||||
|
||||
## PluginName type
|
||||
|
||||
Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays that use it as a key or value more obvious.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare type PluginName = string;
|
||||
```
|
|
@ -0,0 +1,12 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md) > [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md)
|
||||
|
||||
## PluginSetupContext.elasticsearch property
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
elasticsearch: {
|
||||
adminClient$: Observable<ClusterClient>;
|
||||
dataClient$: Observable<ClusterClient>;
|
||||
};
|
||||
```
|
|
@ -0,0 +1,18 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [PluginSetupContext](./kibana-plugin-server.pluginsetupcontext.md)
|
||||
|
||||
## PluginSetupContext interface
|
||||
|
||||
Context passed to the plugins `setup` method.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginSetupContext
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md) | <code>{`<p/>` adminClient$: Observable<ClusterClient>;`<p/>` dataClient$: Observable<ClusterClient>;`<p/>` }</code> | |
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) > [callAsCurrentUser](./kibana-plugin-server.scopedclusterclient.callascurrentuser.md)
|
||||
|
||||
## ScopedClusterClient.callAsCurrentUser() method
|
||||
|
||||
Calls specified `endpoint` with provided `clientParams` on behalf of the user initiated request to the Kibana server (via HTTP request headers).
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
callAsCurrentUser(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions): Promise<unknown>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| endpoint | <code>string</code> | String descriptor of the endpoint e.g. <code>cluster.getSettings</code> or <code>ping</code>. |
|
||||
| clientParams | <code>Record<string, unknown></code> | A dictionary of parameters that will be passed directly to the Elasticsearch JS client. |
|
||||
| options | <code>CallAPIOptions</code> | Options that affect the way we call the API and process the result. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<unknown>`
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) > [callAsInternalUser](./kibana-plugin-server.scopedclusterclient.callasinternaluser.md)
|
||||
|
||||
## ScopedClusterClient.callAsInternalUser() method
|
||||
|
||||
Calls specified `endpoint` with provided `clientParams` on behalf of the Kibana internal user.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
callAsInternalUser(endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions): Promise<unknown>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| endpoint | <code>string</code> | String descriptor of the endpoint e.g. <code>cluster.getSettings</code> or <code>ping</code>. |
|
||||
| clientParams | <code>Record<string, unknown></code> | A dictionary of parameters that will be passed directly to the Elasticsearch JS client. |
|
||||
| options | <code>CallAPIOptions</code> | Options that affect the way we call the API and process the result. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<unknown>`
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md)
|
||||
|
||||
## ScopedClusterClient class
|
||||
|
||||
Serves the same purpose as "normal" `ClusterClient` but exposes additional `callAsCurrentUser` method that doesn't use credentials of the Kibana internal user (as `callAsInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class ScopedClusterClient
|
||||
```
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [callAsCurrentUser(endpoint, clientParams, options)](./kibana-plugin-server.scopedclusterclient.callascurrentuser.md) | | Calls specified <code>endpoint</code> with provided <code>clientParams</code> on behalf of the user initiated request to the Kibana server (via HTTP request headers). |
|
||||
| [callAsInternalUser(endpoint, clientParams, options)](./kibana-plugin-server.scopedclusterclient.callasinternaluser.md) | | Calls specified <code>endpoint</code> with provided <code>clientParams</code> on behalf of the Kibana internal user. |
|
||||
|
5
kibana.d.ts
vendored
5
kibana.d.ts
vendored
|
@ -20,7 +20,10 @@
|
|||
/**
|
||||
* All exports from TS source files (where the implementation is actually done in TS).
|
||||
*/
|
||||
export { Public, Server } from 'src/core';
|
||||
import * as Public from 'target/types/public';
|
||||
import * as Server from 'target/types/server';
|
||||
|
||||
export { Public, Server };
|
||||
|
||||
/**
|
||||
* All exports from TS ambient definitions (where types are added for JS source in a .d.ts file).
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"version": "7.1.0",
|
||||
"branch": "7.x",
|
||||
"types": "./kibana.d.ts",
|
||||
"tsdocMetadata": "./build/tsdoc-metadata.json",
|
||||
"build": {
|
||||
"number": 8467,
|
||||
"sha": "6cb7fec4e154faa0a4a3fee4b33dfef91b9870d9"
|
||||
|
@ -67,7 +68,8 @@
|
|||
"uiFramework:createComponent": "cd packages/kbn-ui-framework && yarn createComponent",
|
||||
"uiFramework:documentComponent": "cd packages/kbn-ui-framework && yarn documentComponent",
|
||||
"kbn:watch": "node scripts/kibana --dev --logging.json=false",
|
||||
"kbn:bootstrap": "node scripts/register_git_hook"
|
||||
"build:types": "tsc --p tsconfig.types.json",
|
||||
"kbn:bootstrap": "yarn build:types && node scripts/register_git_hook"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -259,6 +261,8 @@
|
|||
"@kbn/expect": "1.0.0",
|
||||
"@kbn/plugin-generator": "1.0.0",
|
||||
"@kbn/test": "1.0.0",
|
||||
"@microsoft/api-documenter": "7.0.41",
|
||||
"@microsoft/api-extractor": "7.0.31",
|
||||
"@octokit/rest": "^15.10.0",
|
||||
"@types/angular": "1.6.50",
|
||||
"@types/angular-mocks": "^1.7.0",
|
||||
|
|
21
scripts/check_core_api_changes.js
Normal file
21
scripts/check_core_api_changes.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/dev/run_check_core_api_changes');
|
|
@ -16,7 +16,6 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import * as Public from './public';
|
||||
import * as Server from './server';
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue