From 8945b56fe2c2f40c5c8fc70021afebf46310e5a3 Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Thu, 4 Apr 2019 20:59:09 +0200 Subject: [PATCH] [7.x] Generate core API docs from TSDoc comments (#32148) (#34421) * Generate core API docs from TSDoc comments (#32148) * Generate core API docs from TSDoc comments Uses api-extractor and api-documenter to generate documentation for the Kibana core API from TSDoc comments in the source code. Documentation can be generated using `npm run docs:api`. I used --no-verify to ignore the following pre-commit hook errors: 1. Filenames MUST use snake_case - api-extractor.json It's possible to specify a different config file, but I prefer to keep the "standard" config file name. 2. UNHANDLED ERROR: Unable to find tsconfig.json file selecting "common/core_api_review/kibana.api.ts". Ensure one exists and it is listed in "src/dev/typescript/projects.ts" This is not a source file, so safe to ignore. * Flesh out API docs a little bit * Ignore snake_case check for api-extractor.json * Ignore api-extractor's review file from pre-commit check * Try to fix build failing by using masters yarn.lock * I'm being stupid * Found a better home for ignoring common/core_api_review/kibana.api.ts * Node script for detecting core API changes I initially wanted to include this as a precommit hook, but it takes quite long to execute (~12s) so might be better suited as a test or as part of the release process. The script currently fails because api-extractor uses an older version of typescript. * Fix tslint precommit hook ignore condition * Write tsdoc-metadata.json into ./build * Add LogMeta and ElasticSearch to exported types & docs * Suppress logging when running api-extractor from script * Improve check_core_api_changes script and run as test * Inline api-extractor.json config * Fix check_core_api_changes --help flag * LogMeta TSDoc comments * check_core_api_changes: fail if api-extractor produces warnings or errors And print more useful messages to the console * Move ignored ts files list into dev/file * Add back build:types since api-exporter cannot operate on source files * Upgrade api-exporter/documenter * api-extractor: independantly analyze core/public and core/server Becasue of https://github.com/Microsoft/web-build-tools/issues/1029 api-extractor can't use core/index.ts as a single entry point for analyzing the public and server API's as isolated namespaces. Instead we analyze these projects separately. This introduces other problems like the api review files and documentation always being called "kibana." from the package.json filename. * Build types as part of build task * Include types in typescript browser compilation * Force inclusion of core/public for building types * Fix api review filename in api-exporter errors * Update docs and API review files * Fix api-extractor warnings * Remove ts file ignored list since it's no longer necessary * Rename exported api package name * Review comments * Export other missing types * Upgrade api-documenter to latest beta * Export more missing types * Fix warnings and add api-exporter to Jenkins tests * Correctly handle runBuildTypes() exceptions * Fix another swallowed exception * Fix api-extractor warnings after master merge * Update yarn.lock * Fix erraneous type * Revert "Update yarn.lock" This reverts commit 85a8093015bc823554ba71e002933bc1f3afcaa4. * Revert "Fix erraneous type" This reverts commit 7f0550c0aec1159721be8e632e71de27f512679d. * Backport https://github.com/elastic/kibana/pull/32440 * Update core api signature and docs --- .../kibana-plugin-public.basepathsetup.md | 10 + .../kibana-plugin-public.chromebrand.logo.md | 9 + .../kibana-plugin-public.chromebrand.md | 18 ++ ...ana-plugin-public.chromebrand.smalllogo.md | 9 + ...-public.chromebreadcrumb.data-test-subj.md | 9 + ...ana-plugin-public.chromebreadcrumb.href.md | 9 + .../kibana-plugin-public.chromebreadcrumb.md | 19 ++ ...ana-plugin-public.chromebreadcrumb.text.md | 9 + ...ibana-plugin-public.chromehelpextension.md | 10 + .../kibana-plugin-public.chromesetup.md | 10 + ...kibana-plugin-public.coresetup.basepath.md | 9 + .../kibana-plugin-public.coresetup.chrome.md | 9 + ...ana-plugin-public.coresetup.fatalerrors.md | 9 + .../kibana-plugin-public.coresetup.http.md | 9 + .../kibana-plugin-public.coresetup.i18n.md | 9 + ...lugin-public.coresetup.injectedmetadata.md | 9 + .../public/kibana-plugin-public.coresetup.md | 25 ++ ...a-plugin-public.coresetup.notifications.md | 9 + ...bana-plugin-public.coresetup.uisettings.md | 9 + .../kibana-plugin-public.fatalerrorssetup.md | 10 + .../public/kibana-plugin-public.httpsetup.md | 10 + .../public/kibana-plugin-public.i18nsetup.md | 10 + ...ana-plugin-public.injectedmetadatasetup.md | 10 + .../core/public/kibana-plugin-public.md | 39 +++ ...kibana-plugin-public.notificationssetup.md | 10 + .../public/kibana-plugin-public.plugin.md | 19 ++ .../kibana-plugin-public.plugin.setup.md | 9 + .../kibana-plugin-public.plugin.stop.md | 9 + .../kibana-plugin-public.plugininitializer.md | 11 + ...-plugin-public.plugininitializercontext.md | 11 + ...ugin-public.pluginsetupcontext.basepath.md | 9 + ...plugin-public.pluginsetupcontext.chrome.md | 9 + ...n-public.pluginsetupcontext.fatalerrors.md | 9 + ...a-plugin-public.pluginsetupcontext.i18n.md | 9 + ...kibana-plugin-public.pluginsetupcontext.md | 23 ++ ...public.pluginsetupcontext.notifications.md | 9 + ...in-public.pluginsetupcontext.uisettings.md | 9 + .../public/kibana-plugin-public.toastinput.md | 10 + .../kibana-plugin-public.toastssetup.add.md | 20 ++ ...ana-plugin-public.toastssetup.adddanger.md | 20 ++ ...na-plugin-public.toastssetup.addsuccess.md | 20 ++ ...na-plugin-public.toastssetup.addwarning.md | 20 ++ .../kibana-plugin-public.toastssetup.get$.md | 13 + .../kibana-plugin-public.toastssetup.md | 22 ++ ...kibana-plugin-public.toastssetup.remove.md | 20 ++ ...ana-plugin-public.uisettingsclient.get$.md | 23 ++ ...bana-plugin-public.uisettingsclient.get.md | 23 ++ ...a-plugin-public.uisettingsclient.getall.md | 15 + ...lugin-public.uisettingsclient.getsaved$.md | 23 ++ ...ugin-public.uisettingsclient.getupdate$.md | 23 ++ ...plugin-public.uisettingsclient.iscustom.md | 22 ++ ...ugin-public.uisettingsclient.isdeclared.md | 22 ++ ...lugin-public.uisettingsclient.isdefault.md | 22 ++ ...in-public.uisettingsclient.isoverridden.md | 22 ++ .../kibana-plugin-public.uisettingsclient.md | 35 +++ ...c.uisettingsclient.overridelocaldefault.md | 23 ++ ...a-plugin-public.uisettingsclient.params.md | 9 + ...a-plugin-public.uisettingsclient.remove.md | 22 ++ ...bana-plugin-public.uisettingsclient.set.md | 23 ++ ...ana-plugin-public.uisettingsclient.stop.md | 15 + .../kibana-plugin-public.uisettingssetup.md | 10 + .../kibana-plugin-public.uisettingsstate.md | 10 + .../server/kibana-plugin-server.apicaller.md | 10 + .../kibana-plugin-server.callapioptions.md | 18 ++ ...gin-server.callapioptions.wrap401errors.md | 11 + ...na-plugin-server.clusterclient.asscoped.md | 24 ++ ...server.clusterclient.callasinternaluser.md | 11 + ...ibana-plugin-server.clusterclient.close.md | 15 + .../kibana-plugin-server.clusterclient.md | 25 ++ ...a-plugin-server.coresetup.elasticsearch.md | 9 + .../kibana-plugin-server.coresetup.http.md | 9 + .../server/kibana-plugin-server.coresetup.md | 19 ++ .../kibana-plugin-server.coresetup.plugins.md | 9 + ...plugin-server.elasticsearchclientconfig.md | 14 + .../server/kibana-plugin-server.headers.md | 10 + .../kibana-plugin-server.logger.debug.md | 23 ++ .../kibana-plugin-server.logger.error.md | 23 ++ .../kibana-plugin-server.logger.fatal.md | 23 ++ .../kibana-plugin-server.logger.info.md | 23 ++ .../server/kibana-plugin-server.logger.md | 23 ++ .../kibana-plugin-server.logger.trace.md | 23 ++ .../kibana-plugin-server.logger.warn.md | 23 ++ .../kibana-plugin-server.loggerfactory.get.md | 22 ++ .../kibana-plugin-server.loggerfactory.md | 18 ++ .../server/kibana-plugin-server.logmeta.md | 11 + .../core/server/kibana-plugin-server.md | 32 +++ ...-server.plugininitializercontext.config.md | 12 + ...gin-server.plugininitializercontext.env.md | 11 + ...-server.plugininitializercontext.logger.md | 9 + ...-plugin-server.plugininitializercontext.md | 20 ++ .../server/kibana-plugin-server.pluginname.md | 11 + ...server.pluginsetupcontext.elasticsearch.md | 12 + ...kibana-plugin-server.pluginsetupcontext.md | 18 ++ ...r.scopedclusterclient.callascurrentuser.md | 24 ++ ....scopedclusterclient.callasinternaluser.md | 24 ++ ...ibana-plugin-server.scopedclusterclient.md | 19 ++ kibana.d.ts | 5 +- package.json | 6 +- scripts/check_core_api_changes.js | 21 ++ src/core/index.ts | 1 - .../public/base_path/base_path_service.ts | 2 + src/core/public/chrome/chrome_service.ts | 5 + .../fatal_errors/fatal_errors_service.tsx | 2 + src/core/public/http/http_service.ts | 2 + src/core/public/i18n/i18n_service.tsx | 2 + src/core/public/index.ts | 6 + .../injected_metadata_service.ts | 4 + src/core/public/kibana.api.md | 258 ++++++++++++++++++ .../notifications/notifications_service.ts | 10 +- .../notifications/toasts/toasts_start.tsx | 2 + src/core/public/ui_settings/types.ts | 1 + .../public/ui_settings/ui_settings_client.ts | 6 +- .../public/ui_settings/ui_settings_service.ts | 11 +- src/core/server/bootstrap.ts | 4 +- .../server/elasticsearch/cluster_client.ts | 24 +- .../elasticsearch_client_config.ts | 4 +- src/core/server/elasticsearch/index.ts | 2 + .../elasticsearch/scoped_cluster_client.ts | 24 +- src/core/server/http/router/headers.ts | 1 + src/core/server/index.ts | 12 +- src/core/server/kibana.api.md | 196 +++++++++++++ src/core/server/logging/index.ts | 4 +- src/core/server/logging/log_level.ts | 6 +- src/core/server/logging/logger.ts | 45 +++ src/core/server/logging/logger_factory.ts | 5 +- src/core/server/plugins/index.ts | 3 +- src/core/server/plugins/plugin.ts | 3 + src/core/server/plugins/plugin_context.ts | 4 + .../build/tasks/typecheck_typescript_task.js | 83 ++++-- src/dev/precommit_hook/casing_check_config.js | 2 +- src/dev/run_check_core_api_changes.ts | 250 +++++++++++++++++ .../get_ts_project_for_absolute_path.ts | 4 +- tasks/config/run.js | 9 + tasks/jenkins.js | 1 + tasks/test.js | 1 + tsconfig.json | 4 +- tsconfig.types.json | 14 + yarn.lock | 150 +++++++++- 138 files changed, 2627 insertions(+), 81 deletions(-) create mode 100644 docs/development/core/public/kibana-plugin-public.basepathsetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebrand.logo.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebrand.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebrand.smalllogo.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebreadcrumb.data-test-subj.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebreadcrumb.href.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebreadcrumb.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromebreadcrumb.text.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromehelpextension.md create mode 100644 docs/development/core/public/kibana-plugin-public.chromesetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.basepath.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.chrome.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.fatalerrors.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.http.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.i18n.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.injectedmetadata.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.notifications.md create mode 100644 docs/development/core/public/kibana-plugin-public.coresetup.uisettings.md create mode 100644 docs/development/core/public/kibana-plugin-public.fatalerrorssetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.httpsetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.i18nsetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.injectedmetadatasetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.md create mode 100644 docs/development/core/public/kibana-plugin-public.notificationssetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.plugin.md create mode 100644 docs/development/core/public/kibana-plugin-public.plugin.setup.md create mode 100644 docs/development/core/public/kibana-plugin-public.plugin.stop.md create mode 100644 docs/development/core/public/kibana-plugin-public.plugininitializer.md create mode 100644 docs/development/core/public/kibana-plugin-public.plugininitializercontext.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.basepath.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.chrome.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.fatalerrors.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.i18n.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.notifications.md create mode 100644 docs/development/core/public/kibana-plugin-public.pluginsetupcontext.uisettings.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastinput.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.add.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.adddanger.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.addsuccess.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.addwarning.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.get$.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.toastssetup.remove.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.get$.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.get.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.getall.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.getsaved$.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.getupdate$.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.iscustom.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.isdeclared.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.isdefault.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.isoverridden.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.overridelocaldefault.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.params.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.remove.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.set.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsclient.stop.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingssetup.md create mode 100644 docs/development/core/public/kibana-plugin-public.uisettingsstate.md create mode 100644 docs/development/core/server/kibana-plugin-server.apicaller.md create mode 100644 docs/development/core/server/kibana-plugin-server.callapioptions.md create mode 100644 docs/development/core/server/kibana-plugin-server.callapioptions.wrap401errors.md create mode 100644 docs/development/core/server/kibana-plugin-server.clusterclient.asscoped.md create mode 100644 docs/development/core/server/kibana-plugin-server.clusterclient.callasinternaluser.md create mode 100644 docs/development/core/server/kibana-plugin-server.clusterclient.close.md create mode 100644 docs/development/core/server/kibana-plugin-server.clusterclient.md create mode 100644 docs/development/core/server/kibana-plugin-server.coresetup.elasticsearch.md create mode 100644 docs/development/core/server/kibana-plugin-server.coresetup.http.md create mode 100644 docs/development/core/server/kibana-plugin-server.coresetup.md create mode 100644 docs/development/core/server/kibana-plugin-server.coresetup.plugins.md create mode 100644 docs/development/core/server/kibana-plugin-server.elasticsearchclientconfig.md create mode 100644 docs/development/core/server/kibana-plugin-server.headers.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.debug.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.error.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.fatal.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.info.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.trace.md create mode 100644 docs/development/core/server/kibana-plugin-server.logger.warn.md create mode 100644 docs/development/core/server/kibana-plugin-server.loggerfactory.get.md create mode 100644 docs/development/core/server/kibana-plugin-server.loggerfactory.md create mode 100644 docs/development/core/server/kibana-plugin-server.logmeta.md create mode 100644 docs/development/core/server/kibana-plugin-server.md create mode 100644 docs/development/core/server/kibana-plugin-server.plugininitializercontext.config.md create mode 100644 docs/development/core/server/kibana-plugin-server.plugininitializercontext.env.md create mode 100644 docs/development/core/server/kibana-plugin-server.plugininitializercontext.logger.md create mode 100644 docs/development/core/server/kibana-plugin-server.plugininitializercontext.md create mode 100644 docs/development/core/server/kibana-plugin-server.pluginname.md create mode 100644 docs/development/core/server/kibana-plugin-server.pluginsetupcontext.elasticsearch.md create mode 100644 docs/development/core/server/kibana-plugin-server.pluginsetupcontext.md create mode 100644 docs/development/core/server/kibana-plugin-server.scopedclusterclient.callascurrentuser.md create mode 100644 docs/development/core/server/kibana-plugin-server.scopedclusterclient.callasinternaluser.md create mode 100644 docs/development/core/server/kibana-plugin-server.scopedclusterclient.md create mode 100644 scripts/check_core_api_changes.js create mode 100644 src/core/public/kibana.api.md create mode 100644 src/core/server/kibana.api.md create mode 100644 src/dev/run_check_core_api_changes.ts create mode 100644 tsconfig.types.json 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 000000000000..ad6b1e9921f9 --- /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 000000000000..3f04de76731d --- /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 000000000000..9960fb0b6460 --- /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 000000000000..2b79659481c1 --- /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 000000000000..1f37f92eed75 --- /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 000000000000..cac3f9fd6729 --- /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 000000000000..d900336f3814 --- /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 000000000000..c85a53f2f4af --- /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 000000000000..6945ddb08b4b --- /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 000000000000..6297ca2a0a4b --- /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 000000000000..6aac0337e73d --- /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 000000000000..0842021b1178 --- /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 000000000000..06f685dd0769 --- /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 000000000000..c52e3dc00c98 --- /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 000000000000..8a463c92cfd9 --- /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 000000000000..87d0d8578f3d --- /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 000000000000..eab2f5ea6429 --- /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 000000000000..a7f36bca4635 --- /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 000000000000..5c6ca3886ff4 --- /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 000000000000..5159f9e9499c --- /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 000000000000..a458aab3e8b0 --- /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 000000000000..7df40cc6324c --- /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 000000000000..094d0e2a15a4 --- /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 000000000000..fb55da12b0e7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.md @@ -0,0 +1,39 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) + +## kibana-plugin-public package + +## Classes + +| Class | Description | +| --- | --- | +| [ToastsSetup](./kibana-plugin-public.toastssetup.md) | | +| [UiSettingsClient](./kibana-plugin-public.uisettingsclient.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [ChromeBrand](./kibana-plugin-public.chromebrand.md) | | +| [ChromeBreadcrumb](./kibana-plugin-public.chromebreadcrumb.md) | | +| [CoreSetup](./kibana-plugin-public.coresetup.md) | Core services exposed to the start lifecycle | +| [Plugin](./kibana-plugin-public.plugin.md) | The interface that should be returned by a PluginInitializer. | +| [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md) | The available core services passed to a PluginInitializer | +| [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) | The available core services passed to a plugin's Plugin#setup method. | +| [UiSettingsState](./kibana-plugin-public.uisettingsstate.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [BasePathSetup](./kibana-plugin-public.basepathsetup.md) | | +| [ChromeHelpExtension](./kibana-plugin-public.chromehelpextension.md) | | +| [ChromeSetup](./kibana-plugin-public.chromesetup.md) | | +| [FatalErrorsSetup](./kibana-plugin-public.fatalerrorssetup.md) | | +| [HttpSetup](./kibana-plugin-public.httpsetup.md) | | +| [I18nSetup](./kibana-plugin-public.i18nsetup.md) | | +| [InjectedMetadataSetup](./kibana-plugin-public.injectedmetadatasetup.md) | | +| [NotificationsSetup](./kibana-plugin-public.notificationssetup.md) | | +| [PluginInitializer](./kibana-plugin-public.plugininitializer.md) | The plugin export at the root of a plugin's public directory should conform to this interface. | +| [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 000000000000..f0afc34b3e3c --- /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.plugin.md b/docs/development/core/public/kibana-plugin-public.plugin.md new file mode 100644 index 000000000000..7a47ca7b97f6 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.plugin.md @@ -0,0 +1,19 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) + +## Plugin interface + +The interface that should be returned by a `PluginInitializer`. + +Signature: + +```typescript +export interface Plugin = +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [setup](./kibana-plugin-public.plugin.setup.md) | (core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise<TSetup> | | +| [stop](./kibana-plugin-public.plugin.stop.md) | () => void | | + diff --git a/docs/development/core/public/kibana-plugin-public.plugin.setup.md b/docs/development/core/public/kibana-plugin-public.plugin.setup.md new file mode 100644 index 000000000000..b2ebc4ca4f94 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.plugin.setup.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [setup](./kibana-plugin-public.plugin.setup.md) + +## Plugin.setup property + +Signature: + +```typescript +setup: (core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise; +``` diff --git a/docs/development/core/public/kibana-plugin-public.plugin.stop.md b/docs/development/core/public/kibana-plugin-public.plugin.stop.md new file mode 100644 index 000000000000..1dad1e54606c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.plugin.stop.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [Plugin](./kibana-plugin-public.plugin.md) > [stop](./kibana-plugin-public.plugin.stop.md) + +## Plugin.stop property + +Signature: + +```typescript +stop?: () => void; +``` diff --git a/docs/development/core/public/kibana-plugin-public.plugininitializer.md b/docs/development/core/public/kibana-plugin-public.plugininitializer.md new file mode 100644 index 000000000000..3f288746ce31 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.plugininitializer.md @@ -0,0 +1,11 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializer](./kibana-plugin-public.plugininitializer.md) + +## PluginInitializer type + +The `plugin` export at the root of a plugin's `public` directory should conform to this interface. + +Signature: + +```typescript +export declare type PluginInitializer = {}> = (core: PluginInitializerContext) => Plugin; +``` diff --git a/docs/development/core/public/kibana-plugin-public.plugininitializercontext.md b/docs/development/core/public/kibana-plugin-public.plugininitializercontext.md new file mode 100644 index 000000000000..0617089896e5 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.plugininitializercontext.md @@ -0,0 +1,11 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginInitializerContext](./kibana-plugin-public.plugininitializercontext.md) + +## PluginInitializerContext interface + +The available core services passed to a `PluginInitializer` + +Signature: + +```typescript +export interface PluginInitializerContext +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.basepath.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.basepath.md new file mode 100644 index 000000000000..aa3b27e116a3 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.basepath.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md) + +## PluginSetupContext.basePath property + +Signature: + +```typescript +basePath: BasePathSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.chrome.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.chrome.md new file mode 100644 index 000000000000..9df3f984315c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.chrome.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md) + +## PluginSetupContext.chrome property + +Signature: + +```typescript +chrome: ChromeSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.fatalerrors.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.fatalerrors.md new file mode 100644 index 000000000000..cb45ef78a4da --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.fatalerrors.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md) + +## PluginSetupContext.fatalErrors property + +Signature: + +```typescript +fatalErrors: FatalErrorsSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.i18n.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.i18n.md new file mode 100644 index 000000000000..8f9f01377641 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.i18n.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md) + +## PluginSetupContext.i18n property + +Signature: + +```typescript +i18n: I18nSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.md new file mode 100644 index 000000000000..3a0de5508fd7 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.md @@ -0,0 +1,23 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) + +## PluginSetupContext interface + +The available core services passed to a plugin's `Plugin#setup` method. + +Signature: + +```typescript +export interface PluginSetupContext +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [basePath](./kibana-plugin-public.pluginsetupcontext.basepath.md) | BasePathSetup | | +| [chrome](./kibana-plugin-public.pluginsetupcontext.chrome.md) | ChromeSetup | | +| [fatalErrors](./kibana-plugin-public.pluginsetupcontext.fatalerrors.md) | FatalErrorsSetup | | +| [i18n](./kibana-plugin-public.pluginsetupcontext.i18n.md) | I18nSetup | | +| [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md) | NotificationsSetup | | +| [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md) | UiSettingsSetup | | + diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.notifications.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.notifications.md new file mode 100644 index 000000000000..21321eceb1c1 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.notifications.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [notifications](./kibana-plugin-public.pluginsetupcontext.notifications.md) + +## PluginSetupContext.notifications property + +Signature: + +```typescript +notifications: NotificationsSetup; +``` diff --git a/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.uisettings.md b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.uisettings.md new file mode 100644 index 000000000000..b8d9aa4d6c94 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-public.pluginsetupcontext.uisettings.md @@ -0,0 +1,9 @@ +[Home](./index) > [kibana-plugin-public](./kibana-plugin-public.md) > [PluginSetupContext](./kibana-plugin-public.pluginsetupcontext.md) > [uiSettings](./kibana-plugin-public.pluginsetupcontext.uisettings.md) + +## PluginSetupContext.uiSettings property + +Signature: + +```typescript +uiSettings: UiSettingsSetup; +``` 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 000000000000..e4c2ebc999c9 --- /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 000000000000..997b6ba2ad0e --- /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 000000000000..d1aaf7de08df --- /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 000000000000..6c6a969b925c --- /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 000000000000..ff82e2fe602b --- /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 000000000000..72e12d342dd7 --- /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 000000000000..9f297a08ae91 --- /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 000000000000..8cf7d54b167d --- /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 000000000000..43c0bcd89087 --- /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 000000000000..90a6d438c5d2 --- /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 000000000000..32be8e508590 --- /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 000000000000..406c29bd407e --- /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 000000000000..1e3ff5058e60 --- /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 000000000000..768033287f83 --- /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 000000000000..4e2c58df5c6c --- /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 000000000000..badc7274c664 --- /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 000000000000..9ab6410f3de2 --- /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 000000000000..7a0a635ab653 --- /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 000000000000..f0989b8059fa --- /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 000000000000..4aabae2e131d --- /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 000000000000..d0af026bb9e1 --- /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 000000000000..ae570dff4aa7 --- /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 000000000000..777d24f9e7e6 --- /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 000000000000..e8bcec00b23d --- /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 000000000000..da95a01d0ab5 --- /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 000000000000..177bce7d622c --- /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 000000000000..8936b4f4af85 --- /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 000000000000..e307dfb5e2bd --- /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 000000000000..75f73069de3c --- /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 000000000000..b593c6c80126 --- /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 000000000000..5218adf8d33f --- /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 000000000000..ab52e5b72847 --- /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 000000000000..49123927ebf6 --- /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 000000000000..7a667bf6b6f2 --- /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 000000000000..0582648f55a8 --- /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 000000000000..4d5f73d00dd8 --- /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 000000000000..065b47fd8284 --- /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 000000000000..f4f748569f00 --- /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 000000000000..7d731da2240e --- /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 000000000000..e95d452d69f8 --- /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 000000000000..b59ea300b497 --- /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 000000000000..8819f5282f16 --- /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 000000000000..05df16accfb4 --- /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 000000000000..06542032daf8 --- /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 000000000000..690d8ec5ad96 --- /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 000000000000..0d46467594c4 --- /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 000000000000..cd9a18ad2ed8 --- /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 000000000000..6dcbb4b6291a --- /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 000000000000..b1066bff9a1d --- /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 000000000000..ebad1d465034 --- /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 000000000000..f3cbfa2c88a7 --- /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 000000000000..aeb62bcf490e --- /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 000000000000..f59fd0fb37de --- /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 000000000000..043e87ee99f4 --- /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 000000000000..3ec1c11c2122 --- /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 000000000000..6a4e1e16352a --- /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 000000000000..6e43950fd9c8 --- /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 000000000000..68373c3978b7 --- /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 000000000000..e4070f181706 --- /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 10c6bdaa1efd..74890f1d70f4 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 6b7c4fa85307..35ca7575f703 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", @@ -259,6 +261,8 @@ "@kbn/expect": "1.0.0", "@kbn/plugin-generator": "1.0.0", "@kbn/test": "1.0.0", + "@microsoft/api-documenter": "7.0.41", + "@microsoft/api-extractor": "7.0.31", "@octokit/rest": "^15.10.0", "@types/angular": "1.6.50", "@types/angular-mocks": "^1.7.0", diff --git a/scripts/check_core_api_changes.js b/scripts/check_core_api_changes.js new file mode 100644 index 000000000000..153491e0aecd --- /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 039faaff7d13..23db81469f5b 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 ddceaf13bfda..e2cb20da4609 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 b6695ced2861..71dcd6b14f37 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 654549eb3175..d0e9e11b3581 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 90310f8936ad..4121181cf80e 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 1955a012018d..ed8ace7d66c2 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 80eddbaa0c97..d981b319636d 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -27,8 +27,14 @@ import { NotificationsSetup, Toast, ToastInput, ToastsSetup } from './notificati import { Plugin, PluginInitializer, PluginInitializerContext, PluginSetupContext } from './plugins'; import { UiSettingsClient, UiSettingsSetup, UiSettingsState } from './ui_settings'; +/** @interal */ export { CoreContext, 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 119eee102751..85001fbd3de3 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( @@ -114,4 +117,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 000000000000..a9615cc935a0 --- /dev/null +++ b/src/core/public/kibana.api.md @@ -0,0 +1,258 @@ +## 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 { Observable } from 'rxjs'; +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; + +// Warning: (ae-internal-missing-underscore) The name CoreContext should be prefixed with an underscore because the declaration is marked as "@internal" +// +// @internal (undocumented) +export interface CoreContext { +} + +// @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(): Promise<{ + 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; + +// @public +export interface Plugin = {}> { + // (undocumented) + setup: (core: PluginSetupContext, dependencies: TDependencies) => TSetup | Promise; + // (undocumented) + stop?: () => void; +} + +// @public +export type PluginInitializer = {}> = (core: PluginInitializerContext) => Plugin; + +// @public +export interface PluginInitializerContext { +} + +// @public +export interface PluginSetupContext { + // (undocumented) + basePath: BasePathSetup; + // (undocumented) + chrome: ChromeSetup; + // (undocumented) + fatalErrors: FatalErrorsSetup; + // (undocumented) + i18n: I18nSetup; + // (undocumented) + notifications: NotificationsSetup; + // (undocumented) + uiSettings: UiSettingsSetup; +} + +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 d9349a8cc540..0ddd042dcb67 100644 --- a/src/core/public/notifications/notifications_service.ts +++ b/src/core/public/notifications/notifications_service.ts @@ -21,14 +21,15 @@ import { Observable, Subject, Subscription } from 'rxjs'; import { I18nSetup } from '../i18n'; import { ToastsService } from './toasts'; -interface Params { +interface NotificationServiceParams { targetDomElement$: Observable; } -interface Deps { +interface NotificationsServiceDeps { i18n: I18nSetup; } +/** @public */ export class NotificationsService { private readonly toasts: ToastsService; @@ -36,14 +37,14 @@ export class NotificationsService { private domElemSubscription?: Subscription; private targetDomElement?: HTMLElement; - constructor(private readonly params: Params) { + constructor(private readonly params: NotificationServiceParams) { this.toastsContainer$ = new Subject(); this.toasts = new ToastsService({ targetDomElement$: this.toastsContainer$.asObservable(), }); } - public setup({ i18n }: Deps) { + public setup({ i18n }: NotificationsServiceDeps) { this.domElemSubscription = this.params.targetDomElement$.subscribe({ next: targetDomElement => { this.cleanupTargetDomElement(); @@ -74,4 +75,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 c8153f524da3..28e77943724e 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 4fa4109c7bc2..271436c0e7fe 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 b996a25ca806..983289afd498 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 b7b7b64c06c8..8162da7e1f0c 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 6441becc1a8e..766eb09032a9 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 76d7338983ec..917bb1b93e37 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 5df2c32b7d3b..9fe56bf8c7e5 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 cc35c9b75e32..0f60864dcc5d 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 0d0922d80c99..6e4075cbfade 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 bed1a65c0789..d578542d7a9c 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 f0d665875d11..a2d1761259ef 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 000000000000..f1deeb33e331 --- /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 51268cb64628..a99ee9ec12e8 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 b4fe529e9857..8493dd4a848d 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 1298fdd9030f..e10e79d5cf45 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 10e7608eb7a9..47bebaca8d7a 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 5d392abccb4f..036fd20c7993 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 fc2e63d0f071..68afc7152636 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 fefb205e0289..6951aa1b461c 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 000000000000..1a52205955b9 --- /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 843743fd7a3b..68ce70685b60 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 60e7ff3d12f5..a521e300a629 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 47b9429fed00..62b0ba0b4ac0 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 ee6d0e87d95a..f82ec7a7fd70 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 d9750b3f259d..80c255ded322 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 000000000000..634a423b96e3 --- /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 0b8876ae7abc..2f79be060ce2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1670,6 +1670,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" @@ -2305,6 +2370,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" @@ -2557,6 +2627,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" @@ -2681,6 +2758,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" @@ -2827,7 +2909,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== @@ -3195,6 +3277,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" @@ -4382,7 +4469,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== @@ -7070,6 +7157,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" @@ -7143,6 +7235,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" @@ -11229,7 +11326,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== @@ -14934,6 +15031,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" @@ -15068,6 +15170,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" @@ -16078,7 +16188,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= @@ -21616,6 +21726,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" @@ -21630,13 +21747,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" @@ -24886,7 +24996,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== @@ -25476,6 +25586,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" @@ -27092,6 +27207,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"