Home > kibana-plugin-core-public
The Kibana Core APIs for client-side plugins.
A plugin's public/index
file must contain a named import, plugin
, that implements PluginInitializer which returns an object that implements Plugin.
The plugin integrates with the core system via lifecycle events: setup
, start
, and stop
. In each lifecycle method, the plugin will receive the corresponding core services available (either CoreSetup or CoreStart) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked.
Class | Description |
---|---|
SavedObjectsClient | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state. The client-side SavedObjectsClient is a thin convenience library around the SavedObjects HTTP API for interacting with Saved Objects. |
ScopedHistory | A wrapper around a History instance that is scoped to a particular base path of the history stack. Behaves similarly to the basename option except that this wrapper hides any history stack entries from outside the scope of this base path.This wrapper also allows Core and Plugins to share a single underlying global History instance without exposing the history of other applications.The createSubHistory method is particularly useful for applications that contain any number of "sub-apps" which should not have access to the main application's history or basePath. |
SimpleSavedObject | This class is a very simple wrapper for SavedObjects loaded from the server with the SavedObjectsClient.It provides basic functionality for creating/saving/deleting saved objects, but doesn't include any type-specific implementations. |
ToastsApi | Methods for adding and removing global toast messages. |
Enumeration | Description |
---|---|
AppLeaveActionType | Possible type of actions on application leave. |
AppNavLinkStatus | Status of the application's navLink. |
AppStatus | Accessibility status of an application. |
Function | Description |
---|---|
assertNever(x) | Can be used in switch statements to ensure we perform exhaustive checks, see https://www.typescriptlang.org/docs/handbook/advanced-types.html\#exhaustiveness-checking |
deepFreeze(object) | Apply Object.freeze to a value recursively and convert the return type to Readonly variant recursively |
getFlattenedObject(rootValue) | Flattens a deeply nested object to a map of dot-separated paths pointing to all primitive values **and arrays** from rootValue .example: getFlattenedObject({ a: { b: 1, c: [2,3] } }) // => { 'a.b': 1, 'a.c': [2,3] } |
isRelativeUrl(candidatePath) | Determine if a url is relative. Any url including a protocol, hostname, or port is not considered relative. This means that absolute *paths* are considered to be relative *urls* |
modifyUrl(url, urlModifier) | Takes a URL and a function that takes the meaningful parts of the URL as a key-value object, modifies some or all of the parts, and returns the modified parts formatted again as a url.Url Parts sent: - protocol - slashes (does the url have the //) - auth - hostname (just the name of the host, no port or auth information) - port - pathname (the path after the hostname, no query or hash, starts with a slash if there was a path) - query (always an object, even when no query on original url) - hashWhy? - The default url library in node produces several conflicting properties on the "parsed" output. Modifying any of these might lead to the modifications being ignored (depending on which property was modified) - It's not always clear whether to use path/pathname, host/hostname, so this tries to add helpful constraints |
Interface | Description |
---|---|
App | Extension of common app properties with the mount function. |
AppBase | |
AppCategory | A category definition for nav links to know where to sort them in the left hand nav |
AppLeaveConfirmAction | Action to return from a AppLeaveHandler to show a confirmation message when trying to leave an application.See |
AppLeaveDefaultAction | Action to return from a AppLeaveHandler to execute the default behaviour when leaving the application.See |
ApplicationSetup | |
ApplicationStart | |
AppMountContext | The context object received when applications are mounted to the DOM. Deprecated, use CoreSetup.getStartServices. |
AppMountParameters | |
Capabilities | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. |
ChromeBadge | |
ChromeBrand | |
ChromeDocTitle | APIs for accessing and updating the document title. |
ChromeHelpExtension | |
ChromeNavControl | |
ChromeNavControls | APIs for registering new controls to be displayed in the navigation bar. |
ChromeNavLink | |
ChromeNavLinks | APIs for manipulating nav links. |
ChromeRecentlyAccessed | APIs for recently accessed history. |
ChromeRecentlyAccessedHistoryItem | |
ChromeStart | ChromeStart allows plugins to customize the global chrome header UI and enrich the UX with additional information about the current location of the browser. |
ContextSetup | An object that handles registration of context providers and configuring handlers with context. |
CoreSetup | Core services exposed to the Plugin setup lifecycle |
CoreStart | Core services exposed to the Plugin start lifecycle |
DocLinksStart | |
EnvironmentMode | |
ErrorToastOptions | Options available for IToasts error APIs. |
FatalErrorInfo | Represents the message and stack of a fatal Error |
FatalErrorsSetup | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. |
HttpFetchOptions | All options that may be used with a HttpHandler. |
HttpFetchOptionsWithPath | Similar to HttpFetchOptions but with the URL path included. |
HttpFetchQuery | |
HttpHandler | A function for making an HTTP requests to Kibana's backend. See HttpFetchOptions for options and HttpResponse for the response. |
HttpHeadersInit | Headers to append to the request. Any headers that begin with kbn- are considered private to Core and will cause HttpHandler to throw an error. |
HttpInterceptor | An object that may define global interceptor functions for different parts of the request and response lifecycle. See IHttpInterceptController. |
HttpInterceptorRequestError | |
HttpInterceptorResponseError | |
HttpRequestInit | Fetch API options available to HttpHandlers. |
HttpResponse | |
HttpSetup | |
I18nStart | I18nStart.Context is required by any localizable React component from @kbn/i18n and @elastic/eui packages and is supposed to be used as the topmost component for any i18n-compatible React tree. |
IAnonymousPaths | APIs for denoting paths as not requiring authentication |
IBasePath | APIs for manipulating the basePath on URL segments. |
IContextContainer | An object that handles registration of context providers and configuring handlers with context. |
IHttpFetchError | |
IHttpInterceptController | Used to halt a request Promise chain in a HttpInterceptor. |
IHttpResponseInterceptorOverrides | Properties that can be returned by HttpInterceptor.request to override the response. |
ImageValidation | |
IUiSettingsClient | Client-side client that provides access to the advanced settings stored in elasticsearch. The settings provide control over the behavior of the Kibana application. For example, a user can specify how to display numeric or date fields. Users can adjust the settings via Management UI. IUiSettingsClient |
LegacyCoreSetup | Setup interface exposed to the legacy platform via the ui/new_platform module. |
LegacyCoreStart | Start interface exposed to the legacy platform via the ui/new_platform module. |
LegacyNavLink | |
NotificationsSetup | |
NotificationsStart | |
OverlayBannersStart | |
OverlayRef | Returned by OverlayStart methods for closing a mounted overlay. |
OverlayStart | |
PackageInfo | |
Plugin | The interface that should be returned by a PluginInitializer . |
PluginInitializerContext | The available core services passed to a PluginInitializer |
SavedObject | |
SavedObjectAttributes | The data for a Saved Object is stored as an object in the attributes property. |
SavedObjectReference | A reference to another saved object. |
SavedObjectsBaseOptions | |
SavedObjectsBatchResponse | |
SavedObjectsBulkCreateObject | |
SavedObjectsBulkCreateOptions | |
SavedObjectsBulkUpdateObject | |
SavedObjectsBulkUpdateOptions | |
SavedObjectsCreateOptions | |
SavedObjectsFindOptions | |
SavedObjectsFindResponsePublic | Return type of the Saved Objects find() method.*Note*: this type is different between the Public and Server Saved Objects clients. |
SavedObjectsImportConflictError | Represents a failure to import due to a conflict. |
SavedObjectsImportError | Represents a failure to import. |
SavedObjectsImportMissingReferencesError | Represents a failure to import due to missing references. |
SavedObjectsImportResponse | The response describing the result of an import. |
SavedObjectsImportRetry | Describes a retry operation for importing a saved object. |
SavedObjectsImportUnknownError | Represents a failure to import due to an unknown reason. |
SavedObjectsImportUnsupportedTypeError | Represents a failure to import due to having an unsupported saved object type. |
SavedObjectsMigrationVersion | Information about the migrations that have been applied to this SavedObject. When Kibana starts up, KibanaMigrator detects outdated documents and migrates them based on this value. For each migration that has been applied, the plugin's name is used as a key and the latest migration version as the value. |
SavedObjectsStart | |
SavedObjectsUpdateOptions | |
StringValidationRegex | StringValidation with regex object |
StringValidationRegexString | StringValidation as regex string |
ToastOptions | Options available for IToasts APIs. |
UiSettingsParams | UiSettings parameters defined by the plugins. |
UiSettingsState | |
URLMeaningfulParts | We define our own typings because the current version of @types/node declares properties to be optional "hostname?: string". Although, parse call returns "hostname: null | string". |
UserProvidedValues | Describes the values explicitly set by user. |
Type Alias | Description |
---|---|
AppLeaveAction | Possible actions to return from a AppLeaveHandlerSee AppLeaveConfirmAction and AppLeaveDefaultAction |
AppLeaveHandler | A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return confirm to to prompt a message to the user before leaving the page, or default to keep the default behavior (doing nothing).See AppMountParameters for detailed usage examples. |
AppMount | A mount function called when the user navigates to this app's route. |
AppMountDeprecated | A mount function called when the user navigates to this app's route. |
AppUnmount | A function called when an application should be unmounted from the page. This function should be synchronous. |
AppUpdatableFields | Defines the list of fields that can be updated via an AppUpdater. |
AppUpdater | Updater for applications. see ApplicationSetup |
ChromeBreadcrumb | |
ChromeHelpExtensionMenuCustomLink | |
ChromeHelpExtensionMenuDiscussLink | |
ChromeHelpExtensionMenuDocumentationLink | |
ChromeHelpExtensionMenuGitHubLink | |
ChromeHelpExtensionMenuLink | |
ChromeNavLinkUpdateableFields | |
FatalErrorsStart | FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error. |
Freezable | |
HandlerContextType | Extracts the type of the first argument of a HandlerFunction to represent the type of the context. |
HandlerFunction | A function that accepts a context object and an optional number of additional arguments. Used for the generic types in IContextContainer |
HandlerParameters | Extracts the types of the additional arguments of a HandlerFunction, excluding the HandlerContextType. |
HttpStart | See HttpSetup |
IContextProvider | A function that returns a context value for a specific key of given context type. |
IToasts | Methods for adding and removing global toast messages. See ToastsApi. |
MountPoint | A function that should mount DOM content inside the provided container element and return a handler to unmount it. |
NavType | |
PluginInitializer | The plugin export at the root of a plugin's public directory should conform to this interface. |
PluginOpaqueId | |
PublicUiSettingsParams | A sub-set of UiSettingsParams exposed to the client-side. |
RecursiveReadonly | |
SavedObjectAttribute | Type definition for a Saved Object attribute value |
SavedObjectAttributeSingle | Don't use this type, it's simply a helper type for SavedObjectAttribute |
SavedObjectsClientContract | SavedObjectsClientContract as implemented by the SavedObjectsClient |
StartServicesAccessor | Allows plugins to get access to APIs available in start inside async handlers, such as App.mount. Promise will not resolve until Core and plugin dependencies have completed start . |
StringValidation | Allows regex objects or a regex string |
Toast | |
ToastInput | Inputs for IToasts APIs. |
ToastInputFields | Allowed fields for ToastInput. |
ToastsSetup | IToasts |
ToastsStart | IToasts |
UiSettingsType | UI element type to represent the settings. |
UnmountCallback | A function that will unmount the element previously mounted by the associated MountPoint |