Skip to content

Latest commit

 

History

History
181 lines (165 loc) · 24.6 KB

kibana-plugin-core-public.md

File metadata and controls

181 lines (165 loc) · 24.6 KB

Home > kibana-plugin-core-public

kibana-plugin-core-public package

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.

Classes

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.

Enumerations

Enumeration Description
AppLeaveActionType Possible type of actions on application leave.
AppNavLinkStatus Status of the application's navLink.
AppStatus Accessibility status of an application.

Interfaces

Interface Description
App
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
AppMeta Input type for meta data for an application.Meta fields include keywords and searchDeepLinks Keywords is an array of string with which to associate the app, must include at least one unique string as an array. searchDeepLinks is an array of links that represent secondary in-app locations for the app.
AppMountParameters
AsyncPlugin A plugin with asynchronous lifecycle methods.
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
ChromeHelpExtensionMenuCustomLink
ChromeHelpExtensionMenuDiscussLink
ChromeHelpExtensionMenuDocumentationLink
ChromeHelpExtensionMenuGitHubLink
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.
ChromeUserBanner
CoreSetup Core services exposed to the Plugin setup lifecycle
CoreStart Core services exposed to the Plugin start lifecycle
DocLinksStart
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.
IExternalUrl APIs for working with external URLs.
IExternalUrlPolicy A policy describing whether access to an external destination is allowed.
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
NavigateToAppOptions Options for the navigateToApp API
NotificationsSetup
NotificationsStart
OverlayBannersStart
OverlayFlyoutOpenOptions
OverlayFlyoutStart APIs to open and manage fly-out dialogs.
OverlayModalConfirmOptions
OverlayModalOpenOptions
OverlayModalStart APIs to open and manage modal dialogs.
OverlayRef Returned by OverlayStart methods for closing a mounted overlay.
OverlayStart
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.
SavedObjectError
SavedObjectReference A reference to another saved object.
SavedObjectsBaseOptions
SavedObjectsBatchResponse
SavedObjectsBulkCreateObject
SavedObjectsBulkCreateOptions
SavedObjectsBulkUpdateObject
SavedObjectsBulkUpdateOptions
SavedObjectsCreateOptions
SavedObjectsFindOptions
SavedObjectsFindOptionsReference
SavedObjectsFindResponsePublic Return type of the Saved Objects find() method.*Note*: this type is different between the Public and Server Saved Objects clients.
SavedObjectsImportActionRequiredWarning A warning meant to notify that a specific user action is required to finalize the import of some type of object. The actionUrl must be a path relative to the basePath, and not include it.
SavedObjectsImportAmbiguousConflictError Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite.
SavedObjectsImportConflictError Represents a failure to import due to a conflict.
SavedObjectsImportFailure 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.
SavedObjectsImportSimpleWarning A simple informative warning that will be displayed to the user.
SavedObjectsImportSuccess Represents a successful import.
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
UserProvidedValues Describes the values explicitly set by user.

Variables

Variable Description
URL_MAX_LENGTH The max URL length allowed by the current browser. Should be used to display warnings to users when query parameters cause URL to exceed this limit.

Type Aliases

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.
AppSearchDeepLink Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or searchDeepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible.
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
ChromeHelpExtensionLinkBase
ChromeHelpExtensionMenuLink
ChromeNavLinkUpdateableFields
FatalErrorsStart FatalErrors stop the Kibana Public Core and displays a fatal error screen with details about the Kibana build and the error.
HttpStart See HttpSetup
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
PublicAppInfo Public information about a registered application
PublicAppMetaInfo Public information about a registered app's keywords
PublicAppSearchDeepLinkInfo Public information about a registered app's searchDeepLinks
PublicUiSettingsParams A sub-set of UiSettingsParams exposed to the client-side.
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
SavedObjectsImportWarning Composite type of all the possible types of import warnings.See SavedObjectsImportSimpleWarning and SavedObjectsImportActionRequiredWarning for more details.
SavedObjectsNamespaceType The namespace type dictates how a saved object can be interacted in relation to namespaces. Each type is mutually exclusive: * single (default): This type of saved object is namespace-isolated, e.g., it exists in only one namespace. * multiple: This type of saved object is shareable, e.g., it can exist in one or more namespaces. * multiple-isolated: This type of saved object is namespace-isolated, e.g., it exists in only one namespace, but object IDs must be unique across all namespaces. This is intended to be an intermediate step when objects with a "single" namespace type are being converted to a "multiple" namespace type. In other words, objects with a "multiple-isolated" namespace type will be *share-capable*, but will not actually be shareable until the namespace type is changed to "multiple". * agnostic: This type of saved object is global.
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