diff --git a/docs/development/core/public/kibana-plugin-public.basepathsetup.md b/docs/development/core/public/kibana-plugin-public.basepathsetup.md new file mode 100644 index 00000000000000..ad6b1e9921f90c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.basepathsetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [BasePathSetup](./kibana-plugin-public.basepathsetup.md) + +## BasePathSetup type + + +Signature: + +```typescript +export declare type BasePathSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromebrand.logo.md b/docs/development/core/public/kibana-plugin-public.chromebrand.logo.md new file mode 100644 index 00000000000000..3f04de76731d01 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebrand.logo.md @@ -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 + +Signature: + +```typescript +logo?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromebrand.md b/docs/development/core/public/kibana-plugin-public.chromebrand.md new file mode 100644 index 00000000000000..9960fb0b6460a7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebrand.md @@ -0,0 +1,18 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBrand](./kibana-plugin-public.chromebrand.md) + +## ChromeBrand interface + + +Signature: + +```typescript +export interface ChromeBrand +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [logo](./kibana-plugin-public.chromebrand.logo.md) | string | | +| [smallLogo](./kibana-plugin-public.chromebrand.smalllogo.md) | string | | + diff --git a/docs/development/core/public/kibana-plugin-public.chromebrand.smalllogo.md b/docs/development/core/public/kibana-plugin-public.chromebrand.smalllogo.md new file mode 100644 index 00000000000000..2b79659481c137 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebrand.smalllogo.md @@ -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 + +Signature: + +```typescript +smallLogo?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.data-test-subj.md b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.data-test-subj.md new file mode 100644 index 00000000000000..1f37f92eed7558 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.data-test-subj.md @@ -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 + +Signature: + +```typescript +'data-test-subj'?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.href.md b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.href.md new file mode 100644 index 00000000000000..cac3f9fd6729a3 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.href.md @@ -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 + +Signature: + +```typescript +href?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.md b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.md new file mode 100644 index 00000000000000..d900336f381407 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.md @@ -0,0 +1,19 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) + +## ChromeBreadcrumb interface + + +Signature: + +```typescript +export interface ChromeBreadcrumb +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [data-test-subj](./kibana-plugin-public.chromebreadcrumb.data-test-subj.md) | string | | +| [href](./kibana-plugin-public.chromebreadcrumb.href.md) | string | | +| [text](./kibana-plugin-public.chromebreadcrumb.text.md) | string | | + diff --git a/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.text.md b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.text.md new file mode 100644 index 00000000000000..c85a53f2f4af50 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromebreadcrumb.text.md @@ -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 + +Signature: + +```typescript +text: string; +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromehelpextension.md b/docs/development/core/public/kibana-plugin-public.chromehelpextension.md new file mode 100644 index 00000000000000..6945ddb08b4bd8 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromehelpextension.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) + +## ChromeHelpExtension type + + +Signature: + +```typescript +export declare type ChromeHelpExtension = (element: HTMLDivElement) => (() => void); +``` diff --git a/docs/development/core/public/kibana-plugin-public.chromesetup.md b/docs/development/core/public/kibana-plugin-public.chromesetup.md new file mode 100644 index 00000000000000..6297ca2a0a4b7f --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.chromesetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ChromeSetup](./kibana-plugin-public.chromesetup.md) + +## ChromeSetup type + + +Signature: + +```typescript +export declare type ChromeSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.basepath.md b/docs/development/core/public/kibana-plugin-public.coresetup.basepath.md new file mode 100644 index 00000000000000..6aac0337e73d23 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.basepath.md @@ -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 + +Signature: + +```typescript +basePath: BasePathSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.chrome.md b/docs/development/core/public/kibana-plugin-public.coresetup.chrome.md new file mode 100644 index 00000000000000..0842021b11788a --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.chrome.md @@ -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 + +Signature: + +```typescript +chrome: ChromeSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.fatalerrors.md b/docs/development/core/public/kibana-plugin-public.coresetup.fatalerrors.md new file mode 100644 index 00000000000000..06f685dd0769be --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.fatalerrors.md @@ -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 + +Signature: + +```typescript +fatalErrors: FatalErrorsSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.http.md b/docs/development/core/public/kibana-plugin-public.coresetup.http.md new file mode 100644 index 00000000000000..c52e3dc00c980c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.http.md @@ -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 + +Signature: + +```typescript +http: HttpSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.i18n.md b/docs/development/core/public/kibana-plugin-public.coresetup.i18n.md new file mode 100644 index 00000000000000..8a463c92cfd9fa --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.i18n.md @@ -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 + +Signature: + +```typescript +i18n: I18nSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.injectedmetadata.md b/docs/development/core/public/kibana-plugin-public.coresetup.injectedmetadata.md new file mode 100644 index 00000000000000..87d0d8578f3deb --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.injectedmetadata.md @@ -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 + +Signature: + +```typescript +injectedMetadata: InjectedMetadataSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.md b/docs/development/core/public/kibana-plugin-public.coresetup.md new file mode 100644 index 00000000000000..eab2f5ea642997 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.md @@ -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 + +Signature: + +```typescript +export interface CoreSetup +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [basePath](./kibana-plugin-public.coresetup.basepath.md) | BasePathSetup | | +| [chrome](./kibana-plugin-public.coresetup.chrome.md) | ChromeSetup | | +| [fatalErrors](./kibana-plugin-public.coresetup.fatalerrors.md) | FatalErrorsSetup | | +| [http](./kibana-plugin-public.coresetup.http.md) | HttpSetup | | +| [i18n](./kibana-plugin-public.coresetup.i18n.md) | I18nSetup | | +| [injectedMetadata](./kibana-plugin-public.coresetup.injectedmetadata.md) | InjectedMetadataSetup | | +| [notifications](./kibana-plugin-public.coresetup.notifications.md) | NotificationsSetup | | +| [uiSettings](./kibana-plugin-public.coresetup.uisettings.md) | UiSettingsSetup | | + diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.notifications.md b/docs/development/core/public/kibana-plugin-public.coresetup.notifications.md new file mode 100644 index 00000000000000..a7f36bca46356b --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.notifications.md @@ -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 + +Signature: + +```typescript +notifications: NotificationsSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.coresetup.uisettings.md b/docs/development/core/public/kibana-plugin-public.coresetup.uisettings.md new file mode 100644 index 00000000000000..5c6ca3886ff47b --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.coresetup.uisettings.md @@ -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 + +Signature: + +```typescript +uiSettings: UiSettingsSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.fatalerrorssetup.md b/docs/development/core/public/kibana-plugin-public.fatalerrorssetup.md new file mode 100644 index 00000000000000..5159f9e9499c86 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.fatalerrorssetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) + +## FatalErrorsSetup type + + +Signature: + +```typescript +export declare type FatalErrorsSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.httpsetup.md b/docs/development/core/public/kibana-plugin-public.httpsetup.md new file mode 100644 index 00000000000000..a458aab3e8b083 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.httpsetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [HttpSetup](./kibana-plugin-public.httpsetup.md) + +## HttpSetup type + + +Signature: + +```typescript +export declare type HttpSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.i18nsetup.md b/docs/development/core/public/kibana-plugin-public.i18nsetup.md new file mode 100644 index 00000000000000..7df40cc6324cfe --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.i18nsetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [I18nSetup](./kibana-plugin-public.i18nsetup.md) + +## I18nSetup type + + +Signature: + +```typescript +export declare type I18nSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.injectedmetadatasetup.md b/docs/development/core/public/kibana-plugin-public.injectedmetadatasetup.md new file mode 100644 index 00000000000000..094d0e2a15a4dc --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.injectedmetadatasetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md) + +## InjectedMetadataSetup type + + +Signature: + +```typescript +export declare type InjectedMetadataSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.md b/docs/development/core/public/kibana-plugin-public.md new file mode 100644 index 00000000000000..3fe9e692c134ce --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.md @@ -0,0 +1,35 @@ +[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 | +| [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) | | +| [ToastInput](./kibana-plugin-public.toastinput.md) | | +| [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md) | | + diff --git a/docs/development/core/public/kibana-plugin-public.notificationssetup.md b/docs/development/core/public/kibana-plugin-public.notificationssetup.md new file mode 100644 index 00000000000000..f0afc34b3e3c2b --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.notificationssetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) + +## NotificationsSetup type + + +Signature: + +```typescript +export declare type NotificationsSetup = ReturnType; +``` diff --git a/docs/development/core/public/kibana-plugin-public.toastinput.md b/docs/development/core/public/kibana-plugin-public.toastinput.md new file mode 100644 index 00000000000000..e4c2ebc999c956 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastinput.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastInput](./kibana-plugin-public.toastinput.md) + +## ToastInput type + + +Signature: + +```typescript +export declare type ToastInput = string | Pick>; +``` diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.add.md b/docs/development/core/public/kibana-plugin-public.toastssetup.add.md new file mode 100644 index 00000000000000..997b6ba2ad0e62 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.add.md @@ -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 + +Signature: + +```typescript +add(toastOrTitle: ToastInput): Toast; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| toastOrTitle | ToastInput | | + +Returns: + +`Toast` + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.adddanger.md b/docs/development/core/public/kibana-plugin-public.toastssetup.adddanger.md new file mode 100644 index 00000000000000..d1aaf7de08df6f --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.adddanger.md @@ -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 + +Signature: + +```typescript +addDanger(toastOrTitle: ToastInput): Toast; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| toastOrTitle | ToastInput | | + +Returns: + +`Toast` + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.addsuccess.md b/docs/development/core/public/kibana-plugin-public.toastssetup.addsuccess.md new file mode 100644 index 00000000000000..6c6a969b925c55 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.addsuccess.md @@ -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 + +Signature: + +```typescript +addSuccess(toastOrTitle: ToastInput): Toast; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| toastOrTitle | ToastInput | | + +Returns: + +`Toast` + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.addwarning.md b/docs/development/core/public/kibana-plugin-public.toastssetup.addwarning.md new file mode 100644 index 00000000000000..ff82e2fe602b21 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.addwarning.md @@ -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 + +Signature: + +```typescript +addWarning(toastOrTitle: ToastInput): Toast; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| toastOrTitle | ToastInput | | + +Returns: + +`Toast` + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.get$.md b/docs/development/core/public/kibana-plugin-public.toastssetup.get$.md new file mode 100644 index 00000000000000..72e12d342dd7fd --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.get$.md @@ -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 + +Signature: + +```typescript +get$(): Rx.Observable; +``` +Returns: + +`Rx.Observable` + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.md b/docs/development/core/public/kibana-plugin-public.toastssetup.md new file mode 100644 index 00000000000000..9f297a08ae91a3 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.toastssetup.md @@ -0,0 +1,22 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [ToastsSetup](./kibana-plugin-public.toastssetup.md) + +## ToastsSetup class + + +Signature: + +```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) | | | + diff --git a/docs/development/core/public/kibana-plugin-public.toastssetup.remove.md b/docs/development/core/public/kibana-plugin-public.toastssetup.remove.md new file mode 100644 index 00000000000000..8cf7d54b167da9 --- /dev/null +++ b/docs/development/core/public/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 + +Signature: + +```typescript +remove(toast: Toast): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| toast | Toast | | + +Returns: + +`void` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.get$.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.get$.md new file mode 100644 index 00000000000000..43c0bcd8908771 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.get$.md @@ -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() + +Signature: + +```typescript +get$(key: string, defaultOverride?: any): Rx.Observable; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | +| defaultOverride | any | | + +Returns: + +`Rx.Observable` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.get.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.get.md new file mode 100644 index 00000000000000..90a6d438c5d2d0 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.get.md @@ -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. + +Signature: + +```typescript +get(key: string, defaultOverride?: any): any; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | +| defaultOverride | any | | + +Returns: + +`any` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.getall.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getall.md new file mode 100644 index 00000000000000..32be8e5085906f --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getall.md @@ -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. + +Signature: + +```typescript +getAll(): UiSettingsState; +``` +Returns: + +`UiSettingsState` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.getsaved$.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getsaved$.md new file mode 100644 index 00000000000000..406c29bd407ed7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getsaved$.md @@ -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. + +Signature: + +```typescript +getSaved$(): Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>; +``` +Returns: + +`Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.getupdate$.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getupdate$.md new file mode 100644 index 00000000000000..1e3ff5058e60a1 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.getupdate$.md @@ -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. + +Signature: + +```typescript +getUpdate$(): Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>; +``` +Returns: + +`Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.iscustom.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.iscustom.md new file mode 100644 index 00000000000000..768033287f8348 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.iscustom.md @@ -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 + +Signature: + +```typescript +isCustom(key: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | + +Returns: + +`boolean` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdeclared.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdeclared.md new file mode 100644 index 00000000000000..4e2c58df5c6c20 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdeclared.md @@ -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. + +Signature: + +```typescript +isDeclared(key: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | + +Returns: + +`boolean` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdefault.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdefault.md new file mode 100644 index 00000000000000..badc7274c66466 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isdefault.md @@ -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 + +Signature: + +```typescript +isDefault(key: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | + +Returns: + +`boolean` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.isoverridden.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isoverridden.md new file mode 100644 index 00000000000000..9ab6410f3de2d4 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.isoverridden.md @@ -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()`. + +Signature: + +```typescript +isOverridden(key: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | + +Returns: + +`boolean` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.md new file mode 100644 index 00000000000000..7a0a635ab653e9 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.md @@ -0,0 +1,35 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) + +## UiSettingsClient class + + +Signature: + +```typescript +export declare class UiSettingsClient +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [params](./kibana-plugin-public.uisettingsclient.params.md) | | UiSettingsClientParams | | + +## 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 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. | +| [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 defaultOverride 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 set(), 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 set() 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 set() or remove(). | +| [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 set(key, null), 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 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. | +| [stop()](./kibana-plugin-public.uisettingsclient.stop.md) | | Prepares the uiSettingsClient to be discarded, completing any update$ observables that have been created. | + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.overridelocaldefault.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.overridelocaldefault.md new file mode 100644 index 00000000000000..f0989b8059facb --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.overridelocaldefault.md @@ -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. + +Signature: + +```typescript +overrideLocalDefault(key: string, newDefault: any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | +| newDefault | any | | + +Returns: + +`void` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.params.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.params.md new file mode 100644 index 00000000000000..4aabae2e131d9d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.params.md @@ -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 + +Signature: + +```typescript +readonly params: UiSettingsClientParams; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.remove.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.remove.md new file mode 100644 index 00000000000000..d0af026bb9e15b --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.remove.md @@ -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. + +Signature: + +```typescript +remove(key: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | + +Returns: + +`Promise` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.set.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.set.md new file mode 100644 index 00000000000000..ae570dff4aa700 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.set.md @@ -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. + +Signature: + +```typescript +set(key: string, val: any): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| key | string | | +| val | any | | + +Returns: + +`Promise` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsclient.stop.md b/docs/development/core/public/kibana-plugin-public.uisettingsclient.stop.md new file mode 100644 index 00000000000000..777d24f9e7e612 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsclient.stop.md @@ -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. + +Signature: + +```typescript +stop(): void; +``` +Returns: + +`void` + diff --git a/docs/development/core/public/kibana-plugin-public.uisettingssetup.md b/docs/development/core/public/kibana-plugin-public.uisettingssetup.md new file mode 100644 index 00000000000000..e8bcec00b23d8d --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingssetup.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsSetup](./kibana-plugin-public.uisettingssetup.md) + +## UiSettingsSetup type + + +Signature: + +```typescript +export declare type UiSettingsSetup = UiSettingsClient; +``` diff --git a/docs/development/core/public/kibana-plugin-public.uisettingsstate.md b/docs/development/core/public/kibana-plugin-public.uisettingsstate.md new file mode 100644 index 00000000000000..da95a01d0ab578 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.uisettingsstate.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [UiSettingsState](./kibana-plugin-public.uisettingsstate.md) + +## UiSettingsState interface + + +Signature: + +```typescript +export interface UiSettingsState +``` diff --git a/docs/development/core/server/kibana-plugin-server.apicaller.md b/docs/development/core/server/kibana-plugin-server.apicaller.md new file mode 100644 index 00000000000000..177bce7d622c23 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.apicaller.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [APICaller](./kibana-plugin-server.apicaller.md) + +## APICaller type + + +Signature: + +```typescript +export declare type APICaller = (endpoint: string, clientParams: Record, options?: CallAPIOptions) => Promise; +``` diff --git a/docs/development/core/server/kibana-plugin-server.callapioptions.md b/docs/development/core/server/kibana-plugin-server.callapioptions.md new file mode 100644 index 00000000000000..8936b4f4af8536 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.callapioptions.md @@ -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. + +Signature: + +```typescript +export interface CallAPIOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [wrap401Errors](./kibana-plugin-server.callapioptions.wrap401errors.md) | boolean | 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. | + diff --git a/docs/development/core/server/kibana-plugin-server.callapioptions.wrap401errors.md b/docs/development/core/server/kibana-plugin-server.callapioptions.wrap401errors.md new file mode 100644 index 00000000000000..e307dfb5e2bdbc --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.callapioptions.wrap401errors.md @@ -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`. + +Signature: + +```typescript +wrap401Errors: boolean; +``` diff --git a/docs/development/core/server/kibana-plugin-server.clusterclient.asscoped.md b/docs/development/core/server/kibana-plugin-server.clusterclient.asscoped.md new file mode 100644 index 00000000000000..75f73069de3c49 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.clusterclient.asscoped.md @@ -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. + +Signature: + +```typescript +asScoped(req?: { + headers?: Headers; + }): ScopedClusterClient; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| req | {`

` headers?: Headers;`

` } | Request the ScopedClusterClient instance will be scoped to. | + +Returns: + +`ScopedClusterClient` + diff --git a/docs/development/core/server/kibana-plugin-server.clusterclient.callasinternaluser.md b/docs/development/core/server/kibana-plugin-server.clusterclient.callasinternaluser.md new file mode 100644 index 00000000000000..b593c6c8012609 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.clusterclient.callasinternaluser.md @@ -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. + +Signature: + +```typescript +callAsInternalUser: (endpoint: string, clientParams?: Record, options?: CallAPIOptions | undefined) => Promise; +``` diff --git a/docs/development/core/server/kibana-plugin-server.clusterclient.close.md b/docs/development/core/server/kibana-plugin-server.clusterclient.close.md new file mode 100644 index 00000000000000..5218adf8d33f0d --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.clusterclient.close.md @@ -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. + +Signature: + +```typescript +close(): void; +``` +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.clusterclient.md b/docs/development/core/server/kibana-plugin-server.clusterclient.md new file mode 100644 index 00000000000000..ab52e5b7284747 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.clusterclient.md @@ -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(...)`). + +Signature: + +```typescript +export declare class ClusterClient +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [callAsInternalUser](./kibana-plugin-server.clusterclient.callasinternaluser.md) | | (endpoint: string, clientParams?: Record<string, unknown>, options?: CallAPIOptions | undefined) => Promise<any> | 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 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. | +| [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. | + diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.elasticsearch.md b/docs/development/core/server/kibana-plugin-server.coresetup.elasticsearch.md new file mode 100644 index 00000000000000..49123927ebf686 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.coresetup.elasticsearch.md @@ -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 + +Signature: + +```typescript +elasticsearch: ElasticsearchServiceSetup; +``` diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.http.md b/docs/development/core/server/kibana-plugin-server.coresetup.http.md new file mode 100644 index 00000000000000..7a667bf6b6f28f --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.coresetup.http.md @@ -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 + +Signature: + +```typescript +http: HttpServiceSetup; +``` diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.md b/docs/development/core/server/kibana-plugin-server.coresetup.md new file mode 100644 index 00000000000000..0582648f55a815 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.coresetup.md @@ -0,0 +1,19 @@ +[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [CoreSetup](./kibana-plugin-server.coresetup.md) + +## CoreSetup interface + + +Signature: + +```typescript +export interface CoreSetup +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [elasticsearch](./kibana-plugin-server.coresetup.elasticsearch.md) | ElasticsearchServiceSetup | | +| [http](./kibana-plugin-server.coresetup.http.md) | HttpServiceSetup | | +| [plugins](./kibana-plugin-server.coresetup.plugins.md) | PluginsServiceSetup | | + diff --git a/docs/development/core/server/kibana-plugin-server.coresetup.plugins.md b/docs/development/core/server/kibana-plugin-server.coresetup.plugins.md new file mode 100644 index 00000000000000..4d5f73d00dd860 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.coresetup.plugins.md @@ -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 + +Signature: + +```typescript +plugins: PluginsServiceSetup; +``` diff --git a/docs/development/core/server/kibana-plugin-server.elasticsearchclientconfig.md b/docs/development/core/server/kibana-plugin-server.elasticsearchclientconfig.md new file mode 100644 index 00000000000000..065b47fd828418 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.elasticsearchclientconfig.md @@ -0,0 +1,14 @@ +[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) + +## ElasticsearchClientConfig type + +Signature: + +```typescript +export declare type ElasticsearchClientConfig = Pick & Pick & { + pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout']; + requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout']; + sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval']; + ssl?: Partial; +}; +``` diff --git a/docs/development/core/server/kibana-plugin-server.headers.md b/docs/development/core/server/kibana-plugin-server.headers.md new file mode 100644 index 00000000000000..f4f748569f007d --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.headers.md @@ -0,0 +1,10 @@ +[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [Headers](./kibana-plugin-server.headers.md) + +## Headers type + + +Signature: + +```typescript +export declare type Headers = Record; +``` diff --git a/docs/development/core/server/kibana-plugin-server.logger.debug.md b/docs/development/core/server/kibana-plugin-server.logger.debug.md new file mode 100644 index 00000000000000..7d731da2240ee0 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.debug.md @@ -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 + +Signature: + +```typescript +debug(message: string, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| message | string | The log message | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.logger.error.md b/docs/development/core/server/kibana-plugin-server.logger.error.md new file mode 100644 index 00000000000000..e95d452d69f8cd --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.error.md @@ -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 + +Signature: + +```typescript +error(errorOrMessage: string | Error, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| errorOrMessage | string | Error | An Error object or message string to log | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.logger.fatal.md b/docs/development/core/server/kibana-plugin-server.logger.fatal.md new file mode 100644 index 00000000000000..b59ea300b49790 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.fatal.md @@ -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 + +Signature: + +```typescript +fatal(errorOrMessage: string | Error, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| errorOrMessage | string | Error | An Error object or message string to log | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.logger.info.md b/docs/development/core/server/kibana-plugin-server.logger.info.md new file mode 100644 index 00000000000000..8819f5282f16db --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.info.md @@ -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 + +Signature: + +```typescript +info(message: string, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| message | string | The log message | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.logger.md b/docs/development/core/server/kibana-plugin-server.logger.md new file mode 100644 index 00000000000000..05df16accfb450 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.md @@ -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. + +Signature: + +```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 | + diff --git a/docs/development/core/server/kibana-plugin-server.logger.trace.md b/docs/development/core/server/kibana-plugin-server.logger.trace.md new file mode 100644 index 00000000000000..06542032daf803 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.trace.md @@ -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 + +Signature: + +```typescript +trace(message: string, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| message | string | The log message | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.logger.warn.md b/docs/development/core/server/kibana-plugin-server.logger.warn.md new file mode 100644 index 00000000000000..690d8ec5ad96d8 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logger.warn.md @@ -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 + +Signature: + +```typescript +warn(errorOrMessage: string | Error, meta?: LogMeta): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| errorOrMessage | string | Error | An Error object or message string to log | +| meta | LogMeta | | + +Returns: + +`void` + diff --git a/docs/development/core/server/kibana-plugin-server.loggerfactory.get.md b/docs/development/core/server/kibana-plugin-server.loggerfactory.get.md new file mode 100644 index 00000000000000..0d46467594c4ee --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.loggerfactory.get.md @@ -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. + +Signature: + +```typescript +get(...contextParts: string[]): Logger; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| contextParts | string[] | Parts of the context to return logger for. For example get('plugins', 'pid') will return a logger for the plugins.pid context. | + +Returns: + +`Logger` + diff --git a/docs/development/core/server/kibana-plugin-server.loggerfactory.md b/docs/development/core/server/kibana-plugin-server.loggerfactory.md new file mode 100644 index 00000000000000..cd9a18ad2ed89d --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.loggerfactory.md @@ -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. + +Signature: + +```typescript +export interface LoggerFactory +``` + +## Methods + +| Method | Description | +| --- | --- | +| [get(contextParts)](./kibana-plugin-server.loggerfactory.get.md) | Returns a Logger instance for the specified context. | + diff --git a/docs/development/core/server/kibana-plugin-server.logmeta.md b/docs/development/core/server/kibana-plugin-server.logmeta.md new file mode 100644 index 00000000000000..6dcbb4b6291afd --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.logmeta.md @@ -0,0 +1,11 @@ +[Home](./index) > [kibana-plugin-server](./kibana-plugin-server.md) > [LogMeta](./kibana-plugin-server.logmeta.md) + +## LogMeta interface + +Contextual metadata + +Signature: + +```typescript +export interface LogMeta +``` diff --git a/docs/development/core/server/kibana-plugin-server.md b/docs/development/core/server/kibana-plugin-server.md new file mode 100644 index 00000000000000..b1066bff9a1dde --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.md @@ -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 asScoped(...)). | +| [ScopedClusterClient](./kibana-plugin-server.scopedclusterclient.md) | 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 | + +## 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 LoggerFactory 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 setup 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. | + diff --git a/docs/development/core/server/kibana-plugin-server.plugininitializercontext.config.md b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.config.md new file mode 100644 index 00000000000000..ebad1d465034be --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.config.md @@ -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 + +Signature: + +```typescript +config: { + create: , Config>(ConfigClass: ConfigWithSchema) => Observable; + createIfExists: , Config>(ConfigClass: ConfigWithSchema) => Observable; + }; +``` diff --git a/docs/development/core/server/kibana-plugin-server.plugininitializercontext.env.md b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.env.md new file mode 100644 index 00000000000000..f3cbfa2c88a7f1 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.env.md @@ -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 + +Signature: + +```typescript +env: { + mode: EnvironmentMode; + }; +``` diff --git a/docs/development/core/server/kibana-plugin-server.plugininitializercontext.logger.md b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.logger.md new file mode 100644 index 00000000000000..aeb62bcf490e50 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.logger.md @@ -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 + +Signature: + +```typescript +logger: LoggerFactory; +``` diff --git a/docs/development/core/server/kibana-plugin-server.plugininitializercontext.md b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.md new file mode 100644 index 00000000000000..f59fd0fb37de19 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.plugininitializercontext.md @@ -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. + +Signature: + +```typescript +export interface PluginInitializerContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [config](./kibana-plugin-server.plugininitializercontext.config.md) | {`

` 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>;`

` } | | +| [env](./kibana-plugin-server.plugininitializercontext.env.md) | {`

` mode: EnvironmentMode;`

` } | | +| [logger](./kibana-plugin-server.plugininitializercontext.logger.md) | LoggerFactory | | + diff --git a/docs/development/core/server/kibana-plugin-server.pluginname.md b/docs/development/core/server/kibana-plugin-server.pluginname.md new file mode 100644 index 00000000000000..043e87ee99f411 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.pluginname.md @@ -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. + +Signature: + +```typescript +export declare type PluginName = string; +``` diff --git a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.elasticsearch.md b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.elasticsearch.md new file mode 100644 index 00000000000000..3ec1c11c21224f --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.elasticsearch.md @@ -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 + +Signature: + +```typescript +elasticsearch: { + adminClient$: Observable; + dataClient$: Observable; + }; +``` diff --git a/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md new file mode 100644 index 00000000000000..6a4e1e16352aa3 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md @@ -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. + +Signature: + +```typescript +export interface PluginSetupContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [elasticsearch](./kibana-plugin-server.pluginsetupcontext.elasticsearch.md) | {`

` adminClient$: Observable<ClusterClient>;`

` dataClient$: Observable<ClusterClient>;`

` } | | + diff --git a/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callascurrentuser.md b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callascurrentuser.md new file mode 100644 index 00000000000000..6e43950fd9c8c0 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callascurrentuser.md @@ -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). + +Signature: + +```typescript +callAsCurrentUser(endpoint: string, clientParams?: Record, options?: CallAPIOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| endpoint | string | String descriptor of the endpoint e.g. cluster.getSettings or ping. | +| clientParams | Record<string, unknown> | A dictionary of parameters that will be passed directly to the Elasticsearch JS client. | +| options | CallAPIOptions | Options that affect the way we call the API and process the result. | + +Returns: + +`Promise` + diff --git a/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callasinternaluser.md b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callasinternaluser.md new file mode 100644 index 00000000000000..68373c3978b7a2 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.callasinternaluser.md @@ -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. + +Signature: + +```typescript +callAsInternalUser(endpoint: string, clientParams?: Record, options?: CallAPIOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| endpoint | string | String descriptor of the endpoint e.g. cluster.getSettings or ping. | +| clientParams | Record<string, unknown> | A dictionary of parameters that will be passed directly to the Elasticsearch JS client. | +| options | CallAPIOptions | Options that affect the way we call the API and process the result. | + +Returns: + +`Promise` + diff --git a/docs/development/core/server/kibana-plugin-server.scopedclusterclient.md b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.md new file mode 100644 index 00000000000000..e4070f18170684 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-server.scopedclusterclient.md @@ -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 + +Signature: + +```typescript +export declare class ScopedClusterClient +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [callAsCurrentUser(endpoint, clientParams, options)](./kibana-plugin-server.scopedclusterclient.callascurrentuser.md) | | Calls specified endpoint with provided clientParams 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 endpoint with provided clientParams on behalf of the Kibana internal user. | + diff --git a/kibana.d.ts b/kibana.d.ts index 10c6bdaa1efdf2..74890f1d70f4b5 100644 --- a/kibana.d.ts +++ b/kibana.d.ts @@ -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). diff --git a/package.json b/package.json index 32442ac2ce17cc..1969500b690ea2 100644 --- a/package.json +++ b/package.json @@ -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", @@ -258,6 +260,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", diff --git a/scripts/check_core_api_changes.js b/scripts/check_core_api_changes.js new file mode 100644 index 00000000000000..153491e0aecdaf --- /dev/null +++ b/scripts/check_core_api_changes.js @@ -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'); diff --git a/src/core/index.ts b/src/core/index.ts index 039faaff7d13b9..23db81469f5bc5 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ - import * as Public from './public'; import * as Server from './server'; diff --git a/src/core/public/base_path/base_path_service.ts b/src/core/public/base_path/base_path_service.ts index ddceaf13bfda8b..e2cb20da4609bf 100644 --- a/src/core/public/base_path/base_path_service.ts +++ b/src/core/public/base_path/base_path_service.ts @@ -24,6 +24,7 @@ interface Deps { injectedMetadata: InjectedMetadataSetup; } +/** @internal */ export class BasePathService { public setup({ injectedMetadata }: Deps) { const basePath = injectedMetadata.getBasePath() || ''; @@ -71,4 +72,5 @@ export class BasePathService { } } +/** @public */ export type BasePathSetup = ReturnType; diff --git a/src/core/public/chrome/chrome_service.ts b/src/core/public/chrome/chrome_service.ts index b6695ced2861b1..71dcd6b14f37e0 100644 --- a/src/core/public/chrome/chrome_service.ts +++ b/src/core/public/chrome/chrome_service.ts @@ -32,17 +32,20 @@ function isEmbedParamInHash() { return Boolean(query.embed); } +/** @public */ export interface ChromeBrand { logo?: string; smallLogo?: string; } +/** @public */ export interface ChromeBreadcrumb { text: string; href?: string; 'data-test-subj'?: string; } +/** @public */ export type ChromeHelpExtension = (element: HTMLDivElement) => (() => void); interface ConstructorParams { @@ -54,6 +57,7 @@ interface SetupDeps { notifications: NotificationsSetup; } +/** @internal */ export class ChromeService { private readonly stop$ = new Rx.ReplaySubject(1); private readonly browserSupportsCsp: boolean; @@ -202,4 +206,5 @@ export class ChromeService { } } +/** @public */ export type ChromeSetup = ReturnType; diff --git a/src/core/public/fatal_errors/fatal_errors_service.tsx b/src/core/public/fatal_errors/fatal_errors_service.tsx index 654549eb31753f..d0e9e11b3581f0 100644 --- a/src/core/public/fatal_errors/fatal_errors_service.tsx +++ b/src/core/public/fatal_errors/fatal_errors_service.tsx @@ -37,6 +37,7 @@ interface Deps { i18n: I18nSetup; } +/** @interal */ export class FatalErrorsService { private readonly errorInfo$ = new Rx.ReplaySubject(); private i18n?: I18nSetup; @@ -109,4 +110,5 @@ export class FatalErrorsService { } } +/** @public */ export type FatalErrorsSetup = ReturnType; diff --git a/src/core/public/http/http_service.ts b/src/core/public/http/http_service.ts index 90310f8936ade3..4121181cf80ec5 100644 --- a/src/core/public/http/http_service.ts +++ b/src/core/public/http/http_service.ts @@ -34,6 +34,7 @@ interface Deps { fatalErrors: FatalErrorsSetup; } +/** @internal */ export class HttpService { private readonly loadingCount$ = new Rx.BehaviorSubject(0); private readonly stop$ = new Rx.Subject(); @@ -83,4 +84,5 @@ export class HttpService { } } +/** @public */ export type HttpSetup = ReturnType; diff --git a/src/core/public/i18n/i18n_service.tsx b/src/core/public/i18n/i18n_service.tsx index 1955a012018d86..ed8ace7d66c2e4 100644 --- a/src/core/public/i18n/i18n_service.tsx +++ b/src/core/public/i18n/i18n_service.tsx @@ -25,6 +25,7 @@ import { I18nProvider } from '@kbn/i18n/react'; /** * Service that is responsible for i18n capabilities. + * @internal */ export class I18nService { public setup() { @@ -54,4 +55,5 @@ export class I18nService { } } +/** @public */ export type I18nSetup = ReturnType; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 94c6fa4e64b6d7..d057177fd8473e 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -26,8 +26,14 @@ import { InjectedMetadataParams, InjectedMetadataSetup } from './injected_metada import { NotificationsSetup, Toast, ToastInput, ToastsSetup } from './notifications'; import { UiSettingsClient, UiSettingsSetup, UiSettingsState } from './ui_settings'; +/** @interal */ export { CoreSystem } from './core_system'; +/** + * Core services exposed to the start lifecycle + * + * @public + */ export interface CoreSetup { i18n: I18nSetup; injectedMetadata: InjectedMetadataSetup; diff --git a/src/core/public/injected_metadata/injected_metadata_service.ts b/src/core/public/injected_metadata/injected_metadata_service.ts index ea546731f37b35..9245791cf6eaa6 100644 --- a/src/core/public/injected_metadata/injected_metadata_service.ts +++ b/src/core/public/injected_metadata/injected_metadata_service.ts @@ -22,6 +22,7 @@ import { DiscoveredPlugin, PluginName } from '../../server'; import { UiSettingsState } from '../ui_settings'; import { deepFreeze } from './deep_freeze'; +/** @internal */ export interface InjectedMetadataParams { injectedMetadata: { version: string; @@ -62,6 +63,8 @@ export interface InjectedMetadataParams { * server into the page. The metadata is actually defined * in the entry file for the bundle containing the new platform * and is read from the DOM in most cases. + * + * @internal */ export class InjectedMetadataService { private state = deepFreeze( @@ -111,4 +114,5 @@ export class InjectedMetadataService { } } +/** @public */ export type InjectedMetadataSetup = ReturnType; diff --git a/src/core/public/kibana.api.md b/src/core/public/kibana.api.md new file mode 100644 index 00000000000000..0178695356ceb8 --- /dev/null +++ b/src/core/public/kibana.api.md @@ -0,0 +1,220 @@ +## API Review File for "kibana" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { default } from 'react'; +import * as Rx from 'rxjs'; +import { Toast } from '@elastic/eui'; + +// Warning: (ae-forgotten-export) The symbol "BasePathService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type BasePathSetup = ReturnType; + +// @public (undocumented) +export interface ChromeBrand { + // (undocumented) + logo?: string; + // (undocumented) + smallLogo?: string; +} + +// @public (undocumented) +export interface ChromeBreadcrumb { + // (undocumented) + 'data-test-subj'?: string; + // (undocumented) + href?: string; + // (undocumented) + text: string; +} + +// @public (undocumented) +export type ChromeHelpExtension = (element: HTMLDivElement) => (() => void); + +// Warning: (ae-forgotten-export) The symbol "ChromeService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type ChromeSetup = ReturnType; + +// @public +export interface CoreSetup { + // (undocumented) + basePath: BasePathSetup; + // (undocumented) + chrome: ChromeSetup; + // (undocumented) + fatalErrors: FatalErrorsSetup; + // (undocumented) + http: HttpSetup; + // (undocumented) + i18n: I18nSetup; + // (undocumented) + injectedMetadata: InjectedMetadataSetup; + // (undocumented) + notifications: NotificationsSetup; + // (undocumented) + uiSettings: UiSettingsSetup; +} + +// Warning: (ae-internal-missing-underscore) The name CoreSystem should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal +export class CoreSystem { + // Warning: (ae-forgotten-export) The symbol "Params" needs to be exported by the entry point index.d.ts + // + // (undocumented) + constructor(params: Params); + // (undocumented) + setup(): { + fatalErrors: { + add: (error: string | Error, source?: string | undefined) => never; + get$: () => import("rxjs").Observable<{ + message: string; + stack: string | undefined; + }>; + }; + } | undefined; + // (undocumented) + stop(): void; + } + +// Warning: (ae-forgotten-export) The symbol "FatalErrorsService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type FatalErrorsSetup = ReturnType; + +// Warning: (ae-forgotten-export) The symbol "HttpService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type HttpSetup = ReturnType; + +// Warning: (ae-forgotten-export) The symbol "I18nService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type I18nSetup = ReturnType; + +// Warning: (ae-internal-missing-underscore) The name InjectedMetadataParams should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal (undocumented) +export interface InjectedMetadataParams { + // (undocumented) + injectedMetadata: { + version: string; + buildNumber: number; + basePath: string; + csp: { + warnLegacyBrowsers: boolean; + }; + vars: { + [key: string]: unknown; + }; + uiPlugins: Array<{ + id: PluginName; + plugin: DiscoveredPlugin; + }>; + legacyMetadata: { + app: unknown; + translations: unknown; + bundleId: string; + nav: unknown; + version: string; + branch: string; + buildNum: number; + buildSha: string; + basePath: string; + serverName: string; + devMode: boolean; + uiSettings: { + defaults: UiSettingsState; + user?: UiSettingsState; + }; + }; + }; +} + +// Warning: (ae-forgotten-export) The symbol "InjectedMetadataService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type InjectedMetadataSetup = ReturnType; + +// Warning: (ae-forgotten-export) The symbol "NotificationsService" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type NotificationsSetup = ReturnType; + +export { Toast } + +// @public (undocumented) +export type ToastInput = string | Pick>; + +// @public (undocumented) +export class ToastsSetup { + // (undocumented) + add(toastOrTitle: ToastInput): Toast; + // (undocumented) + addDanger(toastOrTitle: ToastInput): Toast; + // (undocumented) + addSuccess(toastOrTitle: ToastInput): Toast; + // (undocumented) + addWarning(toastOrTitle: ToastInput): Toast; + // (undocumented) + get$(): Rx.Observable; + // (undocumented) + remove(toast: Toast): void; + } + +// @public (undocumented) +export class UiSettingsClient { + // (undocumented) + constructor(params: UiSettingsClientParams); + get$(key: string, defaultOverride?: any): Rx.Observable; + get(key: string, defaultOverride?: any): any; + getAll(): UiSettingsState; + getSaved$(): Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>; + getUpdate$(): Rx.Observable<{ + key: string; + newValue: any; + oldValue: any; + }>; + isCustom(key: string): boolean; + isDeclared(key: string): boolean; + isDefault(key: string): boolean; + isOverridden(key: string): boolean; + overrideLocalDefault(key: string, newDefault: any): void; + // Warning: (ae-forgotten-export) The symbol "UiSettingsClientParams" needs to be exported by the entry point index.d.ts + // + // (undocumented) + readonly params: UiSettingsClientParams; + remove(key: string): Promise; + set(key: string, val: any): Promise; + stop(): void; + } + +// @public (undocumented) +export type UiSettingsSetup = UiSettingsClient; + +// @public (undocumented) +export interface UiSettingsState { + // Warning: (ae-forgotten-export) The symbol "InjectedUiSettingsDefault" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "InjectedUiSettingsUser" needs to be exported by the entry point index.d.ts + // + // (undocumented) + [key: string]: InjectedUiSettingsDefault & InjectedUiSettingsUser; +} + + +// Warnings were encountered during analysis: +// +// src/core/public/injected_metadata/injected_metadata_service.ts:38:9 - (ae-forgotten-export) The symbol "PluginName" needs to be exported by the entry point index.d.ts +// src/core/public/injected_metadata/injected_metadata_service.ts:39:9 - (ae-forgotten-export) The symbol "DiscoveredPlugin" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/src/core/public/notifications/notifications_service.ts b/src/core/public/notifications/notifications_service.ts index 3e36ca0552c387..263f898783adb3 100644 --- a/src/core/public/notifications/notifications_service.ts +++ b/src/core/public/notifications/notifications_service.ts @@ -20,27 +20,28 @@ import { I18nSetup } from '../i18n'; import { ToastsService } from './toasts'; -interface Params { +interface NotificationServiceParams { targetDomElement: HTMLElement; } -interface Deps { +interface NotificationsServiceDeps { i18n: I18nSetup; } +/** @public */ export class NotificationsService { private readonly toasts: ToastsService; private readonly toastsContainer: HTMLElement; - constructor(private readonly params: Params) { + constructor(private readonly params: NotificationServiceParams) { this.toastsContainer = document.createElement('div'); this.toasts = new ToastsService({ targetDomElement: this.toastsContainer, }); } - public setup({ i18n }: Deps) { + public setup({ i18n }: NotificationsServiceDeps) { this.params.targetDomElement.appendChild(this.toastsContainer); return { @@ -55,4 +56,5 @@ export class NotificationsService { } } +/** @public */ export type NotificationsSetup = ReturnType; diff --git a/src/core/public/notifications/toasts/toasts_start.tsx b/src/core/public/notifications/toasts/toasts_start.tsx index c8153f524da35f..28e77943724e9b 100644 --- a/src/core/public/notifications/toasts/toasts_start.tsx +++ b/src/core/public/notifications/toasts/toasts_start.tsx @@ -20,6 +20,7 @@ import { Toast } from '@elastic/eui'; import * as Rx from 'rxjs'; +/** @public */ export type ToastInput = string | Pick>; const normalizeToast = (toastOrTitle: ToastInput) => { @@ -32,6 +33,7 @@ const normalizeToast = (toastOrTitle: ToastInput) => { return toastOrTitle; }; +/** @public */ export class ToastsSetup { private toasts$ = new Rx.BehaviorSubject([]); private idCounter = 0; diff --git a/src/core/public/ui_settings/types.ts b/src/core/public/ui_settings/types.ts index 4fa4109c7bc262..271436c0e7fe0e 100644 --- a/src/core/public/ui_settings/types.ts +++ b/src/core/public/ui_settings/types.ts @@ -34,6 +34,7 @@ interface InjectedUiSettingsUser { isOverridden?: boolean; } +/** @public */ export interface UiSettingsState { [key: string]: InjectedUiSettingsDefault & InjectedUiSettingsUser; } diff --git a/src/core/public/ui_settings/ui_settings_client.ts b/src/core/public/ui_settings/ui_settings_client.ts index b996a25ca806be..983289afd49861 100644 --- a/src/core/public/ui_settings/ui_settings_client.ts +++ b/src/core/public/ui_settings/ui_settings_client.ts @@ -24,13 +24,15 @@ import { filter, map } from 'rxjs/operators'; import { UiSettingsState } from './types'; import { UiSettingsApi } from './ui_settings_api'; -interface Params { +/** @public */ +interface UiSettingsClientParams { api: UiSettingsApi; onUpdateError: UiSettingsClient['onUpdateError']; defaults: UiSettingsState; initialSettings?: UiSettingsState; } +/** @public */ export class UiSettingsClient { private readonly update$ = new Rx.Subject<{ key: string; newValue: any; oldValue: any }>(); private readonly saved$ = new Rx.Subject<{ key: string; newValue: any; oldValue: any }>(); @@ -40,7 +42,7 @@ export class UiSettingsClient { private readonly defaults: UiSettingsState; private cache: UiSettingsState; - constructor(readonly params: Params) { + constructor(readonly params: UiSettingsClientParams) { this.api = params.api; this.onUpdateError = params.onUpdateError; this.defaults = cloneDeep(params.defaults); diff --git a/src/core/public/ui_settings/ui_settings_service.ts b/src/core/public/ui_settings/ui_settings_service.ts index b7b7b64c06c8d3..8162da7e1f0c5e 100644 --- a/src/core/public/ui_settings/ui_settings_service.ts +++ b/src/core/public/ui_settings/ui_settings_service.ts @@ -27,18 +27,24 @@ import { UiSettingsClient } from './ui_settings_client'; import { i18n } from '@kbn/i18n'; -interface Deps { +interface UiSettingsServiceDeps { notifications: NotificationsSetup; http: HttpSetup; injectedMetadata: InjectedMetadataSetup; basePath: BasePathSetup; } +/** @internal */ export class UiSettingsService { private uiSettingsApi?: UiSettingsApi; private uiSettingsClient?: UiSettingsClient; - public setup({ notifications, http, injectedMetadata, basePath }: Deps): UiSettingsSetup { + public setup({ + notifications, + http, + injectedMetadata, + basePath, + }: UiSettingsServiceDeps): UiSettingsSetup { this.uiSettingsApi = new UiSettingsApi(basePath, injectedMetadata.getKibanaVersion()); http.addLoadingCount(this.uiSettingsApi.getLoadingCount$()); @@ -73,4 +79,5 @@ export class UiSettingsService { } } +/** @public */ export type UiSettingsSetup = UiSettingsClient; diff --git a/src/core/server/bootstrap.ts b/src/core/server/bootstrap.ts index 6441becc1a8ecc..766eb09032a9e6 100644 --- a/src/core/server/bootstrap.ts +++ b/src/core/server/bootstrap.ts @@ -48,9 +48,9 @@ interface BootstrapArgs { } /** - * @interal * - * @param options + * @internal + * @param param0 - options */ export async function bootstrap({ configs, diff --git a/src/core/server/elasticsearch/cluster_client.ts b/src/core/server/elasticsearch/cluster_client.ts index 76d7338983ecf6..917bb1b93e37f0 100644 --- a/src/core/server/elasticsearch/cluster_client.ts +++ b/src/core/server/elasticsearch/cluster_client.ts @@ -31,6 +31,8 @@ import { ScopedClusterClient } from './scoped_cluster_client'; /** * The set of options that defines how API call should be made and result be * processed. + * + * @public */ export interface CallAPIOptions { /** @@ -84,6 +86,8 @@ async function callAPI( * 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(...)`). + * + * @public */ export class ClusterClient { /** @@ -107,11 +111,11 @@ export class ClusterClient { } /** - * Calls specified {@param endpoint} with provided {@param clientParams} on behalf of the + * Calls specified endpoint with provided clientParams on behalf of the * Kibana internal user. - * @param endpoint String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. - * @param clientParams A dictionary of parameters that will be passed directly to the Elasticsearch JS client. - * @param options Options that affect the way we call the API and process the result. + * @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. + * @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client. + * @param options - Options that affect the way we call the API and process the result. */ public callAsInternalUser = async ( endpoint: string, @@ -143,10 +147,10 @@ export class ClusterClient { /** * Creates an instance of `ScopedClusterClient` based on the configuration the * current cluster client that exposes additional `callAsCurrentUser` method - * scoped to the provided {@param req}. Consumers shouldn't worry about closing + * 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. - * @param req Request the `ScopedClusterClient` instance will be scoped to. + * @param req - Request the `ScopedClusterClient` instance will be scoped to. */ public asScoped(req: { headers?: Headers } = {}) { // It'd have been quite expensive to create and configure client for every incoming @@ -172,11 +176,11 @@ export class ClusterClient { } /** - * Calls specified {@param endpoint} with provided {@param clientParams} on behalf of the + * Calls specified endpoint with provided clientParams on behalf of the * user initiated request to the Kibana server (via HTTP request headers). - * @param endpoint String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. - * @param clientParams A dictionary of parameters that will be passed directly to the Elasticsearch JS client. - * @param options Options that affect the way we call the API and process the result. + * @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. + * @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client. + * @param options - Options that affect the way we call the API and process the result. */ private callAsCurrentUser = async ( endpoint: string, diff --git a/src/core/server/elasticsearch/elasticsearch_client_config.ts b/src/core/server/elasticsearch/elasticsearch_client_config.ts index 5df2c32b7d3ba8..9fe56bf8c7e582 100644 --- a/src/core/server/elasticsearch/elasticsearch_client_config.ts +++ b/src/core/server/elasticsearch/elasticsearch_client_config.ts @@ -28,9 +28,11 @@ import { Logger } from '../logging'; import { ElasticsearchConfig } from './elasticsearch_config'; /** - * Config that consumers can pass to the Elasticsearch JS client is complex and includes + * @internalremarks Config that consumers can pass to the Elasticsearch JS client is complex and includes * not only entries from standard `elasticsearch.*` yaml config, but also some Elasticsearch JS * client specific options like `keepAlive` or `plugins` (that eventually will be deprecated). + * + * @public */ export type ElasticsearchClientConfig = Pick & Pick< diff --git a/src/core/server/elasticsearch/index.ts b/src/core/server/elasticsearch/index.ts index cc35c9b75e32c2..0f60864dcc5d82 100644 --- a/src/core/server/elasticsearch/index.ts +++ b/src/core/server/elasticsearch/index.ts @@ -19,3 +19,5 @@ export { ElasticsearchServiceSetup, ElasticsearchService } from './elasticsearch_service'; export { CallAPIOptions, ClusterClient } from './cluster_client'; +export { ScopedClusterClient, Headers, APICaller } from './scoped_cluster_client'; +export { ElasticsearchClientConfig } from './elasticsearch_client_config'; diff --git a/src/core/server/elasticsearch/scoped_cluster_client.ts b/src/core/server/elasticsearch/scoped_cluster_client.ts index 0d0922d80c9966..6e4075cbfaded5 100644 --- a/src/core/server/elasticsearch/scoped_cluster_client.ts +++ b/src/core/server/elasticsearch/scoped_cluster_client.ts @@ -20,7 +20,11 @@ import { Headers } from '../http/router'; import { CallAPIOptions } from './cluster_client'; -type APICaller = ( +/** @public */ +export { Headers }; + +/** @public */ +export type APICaller = ( endpoint: string, clientParams: Record, options?: CallAPIOptions @@ -31,6 +35,8 @@ type APICaller = ( * `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 + * + * @public */ export class ScopedClusterClient { constructor( @@ -40,11 +46,11 @@ export class ScopedClusterClient { ) {} /** - * Calls specified {@param endpoint} with provided {@param clientParams} on behalf of the + * Calls specified `endpoint` with provided `clientParams` on behalf of the * Kibana internal user. - * @param endpoint String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. - * @param clientParams A dictionary of parameters that will be passed directly to the Elasticsearch JS client. - * @param options Options that affect the way we call the API and process the result. + * @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. + * @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client. + * @param options - Options that affect the way we call the API and process the result. */ public callAsInternalUser( endpoint: string, @@ -55,11 +61,11 @@ export class ScopedClusterClient { } /** - * Calls specified {@param endpoint} with provided {@param clientParams} on behalf of the + * Calls specified `endpoint` with provided `clientParams` on behalf of the * user initiated request to the Kibana server (via HTTP request headers). - * @param endpoint String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. - * @param clientParams A dictionary of parameters that will be passed directly to the Elasticsearch JS client. - * @param options Options that affect the way we call the API and process the result. + * @param endpoint - String descriptor of the endpoint e.g. `cluster.getSettings` or `ping`. + * @param clientParams - A dictionary of parameters that will be passed directly to the Elasticsearch JS client. + * @param options - Options that affect the way we call the API and process the result. */ public callAsCurrentUser( endpoint: string, diff --git a/src/core/server/http/router/headers.ts b/src/core/server/http/router/headers.ts index bed1a65c078907..d578542d7a9ceb 100644 --- a/src/core/server/http/router/headers.ts +++ b/src/core/server/http/router/headers.ts @@ -19,6 +19,7 @@ import { pick } from '../../../utils'; +/** @public */ export type Headers = Record; const normalizeHeaderField = (field: string) => field.trim().toLowerCase(); diff --git a/src/core/server/index.ts b/src/core/server/index.ts index f0d665875d1126..a2d1761259ef90 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -21,8 +21,15 @@ import { HttpServiceSetup } from './http'; import { PluginsServiceSetup } from './plugins'; export { bootstrap } from './bootstrap'; -export { CallAPIOptions, ClusterClient } from './elasticsearch'; -export { Logger, LoggerFactory } from './logging'; +export { + CallAPIOptions, + ClusterClient, + Headers, + ScopedClusterClient, + ElasticsearchClientConfig, + APICaller, +} from './elasticsearch'; +export { Logger, LoggerFactory, LogMeta, LogRecord, LogLevel } from './logging'; export { DiscoveredPlugin, PluginInitializerContext, @@ -30,6 +37,7 @@ export { PluginSetupContext, } from './plugins'; +/** @public */ export interface CoreSetup { http: HttpServiceSetup; elasticsearch: ElasticsearchServiceSetup; diff --git a/src/core/server/kibana.api.md b/src/core/server/kibana.api.md new file mode 100644 index 00000000000000..f1deeb33e3316f --- /dev/null +++ b/src/core/server/kibana.api.md @@ -0,0 +1,196 @@ +## API Review File for "kibana" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ConfigOptions } from 'elasticsearch'; +import { Duration } from 'moment'; +import { Observable } from 'rxjs'; +import { Server } from 'hapi'; +import { ServerOptions } from 'hapi'; +import { Type } from '@kbn/config-schema'; +import { TypeOf } from '@kbn/config-schema'; + +// @public (undocumented) +export type APICaller = (endpoint: string, clientParams: Record, options?: CallAPIOptions) => Promise; + +// Warning: (ae-forgotten-export) The symbol "BootstrapArgs" needs to be exported by the entry point index.d.ts +// Warning: (ae-internal-missing-underscore) The name bootstrap should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal (undocumented) +export function bootstrap({ configs, cliArgs, applyConfigOverrides, features, }: BootstrapArgs): Promise; + +// @public +export interface CallAPIOptions { + wrap401Errors: boolean; +} + +// @public +export class ClusterClient { + // (undocumented) + constructor(config: ElasticsearchClientConfig, log: Logger); + asScoped(req?: { + headers?: Headers; + }): ScopedClusterClient; + callAsInternalUser: (endpoint: string, clientParams?: Record, options?: CallAPIOptions | undefined) => Promise; + close(): void; + } + +// @public (undocumented) +export interface CoreSetup { + // Warning: (ae-forgotten-export) The symbol "ElasticsearchServiceSetup" needs to be exported by the entry point index.d.ts + // + // (undocumented) + elasticsearch: ElasticsearchServiceSetup; + // Warning: (ae-forgotten-export) The symbol "HttpServiceSetup" needs to be exported by the entry point index.d.ts + // + // (undocumented) + http: HttpServiceSetup; + // Warning: (ae-forgotten-export) The symbol "PluginsServiceSetup" needs to be exported by the entry point index.d.ts + // + // (undocumented) + plugins: PluginsServiceSetup; +} + +// Warning: (ae-internal-missing-underscore) The name DiscoveredPlugin should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal +export interface DiscoveredPlugin { + // Warning: (ae-forgotten-export) The symbol "ConfigPath" needs to be exported by the entry point index.d.ts + readonly configPath: ConfigPath; + readonly id: PluginName; + readonly optionalPlugins: ReadonlyArray; + readonly requiredPlugins: ReadonlyArray; +} + +// Warning: (ae-forgotten-export) The symbol "ElasticsearchConfig" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export type ElasticsearchClientConfig = Pick & Pick & { + pingTimeout?: ElasticsearchConfig['pingTimeout'] | ConfigOptions['pingTimeout']; + requestTimeout?: ElasticsearchConfig['requestTimeout'] | ConfigOptions['requestTimeout']; + sniffInterval?: ElasticsearchConfig['sniffInterval'] | ConfigOptions['sniffInterval']; + ssl?: Partial; +}; + +// @public (undocumented) +export type Headers = Record; + +// @public +export interface Logger { + debug(message: string, meta?: LogMeta): void; + error(errorOrMessage: string | Error, meta?: LogMeta): void; + fatal(errorOrMessage: string | Error, meta?: LogMeta): void; + info(message: string, meta?: LogMeta): void; + // @internal (undocumented) + log(record: LogRecord): void; + trace(message: string, meta?: LogMeta): void; + warn(errorOrMessage: string | Error, meta?: LogMeta): void; +} + +// @public +export interface LoggerFactory { + get(...contextParts: string[]): Logger; +} + +// Warning: (ae-internal-missing-underscore) The name LogLevel should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal +export class LogLevel { + // (undocumented) + static readonly All: LogLevel; + // (undocumented) + static readonly Debug: LogLevel; + // (undocumented) + static readonly Error: LogLevel; + // (undocumented) + static readonly Fatal: LogLevel; + static fromId(level: LogLevelId): LogLevel; + // Warning: (ae-forgotten-export) The symbol "LogLevelId" needs to be exported by the entry point index.d.ts + // + // (undocumented) + readonly id: LogLevelId; + // (undocumented) + static readonly Info: LogLevel; + // (undocumented) + static readonly Off: LogLevel; + supports(level: LogLevel): boolean; + // (undocumented) + static readonly Trace: LogLevel; + // (undocumented) + readonly value: number; + // (undocumented) + static readonly Warn: LogLevel; +} + +// @public +export interface LogMeta { + // (undocumented) + [key: string]: any; +} + +// Warning: (ae-internal-missing-underscore) The name LogRecord should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal +export interface LogRecord { + // (undocumented) + context: string; + // (undocumented) + error?: Error; + // (undocumented) + level: LogLevel; + // (undocumented) + message: string; + // (undocumented) + meta?: { + [name: string]: any; + }; + // (undocumented) + timestamp: Date; +} + +// @public +export interface PluginInitializerContext { + // (undocumented) + config: { + create: , Config>(ConfigClass: ConfigWithSchema) => Observable; + createIfExists: , Config>(ConfigClass: ConfigWithSchema) => Observable; + }; + // (undocumented) + env: { + mode: EnvironmentMode; + }; + // (undocumented) + logger: LoggerFactory; +} + +// @public +export type PluginName = string; + +// @public +export interface PluginSetupContext { + // (undocumented) + elasticsearch: { + adminClient$: Observable; + dataClient$: Observable; + }; +} + +// @public +export class ScopedClusterClient { + // (undocumented) + constructor(internalAPICaller: APICaller, scopedAPICaller: APICaller, headers?: Record | undefined); + callAsCurrentUser(endpoint: string, clientParams?: Record, options?: CallAPIOptions): Promise; + callAsInternalUser(endpoint: string, clientParams?: Record, options?: CallAPIOptions): Promise; + } + + +// Warnings were encountered during analysis: +// +// src/core/server/plugins/plugin_context.ts:35:9 - (ae-forgotten-export) The symbol "EnvironmentMode" needs to be exported by the entry point index.d.ts +// src/core/server/plugins/plugin_context.ts:39:9 - (ae-forgotten-export) The symbol "ConfigWithSchema" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +``` diff --git a/src/core/server/logging/index.ts b/src/core/server/logging/index.ts index 51268cb6462889..a99ee9ec12e8b3 100644 --- a/src/core/server/logging/index.ts +++ b/src/core/server/logging/index.ts @@ -17,8 +17,10 @@ * under the License. */ -export { Logger } from './logger'; +export { Logger, LogMeta } from './logger'; export { LoggerFactory } from './logger_factory'; +export { LogRecord } from './log_record'; +export { LogLevel } from './log_level'; /** @internal */ export { LoggingConfig } from './logging_config'; /** @internal */ diff --git a/src/core/server/logging/log_level.ts b/src/core/server/logging/log_level.ts index b4fe529e9857b5..8493dd4a848dfd 100644 --- a/src/core/server/logging/log_level.ts +++ b/src/core/server/logging/log_level.ts @@ -26,7 +26,7 @@ import { assertNever } from '../../utils'; export type LogLevelId = 'all' | 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'off'; /** - * Represents the log level, manages string -> `LogLevel` conversion and comparison of log level + * Represents the log level, manages string to `LogLevel` conversion and comparison of log level * priorities between themselves. * @internal */ @@ -42,7 +42,7 @@ export class LogLevel { /** * Converts string representation of log level into `LogLevel` instance. - * @param level String representation of log level. + * @param level - String representation of log level. * @returns Instance of `LogLevel` class. */ public static fromId(level: LogLevelId): LogLevel { @@ -72,7 +72,7 @@ export class LogLevel { /** * Indicates whether current log level covers the one that is passed as an argument. - * @param level Instance of `LogLevel` to compare to. + * @param level - Instance of `LogLevel` to compare to. * @returns True if specified `level` is covered by this log level. */ public supports(level: LogLevel) { diff --git a/src/core/server/logging/logger.ts b/src/core/server/logging/logger.ts index 1298fdd9030f56..e10e79d5cf45b5 100644 --- a/src/core/server/logging/logger.ts +++ b/src/core/server/logging/logger.ts @@ -21,6 +21,11 @@ import { Appender } from './appenders/appenders'; import { LogLevel } from './log_level'; import { LogRecord } from './log_record'; +/** + * Contextual metadata + * + * @public + */ export interface LogMeta { [key: string]: any; } @@ -28,13 +33,53 @@ export interface LogMeta { /** * Logger exposes all the necessary methods to log any type of information and * this is the interface used by the logging consumers including plugins. + * + * @public */ export interface Logger { + /** + * Log messages at the most detailed log level + * + * @param message - The log message + * @param meta - + */ trace(message: string, meta?: LogMeta): void; + + /** + * Log messages useful for debugging and interactive investigation + * @param message - The log message + * @param meta - + */ debug(message: string, meta?: LogMeta): void; + + /** + * Logs messages related to general application flow + * @param message - The log message + * @param meta - + */ info(message: string, meta?: LogMeta): void; + + /** + * Logs abnormal or unexpected errors or messages + * @param errorOrMessage - An Error object or message string to log + * @param meta - + */ warn(errorOrMessage: string | Error, meta?: LogMeta): void; + + /** + * Logs abnormal or unexpected errors or messages that caused a failure in the application flow + * + * @param errorOrMessage - An Error object or message string to log + * @param meta - + */ error(errorOrMessage: string | Error, meta?: LogMeta): void; + + /** + * Logs abnormal or unexpected errors or messages that caused an unrecoverable failure + * + * @param errorOrMessage - An Error object or message string to log + * @param meta - + */ fatal(errorOrMessage: string | Error, meta?: LogMeta): void; /** @internal */ diff --git a/src/core/server/logging/logger_factory.ts b/src/core/server/logging/logger_factory.ts index 10e7608eb7a9dc..47bebaca8d7aef 100644 --- a/src/core/server/logging/logger_factory.ts +++ b/src/core/server/logging/logger_factory.ts @@ -22,11 +22,14 @@ import { Logger } from './logger'; /** * The single purpose of `LoggerFactory` interface is to define a way to * retrieve a context-based logger instance. + * + * @public */ export interface LoggerFactory { /** * Returns a `Logger` instance for the specified context. - * @param contextParts Parts of the context to return logger for. For example + * + * @param contextParts - Parts of the context to return logger for. For example * get('plugins', 'pid') will return a logger for the `plugins.pid` context. */ get(...contextParts: string[]): Logger; diff --git a/src/core/server/plugins/index.ts b/src/core/server/plugins/index.ts index 5d392abccb4f27..036fd20c7993f2 100644 --- a/src/core/server/plugins/index.ts +++ b/src/core/server/plugins/index.ts @@ -22,6 +22,5 @@ export { PluginsService, PluginsServiceSetup } from './plugins_service'; /** @internal */ export { isNewPlatformPlugin } from './discovery'; /** @internal */ -export { DiscoveredPlugin, DiscoveredPluginInternal } from './plugin'; -export { PluginName } from './plugin'; +export { DiscoveredPlugin, DiscoveredPluginInternal, PluginName } from './plugin'; export { PluginInitializerContext, PluginSetupContext } from './plugin_context'; diff --git a/src/core/server/plugins/plugin.ts b/src/core/server/plugins/plugin.ts index fc2e63d0f07163..68afc715263671 100644 --- a/src/core/server/plugins/plugin.ts +++ b/src/core/server/plugins/plugin.ts @@ -26,6 +26,8 @@ import { PluginInitializerContext, PluginSetupContext } from './plugin_context'; /** * Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays * that use it as a key or value more obvious. + * + * @public */ export type PluginName = string; @@ -135,6 +137,7 @@ type PluginInitializer { + log.info(`Building types for: ${tsConfigPath}`); + return exec( log, require.resolve('typescript/bin/tsc'), [ - '--noEmit', '--pretty', 'true', '--project', tsConfigPath, ], @@ -67,6 +90,22 @@ export const TypecheckTypescriptTask = { cwd: build.resolvePath(), } ); - } - }, + })); + + await Promise.all(buildProjects.map((tsConfigPath) => { + log.info(`Type checking: ${tsConfigPath}`); + return exec( + log, + require.resolve('typescript/bin/tsc'), + [ + '--noEmit', 'true', + '--pretty', 'true', + '--project', tsConfigPath, + ], + { + cwd: build.resolvePath(), + } + ); + })); + } }; diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index fefb205e0289c6..6951aa1b461c4b 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -45,7 +45,7 @@ export const IGNORE_FILE_GLOBS = [ 'src/legacy/ui/public/assets/fonts/**/*', // filename must match language code which requires capital letters - '**/translations/*.json', + '**/translations/*.json' ]; diff --git a/src/dev/run_check_core_api_changes.ts b/src/dev/run_check_core_api_changes.ts new file mode 100644 index 00000000000000..1a52205955b9fe --- /dev/null +++ b/src/dev/run_check_core_api_changes.ts @@ -0,0 +1,250 @@ +/* + * 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 { ToolingLog } from '@kbn/dev-utils'; +import { Extractor, IExtractorConfig } from '@microsoft/api-extractor'; +import chalk from 'chalk'; +import dedent from 'dedent'; +import execa from 'execa'; +import fs from 'fs'; +import getopts from 'getopts'; + +const apiExtractorConfig = (folder: string): IExtractorConfig => { + return { + compiler: { + configType: 'tsconfig', + rootFolder: '.', + }, + project: { + entryPointSourceFile: `target/types/${folder}/index.d.ts`, + }, + apiReviewFile: { + enabled: true, + apiReviewFolder: `./src/core/${folder}/`, + tempFolder: `./build/${folder}/`, + }, + apiJsonFile: { + enabled: true, + outputFolder: `./build/${folder}`, + }, + dtsRollup: { + enabled: false, + trimming: true, + publishFolderForInternal: '', + publishFolderForBeta: '', + publishFolderForPublic: '', + mainDtsRollupPath: '', + }, + policies: { + namespaceSupport: 'permissive', + }, + }; +}; + +const runBuildTypes = async () => { + await execa.shell('yarn run build:types'); +}; + +const runApiDocumenter = async (folder: string) => { + await execa.shell( + `api-documenter markdown -i ./build/${folder} -o ./docs/development/core/${folder}` + ); +}; + +const isApiChangedWarning = (warning: string) => { + return warning.startsWith('You have changed the public API signature for this project.'); +}; + +const renameExtractedApiPackageName = async (folder: string) => { + const json = JSON.parse(fs.readFileSync(`build/${folder}/kibana.api.json`).toString()); + json.canonicalReference = `kibana-plugin-${folder}`; + json.name = `kibana-plugin-${folder}`; + fs.writeFileSync(`build/${folder}/kibana.api.json`, JSON.stringify(json, null, 2)); +}; + +/** + * Runs api-extractor with a custom logger in order to extract results from the process + * + * TODO: Once Microsoft/web-build-tools#1133 is fixed, use the updated interface instead + * of parsing log strings. + */ +const runApiExtractor = (folder: string, acceptChanges: boolean = false) => { + // Because of the internals of api-extractor ILogger can't be implemented as a typescript Class + const warnings = [] as string[]; + const errors = [] as string[]; + + const memoryLogger = { + logVerbose(message: string) { + return null; + }, + + logInfo(message: string) { + return null; + }, + + logWarning(message: string) { + warnings.push(message); + }, + + logError(message: string) { + errors.push(message); + }, + }; + + const options = { + // Indicates that API Extractor is running as part of a local build, + // e.g. on developer's machine. For example, if the *.api.ts output file + // has differences, it will be automatically overwritten for a + // local build, whereas this should report an error for a production build. + localBuild: acceptChanges, + customLogger: memoryLogger, + }; + + const extractor = new Extractor(apiExtractorConfig(folder), options); + extractor.processProject(); + + const printableWarnings = warnings.filter(msg => !isApiChangedWarning(msg)); + const apiChanged = warnings.some(isApiChangedWarning); + + return { apiChanged, warnings: printableWarnings, errors }; +}; + +async function run(folder: string): Promise { + const log = new ToolingLog({ + level: 'info', + writeTo: process.stdout, + }); + + const extraFlags: string[] = []; + const opts = getopts(process.argv.slice(2), { + boolean: ['accept', 'docs', 'help'], + default: { + project: undefined, + }, + unknown(name) { + extraFlags.push(name); + return false; + }, + }); + + if (extraFlags.length > 0) { + for (const flag of extraFlags) { + log.error(`Unknown flag: ${flag}`); + } + + opts.help = true; + } + + if (opts.help) { + process.stdout.write( + dedent(chalk` + {dim usage:} node scripts/check_core_api_changes [...options] + + Checks for any changes to the Kibana Core API + + Examples: + + {dim # Checks for any changes to the Kibana Core API} + {dim $} node scripts/check_core_api_changes + + {dim # Checks for any changes to the Kibana Core API and updates the documentation} + {dim $} node scripts/check_core_api_changes --docs + + {dim # Checks for and automatically accepts and updates documentation for any changes to the Kibana Core API} + {dim $} node scripts/check_core_api_changes --accept + + Options: + --accept {dim Accepts all changes by updating the API Review files and documentation} + --docs {dim Updates the Core API documentation} + --help {dim Show this message} + `) + ); + process.stdout.write('\n'); + return !(extraFlags.length > 0); + } + + log.info(`Core ${folder} API: checking for changes in API signature...`); + + try { + await runBuildTypes(); + } catch (e) { + log.error(e); + return false; + } + + const { apiChanged, warnings, errors } = runApiExtractor(folder, opts.accept); + await renameExtractedApiPackageName(folder); + + const apiReviewFilePath = + apiExtractorConfig(folder)!.apiReviewFile!.apiReviewFolder + 'kibana.api.md'; + + if (apiChanged && opts.accept) { + log.warning(`You have changed the public signature of the ${folder} Core API`); + log.warning( + `Please commit the updated API documentation and the review file in '${apiReviewFilePath}' \n` + ); + } + + if (apiChanged && !opts.accept) { + log.warning('You have changed the public signature of the Kibana Core API'); + log.warning( + 'To accept these changes run `node scripts/check_core_api_changes.js --accept` and then:\n' + + `\t 1. Commit the updated documentation and API review file ${apiReviewFilePath}' \n` + + "\t 2. Describe the change in your PR including whether it's a major, minor or patch" + ); + } + + if (!apiChanged) { + log.info(`Core ${folder} API: no changes detected ✔`); + } + + if (opts.accept || opts.docs) { + try { + await runApiDocumenter(folder); + } catch (e) { + log.error(e); + return false; + } + log.info(`Core ${folder} API: updated documentation ✔`); + } + + // If the API changed and we're not accepting the changes, exit process with error + if (apiChanged && !opts.accept) { + return false; + } + + // If any errors or warnings occured, exit with an error + if (errors.length > 0 || warnings.length > 0) { + log.error(`Core ${folder} API: api-extractor failed with the following errors or warnings:`); + errors.forEach(msg => log.error(msg)); + warnings.forEach(msg => log.warning(msg)); + return false; + } + + return true; +} + +(async () => { + const publicSucceeded = await run('public'); + const serverSucceeded = await run('server'); + + if (!publicSucceeded || !serverSucceeded) { + process.exitCode = 1; + } +})(); diff --git a/src/dev/typescript/get_ts_project_for_absolute_path.ts b/src/dev/typescript/get_ts_project_for_absolute_path.ts index 843743fd7a3b65..68ce70685b6071 100644 --- a/src/dev/typescript/get_ts_project_for_absolute_path.ts +++ b/src/dev/typescript/get_ts_project_for_absolute_path.ts @@ -18,9 +18,9 @@ */ import { relative, resolve } from 'path'; - import { REPO_ROOT } from '../constants'; import { File } from '../file'; +import { Project } from './project'; import { PROJECTS } from './projects'; /** @@ -32,7 +32,7 @@ import { PROJECTS } from './projects'; * * @param path Absolute path to a .ts file */ -export function getTsProjectForAbsolutePath(path: string) { +export function getTsProjectForAbsolutePath(path: string): Project { const relPath = relative(REPO_ROOT, path); const file = new File(resolve(REPO_ROOT, path)); const projects = PROJECTS.filter(p => p.isAbsolutePathSelected(path)); diff --git a/tasks/config/run.js b/tasks/config/run.js index 60e7ff3d12f540..a521e300a62939 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -90,6 +90,15 @@ module.exports = function (grunt) { ] }, + // used by the test tasks + // runs the check_core_api_changes script to ensure API changes are explictily accepted + checkCoreApiChanges: { + cmd: process.execPath, + args: [ + require.resolve('../../scripts/check_core_api_changes') + ] + }, + // used by the test and jenkins:unit tasks // runs the tslint script to check for Typescript linting errors tslint: { diff --git a/tasks/jenkins.js b/tasks/jenkins.js index 47b9429fed001f..62b0ba0b4ac07a 100644 --- a/tasks/jenkins.js +++ b/tasks/jenkins.js @@ -27,6 +27,7 @@ module.exports = function (grunt) { 'run:tslint', 'run:sasslint', 'run:checkTsProjects', + 'run:checkCoreApiChanges', 'run:typeCheck', 'run:i18nCheck', 'run:checkFileCasing', diff --git a/tasks/test.js b/tasks/test.js index ee6d0e87d95ad5..f82ec7a7fd70c1 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -73,6 +73,7 @@ module.exports = function (grunt) { !grunt.option('quick') && 'run:tslint', !grunt.option('quick') && 'run:sasslint', !grunt.option('quick') && 'run:checkTsProjects', + !grunt.option('quick') && 'run:checkCoreApiChanges', !grunt.option('quick') && 'run:typeCheck', !grunt.option('quick') && 'run:i18nCheck', 'run:checkFileCasing', diff --git a/tsconfig.json b/tsconfig.json index d9750b3f259d35..80c255ded322e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,8 @@ "paths": { // Allows for importing from `kibana` package for the exported types. "kibana": ["./kibana"], - "kibana/public": ["./src/core/public"], - "kibana/server": ["./src/core/server"], + "kibana/public": ["src/core/public"], + "kibana/server": ["src/core/server"], "ui/*": [ "src/legacy/ui/public/*" ], diff --git a/tsconfig.types.json b/tsconfig.types.json new file mode 100644 index 00000000000000..634a423b96e304 --- /dev/null +++ b/tsconfig.types.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "declaration": true, + "declarationDir": "./target/types", + "stripInternal": false, + "emitDeclarationOnly": true, + "declarationMap": true + }, + "include": [ + "src/core/server/index.ts", + "src/core/public/index.ts" + ] +} diff --git a/yarn.lock b/yarn.lock index ca44357a891343..4392f1373223ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1660,6 +1660,71 @@ resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe" integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q== +"@microsoft/api-documenter@7.0.41": + version "7.0.41" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.0.41.tgz#fd511e2780985cb2c4f14320044628a40cef117b" + integrity sha512-6MAfyt8yCvQNT41nFqI3Inn6kKzCfRIQR4Z11++AUwSGlu1bGfvOwgoOeDXNmVniiISOYADEoJjioC5XZV5fTw== + dependencies: + "@microsoft/api-extractor-model" "7.0.28" + "@microsoft/node-core-library" "3.13.0" + "@microsoft/ts-command-line" "4.2.3" + "@microsoft/tsdoc" "0.12.8" + colors "~1.2.1" + js-yaml "~3.9.1" + +"@microsoft/api-extractor-model@7.0.28": + version "7.0.28" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.0.28.tgz#691b077415143a9015ed1656bca6d0b9a77f58cb" + integrity sha512-kZJaWwdu3z5A1DugJpOZ9dI5+DjIEhqQJwHn2/kLTpsKT7gOyqNRbGHlDGG8xSiJ6/m994+cwh3qSGYDC17dtw== + dependencies: + "@microsoft/node-core-library" "3.13.0" + "@microsoft/tsdoc" "0.12.8" + "@types/node" "8.5.8" + +"@microsoft/api-extractor@7.0.31": + version "7.0.31" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.0.31.tgz#4d72755bf234e1c3a0afb22f678b7106158a9b89" + integrity sha512-7oiMvxaR9/qOO4SdlG2JFhdCZ1B+JtaX4pDb/aDGsm+7n+PMeLSVgQKeZwVXUIgslHlXxkxbX7zXIz41VqL8sQ== + dependencies: + "@microsoft/api-extractor-model" "7.0.28" + "@microsoft/node-core-library" "3.13.0" + "@microsoft/ts-command-line" "4.2.3" + "@microsoft/tsdoc" "0.12.8" + colors "~1.2.1" + lodash "~4.17.5" + resolve "1.8.1" + source-map "~0.6.1" + typescript "~3.1.6" + +"@microsoft/node-core-library@3.13.0": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@microsoft/node-core-library/-/node-core-library-3.13.0.tgz#ba24e16182149dc817bf52a886d22aced5cd8070" + integrity sha512-mnsL/1ikVWHl8sPNssavaAgtUaIM3hkQ8zeySuApU5dNmsMPzovJPfx9m5JGiMvs1v5QNAIVeiS9jnWwe/7anw== + dependencies: + "@types/fs-extra" "5.0.4" + "@types/jju" "~1.4.0" + "@types/node" "8.5.8" + "@types/z-schema" "3.16.31" + colors "~1.2.1" + fs-extra "~7.0.1" + jju "~1.4.0" + z-schema "~3.18.3" + +"@microsoft/ts-command-line@4.2.3": + version "4.2.3" + resolved "https://registry.yarnpkg.com/@microsoft/ts-command-line/-/ts-command-line-4.2.3.tgz#20d6a1684148b9fc0df25ee7335c3bb227d47d4f" + integrity sha512-SIs4q7RcG7efBbh5Ffrf6V4jVLxWihD4NDRY3+gPiOG8CYawBzE22tTEloZ1yj/FBvBZQkQ0GYwXoPhn6ElYXA== + dependencies: + "@types/argparse" "1.0.33" + "@types/node" "8.5.8" + argparse "~1.0.9" + colors "~1.2.1" + +"@microsoft/tsdoc@0.12.8": + version "0.12.8" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.12.8.tgz#e9646c91c650d536f37b04762eaa81afdc9a19d3" + integrity sha512-0smzAmVIUCsssAqDSPn9AfOPKUobq2WXMygbzC5JNswAJOs4uJK6DTZgfnHC8QLE2q374sPNwWU5D5LuoAJQSA== + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -2295,6 +2360,11 @@ resolved "https://registry.yarnpkg.com/@types/angular/-/angular-1.6.50.tgz#8b6599088d80f68ef0cad7d3a2062248ebe72b3d" integrity sha512-D3KB0PdaxdwtA44yOpK+NtptTscKWgUzXmf8fiLaaVxnX+b7QQ+dUMsyeVDweCQ6VX4PMwkd6x2hJ0X+ISIsoQ== +"@types/argparse@1.0.33": + version "1.0.33" + resolved "https://registry.yarnpkg.com/@types/argparse/-/argparse-1.0.33.tgz#2728669427cdd74a99e53c9f457ca2866a37c52d" + integrity sha512-VQgHxyPMTj3hIlq9SY1mctqx+Jj8kpQfoLvDlVSDNOyuYs8JYfkuY3OW/4+dO657yPmNhHpePRx0/Tje5ImNVQ== + "@types/async@2.0.49": version "2.0.49" resolved "https://registry.yarnpkg.com/@types/async/-/async-2.0.49.tgz#92e33d13f74c895cb9a7f38ba97db8431ed14bc0" @@ -2547,6 +2617,13 @@ dependencies: "@types/node" "*" +"@types/fs-extra@5.0.4": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599" + integrity sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g== + dependencies: + "@types/node" "*" + "@types/getopts@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/getopts/-/getopts-2.0.0.tgz#8a603370cb367d3192bd8012ad39ab2320b5b476" @@ -2671,6 +2748,11 @@ dependencies: "@types/jest-diff" "*" +"@types/jju@~1.4.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@types/jju/-/jju-1.4.1.tgz#0a39f5f8e84fec46150a7b9ca985c3f89ad98e9f" + integrity sha512-LFt+YA7Lv2IZROMwokZKiPNORAV5N3huMs3IKnzlE430HWhWYZ8b+78HiwJXJJP1V2IEjinyJURuRJfGoaFSIA== + "@types/joi@*", "@types/joi@^13.4.2": version "13.6.1" resolved "https://registry.yarnpkg.com/@types/joi/-/joi-13.6.1.tgz#325486a397504f8e22c8c551dc8b0e1d41d5d5ae" @@ -2817,7 +2899,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@10.12.27", "@types/node@>=6.0.0", "@types/node@^10.12.27": +"@types/node@*", "@types/node@10.12.27", "@types/node@8.5.8", "@types/node@>=6.0.0", "@types/node@^10.12.27": version "10.12.27" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.27.tgz#eb3843f15d0ba0986cc7e4d734d2ee8b50709ef8" integrity sha512-e9wgeY6gaY21on3ve0xAjgBVjGDWq/xUteK0ujsE53bUoxycMkqfnkUgMt6ffZtykZ5X12Mg3T7Pw4TRCObDKg== @@ -3178,6 +3260,11 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.10.tgz#17a8ec65cd8e88f51b418ceb271af18d3137df67" integrity sha512-WsVzTPshvCSbHThUduGGxbmnwcpkgSctHGHTqzWyFg4lYAuV5qXlyFPOsP3OWqCINfmg/8VXP+zJaa4OxEsBQQ== +"@types/z-schema@3.16.31": + version "3.16.31" + resolved "https://registry.yarnpkg.com/@types/z-schema/-/z-schema-3.16.31.tgz#2eb1d00a5e4ec3fa58c76afde12e182b66dc5c1c" + integrity sha1-LrHQCl5Ow/pYx2r94S4YK2bcXBw= + "@types/zen-observable@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" @@ -4365,7 +4452,7 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" -argparse@^1.0.2, argparse@~1.0.2: +argparse@^1.0.2, argparse@~1.0.2, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -7053,6 +7140,11 @@ colors@~1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= +colors@~1.2.1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.5.tgz#89c7ad9a374bc030df8013241f68136ed8835afc" + integrity sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg== + colorspace@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.1.tgz#9ac2491e1bc6f8fb690e2176814f8d091636d972" @@ -7126,6 +7218,11 @@ commander@2.9.0, commander@~2.9.0: dependencies: graceful-readlink ">= 1.0.0" +commander@^2.7.1: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + commander@^2.8.1: version "2.18.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" @@ -11205,7 +11302,7 @@ fs-extra@^4.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.1: +fs-extra@^7.0.1, fs-extra@~7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -14910,6 +15007,11 @@ jit-grunt@~0.10.0: resolved "https://registry.yarnpkg.com/jit-grunt/-/jit-grunt-0.10.0.tgz#008c3a7fe1e96bd0d84e260ea1fa1783457f79c2" integrity sha1-AIw6f+Hpa9DYTiYOofoXg0V/ecI= +jju@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a" + integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo= + joi@13.x.x, joi@^13.5.2: version "13.7.0" resolved "https://registry.yarnpkg.com/joi/-/joi-13.7.0.tgz#cfd85ebfe67e8a1900432400b4d03bbd93fb879f" @@ -15044,6 +15146,14 @@ js-yaml@~3.7.0: argparse "^1.0.7" esprima "^2.6.0" +js-yaml@~3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + integrity sha512-CbcG379L1e+mWBnLvHWWeLs8GyV/EMw862uLI3c+GxVyDHWZcjZinwuBd3iW2pgxgIlksW/1vNJa4to+RvDOww== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -16054,7 +16164,7 @@ lodash.foreach@^4.3.0: resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= -lodash.get@^4.4.2: +lodash.get@^4.0.0, lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= @@ -21565,6 +21675,13 @@ resolve@1.1.7, resolve@1.1.x, resolve@~1.1.0, resolve@~1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= +resolve@1.8.1, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + dependencies: + path-parse "^1.0.5" + resolve@^1.1.5, resolve@^1.1.6, resolve@^1.1.7: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" @@ -21579,13 +21696,6 @@ resolve@^1.10.0, resolve@^1.9.0: dependencies: path-parse "^1.0.6" -resolve@^1.3.2, resolve@^1.4.0, resolve@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== - dependencies: - path-parse "^1.0.5" - resolve@^1.5.0, resolve@^1.7.1: version "1.7.1" resolved "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" @@ -24830,7 +24940,7 @@ typescript-fsa@^2.0.0, typescript-fsa@^2.5.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-2.5.0.tgz#1baec01b5e8f5f34c322679d1327016e9e294faf" integrity sha1-G67AG16PXzTDImedEycBbp4pT68= -typescript@^3.3.3333: +typescript@^3.3.3333, typescript@~3.1.6: version "3.3.3333" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== @@ -25420,6 +25530,11 @@ validate-npm-package-name@2.2.2: dependencies: builtins "0.0.7" +validator@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-8.2.0.tgz#3c1237290e37092355344fef78c231249dab77b9" + integrity sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA== + value-equal@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" @@ -27036,6 +27151,17 @@ yosay@^2.0.2: taketalk "^1.0.0" wrap-ansi "^2.0.0" +z-schema@~3.18.3: + version "3.18.4" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-3.18.4.tgz#ea8132b279533ee60be2485a02f7e3e42541a9a2" + integrity sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== + dependencies: + lodash.get "^4.0.0" + lodash.isequal "^4.0.0" + validator "^8.0.0" + optionalDependencies: + commander "^2.7.1" + zen-observable-ts@^0.8.10: version "0.8.10" resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-0.8.10.tgz#18e2ce1c89fe026e9621fd83cc05168228fce829"