diff --git a/.buildkite/pipelines/pull_request/deploy_cloud.yml b/.buildkite/pipelines/pull_request/deploy_cloud.yml index c6a15ec32e179b..7185911953232f 100644 --- a/.buildkite/pipelines/pull_request/deploy_cloud.yml +++ b/.buildkite/pipelines/pull_request/deploy_cloud.yml @@ -2,6 +2,10 @@ steps: - command: .buildkite/scripts/steps/cloud/build_and_deploy.sh label: 'Build and Deploy to Cloud' agents: - queue: n2-2 + queue: n2-2-spot depends_on: build timeout_in_minutes: 30 + retry: + automatic: + - exit_status: '-1' + limit: 3 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2c39e3171b7548..3fb8a5f2d1b8e8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -116,6 +116,7 @@ /x-pack/plugins/monitoring/ @elastic/infra-monitoring-ui /x-pack/test/functional/apps/monitoring @elastic/infra-monitoring-ui /x-pack/test/api_integration/apis/monitoring @elastic/infra-monitoring-ui +/x-pack/test/api_integration/apis/monitoring_collection @elastic/infra-monitoring-ui # Fleet /fleet_packages.json @elastic/fleet @@ -150,9 +151,6 @@ # Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime) /x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime /x-pack/plugins/apm/public/components/app/rum_dashboard @elastic/uptime -/x-pack/plugins/apm/server/lib/rum_client @elastic/uptime -/x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime -/x-pack/plugins/apm/server/projections/rum_page_load_transactions.ts @elastic/uptime /x-pack/test/apm_api_integration/tests/csm/ @elastic/uptime ### END Observability Plugins @@ -268,6 +266,8 @@ /test/functional/services/common @elastic/kibana-qa /test/functional/services/lib @elastic/kibana-qa /test/functional/services/remote @elastic/kibana-qa +/test/visual_regression @elastic/kibana-qa +/x-pack/test/visual_regression @elastic/kibana-qa # Core /examples/hello_world/ @elastic/kibana-core @@ -275,6 +275,7 @@ /src/plugins/saved_objects_tagging_oss @elastic/kibana-core /config/kibana.yml @elastic/kibana-core /typings/ @elastic/kibana-core +/x-pack/plugins/global_search_providers @elastic/kibana-core /x-pack/plugins/banners/ @elastic/kibana-core /x-pack/plugins/features/ @elastic/kibana-core /x-pack/plugins/licensing/ @elastic/kibana-core @@ -331,8 +332,9 @@ # Kibana Platform Security /packages/kbn-crypto/ @elastic/kibana-security /packages/kbn-handlebars/ @elastic/kibana-security -/src/core/server/http/csp/ @elastic/kibana-security @elastic/kibana-core +/packages/core/http/core-http-server-internal/src/csp/ @elastic/kibana-security @elastic/kibana-core /src/plugins/interactive_setup/ @elastic/kibana-security +/src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security /test/interactive_setup_api_integration/ @elastic/kibana-security /test/interactive_setup_functional/ @elastic/kibana-security /test/plugin_functional/test_suites/core_plugins/rendering.ts @elastic/kibana-security diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index 6800aeea65b9d2..efc03d8942b8d7 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -17,7 +17,3 @@ - "x-pack/plugins/synthetics/**/*.*" - "x-pack/plugins/ux/**/*.*" - "x-pack/plugins/observability/public/components/shared/exploratory_view/**/*.*" - - "x-pack/plugins/apm/server/lib/rum_client/**/*.*" - - "x-pack/plugins/apm/server/lib/rum_client/*.*" - - "x-pack/plugins/apm/server/routes/rum_client.ts" - - "x-pack/plugins/apm/server/projections/rum_overview.ts" diff --git a/.i18nrc.json b/.i18nrc.json index 073a413fabf804..08f2ff151b4c26 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -9,8 +9,7 @@ "console": "src/plugins/console", "core": [ "src/core", - "packages/core/i18n/core-i18n-browser-internal", - "packages/core/fatal-errors/core-fatal-errors-browser-internal" + "packages/core" ], "customIntegrations": "src/plugins/custom_integrations", "dashboard": "src/plugins/dashboard", diff --git a/api-documenter.json b/api-documenter.json deleted file mode 100644 index a2303b939c8ec2..00000000000000 --- a/api-documenter.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "newlineKind": "lf", - "outputTarget": "markdown" -} diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 6a3c68ad48d58f..e8945cef729e1d 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github summary: API docs for the actions plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 9bb5fe3d5b4ccf..5022616c6831dd 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github summary: API docs for the advancedSettings plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/aiops.devdocs.json b/api_docs/aiops.devdocs.json index a9675003d2e1fd..e351d2c17883e9 100644 --- a/api_docs/aiops.devdocs.json +++ b/api_docs/aiops.devdocs.json @@ -10,17 +10,11 @@ "tags": [], "label": "ExplainLogRateSpikes", "description": [ - "\nLazy-wrapped ExplainLogRateSpikes React component" + "\nLazy-wrapped ExplainLogRateSpikesWrapper React component" ], "signature": [ "(props: React.PropsWithChildren<", - { - "pluginId": "aiops", - "scope": "public", - "docId": "kibAiopsPluginApi", - "section": "def-public.ExplainLogRateSpikesProps", - "text": "ExplainLogRateSpikesProps" - }, + "ExplainLogRateSpikesWrapperProps", ">) => JSX.Element" ], "path": "x-pack/plugins/aiops/public/shared_lazy_components.tsx", @@ -37,13 +31,7 @@ ], "signature": [ "React.PropsWithChildren<", - { - "pluginId": "aiops", - "scope": "public", - "docId": "kibAiopsPluginApi", - "section": "def-public.ExplainLogRateSpikesProps", - "text": "ExplainLogRateSpikesProps" - }, + "ExplainLogRateSpikesWrapperProps", ">" ], "path": "x-pack/plugins/aiops/public/shared_lazy_components.tsx", @@ -55,59 +43,7 @@ "initialIsOpen": false } ], - "interfaces": [ - { - "parentPluginId": "aiops", - "id": "def-public.ExplainLogRateSpikesProps", - "type": "Interface", - "tags": [], - "label": "ExplainLogRateSpikesProps", - "description": [ - "\nExplainLogRateSpikes props require a data view." - ], - "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes.tsx", - "deprecated": false, - "children": [ - { - "parentPluginId": "aiops", - "id": "def-public.ExplainLogRateSpikesProps.dataView", - "type": "Object", - "tags": [], - "label": "dataView", - "description": [ - "The data view to analyze." - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - } - ], - "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes.tsx", - "deprecated": false - }, - { - "parentPluginId": "aiops", - "id": "def-public.ExplainLogRateSpikesProps.windowParameters", - "type": "Object", - "tags": [], - "label": "windowParameters", - "description": [ - "Window parameters for the analysis" - ], - "signature": [ - "WindowParameters" - ], - "path": "x-pack/plugins/aiops/public/components/explain_log_rate_spikes/explain_log_rate_spikes.tsx", - "deprecated": false - } - ], - "initialIsOpen": false - } - ], + "interfaces": [], "enums": [], "misc": [], "objects": [], diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index aeab63cb6ec32b..785d17c4eab035 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github summary: API docs for the aiops plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 0 | 0 | 0 | +| 9 | 0 | 0 | 1 | ## Client @@ -28,9 +28,6 @@ Contact [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) for q ### Functions -### Interfaces - - ## Server ### Setup diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 6de83d9c2f0ae4..17f5b697744b47 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github summary: API docs for the alerting plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 06c67d2dc29742..97812e861a6630 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -772,7 +772,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/dynamic\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/ux/page-load-distribution\" | \"GET /internal/apm/ux/page-load-distribution/breakdown\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/backend\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/profiling/timeline\" | \"GET /internal/apm/services/{serviceName}/profiling/statistics\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/backends/top_backends\" | \"GET /internal/apm/backends/upstream_services\" | \"GET /internal/apm/backends/metadata\" | \"GET /internal/apm/backends/charts/latency\" | \"GET /internal/apm/backends/charts/throughput\" | \"GET /internal/apm/backends/charts/error_rate\" | \"GET /internal/apm/backends/operations\" | \"GET /internal/apm/backends/charts/distribution\" | \"GET /internal/apm/backends/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/dynamic\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/backend\" | \"GET /internal/apm/services/{serviceName}/serviceNodes\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search\" | \"POST /api/apm/services/{serviceName}/annotation\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/profiling/timeline\" | \"GET /internal/apm/services/{serviceName}/profiling/statistics\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/sorted_and_filtered_services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_rate\" | \"GET /internal/apm/alerts/chart_preview/transaction_duration\" | \"GET /internal/apm/alerts/chart_preview/transaction_error_count\" | \"GET /api/apm/settings/agent-configuration\" | \"GET /api/apm/settings/agent-configuration/view\" | \"DELETE /api/apm/settings/agent-configuration\" | \"PUT /api/apm/settings/agent-configuration\" | \"POST /api/apm/settings/agent-configuration/search\" | \"GET /api/apm/settings/agent-configuration/environments\" | \"GET /api/apm/settings/agent-configuration/agent_name\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps\" | \"POST /api/apm/sourcemaps\" | \"DELETE /api/apm/sourcemaps/{id}\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/backends/top_backends\" | \"GET /internal/apm/backends/upstream_services\" | \"GET /internal/apm/backends/metadata\" | \"GET /internal/apm/backends/charts/latency\" | \"GET /internal/apm/backends/charts/throughput\" | \"GET /internal/apm/backends/charts/error_rate\" | \"GET /internal/apm/backends/operations\" | \"GET /internal/apm/backends/charts/distribution\" | \"GET /internal/apm/backends/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"POST /internal/apm/correlations/field_stats/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\"" ], "path": "x-pack/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -4740,90 +4740,6 @@ "ServiceAnomalyStats", " | undefined; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { 'span.destination.service.resource': string; 'span.type': string; 'span.subtype': string; label: string | undefined; id?: string | undefined; parent?: string | undefined; position?: cytoscape.Position | undefined; } | { id: string; source: string | undefined; target: string | undefined; label: string | undefined; bidirectional?: boolean | undefined; isInverseEdge?: boolean | undefined; } | undefined)[]; }; } | { data: { id: string; source: string; target: string; }; })[]; }, ", "APMRouteCreateOptions", - ">; \"GET /internal/apm/ux/page-load-distribution/breakdown\": ", - "ServerRoute", - "<\"GET /internal/apm/ux/page-load-distribution/breakdown\", ", - "TypeC", - "<{ query: ", - "IntersectionC", - "<[", - "IntersectionC", - "<[", - "TypeC", - "<{ uiFilters: ", - "StringC", - "; }>, ", - "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; }>, ", - "PartialC", - "<{ urlQuery: ", - "StringC", - "; percentile: ", - "StringC", - "; }>]>, ", - "PartialC", - "<{ minPercentile: ", - "StringC", - "; maxPercentile: ", - "StringC", - "; }>, ", - "TypeC", - "<{ breakdown: ", - "StringC", - "; }>]>; }>, ", - { - "pluginId": "apm", - "scope": "server", - "docId": "kibApmPluginApi", - "section": "def-server.APMRouteHandlerResources", - "text": "APMRouteHandlerResources" - }, - ", { pageLoadDistBreakdown: { name: string; data: { x: number; y: number; }[]; }[] | undefined; }, ", - "APMRouteCreateOptions", - ">; \"GET /internal/apm/ux/page-load-distribution\": ", - "ServerRoute", - "<\"GET /internal/apm/ux/page-load-distribution\", ", - "TypeC", - "<{ query: ", - "IntersectionC", - "<[", - "IntersectionC", - "<[", - "TypeC", - "<{ uiFilters: ", - "StringC", - "; }>, ", - "TypeC", - "<{ start: ", - "Type", - "; end: ", - "Type", - "; }>, ", - "PartialC", - "<{ urlQuery: ", - "StringC", - "; percentile: ", - "StringC", - "; }>]>, ", - "PartialC", - "<{ minPercentile: ", - "StringC", - "; maxPercentile: ", - "StringC", - "; }>]>; }>, ", - { - "pluginId": "apm", - "scope": "server", - "docId": "kibApmPluginApi", - "section": "def-server.APMRouteHandlerResources", - "text": "APMRouteHandlerResources" - }, - ", { pageLoadDistribution: { pageLoadDistribution: { x: number; y: number; }[]; percentiles: Record | undefined; minDuration: number; maxDuration: number; } | null; }, ", - "APMRouteCreateOptions", ">; \"GET /internal/apm/observability_overview/has_data\": ", "ServerRoute", "<\"GET /internal/apm/observability_overview/has_data\", undefined, ", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 1174fcd7766b59..8730e14f8beb54 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github summary: API docs for the apm plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index a9128dcfbe534e..d8f2405083928a 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github summary: API docs for the banners plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index a55e23a53a2763..463a6033a3fa29 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github summary: API docs for the bfetch plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 7225e5901480f7..986d62a680b9b6 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github summary: API docs for the canvas plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 8130986f8f37ca..51472be3d07204 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github summary: API docs for the cases plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 94d2a09976d0d7..2adb2fc9eccbf0 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github summary: API docs for the charts plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index c930bf640a69ff..2afff6557bcab6 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloud plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 66d945d6270ae9..c26f1d8683db93 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloudSecurityPosture plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 8cc43448bdab2d..094305df01eeea 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github summary: API docs for the console plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index ee8efdd4165129..988a33e511c608 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github summary: API docs for the controls plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json index 04ccf7434c847e..d2573ca167afcc 100644 --- a/api_docs/core.devdocs.json +++ b/api_docs/core.devdocs.json @@ -62,13 +62,7 @@ "label": "uiSettings", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/core/public/notifications/toasts/toasts_api.tsx", "deprecated": false @@ -1318,13 +1312,7 @@ "{@link IUiSettingsClient}" ], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/core/public/index.ts", "deprecated": false @@ -1610,13 +1598,7 @@ "{@link IUiSettingsClient}" ], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/core/public/index.ts", "deprecated": false @@ -1646,13 +1628,7 @@ "{@link DeprecationsServiceStart}" ], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.DeprecationsServiceStart", - "text": "DeprecationsServiceStart" - } + "DeprecationsServiceStart" ], "path": "src/core/public/index.ts", "deprecated": false @@ -1726,7 +1702,7 @@ "description": [ "\nDeprecationsService provides methods to fetch domain deprecation details from\nthe Kibana server.\n" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [ { @@ -1743,7 +1719,7 @@ "DomainDeprecationDetails", "[]>" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [], "returnComment": [] @@ -1762,7 +1738,7 @@ "DomainDeprecationDetails", "[]>" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [ { @@ -1775,7 +1751,7 @@ "signature": [ "string" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -1796,7 +1772,7 @@ "DomainDeprecationDetails", ") => boolean" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [ { @@ -1809,7 +1785,7 @@ "signature": [ "DomainDeprecationDetails" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -1829,16 +1805,10 @@ "(details: ", "DomainDeprecationDetails", ") => Promise<", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.ResolveDeprecationResponse", - "text": "ResolveDeprecationResponse" - }, + "ResolveDeprecationResponse", ">" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "children": [ { @@ -1851,7 +1821,7 @@ "signature": [ "DomainDeprecationDetails" ], - "path": "src/core/public/deprecations/deprecations_service.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4481,7 +4451,7 @@ "description": [ "\nClient-side client that provides access to the advanced settings stored in elasticsearch.\nThe settings provide control over the behavior of the Kibana application.\nFor example, a user can specify how to display numeric or date fields.\nUsers can adjust the settings via Management UI.\n{@link IUiSettingsClient}\n" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4496,7 +4466,7 @@ "signature": [ "(key: string, defaultOverride?: T | undefined) => T" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4509,7 +4479,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true }, @@ -4523,7 +4493,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": false } @@ -4544,7 +4514,7 @@ "Observable", "" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4557,7 +4527,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true }, @@ -4571,7 +4541,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": false } @@ -4594,7 +4564,7 @@ "UserProvidedValues", ">>" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [], "returnComment": [] @@ -4611,7 +4581,7 @@ "signature": [ "(key: string, value: any) => Promise" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4624,7 +4594,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true }, @@ -4638,7 +4608,7 @@ "signature": [ "any" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4657,7 +4627,7 @@ "signature": [ "(key: string) => Promise" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4670,7 +4640,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4689,7 +4659,7 @@ "signature": [ "(key: string) => boolean" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4702,7 +4672,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4721,7 +4691,7 @@ "signature": [ "(key: string) => boolean" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4734,7 +4704,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4753,7 +4723,7 @@ "signature": [ "(key: string) => boolean" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4766,7 +4736,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4785,7 +4755,7 @@ "signature": [ "(key: string) => boolean" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -4798,7 +4768,7 @@ "signature": [ "string" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "isRequired": true } @@ -4819,7 +4789,7 @@ "Observable", "<{ key: string; newValue: T; oldValue: T; }>" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [], "returnComment": [] @@ -4838,7 +4808,7 @@ "Observable", "" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [], "returnComment": [] @@ -8795,7 +8765,7 @@ "UiSettingsParams", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ { @@ -8810,7 +8780,7 @@ "signature": [ "string | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8825,7 +8795,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8840,7 +8810,7 @@ "signature": [ "string | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8855,7 +8825,7 @@ "signature": [ "string[] | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8870,7 +8840,7 @@ "signature": [ "string[] | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8885,7 +8855,7 @@ "signature": [ "Record | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8900,7 +8870,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8915,7 +8885,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8930,7 +8900,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8946,7 +8916,7 @@ "UiSettingsType", " | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8962,7 +8932,7 @@ "DeprecationSettings", " | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8977,7 +8947,7 @@ "signature": [ "number | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -8991,7 +8961,7 @@ "Type", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -9008,7 +8978,7 @@ "signature": [ "{ type: string; name: string; } | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": true, "references": [ { @@ -9039,7 +9009,7 @@ "tags": [], "label": "UiSettingsState", "description": [], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false, "children": [ { @@ -9056,7 +9026,7 @@ "UserProvidedValues", "" ], - "path": "src/core/public/ui_settings/types.ts", + "path": "node_modules/@types/kbn__core-ui-settings-browser/index.d.ts", "deprecated": false } ], @@ -9075,7 +9045,7 @@ "UserProvidedValues", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ { @@ -9088,7 +9058,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -9101,7 +9071,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false } ], @@ -9180,6 +9150,21 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.DomainDeprecationDetails", + "type": "Type", + "tags": [], + "label": "DomainDeprecationDetails", + "description": [], + "signature": [ + "DeprecationsDetails", + " & { domainId: string; }" + ], + "path": "node_modules/@types/kbn__core-deprecations-common/index.d.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.EventType", @@ -9550,7 +9535,7 @@ "DeprecationSettings", " | undefined; }" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "initialIsOpen": false }, @@ -9560,11 +9545,13 @@ "type": "Type", "tags": [], "label": "ResolveDeprecationResponse", - "description": [], + "description": [ + "\nResponse from correctiveActions.api call from automatically resolving the deprecation" + ], "signature": [ "{ status: \"ok\"; } | { status: \"fail\"; reason: string; }" ], - "path": "src/core/public/deprecations/deprecations_client.ts", + "path": "node_modules/@types/kbn__core-deprecations-browser/index.d.ts", "deprecated": false, "initialIsOpen": false }, @@ -10118,7 +10105,7 @@ "signature": [ "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"image\" | \"json\" | \"markdown\" | \"select\" | \"array\"" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "initialIsOpen": false }, @@ -10161,6 +10148,92 @@ }, "server": { "classes": [ + { + "parentPluginId": "core", + "id": "def-server.CspConfig", + "type": "Class", + "tags": [], + "label": "CspConfig", + "description": [ + "\nCSP configuration for use in Kibana." + ], + "signature": [ + "CspConfig", + " implements ", + "ICspConfig" + ], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-server.CspConfig.private", + "type": "Any", + "tags": [], + "label": "#private", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.CspConfig.DEFAULT", + "type": "Object", + "tags": [], + "label": "DEFAULT", + "description": [], + "signature": [ + "CspConfig" + ], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.CspConfig.strict", + "type": "boolean", + "tags": [], + "label": "strict", + "description": [], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.CspConfig.warnLegacyBrowsers", + "type": "boolean", + "tags": [], + "label": "warnLegacyBrowsers", + "description": [], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.CspConfig.disableEmbedding", + "type": "boolean", + "tags": [], + "label": "disableEmbedding", + "description": [], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-server.CspConfig.header", + "type": "string", + "tags": [], + "label": "header", + "description": [], + "path": "node_modules/@types/kbn__core-http-server-internal/index.d.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-server.ElasticsearchConfig", @@ -11519,120 +11592,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails", - "type": "Interface", - "tags": [], - "label": "BaseDeprecationDetails", - "description": [ - "\nBase properties shared by all types of deprecations\n" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.title", - "type": "string", - "tags": [], - "label": "title", - "description": [ - "\nThe title of the deprecation.\nCheck the README for writing deprecations in `src/core/server/deprecations/README.mdx`" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.message", - "type": "string", - "tags": [], - "label": "message", - "description": [ - "\nThe description message to be displayed for the deprecation.\nCheck the README for writing deprecations in `src/core/server/deprecations/README.mdx`" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.level", - "type": "CompoundType", - "tags": [], - "label": "level", - "description": [ - "\nlevels:\n- warning: will not break deployment upon upgrade\n- critical: needs to be addressed before upgrade.\n- fetch_error: Deprecations service failed to grab the deprecation details for the domain." - ], - "signature": [ - "\"warning\" | \"critical\" | \"fetch_error\"" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.deprecationType", - "type": "CompoundType", - "tags": [], - "label": "deprecationType", - "description": [ - "\n(optional) Used to identify between different deprecation types.\nExample use case: in Upgrade Assistant, we may want to allow the user to sort by\ndeprecation type or show each type in a separate tab.\n\nFeel free to add new types if necessary.\nPredefined types are necessary to reduce having similar definitions with different keywords\nacross kibana deprecations." - ], - "signature": [ - "\"config\" | \"feature\" | undefined" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.documentationUrl", - "type": "string", - "tags": [], - "label": "documentationUrl", - "description": [ - "(optional) link to the documentation for more details on the deprecation." - ], - "signature": [ - "string | undefined" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.requireRestart", - "type": "CompoundType", - "tags": [], - "label": "requireRestart", - "description": [ - "(optional) specify the fix for this deprecation requires a full kibana restart." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.BaseDeprecationDetails.correctiveActions", - "type": "Object", - "tags": [], - "label": "correctiveActions", - "description": [ - "corrective action needed to fix this deprecation." - ], - "signature": [ - "{ api?: { path: string; method: \"POST\" | \"PUT\"; body?: { [key: string]: any; } | undefined; omitContextFromBody?: boolean | undefined; } | undefined; manualSteps: string[]; }" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "core", "id": "def-server.Capabilities", @@ -11950,59 +11909,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "core", - "id": "def-server.ConfigDeprecationDetails", - "type": "Interface", - "tags": [], - "label": "ConfigDeprecationDetails", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ConfigDeprecationDetails", - "text": "ConfigDeprecationDetails" - }, - " extends ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.BaseDeprecationDetails", - "text": "BaseDeprecationDetails" - } - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.ConfigDeprecationDetails.configPath", - "type": "string", - "tags": [], - "label": "configPath", - "description": [], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.ConfigDeprecationDetails.deprecationType", - "type": "string", - "tags": [], - "label": "deprecationType", - "description": [], - "signature": [ - "\"config\"" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "core", "id": "def-server.ConfigDeprecationFactory", @@ -13312,7 +13218,7 @@ "description": [ "\nUiSettings deprecation field options." ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ { @@ -13324,7 +13230,7 @@ "description": [ "Deprecation message" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -13336,7 +13242,7 @@ "description": [ "Key to documentation links" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false } ], @@ -14528,49 +14434,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "core", - "id": "def-server.FeatureDeprecationDetails", - "type": "Interface", - "tags": [], - "label": "FeatureDeprecationDetails", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.FeatureDeprecationDetails", - "text": "FeatureDeprecationDetails" - }, - " extends ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.BaseDeprecationDetails", - "text": "BaseDeprecationDetails" - } - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.FeatureDeprecationDetails.deprecationType", - "type": "string", - "tags": [], - "label": "deprecationType", - "description": [], - "signature": [ - "\"feature\" | undefined" - ], - "path": "src/core/server/deprecations/types.ts", - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "core", "id": "def-server.GetDeprecationsContext", @@ -25796,13 +25659,7 @@ ") => ", "MaybePromise", "<", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.DeprecationsDetails", - "text": "DeprecationsDetails" - }, + "DeprecationsDetails", "[]>" ], "path": "src/core/server/deprecations/types.ts", @@ -27346,7 +27203,7 @@ "UiSettingsParams", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ { @@ -27361,7 +27218,7 @@ "signature": [ "string | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27376,7 +27233,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27391,7 +27248,7 @@ "signature": [ "string | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27406,7 +27263,7 @@ "signature": [ "string[] | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27421,7 +27278,7 @@ "signature": [ "string[] | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27436,7 +27293,7 @@ "signature": [ "Record | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27451,7 +27308,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27466,7 +27323,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27481,7 +27338,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27497,7 +27354,7 @@ "UiSettingsType", " | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27513,7 +27370,7 @@ "DeprecationSettings", " | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27528,7 +27385,7 @@ "signature": [ "number | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27542,7 +27399,7 @@ "Type", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27559,7 +27416,7 @@ "signature": [ "{ type: string; name: string; } | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": true, "references": [ { @@ -27973,7 +27830,7 @@ "UserProvidedValues", "" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "children": [ { @@ -27986,7 +27843,7 @@ "signature": [ "T | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false }, { @@ -27999,7 +27856,7 @@ "signature": [ "boolean | undefined" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false } ], @@ -28565,23 +28422,11 @@ "label": "DeprecationsDetails", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.ConfigDeprecationDetails", - "text": "ConfigDeprecationDetails" - }, + "ConfigDeprecationDetails", " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.FeatureDeprecationDetails", - "text": "FeatureDeprecationDetails" - } + "FeatureDeprecationDetails" ], - "path": "src/core/server/deprecations/types.ts", + "path": "node_modules/@types/kbn__core-deprecations-common/index.d.ts", "deprecated": false, "initialIsOpen": false }, @@ -30480,6 +30325,33 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-server.kibanaResponseFactory", + "type": "CompoundType", + "tags": [], + "label": "kibanaResponseFactory", + "description": [], + "signature": [ + "KibanaSuccessResponseFactory", + " & ", + "KibanaRedirectionResponseFactory", + " & ", + "KibanaErrorResponseFactory", + " & { custom | Error | ", + "Stream", + " | Buffer | { message: string | Error; attributes?: ", + "ResponseErrorAttributes", + " | undefined; } | undefined>(options: ", + "CustomHttpResponseOptions", + "): ", + "IKibanaResponse", + "; }" + ], + "path": "node_modules/@types/kbn__core-http-router-server-internal/index.d.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-server.KibanaResponseFactory", @@ -31198,7 +31070,7 @@ "DeprecationSettings", " | undefined; }" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "initialIsOpen": false }, @@ -31461,9 +31333,9 @@ "\nThe set of common HTTP methods supported by Kibana routing." ], "signature": [ - "SafeRouteMethod", + "DestructiveRouteMethod", " | ", - "DestructiveRouteMethod" + "SafeRouteMethod" ], "path": "node_modules/@types/kbn__core-http-server/index.d.ts", "deprecated": false, @@ -31828,7 +31700,7 @@ "signature": [ "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"image\" | \"json\" | \"markdown\" | \"select\" | \"array\"" ], - "path": "src/core/types/ui_settings.ts", + "path": "node_modules/@types/kbn__core-ui-settings-common/index.d.ts", "deprecated": false, "initialIsOpen": false }, diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 437959d2b9df7d..56e16b3050365b 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github summary: API docs for the core plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2489 | 9 | 746 | 25 | +| 2472 | 5 | 705 | 17 | ## Client diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx index 74354239738657..88f4cd2db44dda 100644 --- a/api_docs/core_application.mdx +++ b/api_docs/core_application.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-application title: "core.application" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.application plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.application'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2489 | 9 | 746 | 25 | +| 2472 | 5 | 705 | 17 | ## Client diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx index 9472473f24b9d7..32a4cf35438f1e 100644 --- a/api_docs/core_chrome.mdx +++ b/api_docs/core_chrome.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-chrome title: "core.chrome" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.chrome plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2489 | 9 | 746 | 25 | +| 2472 | 5 | 705 | 17 | ## Client diff --git a/api_docs/core_http.devdocs.json b/api_docs/core_http.devdocs.json deleted file mode 100644 index 3aea850ad213e0..00000000000000 --- a/api_docs/core_http.devdocs.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "id": "core.http", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "server": { - "classes": [ - { - "parentPluginId": "core", - "id": "def-server.CspConfig", - "type": "Class", - "tags": [], - "label": "CspConfig", - "description": [ - "\nCSP configuration for use in Kibana." - ], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.CspConfig", - "text": "CspConfig" - }, - " implements ", - "ICspConfig" - ], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.CspConfig.DEFAULT", - "type": "Object", - "tags": [], - "label": "DEFAULT", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.CspConfig", - "text": "CspConfig" - } - ], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.CspConfig.directives", - "type": "Object", - "tags": [], - "label": "#directives", - "description": [], - "signature": [ - "CspDirectives" - ], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.CspConfig.strict", - "type": "boolean", - "tags": [], - "label": "strict", - "description": [], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.CspConfig.warnLegacyBrowsers", - "type": "boolean", - "tags": [], - "label": "warnLegacyBrowsers", - "description": [], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.CspConfig.disableEmbedding", - "type": "boolean", - "tags": [], - "label": "disableEmbedding", - "description": [], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.CspConfig.header", - "type": "string", - "tags": [], - "label": "header", - "description": [], - "path": "src/core/server/http/csp/csp_config.ts", - "deprecated": false - } - ], - "initialIsOpen": false - } - ], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [ - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory", - "type": "Object", - "tags": [], - "label": "kibanaResponseFactory", - "description": [], - "path": "src/core/server/http/router/response.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory.Unnamed", - "type": "Any", - "tags": [], - "label": "Unnamed", - "description": [], - "signature": [ - "any" - ], - "path": "src/core/server/http/router/response.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory.Unnamed", - "type": "Any", - "tags": [], - "label": "Unnamed", - "description": [], - "signature": [ - "any" - ], - "path": "src/core/server/http/router/response.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory.Unnamed", - "type": "Any", - "tags": [], - "label": "Unnamed", - "description": [], - "signature": [ - "any" - ], - "path": "src/core/server/http/router/response.ts", - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory.custom", - "type": "Function", - "tags": [], - "label": "custom", - "description": [], - "signature": [ - " | Error | ", - "Stream", - " | Buffer | { message: string | Error; attributes?: ", - "ResponseErrorAttributes", - " | undefined; } | undefined>(options: ", - "CustomHttpResponseOptions", - ") => ", - "KibanaResponse", - "" - ], - "path": "src/core/server/http/router/response.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.kibanaResponseFactory.custom.$1", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - "CustomHttpResponseOptions", - "" - ], - "path": "src/core/server/http/router/response.ts", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - } - ] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - } -} \ No newline at end of file diff --git a/api_docs/core_http.mdx b/api_docs/core_http.mdx deleted file mode 100644 index 079c9241634500..00000000000000 --- a/api_docs/core_http.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: kibCoreHttpPluginApi -slug: /kibana-dev-docs/api/core-http -title: "core.http" -image: https://source.unsplash.com/400x175/?github -summary: API docs for the core.http plugin -date: 2022-07-12 -tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.http'] -warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. ---- -import coreHttpObj from './core_http.devdocs.json'; - - - -Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. - -**Code health stats** - -| Public API count | Any count | Items lacking comments | Missing exports | -|-------------------|-----------|------------------------|-----------------| -| 2489 | 9 | 746 | 25 | - -## Server - -### Objects - - -### Classes - - diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx index 87e86a6d4dff9d..116e3a56e3e58e 100644 --- a/api_docs/core_saved_objects.mdx +++ b/api_docs/core_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-savedObjects title: "core.savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.savedObjects plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2489 | 9 | 746 | 25 | +| 2472 | 5 | 705 | 17 | ## Client diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 93aed293adba19..3bd19babc28a71 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github summary: API docs for the customIntegrations plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index bb93d6c8ea90c9..f3034074e44009 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboard plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 6d9fedd99c3d4d..f45056cab1acea 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboardEnhanced plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index cc89249f62a1b0..140ce8e70bb5c7 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -645,7 +645,15 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "" + ">" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -6991,13 +6999,7 @@ "label": "uiSettings", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/plugins/data/public/types.ts", "deprecated": false @@ -12955,7 +12957,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) => void" ], @@ -12995,7 +12997,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">" ], @@ -13852,7 +13854,7 @@ "\nCreate a new data view instance." ], "signature": [ - "({ id, ...restOfSpec }: ", + "({ id, name, title, ...restOfSpec }: ", { "pluginId": "dataViews", "scope": "common", @@ -13878,7 +13880,7 @@ "id": "def-server.DataViewsService.create.$1", "type": "Object", "tags": [], - "label": "{ id, ...restOfSpec }", + "label": "{ id, name, title, ...restOfSpec }", "description": [], "signature": [ { @@ -19389,7 +19391,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) => void" ], @@ -19429,7 +19431,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">" ], @@ -19517,7 +19519,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { @@ -20993,7 +20995,7 @@ "\nCreate a new data view instance." ], "signature": [ - "({ id, ...restOfSpec }: ", + "({ id, name, title, ...restOfSpec }: ", { "pluginId": "dataViews", "scope": "common", @@ -21019,7 +21021,7 @@ "id": "def-common.DataViewsService.create.$1", "type": "Object", "tags": [], - "label": "{ id, ...restOfSpec }", + "label": "{ id, name, title, ...restOfSpec }", "description": [], "signature": [ { @@ -22619,7 +22621,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">> | undefined; runtimeFieldMap?: Record> | undefined; runtimeFieldMap?: Record | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 264d88e0a80a72..61df290a1ec405 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github summary: API docs for the data plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_query.devdocs.json b/api_docs/data_query.devdocs.json index a061d52a3ae43c..bd9bfa16a841df 100644 --- a/api_docs/data_query.devdocs.json +++ b/api_docs/data_query.devdocs.json @@ -53,13 +53,7 @@ "label": "uiSettings", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/plugins/data/public/query/filter_manager/filter_manager.ts", "deprecated": false, diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index ee01b530880cf3..8be2485775d9be 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.query plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index a406c0bcb8d3f4..65cfc70b670cdb 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -1465,16 +1465,7 @@ "docId": "kibDataSearchPluginApi", "section": "def-server.ISearchSessionService", "text": "ISearchSessionService" - }, - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSessionSavedObjectAttributes", - "text": "SearchSessionSavedObjectAttributes" - }, - ">" + } ], "path": "src/plugins/data/server/search/session/session_service.ts", "deprecated": false, @@ -2718,9 +2709,25 @@ "label": "saveSession", "description": [], "signature": [ - "(sessionId: string, attributes: Partial) => Promise<", + "(sessionId: string, attributes: Partial<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ">) => Promise<", "SavedObject", - " | undefined>" + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + "> | undefined>" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false, @@ -2744,7 +2751,27 @@ "label": "attributes", "description": [], "signature": [ - "{ [P in keyof T]?: T[P] | undefined; }" + "{ sessionId?: string | undefined; name?: string | undefined; appId?: string | undefined; created?: string | undefined; touched?: string | undefined; expires?: string | undefined; completed?: string | null | undefined; status?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionStatus", + "text": "SearchSessionStatus" + }, + " | undefined; locatorId?: string | undefined; initialState?: ", + "SerializableRecord", + " | undefined; restoreState?: ", + "SerializableRecord", + " | undefined; idMapping?: Record | undefined; persisted?: boolean | undefined; realmType?: string | undefined; realmName?: string | undefined; username?: string | undefined; version?: string | undefined; }" ], "path": "src/plugins/data/server/search/session/types.ts", "deprecated": false @@ -2761,7 +2788,15 @@ "signature": [ "(sessionId: string) => Promise<", "SavedObject", - ">" + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ">>" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false, @@ -2803,7 +2838,15 @@ "section": "def-server.SavedObjectsFindResponse", "text": "SavedObjectsFindResponse" }, - ">" + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ", unknown>>" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false, @@ -2860,7 +2903,15 @@ "label": "updateSession", "description": [], "signature": [ - "(sessionId: string, attributes: Partial) => Promise<", + "(sessionId: string, attributes: Partial<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ">) => Promise<", { "pluginId": "core", "scope": "server", @@ -2868,7 +2919,15 @@ "section": "def-server.SavedObjectsUpdateResponse", "text": "SavedObjectsUpdateResponse" }, - ">" + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ">>" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false, @@ -2892,7 +2951,27 @@ "label": "attributes", "description": [], "signature": [ - "{ [P in keyof T]?: T[P] | undefined; }" + "{ sessionId?: string | undefined; name?: string | undefined; appId?: string | undefined; created?: string | undefined; touched?: string | undefined; expires?: string | undefined; completed?: string | null | undefined; status?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionStatus", + "text": "SearchSessionStatus" + }, + " | undefined; locatorId?: string | undefined; initialState?: ", + "SerializableRecord", + " | undefined; restoreState?: ", + "SerializableRecord", + " | undefined; idMapping?: Record | undefined; persisted?: boolean | undefined; realmType?: string | undefined; realmName?: string | undefined; username?: string | undefined; version?: string | undefined; }" ], "path": "src/plugins/data/server/search/session/types.ts", "deprecated": false @@ -2967,7 +3046,15 @@ "section": "def-server.SavedObjectsUpdateResponse", "text": "SavedObjectsUpdateResponse" }, - ">" + "<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSessionSavedObjectAttributes", + "text": "SearchSessionSavedObjectAttributes" + }, + ">>" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false, @@ -3008,16 +3095,6 @@ "tags": [], "label": "ISearchSessionService", "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "server", - "docId": "kibDataSearchPluginApi", - "section": "def-server.ISearchSessionService", - "text": "ISearchSessionService" - }, - "" - ], "path": "src/plugins/data/server/search/session/types.ts", "deprecated": false, "children": [ @@ -3040,8 +3117,7 @@ ") => (request: ", "KibanaRequest", ") => ", - "IScopedSearchSessionsClient", - "" + "IScopedSearchSessionsClient" ], "path": "src/plugins/data/server/search/session/types.ts", "deprecated": false, @@ -3758,8 +3834,7 @@ "label": "searchSessionsClient", "description": [], "signature": [ - "IScopedSearchSessionsClient", - "" + "IScopedSearchSessionsClient" ], "path": "src/plugins/data/server/search/types.ts", "deprecated": false @@ -4481,7 +4556,15 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "" + ">" ], "path": "src/plugins/data/common/search/aggs/agg_config.ts", "deprecated": false, @@ -7126,7 +7209,15 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "" + ">" ], "path": "src/plugins/data/common/search/aggs/agg_type.ts", "deprecated": false, @@ -21671,7 +21762,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) | undefined" ], diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 46644a6ce3a476..3b049a1d27a4a5 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.search plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_editor.devdocs.json b/api_docs/data_view_editor.devdocs.json index edcf82634ea281..a03f5a42894356 100644 --- a/api_docs/data_view_editor.devdocs.json +++ b/api_docs/data_view_editor.devdocs.json @@ -128,6 +128,21 @@ ], "path": "src/plugins/data_view_editor/public/types.ts", "deprecated": false + }, + { + "parentPluginId": "dataViewEditor", + "id": "def-public.DataViewEditorProps.allowAdHocDataView", + "type": "CompoundType", + "tags": [], + "label": "allowAdHocDataView", + "description": [ + "\nif set to true user is presented with an option to create ad-hoc dataview without a saved object." + ], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/data_view_editor/public/types.ts", + "deprecated": false } ], "initialIsOpen": false diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 6b36aa2a4838f3..432e7f61c8b7f6 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewEditor plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 7 | 0 | +| 15 | 0 | 7 | 0 | ## Client diff --git a/api_docs/data_view_field_editor.devdocs.json b/api_docs/data_view_field_editor.devdocs.json index 8b3e28b5fd93a5..7f38835b2639d5 100644 --- a/api_docs/data_view_field_editor.devdocs.json +++ b/api_docs/data_view_field_editor.devdocs.json @@ -127,7 +127,7 @@ "label": "onChange", "description": [], "signature": [ - "(newParams?: {}) => void" + "(newParams?: Partial<{ type?: string | undefined; } & P>) => void" ], "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/editors/default/default.tsx", "deprecated": false, @@ -140,7 +140,7 @@ "label": "newParams", "description": [], "signature": [ - "{}" + "Partial<{ type?: string | undefined; } & P>" ], "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/editors/default/default.tsx", "deprecated": false, @@ -242,7 +242,9 @@ "label": "onChange", "description": [], "signature": [ - "(newParams: { [key: string]: any; }) => void" + "(newParams: ", + "SerializableRecord", + ") => void" ], "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/editors/types.ts", "deprecated": false, @@ -254,23 +256,12 @@ "tags": [], "label": "newParams", "description": [], + "signature": [ + "SerializableRecord" + ], "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/editors/types.ts", "deprecated": false, - "children": [ - { - "parentPluginId": "dataViewFieldEditor", - "id": "def-public.FormatEditorProps.onChange.$1.Unnamed", - "type": "IndexSignature", - "tags": [], - "label": "[key: string]: any", - "description": [], - "signature": [ - "[key: string]: any" - ], - "path": "src/plugins/data_view_field_editor/public/components/field_format_editor/editors/types.ts", - "deprecated": false - } - ] + "isRequired": true } ], "returnComment": [] @@ -556,7 +547,7 @@ "section": "def-public.FieldFormatEditorFactory", "text": "FieldFormatEditorFactory" }, - ") => void; }" + "<{}>) => void; }" ], "path": "src/plugins/data_view_field_editor/public/types.ts", "deprecated": false @@ -679,7 +670,7 @@ "section": "def-public.FieldFormatEditorFactory", "text": "FieldFormatEditorFactory" }, - "[]; getById: (id: string) => ", + "<{}>[]; getById:

(id: string) => ", { "pluginId": "dataViewFieldEditor", "scope": "public", @@ -687,7 +678,7 @@ "section": "def-public.FieldFormatEditorFactory", "text": "FieldFormatEditorFactory" }, - " | undefined; }" + "

| undefined; }" ], "path": "src/plugins/data_view_field_editor/public/types.ts", "deprecated": false diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index ea9c70bc46ca10..c985097784af08 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewFieldEditor plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 42 | 0 | 37 | 3 | +| 41 | 0 | 36 | 3 | ## Client diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 5ae395f21c8f19..1aeb8bae0d401f 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewManagement plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index 1182fdba14c4d7..ada9c71be66103 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -1451,7 +1451,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) => void" ], @@ -1491,7 +1491,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">" ], @@ -1579,7 +1579,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { @@ -3455,7 +3455,7 @@ "\nCreate a new data view instance." ], "signature": [ - "({ id, ...restOfSpec }: ", + "({ id, name, title, ...restOfSpec }: ", { "pluginId": "dataViews", "scope": "common", @@ -3481,7 +3481,7 @@ "id": "def-public.DataViewsService.create.$1", "type": "Object", "tags": [], - "label": "{ id, ...restOfSpec }", + "label": "{ id, name, title, ...restOfSpec }", "description": [], "signature": [ { @@ -4307,13 +4307,7 @@ "label": "uiSettings", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/plugins/data_views/public/ui_settings_wrapper.ts", "deprecated": false, @@ -5902,7 +5896,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">> | undefined; runtimeFieldMap?: Record | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { @@ -7555,7 +7549,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) => void" ], @@ -7595,7 +7589,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">" ], @@ -8770,7 +8764,7 @@ "\nCreate a new data view instance." ], "signature": [ - "({ id, ...restOfSpec }: ", + "({ id, name, title, ...restOfSpec }: ", { "pluginId": "dataViews", "scope": "common", @@ -8796,7 +8790,7 @@ "id": "def-server.DataViewsService.create.$1", "type": "Object", "tags": [], - "label": "{ id, ...restOfSpec }", + "label": "{ id, name, title, ...restOfSpec }", "description": [], "signature": [ { @@ -10240,7 +10234,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { @@ -13560,7 +13554,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">) => void" ], @@ -13600,7 +13594,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">" ], @@ -13688,7 +13682,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { @@ -15223,7 +15217,7 @@ "\nCreate a new data view instance." ], "signature": [ - "({ id, ...restOfSpec }: ", + "({ id, name, title, ...restOfSpec }: ", { "pluginId": "dataViews", "scope": "common", @@ -15249,7 +15243,7 @@ "id": "def-common.DataViewsService.create.$1", "type": "Object", "tags": [], - "label": "{ id, ...restOfSpec }", + "label": "{ id, name, title, ...restOfSpec }", "description": [], "signature": [ { @@ -17765,7 +17759,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | null | undefined" ], @@ -18532,7 +18526,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">> | undefined; runtimeFieldMap?: Record> | undefined; runtimeFieldMap?: Record; }" ], @@ -19966,7 +19960,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; esTypes?: string[] | undefined; searchable: boolean; aggregatable: boolean; readFromDocValues?: boolean | undefined; indexed?: boolean | undefined; customLabel?: string | undefined; runtimeField?: ", { diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index d23739df18cd40..e54328e677243f 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViews plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index a89043f6918c04..f945bfc6e2930d 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataVisualizer plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index bea1e416fbb83b..accd8e8985cbd0 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -50,8 +50,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | canvas | - | | | canvas | - | | | canvas | - | -| | management, spaces, ml, canvas, cloudSecurityPosture, enterpriseSearch, osquery | - | -| | management, cloudSecurityPosture, enterpriseSearch | - | +| | management, spaces, ml, canvas, enterpriseSearch, osquery | - | +| | management, enterpriseSearch | - | | | enterpriseSearch | - | | | actions, ml, enterpriseSearch, savedObjectsTagging | - | | | spaces, savedObjectsManagement | - | @@ -137,4 +137,5 @@ Safe to remove. | | @kbn/core-http-browser | | | @kbn/core-http-browser | | | @kbn/core-injected-metadata-browser | -| | @kbn/core-injected-metadata-browser | \ No newline at end of file +| | @kbn/core-injected-metadata-browser | +| | @kbn/core-ui-settings-common | \ No newline at end of file diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index a1a9497c770b50..f5e89b9dd8cbaf 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- @@ -101,8 +101,6 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplateProps), [compliance_dashboard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx#:~:text=KibanaPageTemplateProps), [compliance_dashboard.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx#:~:text=KibanaPageTemplateProps)+ 2 more | - | -| | [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplate), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplate), [csp_page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx#:~:text=KibanaPageTemplate) | - | | | [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/application/app.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/application/app.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/public/application/app.tsx#:~:text=RedirectAppLinks) | - | | | [update_rules_configuration.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cloud_security_posture/server/routes/configuration/update_rules_configuration.ts#:~:text=authc) | - | @@ -217,7 +215,7 @@ so TS and code-reference navigation might not highlight them. | | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx#:~:text=KibanaPageTemplateProps), [page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx#:~:text=KibanaPageTemplateProps) | - | -| | [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [product_selector.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx#:~:text=KibanaPageTemplate), [product_selector.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx#:~:text=KibanaPageTemplate), [product_selector.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate)+ 11 more | - | +| | [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [version_mismatch_page.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate), [page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx#:~:text=KibanaPageTemplate), [page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx#:~:text=KibanaPageTemplate), [page_template.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx#:~:text=KibanaPageTemplate), [error_connecting.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx#:~:text=KibanaPageTemplate)+ 8 more | - | | | [account_settings.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/account_settings/account_settings.tsx#:~:text=uiApi), [account_settings.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/account_settings/account_settings.tsx#:~:text=uiApi), [account_settings.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/account_settings/account_settings.tsx#:~:text=uiApi), [account_settings.tsx](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/account_settings/account_settings.tsx#:~:text=uiApi) | - | | | [check_access.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/server/lib/check_access.ts#:~:text=authz), [check_access.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/server/lib/check_access.ts#:~:text=authz), [check_access.ts](https://github.com/elastic/kibana/tree/master/x-pack/plugins/enterprise_search/server/lib/check_access.ts#:~:text=authz) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 2acb315e3c7386..e5f81aef28c082 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team summary: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index d0bd126888036e..39e4ba53034073 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github summary: API docs for the devTools plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 63ef2090d99bed..3af0082f21259d 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github summary: API docs for the discover plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 32c9ef7baaad45..727a22fc0498ef 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the discoverEnhanced plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/elastic_apm_synthtrace.mdx b/api_docs/elastic_apm_synthtrace.mdx index f3a52beef90e51..f78a462730cc7a 100644 --- a/api_docs/elastic_apm_synthtrace.mdx +++ b/api_docs/elastic_apm_synthtrace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-apm-synthtrace title: "@elastic/apm-synthtrace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @elastic/apm-synthtrace plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-synthtrace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index c04fd527e5e5f5..80b1999d682a58 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -2513,6 +2513,21 @@ ], "returnComment": [] }, + { + "parentPluginId": "embeddable", + "id": "def-public.Embeddable.reportsEmbeddableLoad", + "type": "Function", + "tags": [], + "label": "reportsEmbeddableLoad", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/embeddable/public/lib/embeddables/embeddable.tsx", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "embeddable", "id": "def-public.Embeddable.refreshInputFromParent", @@ -6200,6 +6215,50 @@ "deprecated": false } ] + }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddableChildPanelProps.onPanelStatusChange", + "type": "Function", + "tags": [], + "label": "onPanelStatusChange", + "description": [], + "signature": [ + "((info: ", + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.EmbeddablePhaseEvent", + "text": "EmbeddablePhaseEvent" + }, + ") => void) | undefined" + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddableChildPanelProps.onPanelStatusChange.$1", + "type": "Object", + "tags": [], + "label": "info", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "public", + "docId": "kibEmbeddablePluginApi", + "section": "def-public.EmbeddablePhaseEvent", + "text": "EmbeddablePhaseEvent" + } + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -6917,6 +6976,19 @@ "path": "src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts", "deprecated": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddableOutput.rendered", + "type": "CompoundType", + "tags": [], + "label": "rendered", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts", + "deprecated": false + }, { "parentPluginId": "embeddable", "id": "def-public.EmbeddableOutput.error", @@ -7116,6 +7188,72 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhaseEvent", + "type": "Interface", + "tags": [], + "label": "EmbeddablePhaseEvent", + "description": [], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhaseEvent.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhaseEvent.status", + "type": "CompoundType", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "\"loading\" | \"error\" | \"loaded\" | \"rendered\"" + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhaseEvent.error", + "type": "CompoundType", + "tags": [], + "label": "error", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ErrorLike", + "text": "ErrorLike" + }, + " | undefined" + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false + }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhaseEvent.timeToEvent", + "type": "number", + "tags": [], + "label": "timeToEvent", + "description": [], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "embeddable", "id": "def-public.EmbeddableSetupDependencies", @@ -8082,6 +8220,23 @@ "path": "src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts", "deprecated": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.IEmbeddable.reportsEmbeddableLoad", + "type": "Function", + "tags": [], + "label": "reportsEmbeddableLoad", + "description": [ + "\nThis method returns false by default.\nIt should be set to true for any embeddable type that utilizes the `loading` and `rendered`\noutput variables to notify a container of their loading progress. If set to false, a container should assume\nthe embeddable is loaded immediately." + ], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "embeddable", "id": "def-public.IEmbeddable.getIsContainer", @@ -9197,6 +9352,20 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "embeddable", + "id": "def-public.EmbeddablePhase", + "type": "Type", + "tags": [], + "label": "EmbeddablePhase", + "description": [], + "signature": [ + "\"loading\" | \"error\" | \"loaded\" | \"rendered\"" + ], + "path": "src/plugins/embeddable/public/lib/containers/embeddable_child_panel.tsx", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "embeddable", "id": "def-public.EmbeddableRendererProps", diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 6823ec57019c51..ee81c48756d345 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddable plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 494 | 0 | 403 | 3 | +| 505 | 0 | 413 | 3 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index eafa8561e09f34..1acc46793b3b34 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddableEnhanced plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 85d2f0d185835e..ec4f75ec8fee22 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the encryptedSavedObjects plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/enterprise_search.devdocs.json b/api_docs/enterprise_search.devdocs.json index fdbc357cfd7a5e..18f9b884e77d72 100644 --- a/api_docs/enterprise_search.devdocs.json +++ b/api_docs/enterprise_search.devdocs.json @@ -41,6 +41,34 @@ "path": "x-pack/plugins/enterprise_search/server/index.ts", "deprecated": false, "initialIsOpen": false + }, + { + "parentPluginId": "enterpriseSearch", + "id": "def-server.CONNECTORS_JOBS_INDEX", + "type": "string", + "tags": [], + "label": "CONNECTORS_JOBS_INDEX", + "description": [], + "signature": [ + "\".elastic-connectors-sync-jobs\"" + ], + "path": "x-pack/plugins/enterprise_search/server/index.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "enterpriseSearch", + "id": "def-server.CONNECTORS_VERSION", + "type": "string", + "tags": [], + "label": "CONNECTORS_VERSION", + "description": [], + "signature": [ + "\"1\"" + ], + "path": "x-pack/plugins/enterprise_search/server/index.ts", + "deprecated": false, + "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index d5564539277ec4..2706a8d892b0d3 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the enterpriseSearch plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-sea | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3 | 0 | 3 | 0 | +| 5 | 0 | 5 | 0 | ## Server diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 12156e65690e1e..695e0246b3fa12 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github summary: API docs for the esUiShared plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 267cea8167c2ab..00254b6bdf741d 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventAnnotation plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 7fbf7901119f27..0ccfe05f61b4ba 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventLog plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index ff4b2a24ecb2fe..4bb6a0debe5f2c 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionError plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_gauge.devdocs.json b/api_docs/expression_gauge.devdocs.json index c3acd6e8b013f8..89a17fbf23fa0f 100644 --- a/api_docs/expression_gauge.devdocs.json +++ b/api_docs/expression_gauge.devdocs.json @@ -898,7 +898,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined) => ", { @@ -928,7 +928,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index db52c844525a66..6cff0a59c29ffc 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionGauge plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_heatmap.devdocs.json b/api_docs/expression_heatmap.devdocs.json index 0a8c0f54bc641c..6cc1961115e4ed 100644 --- a/api_docs/expression_heatmap.devdocs.json +++ b/api_docs/expression_heatmap.devdocs.json @@ -485,7 +485,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined) => ", { @@ -515,7 +515,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 1b2331648d3cb0..b9a4b3dffb2980 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionHeatmap plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 43ad3c539dc2cb..f229794d468b65 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionImage plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 5cff7dee72072f..d4a796f2a1c963 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionLegacyMetricVis plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 4684cb5b973fd7..26fab7967f41df 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetric plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index b1e2f1471edda6..b40a98b6ea614a 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetricVis plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_partition_vis.devdocs.json b/api_docs/expression_partition_vis.devdocs.json index 215825a71615fe..2f6134f683007f 100644 --- a/api_docs/expression_partition_vis.devdocs.json +++ b/api_docs/expression_partition_vis.devdocs.json @@ -253,7 +253,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; }" ], diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 3924654b91170d..6d98ffe4574e48 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionPartitionVis plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 030403bcbbdaa7..83847cbfa20ebf 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRepeatImage plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index cdb11e20cfb8b8..af10452b79ad95 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRevealImage plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 369245d5ac060a..ad054fb3a24710 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionShape plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 14b9723a63d1a3..f96fdb83a86aa3 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionTagcloud plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index befebac94be4d6..4f47ae934bf4d9 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -96,10 +96,10 @@ }, { "parentPluginId": "expressionXY", - "id": "def-common.AnnotationLayerArgs.hide", + "id": "def-common.AnnotationLayerArgs.simpleView", "type": "CompoundType", "tags": [], - "label": "hide", + "label": "simpleView", "description": [], "signature": [ "boolean | undefined" @@ -582,10 +582,10 @@ }, { "parentPluginId": "expressionXY", - "id": "def-common.DataLayerArgs.hide", + "id": "def-common.DataLayerArgs.simpleView", "type": "CompoundType", "tags": [], - "label": "hide", + "label": "simpleView", "description": [], "signature": [ "boolean | undefined" @@ -595,13 +595,13 @@ }, { "parentPluginId": "expressionXY", - "id": "def-common.DataLayerArgs.splitAccessor", - "type": "CompoundType", + "id": "def-common.DataLayerArgs.splitAccessors", + "type": "Array", "tags": [], - "label": "splitAccessor", + "label": "splitAccessors", "description": [], "signature": [ - "string | ", + "(string | ", { "pluginId": "visualizations", "scope": "common", @@ -609,7 +609,7 @@ "section": "def-common.ExpressionValueVisDimension", "text": "ExpressionValueVisDimension" }, - " | undefined" + ")[] | undefined" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index b80f2be3cc15de..769711dd20f837 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionXY plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json index bea645fca66b15..dd9b0e90dcf4c7 100644 --- a/api_docs/expressions.devdocs.json +++ b/api_docs/expressions.devdocs.json @@ -27942,7 +27942,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 011781bbddfaf6..f801f706d91718 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressions plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 9ac804b9c7f97a..b8902e45cf6700 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github summary: API docs for the features plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/field_formats.devdocs.json b/api_docs/field_formats.devdocs.json index 1fbc728768522c..6ee4a0284f9f58 100644 --- a/api_docs/field_formats.devdocs.json +++ b/api_docs/field_formats.devdocs.json @@ -2116,7 +2116,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined) => ", { @@ -2145,7 +2145,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], @@ -4878,7 +4878,8 @@ "\nParams provided when creating a formatter.\nParams are vary per formatter\n\nTODO: support strict typing for params depending on format type\nhttps://github.com/elastic/kibana/issues/108158" ], "signature": [ - "SerializableRecord" + "SerializableRecord", + " & P" ], "path": "src/plugins/field_formats/common/types.ts", "deprecated": false, @@ -5082,7 +5083,7 @@ "label": "FormatFactory", "description": [], "signature": [ - "(mapping?: ", + "

(mapping?: ", { "pluginId": "fieldFormats", "scope": "common", @@ -5090,9 +5091,15 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", - "SerializableRecord", - "> | undefined) => ", + "> | undefined) => ", { "pluginId": "fieldFormats", "scope": "common", @@ -5120,9 +5127,15 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", - "SerializableRecord", - "> | undefined" + "> | undefined" ], "path": "src/plugins/field_formats/common/types.ts", "deprecated": false diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 636a253a8f9c51..5275befa23274e 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github summary: API docs for the fieldFormats plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index b66cb5c8b9b8f0..11b4fed345f4e6 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github summary: API docs for the fileUpload plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index a450ab9b362689..08aa1d377af7db 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -564,6 +564,19 @@ "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", "deprecated": false }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.is_managed", + "type": "CompoundType", + "tags": [], + "label": "is_managed", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false + }, { "parentPluginId": "fleet", "id": "def-public.NewPackagePolicy.policy_id", @@ -1342,7 +1355,7 @@ "The updated Integration Policy to be merged back and included in the API call" ], "signature": [ - "{ id?: string | number | undefined; name?: string | undefined; description?: string | undefined; namespace?: string | undefined; enabled?: boolean | undefined; policy_id?: string | undefined; output_id?: string | undefined; package?: ", + "{ id?: string | number | undefined; name?: string | undefined; description?: string | undefined; namespace?: string | undefined; enabled?: boolean | undefined; is_managed?: boolean | undefined; policy_id?: string | undefined; output_id?: string | undefined; package?: ", { "pluginId": "fleet", "scope": "common", @@ -2981,6 +2994,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "fleet", + "id": "def-public.pagePathGetters.settings_edit_download_sources", + "type": "Function", + "tags": [], + "label": "settings_edit_download_sources", + "description": [], + "signature": [ + "({ downloadSourceId }: ", + "DynamicPagePathValues", + ") => [string, string]" + ], + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.pagePathGetters.settings_edit_download_sources.$1", + "type": "Object", + "tags": [], + "label": "{ downloadSourceId }", + "description": [], + "signature": [ + "DynamicPagePathValues" + ], + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "fleet", "id": "def-public.pagePathGetters.settings_create_outputs", @@ -2996,6 +3041,21 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "fleet", + "id": "def-public.pagePathGetters.settings_create_download_sources", + "type": "Function", + "tags": [], + "label": "settings_create_download_sources", + "description": [], + "signature": [ + "() => [string, string]" + ], + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "fleet", "id": "def-public.pagePathGetters.debug", @@ -10545,6 +10605,19 @@ "description": [], "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.AgentPolicy.agents", + "type": "number", + "tags": [], + "label": "agents", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", + "deprecated": false } ], "initialIsOpen": false @@ -12195,7 +12268,7 @@ "label": "developer", "description": [], "signature": [ - "{ disableRegistryVersionCheck?: boolean | undefined; allowAgentUpgradeSourceUri?: boolean | undefined; bundledPackageLocation?: string | undefined; } | undefined" + "{ disableRegistryVersionCheck?: boolean | undefined; bundledPackageLocation?: string | undefined; } | undefined" ], "path": "x-pack/plugins/fleet/common/types/index.ts", "deprecated": false @@ -13263,7 +13336,7 @@ "label": "agent", "description": [], "signature": [ - "{ monitoring: { namespace?: string | undefined; use_output?: string | undefined; enabled: boolean; metrics: boolean; logs: boolean; }; } | undefined" + "{ monitoring: { namespace?: string | undefined; use_output?: string | undefined; enabled: boolean; metrics: boolean; logs: boolean; }; download: { source_uri: string; }; } | undefined" ], "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false @@ -16030,6 +16103,19 @@ ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.NewAgentAction.source_uri", + "type": "string", + "tags": [], + "label": "source_uri", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false } ], "initialIsOpen": false @@ -16423,6 +16509,19 @@ "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", "deprecated": false }, + { + "parentPluginId": "fleet", + "id": "def-common.NewPackagePolicy.is_managed", + "type": "CompoundType", + "tags": [], + "label": "is_managed", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false + }, { "parentPluginId": "fleet", "id": "def-common.NewPackagePolicy.policy_id", @@ -17732,7 +17831,7 @@ "label": "body", "description": [], "signature": [ - "{ id: string; name: string; hosts: string; is_default?: boolean | undefined; }" + "{ id?: string | undefined; name: string; host: string; is_default?: boolean | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/download_sources.ts", "deprecated": false @@ -18244,7 +18343,7 @@ "label": "body", "description": [], "signature": [ - "{ id: string; name: string; hosts: string; is_default?: boolean | undefined; }" + "{ name: string; host: string; is_default?: boolean | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/download_sources.ts", "deprecated": false @@ -20209,7 +20308,7 @@ "section": "def-common.ValueOf", "text": "ValueOf" }, - "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; namespace: string; updated_by: string; is_default?: boolean | undefined; is_default_fleet_server?: boolean | undefined; has_fleet_server?: boolean | undefined; is_managed: boolean; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | null | undefined; monitoring_output_id?: string | null | undefined; download_source_id?: string | null | undefined; package_policies: string[] | ", + "<{ readonly Active: \"active\"; readonly Inactive: \"inactive\"; }>; description?: string | undefined; name: string; updated_at: string; namespace: string; updated_by: string; is_managed: boolean; is_default?: boolean | undefined; is_default_fleet_server?: boolean | undefined; has_fleet_server?: boolean | undefined; monitoring_enabled?: (\"metrics\" | \"logs\")[] | undefined; unenroll_timeout?: number | undefined; is_preconfigured?: boolean | undefined; data_output_id?: string | null | undefined; monitoring_output_id?: string | null | undefined; download_source_id?: string | null | undefined; package_policies: string[] | ", { "pluginId": "fleet", "scope": "common", @@ -20217,7 +20316,7 @@ "section": "def-common.PackagePolicy", "text": "PackagePolicy" }, - "[]; revision: number; }" + "[]; revision: number; agents?: number | undefined; }" ], "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, @@ -20591,13 +20690,13 @@ }, { "parentPluginId": "fleet", - "id": "def-common.DEFAULT_DOWNLOAD_SOURCE", + "id": "def-common.DEFAULT_DOWNLOAD_SOURCE_ID", "type": "string", "tags": [], - "label": "DEFAULT_DOWNLOAD_SOURCE", + "label": "DEFAULT_DOWNLOAD_SOURCE_ID", "description": [], "signature": [ - "\"artifactory.elastic.co\"" + "\"fleet-default-download-source\"" ], "path": "x-pack/plugins/fleet/common/constants/download_source.ts", "deprecated": false, @@ -20605,13 +20704,13 @@ }, { "parentPluginId": "fleet", - "id": "def-common.DEFAULT_DOWNLOAD_SOURCE_ID", + "id": "def-common.DEFAULT_DOWNLOAD_SOURCE_URI", "type": "string", "tags": [], - "label": "DEFAULT_DOWNLOAD_SOURCE_ID", + "label": "DEFAULT_DOWNLOAD_SOURCE_URI", "description": [], "signature": [ - "\"fleet-default-download-source\"" + "\"https://artifacts.elastic.co/downloads/beats/elastic-agent\"" ], "path": "x-pack/plugins/fleet/common/constants/download_source.ts", "deprecated": false, @@ -21261,8 +21360,8 @@ "pluginId": "fleet", "scope": "common", "docId": "kibFleetPluginApi", - "section": "def-common.DownloadSourceBase", - "text": "DownloadSourceBase" + "section": "def-common.DownloadSource", + "text": "DownloadSource" }, ">" ], @@ -22280,7 +22379,7 @@ "section": "def-common.PackagePolicyInput", "text": "PackagePolicyInput" }, - "[]; policy_id: string; output_id: string; revision: number; }" + "[]; is_managed?: boolean | undefined; policy_id: string; output_id: string; revision: number; }" ], "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", "deprecated": false, @@ -24302,6 +24401,139 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService", + "type": "Object", + "tags": [], + "label": "downloadSourceRoutesService", + "description": [], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getInfoPath", + "type": "Function", + "tags": [], + "label": "getInfoPath", + "description": [], + "signature": [ + "(downloadSourceId: string) => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getInfoPath.$1", + "type": "string", + "tags": [], + "label": "downloadSourceId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getUpdatePath", + "type": "Function", + "tags": [], + "label": "getUpdatePath", + "description": [], + "signature": [ + "(downloadSourceId: string) => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getUpdatePath.$1", + "type": "string", + "tags": [], + "label": "downloadSourceId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getListPath", + "type": "Function", + "tags": [], + "label": "getListPath", + "description": [], + "signature": [ + "() => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getDeletePath", + "type": "Function", + "tags": [], + "label": "getDeletePath", + "description": [], + "signature": [ + "(downloadSourceId: string) => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getDeletePath.$1", + "type": "string", + "tags": [], + "label": "downloadSourceId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-common.downloadSourceRoutesService.getCreatePath", + "type": "Function", + "tags": [], + "label": "getCreatePath", + "description": [], + "signature": [ + "() => string" + ], + "path": "x-pack/plugins/fleet/common/services/routes.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.ENROLLMENT_API_KEY_ROUTES", diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 1d5d8cf4433d30..aca1a18de9763f 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github summary: API docs for the fleet plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1521 | 8 | 1389 | 10 | +| 1537 | 8 | 1405 | 10 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 4375bd831943c5..f509bbceab1bba 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the globalSearch plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/home.mdx b/api_docs/home.mdx index f29525b9660c6a..8e85eec907cb50 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github summary: API docs for the home plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 67947a561bb54c..3ddfa9472cee93 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexLifecycleManagement plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 73c9bfe87d846b..20c5fae345e142 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexManagement plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 222c23bdb65099..46b09dd487976b 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github summary: API docs for the infra plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index c0a93d711a7f7b..489d0c62ca73d0 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github summary: API docs for the inspector plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index b4b19e9562ba3f..df6d98288a7e61 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github summary: API docs for the interactiveSetup plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 778ed11e62f8b3..bfacf8594eae2e 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ace plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 96576bb02deb9b..93a67041fd5e1d 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-components plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 09f193d8a95373..759aaa0bc0dfe0 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 91a14011423e60..90342956e9186b 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/alerts plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 0f7755bfc80621..04f13d4eb9fb1f 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 332fdb73fd3a49..2e1deba00597b2 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-client plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 529dfc5acacab6..e2f1ec1edbf6f3 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 9c3967a0fecb5a..b5f800cc45217e 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 667256e28f64da..b57ef26af2ffdd 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 54ae769be4ae33..197f236a44afc9 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 14852dc7007095..4851a89f604ff3 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-config-loader plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 1ff4abd0f55ce6..275b0af8899132 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index b202a9a9cfdef3..1fff24880c847f 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/axe-config plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_packages.devdocs.json b/api_docs/kbn_bazel_packages.devdocs.json index 993554aca76365..23cf46d140b558 100644 --- a/api_docs/kbn_bazel_packages.devdocs.json +++ b/api_docs/kbn_bazel_packages.devdocs.json @@ -273,7 +273,7 @@ "\nResolve all the BAZEL_PACKAGE_DIRS to absolute paths" ], "signature": [ - "() => EntryInternal[] & string[]" + "() => string[]" ], "path": "packages/kbn-bazel-packages/src/bazel_package_dirs.ts", "deprecated": false, diff --git a/api_docs/kbn_bazel_packages.mdx b/api_docs/kbn_bazel_packages.mdx index d19ab27d927916..a748a89fa5a6e2 100644 --- a/api_docs/kbn_bazel_packages.mdx +++ b/api_docs/kbn_bazel_packages.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-packages title: "@kbn/bazel-packages" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/bazel-packages plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-packages'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_runner.mdx b/api_docs/kbn_bazel_runner.mdx index b1fd1876c09baf..8e0ad755b916d8 100644 --- a/api_docs/kbn_bazel_runner.mdx +++ b/api_docs/kbn_bazel_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-runner title: "@kbn/bazel-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/bazel-runner plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 2facf632dafacb..d451df11ab8f78 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-core plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index b2874a4da8d9f6..a08924d9a36fdc 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 7439499dff91bf..04f72f64ea26b9 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 37279e889ea888..a60a7bd922d729 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/cli-dev-mode plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index d2dc78fec048ba..336107bb56a367 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/coloring plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index d4a5758d97d36d..51cf363418db27 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index f57c62bce7588d..4a51e79032b036 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index c34ce93917ecad..c7b2409974ec33 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-schema plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 54e272ba8f24a2..34c0235b4c88df 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 238466b0bc8362..d7c914cb8bee72 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 4ee730630133b3..7e3d75a06cdebc 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 23f971a7fa394c..a41b00c3a03695 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index d8449d6fb77ba0..2d22e691556b7d 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 5f5424903ca168..c2f4be79eea093 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 13a20f7bf26510..982afbb2572206 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 3d12c39483629e..a12a0574d2d09e 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-common plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 949707ddb21cdc..570e4cddb26dff 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 14c0ed2fbdd9d2..ea34e4e8e279c2 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 43c40203cab67d..f0950bc88cf6f4 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-config-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_deprecations_browser.devdocs.json b/api_docs/kbn_core_deprecations_browser.devdocs.json new file mode 100644 index 00000000000000..76ea9b00bad480 --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser.devdocs.json @@ -0,0 +1,189 @@ +{ + "id": "@kbn/core-deprecations-browser", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart", + "type": "Interface", + "tags": [], + "label": "DeprecationsServiceStart", + "description": [ + "\nDeprecationsService provides methods to fetch domain deprecation details from\nthe Kibana server.\n" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.getAllDeprecations", + "type": "Function", + "tags": [], + "label": "getAllDeprecations", + "description": [ + "\nGrabs deprecations details for all domains." + ], + "signature": [ + "() => Promise<", + "DomainDeprecationDetails", + "[]>" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.getDeprecations", + "type": "Function", + "tags": [], + "label": "getDeprecations", + "description": [ + "\nGrabs deprecations for a specific domain.\n" + ], + "signature": [ + "(domainId: string) => Promise<", + "DomainDeprecationDetails", + "[]>" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.getDeprecations.$1", + "type": "string", + "tags": [], + "label": "domainId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.isDeprecationResolvable", + "type": "Function", + "tags": [], + "label": "isDeprecationResolvable", + "description": [ + "\nReturns a boolean if the provided deprecation can be automatically resolvable.\n" + ], + "signature": [ + "(details: ", + "DomainDeprecationDetails", + ") => boolean" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.isDeprecationResolvable.$1", + "type": "CompoundType", + "tags": [], + "label": "details", + "description": [], + "signature": [ + "DomainDeprecationDetails" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.resolveDeprecation", + "type": "Function", + "tags": [], + "label": "resolveDeprecation", + "description": [ + "\nCalls the correctiveActions.api to automatically resolve the depprecation.\n" + ], + "signature": [ + "(details: ", + "DomainDeprecationDetails", + ") => Promise<", + { + "pluginId": "@kbn/core-deprecations-browser", + "scope": "common", + "docId": "kibKbnCoreDeprecationsBrowserPluginApi", + "section": "def-common.ResolveDeprecationResponse", + "text": "ResolveDeprecationResponse" + }, + ">" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.DeprecationsServiceStart.resolveDeprecation.$1", + "type": "CompoundType", + "tags": [], + "label": "details", + "description": [], + "signature": [ + "DomainDeprecationDetails" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/contracts.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-deprecations-browser", + "id": "def-common.ResolveDeprecationResponse", + "type": "Type", + "tags": [], + "label": "ResolveDeprecationResponse", + "description": [ + "\nResponse from correctiveActions.api call from automatically resolving the deprecation" + ], + "signature": [ + "{ status: \"ok\"; } | { status: \"fail\"; reason: string; }" + ], + "path": "packages/core/deprecations/core-deprecations-browser/src/types.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx new file mode 100644 index 00000000000000..d8065d5402b0ea --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreDeprecationsBrowserPluginApi +slug: /kibana-dev-docs/api/kbn-core-deprecations-browser +title: "@kbn/core-deprecations-browser" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-deprecations-browser plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 9 | 0 | 3 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_deprecations_browser_internal.devdocs.json b/api_docs/kbn_core_deprecations_browser_internal.devdocs.json new file mode 100644 index 00000000000000..3d549b7a15850b --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser_internal.devdocs.json @@ -0,0 +1,129 @@ +{ + "id": "@kbn/core-deprecations-browser-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService", + "type": "Class", + "tags": [], + "label": "DeprecationsService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-browser-internal", + "scope": "common", + "docId": "kibKbnCoreDeprecationsBrowserInternalPluginApi", + "section": "def-common.DeprecationsService", + "text": "DeprecationsService" + }, + " implements ", + "CoreService", + "" + ], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "({ http }: { http: ", + "HttpSetup", + "; }) => ", + "DeprecationsServiceStart" + ], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService.start.$1", + "type": "Object", + "tags": [], + "label": "{ http }", + "description": [], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService.start.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + "HttpSetup" + ], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser-internal", + "id": "def-common.DeprecationsService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx new file mode 100644 index 00000000000000..55afc0d1e3e6ab --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreDeprecationsBrowserInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal +title: "@kbn/core-deprecations-browser-internal" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-deprecations-browser-internal plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Common + +### Classes + + diff --git a/api_docs/kbn_core_deprecations_browser_mocks.devdocs.json b/api_docs/kbn_core_deprecations_browser_mocks.devdocs.json new file mode 100644 index 00000000000000..6a3c846f820ae8 --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser_mocks.devdocs.json @@ -0,0 +1,92 @@ +{ + "id": "@kbn/core-deprecations-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-mocks", + "id": "def-common.deprecationsServiceMock", + "type": "Object", + "tags": [], + "label": "deprecationsServiceMock", + "description": [], + "path": "packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-browser-mocks", + "id": "def-common.deprecationsServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked<", + "PublicMethodsOf", + "<", + "DeprecationsService", + ">>" + ], + "path": "packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser-mocks", + "id": "def-common.deprecationsServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "() => undefined" + ], + "path": "packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-deprecations-browser-mocks", + "id": "def-common.deprecationsServiceMock.createStartContract", + "type": "Function", + "tags": [], + "label": "createStartContract", + "description": [], + "signature": [ + "() => jest.Mocked<", + "DeprecationsServiceStart", + ">" + ], + "path": "packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx new file mode 100644 index 00000000000000..3548f24bc7decf --- /dev/null +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreDeprecationsBrowserMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks +title: "@kbn/core-deprecations-browser-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-deprecations-browser-mocks plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_deprecations_common.devdocs.json b/api_docs/kbn_core_deprecations_common.devdocs.json new file mode 100644 index 00000000000000..bdaa9bdad8fd62 --- /dev/null +++ b/api_docs/kbn_core_deprecations_common.devdocs.json @@ -0,0 +1,321 @@ +{ + "id": "@kbn/core-deprecations-common", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails", + "type": "Interface", + "tags": [], + "label": "BaseDeprecationDetails", + "description": [ + "\nBase properties shared by all types of deprecations\n" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.title", + "type": "string", + "tags": [], + "label": "title", + "description": [ + "\nThe title of the deprecation.\nCheck the README for writing deprecations in `src/core/server/deprecations/README.mdx`" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.message", + "type": "string", + "tags": [], + "label": "message", + "description": [ + "\nThe description message to be displayed for the deprecation.\nCheck the README for writing deprecations in `src/core/server/deprecations/README.mdx`" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.level", + "type": "CompoundType", + "tags": [], + "label": "level", + "description": [ + "\nlevels:\n- warning: will not break deployment upon upgrade\n- critical: needs to be addressed before upgrade.\n- fetch_error: Deprecations service failed to grab the deprecation details for the domain." + ], + "signature": [ + "\"warning\" | \"critical\" | \"fetch_error\"" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.deprecationType", + "type": "CompoundType", + "tags": [], + "label": "deprecationType", + "description": [ + "\n(optional) Used to identify between different deprecation types.\nExample use case: in Upgrade Assistant, we may want to allow the user to sort by\ndeprecation type or show each type in a separate tab.\n\nFeel free to add new types if necessary.\nPredefined types are necessary to reduce having similar definitions with different keywords\nacross kibana deprecations." + ], + "signature": [ + "\"config\" | \"feature\" | undefined" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.documentationUrl", + "type": "string", + "tags": [], + "label": "documentationUrl", + "description": [ + "(optional) link to the documentation for more details on the deprecation." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.requireRestart", + "type": "CompoundType", + "tags": [], + "label": "requireRestart", + "description": [ + "(optional) specify the fix for this deprecation requires a full kibana restart." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.BaseDeprecationDetails.correctiveActions", + "type": "Object", + "tags": [], + "label": "correctiveActions", + "description": [ + "corrective action needed to fix this deprecation." + ], + "signature": [ + "{ api?: { path: string; method: \"POST\" | \"PUT\"; body?: { [key: string]: any; } | undefined; omitContextFromBody?: boolean | undefined; } | undefined; manualSteps: string[]; }" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.ConfigDeprecationDetails", + "type": "Interface", + "tags": [], + "label": "ConfigDeprecationDetails", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.ConfigDeprecationDetails", + "text": "ConfigDeprecationDetails" + }, + " extends ", + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.BaseDeprecationDetails", + "text": "BaseDeprecationDetails" + } + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.ConfigDeprecationDetails.configPath", + "type": "string", + "tags": [], + "label": "configPath", + "description": [], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.ConfigDeprecationDetails.deprecationType", + "type": "string", + "tags": [], + "label": "deprecationType", + "description": [], + "signature": [ + "\"config\"" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.DeprecationsGetResponse", + "type": "Interface", + "tags": [], + "label": "DeprecationsGetResponse", + "description": [], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.DeprecationsGetResponse.deprecations", + "type": "Array", + "tags": [], + "label": "deprecations", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.DomainDeprecationDetails", + "text": "DomainDeprecationDetails" + }, + "[]" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.FeatureDeprecationDetails", + "type": "Interface", + "tags": [], + "label": "FeatureDeprecationDetails", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.FeatureDeprecationDetails", + "text": "FeatureDeprecationDetails" + }, + " extends ", + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.BaseDeprecationDetails", + "text": "BaseDeprecationDetails" + } + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.FeatureDeprecationDetails.deprecationType", + "type": "string", + "tags": [], + "label": "deprecationType", + "description": [], + "signature": [ + "\"feature\" | undefined" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.DeprecationsDetails", + "type": "Type", + "tags": [], + "label": "DeprecationsDetails", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.ConfigDeprecationDetails", + "text": "ConfigDeprecationDetails" + }, + " | ", + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.FeatureDeprecationDetails", + "text": "FeatureDeprecationDetails" + } + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-deprecations-common", + "id": "def-common.DomainDeprecationDetails", + "type": "Type", + "tags": [], + "label": "DomainDeprecationDetails", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-deprecations-common", + "scope": "common", + "docId": "kibKbnCoreDeprecationsCommonPluginApi", + "section": "def-common.DeprecationsDetails", + "text": "DeprecationsDetails" + }, + " & { domainId: string; }" + ], + "path": "packages/core/deprecations/core-deprecations-common/src/types.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx new file mode 100644 index 00000000000000..7cdd0a314b3ed7 --- /dev/null +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreDeprecationsCommonPluginApi +slug: /kibana-dev-docs/api/kbn-core-deprecations-common +title: "@kbn/core-deprecations-common" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-deprecations-common plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 17 | 0 | 9 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 267a92638519d0..0381f04c123964 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 7d08334721f274..de58a5bc97d271 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index d5899796f92a50..5c97d175554aa8 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 914b5e628d8fef..dce0e80b7bf611 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index b7f620d289b321..635ed17110cdeb 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index f92206181f3157..3070f1b155433f 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 67180407420af0..2d94f5be056018 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 9a47c6234f5f5d..100e0917a7ccb2 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 7b070bb886e747..b1f5cf073486c9 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index b3029382d72f3c..31b21911b773fd 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-common plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 85a04d37b8516e..255181e4e8d416 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index c90863c3366533..74530da369a26d 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index cbb0cf2b71184e..f6355f3428056e 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 3f5f0b109b4411..0863e4d600f6a0 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index a6477204a3a970..25fdf453e6036c 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 291d5de25b7866..2d831bafc863c8 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index d6a148344a2692..6545f83989e886 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 0f45a7c9b362ce..c3794d0a87f1e9 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 7919a429d38d11..8a5d8d7e0cb981 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-common plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_context_server_mocks.devdocs.json b/api_docs/kbn_core_http_context_server_mocks.devdocs.json new file mode 100644 index 00000000000000..2c77ba329d06d7 --- /dev/null +++ b/api_docs/kbn_core_http_context_server_mocks.devdocs.json @@ -0,0 +1,201 @@ +{ + "id": "@kbn/core-http-context-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.ContextContainerMock", + "type": "Type", + "tags": [], + "label": "ContextContainerMock", + "description": [], + "signature": [ + "{ registerContext: jest.MockInstance<", + "IContextContainer", + ", [pluginOpaqueId: symbol, contextName: \"resolve\", provider: ", + "IContextProvider", + "<", + "RequestHandlerContextBase", + ", \"resolve\">]>; createHandler: jest.MockInstance<(request: ", + "KibanaRequest", + ", response: ", + "KibanaResponseFactory", + ") => Promise<", + "IKibanaResponse", + ">, [pluginOpaqueId: symbol, handler: ", + "RequestHandler", + "]>; } & ", + "IContextContainer" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextMock", + "type": "Object", + "tags": [], + "label": "contextMock", + "description": [], + "path": "packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "(mockContext?: any) => ", + { + "pluginId": "@kbn/core-http-context-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpContextServerMocksPluginApi", + "section": "def-server.ContextContainerMock", + "text": "ContextContainerMock" + } + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextMock.create.$1", + "type": "Any", + "tags": [], + "label": "mockContext", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock", + "type": "Object", + "tags": [], + "label": "contextServiceMock", + "description": [], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock.createPrebootContract", + "type": "Function", + "tags": [], + "label": "createPrebootContract", + "description": [], + "signature": [ + "(mockContext?: {}) => jest.Mocked<", + "InternalContextSetup", + ">" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock.createPrebootContract.$1", + "type": "Object", + "tags": [], + "label": "mockContext", + "description": [], + "signature": [ + "{}" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "(mockContext?: {}) => jest.Mocked<", + "InternalContextSetup", + ">" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-context-server-mocks", + "id": "def-server.contextServiceMock.createSetupContract.$1", + "type": "Object", + "tags": [], + "label": "mockContext", + "description": [], + "signature": [ + "{}" + ], + "path": "packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + } + ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx new file mode 100644 index 00000000000000..4eada9ea739b37 --- /dev/null +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreHttpContextServerMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks +title: "@kbn/core-http-context-server-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-http-context-server-mocks plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 1 | 10 | 0 | + +## Server + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_http_router_server_internal.devdocs.json b/api_docs/kbn_core_http_router_server_internal.devdocs.json new file mode 100644 index 00000000000000..444c019edeea95 --- /dev/null +++ b/api_docs/kbn_core_http_router_server_internal.devdocs.json @@ -0,0 +1,414 @@ +{ + "id": "@kbn/core-http-router-server-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter", + "type": "Class", + "tags": [], + "label": "HapiResponseAdapter", + "description": [], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "responseToolkit", + "description": [], + "signature": [ + "ResponseToolkit" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.toBadRequest", + "type": "Function", + "tags": [], + "label": "toBadRequest", + "description": [], + "signature": [ + "(message: string) => ", + "Boom", + "" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.toBadRequest.$1", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.toInternalError", + "type": "Function", + "tags": [], + "label": "toInternalError", + "description": [], + "signature": [ + "() => ", + "Boom", + "" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.handle", + "type": "Function", + "tags": [], + "label": "handle", + "description": [], + "signature": [ + "(kibanaResponse: ", + "KibanaResponse", + ") => ", + "Boom", + " | ", + "ResponseObject" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.HapiResponseAdapter.handle.$1", + "type": "Object", + "tags": [], + "label": "kibanaResponse", + "description": [], + "signature": [ + "KibanaResponse", + "" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response_adapter.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.filterHeaders", + "type": "Function", + "tags": [], + "label": "filterHeaders", + "description": [], + "signature": [ + "(headers: ", + "Headers", + ", fieldsToKeep: string[], fieldsToExclude: string[]) => ", + "Headers" + ], + "path": "packages/core/http/core-http-router-server-internal/src/headers.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.filterHeaders.$1", + "type": "CompoundType", + "tags": [], + "label": "headers", + "description": [], + "signature": [ + "Headers" + ], + "path": "packages/core/http/core-http-router-server-internal/src/headers.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.filterHeaders.$2", + "type": "Array", + "tags": [], + "label": "fieldsToKeep", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/core/http/core-http-router-server-internal/src/headers.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.filterHeaders.$3", + "type": "Array", + "tags": [], + "label": "fieldsToExclude", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/core/http/core-http-router-server-internal/src/headers.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.isKibanaResponse", + "type": "Function", + "tags": [], + "label": "isKibanaResponse", + "description": [], + "signature": [ + "(response: Record) => boolean" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.isKibanaResponse.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + "Record" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.isSafeMethod", + "type": "Function", + "tags": [], + "label": "isSafeMethod", + "description": [], + "signature": [ + "(method: ", + "RouteMethod", + ") => boolean" + ], + "path": "packages/core/http/core-http-router-server-internal/src/route.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.isSafeMethod.$1", + "type": "CompoundType", + "tags": [], + "label": "method", + "description": [], + "signature": [ + "RouteMethod" + ], + "path": "packages/core/http/core-http-router-server-internal/src/route.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory", + "type": "Object", + "tags": [], + "label": "kibanaResponseFactory", + "description": [], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory.custom", + "type": "Function", + "tags": [], + "label": "custom", + "description": [], + "signature": [ + " | Error | ", + "Stream", + " | Buffer | { message: string | Error; attributes?: ", + "ResponseErrorAttributes", + " | undefined; } | undefined>(options: ", + "CustomHttpResponseOptions", + ") => ", + "KibanaResponse", + "" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.kibanaResponseFactory.custom.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "CustomHttpResponseOptions", + "" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.lifecycleResponseFactory", + "type": "Object", + "tags": [], + "label": "lifecycleResponseFactory", + "description": [], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.lifecycleResponseFactory.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-router-server-internal", + "id": "def-server.lifecycleResponseFactory.Unnamed", + "type": "Any", + "tags": [], + "label": "Unnamed", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-router-server-internal/src/response.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx new file mode 100644 index 00000000000000..12999250639370 --- /dev/null +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -0,0 +1,33 @@ +--- +id: kibKbnCoreHttpRouterServerInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal +title: "@kbn/core-http-router-server-internal" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-http-router-server-internal plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 25 | 5 | 25 | 1 | + +## Server + +### Objects + + +### Functions + + +### Classes + + diff --git a/api_docs/kbn_core_http_router_server_mocks.devdocs.json b/api_docs/kbn_core_http_router_server_mocks.devdocs.json new file mode 100644 index 00000000000000..90fbdecc751454 --- /dev/null +++ b/api_docs/kbn_core_http_router_server_mocks.devdocs.json @@ -0,0 +1,193 @@ +{ + "id": "@kbn/core-http-router-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.RouterMock", + "type": "Type", + "tags": [], + "label": "RouterMock", + "description": [], + "signature": [ + "{ routerPath: string; get: jest.MockInstance, handler: ", + "RequestHandler", + "]>; post: jest.MockInstance, handler: ", + "RequestHandler", + "]>; put: jest.MockInstance, handler: ", + "RequestHandler", + "]>; patch: jest.MockInstance, handler: ", + "RequestHandler", + "]>; delete: jest.MockInstance, handler: ", + "RequestHandler", + "]>; handleLegacyErrors: jest.MockInstance<", + "RequestHandler", + ", [handler: ", + "RequestHandler", + "]>; getRoutes: jest.MockInstance<", + "RouterRoute", + "[], []>; } & ", + "IRouter", + "" + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter", + "type": "Object", + "tags": [], + "label": "mockRouter", + "description": [], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "({ routerPath }?: { routerPath?: string | undefined; }) => ", + { + "pluginId": "@kbn/core-http-router-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpRouterServerMocksPluginApi", + "section": "def-server.RouterMock", + "text": "RouterMock" + } + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter.create.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ routerPath?: string | undefined; }" + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter.createKibanaRequest", + "type": "Function", + "tags": [], + "label": "createKibanaRequest", + "description": [], + "signature": [ + "

({ path, headers, params, body, query, method, socket, routeTags, routeAuthRequired, validation, kibanaRouteOptions, kibanaRequestState, auth, }?: ", + "RequestFixtureOptions", + ") => ", + "KibanaRequest", + "" + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter.createKibanaRequest.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "RequestFixtureOptions", + "" + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-router-server-mocks", + "id": "def-server.mockRouter.createResponseFactory", + "type": "Function", + "tags": [], + "label": "createResponseFactory", + "description": [], + "signature": [ + "() => jest.Mocked<", + "KibanaResponseFactory", + ">" + ], + "path": "packages/core/http/core-http-router-server-mocks/src/router.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx new file mode 100644 index 00000000000000..1d1b322e7eab12 --- /dev/null +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreHttpRouterServerMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks +title: "@kbn/core-http-router-server-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-http-router-server-mocks plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 0 | 7 | 1 | + +## Server + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 7e649339c06070..7194f634b2948e 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-http-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_http_server_internal.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json new file mode 100644 index 00000000000000..b0c482d9afc031 --- /dev/null +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -0,0 +1,845 @@ +{ + "id": "@kbn/core-http-server-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig", + "type": "Class", + "tags": [], + "label": "CspConfig", + "description": [ + "\nCSP configuration for use in Kibana." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.CspConfig", + "text": "CspConfig" + }, + " implements ", + "ICspConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.DEFAULT", + "type": "Object", + "tags": [], + "label": "DEFAULT", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.CspConfig", + "text": "CspConfig" + } + ], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.directives", + "type": "Object", + "tags": [], + "label": "#directives", + "description": [], + "signature": [ + "CspDirectives" + ], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.strict", + "type": "boolean", + "tags": [], + "label": "strict", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.warnLegacyBrowsers", + "type": "boolean", + "tags": [], + "label": "warnLegacyBrowsers", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.disableEmbedding", + "type": "boolean", + "tags": [], + "label": "disableEmbedding", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.CspConfig.header", + "type": "string", + "tags": [], + "label": "header", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.ExternalUrlConfig", + "type": "Class", + "tags": [], + "label": "ExternalUrlConfig", + "description": [ + "\nExternal Url configuration for use in Kibana." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.ExternalUrlConfig", + "text": "ExternalUrlConfig" + }, + " implements ", + "IExternalUrlConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/external_url/external_url_config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.ExternalUrlConfig.DEFAULT", + "type": "Object", + "tags": [], + "label": "DEFAULT", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.ExternalUrlConfig", + "text": "ExternalUrlConfig" + } + ], + "path": "packages/core/http/core-http-server-internal/src/external_url/external_url_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.ExternalUrlConfig.policy", + "type": "Array", + "tags": [], + "label": "policy", + "description": [], + "signature": [ + "IExternalUrlPolicy", + "[]" + ], + "path": "packages/core/http/core-http-server-internal/src/external_url/external_url_config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig", + "type": "Class", + "tags": [], + "label": "HttpConfig", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.HttpConfig", + "text": "HttpConfig" + }, + " implements ", + "IHttpConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.autoListen", + "type": "boolean", + "tags": [], + "label": "autoListen", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.host", + "type": "string", + "tags": [], + "label": "host", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.keepaliveTimeout", + "type": "number", + "tags": [], + "label": "keepaliveTimeout", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.socketTimeout", + "type": "number", + "tags": [], + "label": "socketTimeout", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.port", + "type": "number", + "tags": [], + "label": "port", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.cors", + "type": "Object", + "tags": [], + "label": "cors", + "description": [], + "signature": [ + "{ enabled: boolean; allowCredentials: boolean; allowOrigin: string[]; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.securityResponseHeaders", + "type": "Object", + "tags": [], + "label": "securityResponseHeaders", + "description": [], + "signature": [ + "{ [x: string]: string | string[]; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.customResponseHeaders", + "type": "Object", + "tags": [], + "label": "customResponseHeaders", + "description": [], + "signature": [ + "{ [x: string]: string | string[]; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.maxPayload", + "type": "Object", + "tags": [], + "label": "maxPayload", + "description": [], + "signature": [ + "ByteSizeValue" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.basePath", + "type": "string", + "tags": [], + "label": "basePath", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.publicBaseUrl", + "type": "string", + "tags": [], + "label": "publicBaseUrl", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.rewriteBasePath", + "type": "boolean", + "tags": [], + "label": "rewriteBasePath", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.ssl", + "type": "Object", + "tags": [], + "label": "ssl", + "description": [], + "signature": [ + "SslConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.compression", + "type": "Object", + "tags": [], + "label": "compression", + "description": [], + "signature": [ + "{ enabled: boolean; referrerWhitelist?: string[] | undefined; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.csp", + "type": "Object", + "tags": [], + "label": "csp", + "description": [], + "signature": [ + "ICspConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.externalUrl", + "type": "Object", + "tags": [], + "label": "externalUrl", + "description": [], + "signature": [ + "IExternalUrlConfig" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.xsrf", + "type": "Object", + "tags": [], + "label": "xsrf", + "description": [], + "signature": [ + "{ disableProtection: boolean; allowlist: string[]; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.requestId", + "type": "Object", + "tags": [], + "label": "requestId", + "description": [], + "signature": [ + "{ allowFromAnyIp: boolean; ipAllowlist: string[]; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfig.shutdownTimeout", + "type": "Object", + "tags": [], + "label": "shutdownTimeout", + "description": [], + "signature": [ + "moment.Duration" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer", + "type": "Class", + "tags": [], + "label": "HttpServer", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "logger", + "description": [], + "signature": [ + "LoggerFactory" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.Unnamed.$2", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.Unnamed.$3", + "type": "Object", + "tags": [], + "label": "shutdownTimeout$", + "description": [], + "signature": [ + "Observable", + "" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.isListening", + "type": "Function", + "tags": [], + "label": "isListening", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "(config: ", + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.HttpConfig", + "text": "HttpConfig" + }, + ", executionContext?: ", + "IExecutionContext", + " | undefined) => Promise<", + "HttpServerSetup", + ">" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.setup.$1", + "type": "Object", + "tags": [], + "label": "config", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server-internal", + "scope": "server", + "docId": "kibKbnCoreHttpServerInternalPluginApi", + "section": "def-server.HttpConfig", + "text": "HttpConfig" + } + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.setup.$2", + "type": "Object", + "tags": [], + "label": "executionContext", + "description": [], + "signature": [ + "IExecutionContext", + " | undefined" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => Promise" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpServer.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => Promise" + ], + "path": "packages/core/http/core-http-server-internal/src/http_server.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.createCookieSessionStorageFactory", + "type": "Function", + "tags": [], + "label": "createCookieSessionStorageFactory", + "description": [ + "\nCreates SessionStorage factory, which abstract the way of\nsession storage implementation and scoping to the incoming requests.\n" + ], + "signature": [ + "(log: ", + "Logger", + ", server: ", + "Server", + ", cookieOptions: ", + "SessionStorageCookieOptions", + ", basePath: string | undefined) => Promise<", + "SessionStorageFactory", + ">" + ], + "path": "packages/core/http/core-http-server-internal/src/cookie_session_storage.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.createCookieSessionStorageFactory.$1", + "type": "Object", + "tags": [], + "label": "log", + "description": [], + "signature": [ + "Logger" + ], + "path": "packages/core/http/core-http-server-internal/src/cookie_session_storage.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.createCookieSessionStorageFactory.$2", + "type": "Object", + "tags": [], + "label": "server", + "description": [ + "- hapi server to create SessionStorage for" + ], + "signature": [ + "Server" + ], + "path": "packages/core/http/core-http-server-internal/src/cookie_session_storage.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.createCookieSessionStorageFactory.$3", + "type": "Object", + "tags": [], + "label": "cookieOptions", + "description": [ + "- cookies configuration" + ], + "signature": [ + "SessionStorageCookieOptions", + "" + ], + "path": "packages/core/http/core-http-server-internal/src/cookie_session_storage.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.createCookieSessionStorageFactory.$4", + "type": "string", + "tags": [], + "label": "basePath", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/http/core-http-server-internal/src/cookie_session_storage.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.HttpConfigType", + "type": "Type", + "tags": [], + "label": "HttpConfigType", + "description": [], + "signature": [ + "{ readonly basePath?: string | undefined; readonly uuid?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"required\" | \"optional\"; }>; readonly host: string; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; disableEmbedding: boolean; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "ByteSizeValue", + "; readonly rewriteBasePath: boolean; readonly keepaliveTimeout: number; readonly socketTimeout: number; readonly xsrf: Readonly<{} & { disableProtection: boolean; allowlist: string[]; }>; readonly requestId: Readonly<{} & { allowFromAnyIp: boolean; ipAllowlist: string[]; }>; }" + ], + "path": "packages/core/http/core-http-server-internal/src/http_config.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.cspConfig", + "type": "Object", + "tags": [], + "label": "cspConfig", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.cspConfig.path", + "type": "string", + "tags": [], + "label": "path", + "description": [ + "// TODO: Move this to server.csp using config deprecations\n// ? https://github.com/elastic/kibana/pull/52251" + ], + "path": "packages/core/http/core-http-server-internal/src/csp/config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.cspConfig.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [], + "signature": [ + "ObjectType", + "<{ disableUnsafeEval: ", + "ConditionalType", + "; script_src: ", + "Type", + "; worker_src: ", + "Type", + "; style_src: ", + "Type", + "; connect_src: ", + "Type", + "; default_src: ", + "Type", + "; font_src: ", + "Type", + "; frame_src: ", + "Type", + "; img_src: ", + "Type", + "; frame_ancestors: ", + "Type", + "; report_uri: ", + "Type", + "; report_to: ", + "Type", + "; strict: ", + "Type", + "; warnLegacyBrowsers: ", + "Type", + "; disableEmbedding: ", + "Type", + "; }>" + ], + "path": "packages/core/http/core-http-server-internal/src/csp/config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.externalUrlConfig", + "type": "Object", + "tags": [], + "label": "externalUrlConfig", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/external_url/config.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.externalUrlConfig.path", + "type": "string", + "tags": [], + "label": "path", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/external_url/config.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-server.externalUrlConfig.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [], + "signature": [ + "ObjectType", + "<{ policy: ", + "Type", + "<", + "IExternalUrlPolicy", + "[]>; }>" + ], + "path": "packages/core/http/core-http-server-internal/src/external_url/config.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx new file mode 100644 index 00000000000000..995891f2568ff2 --- /dev/null +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -0,0 +1,36 @@ +--- +id: kibKbnCoreHttpServerInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-http-server-internal +title: "@kbn/core-http-server-internal" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-http-server-internal plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 54 | 0 | 48 | 2 | + +## Server + +### Objects + + +### Functions + + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_http_server_mocks.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json new file mode 100644 index 00000000000000..bdbc8ce6779296 --- /dev/null +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -0,0 +1,830 @@ +{ + "id": "@kbn/core-http-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.createCoreContext", + "type": "Function", + "tags": [], + "label": "createCoreContext", + "description": [], + "signature": [ + "(overrides?: Partial<", + "CoreContext", + ">) => ", + "CoreContext" + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.createCoreContext.$1", + "type": "Object", + "tags": [], + "label": "overrides", + "description": [], + "signature": [ + "Partial<", + "CoreContext", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.createHttpServer", + "type": "Function", + "tags": [], + "label": "createHttpServer", + "description": [ + "\nCreates a concrete HttpServer with a mocked context." + ], + "signature": [ + "(overrides?: Partial<", + "CoreContext", + ">) => ", + "HttpService" + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.createHttpServer.$1", + "type": "Object", + "tags": [], + "label": "overrides", + "description": [], + "signature": [ + "Partial<", + "CoreContext", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.HttpServicePrebootMock", + "type": "Type", + "tags": [], + "label": "HttpServicePrebootMock", + "description": [], + "signature": [ + "{ registerRoutes: jest.MockInstance) => void]>; basePath: ", + "IBasePath", + "; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; } & ", + "HttpServicePreboot", + "<", + "RequestHandlerContextBase", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.HttpServiceSetupMock", + "type": "Type", + "tags": [], + "label": "HttpServiceSetupMock", + "description": [], + "signature": [ + "{ csp: ", + "ICspConfig", + "; createCookieSessionStorageFactory: jest.MockInstance>, [cookieOptions: ", + "SessionStorageCookieOptions", + "]>; registerOnPreRouting: jest.MockInstance; registerOnPreAuth: jest.MockInstance; registerAuth: jest.MockInstance; registerOnPostAuth: jest.MockInstance; registerOnPreResponse: jest.MockInstance; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; registerRouteHandlerContext: jest.MockInstance<", + "IContextContainer", + ", [contextName: Exclude, provider: ", + "IContextProvider", + ">]>; } & Omit<", + "HttpServiceSetup", + ", \"basePath\" | \"createRouter\"> & { basePath: BasePathMocked; createRouter: jest.MockedFunction<() => ", + "RouterMock", + ">; }" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.HttpServiceStartMock", + "type": "Type", + "tags": [], + "label": "HttpServiceStartMock", + "description": [], + "signature": [ + "{ basePath: ", + "IBasePath", + "; auth: ", + "HttpAuth", + "; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; } & ", + "HttpServiceStart", + " & { basePath: BasePathMocked; }" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.InternalHttpServicePrebootMock", + "type": "Type", + "tags": [], + "label": "InternalHttpServicePrebootMock", + "description": [], + "signature": [ + "{ auth: ", + "HttpAuth", + "; server: ", + "Server", + "; externalUrl: ", + "ExternalUrlConfig", + "; csp: ", + "ICspConfig", + "; registerStaticDir: jest.MockInstance; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; registerRouteHandlerContext: jest.MockInstance]>; registerRoutes: jest.MockInstance) => void]>; } & Omit<", + "InternalHttpServicePreboot", + ", \"basePath\"> & { basePath: BasePathMocked; }" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.InternalHttpServiceSetupMock", + "type": "Type", + "tags": [], + "label": "InternalHttpServiceSetupMock", + "description": [], + "signature": [ + "{ server: ", + "Server", + "; externalUrl: ", + "ExternalUrlConfig", + "; csp: ", + "ICspConfig", + "; registerRouterAfterListening: jest.MockInstance]>; registerStaticDir: jest.MockInstance; createCookieSessionStorageFactory: jest.MockInstance>, [cookieOptions: ", + "SessionStorageCookieOptions", + "]>; registerOnPreRouting: jest.MockInstance; registerOnPreAuth: jest.MockInstance; registerAuth: jest.MockInstance; registerOnPostAuth: jest.MockInstance; registerOnPreResponse: jest.MockInstance; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; registerRouteHandlerContext: jest.MockInstance]>; registerPrebootRoutes: jest.MockInstance) => void]>; } & Omit<", + "InternalHttpServiceSetup", + ", \"basePath\" | \"auth\" | \"authRequestHeaders\" | \"createRouter\"> & { auth: AuthMocked; basePath: BasePathMocked; createRouter: jest.MockedFunction<(path: string) => ", + "RouterMock", + ">; authRequestHeaders: jest.Mocked<", + "IAuthHeadersStorage", + ">; }" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.InternalHttpServiceStartMock", + "type": "Type", + "tags": [], + "label": "InternalHttpServiceStartMock", + "description": [], + "signature": [ + "{ isListening: jest.MockInstance; basePath: ", + "IBasePath", + "; auth: ", + "HttpAuth", + "; getServerInfo: jest.MockInstance<", + "HttpServerInfo", + ", []>; } & ", + "InternalHttpServiceStart", + " & { basePath: BasePathMocked; }" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock", + "type": "Object", + "tags": [], + "label": "httpServerMock", + "description": [], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createKibanaRequest", + "type": "Function", + "tags": [], + "label": "createKibanaRequest", + "description": [], + "signature": [ + "

({ path, headers, params, body, query, method, socket, routeTags, routeAuthRequired, validation, kibanaRouteOptions, kibanaRequestState, auth, }?: ", + "RequestFixtureOptions", + " | undefined) => ", + "KibanaRequest", + "" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createKibanaRequest.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "RequestFixtureOptions", + " | undefined" + ], + "path": "node_modules/@types/kbn__core-http-router-server-mocks/index.d.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createRawRequest", + "type": "Function", + "tags": [], + "label": "createRawRequest", + "description": [], + "signature": [ + "(customization?: ", + "DeepPartialObject", + "<", + "Request", + "> | undefined) => ", + "Request" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createRawRequest.$1", + "type": "Object", + "tags": [], + "label": "customization", + "description": [], + "signature": [ + "DeepPartialObject", + "<", + "Request", + "> | undefined" + ], + "path": "node_modules/@types/kbn__hapi-mocks/index.d.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createResponseFactory", + "type": "Function", + "tags": [], + "label": "createResponseFactory", + "description": [], + "signature": [ + "() => jest.Mocked<", + "KibanaResponseFactory", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createLifecycleResponseFactory", + "type": "Function", + "tags": [], + "label": "createLifecycleResponseFactory", + "description": [], + "signature": [ + "() => jest.Mocked<", + "LifecycleResponseFactory", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServerMock.createToolkit", + "type": "Function", + "tags": [], + "label": "createToolkit", + "description": [], + "signature": [ + "() => ToolkitMock" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_server.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock", + "type": "Object", + "tags": [], + "label": "httpServiceMock", + "description": [], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createBasePath", + "type": "Function", + "tags": [], + "label": "createBasePath", + "description": [], + "signature": [ + "(serverBasePath?: string, publicBaseUrl?: string) => BasePathMocked" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createBasePath.$1", + "type": "string", + "tags": [], + "label": "serverBasePath", + "description": [], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createBasePath.$2", + "type": "string", + "tags": [], + "label": "publicBaseUrl", + "description": [], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false + } + ] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createAuth", + "type": "Function", + "tags": [], + "label": "createAuth", + "description": [], + "signature": [ + "() => AuthMocked" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createInternalPrebootContract", + "type": "Function", + "tags": [], + "label": "createInternalPrebootContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.InternalHttpServicePrebootMock", + "text": "InternalHttpServicePrebootMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createPrebootContract", + "type": "Function", + "tags": [], + "label": "createPrebootContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.HttpServicePrebootMock", + "text": "HttpServicePrebootMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createInternalSetupContract", + "type": "Function", + "tags": [], + "label": "createInternalSetupContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.InternalHttpServiceSetupMock", + "text": "InternalHttpServiceSetupMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.HttpServiceSetupMock", + "text": "HttpServiceSetupMock" + }, + "" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createInternalStartContract", + "type": "Function", + "tags": [], + "label": "createInternalStartContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.InternalHttpServiceStartMock", + "text": "InternalHttpServiceStartMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createStartContract", + "type": "Function", + "tags": [], + "label": "createStartContract", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-http-server-mocks", + "scope": "server", + "docId": "kibKbnCoreHttpServerMocksPluginApi", + "section": "def-server.HttpServiceStartMock", + "text": "HttpServiceStartMock" + } + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createOnPreAuthToolkit", + "type": "Function", + "tags": [], + "label": "createOnPreAuthToolkit", + "description": [], + "signature": [ + "() => jest.Mocked<", + "OnPreAuthToolkit", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createOnPostAuthToolkit", + "type": "Function", + "tags": [], + "label": "createOnPostAuthToolkit", + "description": [], + "signature": [ + "() => jest.Mocked<", + "OnPostAuthToolkit", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createOnPreResponseToolkit", + "type": "Function", + "tags": [], + "label": "createOnPreResponseToolkit", + "description": [], + "signature": [ + "() => jest.Mocked<", + "OnPreResponseToolkit", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createOnPreRoutingToolkit", + "type": "Function", + "tags": [], + "label": "createOnPreRoutingToolkit", + "description": [], + "signature": [ + "() => jest.Mocked<", + "OnPreRoutingToolkit", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createAuthToolkit", + "type": "Function", + "tags": [], + "label": "createAuthToolkit", + "description": [], + "signature": [ + "() => jest.Mocked<", + "AuthToolkit", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createAuthHeaderStorage", + "type": "Function", + "tags": [], + "label": "createAuthHeaderStorage", + "description": [], + "signature": [ + "() => jest.Mocked<", + "IAuthHeadersStorage", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createRouter", + "type": "Function", + "tags": [], + "label": "createRouter", + "description": [], + "signature": [ + "({ routerPath }?: { routerPath?: string | undefined; } | undefined) => ", + "RouterMock" + ], + "path": "packages/core/http/core-http-server-mocks/src/http_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.httpServiceMock.createRouter.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ routerPath?: string | undefined; } | undefined" + ], + "path": "node_modules/@types/kbn__core-http-router-server-mocks/index.d.ts", + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.sessionStorageMock", + "type": "Object", + "tags": [], + "label": "sessionStorageMock", + "description": [], + "path": "packages/core/http/core-http-server-mocks/src/cookie_session_storage.mocks.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.sessionStorageMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked<", + "SessionStorage", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/cookie_session_storage.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-http-server-mocks", + "id": "def-server.sessionStorageMock.createFactory", + "type": "Function", + "tags": [], + "label": "createFactory", + "description": [], + "signature": [ + "() => DeepMocked<", + "SessionStorageFactory", + ">" + ], + "path": "packages/core/http/core-http-server-mocks/src/cookie_session_storage.mocks.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx new file mode 100644 index 00000000000000..404234635c9586 --- /dev/null +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -0,0 +1,33 @@ +--- +id: kibKbnCoreHttpServerMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-http-server-mocks +title: "@kbn/core-http-server-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-http-server-mocks plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 41 | 0 | 37 | 0 | + +## Server + +### Objects + + +### Functions + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index a91021ebc1dfc8..895827b42752ca 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index fbce78c64125f2..82b3437b0381f7 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index ccc520c13af17d..c7da5326fe12f7 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 36fef0f5ed33e0..42994d0e6dff9c 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 916fd50bd6dccb..c0429e0c275291 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 2e9b6efde4e407..05371a5d2e2678 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 69f605b7700906..cd247288d21b06 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 226cef67aac46f..07db2e25dbfa6d 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_internal.devdocs.json b/api_docs/kbn_core_node_server_internal.devdocs.json index 1937ba5e72c7dd..0e598b07cd930a 100644 --- a/api_docs/kbn_core_node_server_internal.devdocs.json +++ b/api_docs/kbn_core_node_server_internal.devdocs.json @@ -49,7 +49,7 @@ "ObjectType", "<{ roles: ", "Type", - "<(\"ui\" | \"background_tasks\")[] | \"*\"[]>; }>" + "<\"*\"[] | (\"ui\" | \"background_tasks\")[]>; }>" ], "path": "packages/core/node/core-node-server-internal/src/node_config.ts", "deprecated": false diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 55bdfa7ae888f1..67b704d71fa4e5 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 0ab1f3154b7c6f..177cb534f5c22b 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 8ae587b311f545..4710e583c59295 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-preboot-server plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 7cf1640f3a81eb..4089f2b7c921a4 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json b/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json new file mode 100644 index 00000000000000..477484917583d5 --- /dev/null +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.devdocs.json @@ -0,0 +1,141 @@ +{ + "id": "@kbn/core-test-helpers-http-setup-browser", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/core-test-helpers-http-setup-browser", + "id": "def-common.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "(tap: ", + { + "pluginId": "@kbn/core-test-helpers-http-setup-browser", + "scope": "common", + "docId": "kibKbnCoreTestHelpersHttpSetupBrowserPluginApi", + "section": "def-common.SetupTap", + "text": "SetupTap" + }, + ") => { httpService: ", + "HttpService", + "; injectedMetadata: jest.Mocked<", + "InternalInjectedMetadataSetup", + ">; fatalErrors: jest.Mocked<", + "FatalErrorsSetup", + ">; http: ", + "HttpSetup", + "; }" + ], + "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-test-helpers-http-setup-browser", + "id": "def-common.setup.$1", + "type": "Function", + "tags": [], + "label": "tap", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-test-helpers-http-setup-browser", + "scope": "common", + "docId": "kibKbnCoreTestHelpersHttpSetupBrowserPluginApi", + "section": "def-common.SetupTap", + "text": "SetupTap" + } + ], + "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-test-helpers-http-setup-browser", + "id": "def-common.SetupTap", + "type": "Type", + "tags": [], + "label": "SetupTap", + "description": [], + "signature": [ + "(injectedMetadata: jest.Mocked<", + "InternalInjectedMetadataSetup", + ">, fatalErrors: jest.Mocked<", + "FatalErrorsSetup", + ">) => void" + ], + "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/core-test-helpers-http-setup-browser", + "id": "def-common.SetupTap.$1", + "type": "CompoundType", + "tags": [], + "label": "injectedMetadata", + "description": [], + "signature": [ + "{ getBasePath: jest.MockInstance; getServerBasePath: jest.MockInstance; getPublicBaseUrl: jest.MockInstance; getKibanaBuildNumber: jest.MockInstance; getKibanaBranch: jest.MockInstance; getKibanaVersion: jest.MockInstance; getCspConfig: jest.MockInstance<{ warnLegacyBrowsers: boolean; }, []>; getExternalUrlConfig: jest.MockInstance<{ policy: ", + "InjectedMetadataExternalUrlPolicy", + "[]; }, []>; getTheme: jest.MockInstance<{ darkMode: boolean; version: \"v8\"; }, []>; getElasticsearchInfo: jest.MockInstance<", + "InjectedMetadataClusterInfo", + ", []>; getPlugins: jest.MockInstance<", + "InjectedMetadataPlugin", + "[], []>; getAnonymousStatusPage: jest.MockInstance; getLegacyMetadata: jest.MockInstance<{ uiSettings: { defaults: Record; user?: Record | undefined; }; }, []>; getInjectedVar: jest.MockInstance; getInjectedVars: jest.MockInstance<{ [key: string]: unknown; }, []>; } & ", + "InternalInjectedMetadataSetup" + ], + "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-test-helpers-http-setup-browser", + "id": "def-common.SetupTap.$2", + "type": "CompoundType", + "tags": [], + "label": "fatalErrors", + "description": [], + "signature": [ + "{ add: jest.MockInstance; get$: jest.MockInstance<", + "Observable", + "<", + "FatalErrorInfo", + ">, []>; } & ", + "FatalErrorsSetup" + ], + "path": "packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx new file mode 100644 index 00000000000000..6ac099e4d0c269 --- /dev/null +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreTestHelpersHttpSetupBrowserPluginApi +slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser +title: "@kbn/core-test-helpers-http-setup-browser" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-test-helpers-http-setup-browser plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 5 | 0 | + +## Common + +### Functions + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 2696e5095f1d97..4ff5ac041bbd6c 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index a74da07fc7a1b9..d9030c96ae6ed3 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index df4a00590b7461..1c0a9295e2d8cf 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_ui_settings_browser.devdocs.json b/api_docs/kbn_core_ui_settings_browser.devdocs.json new file mode 100644 index 00000000000000..20f23615866bd0 --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser.devdocs.json @@ -0,0 +1,432 @@ +{ + "id": "@kbn/core-ui-settings-browser", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient", + "type": "Interface", + "tags": [], + "label": "IUiSettingsClient", + "description": [ + "\nClient-side client that provides access to the advanced settings stored in elasticsearch.\nThe settings provide control over the behavior of the Kibana application.\nFor example, a user can specify how to display numeric or date fields.\nUsers can adjust the settings via Management UI.\n{@link IUiSettingsClient}\n" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGets the value for a specific uiSetting. If this setting has no user-defined value\nthen the `defaultOverride` parameter is returned (and parsed if setting is of type\n\"json\" or \"number). If the parameter is not defined and the key is not registered\nby any plugin then an error is thrown, otherwise reads the default value defined by a plugin." + ], + "signature": [ + "(key: string, defaultOverride?: T | undefined) => T" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get.$2", + "type": "Uncategorized", + "tags": [], + "label": "defaultOverride", + "description": [], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get$", + "type": "Function", + "tags": [], + "label": "get$", + "description": [ + "\nGets an observable of the current value for a config key, and all updates to that config\nkey in the future. Providing a `defaultOverride` argument behaves the same as it does in #get()" + ], + "signature": [ + "(key: string, defaultOverride?: T | undefined) => ", + "Observable", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get$.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.get$.$2", + "type": "Uncategorized", + "tags": [], + "label": "defaultOverride", + "description": [], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.getAll", + "type": "Function", + "tags": [], + "label": "getAll", + "description": [ + "\nGets the metadata about all uiSettings, including the type, default value, and user value\nfor each key." + ], + "signature": [ + "() => Readonly>>" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.set", + "type": "Function", + "tags": [], + "label": "set", + "description": [ + "\nSets the value for a uiSetting. If the setting is not registered by any plugin\nit will be stored as a custom setting. The new value will be synchronously available via\nthe `get()` method and sent to the server in the background. If the request to the\nserver fails then a updateErrors$ will be notified and the setting will be\nreverted to its value before `set()` was called." + ], + "signature": [ + "(key: string, value: any) => Promise" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.set.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.set.$2", + "type": "Any", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.remove", + "type": "Function", + "tags": [], + "label": "remove", + "description": [ + "\nRemoves the user-defined value for a setting, causing it to revert to the default. This\nmethod behaves the same as calling `set(key, null)`, including the synchronization, custom\nsetting, and error behavior of that method." + ], + "signature": [ + "(key: string) => Promise" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.remove.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isDeclared", + "type": "Function", + "tags": [], + "label": "isDeclared", + "description": [ + "\nReturns true if the key is a \"known\" uiSetting, meaning it is either registered\nby any plugin or was previously added as a custom setting via the `set()` method." + ], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isDeclared.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isDefault", + "type": "Function", + "tags": [], + "label": "isDefault", + "description": [ + "\nReturns true if the setting has no user-defined value or is unknown" + ], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isDefault.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isCustom", + "type": "Function", + "tags": [], + "label": "isCustom", + "description": [ + "\nReturns true if the setting wasn't registered by any plugin, but was either\nadded directly via `set()`, or is an unknown setting found in the uiSettings saved\nobject" + ], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isCustom.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isOverridden", + "type": "Function", + "tags": [], + "label": "isOverridden", + "description": [ + "\nShows whether the uiSettings value set by the user." + ], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.isOverridden.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.getUpdate$", + "type": "Function", + "tags": [], + "label": "getUpdate$", + "description": [ + "\nReturns an Observable that notifies subscribers of each update to the uiSettings,\nincluding the key, newValue, and oldValue of the setting that changed." + ], + "signature": [ + "() => ", + "Observable", + "<{ key: string; newValue: T; oldValue: T; }>" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.IUiSettingsClient.getUpdateErrors$", + "type": "Function", + "tags": [], + "label": "getUpdateErrors$", + "description": [ + "\nReturns an Observable that notifies subscribers of each error while trying to update\nthe settings, containing the actual Error class." + ], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.UiSettingsState", + "type": "Interface", + "tags": [], + "label": "UiSettingsState", + "description": [], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser", + "id": "def-common.UiSettingsState.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[key: string]: PublicUiSettingsParams & UserProvidedValues", + "description": [], + "signature": [ + "[key: string]: ", + "PublicUiSettingsParams", + " & ", + "UserProvidedValues", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser/src/types.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx new file mode 100644 index 00000000000000..a4ad1186579de5 --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreUiSettingsBrowserPluginApi +slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser +title: "@kbn/core-ui-settings-browser" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-ui-settings-browser plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 25 | 1 | 13 | 0 | + +## Common + +### Interfaces + + diff --git a/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json b/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json new file mode 100644 index 00000000000000..3bf2fabb7e2226 --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser_internal.devdocs.json @@ -0,0 +1,419 @@ +{ + "id": "@kbn/core-ui-settings-browser-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient", + "type": "Class", + "tags": [], + "label": "UiSettingsClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser-internal", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserInternalPluginApi", + "section": "def-common.UiSettingsClient", + "text": "UiSettingsClient" + }, + " implements ", + "IUiSettingsClient" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "UiSettingsClientParams" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.getAll", + "type": "Function", + "tags": [], + "label": "getAll", + "description": [], + "signature": [ + "() => Record>" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [], + "signature": [ + "(key: string, defaultOverride?: T | undefined) => any" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get.$2", + "type": "Uncategorized", + "tags": [], + "label": "defaultOverride", + "description": [], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get$", + "type": "Function", + "tags": [], + "label": "get$", + "description": [], + "signature": [ + "(key: string, defaultOverride?: T | undefined) => ", + "Observable", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get$.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.get$.$2", + "type": "Uncategorized", + "tags": [], + "label": "defaultOverride", + "description": [], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.set", + "type": "Function", + "tags": [], + "label": "set", + "description": [], + "signature": [ + "(key: string, value: any) => Promise" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.set.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.set.$2", + "type": "Any", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.remove", + "type": "Function", + "tags": [], + "label": "remove", + "description": [], + "signature": [ + "(key: string) => Promise" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.remove.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isDeclared", + "type": "Function", + "tags": [], + "label": "isDeclared", + "description": [], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isDeclared.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isDefault", + "type": "Function", + "tags": [], + "label": "isDefault", + "description": [], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isDefault.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isCustom", + "type": "Function", + "tags": [], + "label": "isCustom", + "description": [], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isCustom.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isOverridden", + "type": "Function", + "tags": [], + "label": "isOverridden", + "description": [], + "signature": [ + "(key: string) => boolean" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.isOverridden.$1", + "type": "string", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "string" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.getUpdate$", + "type": "Function", + "tags": [], + "label": "getUpdate$", + "description": [], + "signature": [ + "() => ", + "Observable", + "<{ key: string; newValue: any; oldValue: any; }>" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-internal", + "id": "def-common.UiSettingsClient.getUpdateErrors$", + "type": "Function", + "tags": [], + "label": "getUpdateErrors$", + "description": [], + "signature": [ + "() => ", + "Observable", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts", + "deprecated": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx new file mode 100644 index 00000000000000..42b710a0fb9faa --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreUiSettingsBrowserInternalPluginApi +slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal +title: "@kbn/core-ui-settings-browser-internal" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-ui-settings-browser-internal plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 25 | 1 | 25 | 0 | + +## Common + +### Classes + + diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json b/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json new file mode 100644 index 00000000000000..c836e521e1e168 --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser_mocks.devdocs.json @@ -0,0 +1,90 @@ +{ + "id": "@kbn/core-ui-settings-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.uiSettingsServiceMock", + "type": "Object", + "tags": [], + "label": "uiSettingsServiceMock", + "description": [], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.uiSettingsServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => jest.Mocked" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.uiSettingsServiceMock.createSetupContract", + "type": "Function", + "tags": [], + "label": "createSetupContract", + "description": [], + "signature": [ + "() => jest.Mocked<", + "IUiSettingsClient", + ">" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-ui-settings-browser-mocks", + "id": "def-common.uiSettingsServiceMock.createStartContract", + "type": "Function", + "tags": [], + "label": "createStartContract", + "description": [], + "signature": [ + "() => jest.Mocked<", + "IUiSettingsClient", + ">" + ], + "path": "packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts", + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx new file mode 100644 index 00000000000000..ed65b843361f2d --- /dev/null +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -0,0 +1,27 @@ +--- +id: kibKbnCoreUiSettingsBrowserMocksPluginApi +slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks +title: "@kbn/core-ui-settings-browser-mocks" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-ui-settings-browser-mocks plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 4 | 0 | 4 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_ui_settings_common.devdocs.json b/api_docs/kbn_core_ui_settings_common.devdocs.json new file mode 100644 index 00000000000000..2235802090141c --- /dev/null +++ b/api_docs/kbn_core_ui_settings_common.devdocs.json @@ -0,0 +1,418 @@ +{ + "id": "@kbn/core-ui-settings-common", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.DeprecationSettings", + "type": "Interface", + "tags": [], + "label": "DeprecationSettings", + "description": [ + "\nUiSettings deprecation field options." + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.DeprecationSettings.message", + "type": "string", + "tags": [], + "label": "message", + "description": [ + "Deprecation message" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.DeprecationSettings.docLinksKey", + "type": "string", + "tags": [], + "label": "docLinksKey", + "description": [ + "Key to documentation links" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams", + "type": "Interface", + "tags": [], + "label": "UiSettingsParams", + "description": [ + "\nUiSettings parameters defined by the plugins." + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.UiSettingsParams", + "text": "UiSettingsParams" + }, + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "title in the UI" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.value", + "type": "Uncategorized", + "tags": [], + "label": "value", + "description": [ + "default value to fall back to if a user doesn't provide any" + ], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.description", + "type": "string", + "tags": [], + "label": "description", + "description": [ + "description provided to a user in UI" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.category", + "type": "Array", + "tags": [], + "label": "category", + "description": [ + "used to group the configured setting in the UI" + ], + "signature": [ + "string[] | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.options", + "type": "Array", + "tags": [], + "label": "options", + "description": [ + "array of permitted values for this setting" + ], + "signature": [ + "string[] | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.optionLabels", + "type": "Object", + "tags": [], + "label": "optionLabels", + "description": [ + "text labels for 'select' type UI element" + ], + "signature": [ + "Record | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.requiresPageReload", + "type": "CompoundType", + "tags": [], + "label": "requiresPageReload", + "description": [ + "a flag indicating whether new value applying requires page reloading" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.readonly", + "type": "CompoundType", + "tags": [], + "label": "readonly", + "description": [ + "a flag indicating that value cannot be changed" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.sensitive", + "type": "CompoundType", + "tags": [], + "label": "sensitive", + "description": [ + "\na flag indicating that value might contain user sensitive data.\nused by telemetry to mask the value of the setting when sent." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [ + "defines a type of UI element {@link UiSettingsType}" + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.UiSettingsType", + "text": "UiSettingsType" + }, + " | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.deprecation", + "type": "Object", + "tags": [], + "label": "deprecation", + "description": [ + "optional deprecation information. Used to generate a deprecation warning." + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.DeprecationSettings", + "text": "DeprecationSettings" + }, + " | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.order", + "type": "number", + "tags": [], + "label": "order", + "description": [ + "\nindex of the settings within its category (ascending order, smallest will be displayed first).\nUsed for ordering in the UI.\n" + ], + "signature": [ + "number | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [], + "signature": [ + "Type", + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsParams.metric", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "metric", + "description": [ + "\nMetric to track once this property changes" + ], + "signature": [ + "{ type: string; name: string; } | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": true, + "references": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UserProvidedValues", + "type": "Interface", + "tags": [], + "label": "UserProvidedValues", + "description": [ + "\nDescribes the values explicitly set by user." + ], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.UserProvidedValues", + "text": "UserProvidedValues" + }, + "" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UserProvidedValues.userValue", + "type": "Uncategorized", + "tags": [], + "label": "userValue", + "description": [], + "signature": [ + "T | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UserProvidedValues.isOverridden", + "type": "CompoundType", + "tags": [], + "label": "isOverridden", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.PublicUiSettingsParams", + "type": "Type", + "tags": [], + "label": "PublicUiSettingsParams", + "description": [ + "\nA sub-set of {@link UiSettingsParams} exposed to the client-side." + ], + "signature": [ + "{ metric?: { type: string; name: string; } | undefined; type?: ", + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.UiSettingsType", + "text": "UiSettingsType" + }, + " | undefined; value?: unknown; description?: string | undefined; name?: string | undefined; options?: string[] | undefined; order?: number | undefined; category?: string[] | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; sensitive?: boolean | undefined; deprecation?: ", + { + "pluginId": "@kbn/core-ui-settings-common", + "scope": "common", + "docId": "kibKbnCoreUiSettingsCommonPluginApi", + "section": "def-common.DeprecationSettings", + "text": "DeprecationSettings" + }, + " | undefined; }" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-ui-settings-common", + "id": "def-common.UiSettingsType", + "type": "Type", + "tags": [], + "label": "UiSettingsType", + "description": [ + "\nUI element type to represent the settings." + ], + "signature": [ + "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"image\" | \"json\" | \"markdown\" | \"select\" | \"array\"" + ], + "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx new file mode 100644 index 00000000000000..23fdc0fbbb4b15 --- /dev/null +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnCoreUiSettingsCommonPluginApi +slug: /kibana-dev-docs/api/kbn-core-ui-settings-common +title: "@kbn/core-ui-settings-common" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/core-ui-settings-common plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 23 | 0 | 3 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index f4ccbc68361310..6f7957c630a53c 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 88264483fc9a8b..d6b0356977827d 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto-browser plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index e023e9079e2bd1..9afd0dcb509c91 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/datemath plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 9d1c3ffc9df7b3..03600c8eb5123f 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-errors plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 81266da8d23710..6bdf5aa06e72ca 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-runner plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 46ef619d15bad3..d253ef68e24c33 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-proc-runner plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index a303d0746a4b70..f2a033462df433 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json index c50316d8d36b30..75ecd04cd953ba 100644 --- a/api_docs/kbn_doc_links.devdocs.json +++ b/api_docs/kbn_doc_links.devdocs.json @@ -510,7 +510,7 @@ "label": "securitySolution", "description": [], "signature": [ - "{ readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly policyResponseTroubleshooting: { full_disk_access: string; }; }" + "{ readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly policyResponseTroubleshooting: { full_disk_access: string; macos_system_ext: string; }; }" ], "path": "packages/kbn-doc-links/src/types.ts", "deprecated": false diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index b14e9bc396e94c..ccd05b0cc3e091 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/doc-links plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 795ed22797a5a1..1e10f69a21a83e 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/docs-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index fe26cd2e11499c..c6fc992be93936 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-archiver plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 48142c61961714..6ef0c21af4c5e8 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-errors plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 2d8bae60b8638b..d05af5b78d2956 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-query plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 1cdf11398ec252..4edb84d4b6f844 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 11fe0ce3bfe4cf..6e36e0e05ad87c 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/field-types plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index f575ed9e96acf2..0eb4654b5bf20d 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/find-used-node-modules plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 0774a78983edfd..1163450e2232d5 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/generate plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 1a82a8e4b4e05b..d6a83c7a111dde 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/handlebars plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 9883c92e94510a..a07e42898b671c 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/hapi-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_home_sample_data_cards.mdx b/api_docs/kbn_home_sample_data_cards.mdx index 03317518065c2b..db1a613b06d6cc 100644 --- a/api_docs/kbn_home_sample_data_cards.mdx +++ b/api_docs/kbn_home_sample_data_cards.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-cards title: "@kbn/home-sample-data-cards" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/home-sample-data-cards plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-cards'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index c9e59b4d88f574..075fb77a3bc3d9 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/i18n plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 8bf9d49d6575e9..da9402421dfe0b 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/import-resolver plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 96b22326b2c91a..d50295a4ec1913 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/interpreter plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 39cdff5e68ec75..6225ad6ec45572 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/io-ts-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 893c265de79fb0..86adaf6b57cafa 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/jest-serializers plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_kibana_json_schema.mdx b/api_docs/kbn_kibana_json_schema.mdx index 79d914b9c41856..060dd4b8d4d68b 100644 --- a/api_docs/kbn_kibana_json_schema.mdx +++ b/api_docs/kbn_kibana_json_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-json-schema title: "@kbn/kibana-json-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/kibana-json-schema plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-json-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index a6d3a89102cab3..c5c7008c24864c 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 1eb5f32f3d4e64..dde39f95ede19c 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging-mocks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index cb2f5e70cdbd04..34d516e763d7bd 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/mapbox-gl plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 571327db19dae8..31a8a30520ad46 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-agg-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index cb6bb04de04ac8..ec5e697e62b51e 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index cbf44d612dba33..6276d938998628 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-string-hash plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 00c57bd021c126..aa6e84684d17df 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/monaco plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 362dc2c3a59784..53cb7f182e8a48 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index af2b4599c64e92..dd0e223253062c 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 0bfc7e8a1d0767..3f34b02b91b488 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_discovery.mdx b/api_docs/kbn_plugin_discovery.mdx index cb9dc8fd3de57e..88fe307c3bb68d 100644 --- a/api_docs/kbn_plugin_discovery.mdx +++ b/api_docs/kbn_plugin_discovery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-discovery title: "@kbn/plugin-discovery" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-discovery plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-discovery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index e342972b344dc2..8fd712b5b411c4 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-generator plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 2d2c6844989a3b..6b97051fcdb19c 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-helpers plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_pm.mdx b/api_docs/kbn_pm.mdx index 87b48361f3fda7..35d2d53fe1f278 100644 --- a/api_docs/kbn_pm.mdx +++ b/api_docs/kbn_pm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-pm title: "@kbn/pm" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/pm plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/pm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 34861771b09baa..b266903d804a14 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/react-field plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 801fc84fe142aa..df8fc918caa557 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/rule-data-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_scalability_simulation_generator.mdx b/api_docs/kbn_scalability_simulation_generator.mdx index c9819fefe3b25d..6837d445a7fc96 100644 --- a/api_docs/kbn_scalability_simulation_generator.mdx +++ b/api_docs/kbn_scalability_simulation_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-scalability-simulation-generator title: "@kbn/scalability-simulation-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/scalability-simulation-generator plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/scalability-simulation-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index d1729ee7ab8461..3525dc4f991051 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 6f3ce2b2f2a98e..13324d6db4bf7d 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 39bad06541b211..917cf96bda2199 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 5f574350fb6179..3204dca062a8f3 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 324b498fc24af8..9202a6895ce3e8 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 83c2de04f5b8be..c8166732e08030 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index ebd3da11ca2ef0..49abef45478514 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 5c6f7b44f0bec2..9590689c967376 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index e31530908c6582..9d11456c16e33c 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index cb690f98e6b4e0..02f9e584734f31 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index d923ad7f514572..0355d79061d7de 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index c3de139828b821..e7463195dbab2b 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-rules plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 013e6d2f23c68b..e54bceb33b5ccf 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 6a69e5117bdc5e..31fe8429dd093a 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index a116923d595c89..fa72055f1df6b0 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-http-tools plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index d3d8592d3a56c6..dd031b26b7833c 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-route-repository plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index b970f9d1287687..689c18a2717d64 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 940fe818df34db..28abe15482191a 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_components.devdocs.json b/api_docs/kbn_shared_ux_components.devdocs.json index 36b5a90b058016..52bb9bcd5d8b04 100644 --- a/api_docs/kbn_shared_ux_components.devdocs.json +++ b/api_docs/kbn_shared_ux_components.devdocs.json @@ -66,43 +66,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/shared-ux-components", - "id": "def-common.KibanaPageTemplateSolutionNav", - "type": "Function", - "tags": [], - "label": "KibanaPageTemplateSolutionNav", - "description": [ - "\nA wrapper around EuiSideNav but also creates the appropriate title with optional solution logo" - ], - "signature": [ - "({ children, headingProps, icon, isOpenOnDesktop, items, mobileBreakpoints, closeFlyoutButtonPosition, name, onCollapse, canBeCollapsed, ...rest }: React.PropsWithChildren<", - "KibanaPageTemplateSolutionNavProps", - ">) => JSX.Element" - ], - "path": "packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx", - "deprecated": false, - "children": [ - { - "parentPluginId": "@kbn/shared-ux-components", - "id": "def-common.KibanaPageTemplateSolutionNav.$1", - "type": "CompoundType", - "tags": [], - "label": "{\n children,\n headingProps,\n icon,\n isOpenOnDesktop = false,\n items,\n mobileBreakpoints = ['xs', 's'],\n closeFlyoutButtonPosition = 'outside',\n name,\n onCollapse,\n canBeCollapsed = true,\n ...rest\n}", - "description": [], - "signature": [ - "React.PropsWithChildren<", - "KibanaPageTemplateSolutionNavProps", - ">" - ], - "path": "packages/kbn-shared-ux-components/src/page_template/solution_nav/solution_nav.tsx", - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/shared-ux-components", "id": "def-common.NoDataConfigPage", @@ -273,7 +236,7 @@ " | undefined; fullHeight?: boolean | \"noscroll\" | undefined; minHeight?: ", "Property", ".MinHeight | undefined; } & { isEmptyState?: boolean | undefined; solutionNav?: ", - "KibanaPageTemplateSolutionNavProps", + "SolutionNavProps", " | undefined; noDataConfig?: ", { "pluginId": "@kbn/shared-ux-components", diff --git a/api_docs/kbn_shared_ux_components.mdx b/api_docs/kbn_shared_ux_components.mdx index f460e297eb49fa..0f3d503e8e6e5e 100644 --- a/api_docs/kbn_shared_ux_components.mdx +++ b/api_docs/kbn_shared_ux_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-components title: "@kbn/shared-ux-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-components plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Owner missing] for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 13 | 0 | 7 | 1 | +| 11 | 0 | 6 | 0 | ## Common diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index d6fdca0a231482..06cf6b161b9cf0 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 3328f0bcac453c..65e9ef61788d65 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_solution_nav.devdocs.json b/api_docs/kbn_shared_ux_page_solution_nav.devdocs.json new file mode 100644 index 00000000000000..7331e1f6ac1e01 --- /dev/null +++ b/api_docs/kbn_shared_ux_page_solution_nav.devdocs.json @@ -0,0 +1,131 @@ +{ + "id": "@kbn/shared-ux-page-solution-nav", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/shared-ux-page-solution-nav", + "id": "def-common.SolutionNav", + "type": "Function", + "tags": [], + "label": "SolutionNav", + "description": [ + "\nA wrapper around `EuiSideNav` that includes the appropriate title with optional solution logo." + ], + "signature": [ + "({ children, headingProps, icon, isOpenOnDesktop, items, mobileBreakpoints, closeFlyoutButtonPosition, name, onCollapse, canBeCollapsed, ...rest }: React.PropsWithChildren<", + { + "pluginId": "@kbn/shared-ux-page-solution-nav", + "scope": "common", + "docId": "kibKbnSharedUxPageSolutionNavPluginApi", + "section": "def-common.SolutionNavProps", + "text": "SolutionNavProps" + }, + ">) => JSX.Element" + ], + "path": "packages/shared-ux/page/solution_nav/src/solution_nav.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/shared-ux-page-solution-nav", + "id": "def-common.SolutionNav.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n children,\n headingProps,\n icon,\n isOpenOnDesktop = false,\n items,\n mobileBreakpoints = ['xs', 's'],\n closeFlyoutButtonPosition = 'outside',\n name,\n onCollapse,\n canBeCollapsed = true,\n ...rest\n}", + "description": [], + "signature": [ + "React.PropsWithChildren<", + { + "pluginId": "@kbn/shared-ux-page-solution-nav", + "scope": "common", + "docId": "kibKbnSharedUxPageSolutionNavPluginApi", + "section": "def-common.SolutionNavProps", + "text": "SolutionNavProps" + }, + ">" + ], + "path": "packages/shared-ux/page/solution_nav/src/solution_nav.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/shared-ux-page-solution-nav", + "id": "def-common.withSolutionNav", + "type": "Function", + "tags": [], + "label": "withSolutionNav", + "description": [], + "signature": [ + "

(WrappedComponent: React.ComponentType

) => { (props: Props

): JSX.Element; displayName: string; }" + ], + "path": "packages/shared-ux/page/solution_nav/src/with_solution_nav.tsx", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/shared-ux-page-solution-nav", + "id": "def-common.withSolutionNav.$1", + "type": "CompoundType", + "tags": [], + "label": "WrappedComponent", + "description": [], + "signature": [ + "React.ComponentType

" + ], + "path": "packages/shared-ux/page/solution_nav/src/with_solution_nav.tsx", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/shared-ux-page-solution-nav", + "id": "def-common.SolutionNavProps", + "type": "Type", + "tags": [], + "label": "SolutionNavProps", + "description": [ + "\nProps for the `SolutionNav` component." + ], + "signature": [ + "Omit<", + "EuiSideNavProps", + "<{}>, \"children\" | \"heading\" | \"items\"> & { name: string; icon?: ", + "IconType", + " | undefined; items?: ", + "EuiSideNavItemType", + "<{}>[] | undefined; children?: React.ReactNode; closeFlyoutButtonPosition?: \"outside\" | \"inside\" | undefined; isOpenOnDesktop?: boolean | undefined; onCollapse?: (() => void) | undefined; canBeCollapsed?: boolean | undefined; }" + ], + "path": "packages/shared-ux/page/solution_nav/src/solution_nav.tsx", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx new file mode 100644 index 00000000000000..74497e91f9e62f --- /dev/null +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -0,0 +1,30 @@ +--- +id: kibKbnSharedUxPageSolutionNavPluginApi +slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav +title: "@kbn/shared-ux-page-solution-nav" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the @kbn/shared-ux-page-solution-nav plugin +date: 2022-07-18 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; + + + +Contact [Owner missing] for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 5 | 0 | 3 | 0 | + +## Common + +### Functions + + +### Consts, variables and types + + diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 10146ed75c83db..b3b4e5019602c5 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_services.mdx b/api_docs/kbn_shared_ux_services.mdx index 65e7140afe28c4..fe3d5e7b865135 100644 --- a/api_docs/kbn_shared_ux_services.mdx +++ b/api_docs/kbn_shared_ux_services.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-services title: "@kbn/shared-ux-services" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-services plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-services'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_storybook.mdx b/api_docs/kbn_shared_ux_storybook.mdx index 3f1d95b2631641..839053658b099a 100644 --- a/api_docs/kbn_shared_ux_storybook.mdx +++ b/api_docs/kbn_shared_ux_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook title: "@kbn/shared-ux-storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-storybook plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index d5c7f5e56b8e86..e016371b504bf5 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-utility plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index 8830a177ce2b6b..f0a03ba8cdd9fc 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/sort-package-json plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index b472b5fbd8f4a6..09b22d7c143682 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/std plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 35ae6b8cef4502..9a7dc545fe43c8 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 1b12c02aec7e88..881e3c2572eb98 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/storybook plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index b235a059a2d8b0..f426b55e05a9e0 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/telemetry-tools plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_test.devdocs.json b/api_docs/kbn_test.devdocs.json index 0304ca46ffea17..2fdec23b80a59e 100644 --- a/api_docs/kbn_test.devdocs.json +++ b/api_docs/kbn_test.devdocs.json @@ -3008,7 +3008,7 @@ "\nDetermine if a service is avaliable" ], "signature": [ - "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" + "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\" | \"dedicatedTaskRunner\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", "deprecated": false, @@ -3021,7 +3021,7 @@ "label": "serviceName", "description": [], "signature": [ - "\"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\"" + "\"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\" | \"dedicatedTaskRunner\"" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", "deprecated": false, @@ -3038,7 +3038,7 @@ "label": "hasService", "description": [], "signature": [ - "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" + "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\" | \"dedicatedTaskRunner\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", "deprecated": false, @@ -3068,7 +3068,7 @@ "label": "hasService", "description": [], "signature": [ - "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" + "{ (serviceName: \"log\" | \"config\" | \"lifecycle\" | \"dockerServers\" | \"esVersion\" | \"dedicatedTaskRunner\"): true; (serviceName: K): serviceName is K; (serviceName: string): serviceName is Extract; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", "deprecated": false, @@ -3134,6 +3134,8 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -3198,6 +3200,8 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -3262,6 +3266,8 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -3326,6 +3332,8 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -3390,6 +3398,8 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -3454,6 +3464,74 @@ "section": "def-server.EsVersion", "text": "EsVersion" }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", + "; (serviceName: T): ServiceMap[T]; }" + ], + "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/test", + "id": "def-server.GenericFtrProviderContext.getService.$1", + "type": "string", + "tags": [], + "label": "serviceName", + "description": [], + "signature": [ + "\"dedicatedTaskRunner\"" + ], + "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/test", + "id": "def-server.GenericFtrProviderContext.getService", + "type": "Function", + "tags": [], + "label": "getService", + "description": [], + "signature": [ + "{ (serviceName: \"config\"): ", + { + "pluginId": "@kbn/test", + "scope": "server", + "docId": "kibKbnTestPluginApi", + "section": "def-server.Config", + "text": "Config" + }, + "; (serviceName: \"log\"): ", + "ToolingLog", + "; (serviceName: \"lifecycle\"): ", + { + "pluginId": "@kbn/test", + "scope": "server", + "docId": "kibKbnTestPluginApi", + "section": "def-server.Lifecycle", + "text": "Lifecycle" + }, + "; (serviceName: \"dockerServers\"): ", + { + "pluginId": "@kbn/test", + "scope": "server", + "docId": "kibKbnTestPluginApi", + "section": "def-server.DockerServersService", + "text": "DockerServersService" + }, + "; (serviceName: \"esVersion\"): ", + { + "pluginId": "@kbn/test", + "scope": "server", + "docId": "kibKbnTestPluginApi", + "section": "def-server.EsVersion", + "text": "EsVersion" + }, + "; (serviceName: \"dedicatedTaskRunner\"): ", + "DedicatedTaskRunner", "; (serviceName: T): ServiceMap[T]; }" ], "path": "packages/kbn-test/src/functional_test_runner/public_types.ts", @@ -4085,17 +4163,6 @@ "deprecated": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/test", - "id": "def-server.KIBANA_ROOT", - "type": "string", - "tags": [], - "label": "KIBANA_ROOT", - "description": [], - "path": "packages/kbn-test/src/functional_tests/lib/paths.ts", - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/test", "id": "def-server.ProvidedType", diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 651f4786f01566..4c9700cef79cdf 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact Operations for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 251 | 5 | 210 | 10 | +| 252 | 5 | 211 | 11 | ## Server diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 20835dd2e16080..05642fd07db938 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test-jest-helpers plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 349f171f5b3be5..b2513a85dacb32 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/tooling-log plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index 3055d6d3041096..db9c165b4e4d42 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 1aebf107aa27b6..eb74684b282c99 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer-core plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 52e8ddec816890..16918024301abb 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/typed-react-router-config plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 062a5b9078acaa..41296d33bb3542 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ui-theme plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index f53d7e1be0ea1c..d6ffd66a3c4ea4 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 4d2355b63a94be..34329cafcf3527 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types-jest plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 6eafcf2fc3a709..5fed058183a560 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 91aac1a61eb616..1399e76c0e7543 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaOverview plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 921e088a13418b..1b233147eb7dab 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -1076,18 +1076,6 @@ "plugin": "canvas", "path": "x-pack/plugins/canvas/public/components/home/home.component.tsx" }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx" @@ -1114,15 +1102,15 @@ }, { "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx" + "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" }, { "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx" + "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" }, { "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx" + "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" }, { "plugin": "enterpriseSearch", @@ -1136,18 +1124,6 @@ "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx" }, - { - "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" - }, - { - "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" - }, - { - "plugin": "enterpriseSearch", - "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" - }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.tsx" @@ -4263,54 +4239,6 @@ "plugin": "management", "path": "src/plugins/management/public/components/management_app/management_app.tsx" }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/csp_page_template.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/pages/rules/index.tsx" - }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/public/applications/shared/layout/page_template.tsx" @@ -4381,23 +4309,11 @@ "text": "OverlayStart" }, " | undefined; uiSettings?: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - }, + "IUiSettingsClient", " | undefined; fatalErrors?: ", "FatalErrorsSetup", " | undefined; deprecations?: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.DeprecationsServiceStart", - "text": "DeprecationsServiceStart" - }, + "DeprecationsServiceStart", " | undefined; theme?: ", "ThemeServiceStart", " | undefined; injectedMetadata?: ", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 687eae60179b79..052007a4588ae4 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaReact plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 92603a4ebea383..b1513686419f1d 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaUtils plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 60c14c122031d4..f6d9bfd13c9a45 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github summary: API docs for the kubernetesSecurity plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 08678f653942c6..406a04922c6028 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -159,6 +159,21 @@ ], "returnComment": [] }, + { + "parentPluginId": "lens", + "id": "def-public.Embeddable.reportsEmbeddableLoad", + "type": "Function", + "tags": [], + "label": "reportsEmbeddableLoad", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "lens", "id": "def-public.Embeddable.supportedTriggers", @@ -992,10 +1007,10 @@ }, { "parentPluginId": "lens", - "id": "def-public.DataLayerArgs.hide", + "id": "def-public.DataLayerArgs.simpleView", "type": "CompoundType", "tags": [], - "label": "hide", + "label": "simpleView", "description": [], "signature": [ "boolean | undefined" @@ -1005,13 +1020,13 @@ }, { "parentPluginId": "lens", - "id": "def-public.DataLayerArgs.splitAccessor", - "type": "CompoundType", + "id": "def-public.DataLayerArgs.splitAccessors", + "type": "Array", "tags": [], - "label": "splitAccessor", + "label": "splitAccessors", "description": [], "signature": [ - "string | ", + "(string | ", { "pluginId": "visualizations", "scope": "common", @@ -1019,7 +1034,7 @@ "section": "def-common.ExpressionValueVisDimension", "text": "ExpressionValueVisDimension" }, - " | undefined" + ")[] | undefined" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false @@ -5387,10 +5402,10 @@ }, { "parentPluginId": "lens", - "id": "def-public.XYAnnotationLayerConfig.hide", + "id": "def-public.XYAnnotationLayerConfig.simpleView", "type": "CompoundType", "tags": [], - "label": "hide", + "label": "simpleView", "description": [], "signature": [ "boolean | undefined" @@ -5874,10 +5889,10 @@ }, { "parentPluginId": "lens", - "id": "def-public.XYDataLayerConfig.hide", + "id": "def-public.XYDataLayerConfig.simpleView", "type": "CompoundType", "tags": [], - "label": "hide", + "label": "simpleView", "description": [], "signature": [ "boolean | undefined" @@ -9929,7 +9944,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined) => ", { @@ -9959,7 +9974,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index e0450f1abf271a..2e76b573df50d7 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github summary: API docs for the lens plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 600 | 0 | 522 | 40 | +| 601 | 0 | 523 | 40 | ## Client diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 327ab57345a402..e913f79eabf7a6 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseApiGuard plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 66839078a7b6ad..9dd5201006e014 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseManagement plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 82ff85966ce254..51fbbdcb31f45a 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github summary: API docs for the licensing plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index bf69a3a893d205..004c84ac413873 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github summary: API docs for the lists plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 16ecc45408de09..86501943aa6882 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github summary: API docs for the management plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index 8e94db12e16f06..4732fd45134ad9 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -314,6 +314,21 @@ ], "returnComment": [] }, + { + "parentPluginId": "maps", + "id": "def-public.MapEmbeddable.reportsEmbeddableLoad", + "type": "Function", + "tags": [], + "label": "reportsEmbeddableLoad", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "maps", "id": "def-public.MapEmbeddable.inputIsRefType", @@ -629,6 +644,21 @@ "children": [], "returnComment": [] }, + { + "parentPluginId": "maps", + "id": "def-public.MapEmbeddable._getIsFilterByMapExtent", + "type": "Function", + "tags": [], + "label": "_getIsFilterByMapExtent", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "maps", "id": "def-public.MapEmbeddable._gotoSynchronizedLocation", @@ -1078,25 +1108,25 @@ }, { "parentPluginId": "maps", - "id": "def-public.MapEmbeddable.setMapExtentFilter", + "id": "def-public.MapEmbeddable._setMapExtentFilter", "type": "Function", "tags": [], - "label": "setMapExtentFilter", + "label": "_setMapExtentFilter", "description": [], "signature": [ - "() => void" + "(() => void) & _.Cancelable" ], "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", "deprecated": false, - "children": [], - "returnComment": [] + "returnComment": [], + "children": [] }, { "parentPluginId": "maps", - "id": "def-public.MapEmbeddable.clearMapExtentFilter", + "id": "def-public.MapEmbeddable._clearMapExtentFilter", "type": "Function", "tags": [], - "label": "clearMapExtentFilter", + "label": "_clearMapExtentFilter", "description": [], "signature": [ "() => void" diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 72f42307dbf9cb..4f722ea0111799 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github summary: API docs for the maps plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [GIS](https://github.com/orgs/elastic/teams/kibana-gis) for questions re | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 248 | 0 | 247 | 24 | +| 250 | 0 | 249 | 24 | ## Client diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 8ad30bc5269f33..aa99a0d0069145 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github summary: API docs for the mapsEms plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 301159f8b1fde6..ecf3540a26754f 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github summary: API docs for the ml plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index c45fee1dc8e79e..00de65b67c3ce4 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoring plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring_collection.devdocs.json b/api_docs/monitoring_collection.devdocs.json index bca169a38e523f..00992e0736f7f7 100644 --- a/api_docs/monitoring_collection.devdocs.json +++ b/api_docs/monitoring_collection.devdocs.json @@ -119,7 +119,7 @@ "label": "MonitoringCollectionConfig", "description": [], "signature": [ - "{ readonly enabled: boolean; }" + "{ readonly enabled: boolean; readonly opentelemetry: Readonly<{} & { metrics: Readonly<{} & { otlp: Readonly<{ url?: string | undefined; headers?: Record | undefined; } & { exportIntervalMillis: number; logLevel: string; }>; prometheus: Readonly<{} & { enabled: boolean; }>; }>; }>; }" ], "path": "x-pack/plugins/monitoring_collection/server/config.ts", "deprecated": false, diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 743a4c1367da18..8409f4b3e6e7a4 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoringCollection plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index d24a5dac3371ee..f554bf3e4a482f 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github summary: API docs for the navigation plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 04cda4bfcf52ab..d647814d34fc8d 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github summary: API docs for the newsfeed plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index cf452389bd2e92..58534e319fad7e 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -205,7 +205,7 @@ "section": "def-public.ObservabilityRuleTypeFormatter", "text": "ObservabilityRuleTypeFormatter" }, - " | undefined; list: () => string[]; } & { getFormatter: () => () => string; registerFormatter: () => void; }" + " | undefined; list: () => string[]; } & { getFormatter: () => () => string; registerFormatter: () => void; list: () => string[]; }" ], "path": "x-pack/plugins/observability/public/rules/observability_rule_type_registry_mock.ts", "deprecated": false, @@ -2069,6 +2069,20 @@ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx", "deprecated": false }, + { + "parentPluginId": "observability", + "id": "def-public.ExploratoryEmbeddableProps.legendPosition", + "type": "CompoundType", + "tags": [], + "label": "legendPosition", + "description": [], + "signature": [ + "Position", + " | undefined" + ], + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx", + "deprecated": false + }, { "parentPluginId": "observability", "id": "def-public.ExploratoryEmbeddableProps.onBrushEnd", @@ -2204,6 +2218,19 @@ ], "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx", "deprecated": false + }, + { + "parentPluginId": "observability", + "id": "def-public.ExploratoryEmbeddableProps.align", + "type": "CompoundType", + "tags": [], + "label": "align", + "description": [], + "signature": [ + "\"left\" | \"right\" | \"center\" | undefined" + ], + "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/embeddable/embeddable.tsx", + "deprecated": false } ], "initialIsOpen": false @@ -3337,60 +3364,99 @@ }, { "parentPluginId": "observability", - "id": "def-public.ObservabilityPublicPluginsStart.features", + "id": "def-public.ObservabilityPublicPluginsStart.sharedUX", "type": "Object", "tags": [], - "label": "features", + "label": "sharedUX", "description": [], "signature": [ - "{ getFeatures: () => Promise<", { - "pluginId": "features", - "scope": "common", - "docId": "kibFeaturesPluginApi", - "section": "def-common.KibanaFeature", - "text": "KibanaFeature" - }, - "[]>; }" + "pluginId": "sharedUX", + "scope": "public", + "docId": "kibSharedUXPluginApi", + "section": "def-public.SharedUXPluginStart", + "text": "SharedUXPluginStart" + } ], "path": "x-pack/plugins/observability/public/plugin.ts", "deprecated": false }, { "parentPluginId": "observability", - "id": "def-public.ObservabilityPublicPluginsStart.kibanaFeatures", - "type": "Array", + "id": "def-public.ObservabilityPublicPluginsStart.ruleTypeRegistry", + "type": "Object", "tags": [], - "label": "kibanaFeatures", + "label": "ruleTypeRegistry", "description": [], "signature": [ + "{ list: () => ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", { - "pluginId": "features", + "pluginId": "alerting", "scope": "common", - "docId": "kibFeaturesPluginApi", - "section": "def-common.KibanaFeature", - "text": "KibanaFeature" + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" }, - "[]" + ">[]; get: (id: string) => ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; register: (objectType: ", + { + "pluginId": "triggersActionsUi", + "scope": "public", + "docId": "kibTriggersActionsUiPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => void; has: (id: string) => boolean; }" ], "path": "x-pack/plugins/observability/public/plugin.ts", "deprecated": false }, { "parentPluginId": "observability", - "id": "def-public.ObservabilityPublicPluginsStart.sharedUX", + "id": "def-public.ObservabilityPublicPluginsStart.actionTypeRegistry", "type": "Object", "tags": [], - "label": "sharedUX", + "label": "actionTypeRegistry", "description": [], "signature": [ - { - "pluginId": "sharedUX", - "scope": "public", - "docId": "kibSharedUXPluginApi", - "section": "def-public.SharedUXPluginStart", - "text": "SharedUXPluginStart" - } + "{ list: () => ", + "ActionTypeModel", + "[]; get: (id: string) => ", + "ActionTypeModel", + "; register: (objectType: ", + "ActionTypeModel", + ") => void; has: (id: string) => boolean; }" ], "path": "x-pack/plugins/observability/public/plugin.ts", "deprecated": false diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 25ab9bd4e98c24..3dd22a23220579 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github summary: API docs for the observability plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Observability UI](https://github.com/orgs/elastic/teams/observability-u | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 384 | 2 | 381 | 31 | +| 386 | 2 | 383 | 31 | ## Client diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index d6f51adf2a555a..45b10f6a2109ea 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github summary: API docs for the osquery plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index aab05ea9dbb1c3..0f422f6cae03f9 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory summary: Directory of public APIs available through plugins or packages. -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -12,13 +12,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 334 | 275 | 36 | +| 350 | 290 | 36 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 27391 | 172 | 19498 | 1433 | +| 27662 | 176 | 19688 | 1464 | ## Plugin Directory @@ -26,7 +26,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 241 | 0 | 236 | 19 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 23 | 0 | 19 | 1 | -| | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 12 | 0 | 0 | 0 | +| | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 9 | 0 | 0 | 1 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 365 | 0 | 356 | 20 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 40 | 0 | 40 | 55 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | @@ -38,24 +38,24 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Cloud Security Posture](https://github.com/orgs/elastic/teams/cloud-posture-security) | The cloud security posture plugin | 6 | 0 | 6 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 13 | 0 | 13 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 206 | 0 | 198 | 7 | -| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2489 | 9 | 746 | 25 | +| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2472 | 5 | 705 | 17 | | crossClusterReplication | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 102 | 0 | 83 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 143 | 0 | 141 | 12 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3075 | 34 | 2402 | 21 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 14 | 0 | 7 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 42 | 0 | 37 | 3 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 15 | 0 | 7 | 0 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 41 | 0 | 36 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 938 | 1 | 199 | 1 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 28 | 3 | 24 | 1 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 10 | 0 | 8 | 2 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 79 | 0 | 63 | 7 | | | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 37 | 0 | 35 | 2 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 494 | 0 | 403 | 3 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds embeddables service to Kibana | 505 | 0 | 413 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 51 | 0 | 44 | 0 | -| | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 3 | 0 | 3 | 0 | +| | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 114 | 3 | 110 | 3 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 90 | 0 | 90 | 5 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 100 | 0 | 100 | 9 | @@ -76,7 +76,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 95 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 5 | 249 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1521 | 8 | 1389 | 10 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1537 | 8 | 1405 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -95,21 +95,21 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | kibanaUsageCollection | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 0 | 0 | 0 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 615 | 3 | 420 | 9 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 600 | 0 | 522 | 40 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 601 | 0 | 523 | 40 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 8 | 0 | 8 | 0 | | | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 3 | 0 | 3 | 0 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [Security detections response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 198 | 0 | 90 | 49 | | logstash | [Logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | - | 41 | 0 | 41 | 6 | -| | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 248 | 0 | 247 | 24 | +| | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 250 | 0 | 249 | 24 | | | [GIS](https://github.com/orgs/elastic/teams/kibana-gis) | - | 67 | 0 | 67 | 0 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 251 | 10 | 78 | 31 | | | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 11 | 0 | 9 | 1 | | | [Stack Monitoring](https://github.com/orgs/elastic/teams/stack-monitoring-ui) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 34 | 0 | 34 | 2 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | -| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 384 | 2 | 381 | 31 | +| | [Observability UI](https://github.com/orgs/elastic/teams/observability-ui) | - | 386 | 2 | 383 | 31 | | | [Security asset management](https://github.com/orgs/elastic/teams/security-asset-management) | - | 13 | 0 | 13 | 0 | | painlessLab | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 231 | 2 | 180 | 11 | @@ -126,7 +126,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 | | searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 | | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 197 | 0 | 100 | 0 | -| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 52 | 0 | 51 | 21 | +| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 52 | 0 | 51 | 22 | | | [Security Team](https://github.com/orgs/elastic/teams/security-team) | - | 3 | 0 | 3 | 1 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds URL Service and sharing capabilities to Kibana | 114 | 0 | 55 | 10 | | | [Shared UX](https://github.com/orgs/elastic/teams/shared-ux) | A plugin providing components and services for shared user experiences in Kibana. | 4 | 0 | 0 | 0 | @@ -134,15 +134,15 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 260 | 0 | 64 | 0 | | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | synthetics | [Uptime](https://github.com/orgs/elastic/teams/uptime) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 80 | 0 | 39 | 7 | -| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 43 | 0 | 1 | 0 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 82 | 0 | 41 | 7 | +| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 44 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 32 | 0 | 32 | 6 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 | | | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 11 | 0 | 10 | 0 | | | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 447 | 1 | 342 | 32 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [Kibana Localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 412 | 0 | 391 | 40 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 407 | 0 | 386 | 42 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 130 | 0 | 91 | 11 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 205 | 0 | 142 | 9 | | | [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-services) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 82 | 2 | 78 | 13 | @@ -206,6 +206,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 7 | 0 | 7 | 0 | | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 15 | 0 | 13 | 0 | +| | [Owner missing] | - | 9 | 0 | 3 | 0 | +| | [Owner missing] | - | 6 | 0 | 6 | 0 | +| | [Owner missing] | - | 4 | 0 | 4 | 0 | +| | [Owner missing] | - | 17 | 0 | 9 | 0 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 4 | 0 | 4 | 0 | | | [Owner missing] | - | 5 | 0 | 2 | 0 | @@ -225,7 +229,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 10 | 0 | 10 | 0 | | | [Owner missing] | - | 16 | 0 | 16 | 0 | | | [Owner missing] | - | 4 | 0 | 0 | 0 | +| | [Owner missing] | - | 10 | 1 | 10 | 0 | +| | [Owner missing] | - | 25 | 5 | 25 | 1 | +| | [Owner missing] | - | 7 | 0 | 7 | 1 | | | [Owner missing] | - | 392 | 1 | 154 | 0 | +| | [Owner missing] | - | 54 | 0 | 48 | 2 | +| | [Owner missing] | - | 41 | 0 | 37 | 0 | | | [Owner missing] | - | 4 | 0 | 2 | 0 | | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 8 | 2 | 6 | 0 | @@ -238,9 +247,14 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 3 | 0 | 3 | 0 | | | [Owner missing] | - | 5 | 0 | 0 | 0 | | | [Owner missing] | - | 6 | 0 | 6 | 0 | +| | [Owner missing] | - | 5 | 0 | 5 | 0 | | | [Owner missing] | - | 6 | 0 | 4 | 0 | | | [Owner missing] | - | 2 | 0 | 1 | 0 | | | [Owner missing] | - | 6 | 0 | 6 | 0 | +| | [Owner missing] | - | 25 | 1 | 13 | 0 | +| | [Owner missing] | - | 25 | 1 | 25 | 0 | +| | [Owner missing] | - | 4 | 0 | 4 | 0 | +| | [Owner missing] | - | 23 | 0 | 3 | 0 | | | [Owner missing] | - | 13 | 0 | 7 | 0 | | | [Owner missing] | - | 10 | 0 | 10 | 0 | | | [Owner missing] | elasticsearch datemath parser, used in kibana | 44 | 0 | 43 | 0 | @@ -301,9 +315,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 25 | 0 | 24 | 1 | | | [Owner missing] | - | 20 | 0 | 6 | 0 | | | [Owner missing] | - | 15 | 0 | 8 | 1 | -| | [Owner missing] | - | 13 | 0 | 7 | 1 | +| | [Owner missing] | - | 11 | 0 | 6 | 0 | | | [Owner missing] | - | 12 | 0 | 8 | 5 | | | [Owner missing] | - | 31 | 0 | 12 | 2 | +| | [Owner missing] | - | 5 | 0 | 3 | 0 | | | [Owner missing] | - | 22 | 0 | 13 | 2 | | | [Owner missing] | - | 80 | 0 | 51 | 1 | | | [Owner missing] | - | 16 | 0 | 7 | 0 | @@ -313,7 +328,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 4 | 0 | 2 | 0 | | | Operations | - | 38 | 2 | 21 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | -| | Operations | - | 251 | 5 | 210 | 10 | +| | Operations | - | 252 | 5 | 211 | 11 | | | [Owner missing] | - | 135 | 8 | 103 | 2 | | | [Owner missing] | - | 72 | 0 | 55 | 0 | | | [Owner missing] | - | 8 | 0 | 2 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index fc208c81091bc9..cd7a619d1cd7ad 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github summary: API docs for the presentationUtil plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 2d1fb67d26de5a..16ca281504f3a1 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github summary: API docs for the remoteClusters plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 80cf32fd0ed902..b3680199c5cfe0 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github summary: API docs for the reporting plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index e9d9288cb3e7f2..caee41f6c8f99b 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github summary: API docs for the rollup plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 307825975a7ca8..7ae32ba1029954 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github summary: API docs for the ruleRegistry plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 51f7aa3f087611..6086df87b3a89e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github summary: API docs for the runtimeFields plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects.devdocs.json b/api_docs/saved_objects.devdocs.json index f0280fde583d73..1f715bff2765f3 100644 --- a/api_docs/saved_objects.devdocs.json +++ b/api_docs/saved_objects.devdocs.json @@ -829,13 +829,7 @@ "text": "SavedObjectsStart" }, ", uiSettings: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - }, + "IUiSettingsClient", ") => (props: ", "SavedObjectFinderProps", ") => JSX.Element" @@ -871,13 +865,7 @@ "label": "uiSettings", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } + "IUiSettingsClient" ], "path": "src/plugins/saved_objects/public/finder/saved_object_finder.tsx", "deprecated": false, @@ -2997,13 +2985,7 @@ "text": "SavedObjectsStart" }, "; uiSettings: ", - { - "pluginId": "core", - "scope": "public", - "docId": "kibCorePluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - }, + "IUiSettingsClient", "; } & ", "SavedObjectFinderProps" ], diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 3f81ae82637fff..b94b28329351a9 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjects plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index b5e91aa4161e84..2ef5ce8554542e 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsManagement plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index bdbd11196165d1..1fc3bd6ca2ca10 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTagging plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index a33056823fe45d..1adfd65b7e1352 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTaggingOss plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 4ee75e67b0da4c..37487313d5c216 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotMode plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index b6d32d285b9b9e..f83b7e34a396cd 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotting plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 17da37f5902c40..f48eba18053c27 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -2401,13 +2401,7 @@ "label": "errors", "description": [], "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.DeprecationsDetails", - "text": "DeprecationsDetails" - }, + "DeprecationsDetails", "[] | undefined" ], "path": "x-pack/plugins/security/common/model/deprecations.ts", diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 8b42b557c4116a..dba9501561af0e 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github summary: API docs for the security plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 9146fb540b3cc1..98575276e91494 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -121,7 +121,7 @@ "text": "CoreSetup" }, "<", - "StartPlugins", + "StartPluginsDependencies", ", ", "PluginStart", ">, plugins: ", @@ -154,7 +154,7 @@ "text": "CoreSetup" }, "<", - "StartPlugins", + "StartPluginsDependencies", ", ", "PluginStart", ">" diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index ff130491b6ec53..f41238eea2bcf4 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github summary: API docs for the securitySolution plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Security solution](https://github.com/orgs/elastic/teams/security-solut | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 52 | 0 | 51 | 21 | +| 52 | 0 | 51 | 22 | ## Client diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 6b8833becf4369..0a30a7b5b6a01e 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github summary: API docs for the sessionView plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 3721470c5f9147..1ae3fa23eb1fad 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github summary: API docs for the share plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/shared_u_x.mdx b/api_docs/shared_u_x.mdx index d396395dcef195..1df2f203d8232e 100644 --- a/api_docs/shared_u_x.mdx +++ b/api_docs/shared_u_x.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sharedUX title: "sharedUX" image: https://source.unsplash.com/400x175/?github summary: API docs for the sharedUX plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sharedUX'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 66174b12e48c4e..f15fdd1193ec67 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github summary: API docs for the snapshotRestore plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index aa56e7d9431f0c..8673507136d26c 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github summary: API docs for the spaces plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index baea07d62e2ccb..fd42a28e7000d1 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the stackAlerts plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index 9b015ce7264be4..49c9fd818c3dde 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -239,6 +239,43 @@ } ], "functions": [ + { + "parentPluginId": "taskManager", + "id": "def-server.aggregateTaskOverduePercentilesForType", + "type": "Function", + "tags": [], + "label": "aggregateTaskOverduePercentilesForType", + "description": [], + "signature": [ + "(type: string) => { aggs: Record; query: ", + "QueryDslQueryContainer", + "; runtime_mappings: ", + "MappingRuntimeFields", + "; }" + ], + "path": "x-pack/plugins/task_manager/server/queries/aggregate_task_overdue_percentiles_for_type.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "taskManager", + "id": "def-server.aggregateTaskOverduePercentilesForType.$1", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/task_manager/server/queries/aggregate_task_overdue_percentiles_for_type.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "taskManager", "id": "def-server.asInterval", @@ -1400,7 +1437,7 @@ "TaskScheduling", ", \"schedule\" | \"runSoon\" | \"ephemeralRunNow\" | \"ensureScheduled\" | \"bulkUpdateSchedules\"> & Pick<", "TaskStore", - ", \"fetch\" | \"get\" | \"remove\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" + ", \"aggregate\" | \"fetch\" | \"get\" | \"remove\"> & { removeIfExists: (id: string) => Promise; } & { supportsEphemeralTasks: () => boolean; }" ], "path": "x-pack/plugins/task_manager/server/plugin.ts", "deprecated": false, diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 8e15af839a4b55..1c6d3db965db9b 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the taskManager plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 80 | 0 | 39 | 7 | +| 82 | 0 | 41 | 7 | ## Server diff --git a/api_docs/telemetry.devdocs.json b/api_docs/telemetry.devdocs.json index a7909d0329970a..d74bba309e07bb 100644 --- a/api_docs/telemetry.devdocs.json +++ b/api_docs/telemetry.devdocs.json @@ -161,6 +161,21 @@ ], "path": "src/plugins/telemetry/public/plugin.ts", "deprecated": false + }, + { + "parentPluginId": "telemetry", + "id": "def-public.TelemetryPluginConfig.labels", + "type": "Object", + "tags": [], + "label": "labels", + "description": [ + "Extra labels to add to the telemetry context" + ], + "signature": [ + "{ [x: string]: unknown; }" + ], + "path": "src/plugins/telemetry/public/plugin.ts", + "deprecated": false } ], "initialIsOpen": false diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 8d4627b0a0e678..8875155459652f 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetry plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetr | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 43 | 0 | 1 | 0 | +| 44 | 0 | 1 | 0 | ## Client diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index e3df7e229abfea..538b4c4a2500c5 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionManager plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 3e1f0c17b82419..a3c87228808192 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionXpack plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 863ce108c48e18..d4f93b160e8f53 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryManagementSection plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 38c0c9653f9993..1ef3a094339f2d 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -6968,9 +6968,7 @@ }, "; filterQuery: string | ", "ESQuery", - " | undefined; docValueFields?: ", - "QueryDslFieldAndFormat", - "[] | undefined; factoryQueryType?: ", + " | undefined; factoryQueryType?: ", "TimelineEventsQueries", " | undefined; entityType?: ", { diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 319ee00cff2165..3728d891114d6c 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github summary: API docs for the timelines plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index a6c2fb6f900118..b3562fec271096 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github summary: API docs for the transform plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 21cdbb34c1e456..308ee721166823 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -1647,7 +1647,7 @@ "label": "useLoadRuleTypes", "description": [], "signature": [ - "({ filteredSolutions }: RuleTypesProps) => { ruleTypes: ", + "({ filteredRuleTypes }: RuleTypesProps) => { ruleTypes: ", { "pluginId": "triggersActionsUi", "scope": "public", @@ -1656,13 +1656,7 @@ "text": "RuleType" }, "[]; error: string | null; ruleTypeIndex: ", - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.RuleTypeIndex", - "text": "RuleTypeIndex" - }, + "RuleTypeIndex", "; }" ], "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_types.ts", @@ -1673,7 +1667,7 @@ "id": "def-public.useLoadRuleTypes.$1", "type": "Object", "tags": [], - "label": "{ filteredSolutions }", + "label": "{ filteredRuleTypes }", "description": [], "signature": [ "RuleTypesProps" @@ -2906,105 +2900,16 @@ "deprecated": false, "children": [], "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem", - "type": "Interface", - "tags": [], - "label": "RuleTableItem", - "description": [], - "signature": [ - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.RuleTableItem", - "text": "RuleTableItem" - }, - " extends ", - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.ruleType", - "type": "string", - "tags": [], - "label": "ruleType", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.index", - "type": "number", - "tags": [], - "label": "index", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.actionsCount", - "type": "number", - "tags": [], - "label": "actionsCount", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.isEditable", - "type": "boolean", - "tags": [], - "label": "isEditable", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.enabledInLicense", - "type": "boolean", - "tags": [], - "label": "enabledInLicense", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", - "deprecated": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTableItem.showIntervalWarning", - "type": "CompoundType", + "id": "def-public.RuleDefinitionProps.filteredRuleTypes", + "type": "Array", "tags": [], - "label": "showIntervalWarning", + "label": "filteredRuleTypes", "description": [], "signature": [ - "boolean | undefined" + "string[] | undefined" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false @@ -4268,35 +4173,27 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleStatus", + "id": "def-public.RulesListVisibleColumns", "type": "Type", "tags": [], - "label": "RuleStatus", + "label": "RulesListVisibleColumns", "description": [], "signature": [ - "\"disabled\" | \"enabled\" | \"snoozed\"" + "\"ruleName\" | \"ruleTags\" | \"ruleExecutionStatusLastDate\" | \"ruleSnoozeNotify\" | \"ruleScheduleInterval\" | \"ruleExecutionStatusLastDuration\" | \"ruleExecutionPercentile\" | \"ruleExecutionSuccessRatio\" | \"ruleExecutionStatus\" | \"ruleExecutionState\"" ], - "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", + "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_column_selector.tsx", "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.RuleTypeIndex", + "id": "def-public.RuleStatus", "type": "Type", "tags": [], - "label": "RuleTypeIndex", + "label": "RuleStatus", "description": [], "signature": [ - "Map>" + "\"disabled\" | \"enabled\" | \"snoozed\"" ], "path": "x-pack/plugins/triggers_actions_ui/public/types.ts", "deprecated": false, @@ -5772,30 +5669,28 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesListNotifyBadge", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesList", "type": "Function", "tags": [], - "label": "getRulesListNotifyBadge", + "label": "getRulesList", "description": [], "signature": [ "(props: ", - "RulesListNotifyBadgeProps", - ") => React.ReactElement<", - "RulesListNotifyBadgeProps", - ", string | React.JSXElementConstructor>" + "RulesListProps", + ") => React.ReactElement>" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, "children": [ { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesListNotifyBadge.$1", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesList.$1", "type": "Object", "tags": [], "label": "props", "description": [], "signature": [ - "RulesListNotifyBadgeProps" + "RulesListProps" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, @@ -5806,17 +5701,36 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesList", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesListNotifyBadge", "type": "Function", "tags": [], - "label": "getRulesList", + "label": "getRulesListNotifyBadge", "description": [], "signature": [ - "() => React.ReactElement>" + "(props: ", + "RulesListNotifyBadgeProps", + ") => React.ReactElement<", + "RulesListNotifyBadgeProps", + ", string | React.JSXElementConstructor>" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, - "children": [], + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.TriggersAndActionsUIPublicPluginStart.getRulesListNotifyBadge.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "RulesListNotifyBadgeProps" + ], + "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", + "deprecated": false, + "isRequired": true + } + ], "returnComment": [] }, { diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0c679bdb8020c8..7250ffd3d26c9a 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github summary: API docs for the triggersActionsUi plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 412 | 0 | 391 | 40 | +| 407 | 0 | 386 | 42 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 0099e4cf7eaaf5..eb677005bb8dfa 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActions plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 3427b9f4a8ef3d..25def38a93091e 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActionsEnhanced plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 4db559f27d1206..48dba51aca1c0c 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index b5df7764e5fc37..548c288123de6c 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch.autocomplete plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 5bc965e0f2e1b0..13d621b54a2a3b 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github summary: API docs for the urlForwarding plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 407ae7fe207876..54bc9017f67049 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the usageCollection plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index d25bfb3aa53ab7..467046d89b7de9 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github summary: API docs for the ux plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index a18709b0a133a6..ec5e9751f8f449 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the visDefaultEditor plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index baaef94a15d1de..73fcc40f1d12ee 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeGauge plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 74f232b1fb3f64..c38aebf315312d 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeHeatmap plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_pie.devdocs.json b/api_docs/vis_type_pie.devdocs.json index 04d01630e4108f..e7612bd29b859f 100644 --- a/api_docs/vis_type_pie.devdocs.json +++ b/api_docs/vis_type_pie.devdocs.json @@ -90,7 +90,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; }" ], diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index c409286bfda39c..d078fa1f79f0f1 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypePie plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 0931024d8cd1e8..951b354bcc2b33 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTable plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 6ed4ddce7daac9..b9356ffd591046 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimelion plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 766372be1f7ac6..8ec9f72bf0837f 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimeseries plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 38f97af77566fa..9c6072ac8e0c99 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVega plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 050a29ac598ffa..66d593c9342ff8 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVislib plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index de103e3f2b8d2d..36ada42dd4d545 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeXy plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index e6d13ebfd50894..d647aaa69542fe 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -1306,7 +1306,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; source?: string | undefined; sourceParams?: ", "SerializableRecord", @@ -4919,7 +4919,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", ">; }" ], @@ -5163,7 +5163,7 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - ">) => void; getInspectorAdapters: () => ", + ">) => void; reportsEmbeddableLoad: () => boolean; getInspectorAdapters: () => ", { "pluginId": "inspector", "scope": "common", @@ -5179,7 +5179,7 @@ "section": "def-public.OverlayRef", "text": "OverlayRef" }, - " | undefined; transferCustomizationsToUiState: () => void; hasInspector: () => boolean; onContainerLoading: () => void; onContainerRender: () => void; onContainerError: (error: ", + " | undefined; transferCustomizationsToUiState: () => void; hasInspector: () => boolean; onContainerLoading: () => void; onContainerData: () => void; onContainerRender: () => void; onContainerError: (error: ", { "pluginId": "expressions", "scope": "public", @@ -6104,7 +6104,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined) => { id?: string | undefined; params?: Record | undefined; } | undefined" ], @@ -6168,7 +6168,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined" ], @@ -6267,7 +6267,7 @@ "section": "def-common.SerializedFieldFormat", "text": "SerializedFieldFormat" }, - "<", + "<{}, ", "SerializableRecord", "> | undefined; source?: string | undefined; sourceParams?: ", "SerializableRecord", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 427639052a2bda..a7af86feac5f82 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github summary: API docs for the visualizations plugin -date: 2022-07-12 +date: 2022-07-18 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/docs/api/cases/cases-api-get-case.asciidoc b/docs/api/cases/cases-api-get-case.asciidoc index 70cc7f5bab60c1..d7bc316a7346d2 100644 --- a/docs/api/cases/cases-api-get-case.asciidoc +++ b/docs/api/cases/cases-api-get-case.asciidoc @@ -4,7 +4,7 @@ Get case ++++ -Returns a specified case. +Returns information about a case. === {api-request-title} @@ -17,7 +17,7 @@ Returns a specified case. You must have `read` privileges for the *Cases* feature in the *Management*, *{observability}*, or *Security* section of the <>, depending on the -`owner` of the cases you're seeking. +`owner` of the case you're seeking. === {api-path-parms-title} @@ -42,11 +42,11 @@ default space is used. === {api-examples-title} -Returns case ID `a18b38a0-71b0-11ea-a0b2-c51ea50a58e2` without comments: +Returns case ID `31cdada0-02c1-11ed-85f2-4f7c222ca2fa`: [source,sh] -------------------------------------------------- -GET api/cases/a18b38a0-71b0-11ea-a0b2-c51ea50a58e2 +GET api/cases/31cdada0-02c1-11ed-85f2-4f7c222ca2fa -------------------------------------------------- // KIBANA @@ -55,49 +55,39 @@ The API returns a JSON object with the retrieved case. For example: [source,json] -------------------------------------------------- { - "id": "a18b38a0-71b0-11ea-a0b2-c51ea50a58e2", - "version": "Wzk4LDFd", - "comments": [], - "totalComment": 0, - "totalAlerts": 0, - "closed_at": null, - "closed_by": null, - "created_at": "2020-03-29T11:30:02.658Z", - "created_by": { - "email": "ahunley@imf.usa.gov", - "full_name": "Alan Hunley", - "username": "ahunley" - }, - "external_service": null, - "updated_at": "2020-03-29T12:01:50.244Z", - "updated_by": { - "full_name": "Classified", - "email": "classified@hms.oo.gov.uk", - "username": "M" - }, - "description": "James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants. Operation bubblegum is active. Repeat - operation bubblegum is now active!", - "title": "This case will self-destruct in 5 seconds", - "status": "open", - "connector": { - "id": "131d4448-abe0-4789-939d-8ef60680b498", - "name": "My connector", - "type": ".jira", - "fields": { - "issueType": "10006", - "priority": "High", - } - }, - "settings": { - "syncAlerts": true - }, - "owner": "securitySolution", - "severity": "low", - "duration": null, <1> - "tags": [ - "phishing", - "social engineering", - "bubblegum" - ] + "id":"31cdada0-02c1-11ed-85f2-4f7c222ca2fa", + "version":"WzM2LDFd", + "comments":[{ + "id":"2134c1d0-02c2-11ed-85f2-4f7c222ca2fa", + "version":"WzM3LDFd", + "type":"user", + "owner":"cases", + "comment":"A new comment", + "created_at":"2022-07-13T15:40:32.335Z", + "created_by":{"email":null,"full_name":null,"username":"elastic"}, + "pushed_at":null, + "pushed_by":null, + "updated_at":null, + "updated_by":null + }], + "totalComment":1, + "totalAlerts":0, + "title":"Case title 1", + "tags":["tag 1"], + "settings":{"syncAlerts":true}, + "owner":"cases", + "description":"A case description", + "duration":null, <1> + "severity":"low", + "closed_at":null, + "closed_by":null, + "created_at":"2022-07-13T15:33:50.604Z", + "created_by":{"username":"elastic","email":null,"full_name":null}, + "status":"open", + "updated_at":"2022-07-13T15:40:32.335Z", + "updated_by":{"full_name":null,"email":null,"username":"elastic"}, + "connector":{"id":"none","name":"none","type":".none","fields":null}, + "external_service":null } -------------------------------------------------- <1> Duration represents the elapsed time from the creation of the case to its diff --git a/docs/apm/correlations.asciidoc b/docs/apm/correlations.asciidoc index cb72a1b305fd7d..ca77c6c8c6afb6 100644 --- a/docs/apm/correlations.asciidoc +++ b/docs/apm/correlations.asciidoc @@ -21,7 +21,7 @@ NOTE: Queries within the {apm-app} are also applied to the correlations. ==== Find high transaction latency correlations The correlations on the *Latency correlations* tab help you discover which -attributes are contributing to increased transaction latency. +attributes are contributing to increased transaction latency. [role="screenshot"] image::apm/images/correlations-hover.png[Latency correlations] @@ -74,7 +74,7 @@ The table is sorted by scores, which are mapped to high, medium, or low impact levels. Attributes with high impact levels are more likely to contribute to failed transactions. By default, the attribute with the highest score is added to the chart. To see a different attribute in the chart, select its row in the -table. +table. For example, in the screenshot below, there are attributes such as a specific node and pod name that have medium impact on the failed transactions. @@ -86,4 +86,4 @@ Select the `+` filter to create a new query in the {apm-app} for transactions with one or more of these attributes. If you are unfamiliar with a field, click the icon beside its name to view its most popular values and optionally filter on those values too. Each time that you add another attribute, it is filtering -out more and more noise and bringing you closer to a diagnosis. \ No newline at end of file +out more and more noise and bringing you closer to a diagnosis. diff --git a/docs/apm/how-to-guides.asciidoc b/docs/apm/how-to-guides.asciidoc index b634c937588b0a..88b331de2acf2b 100644 --- a/docs/apm/how-to-guides.asciidoc +++ b/docs/apm/how-to-guides.asciidoc @@ -12,6 +12,7 @@ Learn how to perform common APM app tasks. * <> * <> * <> +* <> * <> * <> @@ -30,6 +31,8 @@ include::correlations.asciidoc[] include::machine-learning.asciidoc[] +include::lambda.asciidoc[] + include::advanced-queries.asciidoc[] include::deployment-annotations.asciidoc[] \ No newline at end of file diff --git a/docs/apm/images/lambda-cold-start-trace.png b/docs/apm/images/lambda-cold-start-trace.png new file mode 100644 index 00000000000000..c6f6efd0557cec Binary files /dev/null and b/docs/apm/images/lambda-cold-start-trace.png differ diff --git a/docs/apm/images/lambda-cold-start.png b/docs/apm/images/lambda-cold-start.png new file mode 100644 index 00000000000000..54c3d36fddc644 Binary files /dev/null and b/docs/apm/images/lambda-cold-start.png differ diff --git a/docs/apm/images/lambda-correlations.png b/docs/apm/images/lambda-correlations.png new file mode 100644 index 00000000000000..c1a72ccb2d9308 Binary files /dev/null and b/docs/apm/images/lambda-correlations.png differ diff --git a/docs/apm/lambda.asciidoc b/docs/apm/lambda.asciidoc new file mode 100644 index 00000000000000..2dcdf5b462b63c --- /dev/null +++ b/docs/apm/lambda.asciidoc @@ -0,0 +1,51 @@ +[role="xpack"] +[[apm-lambda]] +=== Observe Lambda functions + +Elastic APM provides performance and error monitoring for AWS Lambda functions. +Get insight into function execution and runtime behavior, as well as visibility into how your Lambda functions relate to and depend on other services. + +To set up Lambda monitoring, see the relevant +{apm-guide-ref}/monitoring-aws-lambda.html[quick start guide]. + +[float] +[[apm-lambda-cold-start-info]] +==== Cold starts + +A cold start occurs when a Lambda function has not been used for a certain period of time. A lambda worker receives a request to run the function and prepares an execution environment. + +Cold starts are an unavoidable byproduct of the serverless world, but visibility into how they impact your services can help you make better decisions about factors like how much memory to allocate to a function, whether to enable provisioned concurrency, or if it's time to consider removing a large dependency. + +[float] +[[apm-lambda-cold-start-rate]] +===== Cold start rate + +The cold start rate (i.e. proportion of requests that experience a cold start) is displayed per service and per transaction. + +[role="screenshot"] +image::apm/images/lambda-cold-start.png[lambda cold start graph] + +Cold start is also displayed in the trace waterfall, where you can drill-down into individual traces and see trace metadata like AWS request ID, trigger type, and trigger request ID. + +[role="screenshot"] +image::apm/images/lambda-cold-start-trace.png[lambda cold start trace] + +[float] +[[apm-lambda-cold-start-latency]] +===== Latency distribution correlation + +The <> feature can be used to visualize the impact of Lambda cold starts on latency--just select the `faas.coldstart` field. + +[role="screenshot"] +image::apm/images/lambda-correlations.png[lambda correlations example] + +[float] +[[apm-lambda-service-config]] +==== AWS Lambda function grouping + +The default APM agent configuration results in one APM service per AWS Lambda function, +where the Lambda function name is the service name. + +In some use cases, it makes more sense to logically group multiple lambda functions under a single +APM service. You can achieve this by setting the `ELASTIC_APM_SERVICE_NAME` environment variable +on related Lambda functions to the same value. diff --git a/docs/apm/service-overview.asciidoc b/docs/apm/service-overview.asciidoc index 22da9a132b4fa7..eaf022cee8c745 100644 --- a/docs/apm/service-overview.asciidoc +++ b/docs/apm/service-overview.asciidoc @@ -8,7 +8,8 @@ high-level visibility into how a service is performing across your infrastructur * Service details like service version, runtime version, framework, and agent name and version * Container and orchestration information -* Cloud provider, machine type, and availability zone +* Cloud provider, machine type, service name, region, and availability zone +* Serverless function names and event trigger type * Latency, throughput, and errors over time * Service dependencies @@ -16,10 +17,10 @@ high-level visibility into how a service is performing across your infrastructur [[service-time-comparison]] === Time series and expected bounds comparison -For insight into the health of your services, you can compare how a service -performs relative to a previous time frame or to the expected bounds from the -corresponding {anomaly-job}. For example, has latency been slowly increasing -over time, did the service experience a sudden spike, is the throughput similar +For insight into the health of your services, you can compare how a service +performs relative to a previous time frame or to the expected bounds from the +corresponding {anomaly-job}. For example, has latency been slowly increasing +over time, did the service experience a sudden spike, is the throughput similar to what the {ml} job expects – enabling a comparison can provide the answer. [role="screenshot"] @@ -42,8 +43,8 @@ The time-based comparison options are based on the selected time filter range: |An identical amount of time immediately before the selected time range |==== -You can use the expected bounds comparison if {ml-jobs} exist in your selected -environment and you have +You can use the expected bounds comparison if {ml-jobs} exist in your selected +environment and you have {ml-docs}/setup.html#kib-visibility-spaces[access to the {ml-features}]. [discrete] @@ -79,7 +80,7 @@ image::apm/images/traffic-transactions.png[Traffic and transactions] The failed transaction rate represents the percentage of failed transactions from the perspective of the selected service. It's useful for visualizing unexpected increases, decreases, or irregular patterns in a service's transactions. -+ + [TIP] ==== HTTP **transactions** from the HTTP server perspective do not consider a `4xx` status code (client error) as a failure @@ -119,6 +120,17 @@ requires an agent version ≥ v5.6.3. [role="screenshot"] image::apm/images/spans-dependencies.png[Span type duration and dependencies] +[discrete] +[[service-cold-start]] +=== Cold start rate + +The cold start rate chart is specific to serverless services. +It displays the percentage of requests that trigger a cold start of a serverless function. +See <> for more information. + +[role="screenshot"] +image::apm/images/lambda-cold-start.png[lambda cold start graph] + [discrete] [[service-instances]] === Instances @@ -157,9 +169,16 @@ image::apm/images/metadata-icons.png[Service metadata] *Cloud provider information* * Cloud provider +* Cloud service name * Availability zones * Machine types * Project ID +* Region + +*Serverless information* + +* Function name(s) +* Event trigger type *Alerts* diff --git a/docs/apm/transactions.asciidoc b/docs/apm/transactions.asciidoc index e8c5d6600c0bd0..8a0cc75bf0c629 100644 --- a/docs/apm/transactions.asciidoc +++ b/docs/apm/transactions.asciidoc @@ -8,7 +8,7 @@ APM agents automatically collect performance metrics on HTTP requests, database [role="screenshot"] image::apm/images/apm-transactions-overview.png[Example view of transactions table in the APM app in Kibana] -The *Latency*, *transactions per minute*, *Failed transaction rate*, and *Average duration by span type* +The *Latency*, *Throughput*, *Failed transaction rate*, *Average duration by span type*, and *Cold start rate* charts display information on all transactions associated with the selected service: *Latency*:: @@ -48,6 +48,10 @@ This could be a sign that the agent does not have auto-instrumentation for whate + It's important to note that if you have asynchronous spans, the sum of all span times may exceed the duration of the transaction. +*Cold start rate*:: +Only applicable to serverless transactions, this chart displays the percentage of requests that trigger a cold start of a serverless function. +See <> for more information. + [discrete] [[transactions-table]] === Transactions table @@ -149,6 +153,7 @@ Learn more about a trace sample in the *Metadata* tab: * Agent information * URL * User - Requires additional configuration, but allows you to see which user experienced the current transaction. +* FaaS information, like cold start, AWS request ID, trigger type, and trigger request ID TIP: All of this data is stored in documents in Elasticsearch. This means you can select "Actions - View transaction in Discover" to see the actual Elasticsearch document under the discover tab. diff --git a/docs/maps/images/enable_filter_by_map_extent.png b/docs/maps/images/enable_filter_by_map_extent.png deleted file mode 100644 index 5132dc8f73dbef..00000000000000 Binary files a/docs/maps/images/enable_filter_by_map_extent.png and /dev/null differ diff --git a/docs/maps/search.asciidoc b/docs/maps/search.asciidoc index 2330bf52abc29d..aa747611bdbaa0 100644 --- a/docs/maps/search.asciidoc +++ b/docs/maps/search.asciidoc @@ -81,22 +81,17 @@ Create filters from your map to focus in on just the data you want. *Maps* provi [float] [[maps-map-extent-filter]] -==== Filter dashboard by map extent +==== Filter dashboard by map bounds -A map extent shows uniform data across all panels. -As you pan and zoom your map, all panels will update to only include data that is visible in your map. +To filter your dashboard by your map bounds as you pan and zoom your map: -To enable filtering your dashboard by map extent: - -* Open the main menu, and then click *Dashboard*. -* Select your dashboard from the list or click *Create dashboard*. -* If your dashboard does not have a map, add a map panel. -* Click the gear icon image:maps/images/gear_icon.png[gear icon] to open the map panel menu. -* Select *More* to view all panel options. -* Select *Enable filter by map extent*. - -[role="screenshot"] -image::maps/images/enable_filter_by_map_extent.png[] +. Open the main menu, and then click *Dashboard*. +. Select your dashboard from the list or click *Create dashboard*. +. If your dashboard does not have a map, add a map panel. +. Click the gear icon image:maps/images/gear_icon.png[gear icon] to open the map panel menu. +. Select *More* to view all panel options. +. Select *Filter dashboard by map bounds*. +. Select the checkbox for your map panel. [float] [[maps-spatial-filters]] diff --git a/examples/field_formats_example/public/examples/3_creating_custom_format_editor.tsx b/examples/field_formats_example/public/examples/3_creating_custom_format_editor.tsx index 037063b042ce9d..3239839ba13380 100644 --- a/examples/field_formats_example/public/examples/3_creating_custom_format_editor.tsx +++ b/examples/field_formats_example/public/examples/3_creating_custom_format_editor.tsx @@ -41,12 +41,12 @@ const ExampleCurrencyFormatEditor: FieldFormatEditor<{ currency: string }> = (pr ExampleCurrencyFormatEditor.formatId = ExampleCurrencyFormat.id; // 3. Wrap editor component in a factory. This is needed to support and encourage code-splitting. -const ExampleCurrencyFormatEditorFactory: FieldFormatEditorFactory<{ - currency: string; -}> = async () => ExampleCurrencyFormatEditor; +const ExampleCurrencyFormatEditorFactory = async () => ExampleCurrencyFormatEditor; ExampleCurrencyFormatEditorFactory.formatId = ExampleCurrencyFormatEditor.formatId; export function registerExampleFormatEditor(indexPatternFieldEditor: IndexPatternFieldEditorSetup) { // 4. Register a field editor. This should happen in setup plugin lifecycle phase. - indexPatternFieldEditor.fieldFormatEditors.register(ExampleCurrencyFormatEditorFactory); + indexPatternFieldEditor.fieldFormatEditors.register( + ExampleCurrencyFormatEditorFactory as FieldFormatEditorFactory + ); } diff --git a/package.json b/package.json index 3fb3ae6b9c87d7..4f98a16e139593 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "@emotion/css": "^11.9.0", "@emotion/react": "^11.9.0", "@emotion/serialize": "^1.0.3", + "@grpc/grpc-js": "^1.6.7", "@hapi/accept": "^5.0.2", "@hapi/boom": "^9.1.4", "@hapi/cookie": "^11.0.2", @@ -158,6 +159,10 @@ "@kbn/core-base-server-mocks": "link:bazel-bin/packages/core/base/core-base-server-mocks", "@kbn/core-config-server-internal": "link:bazel-bin/packages/core/config/core-config-server-internal", "@kbn/core-config-server-mocks": "link:bazel-bin/packages/core/config/core-config-server-mocks", + "@kbn/core-deprecations-browser": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser", + "@kbn/core-deprecations-browser-internal": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser-internal", + "@kbn/core-deprecations-browser-mocks": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser-mocks", + "@kbn/core-deprecations-common": "link:bazel-bin/packages/core/deprecations/core-deprecations-common", "@kbn/core-doc-links-browser": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser", "@kbn/core-doc-links-browser-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-internal", "@kbn/core-doc-links-browser-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-mocks", @@ -180,7 +185,13 @@ "@kbn/core-http-browser-internal": "link:bazel-bin/packages/core/http/core-http-browser-internal", "@kbn/core-http-browser-mocks": "link:bazel-bin/packages/core/http/core-http-browser-mocks", "@kbn/core-http-common": "link:bazel-bin/packages/core/http/core-http-common", + "@kbn/core-http-context-server-internal": "link:bazel-bin/packages/core/http/core-http-context-server-internal", + "@kbn/core-http-context-server-mocks": "link:bazel-bin/packages/core/http/core-http-context-server-mocks", + "@kbn/core-http-router-server-internal": "link:bazel-bin/packages/core/http/core-http-router-server-internal", + "@kbn/core-http-router-server-mocks": "link:bazel-bin/packages/core/http/core-http-router-server-mocks", "@kbn/core-http-server": "link:bazel-bin/packages/core/http/core-http-server", + "@kbn/core-http-server-internal": "link:bazel-bin/packages/core/http/core-http-server-internal", + "@kbn/core-http-server-mocks": "link:bazel-bin/packages/core/http/core-http-server-mocks", "@kbn/core-i18n-browser": "link:bazel-bin/packages/core/i18n/core-i18n-browser", "@kbn/core-i18n-browser-internal": "link:bazel-bin/packages/core/i18n/core-i18n-browser-internal", "@kbn/core-i18n-browser-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-browser-mocks", @@ -197,9 +208,14 @@ "@kbn/core-preboot-server": "link:bazel-bin/packages/core/preboot/core-preboot-server", "@kbn/core-preboot-server-internal": "link:bazel-bin/packages/core/preboot/core-preboot-server-internal", "@kbn/core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks", + "@kbn/core-test-helpers-http-setup-browser": "link:bazel-bin/packages/core/test-helpers/core-test-helpers-http-setup-browser", "@kbn/core-theme-browser": "link:bazel-bin/packages/core/theme/core-theme-browser", "@kbn/core-theme-browser-internal": "link:bazel-bin/packages/core/theme/core-theme-browser-internal", "@kbn/core-theme-browser-mocks": "link:bazel-bin/packages/core/theme/core-theme-browser-mocks", + "@kbn/core-ui-settings-browser": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser", + "@kbn/core-ui-settings-browser-internal": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser-internal", + "@kbn/core-ui-settings-browser-mocks": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser-mocks", + "@kbn/core-ui-settings-common": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-common", "@kbn/crypto": "link:bazel-bin/packages/kbn-crypto", "@kbn/crypto-browser": "link:bazel-bin/packages/kbn-crypto-browser", "@kbn/datemath": "link:bazel-bin/packages/kbn-datemath", @@ -274,6 +290,13 @@ "@mapbox/mapbox-gl-draw": "1.3.0", "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mapbox/vector-tile": "1.3.1", + "@opentelemetry/api": "^1.1.0", + "@opentelemetry/api-metrics": "^0.30.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "^0.30.0", + "@opentelemetry/exporter-prometheus": "^0.30.0", + "@opentelemetry/resources": "^1.4.0", + "@opentelemetry/sdk-metrics-base": "^0.30.0", + "@opentelemetry/semantic-conventions": "^1.4.0", "@reduxjs/toolkit": "^1.6.1", "@slack/webhook": "^5.0.4", "@turf/along": "6.0.1", @@ -389,7 +412,7 @@ "minimatch": "^3.1.2", "moment": "^2.29.4", "moment-duration-format": "^2.3.2", - "moment-timezone": "^0.5.27", + "moment-timezone": "^0.5.34", "monaco-editor": "^0.22.3", "mustache": "^2.3.2", "node-fetch": "^2.6.7", @@ -591,8 +614,6 @@ "@kbn/type-summarizer-core": "link:bazel-bin/packages/kbn-type-summarizer-core", "@loaders.gl/polyfills": "^2.3.5", "@mapbox/vector-tile": "1.3.1", - "@microsoft/api-documenter": "7.13.68", - "@microsoft/api-extractor": "7.18.19", "@octokit/rest": "^16.35.0", "@openpgp/web-stream-tools": "^0.0.10", "@percy/agent": "^0.28.6", @@ -724,6 +745,10 @@ "@types/kbn__core-common-internal-base": "link:bazel-bin/packages/core/common/internal-base/npm_module_types", "@types/kbn__core-config-server-internal": "link:bazel-bin/packages/core/config/core-config-server-internal/npm_module_types", "@types/kbn__core-config-server-mocks": "link:bazel-bin/packages/core/config/core-config-server-mocks/npm_module_types", + "@types/kbn__core-deprecations-browser": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser/npm_module_types", + "@types/kbn__core-deprecations-browser-internal": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser-internal/npm_module_types", + "@types/kbn__core-deprecations-browser-mocks": "link:bazel-bin/packages/core/deprecations/core-deprecations-browser-mocks/npm_module_types", + "@types/kbn__core-deprecations-common": "link:bazel-bin/packages/core/deprecations/core-deprecations-common/npm_module_types", "@types/kbn__core-doc-links-browser": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser/npm_module_types", "@types/kbn__core-doc-links-browser-internal": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-internal/npm_module_types", "@types/kbn__core-doc-links-browser-mocks": "link:bazel-bin/packages/core/doc-links/core-doc-links-browser-mocks/npm_module_types", @@ -746,7 +771,13 @@ "@types/kbn__core-http-browser-internal": "link:bazel-bin/packages/core/http/core-http-browser-internal/npm_module_types", "@types/kbn__core-http-browser-mocks": "link:bazel-bin/packages/core/http/core-http-browser-mocks/npm_module_types", "@types/kbn__core-http-common": "link:bazel-bin/packages/core/http/core-http-common/npm_module_types", + "@types/kbn__core-http-context-server-internal": "link:bazel-bin/packages/core/http/core-http-context-server-internal/npm_module_types", + "@types/kbn__core-http-context-server-mocks": "link:bazel-bin/packages/core/http/core-http-context-server-mocks/npm_module_types", + "@types/kbn__core-http-router-server-internal": "link:bazel-bin/packages/core/http/core-http-router-server-internal/npm_module_types", + "@types/kbn__core-http-router-server-mocks": "link:bazel-bin/packages/core/http/core-http-router-server-mocks/npm_module_types", "@types/kbn__core-http-server": "link:bazel-bin/packages/core/http/core-http-server/npm_module_types", + "@types/kbn__core-http-server-internal": "link:bazel-bin/packages/core/http/core-http-server-internal/npm_module_types", + "@types/kbn__core-http-server-mocks": "link:bazel-bin/packages/core/http/core-http-server-mocks/npm_module_types", "@types/kbn__core-i18n-browser": "link:bazel-bin/packages/core/i18n/core-i18n-browser/npm_module_types", "@types/kbn__core-i18n-browser-internal": "link:bazel-bin/packages/core/i18n/core-i18n-browser-internal/npm_module_types", "@types/kbn__core-i18n-browser-mocks": "link:bazel-bin/packages/core/i18n/core-i18n-browser-mocks/npm_module_types", @@ -765,9 +796,14 @@ "@types/kbn__core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks/npm_module_types", "@types/kbn__core-public-internal-base": "link:bazel-bin/packages/core/public/internal-base/npm_module_types", "@types/kbn__core-server-internal-base": "link:bazel-bin/packages/core/server/internal-base/npm_module_types", + "@types/kbn__core-test-helpers-http-setup-browser": "link:bazel-bin/packages/core/test-helpers/core-test-helpers-http-setup-browser/npm_module_types", "@types/kbn__core-theme-browser": "link:bazel-bin/packages/core/theme/core-theme-browser/npm_module_types", "@types/kbn__core-theme-browser-internal": "link:bazel-bin/packages/core/theme/core-theme-browser-internal/npm_module_types", "@types/kbn__core-theme-browser-mocks": "link:bazel-bin/packages/core/theme/core-theme-browser-mocks/npm_module_types", + "@types/kbn__core-ui-settings-browser": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser/npm_module_types", + "@types/kbn__core-ui-settings-browser-internal": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser-internal/npm_module_types", + "@types/kbn__core-ui-settings-browser-mocks": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-browser-mocks/npm_module_types", + "@types/kbn__core-ui-settings-common": "link:bazel-bin/packages/core/ui-settings/core-ui-settings-common/npm_module_types", "@types/kbn__crypto": "link:bazel-bin/packages/kbn-crypto/npm_module_types", "@types/kbn__crypto-browser": "link:bazel-bin/packages/kbn-crypto-browser/npm_module_types", "@types/kbn__datemath": "link:bazel-bin/packages/kbn-datemath/npm_module_types", @@ -875,7 +911,7 @@ "@types/mocha": "^9.1.1", "@types/mock-fs": "^4.13.1", "@types/moment-duration-format": "^2.2.3", - "@types/moment-timezone": "^0.5.12", + "@types/moment-timezone": "^0.5.30", "@types/mustache": "^0.8.31", "@types/ncp": "^2.0.1", "@types/nock": "^10.0.3", @@ -1038,7 +1074,7 @@ "has-ansi": "^3.0.0", "hdr-histogram-js": "^1.2.0", "html": "1.0.0", - "html-loader": "^0.5.5", + "html-loader": "^1.3.2", "http-proxy": "^1.18.1", "is-glob": "^4.0.1", "is-path-inside": "^3.0.2", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index cfa092c51c3e0d..fb1f7a6bdb146c 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -27,6 +27,10 @@ filegroup( "//packages/core/base/core-base-server-internal:build", "//packages/core/base/core-base-server-mocks:build", "//packages/core/config/core-config-server-internal:build", + "//packages/core/deprecations/core-deprecations-browser-internal:build", + "//packages/core/deprecations/core-deprecations-browser-mocks:build", + "//packages/core/deprecations/core-deprecations-browser:build", + "//packages/core/deprecations/core-deprecations-common:build", "//packages/core/doc-links/core-doc-links-browser-internal:build", "//packages/core/doc-links/core-doc-links-browser-mocks:build", "//packages/core/doc-links/core-doc-links-browser:build", @@ -49,6 +53,12 @@ filegroup( "//packages/core/http/core-http-browser-mocks:build", "//packages/core/http/core-http-browser:build", "//packages/core/http/core-http-common:build", + "//packages/core/http/core-http-context-server-internal:build", + "//packages/core/http/core-http-context-server-mocks:build", + "//packages/core/http/core-http-router-server-internal:build", + "//packages/core/http/core-http-router-server-mocks:build", + "//packages/core/http/core-http-server-internal:build", + "//packages/core/http/core-http-server-mocks:build", "//packages/core/http/core-http-server:build", "//packages/core/i18n/core-i18n-browser-internal:build", "//packages/core/i18n/core-i18n-browser-mocks:build", @@ -66,9 +76,14 @@ filegroup( "//packages/core/preboot/core-preboot-server-internal:build", "//packages/core/preboot/core-preboot-server-mocks:build", "//packages/core/preboot/core-preboot-server:build", + "//packages/core/test-helpers/core-test-helpers-http-setup-browser:build", "//packages/core/theme/core-theme-browser-internal:build", "//packages/core/theme/core-theme-browser-mocks:build", "//packages/core/theme/core-theme-browser:build", + "//packages/core/ui-settings/core-ui-settings-browser-internal:build", + "//packages/core/ui-settings/core-ui-settings-browser-mocks:build", + "//packages/core/ui-settings/core-ui-settings-browser:build", + "//packages/core/ui-settings/core-ui-settings-common:build", "//packages/elastic-apm-synthtrace:build", "//packages/elastic-safer-lodash-set:build", "//packages/home/sample_data_cards:build", @@ -218,6 +233,10 @@ filegroup( "//packages/core/base/core-base-server-internal:build_types", "//packages/core/base/core-base-server-mocks:build_types", "//packages/core/config/core-config-server-internal:build_types", + "//packages/core/deprecations/core-deprecations-browser-internal:build_types", + "//packages/core/deprecations/core-deprecations-browser-mocks:build_types", + "//packages/core/deprecations/core-deprecations-browser:build_types", + "//packages/core/deprecations/core-deprecations-common:build_types", "//packages/core/doc-links/core-doc-links-browser-internal:build_types", "//packages/core/doc-links/core-doc-links-browser-mocks:build_types", "//packages/core/doc-links/core-doc-links-browser:build_types", @@ -240,6 +259,12 @@ filegroup( "//packages/core/http/core-http-browser-mocks:build_types", "//packages/core/http/core-http-browser:build_types", "//packages/core/http/core-http-common:build_types", + "//packages/core/http/core-http-context-server-internal:build_types", + "//packages/core/http/core-http-context-server-mocks:build_types", + "//packages/core/http/core-http-router-server-internal:build_types", + "//packages/core/http/core-http-router-server-mocks:build_types", + "//packages/core/http/core-http-server-internal:build_types", + "//packages/core/http/core-http-server-mocks:build_types", "//packages/core/http/core-http-server:build_types", "//packages/core/i18n/core-i18n-browser-internal:build_types", "//packages/core/i18n/core-i18n-browser-mocks:build_types", @@ -257,9 +282,14 @@ filegroup( "//packages/core/preboot/core-preboot-server-internal:build_types", "//packages/core/preboot/core-preboot-server-mocks:build_types", "//packages/core/preboot/core-preboot-server:build_types", + "//packages/core/test-helpers/core-test-helpers-http-setup-browser:build_types", "//packages/core/theme/core-theme-browser-internal:build_types", "//packages/core/theme/core-theme-browser-mocks:build_types", "//packages/core/theme/core-theme-browser:build_types", + "//packages/core/ui-settings/core-ui-settings-browser-internal:build_types", + "//packages/core/ui-settings/core-ui-settings-browser-mocks:build_types", + "//packages/core/ui-settings/core-ui-settings-browser:build_types", + "//packages/core/ui-settings/core-ui-settings-common:build_types", "//packages/elastic-apm-synthtrace:build_types", "//packages/elastic-safer-lodash-set:build_types", "//packages/home/sample_data_cards:build_types", diff --git a/packages/core/deprecations/core-deprecations-browser-internal/BUILD.bazel b/packages/core/deprecations/core-deprecations-browser-internal/BUILD.bazel new file mode 100644 index 00000000000000..c3f2e0f4c1a238 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/BUILD.bazel @@ -0,0 +1,114 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-deprecations-browser-internal" +PKG_REQUIRE_NAME = "@kbn/core-deprecations-browser-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/kbn-i18n", + "//packages/core/http/core-http-browser-mocks", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "//packages/kbn-i18n:npm_module_types", + "//packages/core/base/core-base-browser-internal:npm_module_types", + "//packages/core/http/core-http-browser:npm_module_types", + "//packages/core/http/core-http-browser-mocks:npm_module_types", + "//packages/core/deprecations/core-deprecations-common:npm_module_types", + "//packages/core/deprecations/core-deprecations-browser:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/deprecations/core-deprecations-browser-internal/README.md b/packages/core/deprecations/core-deprecations-browser-internal/README.md new file mode 100644 index 00000000000000..8f7b2f147deaff --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-deprecations-browser-internal + +Contains implementation and internal types for Core's client-side `deprecations` service diff --git a/packages/core/deprecations/core-deprecations-browser-internal/jest.config.js b/packages/core/deprecations/core-deprecations-browser-internal/jest.config.js new file mode 100644 index 00000000000000..c1baf6d1fdfc91 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/deprecations/core-deprecations-browser-internal'], +}; diff --git a/packages/core/deprecations/core-deprecations-browser-internal/package.json b/packages/core/deprecations/core-deprecations-browser-internal/package.json new file mode 100644 index 00000000000000..1f4a5d5531ce95 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-deprecations-browser-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/deprecations/deprecations_client.test.ts b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.test.ts similarity index 98% rename from src/core/public/deprecations/deprecations_client.test.ts rename to packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.test.ts index 7bff04cccf323f..49d9c0a23956a9 100644 --- a/src/core/public/deprecations/deprecations_client.test.ts +++ b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.test.ts @@ -8,7 +8,7 @@ import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { DeprecationsClient } from './deprecations_client'; -import type { DomainDeprecationDetails } from '../../server/types'; +import type { DomainDeprecationDetails } from '@kbn/core-deprecations-common'; describe('DeprecationsClient', () => { const http = httpServiceMock.createSetupContract(); diff --git a/src/core/public/deprecations/deprecations_client.ts b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.ts similarity index 92% rename from src/core/public/deprecations/deprecations_client.ts rename to packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.ts index 80b1913fcfaf1c..f3f2bd7f28e8a7 100644 --- a/src/core/public/deprecations/deprecations_client.ts +++ b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_client.ts @@ -8,16 +8,17 @@ import { i18n } from '@kbn/i18n'; import type { HttpStart } from '@kbn/core-http-browser'; -import type { DomainDeprecationDetails, DeprecationsGetResponse } from '../../server/types'; +import type { + DomainDeprecationDetails, + DeprecationsGetResponse, +} from '@kbn/core-deprecations-common'; +import type { ResolveDeprecationResponse } from '@kbn/core-deprecations-browser'; /* @internal */ export interface DeprecationsClientDeps { http: Pick; } -/* @internal */ -export type ResolveDeprecationResponse = { status: 'ok' } | { status: 'fail'; reason: string }; - export class DeprecationsClient { private readonly http: Pick; constructor({ http }: DeprecationsClientDeps) { diff --git a/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts new file mode 100644 index 00000000000000..edaf5f7f27be04 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/src/deprecations_service.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { CoreService } from '@kbn/core-base-browser-internal'; +import type { DeprecationsServiceStart } from '@kbn/core-deprecations-browser'; +import type { HttpStart } from '@kbn/core-http-browser'; +import { DeprecationsClient } from './deprecations_client'; + +export class DeprecationsService implements CoreService { + public setup(): void {} + + public start({ http }: { http: HttpStart }): DeprecationsServiceStart { + const deprecationsClient = new DeprecationsClient({ http }); + + return { + getAllDeprecations: deprecationsClient.getAllDeprecations, + getDeprecations: deprecationsClient.getDeprecations, + isDeprecationResolvable: deprecationsClient.isDeprecationResolvable, + resolveDeprecation: deprecationsClient.resolveDeprecation, + }; + } + + public stop(): void {} +} diff --git a/src/core/public/deprecations/index.ts b/packages/core/deprecations/core-deprecations-browser-internal/src/index.ts similarity index 74% rename from src/core/public/deprecations/index.ts rename to packages/core/deprecations/core-deprecations-browser-internal/src/index.ts index 092cbed613ac22..758a941ee3a04c 100644 --- a/src/core/public/deprecations/index.ts +++ b/packages/core/deprecations/core-deprecations-browser-internal/src/index.ts @@ -7,5 +7,3 @@ */ export { DeprecationsService } from './deprecations_service'; -export type { DeprecationsServiceStart } from './deprecations_service'; -export type { ResolveDeprecationResponse } from './deprecations_client'; diff --git a/packages/core/deprecations/core-deprecations-browser-internal/tsconfig.json b/packages/core/deprecations/core-deprecations-browser-internal/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/BUILD.bazel b/packages/core/deprecations/core-deprecations-browser-mocks/BUILD.bazel new file mode 100644 index 00000000000000..8c840af011078d --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/BUILD.bazel @@ -0,0 +1,110 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-deprecations-browser-mocks" +PKG_REQUIRE_NAME = "@kbn/core-deprecations-browser-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/core/deprecations/core-deprecations-browser-internal" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/deprecations/core-deprecations-browser:npm_module_types", + "//packages/core/deprecations/core-deprecations-browser-internal:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/README.md b/packages/core/deprecations/core-deprecations-browser-mocks/README.md new file mode 100644 index 00000000000000..a11bbcc144ebb6 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-deprecations-browser-mocks + +Contains mocks for Core's client-side `deprecations` service diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/jest.config.js b/packages/core/deprecations/core-deprecations-browser-mocks/jest.config.js new file mode 100644 index 00000000000000..4bfb844cf8fa34 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/deprecations/core-deprecations-browser-mocks'], +}; diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/package.json b/packages/core/deprecations/core-deprecations-browser-mocks/package.json new file mode 100644 index 00000000000000..47b5aa1f0add21 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-deprecations-browser-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/deprecations/deprecations_service.mock.ts b/packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts similarity index 88% rename from src/core/public/deprecations/deprecations_service.mock.ts rename to packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts index 5bcd52982d5131..f742f84036ea63 100644 --- a/src/core/public/deprecations/deprecations_service.mock.ts +++ b/packages/core/deprecations/core-deprecations-browser-mocks/src/deprecations_service.mock.ts @@ -7,8 +7,8 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import { DeprecationsService } from './deprecations_service'; -import type { DeprecationsServiceStart } from './deprecations_service'; +import { DeprecationsService } from '@kbn/core-deprecations-browser-internal'; +import type { DeprecationsServiceStart } from '@kbn/core-deprecations-browser'; const createServiceMock = (): jest.Mocked => ({ getAllDeprecations: jest.fn().mockResolvedValue([]), diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/src/index.ts b/packages/core/deprecations/core-deprecations-browser-mocks/src/index.ts new file mode 100644 index 00000000000000..1239090c387add --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/src/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { deprecationsServiceMock } from './deprecations_service.mock'; diff --git a/packages/core/deprecations/core-deprecations-browser-mocks/tsconfig.json b/packages/core/deprecations/core-deprecations-browser-mocks/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/deprecations/core-deprecations-browser/BUILD.bazel b/packages/core/deprecations/core-deprecations-browser/BUILD.bazel new file mode 100644 index 00000000000000..85a9e6c411c211 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/BUILD.bazel @@ -0,0 +1,107 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-deprecations-browser" +PKG_REQUIRE_NAME = "@kbn/core-deprecations-browser" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react", + "//packages/core/deprecations/core-deprecations-common:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/deprecations/core-deprecations-browser/README.md b/packages/core/deprecations/core-deprecations-browser/README.md new file mode 100644 index 00000000000000..3c7bae6833733d --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/README.md @@ -0,0 +1,3 @@ +# @kbn/core-deprecations-browser + +Contains public types for Core's client-side `deprecations` service diff --git a/packages/core/deprecations/core-deprecations-browser/jest.config.js b/packages/core/deprecations/core-deprecations-browser/jest.config.js new file mode 100644 index 00000000000000..9f08c08e4fb410 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/deprecations/core-deprecations-browser'], +}; diff --git a/packages/core/deprecations/core-deprecations-browser/package.json b/packages/core/deprecations/core-deprecations-browser/package.json new file mode 100644 index 00000000000000..d4e5346ab80a86 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-deprecations-browser", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/deprecations/deprecations_service.ts b/packages/core/deprecations/core-deprecations-browser/src/contracts.ts similarity index 60% rename from src/core/public/deprecations/deprecations_service.ts rename to packages/core/deprecations/core-deprecations-browser/src/contracts.ts index bcc701cc634a0f..c8e8d08e79848c 100644 --- a/src/core/public/deprecations/deprecations_service.ts +++ b/packages/core/deprecations/core-deprecations-browser/src/contracts.ts @@ -5,11 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -import type { CoreService } from '@kbn/core-base-browser-internal'; -import type { HttpStart } from '@kbn/core-http-browser'; -import { DeprecationsClient, ResolveDeprecationResponse } from './deprecations_client'; -import type { DomainDeprecationDetails } from '../../server/types'; +import type { DomainDeprecationDetails } from '@kbn/core-deprecations-common'; +import type { ResolveDeprecationResponse } from './types'; /** * DeprecationsService provides methods to fetch domain deprecation details from @@ -41,20 +38,3 @@ export interface DeprecationsServiceStart { */ resolveDeprecation: (details: DomainDeprecationDetails) => Promise; } - -export class DeprecationsService implements CoreService { - public setup(): void {} - - public start({ http }: { http: HttpStart }): DeprecationsServiceStart { - const deprecationsClient = new DeprecationsClient({ http }); - - return { - getAllDeprecations: deprecationsClient.getAllDeprecations, - getDeprecations: deprecationsClient.getDeprecations, - isDeprecationResolvable: deprecationsClient.isDeprecationResolvable, - resolveDeprecation: deprecationsClient.resolveDeprecation, - }; - } - - public stop(): void {} -} diff --git a/packages/core/deprecations/core-deprecations-browser/src/index.ts b/packages/core/deprecations/core-deprecations-browser/src/index.ts new file mode 100644 index 00000000000000..4ae415ba26f5e5 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/src/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { DeprecationsServiceStart } from './contracts'; +export type { ResolveDeprecationResponse } from './types'; diff --git a/packages/core/deprecations/core-deprecations-browser/src/types.ts b/packages/core/deprecations/core-deprecations-browser/src/types.ts new file mode 100644 index 00000000000000..a51174445edac0 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/src/types.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Response from correctiveActions.api call from automatically resolving the deprecation + * @public + */ +export type ResolveDeprecationResponse = { status: 'ok' } | { status: 'fail'; reason: string }; diff --git a/packages/core/deprecations/core-deprecations-browser/tsconfig.json b/packages/core/deprecations/core-deprecations-browser/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/deprecations/core-deprecations-browser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/deprecations/core-deprecations-common/BUILD.bazel b/packages/core/deprecations/core-deprecations-common/BUILD.bazel new file mode 100644 index 00000000000000..7bddbc3cebaf72 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/BUILD.bazel @@ -0,0 +1,106 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-deprecations-common" +PKG_REQUIRE_NAME = "@kbn/core-deprecations-common" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/react" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/deprecations/core-deprecations-common/README.md b/packages/core/deprecations/core-deprecations-common/README.md new file mode 100644 index 00000000000000..503006503c0600 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/README.md @@ -0,0 +1,3 @@ +# @kbn/core-deprecations-common + +Contains public shared types for Core's `deprecations` service diff --git a/packages/core/deprecations/core-deprecations-common/jest.config.js b/packages/core/deprecations/core-deprecations-common/jest.config.js new file mode 100644 index 00000000000000..3a20374e4f7ad2 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/deprecations/core-deprecations-common'], +}; diff --git a/packages/core/deprecations/core-deprecations-common/package.json b/packages/core/deprecations/core-deprecations-common/package.json new file mode 100644 index 00000000000000..66dd322302c609 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-deprecations-common", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/deprecations/core-deprecations-common/src/index.ts b/packages/core/deprecations/core-deprecations-common/src/index.ts new file mode 100644 index 00000000000000..3013ad0f322813 --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/src/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + BaseDeprecationDetails, + ConfigDeprecationDetails, + FeatureDeprecationDetails, + DeprecationsDetails, + DomainDeprecationDetails, + DeprecationsGetResponse, +} from './types'; diff --git a/packages/core/deprecations/core-deprecations-common/src/types.ts b/packages/core/deprecations/core-deprecations-common/src/types.ts new file mode 100644 index 00000000000000..8dc7a08923bade --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/src/types.ts @@ -0,0 +1,107 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Base properties shared by all types of deprecations + * + * @public + */ +export interface BaseDeprecationDetails { + /** + * The title of the deprecation. + * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` + */ + title: string; + /** + * The description message to be displayed for the deprecation. + * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` + */ + message: string; + /** + * levels: + * - warning: will not break deployment upon upgrade + * - critical: needs to be addressed before upgrade. + * - fetch_error: Deprecations service failed to grab the deprecation details for the domain. + */ + level: 'warning' | 'critical' | 'fetch_error'; + /** + * (optional) Used to identify between different deprecation types. + * Example use case: in Upgrade Assistant, we may want to allow the user to sort by + * deprecation type or show each type in a separate tab. + * + * Feel free to add new types if necessary. + * Predefined types are necessary to reduce having similar definitions with different keywords + * across kibana deprecations. + */ + deprecationType?: 'config' | 'feature'; + /** (optional) link to the documentation for more details on the deprecation. */ + documentationUrl?: string; + /** (optional) specify the fix for this deprecation requires a full kibana restart. */ + requireRestart?: boolean; + /** corrective action needed to fix this deprecation. */ + correctiveActions: { + /** + * (optional) The api to be called to automatically fix the deprecation + * Each domain should implement a POST/PUT route for their plugin to + * handle their deprecations. + */ + api?: { + /** Kibana route path. Passing a query string is allowed */ + path: string; + /** Kibana route method: 'POST' or 'PUT'. */ + method: 'POST' | 'PUT'; + /** Additional details to be passed to the route. */ + body?: { + [key: string]: any; + }; + /* Allow to omit context in the request of the body */ + omitContextFromBody?: boolean; + }; + /** + * Specify a list of manual steps users need to follow to + * fix the deprecation before upgrade. Required even if an API + * corrective action is set in case the API fails. + * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` + */ + manualSteps: string[]; + }; +} + +/** + * @public + */ +export interface ConfigDeprecationDetails extends BaseDeprecationDetails { + configPath: string; + deprecationType: 'config'; +} + +/** + * @public + */ +export interface FeatureDeprecationDetails extends BaseDeprecationDetails { + deprecationType?: 'feature' | undefined; +} + +/** + * @public + */ +export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; + +/** + * @public + */ +export type DomainDeprecationDetails = DeprecationsDetails & { + domainId: string; +}; + +/** + * @public + */ +export interface DeprecationsGetResponse { + deprecations: DomainDeprecationDetails[]; +} diff --git a/packages/core/deprecations/core-deprecations-common/tsconfig.json b/packages/core/deprecations/core-deprecations-common/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/deprecations/core-deprecations-common/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-context-server-internal/BUILD.bazel b/packages/core/http/core-http-context-server-internal/BUILD.bazel new file mode 100644 index 00000000000000..f6d509a851f968 --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/BUILD.bazel @@ -0,0 +1,104 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-context-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-http-context-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//lodash", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//lodash", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/core/base/core-base-common-internal:npm_module_types", + "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-context-server-internal/README.md b/packages/core/http/core-http-context-server-internal/README.md new file mode 100644 index 00000000000000..8d1aced432ccda --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-http-context-server-internal + +This package contains the internal types and implementation for Core's internal `http` context service. diff --git a/packages/core/http/core-http-context-server-internal/jest.config.js b/packages/core/http/core-http-context-server-internal/jest.config.js new file mode 100644 index 00000000000000..e6e2b030dc3a98 --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-context-server-internal'], +}; diff --git a/packages/core/http/core-http-context-server-internal/package.json b/packages/core/http/core-http-context-server-internal/package.json new file mode 100644 index 00000000000000..1c2c18afb7da06 --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-context-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/context/context_container.test.ts b/packages/core/http/core-http-context-server-internal/src/context_container.test.ts similarity index 92% rename from src/core/server/context/context_container.test.ts rename to packages/core/http/core-http-context-server-internal/src/context_container.test.ts index 2959533cec5091..3b61cfea99fc99 100644 --- a/src/core/server/context/context_container.test.ts +++ b/packages/core/http/core-http-context-server-internal/src/context_container.test.ts @@ -7,9 +7,12 @@ */ import type { PluginOpaqueId } from '@kbn/core-base-common'; -import type { RequestHandlerContextBase } from '@kbn/core-http-server'; +import type { + RequestHandlerContextBase, + KibanaRequest, + KibanaResponseFactory, +} from '@kbn/core-http-server'; import { ContextContainer } from './context_container'; -import { httpServerMock } from '../http/http_server.mocks'; const pluginA = Symbol('pluginA'); const pluginB = Symbol('pluginB'); @@ -35,6 +38,13 @@ interface MyContext extends RequestHandlerContextBase { type TestContext = T & RequestHandlerContextBase; +const createKibanaRequest = (): KibanaRequest => { + return {} as unknown as KibanaRequest; +}; +const createKibanaResponseFactory = (): KibanaResponseFactory => { + return {} as unknown as KibanaResponseFactory; +}; + describe('ContextContainer', () => { describe('registerContext', () => { it('throws an error if the same context is registered twice', () => { @@ -145,8 +155,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginC, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); expect(core1provider).not.toHaveBeenCalled(); @@ -188,8 +198,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginC, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); expect(core1provider).not.toHaveBeenCalled(); @@ -229,8 +239,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginC, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); expect(core1provider).not.toHaveBeenCalled(); @@ -271,8 +281,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginC, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); expect(core1provider).not.toHaveBeenCalled(); @@ -356,8 +366,8 @@ describe('ContextContainer', () => { const handler2 = contextContainer.createHandler(pluginD, rawHandler2); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); await handler2(request, response); @@ -400,8 +410,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginB, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); expect(await handler1(request, response)).toEqual('handler1'); expect(rawHandler1).toHaveBeenCalledWith(expect.any(Object), request, response); @@ -430,8 +440,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(pluginA, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); expect(await handler1(request, response)).toEqual('handler1'); // If no context is registered for pluginA, only core contexts should be exposed @@ -454,8 +464,8 @@ describe('ContextContainer', () => { }); const handler1 = contextContainer.createHandler(coreId, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); expect(await handler1(request, response)).toEqual('handler1'); expect(rawHandler1).toHaveBeenCalledWith(expect.any(Object), request, response); @@ -465,8 +475,8 @@ describe('ContextContainer', () => { expect.assertions(7); const contextContainer = new ContextContainer(plugins, coreId); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); contextContainer.registerContext(coreId, 'core1', (context, req, res) => { expect(req).toBe(request); expect(res).toBe(response); @@ -567,8 +577,8 @@ describe('ContextContainer', () => { const handler2 = contextContainer.createHandler(pluginD, rawHandler2); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); await handler2(request, response); @@ -597,8 +607,8 @@ describe('ContextContainer', () => { const rawHandler1 = jest.fn(() => 'handler1' as any); const handler1 = contextContainer.createHandler(pluginA, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); expect(await handler1(request, response)).toEqual('handler1'); }); @@ -608,8 +618,8 @@ describe('ContextContainer', () => { const rawHandler1 = jest.fn(() => 'handler1' as any); const handler1 = contextContainer.createHandler(pluginA, rawHandler1); - const request = httpServerMock.createKibanaRequest(); - const response = httpServerMock.createResponseFactory(); + const request = createKibanaRequest(); + const response = createKibanaResponseFactory(); await handler1(request, response); expect(rawHandler1).toHaveBeenCalledWith( { resolve: expect.any(Function) }, diff --git a/src/core/server/context/context_container.ts b/packages/core/http/core-http-context-server-internal/src/context_container.ts similarity index 100% rename from src/core/server/context/context_container.ts rename to packages/core/http/core-http-context-server-internal/src/context_container.ts diff --git a/packages/core/http/core-http-context-server-internal/src/context_service.test.mocks.ts b/packages/core/http/core-http-context-server-internal/src/context_service.test.mocks.ts new file mode 100644 index 00000000000000..49d48f3424f16a --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/src/context_service.test.mocks.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { IContextContainer } from '@kbn/core-http-server'; + +const createContextMock = (mockContext: any = {}) => { + const contextMock: jest.Mocked = { + registerContext: jest.fn(), + createHandler: jest.fn(), + }; + contextMock.createHandler.mockImplementation( + (pluginId, handler) => + (...args) => + Promise.resolve(handler(mockContext, ...args)) + ); + return contextMock; +}; + +export const MockContextConstructor = jest.fn(createContextMock); +jest.doMock('./context_container', () => ({ + ContextContainer: MockContextConstructor, +})); diff --git a/src/core/server/context/context_service.test.ts b/packages/core/http/core-http-context-server-internal/src/context_service.test.ts similarity index 100% rename from src/core/server/context/context_service.test.ts rename to packages/core/http/core-http-context-server-internal/src/context_service.test.ts diff --git a/src/core/server/context/context_service.ts b/packages/core/http/core-http-context-server-internal/src/context_service.ts similarity index 100% rename from src/core/server/context/context_service.ts rename to packages/core/http/core-http-context-server-internal/src/context_service.ts diff --git a/src/core/server/context/index.ts b/packages/core/http/core-http-context-server-internal/src/index.ts similarity index 100% rename from src/core/server/context/index.ts rename to packages/core/http/core-http-context-server-internal/src/index.ts diff --git a/packages/core/http/core-http-context-server-internal/tsconfig.json b/packages/core/http/core-http-context-server-internal/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-context-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-context-server-mocks/BUILD.bazel b/packages/core/http/core-http-context-server-mocks/BUILD.bazel new file mode 100644 index 00000000000000..a53bae874f6d9e --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/BUILD.bazel @@ -0,0 +1,100 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-context-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-http-context-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-context-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-context-server-mocks/README.md b/packages/core/http/core-http-context-server-mocks/README.md new file mode 100644 index 00000000000000..2be50f33660bc1 --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-http-context-server-mocks + +This package contains the mocks for Core's internal `http` context service. diff --git a/packages/core/http/core-http-context-server-mocks/jest.config.js b/packages/core/http/core-http-context-server-mocks/jest.config.js new file mode 100644 index 00000000000000..14c289e08adff6 --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-context-server-mocks'], +}; diff --git a/packages/core/http/core-http-context-server-mocks/package.json b/packages/core/http/core-http-context-server-mocks/package.json new file mode 100644 index 00000000000000..e98f7c35c3968c --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-context-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/context/context_container.mock.ts b/packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts similarity index 100% rename from src/core/server/context/context_container.mock.ts rename to packages/core/http/core-http-context-server-mocks/src/context_container.mock.ts diff --git a/src/core/server/context/context_service.mock.ts b/packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts similarity index 91% rename from src/core/server/context/context_service.mock.ts rename to packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts index ca07e6c6923c26..6b56e43b35c76a 100644 --- a/src/core/server/context/context_service.mock.ts +++ b/packages/core/http/core-http-context-server-mocks/src/context_service.mock.ts @@ -7,8 +7,11 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; - -import { ContextService, InternalContextSetup, InternalContextPreboot } from './context_service'; +import type { + ContextService, + InternalContextSetup, + InternalContextPreboot, +} from '@kbn/core-http-context-server-internal'; import { contextMock } from './context_container.mock'; const createPrebootContractMock = (mockContext = {}) => { diff --git a/packages/core/http/core-http-context-server-mocks/src/index.ts b/packages/core/http/core-http-context-server-mocks/src/index.ts new file mode 100644 index 00000000000000..b58cc5d877bd90 --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/src/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { ContextContainerMock } from './context_container.mock'; +export { contextMock } from './context_container.mock'; +export { contextServiceMock } from './context_service.mock'; diff --git a/packages/core/http/core-http-context-server-mocks/tsconfig.json b/packages/core/http/core-http-context-server-mocks/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-context-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-router-server-internal/BUILD.bazel b/packages/core/http/core-http-router-server-internal/BUILD.bazel new file mode 100644 index 00000000000000..016156539aaa25 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/BUILD.bazel @@ -0,0 +1,114 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-router-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-http-router-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//@hapi/boom", + "@npm//uuid", + "@npm//rxjs", + "@npm//type-detect", + "//packages/kbn-config-schema", + "//packages/kbn-es-errors", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/uuid", + "@npm//type-detect", + "@npm//@hapi/hapi", + "@npm//@types/hapi__hapi", + "@npm//@hapi/boom", + "@npm//rxjs", + "//packages/kbn-std:npm_module_types", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/kbn-es-errors:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-router-server-internal/README.md b/packages/core/http/core-http-router-server-internal/README.md new file mode 100644 index 00000000000000..5b8926822d460c --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/README.md @@ -0,0 +1,4 @@ +# @kbn/core-http-router-server-internal + +This package contains the internal types and implementation for Core's internal `http` router sub-domain. + diff --git a/packages/core/http/core-http-router-server-internal/jest.config.js b/packages/core/http/core-http-router-server-internal/jest.config.js new file mode 100644 index 00000000000000..c0b4fc1497eed4 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-router-server-internal'], +}; diff --git a/packages/core/http/core-http-router-server-internal/package.json b/packages/core/http/core-http-router-server-internal/package.json new file mode 100644 index 00000000000000..45c10b39164b32 --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-router-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/http/router/error_wrapper.test.ts b/packages/core/http/core-http-router-server-internal/src/error_wrapper.test.ts similarity index 100% rename from src/core/server/http/router/error_wrapper.test.ts rename to packages/core/http/core-http-router-server-internal/src/error_wrapper.test.ts diff --git a/src/core/server/http/router/error_wrapper.ts b/packages/core/http/core-http-router-server-internal/src/error_wrapper.ts similarity index 100% rename from src/core/server/http/router/error_wrapper.ts rename to packages/core/http/core-http-router-server-internal/src/error_wrapper.ts diff --git a/src/core/server/http/router/headers.ts b/packages/core/http/core-http-router-server-internal/src/headers.ts similarity index 100% rename from src/core/server/http/router/headers.ts rename to packages/core/http/core-http-router-server-internal/src/headers.ts diff --git a/src/core/server/http/router/index.ts b/packages/core/http/core-http-router-server-internal/src/index.ts similarity index 100% rename from src/core/server/http/router/index.ts rename to packages/core/http/core-http-router-server-internal/src/index.ts diff --git a/src/core/server/http/router/request.test.ts b/packages/core/http/core-http-router-server-internal/src/request.test.ts similarity index 100% rename from src/core/server/http/router/request.test.ts rename to packages/core/http/core-http-router-server-internal/src/request.test.ts diff --git a/src/core/server/http/router/request.ts b/packages/core/http/core-http-router-server-internal/src/request.ts similarity index 99% rename from src/core/server/http/router/request.ts rename to packages/core/http/core-http-router-server-internal/src/request.ts index 39bc87679b7cd3..49e764a50cc009 100644 --- a/src/core/server/http/router/request.ts +++ b/packages/core/http/core-http-router-server-internal/src/request.ts @@ -8,7 +8,7 @@ import { URL } from 'url'; import uuid from 'uuid'; -import { Request, RouteOptions } from '@hapi/hapi'; +import type { Request, RouteOptions } from '@hapi/hapi'; import { fromEvent, NEVER } from 'rxjs'; import { shareReplay, first, filter } from 'rxjs/operators'; import { RecursiveReadonly } from '@kbn/utility-types'; diff --git a/src/core/server/http/router/response.ts b/packages/core/http/core-http-router-server-internal/src/response.ts similarity index 100% rename from src/core/server/http/router/response.ts rename to packages/core/http/core-http-router-server-internal/src/response.ts diff --git a/src/core/server/http/router/response_adapter.ts b/packages/core/http/core-http-router-server-internal/src/response_adapter.ts similarity index 100% rename from src/core/server/http/router/response_adapter.ts rename to packages/core/http/core-http-router-server-internal/src/response_adapter.ts diff --git a/src/core/server/http/router/route.ts b/packages/core/http/core-http-router-server-internal/src/route.ts similarity index 100% rename from src/core/server/http/router/route.ts rename to packages/core/http/core-http-router-server-internal/src/route.ts diff --git a/src/core/server/http/router/router.test.ts b/packages/core/http/core-http-router-server-internal/src/router.test.ts similarity index 100% rename from src/core/server/http/router/router.test.ts rename to packages/core/http/core-http-router-server-internal/src/router.test.ts diff --git a/src/core/server/http/router/router.ts b/packages/core/http/core-http-router-server-internal/src/router.ts similarity index 100% rename from src/core/server/http/router/router.ts rename to packages/core/http/core-http-router-server-internal/src/router.ts diff --git a/src/core/server/http/router/socket.test.ts b/packages/core/http/core-http-router-server-internal/src/socket.test.ts similarity index 100% rename from src/core/server/http/router/socket.test.ts rename to packages/core/http/core-http-router-server-internal/src/socket.test.ts diff --git a/src/core/server/http/router/socket.ts b/packages/core/http/core-http-router-server-internal/src/socket.ts similarity index 100% rename from src/core/server/http/router/socket.ts rename to packages/core/http/core-http-router-server-internal/src/socket.ts diff --git a/src/core/server/http/router/validator.test.ts b/packages/core/http/core-http-router-server-internal/src/validator.test.ts similarity index 100% rename from src/core/server/http/router/validator.test.ts rename to packages/core/http/core-http-router-server-internal/src/validator.test.ts diff --git a/src/core/server/http/router/validator.ts b/packages/core/http/core-http-router-server-internal/src/validator.ts similarity index 100% rename from src/core/server/http/router/validator.ts rename to packages/core/http/core-http-router-server-internal/src/validator.ts diff --git a/packages/core/http/core-http-router-server-internal/tsconfig.json b/packages/core/http/core-http-router-server-internal/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-router-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-router-server-mocks/BUILD.bazel b/packages/core/http/core-http-router-server-mocks/BUILD.bazel new file mode 100644 index 00000000000000..a377948e772efe --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/BUILD.bazel @@ -0,0 +1,106 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-router-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-http-router-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//query-string", + "//packages/kbn-hapi-mocks", + "//packages/kbn-config-schema", + "//packages/core/http/core-http-router-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//query-string", + "//packages/kbn-hapi-mocks:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-router-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-router-server-mocks/README.md b/packages/core/http/core-http-router-server-mocks/README.md new file mode 100644 index 00000000000000..87bb78da4dfdc8 --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-http-router-server-mocks + +This package contains the mocks for Core's internal `http` router sub-domain. diff --git a/packages/core/http/core-http-router-server-mocks/jest.config.js b/packages/core/http/core-http-router-server-mocks/jest.config.js new file mode 100644 index 00000000000000..7f154d49c62ea2 --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-router-server-mocks'], +}; diff --git a/packages/core/http/core-http-router-server-mocks/package.json b/packages/core/http/core-http-router-server-mocks/package.json new file mode 100644 index 00000000000000..59c910af290121 --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-router-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/http/core-http-router-server-mocks/src/index.ts b/packages/core/http/core-http-router-server-mocks/src/index.ts new file mode 100644 index 00000000000000..8f04fc362edfa9 --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/src/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { mockRouter } from './router.mock'; +export type { RouterMock, RequestFixtureOptions } from './router.mock'; diff --git a/src/core/server/http/router/router.mock.ts b/packages/core/http/core-http-router-server-mocks/src/router.mock.ts similarity index 98% rename from src/core/server/http/router/router.mock.ts rename to packages/core/http/core-http-router-server-mocks/src/router.mock.ts index 573d43fea80d57..c6e2deb9b14733 100644 --- a/src/core/server/http/router/router.mock.ts +++ b/packages/core/http/core-http-router-server-mocks/src/router.mock.ts @@ -20,7 +20,7 @@ import type { KibanaRequestState, KibanaResponseFactory, } from '@kbn/core-http-server'; -import { CoreKibanaRequest } from './request'; +import { CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; export type RouterMock = jest.Mocked>; diff --git a/packages/core/http/core-http-router-server-mocks/tsconfig.json b/packages/core/http/core-http-router-server-mocks/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-router-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-server-internal/BUILD.bazel b/packages/core/http/core-http-server-internal/BUILD.bazel new file mode 100644 index 00000000000000..b61ca9d0493c92 --- /dev/null +++ b/packages/core/http/core-http-server-internal/BUILD.bazel @@ -0,0 +1,146 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-http-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//lodash", + "@npm//rxjs", + "@npm//uuid", + "@npm//moment", + "@npm//@elastic/numeral", + "@npm//@hapi/boom", + "@npm//@hapi/cookie", + "@npm//@hapi/inert", + "@npm//elastic-apm-node", + "//packages/kbn-utils", + "//packages/kbn-std", + "//packages/kbn-config-schema", + "//packages/kbn-logging", + "//packages/kbn-crypto", + "//packages/kbn-server-http-tools", + "//packages/core/http/core-http-router-server-internal", + ### test dependencies + "@npm//supertest", + "@npm//chance", + "//packages/kbn-hapi-mocks", + "//packages/core/http/core-http-router-server-mocks", + "//packages/core/logging/core-logging-server-mocks", + "//packages/core/http/core-http-context-server-mocks", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//@types/uuid", + "@npm//rxjs", + "@npm//moment", + "@npm//@elastic/numeral", + "@npm//lodash", + "@npm//@hapi/hapi", + "@npm//@hapi/boom", + "@npm//@hapi/cookie", + "@npm//@hapi/inert", + "@npm//@types/hapi__hapi", + "@npm//@types/hapi__cookie", + "@npm//@types/hapi__inert", + "@npm//elastic-apm-node", + "//packages/kbn-utils:npm_module_types", + "//packages/kbn-std:npm_module_types", + "//packages/kbn-server-http-tools:npm_module_types", + "//packages/kbn-logging:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/kbn-crypto:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/execution-context/core-execution-context-server-internal:npm_module_types", + "//packages/core/http/core-http-common:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-context-server-internal:npm_module_types", + "//packages/core/http/core-http-router-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-server-internal/README.md b/packages/core/http/core-http-server-internal/README.md new file mode 100644 index 00000000000000..e47cd5456ec289 --- /dev/null +++ b/packages/core/http/core-http-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-http-server-internal + +This package contains the internal types and implementation for core's server-side `http` service diff --git a/packages/core/http/core-http-server-internal/jest.config.js b/packages/core/http/core-http-server-internal/jest.config.js new file mode 100644 index 00000000000000..6938210c126ed2 --- /dev/null +++ b/packages/core/http/core-http-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-server-internal'], +}; diff --git a/packages/core/http/core-http-server-internal/package.json b/packages/core/http/core-http-server-internal/package.json new file mode 100644 index 00000000000000..af6db3d6b5106d --- /dev/null +++ b/packages/core/http/core-http-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json b/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json new file mode 100644 index 00000000000000..1f878fb465cff8 --- /dev/null +++ b/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json @@ -0,0 +1,3 @@ +{ + "hello": "dolly" +} diff --git a/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json.gz b/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json.gz new file mode 100644 index 00000000000000..e77819d2e8e59a Binary files /dev/null and b/packages/core/http/core-http-server-internal/src/__fixtures/static/compression_available.json.gz differ diff --git a/packages/core/http/core-http-server-internal/src/__fixtures/static/some_json.json b/packages/core/http/core-http-server-internal/src/__fixtures/static/some_json.json new file mode 100644 index 00000000000000..c8c4105eb57cda --- /dev/null +++ b/packages/core/http/core-http-server-internal/src/__fixtures/static/some_json.json @@ -0,0 +1,3 @@ +{ + "foo": "bar" +} diff --git a/src/core/server/http/__snapshots__/http_config.test.ts.snap b/packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap similarity index 100% rename from src/core/server/http/__snapshots__/http_config.test.ts.snap rename to packages/core/http/core-http-server-internal/src/__snapshots__/http_config.test.ts.snap diff --git a/src/core/server/http/__snapshots__/http_service.test.ts.snap b/packages/core/http/core-http-server-internal/src/__snapshots__/http_service.test.ts.snap similarity index 100% rename from src/core/server/http/__snapshots__/http_service.test.ts.snap rename to packages/core/http/core-http-server-internal/src/__snapshots__/http_service.test.ts.snap diff --git a/src/core/server/http/__snapshots__/https_redirect_server.test.ts.snap b/packages/core/http/core-http-server-internal/src/__snapshots__/https_redirect_server.test.ts.snap similarity index 100% rename from src/core/server/http/__snapshots__/https_redirect_server.test.ts.snap rename to packages/core/http/core-http-server-internal/src/__snapshots__/https_redirect_server.test.ts.snap diff --git a/src/core/server/http/auth_headers_storage.test.ts b/packages/core/http/core-http-server-internal/src/auth_headers_storage.test.ts similarity index 86% rename from src/core/server/http/auth_headers_storage.test.ts rename to packages/core/http/core-http-server-internal/src/auth_headers_storage.test.ts index b00fcaa0a18546..6d150f47b682dc 100644 --- a/src/core/server/http/auth_headers_storage.test.ts +++ b/packages/core/http/core-http-server-internal/src/auth_headers_storage.test.ts @@ -7,14 +7,14 @@ */ import { AuthHeadersStorage } from './auth_headers_storage'; -import { httpServerMock } from './http_server.mocks'; +import { mockRouter } from '@kbn/core-http-router-server-mocks'; describe('AuthHeadersStorage', () => { describe('stores authorization headers', () => { it('retrieves a copy of headers associated with Kibana request', () => { const headers = { authorization: 'token' }; const storage = new AuthHeadersStorage(); - const request = httpServerMock.createKibanaRequest(); + const request = mockRouter.createKibanaRequest(); storage.set(request, headers); expect(storage.get(request)).toEqual(headers); }); diff --git a/src/core/server/http/auth_headers_storage.ts b/packages/core/http/core-http-server-internal/src/auth_headers_storage.ts similarity index 92% rename from src/core/server/http/auth_headers_storage.ts rename to packages/core/http/core-http-server-internal/src/auth_headers_storage.ts index 58f1086b7533fd..11381871913095 100644 --- a/src/core/server/http/auth_headers_storage.ts +++ b/packages/core/http/core-http-server-internal/src/auth_headers_storage.ts @@ -13,7 +13,7 @@ import type { IAuthHeadersStorage, GetAuthHeaders, } from '@kbn/core-http-server'; -import { ensureRawRequest } from './router'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; /** @internal */ export class AuthHeadersStorage implements IAuthHeadersStorage { diff --git a/src/core/server/http/auth_state_storage.ts b/packages/core/http/core-http-server-internal/src/auth_state_storage.ts similarity index 94% rename from src/core/server/http/auth_state_storage.ts rename to packages/core/http/core-http-server-internal/src/auth_state_storage.ts index d305cf18ce60b8..7bdb78db8ce540 100644 --- a/src/core/server/http/auth_state_storage.ts +++ b/packages/core/http/core-http-server-internal/src/auth_state_storage.ts @@ -5,10 +5,11 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import { Request } from '@hapi/hapi'; import type { KibanaRequest, IsAuthenticated } from '@kbn/core-http-server'; import { AuthStatus } from '@kbn/core-http-server'; -import { ensureRawRequest } from './router'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; /** @internal */ export class AuthStateStorage { diff --git a/src/core/server/http/base_path_service.test.ts b/packages/core/http/core-http-server-internal/src/base_path_service.test.ts similarity index 94% rename from src/core/server/http/base_path_service.test.ts rename to packages/core/http/core-http-server-internal/src/base_path_service.test.ts index 2d26000b4672b4..efeb61b72c9aed 100644 --- a/src/core/server/http/base_path_service.test.ts +++ b/packages/core/http/core-http-server-internal/src/base_path_service.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import { mockRouter } from '@kbn/core-http-router-server-mocks'; import { BasePath } from './base_path_service'; -import { httpServerMock } from './http_server.mocks'; describe('BasePath', () => { describe('serverBasePath', () => { @@ -36,7 +36,7 @@ describe('BasePath', () => { describe('#get()', () => { it('returns base path associated with an incoming KibanaRequest', () => { - const request = httpServerMock.createKibanaRequest(); + const request = mockRouter.createKibanaRequest(); const basePath = new BasePath(); basePath.set(request, '/baz/'); @@ -44,7 +44,7 @@ describe('BasePath', () => { }); it('is based on server base path', () => { - const request = httpServerMock.createKibanaRequest(); + const request = mockRouter.createKibanaRequest(); const basePath = new BasePath('/foo/bar'); basePath.set(request, '/baz/'); @@ -54,7 +54,7 @@ describe('BasePath', () => { describe('#set()', () => { it('#set() cannot be set twice for one request', () => { - const request = httpServerMock.createKibanaRequest(); + const request = mockRouter.createKibanaRequest(); const basePath = new BasePath('/foo/bar'); const setPath = () => basePath.set(request, 'baz/'); diff --git a/src/core/server/http/base_path_service.ts b/packages/core/http/core-http-server-internal/src/base_path_service.ts similarity index 96% rename from src/core/server/http/base_path_service.ts rename to packages/core/http/core-http-server-internal/src/base_path_service.ts index e5d5e164a4c9d9..cd40fc57399af9 100644 --- a/src/core/server/http/base_path_service.ts +++ b/packages/core/http/core-http-server-internal/src/base_path_service.ts @@ -9,7 +9,7 @@ import { modifyUrl } from '@kbn/std'; import { Request } from '@hapi/hapi'; import type { KibanaRequest, IBasePath } from '@kbn/core-http-server'; -import { ensureRawRequest } from './router'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; /** * Core internal implementation of {@link IBasePath} diff --git a/src/core/server/http/cookie_session_storage.ts b/packages/core/http/core-http-server-internal/src/cookie_session_storage.ts similarity index 98% rename from src/core/server/http/cookie_session_storage.ts rename to packages/core/http/core-http-server-internal/src/cookie_session_storage.ts index 63975ab549b062..bba5a9742edb61 100644 --- a/src/core/server/http/cookie_session_storage.ts +++ b/packages/core/http/core-http-server-internal/src/cookie_session_storage.ts @@ -16,7 +16,7 @@ import type { SessionStorage, SessionStorageCookieOptions, } from '@kbn/core-http-server'; -import { ensureRawRequest } from './router'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; class ScopedCookieSessionStorage> implements SessionStorage { constructor( diff --git a/src/core/server/http/csp/config.test.ts b/packages/core/http/core-http-server-internal/src/csp/config.test.ts similarity index 100% rename from src/core/server/http/csp/config.test.ts rename to packages/core/http/core-http-server-internal/src/csp/config.test.ts diff --git a/src/core/server/http/csp/config.ts b/packages/core/http/core-http-server-internal/src/csp/config.ts similarity index 100% rename from src/core/server/http/csp/config.ts rename to packages/core/http/core-http-server-internal/src/csp/config.ts diff --git a/src/core/server/http/csp/csp_config.test.mocks.ts b/packages/core/http/core-http-server-internal/src/csp/csp_config.test.mocks.ts similarity index 100% rename from src/core/server/http/csp/csp_config.test.mocks.ts rename to packages/core/http/core-http-server-internal/src/csp/csp_config.test.mocks.ts diff --git a/src/core/server/http/csp/csp_config.test.ts b/packages/core/http/core-http-server-internal/src/csp/csp_config.test.ts similarity index 100% rename from src/core/server/http/csp/csp_config.test.ts rename to packages/core/http/core-http-server-internal/src/csp/csp_config.test.ts diff --git a/src/core/server/http/csp/csp_config.ts b/packages/core/http/core-http-server-internal/src/csp/csp_config.ts similarity index 100% rename from src/core/server/http/csp/csp_config.ts rename to packages/core/http/core-http-server-internal/src/csp/csp_config.ts diff --git a/src/core/server/http/csp/csp_directives.test.ts b/packages/core/http/core-http-server-internal/src/csp/csp_directives.test.ts similarity index 100% rename from src/core/server/http/csp/csp_directives.test.ts rename to packages/core/http/core-http-server-internal/src/csp/csp_directives.test.ts diff --git a/src/core/server/http/csp/csp_directives.ts b/packages/core/http/core-http-server-internal/src/csp/csp_directives.ts similarity index 100% rename from src/core/server/http/csp/csp_directives.ts rename to packages/core/http/core-http-server-internal/src/csp/csp_directives.ts diff --git a/src/core/server/http/csp/index.ts b/packages/core/http/core-http-server-internal/src/csp/index.ts similarity index 100% rename from src/core/server/http/csp/index.ts rename to packages/core/http/core-http-server-internal/src/csp/index.ts diff --git a/src/core/server/http/external_url/config.test.ts b/packages/core/http/core-http-server-internal/src/external_url/config.test.ts similarity index 100% rename from src/core/server/http/external_url/config.test.ts rename to packages/core/http/core-http-server-internal/src/external_url/config.test.ts diff --git a/src/core/server/http/external_url/config.ts b/packages/core/http/core-http-server-internal/src/external_url/config.ts similarity index 100% rename from src/core/server/http/external_url/config.ts rename to packages/core/http/core-http-server-internal/src/external_url/config.ts diff --git a/src/core/server/http/external_url/external_url_config.ts b/packages/core/http/core-http-server-internal/src/external_url/external_url_config.ts similarity index 100% rename from src/core/server/http/external_url/external_url_config.ts rename to packages/core/http/core-http-server-internal/src/external_url/external_url_config.ts diff --git a/src/core/server/http/external_url/index.ts b/packages/core/http/core-http-server-internal/src/external_url/index.ts similarity index 100% rename from src/core/server/http/external_url/index.ts rename to packages/core/http/core-http-server-internal/src/external_url/index.ts diff --git a/src/core/server/http/http_config.test.ts b/packages/core/http/core-http-server-internal/src/http_config.test.ts similarity index 100% rename from src/core/server/http/http_config.test.ts rename to packages/core/http/core-http-server-internal/src/http_config.test.ts diff --git a/src/core/server/http/http_config.ts b/packages/core/http/core-http-server-internal/src/http_config.ts similarity index 100% rename from src/core/server/http/http_config.ts rename to packages/core/http/core-http-server-internal/src/http_config.ts diff --git a/src/core/server/http/http_server.test.ts b/packages/core/http/core-http-server-internal/src/http_server.test.ts similarity index 99% rename from src/core/server/http/http_server.test.ts rename to packages/core/http/core-http-server-internal/src/http_server.test.ts index 4d55e82cfcb143..82debfa44c2cb5 100644 --- a/src/core/server/http/http_server.test.ts +++ b/packages/core/http/core-http-server-internal/src/http_server.test.ts @@ -22,8 +22,8 @@ import type { RouteValidationFunction, RequestHandlerContextBase, } from '@kbn/core-http-server'; +import { Router } from '@kbn/core-http-router-server-internal'; import { HttpConfig } from './http_config'; -import { Router } from './router'; import { HttpServer } from './http_server'; import { Readable } from 'stream'; import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; @@ -1410,7 +1410,7 @@ describe('setup contract', () => { }); describe('#registerStaticDir', () => { - const assetFolder = join(__dirname, 'integration_tests', 'fixtures', 'static'); + const assetFolder = join(__dirname, '__fixtures', 'static'); let tempDir: string; beforeAll(async () => { diff --git a/src/core/server/http/http_server.ts b/packages/core/http/core-http-server-internal/src/http_server.ts similarity index 99% rename from src/core/server/http/http_server.ts rename to packages/core/http/core-http-server-internal/src/http_server.ts index d5564e302c5af1..766fa131349e1a 100644 --- a/src/core/server/http/http_server.ts +++ b/packages/core/http/core-http-server-internal/src/http_server.ts @@ -16,7 +16,6 @@ import { getServerOptions, getRequestId, } from '@kbn/server-http-tools'; -import agent from 'elastic-apm-node'; import type { Duration } from 'moment'; import { firstValueFrom, Observable } from 'rxjs'; @@ -24,6 +23,7 @@ import { take } from 'rxjs/operators'; import apm from 'elastic-apm-node'; import type { Logger, LoggerFactory } from '@kbn/logging'; import type { InternalExecutionContextSetup } from '@kbn/core-execution-context-server-internal'; +import { isSafeMethod } from '@kbn/core-http-router-server-internal'; import type { IRouter, RouteConfigOptions, @@ -47,7 +47,6 @@ import { adoptToHapiOnPreAuth } from './lifecycle/on_pre_auth'; import { adoptToHapiOnPostAuthFormat } from './lifecycle/on_post_auth'; import { adoptToHapiOnRequest } from './lifecycle/on_pre_routing'; import { adoptToHapiOnPreResponseFormat } from './lifecycle/on_pre_response'; -import { isSafeMethod } from './router'; import { createCookieSessionStorageFactory } from './cookie_session_storage'; import { AuthStateStorage } from './auth_state_storage'; import { AuthHeadersStorage } from './auth_headers_storage'; @@ -359,7 +358,7 @@ export class HttpServer { requestUuid: uuid.v4(), // Kibana stores trace.id until https://github.com/elastic/apm-agent-nodejs/issues/2353 is resolved // The current implementation of the APM agent ends a request transaction before "response" log is emitted. - traceId: agent.currentTraceIds['trace.id'], + traceId: apm.currentTraceIds['trace.id'], } as KibanaRequestState; return responseToolkit.continue; }); diff --git a/src/core/server/http/http_service.test.mocks.ts b/packages/core/http/core-http-server-internal/src/http_service.test.mocks.ts similarity index 100% rename from src/core/server/http/http_service.test.mocks.ts rename to packages/core/http/core-http-server-internal/src/http_service.test.mocks.ts diff --git a/src/core/server/http/http_service.test.ts b/packages/core/http/core-http-server-internal/src/http_service.test.ts similarity index 98% rename from src/core/server/http/http_service.test.ts rename to packages/core/http/core-http-server-internal/src/http_service.test.ts index 2f4094edd4f826..8201560c935dfc 100644 --- a/src/core/server/http/http_service.test.ts +++ b/packages/core/http/core-http-server-internal/src/http_service.test.ts @@ -16,12 +16,12 @@ import { ConfigService, Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { HttpService } from '.'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { Router } from '@kbn/core-http-router-server-internal'; +import { HttpService } from './http_service'; import { HttpConfigType, config } from './http_config'; -import { contextServiceMock } from '../context/context_service.mock'; import { cspConfig } from './csp'; import { externalUrlConfig, ExternalUrlConfig } from './external_url'; -import { Router } from './router'; const logger = loggingSystemMock.create(); const env = Env.createDefault(REPO_ROOT, getEnvOptions()); diff --git a/src/core/server/http/http_service.ts b/packages/core/http/core-http-server-internal/src/http_service.ts similarity index 97% rename from src/core/server/http/http_service.ts rename to packages/core/http/core-http-server-internal/src/http_service.ts index 0ef2c9d91af678..607413dcfd5464 100644 --- a/src/core/server/http/http_service.ts +++ b/packages/core/http/core-http-server-internal/src/http_service.ts @@ -21,21 +21,21 @@ import type { IContextContainer, IContextProvider, } from '@kbn/core-http-server'; +import type { + InternalContextSetup, + InternalContextPreboot, +} from '@kbn/core-http-context-server-internal'; +import { Router } from '@kbn/core-http-router-server-internal'; -import { InternalContextSetup, InternalContextPreboot } from '../context'; import { CspConfigType, cspConfig } from './csp'; - -import { Router } from './router'; import { HttpConfig, HttpConfigType, config as httpConfig } from './http_config'; import { HttpServer } from './http_server'; import { HttpsRedirectServer } from './https_redirect_server'; - import { InternalHttpServicePreboot, InternalHttpServiceSetup, InternalHttpServiceStart, } from './types'; - import { registerCoreHandlers } from './lifecycle_handlers'; import { ExternalUrlConfigType, externalUrlConfig, ExternalUrlConfig } from './external_url'; diff --git a/src/core/server/http/https_redirect_server.test.ts b/packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts similarity index 100% rename from src/core/server/http/https_redirect_server.test.ts rename to packages/core/http/core-http-server-internal/src/https_redirect_server.test.ts diff --git a/src/core/server/http/https_redirect_server.ts b/packages/core/http/core-http-server-internal/src/https_redirect_server.ts similarity index 100% rename from src/core/server/http/https_redirect_server.ts rename to packages/core/http/core-http-server-internal/src/https_redirect_server.ts diff --git a/src/core/server/http/index.ts b/packages/core/http/core-http-server-internal/src/index.ts similarity index 80% rename from src/core/server/http/index.ts rename to packages/core/http/core-http-server-internal/src/index.ts index 4e4f7938c12115..0c0abe4c989e5c 100644 --- a/src/core/server/http/index.ts +++ b/packages/core/http/core-http-server-internal/src/index.ts @@ -9,7 +9,8 @@ export { config, HttpConfig } from './http_config'; export type { HttpConfigType } from './http_config'; export { HttpService } from './http_service'; -export { isKibanaRequest, isRealRequest, CoreKibanaRequest, kibanaResponseFactory } from './router'; +export { HttpServer } from './http_server'; +export type { HttpServerSetup, LifecycleRegistrar } from './http_server'; export type { InternalHttpServicePreboot, InternalHttpServiceSetup, @@ -20,3 +21,5 @@ export { BasePath } from './base_path_service'; export { cspConfig, CspConfig } from './csp'; export { externalUrlConfig, ExternalUrlConfig } from './external_url'; + +export { createCookieSessionStorageFactory } from './cookie_session_storage'; diff --git a/src/core/server/http/lifecycle/auth.ts b/packages/core/http/core-http-server-internal/src/lifecycle/auth.ts similarity index 96% rename from src/core/server/http/lifecycle/auth.ts rename to packages/core/http/core-http-server-internal/src/lifecycle/auth.ts index 6e6e4958904e18..b31c1805604d1b 100644 --- a/src/core/server/http/lifecycle/auth.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle/auth.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { Lifecycle, Request, ResponseToolkit } from '@hapi/hapi'; +import type { Lifecycle, Request, ResponseToolkit } from '@hapi/hapi'; import type { Logger } from '@kbn/logging'; import type { AuthenticationHandler, @@ -24,7 +24,7 @@ import { CoreKibanaRequest, lifecycleResponseFactory, isKibanaResponse, -} from '../router'; +} from '@kbn/core-http-router-server-internal'; const authResult = { authenticated(data: AuthResultParams = {}): AuthResult { diff --git a/src/core/server/http/lifecycle/on_post_auth.ts b/packages/core/http/core-http-server-internal/src/lifecycle/on_post_auth.ts similarity index 97% rename from src/core/server/http/lifecycle/on_post_auth.ts rename to packages/core/http/core-http-server-internal/src/lifecycle/on_post_auth.ts index ff594aad9e827f..22ef9db2bab08a 100644 --- a/src/core/server/http/lifecycle/on_post_auth.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle/on_post_auth.ts @@ -20,7 +20,7 @@ import { CoreKibanaRequest, lifecycleResponseFactory, isKibanaResponse, -} from '../router'; +} from '@kbn/core-http-router-server-internal'; const postAuthResult = { next(): OnPostAuthResult { diff --git a/src/core/server/http/lifecycle/on_pre_auth.ts b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_auth.ts similarity index 97% rename from src/core/server/http/lifecycle/on_pre_auth.ts rename to packages/core/http/core-http-server-internal/src/lifecycle/on_pre_auth.ts index eda8034677192e..67c12ca5701912 100644 --- a/src/core/server/http/lifecycle/on_pre_auth.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_auth.ts @@ -20,7 +20,7 @@ import { CoreKibanaRequest, isKibanaResponse, lifecycleResponseFactory, -} from '../router'; +} from '@kbn/core-http-router-server-internal'; const preAuthResult = { next(): OnPreAuthResult { diff --git a/src/core/server/http/lifecycle/on_pre_response.ts b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_response.ts similarity index 98% rename from src/core/server/http/lifecycle/on_pre_response.ts rename to packages/core/http/core-http-server-internal/src/lifecycle/on_pre_response.ts index f5a473205284f5..3a59d116a031da 100644 --- a/src/core/server/http/lifecycle/on_pre_response.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_response.ts @@ -25,7 +25,7 @@ import type { OnPreResponseHandler, } from '@kbn/core-http-server'; import { OnPreResponseResultType } from '@kbn/core-http-server'; -import { HapiResponseAdapter, CoreKibanaRequest } from '../router'; +import { HapiResponseAdapter, CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; const preResponseResult = { render(responseRender: OnPreResponseRender): OnPreResponseResult { diff --git a/src/core/server/http/lifecycle/on_pre_routing.ts b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_routing.ts similarity index 98% rename from src/core/server/http/lifecycle/on_pre_routing.ts rename to packages/core/http/core-http-server-internal/src/lifecycle/on_pre_routing.ts index d5e16989cc8332..36be4a61cc381f 100644 --- a/src/core/server/http/lifecycle/on_pre_routing.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle/on_pre_routing.ts @@ -22,7 +22,7 @@ import { CoreKibanaRequest, isKibanaResponse, lifecycleResponseFactory, -} from '../router'; +} from '@kbn/core-http-router-server-internal'; const preRoutingResult = { next(): OnPreRoutingResult { diff --git a/src/core/server/http/lifecycle_handlers.test.ts b/packages/core/http/core-http-server-internal/src/lifecycle_handlers.test.ts similarity index 90% rename from src/core/server/http/lifecycle_handlers.test.ts rename to packages/core/http/core-http-server-internal/src/lifecycle_handlers.test.ts index 2f2cac972c57a3..6fa2ef18353b62 100644 --- a/src/core/server/http/lifecycle_handlers.test.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle_handlers.test.ts @@ -6,17 +6,34 @@ * Side Public License, v 1. */ -import type { KibanaRequest, RouteMethod, KibanaRouteOptions } from '@kbn/core-http-server'; +import type { + KibanaRequest, + RouteMethod, + KibanaRouteOptions, + OnPreResponseToolkit, + OnPostAuthToolkit, + OnPreRoutingToolkit, +} from '@kbn/core-http-server'; +import { mockRouter } from '@kbn/core-http-router-server-mocks'; import { createCustomHeadersPreResponseHandler, createVersionCheckPostAuthHandler, createXsrfPostAuthHandler, } from './lifecycle_handlers'; -import { httpServerMock } from './http_server.mocks'; import { HttpConfig } from './http_config'; +type ToolkitMock = jest.Mocked; + const createConfig = (partial: Partial): HttpConfig => partial as HttpConfig; +const createToolkit = (): ToolkitMock => { + return { + render: jest.fn(), + next: jest.fn(), + rewriteUrl: jest.fn(), + }; +}; + const forgeRequest = ({ headers = {}, path = '/', @@ -28,7 +45,7 @@ const forgeRequest = ({ method: RouteMethod; kibanaRouteOptions: KibanaRouteOptions; }>): KibanaRequest => { - return httpServerMock.createKibanaRequest({ + return mockRouter.createKibanaRequest({ headers, path, method, @@ -37,12 +54,12 @@ const forgeRequest = ({ }; describe('xsrf post-auth handler', () => { - let toolkit: ReturnType; - let responseFactory: ReturnType; + let toolkit: ToolkitMock; + let responseFactory: ReturnType; beforeEach(() => { - toolkit = httpServerMock.createToolkit(); - responseFactory = httpServerMock.createLifecycleResponseFactory(); + toolkit = createToolkit(); + responseFactory = mockRouter.createResponseFactory(); }); describe('non destructive methods', () => { @@ -165,12 +182,12 @@ describe('xsrf post-auth handler', () => { }); describe('versionCheck post-auth handler', () => { - let toolkit: ReturnType; - let responseFactory: ReturnType; + let toolkit: ToolkitMock; + let responseFactory: ReturnType; beforeEach(() => { - toolkit = httpServerMock.createToolkit(); - responseFactory = httpServerMock.createLifecycleResponseFactory(); + toolkit = createToolkit(); + responseFactory = mockRouter.createResponseFactory(); }); it('forward the request to the next interceptor if header matches', () => { @@ -225,10 +242,10 @@ describe('versionCheck post-auth handler', () => { }); describe('customHeaders pre-response handler', () => { - let toolkit: ReturnType; + let toolkit: ToolkitMock; beforeEach(() => { - toolkit = httpServerMock.createToolkit(); + toolkit = createToolkit(); }); it('adds the kbn-name header to the response', () => { diff --git a/src/core/server/http/lifecycle_handlers.ts b/packages/core/http/core-http-server-internal/src/lifecycle_handlers.ts similarity index 97% rename from src/core/server/http/lifecycle_handlers.ts rename to packages/core/http/core-http-server-internal/src/lifecycle_handlers.ts index b82914b9b985ce..11e034a56914bc 100644 --- a/src/core/server/http/lifecycle_handlers.ts +++ b/packages/core/http/core-http-server-internal/src/lifecycle_handlers.ts @@ -8,8 +8,8 @@ import { Env } from '@kbn/config'; import type { OnPostAuthHandler, OnPreResponseHandler } from '@kbn/core-http-server'; +import { isSafeMethod } from '@kbn/core-http-router-server-internal'; import { HttpConfig } from './http_config'; -import { isSafeMethod } from './router'; import { LifecycleRegistrar } from './http_server'; const VERSION_HEADER = 'kbn-version'; diff --git a/src/core/server/http/logging/get_payload_size.test.ts b/packages/core/http/core-http-server-internal/src/logging/get_payload_size.test.ts similarity index 100% rename from src/core/server/http/logging/get_payload_size.test.ts rename to packages/core/http/core-http-server-internal/src/logging/get_payload_size.test.ts diff --git a/src/core/server/http/logging/get_payload_size.ts b/packages/core/http/core-http-server-internal/src/logging/get_payload_size.ts similarity index 100% rename from src/core/server/http/logging/get_payload_size.ts rename to packages/core/http/core-http-server-internal/src/logging/get_payload_size.ts diff --git a/src/core/server/http/logging/get_response_log.test.ts b/packages/core/http/core-http-server-internal/src/logging/get_response_log.test.ts similarity index 92% rename from src/core/server/http/logging/get_response_log.test.ts rename to packages/core/http/core-http-server-internal/src/logging/get_response_log.test.ts index 386bf2a263934a..a8f607c5c6865d 100644 --- a/src/core/server/http/logging/get_response_log.test.ts +++ b/packages/core/http/core-http-server-internal/src/logging/get_response_log.test.ts @@ -189,6 +189,28 @@ describe('getEcsResponseLog', () => { `); }); + test('redacts x-elastic-app-auth headers by default', () => { + const req = createMockHapiRequest({ + headers: { 'x-elastic-app-auth': 'hello', 'user-agent': 'world' }, + response: { headers: { 'content-length': '123', 'x-elastic-app-auth': 'abc' } }, + }); + const result = getEcsResponseLog(req, logger); + // @ts-expect-error ECS custom field + expect(result.meta.http.request.headers).toMatchInlineSnapshot(` + Object { + "user-agent": "world", + "x-elastic-app-auth": "[REDACTED]", + } + `); + // @ts-expect-error ECS custom field + expect(result.meta.http.response.headers).toMatchInlineSnapshot(` + Object { + "content-length": "123", + "x-elastic-app-auth": "[REDACTED]", + } + `); + }); + test('does not mutate original headers', () => { const reqHeaders = { a: 'foo', b: ['hello', 'world'] }; const resHeaders = { headers: { c: 'bar' } }; diff --git a/src/core/server/http/logging/get_response_log.ts b/packages/core/http/core-http-server-internal/src/logging/get_response_log.ts similarity index 95% rename from src/core/server/http/logging/get_response_log.ts rename to packages/core/http/core-http-server-internal/src/logging/get_response_log.ts index 711c4bc1e58c95..f356bf077095a7 100644 --- a/src/core/server/http/logging/get_response_log.ts +++ b/packages/core/http/core-http-server-internal/src/logging/get_response_log.ts @@ -14,7 +14,9 @@ import type { LogMeta, Logger } from '@kbn/logging'; import type { KibanaRequestState } from '@kbn/core-http-server'; import { getResponsePayloadBytes } from './get_payload_size'; -const FORBIDDEN_HEADERS = ['authorization', 'cookie', 'set-cookie']; +// If you are updating these, consider whether they should also be updated in the +// elasticsearch service `getEcsResponseLog` +const FORBIDDEN_HEADERS = ['authorization', 'cookie', 'set-cookie', 'x-elastic-app-auth']; const REDACTED_HEADER_TEXT = '[REDACTED]'; type HapiHeaders = Record; diff --git a/src/core/server/http/logging/index.ts b/packages/core/http/core-http-server-internal/src/logging/index.ts similarity index 100% rename from src/core/server/http/logging/index.ts rename to packages/core/http/core-http-server-internal/src/logging/index.ts diff --git a/src/core/server/http/security_response_headers_config.test.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts similarity index 100% rename from src/core/server/http/security_response_headers_config.test.ts rename to packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts diff --git a/src/core/server/http/security_response_headers_config.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts similarity index 100% rename from src/core/server/http/security_response_headers_config.ts rename to packages/core/http/core-http-server-internal/src/security_response_headers_config.ts diff --git a/src/core/server/http/types.ts b/packages/core/http/core-http-server-internal/src/types.ts similarity index 100% rename from src/core/server/http/types.ts rename to packages/core/http/core-http-server-internal/src/types.ts diff --git a/packages/core/http/core-http-server-internal/tsconfig.json b/packages/core/http/core-http-server-internal/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/http/core-http-server-mocks/BUILD.bazel b/packages/core/http/core-http-server-mocks/BUILD.bazel new file mode 100644 index 00000000000000..f3408be31eb1df --- /dev/null +++ b/packages/core/http/core-http-server-mocks/BUILD.bazel @@ -0,0 +1,119 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-http-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-http-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "@npm//moment", + "//packages/kbn-hapi-mocks", + "//packages/kbn-config-schema", + "//packages/kbn-config-mocks", + "//packages/core/logging/core-logging-server-mocks", + "//packages/core/http/core-http-router-server-mocks", + "//packages/core/http/core-http-router-server-internal", + "//packages/core/http/core-http-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "@npm//moment", + "@npm//@hapi/hapi", + "@npm//@types/hapi__hapi", + "//packages/kbn-utility-types:npm_module_types", + "//packages/kbn-config-mocks:npm_module_types", + "//packages/kbn-config-schema:npm_module_types", + "//packages/kbn-hapi-mocks:npm_module_types", + "//packages/core/logging/core-logging-server-mocks:npm_module_types", + "//packages/core/http/core-http-server:npm_module_types", + "//packages/core/http/core-http-router-server-mocks:npm_module_types", + "//packages/core/http/core-http-router-server-internal:npm_module_types", + "//packages/core/http/core-http-server-internal:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/http/core-http-server-mocks/README.md b/packages/core/http/core-http-server-mocks/README.md new file mode 100644 index 00000000000000..917bc9395db618 --- /dev/null +++ b/packages/core/http/core-http-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-http-server-mocks + +This package contains the mocks and test utils for core's server-side `http` service diff --git a/packages/core/http/core-http-server-mocks/jest.config.js b/packages/core/http/core-http-server-mocks/jest.config.js new file mode 100644 index 00000000000000..4f088fda9ea9af --- /dev/null +++ b/packages/core/http/core-http-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/http/core-http-server-mocks'], +}; diff --git a/packages/core/http/core-http-server-mocks/package.json b/packages/core/http/core-http-server-mocks/package.json new file mode 100644 index 00000000000000..d6757d779dfd62 --- /dev/null +++ b/packages/core/http/core-http-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-http-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/http/cookie_session_storage.mocks.ts b/packages/core/http/core-http-server-mocks/src/cookie_session_storage.mocks.ts similarity index 100% rename from src/core/server/http/cookie_session_storage.mocks.ts rename to packages/core/http/core-http-server-mocks/src/cookie_session_storage.mocks.ts diff --git a/src/core/server/http/http_server.mocks.ts b/packages/core/http/core-http-server-mocks/src/http_server.mocks.ts similarity index 95% rename from src/core/server/http/http_server.mocks.ts rename to packages/core/http/core-http-server-mocks/src/http_server.mocks.ts index e56535b94482c2..8e7d5543e35eb5 100644 --- a/src/core/server/http/http_server.mocks.ts +++ b/packages/core/http/core-http-server-mocks/src/http_server.mocks.ts @@ -13,7 +13,7 @@ import type { OnPostAuthToolkit, OnPreRoutingToolkit, } from '@kbn/core-http-server'; -import { mockRouter } from './router/router.mock'; +import { mockRouter } from '@kbn/core-http-router-server-mocks'; const createLifecycleResponseFactoryMock = (): jest.Mocked => ({ redirected: jest.fn(), diff --git a/src/core/server/http/http_service.mock.ts b/packages/core/http/core-http-server-mocks/src/http_service.mock.ts similarity index 97% rename from src/core/server/http/http_service.mock.ts rename to packages/core/http/core-http-server-mocks/src/http_service.mock.ts index 5ef94cff3110a0..ec90929a0dc6f9 100644 --- a/src/core/server/http/http_service.mock.ts +++ b/packages/core/http/core-http-server-mocks/src/http_service.mock.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { Server } from '@hapi/hapi'; +import type { Server } from '@hapi/hapi'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { configMock } from '@kbn/config-mocks'; import type { @@ -22,17 +22,16 @@ import type { HttpServiceStart, } from '@kbn/core-http-server'; import { AuthStatus } from '@kbn/core-http-server'; +import { mockRouter, RouterMock } from '@kbn/core-http-router-server-mocks'; -import { CspConfig } from './csp'; -import { mockRouter, RouterMock } from './router/router.mock'; -import { +import { CspConfig, ExternalUrlConfig } from '@kbn/core-http-server-internal'; +import type { + HttpService, InternalHttpServicePreboot, InternalHttpServiceSetup, InternalHttpServiceStart, -} from './types'; -import { HttpService } from './http_service'; +} from '@kbn/core-http-server-internal'; import { sessionStorageMock } from './cookie_session_storage.mocks'; -import { ExternalUrlConfig } from './external_url'; type BasePathMocked = jest.Mocked; type AuthMocked = jest.Mocked; diff --git a/packages/core/http/core-http-server-mocks/src/index.ts b/packages/core/http/core-http-server-mocks/src/index.ts new file mode 100644 index 00000000000000..ca4e44d1c3e8d8 --- /dev/null +++ b/packages/core/http/core-http-server-mocks/src/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { sessionStorageMock } from './cookie_session_storage.mocks'; +export { httpServerMock } from './http_server.mocks'; +export { httpServiceMock } from './http_service.mock'; +export type { + HttpServicePrebootMock, + HttpServiceSetupMock, + HttpServiceStartMock, + InternalHttpServicePrebootMock, + InternalHttpServiceSetupMock, + InternalHttpServiceStartMock, +} from './http_service.mock'; +export { createCoreContext, createHttpServer } from './test_utils'; diff --git a/packages/core/http/core-http-server-mocks/src/test_utils.ts b/packages/core/http/core-http-server-mocks/src/test_utils.ts new file mode 100644 index 00000000000000..2b9658693dce76 --- /dev/null +++ b/packages/core/http/core-http-server-mocks/src/test_utils.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { BehaviorSubject } from 'rxjs'; +import moment from 'moment'; +import { REPO_ROOT } from '@kbn/utils'; +import { ByteSizeValue } from '@kbn/config-schema'; +import { Env } from '@kbn/config'; +import { getEnvOptions, configServiceMock } from '@kbn/config-mocks'; +import type { CoreContext } from '@kbn/core-base-server-internal'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { HttpService } from '@kbn/core-http-server-internal'; + +const coreId = Symbol('core'); +const env = Env.createDefault(REPO_ROOT, getEnvOptions()); + +const logger = loggingSystemMock.create(); + +const createConfigService = () => { + const configService = configServiceMock.create(); + configService.atPath.mockImplementation((path) => { + if (path === 'server') { + return new BehaviorSubject({ + hosts: ['localhost'], + maxPayload: new ByteSizeValue(1024), + autoListen: true, + ssl: { + enabled: false, + }, + cors: { + enabled: false, + }, + compression: { enabled: true }, + xsrf: { + disableProtection: true, + allowlist: [], + }, + securityResponseHeaders: {}, + customResponseHeaders: {}, + requestId: { + allowFromAnyIp: true, + ipAllowlist: [], + }, + shutdownTimeout: moment.duration(30, 'seconds'), + keepaliveTimeout: 120_000, + socketTimeout: 120_000, + } as any); + } + if (path === 'externalUrl') { + return new BehaviorSubject({ + policy: [], + } as any); + } + if (path === 'csp') { + return new BehaviorSubject({ + strict: false, + disableEmbedding: false, + warnLegacyBrowsers: true, + }); + } + throw new Error(`Unexpected config path: ${path}`); + }); + return configService; +}; + +const createDefaultContext = (): CoreContext => { + return { + coreId, + env, + logger, + configService: createConfigService(), + }; +}; + +export const createCoreContext = (overrides: Partial = {}): CoreContext => ({ + ...createDefaultContext(), + ...overrides, +}); + +/** + * Creates a concrete HttpServer with a mocked context. + */ +export const createHttpServer = (overrides: Partial = {}): HttpService => { + return new HttpService(createCoreContext(overrides)); +}; diff --git a/packages/core/http/core-http-server-mocks/tsconfig.json b/packages/core/http/core-http-server-mocks/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/http/core-http-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/logging/core-logging-server-internal/BUILD.bazel b/packages/core/logging/core-logging-server-internal/BUILD.bazel index ea2e1e1550bdfa..d5afc20b5e40ad 100644 --- a/packages/core/logging/core-logging-server-internal/BUILD.bazel +++ b/packages/core/logging/core-logging-server-internal/BUILD.bazel @@ -31,6 +31,7 @@ RUNTIME_DEPS = [ "@npm//elastic-apm-node", "//packages/elastic-safer-lodash-set", "//packages/kbn-config-schema", + "//packages/kbn-std", ] TYPES_DEPS = [ diff --git a/packages/core/logging/core-logging-server-internal/src/global_context/index.ts b/packages/core/logging/core-logging-server-internal/src/global_context/index.ts new file mode 100644 index 00000000000000..e7a8a0be56c8ed --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/global_context/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { mergeGlobalContext } from './merge_global_context'; +export type { GlobalContext } from './types'; diff --git a/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.test.ts b/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.test.ts new file mode 100644 index 00000000000000..63840d3ab3fbcb --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.test.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { LogMeta } from '@kbn/logging'; +import { GlobalContext } from './types'; +import { mergeGlobalContext } from './merge_global_context'; + +describe('mergeGlobalContext', () => { + test('inserts global meta in entry meta', () => { + const context: GlobalContext = { + bar: false, + }; + const meta: LogMeta = { + // @ts-expect-error Custom ECS field + foo: true, + }; + + expect(mergeGlobalContext(context, meta)).toEqual({ + foo: true, + bar: false, + }); + }); + + test('handles nested context', () => { + const context: GlobalContext = { + 'bar.baz': false, + }; + const meta: LogMeta = { + // @ts-expect-error Custom ECS field + foo: true, + }; + + expect(mergeGlobalContext(context, meta)).toEqual({ + foo: true, + bar: { baz: false }, + }); + }); + + test('does not overwrite meta with global context if the path already exists', () => { + const context: GlobalContext = { + foo: false, + bar: [false], + }; + const meta: LogMeta = { + // @ts-expect-error Custom ECS field + foo: true, + bar: [true], + }; + + expect(mergeGlobalContext(context, meta)).toEqual({ + foo: true, + bar: [true], + }); + }); + + test('if conflicting entries exist in the context, the most specific entry wins', () => { + const context: GlobalContext = { + 'a.b.c': 'd', + 'a.b': 'c', + }; + + // Note that this "most specific entry wins" behavior should not happen in practice, + // as the `LoggingSystem` is handling deconfliction of paths before anything is + // provided to the `LoggerAdapter` in the first place. Including this test just to + // ensure the actual behavior of this function is documented for posterity. + expect(mergeGlobalContext(context)).toEqual({ + a: { b: { c: 'd' } }, + }); + }); + + test('does nothing if no global meta has been set', () => { + const context: GlobalContext = {}; + const meta: LogMeta = { + // @ts-expect-error Custom ECS field + foo: true, + }; + + expect(mergeGlobalContext(context, meta)).toEqual({ + foo: true, + }); + }); + + test('adds global meta even if no user-provided meta exists', () => { + const context: GlobalContext = { + foo: true, + }; + + expect(mergeGlobalContext(context)).toEqual({ + foo: true, + }); + }); + + test('does nothing if no global meta or user-provided meta has been set', () => { + const context: GlobalContext = {}; + + expect(mergeGlobalContext(context)).toBeUndefined(); + }); +}); diff --git a/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.ts b/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.ts new file mode 100644 index 00000000000000..64186392caa565 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/global_context/merge_global_context.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { has } from 'lodash'; +import { set } from '@elastic/safer-lodash-set'; +import { LogMeta } from '@kbn/logging'; +import { GlobalContext } from './types'; + +/** + * Takes a flattened object of {@link GlobalContext} and applies it to the + * provided {@link LogMeta}. + * + * @remarks + * The provided `LogMeta` takes precedence over the `GlobalContext`; + * if duplicate keys are found, the `GlobalContext` will be overridden. + * + * @example + * ```ts + * const meta: LogMeta = { + * a: { b: false }, + * d: 'hi', + * }; + * const context: GlobalContext = { + * 'a.b': true, + * c: [1, 2, 3], + * }; + * + * mergeGlobalContext(context, meta); + * // { + * // a: { b: false }, + * // c: [1, 2, 3], + * // d: 'hi', + * // } + * ``` + * + * @internal + */ +export function mergeGlobalContext(globalContext: GlobalContext, meta?: LogMeta) { + if (!meta && Object.keys(globalContext).length === 0) { + return; + } + + const mergedMeta = meta ?? {}; + for (const [path, data] of Object.entries(globalContext)) { + if (!has(mergedMeta, path)) { + set(mergedMeta, path, data); + } + } + + return mergedMeta; +} diff --git a/packages/core/logging/core-logging-server-internal/src/global_context/types.ts b/packages/core/logging/core-logging-server-internal/src/global_context/types.ts new file mode 100644 index 00000000000000..bb377aa14e3906 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/global_context/types.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * A flattened object containing lodash-style dot-separated keys, which + * indicate the path to where each corresponding value should live in a + * nested object. + * + * @remarks + * Arrays are treated as primitives here: array entries should not be broken + * down into separate keys. + * + * @example + * ```ts + * const context: GlobalContext = { + * a: true, + * 'b.c': [1, 2, 3], + * 'd.e.f': 'g', + * }; + * ``` + * + * @internal + */ +export type GlobalContext = Record; diff --git a/packages/core/logging/core-logging-server-internal/src/logger_adapter.test.ts b/packages/core/logging/core-logging-server-internal/src/logger_adapter.test.ts index c7be02e5c0a988..28f747ef3fcf66 100644 --- a/packages/core/logging/core-logging-server-internal/src/logger_adapter.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/logger_adapter.test.ts @@ -7,84 +7,172 @@ */ import type { Logger } from '@kbn/logging'; +import { loggerMock } from '@kbn/logging-mocks'; import { LoggerAdapter } from './logger_adapter'; -test('proxies all method calls to the internal logger.', () => { - const internalLogger: Logger = { - debug: jest.fn(), - error: jest.fn(), - fatal: jest.fn(), - info: jest.fn(), - log: jest.fn(), - trace: jest.fn(), - warn: jest.fn(), - get: jest.fn(), - }; - - const adapter = new LoggerAdapter(internalLogger); - - adapter.trace('trace-message'); - expect(internalLogger.trace).toHaveBeenCalledTimes(1); - expect(internalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); - - adapter.debug('debug-message'); - expect(internalLogger.debug).toHaveBeenCalledTimes(1); - expect(internalLogger.debug).toHaveBeenCalledWith('debug-message', undefined); - - adapter.info('info-message'); - expect(internalLogger.info).toHaveBeenCalledTimes(1); - expect(internalLogger.info).toHaveBeenCalledWith('info-message', undefined); - - adapter.warn('warn-message'); - expect(internalLogger.warn).toHaveBeenCalledTimes(1); - expect(internalLogger.warn).toHaveBeenCalledWith('warn-message', undefined); - - adapter.error('error-message'); - expect(internalLogger.error).toHaveBeenCalledTimes(1); - expect(internalLogger.error).toHaveBeenCalledWith('error-message', undefined); - - adapter.fatal('fatal-message'); - expect(internalLogger.fatal).toHaveBeenCalledTimes(1); - expect(internalLogger.fatal).toHaveBeenCalledWith('fatal-message', undefined); - - adapter.get('context'); - expect(internalLogger.get).toHaveBeenCalledTimes(1); - expect(internalLogger.get).toHaveBeenCalledWith('context'); -}); +describe('LoggerAdapter', () => { + let internalLogger: Logger; + + beforeEach(() => { + internalLogger = loggerMock.create(); + }); + + test('proxies all method calls to the internal logger.', () => { + const adapter = new LoggerAdapter(internalLogger); + + adapter.trace('trace-message'); + expect(internalLogger.trace).toHaveBeenCalledTimes(1); + expect(internalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); + + adapter.debug('debug-message'); + expect(internalLogger.debug).toHaveBeenCalledTimes(1); + expect(internalLogger.debug).toHaveBeenCalledWith('debug-message', undefined); + + adapter.info('info-message'); + expect(internalLogger.info).toHaveBeenCalledTimes(1); + expect(internalLogger.info).toHaveBeenCalledWith('info-message', undefined); + + adapter.warn('warn-message'); + expect(internalLogger.warn).toHaveBeenCalledTimes(1); + expect(internalLogger.warn).toHaveBeenCalledWith('warn-message', undefined); + + adapter.error('error-message'); + expect(internalLogger.error).toHaveBeenCalledTimes(1); + expect(internalLogger.error).toHaveBeenCalledWith('error-message', undefined); + + adapter.fatal('fatal-message'); + expect(internalLogger.fatal).toHaveBeenCalledTimes(1); + expect(internalLogger.fatal).toHaveBeenCalledWith('fatal-message', undefined); + + adapter.get('context'); + expect(internalLogger.get).toHaveBeenCalledTimes(1); + expect(internalLogger.get).toHaveBeenCalledWith('context'); + }); + + test('forwards all method calls to new internal logger if it is updated.', () => { + const newInternalLogger = loggerMock.create(); + + const adapter = new LoggerAdapter(internalLogger); + + adapter.trace('trace-message'); + expect(internalLogger.trace).toHaveBeenCalledTimes(1); + expect(internalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); + (internalLogger.trace as jest.Mock<() => void>).mockReset(); + + adapter.updateLogger(newInternalLogger); + adapter.trace('trace-message'); + expect(internalLogger.trace).not.toHaveBeenCalled(); + expect(newInternalLogger.trace).toHaveBeenCalledTimes(1); + expect(newInternalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); + }); + + describe('global context', () => { + ['trace', 'debug', 'info', 'warn', 'error', 'fatal'].forEach((method) => { + test(`inserts global context in ${method} entries`, () => { + const adapter = new LoggerAdapter(internalLogger, { 'a.b.c': `${method}: d` }); + + // @ts-expect-error Custom ECS field + adapter[method](`new ${method} message`, { hello: 'world' }); + expect(internalLogger[method as keyof Logger]).toHaveBeenCalledTimes(1); + expect(internalLogger[method as keyof Logger]).toHaveBeenCalledWith( + `new ${method} message`, + { + hello: 'world', + a: { b: { c: `${method}: d` } }, + } + ); + + adapter.updateGlobalContext({ e: true }); + + // @ts-expect-error Custom ECS field + adapter[method](`another new ${method} message`, { hello: 'world' }); + expect(internalLogger[method as keyof Logger]).toHaveBeenCalledTimes(2); + expect(internalLogger[method as keyof Logger]).toHaveBeenCalledWith( + `another new ${method} message`, + { + hello: 'world', + e: true, + } + ); + }); + }); + + test('inserts global meta in log entries', () => { + const adapter = new LoggerAdapter(internalLogger, { 'a.b.c': 'd' }); + + adapter.log({ + message: 'message', + meta: { + // @ts-expect-error Custom ECS field + hello: 'world', + }, + }); + expect(internalLogger.log).toHaveBeenCalledTimes(1); + expect(internalLogger.log).toHaveBeenCalledWith({ + message: 'message', + meta: { + hello: 'world', + a: { b: { c: 'd' } }, + }, + }); + + adapter.updateGlobalContext({ e: true }); + + adapter.log({ + message: 'another message', + meta: { + // @ts-expect-error Custom ECS field + hello: 'world', + }, + }); + expect(internalLogger.log).toHaveBeenCalledTimes(2); + expect(internalLogger.log).toHaveBeenCalledWith({ + message: 'another message', + meta: { + hello: 'world', + e: true, + }, + }); + }); + + test('does not overwrite user-provided meta with global meta if the path already exists', () => { + const adapter = new LoggerAdapter(internalLogger, { hello: 'there' }); + + // @ts-expect-error Custom ECS field + adapter.info('message', { hello: 'world' }); + expect(internalLogger.info).toHaveBeenCalledTimes(1); + expect(internalLogger.info).toHaveBeenCalledWith('message', { + hello: 'world', + }); + }); + + test('does nothing if no global meta has been set', () => { + const adapter = new LoggerAdapter(internalLogger); + + // @ts-expect-error Custom ECS field + adapter.info('message', { hello: 'world' }); + expect(internalLogger.info).toHaveBeenCalledTimes(1); + expect(internalLogger.info).toHaveBeenCalledWith('message', { + hello: 'world', + }); + }); + + test('adds global meta even if no user-provided meta exists', () => { + const adapter = new LoggerAdapter(internalLogger, { hello: 'there' }); + + adapter.info('message'); + expect(internalLogger.info).toHaveBeenCalledTimes(1); + expect(internalLogger.info).toHaveBeenCalledWith('message', { + hello: 'there', + }); + }); + + test('does nothing if no global meta or user-provided meta has been set', () => { + const adapter = new LoggerAdapter(internalLogger); -test('forwards all method calls to new internal logger if it is updated.', () => { - const oldInternalLogger: Logger = { - debug: jest.fn(), - error: jest.fn(), - fatal: jest.fn(), - info: jest.fn(), - log: jest.fn(), - trace: jest.fn(), - warn: jest.fn(), - get: jest.fn(), - }; - - const newInternalLogger: Logger = { - debug: jest.fn(), - error: jest.fn(), - fatal: jest.fn(), - info: jest.fn(), - log: jest.fn(), - trace: jest.fn(), - warn: jest.fn(), - get: jest.fn(), - }; - - const adapter = new LoggerAdapter(oldInternalLogger); - - adapter.trace('trace-message'); - expect(oldInternalLogger.trace).toHaveBeenCalledTimes(1); - expect(oldInternalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); - (oldInternalLogger.trace as jest.Mock<() => void>).mockReset(); - - adapter.updateLogger(newInternalLogger); - adapter.trace('trace-message'); - expect(oldInternalLogger.trace).not.toHaveBeenCalled(); - expect(newInternalLogger.trace).toHaveBeenCalledTimes(1); - expect(newInternalLogger.trace).toHaveBeenCalledWith('trace-message', undefined); + adapter.info('message'); + expect(internalLogger.info).toHaveBeenCalledTimes(1); + expect(internalLogger.info).toHaveBeenCalledWith('message', undefined); + }); + }); }); diff --git a/packages/core/logging/core-logging-server-internal/src/logger_adapter.ts b/packages/core/logging/core-logging-server-internal/src/logger_adapter.ts index d2a2c7f52923a0..5439fe02057963 100644 --- a/packages/core/logging/core-logging-server-internal/src/logger_adapter.ts +++ b/packages/core/logging/core-logging-server-internal/src/logger_adapter.ts @@ -7,10 +7,11 @@ */ import { LogRecord, Logger, LogMeta } from '@kbn/logging'; +import { GlobalContext, mergeGlobalContext } from './global_context'; /** @internal */ export class LoggerAdapter implements Logger { - constructor(private logger: Logger) {} + constructor(private logger: Logger, private globalContext: GlobalContext = {}) {} /** * The current logger can be updated "on the fly", e.g. when the log config @@ -24,32 +25,44 @@ export class LoggerAdapter implements Logger { this.logger = logger; } + /** + * The current record of {@link GlobalContext} that can be updated on the fly. + * Any updates via this method will be applied to all subsequent log entries. + * + * This is not intended for external use, only internally in Kibana + * + * @internal + */ + public updateGlobalContext(context: GlobalContext) { + this.globalContext = context; + } + public trace(message: string, meta?: LogMeta): void { - this.logger.trace(message, meta); + this.logger.trace(message, mergeGlobalContext(this.globalContext, meta)); } public debug(message: string, meta?: LogMeta): void { - this.logger.debug(message, meta); + this.logger.debug(message, mergeGlobalContext(this.globalContext, meta)); } public info(message: string, meta?: LogMeta): void { - this.logger.info(message, meta); + this.logger.info(message, mergeGlobalContext(this.globalContext, meta)); } public warn(errorOrMessage: string | Error, meta?: LogMeta): void { - this.logger.warn(errorOrMessage, meta); + this.logger.warn(errorOrMessage, mergeGlobalContext(this.globalContext, meta)); } public error(errorOrMessage: string | Error, meta?: LogMeta): void { - this.logger.error(errorOrMessage, meta); + this.logger.error(errorOrMessage, mergeGlobalContext(this.globalContext, meta)); } public fatal(errorOrMessage: string | Error, meta?: LogMeta): void { - this.logger.fatal(errorOrMessage, meta); + this.logger.fatal(errorOrMessage, mergeGlobalContext(this.globalContext, meta)); } public log(record: LogRecord) { - this.logger.log(record); + this.logger.log({ ...record, meta: mergeGlobalContext(this.globalContext, record.meta) }); } public get(...contextParts: string[]): Logger { diff --git a/packages/core/logging/core-logging-server-internal/src/logging_service.test.ts b/packages/core/logging/core-logging-server-internal/src/logging_service.test.ts index 965337fca4a312..1e8f7bddbb86b0 100644 --- a/packages/core/logging/core-logging-server-internal/src/logging_service.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/logging_service.test.ts @@ -22,6 +22,7 @@ const createLoggingSystemMock = () => { get: jest.fn().mockImplementation(() => loggerMock.create()), asLoggerFactory: jest.fn().mockImplementation(() => loggerMock.create()), setContextConfig: jest.fn(), + setGlobalContext: jest.fn(), upgrade: jest.fn(), stop: jest.fn(), }; diff --git a/packages/core/logging/core-logging-server-internal/src/logging_system.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/logging_system.test.mocks.ts new file mode 100644 index 00000000000000..abda107ae2144a --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/logging_system.test.mocks.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { merge, getFlattenedObject } from '@kbn/std'; + +export const mockStreamWrite = jest.fn(); +jest.doMock('fs', () => ({ + ...(jest.requireActual('fs') as any), + constants: {}, + createWriteStream: jest.fn(() => ({ write: mockStreamWrite })), +})); + +export const mockGetFlattenedObject = jest.fn().mockImplementation(getFlattenedObject); +jest.doMock('@kbn/std', () => ({ + merge: jest.fn().mockImplementation(merge), + getFlattenedObject: mockGetFlattenedObject, +})); diff --git a/packages/core/logging/core-logging-server-internal/src/logging_system.test.ts b/packages/core/logging/core-logging-server-internal/src/logging_system.test.ts index ebe06326f499df..724319dbfb565b 100644 --- a/packages/core/logging/core-logging-server-internal/src/logging_system.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/logging_system.test.ts @@ -6,12 +6,7 @@ * Side Public License, v 1. */ -const mockStreamWrite = jest.fn(); -jest.mock('fs', () => ({ - ...(jest.requireActual('fs') as any), - constants: {}, - createWriteStream: jest.fn(() => ({ write: mockStreamWrite })), -})); +import { mockStreamWrite, mockGetFlattenedObject } from './logging_system.test.mocks'; const dynamicProps = { process: { pid: expect.any(Number) } }; @@ -34,6 +29,7 @@ afterEach(() => { jest.restoreAllMocks(); mockCreateWriteStream.mockClear(); mockStreamWrite.mockClear(); + mockGetFlattenedObject.mockClear(); }); test('uses default memory buffer logger until config is provided', () => { @@ -521,3 +517,115 @@ test('buffers log records for appenders created during config upgrade', async () await upgradePromise; expect(JSON.parse(mockConsoleLog.mock.calls[0][0]).message).toBe('message to a new context'); }); + +test('setGlobalContext() applies meta to new and existing loggers', async () => { + await system.upgrade( + config.schema.validate({ + appenders: { default: { type: 'console', layout: { type: 'json' } } }, + root: { level: 'info' }, + }) + ); + + const existingLogger = system.get('some-existing-context'); + // @ts-expect-error Custom ECS field + system.setGlobalContext({ a: { b: { c: true } } }); + const newLogger = system.get('some-new-context'); + + existingLogger.info('You know, just for your info.'); + newLogger.info('You know, just for your info.'); + // @ts-expect-error Custom ECS field + existingLogger.warn('You have been warned.', { someMeta: 'goes here' }); + // @ts-expect-error Custom ECS field + newLogger.warn('You have been warned.', { someMeta: 'goes here' }); + + expect(mockConsoleLog).toHaveBeenCalledTimes(4); + expect(JSON.parse(mockConsoleLog.mock.calls[0][0])).toMatchObject({ + log: { logger: 'some-existing-context' }, + message: 'You know, just for your info.', + a: { b: { c: true } }, + }); + expect(JSON.parse(mockConsoleLog.mock.calls[1][0])).toMatchObject({ + log: { logger: 'some-new-context' }, + message: 'You know, just for your info.', + a: { b: { c: true } }, + }); + expect(JSON.parse(mockConsoleLog.mock.calls[2][0])).toMatchObject({ + log: { logger: 'some-existing-context' }, + message: 'You have been warned.', + someMeta: 'goes here', + a: { b: { c: true } }, + }); + expect(JSON.parse(mockConsoleLog.mock.calls[3][0])).toMatchObject({ + log: { logger: 'some-new-context' }, + message: 'You have been warned.', + someMeta: 'goes here', + a: { b: { c: true } }, + }); +}); + +test('new global context always overwrites existing context', async () => { + await system.upgrade( + config.schema.validate({ + appenders: { default: { type: 'console', layout: { type: 'json' } } }, + root: { level: 'info' }, + }) + ); + + const logger = system.get('some-context'); + + // @ts-expect-error Custom ECS field + system.setGlobalContext({ a: { b: { c: true } }, d: false }); + logger.info('You know, just for your info.'); + + // @ts-expect-error Custom ECS field + system.setGlobalContext({ a: false, d: true }); + logger.info('You know, just for your info, again.'); + + expect(mockConsoleLog).toHaveBeenCalledTimes(2); + expect(JSON.parse(mockConsoleLog.mock.calls[0][0])).toMatchObject({ + log: { logger: 'some-context' }, + message: 'You know, just for your info.', + a: { b: { c: true } }, + d: false, + }); + expect(JSON.parse(mockConsoleLog.mock.calls[1][0])).toMatchObject({ + log: { logger: 'some-context' }, + message: 'You know, just for your info, again.', + a: false, + d: true, + }); +}); + +test('flattens global context objects before passing to LoggerAdapter', async () => { + await system.upgrade( + config.schema.validate({ + appenders: { default: { type: 'console', layout: { type: 'json' } } }, + root: { level: 'info' }, + }) + ); + + // @ts-expect-error Custom ECS field + system.setGlobalContext({ a: { b: { c: true } }, d: false }); + + const logger = system.get('some-context'); + + // @ts-expect-error Custom ECS field + system.setGlobalContext({ d: true, e: false }); + + logger.info('You know, just for your info.'); + + expect(mockGetFlattenedObject).toHaveBeenCalledTimes(3); + expect(mockGetFlattenedObject.mock.calls[0][0]).toEqual({ + a: { b: { c: true } }, + d: false, + }); + expect(mockGetFlattenedObject.mock.calls[1][0]).toEqual({ + a: { b: { c: true } }, + d: false, + }); + expect(mockGetFlattenedObject.mock.calls[2][0]).toEqual({ + a: { b: { c: true } }, + d: true, + e: false, + }); +}); diff --git a/packages/core/logging/core-logging-server-internal/src/logging_system.ts b/packages/core/logging/core-logging-server-internal/src/logging_system.ts index a267651ebe55a9..c1bdf384331899 100644 --- a/packages/core/logging/core-logging-server-internal/src/logging_system.ts +++ b/packages/core/logging/core-logging-server-internal/src/logging_system.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { DisposableAppender, LogLevel, Logger, LoggerFactory } from '@kbn/logging'; +import { getFlattenedObject, merge } from '@kbn/std'; +import { DisposableAppender, LogLevel, Logger, LoggerFactory, LogMeta } from '@kbn/logging'; import type { LoggerConfigType, LoggerContextConfigInput } from '@kbn/core-logging-server'; import { Appenders } from './appenders/appenders'; import { BufferAppender } from './appenders/buffer/buffer_appender'; @@ -25,6 +26,7 @@ export interface ILoggingSystem extends LoggerFactory { asLoggerFactory(): LoggerFactory; upgrade(rawConfig?: LoggingConfigType): Promise; setContextConfig(baseContextParts: string[], rawConfig: LoggerContextConfigInput): Promise; + setGlobalContext(meta: Partial): void; stop(): Promise; } @@ -41,13 +43,20 @@ export class LoggingSystem implements ILoggingSystem { private readonly bufferAppender = new BufferAppender(); private readonly loggers: Map = new Map(); private readonly contextConfigs = new Map(); + private globalContext: Partial = {}; constructor() {} public get(...contextParts: string[]): Logger { const context = LoggingConfig.getLoggerContext(contextParts); if (!this.loggers.has(context)) { - this.loggers.set(context, new LoggerAdapter(this.createLogger(context, this.computedConfig))); + this.loggers.set( + context, + new LoggerAdapter( + this.createLogger(context, this.computedConfig), + getFlattenedObject(this.globalContext) + ) + ); } return this.loggers.get(context)!; } @@ -110,6 +119,23 @@ export class LoggingSystem implements ILoggingSystem { } } + /** + * A mechanism for specifying some "global" {@link LogMeta} that we want + * to inject into all log entries. + * + * @remarks + * The provided context will be merged with the meta of each individual log + * entry. In the case of conflicting keys, the global context will always be + * overridden by the log entry. + */ + public setGlobalContext(meta: Partial) { + this.globalContext = merge(this.globalContext, meta); + const flattenedContext = getFlattenedObject(this.globalContext); + for (const loggerAdapter of this.loggers.values()) { + loggerAdapter.updateGlobalContext(flattenedContext); + } + } + /** * Disposes all loggers (closes log files, clears buffers etc.). Service is not usable after * calling of this method until new config is provided via `upgrade` method. diff --git a/packages/core/logging/core-logging-server-mocks/src/logging_system.mock.ts b/packages/core/logging/core-logging-server-mocks/src/logging_system.mock.ts index b486839ddac6a7..ca09498d92640b 100644 --- a/packages/core/logging/core-logging-server-mocks/src/logging_system.mock.ts +++ b/packages/core/logging/core-logging-server-mocks/src/logging_system.mock.ts @@ -23,6 +23,7 @@ const createLoggingSystemMock = () => { get: jest.fn(), asLoggerFactory: jest.fn(), setContextConfig: jest.fn(), + setGlobalContext: jest.fn(), upgrade: jest.fn(), stop: jest.fn(), }; diff --git a/packages/core/node/core-node-server-internal/BUILD.bazel b/packages/core/node/core-node-server-internal/BUILD.bazel index dfbd25fdaeb738..5acec90dbd6370 100644 --- a/packages/core/node/core-node-server-internal/BUILD.bazel +++ b/packages/core/node/core-node-server-internal/BUILD.bazel @@ -39,6 +39,7 @@ TYPES_DEPS = [ "//packages/kbn-config-schema:npm_module_types", "//packages/kbn-logging:npm_module_types", "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/logging/core-logging-server-internal:npm_module_types", "//packages/core/node/core-node-server:npm_module_types", ] diff --git a/packages/core/node/core-node-server-internal/src/node_service.test.ts b/packages/core/node/core-node-server-internal/src/node_service.test.ts index 309535905445fa..a707e8ec1aed81 100644 --- a/packages/core/node/core-node-server-internal/src/node_service.test.ts +++ b/packages/core/node/core-node-server-internal/src/node_service.test.ts @@ -47,7 +47,7 @@ describe('NodeService', () => { coreContext = mockCoreContext.create({ logger, configService }); service = new NodeService(coreContext); - const { roles } = await service.preboot(); + const { roles } = await service.preboot({ loggingSystem: logger }); expect(roles.backgroundTasks).toBe(true); expect(roles.ui).toBe(true); @@ -58,7 +58,7 @@ describe('NodeService', () => { coreContext = mockCoreContext.create({ logger, configService }); service = new NodeService(coreContext); - const { roles } = await service.preboot(); + const { roles } = await service.preboot({ loggingSystem: logger }); expect(roles.backgroundTasks).toBe(true); expect(roles.ui).toBe(false); @@ -69,7 +69,7 @@ describe('NodeService', () => { coreContext = mockCoreContext.create({ logger, configService }); service = new NodeService(coreContext); - const { roles } = await service.preboot(); + const { roles } = await service.preboot({ loggingSystem: logger }); expect(roles.backgroundTasks).toBe(false); expect(roles.ui).toBe(true); @@ -80,7 +80,7 @@ describe('NodeService', () => { coreContext = mockCoreContext.create({ logger, configService }); service = new NodeService(coreContext); - const { roles } = await service.preboot(); + const { roles } = await service.preboot({ loggingSystem: logger }); expect(roles.backgroundTasks).toBe(true); expect(roles.ui).toBe(true); @@ -94,7 +94,7 @@ describe('NodeService', () => { coreContext = mockCoreContext.create({ logger, configService }); service = new NodeService(coreContext); - await service.preboot(); + await service.preboot({ loggingSystem: logger }); expect(logger.get).toHaveBeenCalledTimes(1); expect(logger.get).toHaveBeenCalledWith('node'); @@ -103,5 +103,18 @@ describe('NodeService', () => { `"Kibana process configured with roles: [background_tasks, ui]"` ); }); + + it('sets the node roles in the global context', async () => { + configService = getMockedConfigService({ roles: ['*'] }); + coreContext = mockCoreContext.create({ logger, configService }); + + service = new NodeService(coreContext); + await service.preboot({ loggingSystem: logger }); + + expect(logger.setGlobalContext).toHaveBeenCalledTimes(1); + expect(logger.setGlobalContext).toHaveBeenCalledWith({ + service: { node: { roles: ['background_tasks', 'ui'] } }, + }); + }); }); }); diff --git a/packages/core/node/core-node-server-internal/src/node_service.ts b/packages/core/node/core-node-server-internal/src/node_service.ts index 10006744cf9567..cd73c7f85e6f56 100644 --- a/packages/core/node/core-node-server-internal/src/node_service.ts +++ b/packages/core/node/core-node-server-internal/src/node_service.ts @@ -10,6 +10,7 @@ import { firstValueFrom } from 'rxjs'; import { camelCase } from 'lodash'; import type { IConfigService } from '@kbn/config'; import type { CoreContext } from '@kbn/core-base-server-internal'; +import type { ILoggingSystem } from '@kbn/core-logging-server-internal'; import type { NodeRoles } from '@kbn/core-node-server'; import type { Logger } from '@kbn/logging'; import { @@ -32,6 +33,10 @@ export interface InternalNodeServicePreboot { roles: NodeRoles; } +interface PrebootDeps { + loggingSystem: ILoggingSystem; +} + /** @internal */ export class NodeService { private readonly configService: IConfigService; @@ -42,18 +47,15 @@ export class NodeService { this.log = core.logger.get('node'); } - public async preboot(): Promise { - const nodeRoles = await this.getNodeRoles(); - this.log.info(`Kibana process configured with roles: [${nodeRoles.join(', ')}]`, { - service: { - // @ts-expect-error Field not available in ECS until 8.4 - node: { roles: nodeRoles }, - }, - }); + public async preboot({ loggingSystem }: PrebootDeps): Promise { + const roles = await this.getNodeRoles(); + // @ts-expect-error Custom ECS field + loggingSystem.setGlobalContext({ service: { node: { roles } } }); + this.log.info(`Kibana process configured with roles: [${roles.join(', ')}]`); return { roles: NODE_ACCEPTED_ROLES.reduce((acc, curr) => { - return { ...acc, [camelCase(curr)]: nodeRoles.includes(curr) }; + return { ...acc, [camelCase(curr)]: roles.includes(curr) }; }, {} as NodeRoles), }; } diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/BUILD.bazel b/packages/core/test-helpers/core-test-helpers-http-setup-browser/BUILD.bazel new file mode 100644 index 00000000000000..b802747956bda2 --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/BUILD.bazel @@ -0,0 +1,113 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-test-helpers-http-setup-browser" +PKG_REQUIRE_NAME = "@kbn/core-test-helpers-http-setup-browser" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/core/execution-context/core-execution-context-browser-mocks", + "//packages/core/fatal-errors/core-fatal-errors-browser-mocks", + "//packages/core/injected-metadata/core-injected-metadata-browser-mocks", + "//packages/core/http/core-http-browser-internal" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/core/execution-context/core-execution-context-browser-mocks:npm_module_types", + "//packages/core/fatal-errors/core-fatal-errors-browser-mocks:npm_module_types", + "//packages/core/injected-metadata/core-injected-metadata-browser-mocks:npm_module_types", + "//packages/core/http/core-http-browser-internal:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/README.md b/packages/core/test-helpers/core-test-helpers-http-setup-browser/README.md new file mode 100644 index 00000000000000..f4e1825d67d054 --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/README.md @@ -0,0 +1,3 @@ +# @kbn/core-test-helpers-http-setup-browser + +This package contains Core's browser-side test helpers. diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/jest.config.js b/packages/core/test-helpers/core-test-helpers-http-setup-browser/jest.config.js new file mode 100644 index 00000000000000..06aa6045ec68ba --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/test-helpers/core-test-helpers-http-setup-browser'], +}; diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/package.json b/packages/core/test-helpers/core-test-helpers-http-setup-browser/package.json new file mode 100644 index 00000000000000..b6c321f96c8fc3 --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-test-helpers-http-setup-browser", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/test_helpers/http_test_setup.ts b/packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts similarity index 100% rename from src/core/test_helpers/http_test_setup.ts rename to packages/core/test-helpers/core-test-helpers-http-setup-browser/src/http_test_setup.ts diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/src/index.ts b/packages/core/test-helpers/core-test-helpers-http-setup-browser/src/index.ts new file mode 100644 index 00000000000000..db5c37cc1ecac6 --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/src/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { SetupTap } from './http_test_setup'; +export { setup } from './http_test_setup'; diff --git a/packages/core/test-helpers/core-test-helpers-http-setup-browser/tsconfig.json b/packages/core/test-helpers/core-test-helpers-http-setup-browser/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/test-helpers/core-test-helpers-http-setup-browser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/BUILD.bazel b/packages/core/ui-settings/core-ui-settings-browser-internal/BUILD.bazel new file mode 100644 index 00000000000000..79c90204e03c2e --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/BUILD.bazel @@ -0,0 +1,113 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-ui-settings-browser-internal" +PKG_REQUIRE_NAME = "@kbn/core-ui-settings-browser-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "@npm//lodash", + "//packages/core/test-helpers/core-test-helpers-http-setup-browser" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "@npm//lodash", + "//packages/core/test-helpers/core-test-helpers-http-setup-browser:npm_module_types", + "//packages/core/http/core-http-browser:npm_module_types", + "//packages/core/ui-settings/core-ui-settings-browser:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/README.md b/packages/core/ui-settings/core-ui-settings-browser-internal/README.md new file mode 100644 index 00000000000000..0ca04648039020 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-ui-settings-browser-internal + +This package contains the internal types and implementation for Core's browser-side uiSettings service. diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/jest.config.js b/packages/core/ui-settings/core-ui-settings-browser-internal/jest.config.js new file mode 100644 index 00000000000000..286747d11869ec --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/ui-settings/core-ui-settings-browser-internal'], +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/package.json b/packages/core/ui-settings/core-ui-settings-browser-internal/package.json new file mode 100644 index 00000000000000..a333808e2fe631 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-ui-settings-browser-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/public/ui_settings/__snapshots__/ui_settings_api.test.ts.snap b/packages/core/ui-settings/core-ui-settings-browser-internal/src/__snapshots__/ui_settings_api.test.ts.snap similarity index 100% rename from src/core/public/ui_settings/__snapshots__/ui_settings_api.test.ts.snap rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/__snapshots__/ui_settings_api.test.ts.snap diff --git a/src/core/public/ui_settings/__snapshots__/ui_settings_client.test.ts.snap b/packages/core/ui-settings/core-ui-settings-browser-internal/src/__snapshots__/ui_settings_client.test.ts.snap similarity index 100% rename from src/core/public/ui_settings/__snapshots__/ui_settings_client.test.ts.snap rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/__snapshots__/ui_settings_client.test.ts.snap diff --git a/src/core/public/ui_settings/index.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/index.ts similarity index 87% rename from src/core/public/ui_settings/index.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/index.ts index 7c7bdae34a3c1f..b57cef60531062 100644 --- a/src/core/public/ui_settings/index.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/index.ts @@ -8,4 +8,3 @@ export { UiSettingsService } from './ui_settings_service'; export type { UiSettingsClient } from './ui_settings_client'; -export type { UiSettingsState, IUiSettingsClient } from './types'; diff --git a/src/core/public/ui_settings/ui_settings_api.test.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.test.ts similarity index 98% rename from src/core/public/ui_settings/ui_settings_api.test.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.test.ts index d5f0f1175b9e5d..c250b78d68ce52 100644 --- a/src/core/public/ui_settings/ui_settings_api.test.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.test.ts @@ -11,7 +11,7 @@ import fetchMock from 'fetch-mock/es5/client'; import * as Rx from 'rxjs'; import { takeUntil, toArray } from 'rxjs/operators'; -import { setup as httpSetup } from '../../test_helpers/http_test_setup'; +import { setup as httpSetup } from '@kbn/core-test-helpers-http-setup-browser'; import { UiSettingsApi } from './ui_settings_api'; function setup() { diff --git a/src/core/public/ui_settings/ui_settings_api.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.ts similarity index 98% rename from src/core/public/ui_settings/ui_settings_api.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.ts index 0428de810cca98..26863073577239 100644 --- a/src/core/public/ui_settings/ui_settings_api.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_api.ts @@ -9,7 +9,7 @@ import { BehaviorSubject } from 'rxjs'; import type { HttpSetup } from '@kbn/core-http-browser'; -import type { UiSettingsState } from './types'; +import type { UiSettingsState } from '@kbn/core-ui-settings-browser'; export interface UiSettingsApiResponse { settings: UiSettingsState; diff --git a/src/core/public/ui_settings/ui_settings_client.test.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.test.ts similarity index 100% rename from src/core/public/ui_settings/ui_settings_client.test.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.test.ts diff --git a/src/core/public/ui_settings/ui_settings_client.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts similarity index 96% rename from src/core/public/ui_settings/ui_settings_client.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts index 979f6be5ebe2cb..d5b6b7f1513b2e 100644 --- a/src/core/public/ui_settings/ui_settings_client.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_client.ts @@ -10,8 +10,8 @@ import { cloneDeep, defaultsDeep } from 'lodash'; import { Observable, Subject, concat, defer, of } from 'rxjs'; import { filter, map } from 'rxjs/operators'; -import { UserProvidedValues, PublicUiSettingsParams } from '../../server/types'; -import { IUiSettingsClient, UiSettingsState } from './types'; +import { UserProvidedValues, PublicUiSettingsParams } from '@kbn/core-ui-settings-common'; +import { IUiSettingsClient, UiSettingsState } from '@kbn/core-ui-settings-browser'; import { UiSettingsApi } from './ui_settings_api'; diff --git a/src/core/public/ui_settings/ui_settings_service.test.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.test.ts similarity index 100% rename from src/core/public/ui_settings/ui_settings_service.test.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.test.ts diff --git a/src/core/public/ui_settings/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts similarity index 96% rename from src/core/public/ui_settings/ui_settings_service.ts rename to packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts index 5117ac3247af8d..3ff66d82169677 100644 --- a/src/core/public/ui_settings/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/src/ui_settings_service.ts @@ -11,9 +11,9 @@ import { Subject } from 'rxjs'; import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; import type { HttpSetup } from '@kbn/core-http-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { UiSettingsApi } from './ui_settings_api'; import { UiSettingsClient } from './ui_settings_client'; -import type { IUiSettingsClient } from './types'; export interface UiSettingsServiceDeps { http: HttpSetup; diff --git a/packages/core/ui-settings/core-ui-settings-browser-internal/tsconfig.json b/packages/core/ui-settings/core-ui-settings-browser-internal/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/BUILD.bazel b/packages/core/ui-settings/core-ui-settings-browser-mocks/BUILD.bazel new file mode 100644 index 00000000000000..c9c564ccc620a8 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/BUILD.bazel @@ -0,0 +1,111 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-ui-settings-browser-mocks" +PKG_REQUIRE_NAME = "@kbn/core-ui-settings-browser-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", + "//packages/core/ui-settings/core-ui-settings-browser-internal" +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/ui-settings/core-ui-settings-browser-internal:npm_module_types", + "//packages/core/ui-settings/core-ui-settings-browser:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/README.md b/packages/core/ui-settings/core-ui-settings-browser-mocks/README.md new file mode 100644 index 00000000000000..15e17139c444f4 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-ui-settings-browser-mocks + +This package contains the mocks for the browser-side uiSettings service. diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/jest.config.js b/packages/core/ui-settings/core-ui-settings-browser-mocks/jest.config.js new file mode 100644 index 00000000000000..a585eb84171ea6 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/ui-settings/core-ui-settings-browser-mocks'], +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/package.json b/packages/core/ui-settings/core-ui-settings-browser-mocks/package.json new file mode 100644 index 00000000000000..7d88d26720d3fb --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-ui-settings-browser-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/src/index.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/index.ts new file mode 100644 index 00000000000000..1eaa0bff3a4c7f --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { uiSettingsServiceMock } from './ui_settings_service.mock'; diff --git a/src/core/public/ui_settings/ui_settings_service.mock.ts b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts similarity index 91% rename from src/core/public/ui_settings/ui_settings_service.mock.ts rename to packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts index d0633c4fca1fc1..834a86d03e0498 100644 --- a/src/core/public/ui_settings/ui_settings_service.mock.ts +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/src/ui_settings_service.mock.ts @@ -8,8 +8,8 @@ import * as Rx from 'rxjs'; import type { PublicMethodsOf } from '@kbn/utility-types'; -import { UiSettingsService } from '.'; -import { IUiSettingsClient } from './types'; +import type { UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; const createSetupContractMock = () => { const setupContract: jest.Mocked = { diff --git a/packages/core/ui-settings/core-ui-settings-browser-mocks/tsconfig.json b/packages/core/ui-settings/core-ui-settings-browser-mocks/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/ui-settings/core-ui-settings-browser/BUILD.bazel b/packages/core/ui-settings/core-ui-settings-browser/BUILD.bazel new file mode 100644 index 00000000000000..fb495d492646fe --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/BUILD.bazel @@ -0,0 +1,108 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-ui-settings-browser" +PKG_REQUIRE_NAME = "@kbn/core-ui-settings-browser" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "@npm//rxjs", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "@npm//rxjs", + "//packages/core/ui-settings/core-ui-settings-common:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/ui-settings/core-ui-settings-browser/README.md b/packages/core/ui-settings/core-ui-settings-browser/README.md new file mode 100644 index 00000000000000..7bc7eb409096bf --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/README.md @@ -0,0 +1,3 @@ +# @kbn/core-ui-settings-browser + +This package contains the public types for the browser-side ui-settings service. diff --git a/packages/core/ui-settings/core-ui-settings-browser/jest.config.js b/packages/core/ui-settings/core-ui-settings-browser/jest.config.js new file mode 100644 index 00000000000000..7ab068830f85d4 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/ui-settings/core-ui-settings-browser'], +}; diff --git a/packages/core/ui-settings/core-ui-settings-browser/package.json b/packages/core/ui-settings/core-ui-settings-browser/package.json new file mode 100644 index 00000000000000..e40aeeac641965 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-ui-settings-browser", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/ui-settings/core-ui-settings-browser/src/index.ts b/packages/core/ui-settings/core-ui-settings-browser/src/index.ts new file mode 100644 index 00000000000000..99150ded400350 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/src/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { UiSettingsState, IUiSettingsClient } from './types'; diff --git a/src/core/public/ui_settings/types.ts b/packages/core/ui-settings/core-ui-settings-browser/src/types.ts similarity index 96% rename from src/core/public/ui_settings/types.ts rename to packages/core/ui-settings/core-ui-settings-browser/src/types.ts index 243ac82ed14ab2..4d23814c2b35dc 100644 --- a/src/core/public/ui_settings/types.ts +++ b/packages/core/ui-settings/core-ui-settings-browser/src/types.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { Observable } from 'rxjs'; -import { PublicUiSettingsParams, UserProvidedValues } from '../../server/types'; +import type { Observable } from 'rxjs'; +import type { PublicUiSettingsParams, UserProvidedValues } from '@kbn/core-ui-settings-common'; /** @public */ export interface UiSettingsState { diff --git a/packages/core/ui-settings/core-ui-settings-browser/tsconfig.json b/packages/core/ui-settings/core-ui-settings-browser/tsconfig.json new file mode 100644 index 00000000000000..4c665fe2ba49a5 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-browser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node", + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/ui-settings/core-ui-settings-common/BUILD.bazel b/packages/core/ui-settings/core-ui-settings-common/BUILD.bazel new file mode 100644 index 00000000000000..92ffc8188cae5e --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/BUILD.bazel @@ -0,0 +1,107 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-ui-settings-common" +PKG_REQUIRE_NAME = "@kbn/core-ui-settings-common" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + "src/**/*.tsx", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-config-schema:npm_module_types", + "//packages/kbn-analytics:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +jsts_transpiler( + name = "target_web", + srcs = SRCS, + build_pkg_name = package_name(), + web = True, +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node", ":target_web"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/ui-settings/core-ui-settings-common/README.md b/packages/core/ui-settings/core-ui-settings-common/README.md new file mode 100644 index 00000000000000..aa9cf61a0bc881 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/README.md @@ -0,0 +1,3 @@ +# @kbn/core-ui-settings-common + +This package contains the common types for Core's uiSettings service. diff --git a/packages/core/ui-settings/core-ui-settings-common/jest.config.js b/packages/core/ui-settings/core-ui-settings-common/jest.config.js new file mode 100644 index 00000000000000..1d7330c330d26e --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/packages/core/ui-settings/core-ui-settings-common'], +}; diff --git a/packages/core/ui-settings/core-ui-settings-common/package.json b/packages/core/ui-settings/core-ui-settings-common/package.json new file mode 100644 index 00000000000000..1476582f96d075 --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/package.json @@ -0,0 +1,8 @@ +{ + "name": "@kbn/core-ui-settings-common", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "browser": "./target_web/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/ui-settings/core-ui-settings-common/src/index.ts b/packages/core/ui-settings/core-ui-settings-common/src/index.ts new file mode 100644 index 00000000000000..da84668311cd2c --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/src/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { + UiSettingsType, + DeprecationSettings, + UiSettingsParams, + PublicUiSettingsParams, + UserProvidedValues, +} from './ui_settings'; diff --git a/src/core/types/ui_settings.ts b/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts similarity index 96% rename from src/core/types/ui_settings.ts rename to packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts index 469f43327e4984..ea1e5f92a7491e 100644 --- a/src/core/types/ui_settings.ts +++ b/packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { Type } from '@kbn/config-schema'; -import { UiCounterMetricType } from '@kbn/analytics'; +import type { Type } from '@kbn/config-schema'; +import type { UiCounterMetricType } from '@kbn/analytics'; /** * UI element type to represent the settings. diff --git a/packages/core/ui-settings/core-ui-settings-common/tsconfig.json b/packages/core/ui-settings/core-ui-settings-common/tsconfig.json new file mode 100644 index 00000000000000..39d3c7097814ac --- /dev/null +++ b/packages/core/ui-settings/core-ui-settings-common/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 87bc77e61bae5d..67bfabcbd09848 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -341,6 +341,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { blocklist: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/blocklist.html`, policyResponseTroubleshooting: { full_disk_access: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/deploy-elastic-endpoint.html#enable-fda-endpoint`, + macos_system_ext: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/deploy-elastic-endpoint.html#system-extension-endpoint`, }, }, query: { @@ -395,7 +396,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { classificationAucRoc: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-classification.html#ml-dfanalytics-class-aucroc`, setUpgradeMode: `${ELASTICSEARCH_DOCS}ml-set-upgrade-mode.html`, trainedModels: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-trained-models.html`, - startTrainedModelsDeploymentQueryParams: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/start-trained-model-deployment.html#start-trained-model-deployment-query-params`, + startTrainedModelsDeployment: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-nlp-deploy-models.html#ml-nlp-deploy-model`, }, transforms: { guide: `${ELASTICSEARCH_DOCS}transforms.html`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index 3a0e57b43c1690..8a7a0e788cbc3f 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -247,6 +247,7 @@ export interface DocLinks { readonly blocklist: string; readonly policyResponseTroubleshooting: { full_disk_access: string; + macos_system_ext: string; }; }; readonly query: { diff --git a/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts b/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts index 93e3cd2a4ce02f..8f756842e4b5bc 100644 --- a/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts +++ b/packages/kbn-securitysolution-t-grid/src/mock/mock_event_details.ts @@ -292,37 +292,17 @@ export const eventDetailsFormattedFields = [ }, { category: 'threat', - field: 'threat.enrichments.lazer.great.field', - values: ['grrrrr', 'grrrrr_2'], - originalValue: ['grrrrr', 'grrrrr_2'], - isObjectArray: false, - }, - { - category: 'threat', - field: 'threat.enrichments.lazer.great.field.wowoe.fooooo', - values: ['grrrrr'], - originalValue: ['grrrrr'], - isObjectArray: false, - }, - { - category: 'threat', - field: 'threat.enrichments.lazer.great.field.astring', - values: ['cool'], - originalValue: ['cool'], - isObjectArray: false, - }, - { - category: 'threat', - field: 'threat.enrichments.lazer.great.field.aNumber', - values: ['1'], - originalValue: ['1'], - isObjectArray: false, - }, - { - category: 'threat', - field: 'threat.enrichments.lazer.great.field.neat', - values: ['true'], - originalValue: ['true'], - isObjectArray: false, + field: 'threat.enrichments.lazer', + values: [ + '{"great.field":["grrrrr"]}', + '{"great.field":["grrrrr_2"]}', + '{"great.field":[{"wowoe":[{"fooooo":["grrrrr"]}],"astring":"cool","aNumber":1,"neat":true}]}', + ], + originalValue: [ + '{"great.field":["grrrrr"]}', + '{"great.field":["grrrrr_2"]}', + '{"great.field":[{"wowoe":[{"fooooo":["grrrrr"]}],"astring":"cool","aNumber":1,"neat":true}]}', + ], + isObjectArray: true, }, ]; diff --git a/packages/kbn-telemetry-tools/src/cli/run_telemetry_check.ts b/packages/kbn-telemetry-tools/src/cli/run_telemetry_check.ts index 4518b3631a2a03..ed5a7ff8b81356 100644 --- a/packages/kbn-telemetry-tools/src/cli/run_telemetry_check.ts +++ b/packages/kbn-telemetry-tools/src/cli/run_telemetry_check.ts @@ -48,64 +48,70 @@ export function runTelemetryCheck() { ); } - const list = new Listr([ - { - title: 'Checking .telemetryrc.json files', - task: () => new Listr(parseConfigsTask(), { exitOnError: true }), - }, - { - title: 'Extracting Collectors', - task: (context) => new Listr(extractCollectorsTask(context, path), { exitOnError: true }), - }, - { - enabled: () => typeof path !== 'undefined', - title: 'Checking collectors in --path are not excluded', - task: ({ roots }: TaskContext) => { - const totalCollections = roots.reduce((acc, root) => { - return acc + (root.parsedCollections?.length || 0); - }, 0); - const collectorsInPath = Array.isArray(path) ? path.length : 1; + const list = new Listr( + [ + { + title: 'Checking .telemetryrc.json files', + task: () => new Listr(parseConfigsTask(), { exitOnError: true }), + }, + { + title: 'Extracting Collectors', + task: (context) => + new Listr(extractCollectorsTask(context, path), { exitOnError: true }), + }, + { + enabled: () => typeof path !== 'undefined', + title: 'Checking collectors in --path are not excluded', + task: ({ roots }: TaskContext) => { + const totalCollections = roots.reduce((acc, root) => { + return acc + (root.parsedCollections?.length || 0); + }, 0); + const collectorsInPath = Array.isArray(path) ? path.length : 1; - if (totalCollections !== collectorsInPath) { - throw new Error( - 'Collector specified in `path` is excluded; Check the telemetryrc.json files.' + if (totalCollections !== collectorsInPath) { + throw new Error( + 'Collector specified in `path` is excluded; Check the telemetryrc.json files.' + ); + } + }, + }, + { + title: 'Checking Compatible collector.schema with collector.fetch type', + task: (context) => new Listr(checkCompatibleTypesTask(context), { exitOnError: true }), + }, + { + enabled: (_) => fix || !ignoreStoredJson, + title: 'Checking Matching collector.schema against stored json files', + task: (context) => + new Listr(checkMatchingSchemasTask(context, !fix), { exitOnError: true }), + }, + { + enabled: (_) => fix, + skip: ({ roots }: TaskContext) => { + const noDiffs = roots.every( + ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length ); - } + return noDiffs && 'No changes needed.'; + }, + title: 'Generating new telemetry mappings', + task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), }, - }, - { - title: 'Checking Compatible collector.schema with collector.fetch type', - task: (context) => new Listr(checkCompatibleTypesTask(context), { exitOnError: true }), - }, - { - enabled: (_) => fix || !ignoreStoredJson, - title: 'Checking Matching collector.schema against stored json files', - task: (context) => - new Listr(checkMatchingSchemasTask(context, !fix), { exitOnError: true }), - }, - { - enabled: (_) => fix, - skip: ({ roots }: TaskContext) => { - const noDiffs = roots.every( - ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length - ); - return noDiffs && 'No changes needed.'; + { + enabled: (_) => fix, + skip: ({ roots }: TaskContext) => { + const noDiffs = roots.every( + ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length + ); + return noDiffs && 'No changes needed.'; + }, + title: 'Updating telemetry mapping files', + task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), }, - title: 'Generating new telemetry mappings', - task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), - }, + ], { - enabled: (_) => fix, - skip: ({ roots }: TaskContext) => { - const noDiffs = roots.every( - ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length - ); - return noDiffs && 'No changes needed.'; - }, - title: 'Updating telemetry mapping files', - task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), - }, - ]); + renderer: process.env.CI ? 'verbose' : 'default', + } + ); try { const context = createTaskContext(); diff --git a/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts b/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts index c998470ff0a9c4..22790ab6a05783 100644 --- a/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts +++ b/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts @@ -21,24 +21,29 @@ import { export function runTelemetryExtract() { run( async ({ flags: {}, log }) => { - const list = new Listr([ + const list = new Listr( + [ + { + title: 'Parsing .telemetryrc.json files', + task: () => new Listr(parseConfigsTask(), { exitOnError: true }), + }, + { + title: 'Extracting Telemetry Collectors', + task: (context) => new Listr(extractCollectorsTask(context), { exitOnError: true }), + }, + { + title: 'Generating Schema files', + task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), + }, + { + title: 'Writing to file', + task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), + }, + ], { - title: 'Parsing .telemetryrc.json files', - task: () => new Listr(parseConfigsTask(), { exitOnError: true }), - }, - { - title: 'Extracting Telemetry Collectors', - task: (context) => new Listr(extractCollectorsTask(context), { exitOnError: true }), - }, - { - title: 'Generating Schema files', - task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), - }, - { - title: 'Writing to file', - task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), - }, - ]); + renderer: process.env.CI ? 'verbose' : 'default', + } + ); try { const context = createTaskContext(); diff --git a/packages/kbn-test/BUILD.bazel b/packages/kbn-test/BUILD.bazel index e2824076e80b93..b854379eb536bf 100644 --- a/packages/kbn-test/BUILD.bazel +++ b/packages/kbn-test/BUILD.bazel @@ -76,6 +76,7 @@ RUNTIME_DEPS = [ "@npm//rxjs", "@npm//semver", "@npm//strip-ansi", + "@npm//supertest", "@npm//xmlbuilder", "@npm//xml2js", ] @@ -123,6 +124,7 @@ TYPES_DEPS = [ "@npm//@types/react-redux", "@npm//@types/react-router-dom", "@npm//@types/semver", + "@npm//@types/supertest", "@npm//@types/uuid", "@npm//@types/xml2js", ] diff --git a/packages/kbn-test/src/es/test_es_cluster.ts b/packages/kbn-test/src/es/test_es_cluster.ts index 1eb48ca58d950e..8c650ec9b60518 100644 --- a/packages/kbn-test/src/es/test_es_cluster.ts +++ b/packages/kbn-test/src/es/test_es_cluster.ts @@ -19,11 +19,11 @@ import type { ChildProcess } from 'child_process'; import { Cluster } from '@kbn/es'; import { Client, HttpConnection } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; +import { REPO_ROOT } from '@kbn/utils'; + import { CI_PARALLEL_PROCESS_PREFIX } from '../ci_parallel_process_prefix'; import { esTestConfig } from './es_test_config'; -import { KIBANA_ROOT } from '..'; - interface TestEsClusterNodesOptions { name: string; /** @@ -168,7 +168,7 @@ export function createTestEsCluster< password = 'changeme', license = 'basic', log, - basePath = Path.resolve(KIBANA_ROOT, '.es'), + basePath = Path.resolve(REPO_ROOT, '.es'), esFrom = esTestConfig.getBuildFrom(), dataArchive, nodes = [{ name: 'node-01' }], @@ -196,7 +196,7 @@ export function createTestEsCluster< const config = { version: esTestConfig.getVersion(), installPath: Path.resolve(basePath, clusterName), - sourcePath: Path.resolve(KIBANA_ROOT, '../elasticsearch'), + sourcePath: Path.resolve(REPO_ROOT, '../elasticsearch'), password, license, basePath, @@ -321,7 +321,7 @@ export function createTestEsCluster< } const uuid = Uuid.v4(); - const debugPath = Path.resolve(KIBANA_ROOT, `data/es_debug_${uuid}.tar.gz`); + const debugPath = Path.resolve(REPO_ROOT, `data/es_debug_${uuid}.tar.gz`); log.error(`[es] debug files found, archiving install to ${debugPath}`); const archiver = createArchiver('tar', { gzip: true }); const promise = pipeline(archiver, Fs.createWriteStream(debugPath)); diff --git a/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts b/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts index 9de6500a453234..4e549e960dc263 100644 --- a/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts +++ b/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts @@ -24,6 +24,7 @@ import { Config, SuiteTracker, EsVersion, + DedicatedTaskRunner, } from './lib'; import { createEsClientForFtrConfig } from '../es'; @@ -242,6 +243,7 @@ export class FunctionalTestRunner { config: () => config, dockerServers: () => dockerServers, esVersion: () => this.esVersion, + dedicatedTaskRunner: () => new DedicatedTaskRunner(config, this.log), }); return await handler(config, lifecycle, coreProviders); diff --git a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts index bf652bf8c84444..6f5757a73ea0ad 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts @@ -216,6 +216,7 @@ export const schema = Joi.object() sourceArgs: Joi.array(), serverArgs: Joi.array(), installDir: Joi.string(), + useDedicatedTaskRunner: Joi.boolean().default(false), /** Options for how FTR should execute and interact with Kibana */ runOptions: Joi.object() .keys({ diff --git a/packages/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts b/packages/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts new file mode 100644 index 00000000000000..20b5e0387c7196 --- /dev/null +++ b/packages/kbn-test/src/functional_test_runner/lib/dedicated_task_runner.ts @@ -0,0 +1,138 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Url from 'url'; + +import { ToolingLog } from '@kbn/tooling-log'; +import Supertest from 'supertest'; + +import { KbnClient } from '../../kbn_client'; +import { Config } from './config'; +import { getKibanaCliArg } from '../../functional_tests/lib/kibana_cli_args'; + +export class DedicatedTaskRunner { + static getPort(uiPort: number) { + return uiPort + 13; + } + + static getUuid(mainUuid: string) { + if (mainUuid.length !== 36) { + throw new Error(`invalid mainUuid: ${mainUuid}`); + } + + return `00000000-${mainUuid.slice(9)}`; + } + + /** + * True when the FTR config indicates that Kibana has a dedicated task runner process, otherwise false. If this + * property is false then all other methods on this class will throw when they are called, so if you're not + * certain where your code will be run make sure to check `dedicatedTaskRunner.enabled` before calling + * other methods. + */ + public readonly enabled: boolean; + + private readonly enabledProps?: { + readonly port: number; + readonly url: string; + readonly client: KbnClient; + readonly uuid?: string; + readonly supertest?: Supertest.SuperTest; + }; + + constructor(config: Config, log: ToolingLog) { + if (!config.get('kbnTestServer.useDedicatedTaskRunner')) { + this.enabled = false; + return; + } + + this.enabled = true; + + const port = DedicatedTaskRunner.getPort(config.get('servers.kibana.port')); + const url = Url.format({ + ...config.get('servers.kibana'), + port, + }); + const client = new KbnClient({ + log, + url, + certificateAuthorities: config.get('servers.kibana.certificateAuthorities'), + uiSettingDefaults: config.get('uiSettings.defaults'), + }); + + const mainUuid = getKibanaCliArg(config.get('kbnTestServer.serverArgs'), 'server.uuid'); + const uuid = typeof mainUuid === 'string' ? DedicatedTaskRunner.getUuid(mainUuid) : undefined; + + this.enabledProps = { port, url, client, uuid }; + } + + private getEnabledProps() { + if (!this.enabledProps) { + throw new Error( + `DedicatedTaskRunner is not enabled, check the "enabled" property before calling getters assuming it is enabled.` + ); + } + + return this.enabledProps; + } + + /** + * The port number that the dedicated task runner is running on + */ + getPort() { + return this.getEnabledProps().port; + } + + /** + * The full URL for the dedicated task runner process + */ + getUrl() { + return this.getEnabledProps().url; + } + + /** + * Returns true if the `--server.uuid` setting was passed to the Kibana server, allowing the UUID to + * be deterministic and ensuring that `dedicatedTaskRunner.getUuid()` won't throw. + */ + hasUuid() { + return !!this.getEnabledProps().uuid; + } + + /** + * If `--server.uuid` is passed to Kibana in the FTR config file then the dedicated task runner will + * use a UUID derived from that and it will be synchronously available to users via this function. + * Otherwise this function will through. + */ + getUuid() { + const uuid = this.getEnabledProps().uuid; + if (!uuid) { + throw new Error( + 'Pass `--server.uuid` the the Kibana server in your FTR config in order to make the UUID of the dedicated task runner deterministic.' + ); + } + + return uuid; + } + + /** + * @returns a `KbnClient` instance that is configured to talk directly to the dedicated task runner. Not really sure how useful this is. + */ + getClient() { + return this.getEnabledProps().client; + } + + /** + * @returns a Supertest instance that will send requests to the dedicated task runner. + * + * @example + * const supertest = dedicatedTaskRunner.getSupertest(); + * const response = await supertest.get('/status'); + */ + getSupertest() { + return Supertest(this.getUrl()); + } +} diff --git a/packages/kbn-test/src/functional_test_runner/lib/index.ts b/packages/kbn-test/src/functional_test_runner/lib/index.ts index b269e34178851c..983a185dee6825 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/index.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/index.ts @@ -14,6 +14,7 @@ export * from './providers'; export { runTests, setupMocha } from './mocha'; export * from './docker_servers'; export { SuiteTracker } from './suite_tracker'; +export { DedicatedTaskRunner } from './dedicated_task_runner'; export type { Provider } from './providers'; export * from './es_version'; diff --git a/packages/kbn-test/src/functional_test_runner/public_types.ts b/packages/kbn-test/src/functional_test_runner/public_types.ts index 67adceaf22323c..3faa19de73ce19 100644 --- a/packages/kbn-test/src/functional_test_runner/public_types.ts +++ b/packages/kbn-test/src/functional_test_runner/public_types.ts @@ -8,7 +8,13 @@ import type { ToolingLog } from '@kbn/tooling-log'; -import type { Config, Lifecycle, DockerServersService, EsVersion } from './lib'; +import type { + Config, + Lifecycle, + DockerServersService, + EsVersion, + DedicatedTaskRunner, +} from './lib'; import type { Test, Suite } from './fake_mocha_types'; export { Lifecycle, Config }; @@ -56,7 +62,15 @@ export interface GenericFtrProviderContext< * Determine if a service is avaliable * @param serviceName */ - hasService(serviceName: 'config' | 'log' | 'lifecycle' | 'dockerServers' | 'esVersion'): true; + hasService( + serviceName: + | 'config' + | 'log' + | 'lifecycle' + | 'dockerServers' + | 'esVersion' + | 'dedicatedTaskRunner' + ): true; hasService(serviceName: K): serviceName is K; hasService(serviceName: string): serviceName is Extract; @@ -70,6 +84,7 @@ export interface GenericFtrProviderContext< getService(serviceName: 'lifecycle'): Lifecycle; getService(serviceName: 'dockerServers'): DockerServersService; getService(serviceName: 'esVersion'): EsVersion; + getService(serviceName: 'dedicatedTaskRunner'): DedicatedTaskRunner; getService(serviceName: T): ServiceMap[T]; /** diff --git a/packages/kbn-test/src/functional_tests/lib/index.ts b/packages/kbn-test/src/functional_tests/lib/index.ts index 2726192328bda0..8844a2ee59a19b 100644 --- a/packages/kbn-test/src/functional_tests/lib/index.ts +++ b/packages/kbn-test/src/functional_tests/lib/index.ts @@ -10,5 +10,4 @@ export { runKibanaServer } from './run_kibana_server'; export { runElasticsearch } from './run_elasticsearch'; export type { CreateFtrOptions, CreateFtrParams } from './run_ftr'; export { runFtr, hasTests, assertNoneExcluded } from './run_ftr'; -export { KIBANA_ROOT, KIBANA_FTR_SCRIPT } from './paths'; export { runCli } from './run_cli'; diff --git a/packages/kbn-test/src/functional_tests/lib/paths.ts b/packages/kbn-test/src/functional_tests/lib/paths.ts deleted file mode 100644 index 76357d447dc2ab..00000000000000 --- a/packages/kbn-test/src/functional_tests/lib/paths.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { REPO_ROOT } from '@kbn/utils'; -import { resolve, relative } from 'path'; - -// resolve() treats relative paths as relative to process.cwd(), -// so to return a relative path we use relative() -function resolveRelative(path: string) { - return relative(process.cwd(), resolve(path)); -} - -export const KIBANA_EXEC = 'node'; -export const KIBANA_SCRIPT_PATH = resolveRelative('scripts/kibana'); -export const KIBANA_ROOT = REPO_ROOT; -export const KIBANA_FTR_SCRIPT = resolve(KIBANA_ROOT, 'scripts/functional_test_runner'); diff --git a/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts index 2ee9de4053fef9..5dcee56e765e0d 100644 --- a/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts +++ b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts @@ -9,7 +9,7 @@ import { resolve } from 'path'; import type { ToolingLog } from '@kbn/tooling-log'; import getPort from 'get-port'; -import { KIBANA_ROOT } from './paths'; +import { REPO_ROOT } from '@kbn/utils'; import type { Config } from '../../functional_test_runner'; import { createTestEsCluster } from '../../es'; @@ -106,7 +106,7 @@ async function startEsNode( port: config.port, ssl: config.ssl, log, - basePath: resolve(KIBANA_ROOT, '.es'), + basePath: resolve(REPO_ROOT, '.es'), nodes: [ { name, diff --git a/packages/kbn-test/src/functional_tests/lib/run_kibana_server.ts b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.ts index 7b6d6d5cd1a3e9..54e01a6b7916bb 100644 --- a/packages/kbn-test/src/functional_tests/lib/run_kibana_server.ts +++ b/packages/kbn-test/src/functional_tests/lib/run_kibana_server.ts @@ -7,12 +7,15 @@ */ import Path from 'path'; +import Os from 'os'; +import Uuid from 'uuid'; import type { ProcRunner } from '@kbn/dev-proc-runner'; +import { REPO_ROOT } from '@kbn/utils'; -import { KIBANA_ROOT, KIBANA_EXEC, KIBANA_SCRIPT_PATH } from './paths'; import type { Config } from '../../functional_test_runner'; -import { parseRawFlags } from './kibana_cli_args'; +import { DedicatedTaskRunner } from '../../functional_test_runner/lib'; +import { parseRawFlags, getArgValue } from './kibana_cli_args'; function extendNodeOptions(installDir?: string) { if (!installDir) { @@ -44,13 +47,35 @@ export async function runKibanaServer({ }) { const runOptions = config.get('kbnTestServer.runOptions'); const installDir = runOptions.alwaysUseSource ? undefined : options.installDir; - const extraArgs = options.extraKbnOpts ?? []; + const devMode = !installDir; + const useTaskRunner = config.get('kbnTestServer.useDedicatedTaskRunner'); + + const procRunnerOpts = { + cwd: installDir || REPO_ROOT, + cmd: installDir + ? process.platform.startsWith('win') + ? Path.resolve(installDir, 'bin/kibana.bat') + : Path.resolve(installDir, 'bin/kibana') + : process.execPath, + env: { + FORCE_COLOR: 1, + ...process.env, + ...config.get('kbnTestServer.env'), + ...extendNodeOptions(installDir), + }, + wait: runOptions.wait, + onEarlyExit, + }; + + const prefixArgs = devMode + ? [Path.relative(procRunnerOpts.cwd, Path.resolve(REPO_ROOT, 'scripts/kibana'))] + : []; const buildArgs: string[] = config.get('kbnTestServer.buildArgs') || []; const sourceArgs: string[] = config.get('kbnTestServer.sourceArgs') || []; const serverArgs: string[] = config.get('kbnTestServer.serverArgs') || []; - const args = parseRawFlags([ + const kbnFlags = parseRawFlags([ // When installDir is passed, we run from a built version of Kibana which uses different command line // arguments. If installDir is not passed, we run from source code. ...(installDir @@ -58,31 +83,51 @@ export async function runKibanaServer({ : [...sourceArgs, ...serverArgs]), // We also allow passing in extra Kibana server options, tack those on here so they always take precedence - ...extraArgs, + ...(options.extraKbnOpts ?? []), ]); - // main process - await procs.run('kibana', { - cmd: getKibanaCmd(installDir), - args: installDir ? args : [KIBANA_SCRIPT_PATH, ...args], - env: { - FORCE_COLOR: 1, - ...process.env, - ...config.get('kbnTestServer.env'), - ...extendNodeOptions(installDir), - }, - cwd: installDir || KIBANA_ROOT, - wait: runOptions.wait, - onEarlyExit, - }); -} + const promises = [ + // main process + procs.run(useTaskRunner ? 'kbn-ui' : 'kibana', { + ...procRunnerOpts, + args: [ + ...prefixArgs, + ...parseRawFlags([ + ...kbnFlags, + ...(!useTaskRunner + ? [] + : [ + '--node.roles=["ui"]', + `--path.data=${Path.resolve(Os.tmpdir(), `ftr-ui-${Uuid.v4()}`)}`, + ]), + ]), + ], + }), + ]; + + if (useTaskRunner) { + const mainUuid = getArgValue(kbnFlags, 'server.uuid'); -function getKibanaCmd(installDir?: string) { - if (installDir) { - return process.platform.startsWith('win') - ? Path.resolve(installDir, 'bin/kibana.bat') - : Path.resolve(installDir, 'bin/kibana'); + // dedicated task runner + promises.push( + procs.run('kbn-tasks', { + ...procRunnerOpts, + args: [ + ...prefixArgs, + ...parseRawFlags([ + ...kbnFlags, + `--server.port=${DedicatedTaskRunner.getPort(config.get('servers.kibana.port'))}`, + '--node.roles=["background_tasks"]', + `--path.data=${Path.resolve(Os.tmpdir(), `ftr-task-runner-${Uuid.v4()}`)}`, + ...(typeof mainUuid === 'string' && mainUuid + ? [`--server.uuid=${DedicatedTaskRunner.getUuid(mainUuid)}`] + : []), + ...(devMode ? ['--no-optimizer'] : []), + ]), + ], + }) + ); } - return KIBANA_EXEC; + await Promise.all(promises); } diff --git a/packages/kbn-test/src/functional_tests/tasks.ts b/packages/kbn-test/src/functional_tests/tasks.ts index 76cc4dde1f36b2..9b5fb5424f3feb 100644 --- a/packages/kbn-test/src/functional_tests/tasks.ts +++ b/packages/kbn-test/src/functional_tests/tasks.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -import { relative } from 'path'; -import * as Rx from 'rxjs'; +import Path from 'path'; import { setTimeout } from 'timers/promises'; + +import * as Rx from 'rxjs'; import { startWith, switchMap, take } from 'rxjs/operators'; import { withProcRunner } from '@kbn/dev-proc-runner'; import { ToolingLog } from '@kbn/tooling-log'; @@ -16,17 +17,17 @@ import { getTimeReporter } from '@kbn/ci-stats-reporter'; import { REPO_ROOT } from '@kbn/utils'; import dedent from 'dedent'; +import { readConfigFile, EsVersion } from '../functional_test_runner/lib'; import { runElasticsearch, runKibanaServer, runFtr, assertNoneExcluded, hasTests, - KIBANA_FTR_SCRIPT, CreateFtrOptions, } from './lib'; -import { readConfigFile, EsVersion } from '../functional_test_runner/lib'; +const FTR_SCRIPT_PATH = Path.resolve(REPO_ROOT, 'scripts/functional_test_runner'); const makeSuccessMessage = (options: StartServerOptions) => { const installDirFlag = options.installDir ? ` --kibana-install-dir=${options.installDir}` : ''; @@ -34,7 +35,7 @@ const makeSuccessMessage = (options: StartServerOptions) => { const pathsMessage = options.useDefaultConfig ? '' : configPaths - .map((path) => relative(process.cwd(), path)) + .map((path) => Path.relative(process.cwd(), path)) .map((path) => ` --config ${path}`) .join(''); @@ -44,7 +45,7 @@ const makeSuccessMessage = (options: StartServerOptions) => { Elasticsearch and Kibana are ready for functional testing. Start the functional tests in another terminal session by running this command from this directory: - node ${relative(process.cwd(), KIBANA_FTR_SCRIPT)}${installDirFlag}${pathsMessage} + node ${Path.relative(process.cwd(), FTR_SCRIPT_PATH)}${installDirFlag}${pathsMessage} ` + '\n\n' ); @@ -96,7 +97,7 @@ export async function runTests(options: RunTestsParams) { await log.indent(0, async () => { if (options.configs.length > 1) { const progress = `${i + 1}/${options.configs.length}`; - log.write(`--- [${progress}] Running ${relative(REPO_ROOT, configPath)}`); + log.write(`--- [${progress}] Running ${Path.relative(REPO_ROOT, configPath)}`); } if (!(await hasTests({ configPath, options: { ...options, log } }))) { diff --git a/packages/kbn-test/src/index.ts b/packages/kbn-test/src/index.ts index 7770232011d21c..6d67bbecc2093d 100644 --- a/packages/kbn-test/src/index.ts +++ b/packages/kbn-test/src/index.ts @@ -24,9 +24,6 @@ export { runTestsCli, processRunTestsCliOptions, startServersCli, processStartSe // @internal export { runTests, startServers } from './functional_tests/tasks'; -// @internal -export { KIBANA_ROOT } from './functional_tests/lib/paths'; - export { getKibanaCliArg, getKibanaCliLoggers } from './functional_tests/lib/kibana_cli_args'; export type { diff --git a/scripts/archive_migration_functions.sh b/scripts/archive_migration_functions.sh new file mode 100644 index 00000000000000..e924f5db133157 --- /dev/null +++ b/scripts/archive_migration_functions.sh @@ -0,0 +1,486 @@ +#!/bin/bash + +standard_list="url,index-pattern,query,graph-workspace,tag,visualization,canvas-element,canvas-workpad,dashboard,search,lens,map,cases,uptime-dynamic-settings,osquery-saved-query,osquery-pack,infrastructure-ui-source,metrics-explorer-view,inventory-view,infrastructure-monitoring-log-view,apm-indices" + +orig_archive="x-pack/test/functional/es_archives/banners/multispace" +new_archive="x-pack/test/functional/fixtures/kbn_archiver/banners/multispace" +test_config="x-pack/test/functional/apps/spaces/config.ts" + +arrayify_csv() { + local xs=${1} + echo "$xs" | tr ',' '\n' | uniq | sort +} + +intersection() { + local containedTypesArr=("$@") + local standardListArr + standardListArr=($(arrayify_csv "$standard_list")) + + intersections=() + + for a in "${containedTypesArr[@]}"; do + for b in "${standardListArr[@]}"; do + if [[ "$a" == "$b" ]]; then + intersections+=("$a") + fi + done + done + + echo "${intersections[@]}" +} + +is_zipped() { + local archive=$1 + + local zip + zip=$(find "$archive" -maxdepth 1 -type f -name '*.gz' 2>/dev/null) + if [[ "$zip" == "" ]]; then + echo "" + else + echo "$zip" + fi +} + +unzip_and_keep() { + local archive=$1 + + local zip + zip=$(find "$archive" -maxdepth 1 -type f -name '*.gz') + gunzip --keep "$zip" +} + +_guard() { + local archive=$1 + local failures=() + local archiveJson="${archive}/data.json" + + if [[ ! -d "$archive" ]]; then + failures+=("Archive does not exist") + fi + + if [ "${#failures[@]}" -eq 0 ]; then + local zipped + zipped=$(is_zipped "$archive") + if [[ "$zipped" != "" && ! -f "$archiveJson" ]]; then + unzip_and_keep "$archive" + fi + + local containsDotKibanaRefs + containsDotKibanaRefs=$(grep -is '"index": ".kibana' "$archiveJson") + if [[ "$containsDotKibanaRefs" == "" ]]; then + failures+=(".kibana is not mentioned within the archive") + fi + fi + + echo "${failures[@]}" +} + +_types() { + local archive=${1:-$orig_archive} + local archiveJson="${archive}/data.json" + + if [[ -f "${archive}/data.json" ]]; then + local typesList + typesList=$(jq 'select(.value.source.type | length > 0) | .value.source.type' "$archiveJson") + echo "$typesList" | sed 's/^.//;s/.$//' | sort | uniq # The sed command drops the first and last characters. + fi +} + +_find_config() { + local test_file=${1} + + local current + local parent + local grandParent + local greatGrand + current=$(dirname "$test_file") + parent=$(dirname "$current") + grandParent=$(dirname "$parent") + greatGrand=$(dirname "$grandParent") + + local dirs=("$current" "$parent" "$grandParent" "$greatGrand") + + local configs=() + for x in "${dirs[@]}"; do + local config=$(find "$x" -maxdepth 1 -type f -name '*config.js' -or -name '*config.ts') + if [ -n "$config" ]; then + configs+=("$config") + fi + done + + echo "${configs[@]}" +} + +uniqueify() { + local xs=("$@") + local xss=() + for x in $(printf "%s\n" "${xs[@]}" | sort -u); do + if [[ -n "$x" ]]; then + xss+=("$x") + fi + done + echo "${xss[@]}" +} + +find_configs() { + local testFiles=("$@") + local configs=() + local uniqConfigs=() + + for testFile in "${testFiles[@]}"; do + configs+=($(_find_config "$testFile")) + done + + uniqConfigs=($(uniqueify "${configs[@]}")) + echo "${uniqConfigs[@]}" +} + +usages_list() { + local archive=${1:-$orig_archive} + + grep -q "x-pack" <<<"$archive" + isInXpack=$? + + local found_usages=() + + if [[ $isInXpack = 0 ]]; then + found_usages+=($(find x-pack/test -type f -print0 | xargs -0 grep -n "$archive" | cut -d ':' -f 1 | uniq)) + else + found_usages+=($(find test -type f -print0 | xargs -0 grep -n "$archive" | cut -d ':' -f 1 | uniq)) + fi + + echo "${found_usages[@]}" +} + +are_enabled() { + local testConfigs=("$@") + local enabledList=($(node scripts/enabled_ftr_configs.js)) + local needsMigration=() + + for enabled in "${enabledList[@]}"; do + for config in "${testConfigs[@]}"; do + if [[ "$enabled" == "$config" ]]; then + needsMigration+=("$config") + fi + done + done + echo "${needsMigration[@]}" +} + +print_list() { + local xs=("$@") + for x in "${xs[@]}"; do + echo " ${x}" + done +} + +clean_up() { + local xs + xs=$(git status -s | grep "??" | grep "data.json" | tr '??' ' ' | xargs) + for x in "${xs[@]}"; do + rm -f "$x" + done +} + +should_migrate() { + local archive=${1:-$orig_archive} + local archiveJson="${archive}/data.json" + printf "\n??? Should we migrate \n %s\n" "$archive" + + local guardResults=($(_guard "$archive")) + + if [ "${#guardResults[@]}" -eq 0 ]; then + local containedTypes=($(_types "$archive")) + local intersections=($(intersection "${containedTypes[@]}")) + local intersectionsLength="${#intersections[@]}" + if [ "${intersectionsLength}" -gt 0 ]; then + local foundTestFiles=($(usages_list "$archive")) + local configs=($(find_configs "${foundTestFiles[@]}")) + local needsMigration=($(are_enabled "${configs[@]}")) + if [ "${#needsMigration[@]}" -gt 0 ]; then + echo "### Yes, it needs migration" + echo " ### Saved Object type(s) that we care about:" + print_list "${intersections[@]}" + echo " ### Test file(s) that use it:" + print_list "${foundTestFiles[@]}" + echo " ### Config(s) that govern the test file(s):" + print_list "${configs[@]}" + else + echo "!!! No, do not migrate, it's config(s) is / are not enabled." + echo "!!! It contains the following saved object(s)" + print_list "${containedTypes[@]}" + echo " !!! For these files:" + print_list "${foundTestFiles[@]}" + echo " !!! Config(s) that govern the test file(s):" + print_list "${configs[@]}" + fi + else + echo "!!! No, we've found $intersectionsLength saved objects that are listed in the standard_list" + echo "!!! It contains the following saved object(s)" + print_list "${containedTypes[@]}" + fi + else + echo "!!! No, it failed the guard(s):" + echo "${guardResults[@]}" + fi + + trap clean_up EXIT +} + +migrate() { + set -x + node scripts/es_archiver.js load "$orig_archive" --config "$test_config" + node scripts/kbn_archiver.js save "$new_archive" --config "$test_config" --type "$standard_list" + node scripts/es_archiver.js unload "$orig_archive" + set +x +} + +load_logstash() { + set -x + node scripts/es_archiver.js load x-pack/test/functional/es_archives/logstash_functional --config "$test_config" + set +x +} + +load_es() { + set -x + node scripts/es_archiver.js load "$orig_archive" --config "$test_config" + set +x +} + +unload_es() { + set -x + node scripts/es_archiver.js unload "$orig_archive" + set +x +} + +save_es_archive_without_kibana_objects() { + local indexName=${1:?"You must pass the name of the index!"} + set -x + node scripts/es_archiver.js save "$orig_archive" --config "$test_config" "$indexName" + set +x +} + +save_kbn() { + local space=${1:-default} + + set -x + node scripts/kbn_archiver.js --config "$test_config" save "$new_archive" --type $standard_list --space "$space" + set +x + # node scripts/kbn_archiver.js --config x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts save x-pack/test/functional/fixtures/kbn_archiver/saved_objects/default_space --type search,index-pattern,visualization,dashboard,lens,map,graph-workspace,query,tag,url,canvas-workpad +} + +load_kbn() { + local space=${1:-default} + + set -x + node scripts/kbn_archiver.js --config "$test_config" load "$new_archive" --space "$space" + set +x +} + +load_created_kbn_archive() { + set -x + node scripts/kbn_archiver.js --config "$test_config" load "$new_archive" + set +x +} + +unload_kbn() { + set -x + node scripts/kbn_archiver.js --config "$test_config" unload "$new_archive" + set +x +} + +ping_server() { + set -x + server_addr="http://elastic:changeme@localhost:9220" + curl -k "${server_addr}/_cat/health?v=true" + set +x +} + +server() { + local config=${1:-$test_config} + + set -x + node scripts/functional_tests_server.js --config "$config" + set +x +} + +run_test() { + local config=${1:-$test_config} + + set -x + node scripts/functional_test_runner --config "$config" + set +x +} + +run_test_extra() { + set -x + node scripts/functional_test_runner --config "$test_config" \ + --grep="CSV Generation from SearchSource" \ + --include-tag "ciGroup2" \ + --updateSnapshots + set +x +} + +allowed_types='{ + "types": [ + { + "name": "config", + "namespaceType": "single", + "hidden": false, + "displayName": "config" + }, + { + "name": "url", + "namespaceType": "single", + "hidden": false, + "displayName": "url" + }, + { + "name": "index-pattern", + "namespaceType": "multiple", + "hidden": false, + "displayName": "data view" + }, + { + "name": "action", + "namespaceType": "multiple-isolated", + "hidden": true, + "displayName": "connector" + }, + { + "name": "query", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "query" + }, + { + "name": "alert", + "namespaceType": "multiple-isolated", + "hidden": true, + "displayName": "rule" + }, + { + "name": "graph-workspace", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "graph-workspace" + }, + { + "name": "tag", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "tag" + }, + { + "name": "visualization", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "visualization" + }, + { + "name": "canvas-element", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "canvas-element" + }, + { + "name": "canvas-workpad", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "canvas-workpad" + }, + { + "name": "dashboard", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "dashboard" + }, + { + "name": "search", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "search" + }, + { + "name": "lens", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "lens" + }, + { + "name": "map", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "map" + }, + { + "name": "cases", + "namespaceType": "multiple-isolated", + "hidden": true, + "displayName": "cases" + }, + { + "name": "uptime-dynamic-settings", + "namespaceType": "single", + "hidden": false, + "displayName": "uptime-dynamic-settings" + }, + { + "name": "osquery-saved-query", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "osquery-saved-query" + }, + { + "name": "osquery-pack", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "osquery-pack" + }, + { + "name": "infrastructure-ui-source", + "namespaceType": "single", + "hidden": false, + "displayName": "infrastructure-ui-source" + }, + { + "name": "metrics-explorer-view", + "namespaceType": "single", + "hidden": false, + "displayName": "metrics-explorer-view" + }, + { + "name": "inventory-view", + "namespaceType": "single", + "hidden": false, + "displayName": "inventory-view" + }, + { + "name": "infrastructure-monitoring-log-view", + "namespaceType": "multiple-isolated", + "hidden": false, + "displayName": "log view" + }, + { + "name": "apm-indices", + "namespaceType": "single", + "hidden": false, + "displayName": "apm-indices" + }, + { + "name": "csp_rule", + "namespaceType": "agnostic", + "hidden": false, + "displayName": "csp_rule" + }, + { + "name": "csp-rule-template", + "namespaceType": "agnostic", + "hidden": false, + "displayName": "csp-rule-template" + } + ] +}' +_allowed_types() { + echo "$allowed_types" | jq '.types | .[].name' | sort +} diff --git a/scripts/enabled_ftr_configs.js b/scripts/enabled_ftr_configs.js new file mode 100644 index 00000000000000..41ad21a464fecd --- /dev/null +++ b/scripts/enabled_ftr_configs.js @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +require('../src/setup_node_env'); + +var yaml = require('js-yaml'); +var fs = require('fs'); + +try { + yaml.load(fs.readFileSync('.buildkite/ftr_configs.yml', 'utf8')).enabled.forEach(function (x) { + console.log(x); + }); +} catch (e) { + console.log(e); +} diff --git a/src/core/public/chrome/chrome_service.test.ts b/src/core/public/chrome/chrome_service.test.ts index f5d276ef251720..737b561bed8e30 100644 --- a/src/core/public/chrome/chrome_service.test.ts +++ b/src/core/public/chrome/chrome_service.test.ts @@ -16,7 +16,7 @@ import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { App, PublicAppInfo } from '../application'; import { applicationServiceMock } from '../application/application_service.mock'; import { notificationServiceMock } from '../notifications/notifications_service.mock'; -import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { ChromeService } from './chrome_service'; import { getAppInfo } from '../application/utils'; diff --git a/src/core/public/core_app/core_app.ts b/src/core/public/core_app/core_app.ts index 82ae595f864778..d834ece6e76cf8 100644 --- a/src/core/public/core_app/core_app.ts +++ b/src/core/public/core_app/core_app.ts @@ -11,6 +11,7 @@ import type { CoreContext } from '@kbn/core-base-browser-internal'; import type { InternalInjectedMetadataSetup } from '@kbn/core-injected-metadata-browser-internal'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import type { HttpSetup, HttpStart } from '@kbn/core-http-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { type InternalApplicationSetup, type InternalApplicationStart, @@ -18,7 +19,6 @@ import { type AppMountParameters, } from '../application'; import type { NotificationsSetup, NotificationsStart } from '../notifications'; -import type { IUiSettingsClient } from '../ui_settings'; import { renderApp as renderErrorApp, setupPublicBaseUrlConfigWarning, diff --git a/src/core/public/core_app/errors/url_overflow.test.ts b/src/core/public/core_app/errors/url_overflow.test.ts index 0e166e5d5e7eed..e68b80931d2ec2 100644 --- a/src/core/public/core_app/errors/url_overflow.test.ts +++ b/src/core/public/core_app/errors/url_overflow.test.ts @@ -11,9 +11,9 @@ import type { IBasePath } from '@kbn/core-http-browser'; import { BasePath } from '@kbn/core-http-browser-internal'; import { notificationServiceMock } from '../../notifications/notifications_service.mock'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import type { IToasts } from '../../notifications'; -import type { IUiSettingsClient } from '../../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { setupUrlOverflowDetection, URL_MAX_LENGTH, URL_WARNING_LENGTH } from './url_overflow'; diff --git a/src/core/public/core_app/errors/url_overflow.tsx b/src/core/public/core_app/errors/url_overflow.tsx index f2a525a9c2e685..4925cf18c0f776 100644 --- a/src/core/public/core_app/errors/url_overflow.tsx +++ b/src/core/public/core_app/errors/url_overflow.tsx @@ -13,9 +13,9 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type { IBasePath } from '@kbn/core-http-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { mountReactNode } from '../../utils'; import { IToasts } from '../../notifications'; -import { IUiSettingsClient } from '../../ui_settings'; const IE_REGEX = /(; ?MSIE |Edge\/\d|Trident\/[\d+\.]+;.*rv:*11\.\d+)/; export const IS_IE = IE_REGEX.test(window.navigator.userAgent); diff --git a/src/core/public/core_system.test.mocks.ts b/src/core/public/core_system.test.mocks.ts index 0d46af80b34eb3..baf4c28401c065 100644 --- a/src/core/public/core_system.test.mocks.ts +++ b/src/core/public/core_system.test.mocks.ts @@ -18,7 +18,7 @@ import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; import { notificationServiceMock } from './notifications/notifications_service.mock'; import { overlayServiceMock } from './overlays/overlay_service.mock'; import { pluginsServiceMock } from './plugins/plugins_service.mock'; -import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { renderingServiceMock } from './rendering/rendering_service.mock'; import { integrationsServiceMock } from './integrations/integrations_service.mock'; import { coreAppMock } from './core_app/core_app.mock'; @@ -76,7 +76,7 @@ export const MockUiSettingsService = uiSettingsServiceMock.create(); export const UiSettingsServiceConstructor = jest .fn() .mockImplementation(() => MockUiSettingsService); -jest.doMock('./ui_settings', () => ({ +jest.doMock('@kbn/core-ui-settings-browser-internal', () => ({ UiSettingsService: UiSettingsServiceConstructor, })); diff --git a/src/core/public/core_system.ts b/src/core/public/core_system.ts index 636c44dd3a6e08..710d7b90c4c307 100644 --- a/src/core/public/core_system.ts +++ b/src/core/public/core_system.ts @@ -23,17 +23,17 @@ import { ExecutionContextService } from '@kbn/core-execution-context-browser-int import type { FatalErrorsSetup } from '@kbn/core-fatal-errors-browser'; import { FatalErrorsService } from '@kbn/core-fatal-errors-browser-internal'; import { HttpService } from '@kbn/core-http-browser-internal'; +import { UiSettingsService } from '@kbn/core-ui-settings-browser-internal'; +import { DeprecationsService } from '@kbn/core-deprecations-browser-internal'; import { CoreSetup, CoreStart } from '.'; import { ChromeService } from './chrome'; import { NotificationsService } from './notifications'; import { OverlayService } from './overlays'; import { PluginsService } from './plugins'; -import { UiSettingsService } from './ui_settings'; import { ApplicationService } from './application'; import { RenderingService } from './rendering'; import { SavedObjectsService } from './saved_objects'; import { IntegrationsService } from './integrations'; -import { DeprecationsService } from './deprecations'; import { CoreApp } from './core_app'; import type { InternalApplicationSetup, InternalApplicationStart } from './application/types'; import { fetchOptionalMemoryInfo } from './fetch_optional_memory_info'; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 5e224c38a2dc4c..ccde84105ea893 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -42,6 +42,8 @@ import type { FatalErrorsStart, FatalErrorInfo, } from '@kbn/core-fatal-errors-browser'; +import type { UiSettingsState, IUiSettingsClient } from '@kbn/core-ui-settings-browser'; +import type { DeprecationsServiceStart } from '@kbn/core-deprecations-browser'; import type { ChromeBadge, ChromeBreadcrumb, @@ -72,17 +74,20 @@ import type { PluginInitializerContext, PluginOpaqueId, } from './plugins'; -import type { UiSettingsState, IUiSettingsClient } from './ui_settings'; import type { ApplicationSetup, Capabilities, ApplicationStart } from './application'; import type { SavedObjectsStart } from './saved_objects'; -import type { DeprecationsServiceStart } from './deprecations'; export type { PackageInfo, EnvironmentMode } from '@kbn/config'; -export type { DomainDeprecationDetails } from '../server/types'; +export type { DomainDeprecationDetails } from '@kbn/core-deprecations-common'; export type { CoreContext } from '@kbn/core-base-browser-internal'; export type { CoreSystem } from './core_system'; export { DEFAULT_APP_CATEGORIES, APP_WRAPPER_CLASS } from '../utils'; -export type { AppCategory, UiSettingsParams, UserProvidedValues, UiSettingsType } from '../types'; +export type { AppCategory } from '../types'; +export type { + UiSettingsParams, + UserProvidedValues, + UiSettingsType, +} from '@kbn/core-ui-settings-common'; export type { AnalyticsServiceSetup, AnalyticsServiceStart } from '@kbn/core-analytics-browser'; export type { @@ -210,7 +215,10 @@ export type { export type { ThemeServiceSetup, ThemeServiceStart, CoreTheme } from '@kbn/core-theme-browser'; -export type { DeprecationsServiceStart, ResolveDeprecationResponse } from './deprecations'; +export type { + DeprecationsServiceStart, + ResolveDeprecationResponse, +} from '@kbn/core-deprecations-browser'; export type { MountPoint, UnmountCallback, PublicUiSettingsParams } from './types'; diff --git a/src/core/public/integrations/integrations_service.test.ts b/src/core/public/integrations/integrations_service.test.ts index 9543012833feb1..a98e5bf1d7bc22 100644 --- a/src/core/public/integrations/integrations_service.test.ts +++ b/src/core/public/integrations/integrations_service.test.ts @@ -9,7 +9,7 @@ import { styleServiceMock, momentServiceMock } from './integrations_service.test.mocks'; import { IntegrationsService } from './integrations_service'; -import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; describe('IntegrationsService', () => { test('it wires up styles and moment', async () => { diff --git a/src/core/public/integrations/integrations_service.ts b/src/core/public/integrations/integrations_service.ts index e03546998ba7ef..ca01e1b86ce7ed 100644 --- a/src/core/public/integrations/integrations_service.ts +++ b/src/core/public/integrations/integrations_service.ts @@ -7,7 +7,7 @@ */ import type { CoreService } from '@kbn/core-base-browser-internal'; -import { IUiSettingsClient } from '../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { MomentService } from './moment'; import { StylesService } from './styles'; diff --git a/src/core/public/integrations/moment/moment_service.test.ts b/src/core/public/integrations/moment/moment_service.test.ts index 4e7c345e7e05d6..d3c4d44f100e8f 100644 --- a/src/core/public/integrations/moment/moment_service.test.ts +++ b/src/core/public/integrations/moment/moment_service.test.ts @@ -8,7 +8,7 @@ import { momentMock } from './moment_service.test.mocks'; import { MomentService } from './moment_service'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { BehaviorSubject } from 'rxjs'; describe('MomentService', () => { diff --git a/src/core/public/integrations/moment/moment_service.ts b/src/core/public/integrations/moment/moment_service.ts index 0f58c8d7fb19f8..633223864f202b 100644 --- a/src/core/public/integrations/moment/moment_service.ts +++ b/src/core/public/integrations/moment/moment_service.ts @@ -11,7 +11,7 @@ import { merge, Subscription } from 'rxjs'; import { tap } from 'rxjs/operators'; import type { CoreService } from '@kbn/core-base-browser-internal'; -import { IUiSettingsClient } from '../../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; interface StartDeps { uiSettings: IUiSettingsClient; diff --git a/src/core/public/integrations/styles/styles_service.test.ts b/src/core/public/integrations/styles/styles_service.test.ts index 5fae4b976c59ef..20625dcbc3b94a 100644 --- a/src/core/public/integrations/styles/styles_service.test.ts +++ b/src/core/public/integrations/styles/styles_service.test.ts @@ -11,7 +11,7 @@ import { BehaviorSubject } from 'rxjs'; jest.mock('!!raw-loader!./disable_animations.css', () => 'MOCK DISABLE ANIMATIONS CSS'); import { StylesService } from './styles_service'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; describe('StylesService', () => { const flushPromises = () => new Promise((resolve) => setTimeout(resolve, 100)); diff --git a/src/core/public/integrations/styles/styles_service.ts b/src/core/public/integrations/styles/styles_service.ts index 3e8f02739a8d04..9bbed46ff12f5a 100644 --- a/src/core/public/integrations/styles/styles_service.ts +++ b/src/core/public/integrations/styles/styles_service.ts @@ -9,7 +9,7 @@ import { Subscription } from 'rxjs'; import type { CoreService } from '@kbn/core-base-browser-internal'; -import { IUiSettingsClient } from '../../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; // @ts-expect-error import disableAnimationsCss from '!!raw-loader!./disable_animations.css'; diff --git a/src/core/public/mocks.ts b/src/core/public/mocks.ts index b3070d46feee8f..73e4a5a80fbde3 100644 --- a/src/core/public/mocks.ts +++ b/src/core/public/mocks.ts @@ -17,6 +17,8 @@ import { executionContextServiceMock } from '@kbn/core-execution-context-browser import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; +import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; import type { PluginInitializerContext, AppMountParameters } from '.'; // Import values from their individual modules instead. import { ScopedHistory } from './application'; @@ -24,9 +26,7 @@ import { applicationServiceMock } from './application/application_service.mock'; import { chromeServiceMock } from './chrome/chrome_service.mock'; import { notificationServiceMock } from './notifications/notifications_service.mock'; import { overlayServiceMock } from './overlays/overlay_service.mock'; -import { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; import { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; -import { deprecationsServiceMock } from './deprecations/deprecations_service.mock'; export { injectedMetadataServiceMock } from '@kbn/core-injected-metadata-browser-mocks'; export { docLinksServiceMock } from '@kbn/core-doc-links-browser-mocks'; @@ -39,11 +39,11 @@ export { httpServiceMock } from '@kbn/core-http-browser-mocks'; export { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; export { notificationServiceMock } from './notifications/notifications_service.mock'; export { overlayServiceMock } from './overlays/overlay_service.mock'; -export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; +export { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; export { scopedHistoryMock } from './application/scoped_history.mock'; export { applicationServiceMock } from './application/application_service.mock'; -export { deprecationsServiceMock } from './deprecations/deprecations_service.mock'; +export { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; function createCoreSetupMock({ basePath = '', diff --git a/src/core/public/notifications/notifications_service.ts b/src/core/public/notifications/notifications_service.ts index 859e21de5ffed0..6a5a5f81f1a40a 100644 --- a/src/core/public/notifications/notifications_service.ts +++ b/src/core/public/notifications/notifications_service.ts @@ -11,8 +11,8 @@ import { i18n } from '@kbn/i18n'; import { Subscription } from 'rxjs'; import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { I18nStart } from '@kbn/core-i18n-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { ToastsService, ToastsSetup, ToastsStart } from './toasts'; -import { IUiSettingsClient } from '../ui_settings'; import { OverlayStart } from '../overlays'; export interface SetupDeps { diff --git a/src/core/public/notifications/toasts/toasts_api.test.ts b/src/core/public/notifications/toasts/toasts_api.test.ts index d6b67bdb63f7a5..ec07f32d2f1c90 100644 --- a/src/core/public/notifications/toasts/toasts_api.test.ts +++ b/src/core/public/notifications/toasts/toasts_api.test.ts @@ -10,7 +10,7 @@ import { firstValueFrom } from 'rxjs'; import { ToastsApi } from './toasts_api'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; async function getCurrentToasts(toasts: ToastsApi) { diff --git a/src/core/public/notifications/toasts/toasts_api.tsx b/src/core/public/notifications/toasts/toasts_api.tsx index ecf32d442931c1..f78927c7f75794 100644 --- a/src/core/public/notifications/toasts/toasts_api.tsx +++ b/src/core/public/notifications/toasts/toasts_api.tsx @@ -12,10 +12,10 @@ import * as Rx from 'rxjs'; import { omitBy, isUndefined } from 'lodash'; import type { I18nStart } from '@kbn/core-i18n-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { ErrorToast } from './error_toast'; import { MountPoint } from '../../types'; import { mountReactNode } from '../../utils'; -import { IUiSettingsClient } from '../../ui_settings'; import { OverlayStart } from '../../overlays'; /** diff --git a/src/core/public/notifications/toasts/toasts_service.test.tsx b/src/core/public/notifications/toasts/toasts_service.test.tsx index d2694d076e8c06..a6854f679d086d 100644 --- a/src/core/public/notifications/toasts/toasts_service.test.tsx +++ b/src/core/public/notifications/toasts/toasts_service.test.tsx @@ -12,7 +12,7 @@ import { ToastsService } from './toasts_service'; import { ToastsApi } from './toasts_api'; import { overlayServiceMock } from '../../overlays/overlay_service.mock'; import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; const mockI18n: any = { Context: function I18nContext() { diff --git a/src/core/public/notifications/toasts/toasts_service.tsx b/src/core/public/notifications/toasts/toasts_service.tsx index 63edd560857970..692e6ec9dd5043 100644 --- a/src/core/public/notifications/toasts/toasts_service.tsx +++ b/src/core/public/notifications/toasts/toasts_service.tsx @@ -12,7 +12,7 @@ import { render, unmountComponentAtNode } from 'react-dom'; import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { I18nStart } from '@kbn/core-i18n-browser'; import { CoreContextProvider } from '@kbn/core-theme-browser-internal'; -import { IUiSettingsClient } from '../../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { GlobalToastList } from './global_toast_list'; import { ToastsApi, IToasts } from './toasts_api'; import { OverlayStart } from '../../overlays'; diff --git a/src/core/public/overlays/banners/banners_service.test.ts b/src/core/public/overlays/banners/banners_service.test.ts index d3093879f87154..69f30d99b98265 100644 --- a/src/core/public/overlays/banners/banners_service.test.ts +++ b/src/core/public/overlays/banners/banners_service.test.ts @@ -9,7 +9,7 @@ import { OverlayBannersService, OverlayBannersStart } from './banners_service'; import { take } from 'rxjs/operators'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; describe('OverlayBannersService', () => { let service: OverlayBannersStart; diff --git a/src/core/public/overlays/banners/banners_service.tsx b/src/core/public/overlays/banners/banners_service.tsx index a5436d21ef45e1..11bc995c059f82 100644 --- a/src/core/public/overlays/banners/banners_service.tsx +++ b/src/core/public/overlays/banners/banners_service.tsx @@ -11,9 +11,9 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import type { I18nStart } from '@kbn/core-i18n-browser'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { PriorityMap } from './priority_map'; import { BannersList } from './banners_list'; -import { IUiSettingsClient } from '../../ui_settings'; import { MountPoint } from '../../types'; import { UserBannerService } from './user_banner_service'; diff --git a/src/core/public/overlays/banners/user_banner_service.test.ts b/src/core/public/overlays/banners/user_banner_service.test.ts index 52d6d001712618..e0a46cbb7fd6aa 100644 --- a/src/core/public/overlays/banners/user_banner_service.test.ts +++ b/src/core/public/overlays/banners/user_banner_service.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { UserBannerService } from './user_banner_service'; import { overlayBannersServiceMock } from './banners_service.mock'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; diff --git a/src/core/public/overlays/banners/user_banner_service.tsx b/src/core/public/overlays/banners/user_banner_service.tsx index 175d43ea8ba599..7d3c9eab9b17f5 100644 --- a/src/core/public/overlays/banners/user_banner_service.tsx +++ b/src/core/public/overlays/banners/user_banner_service.tsx @@ -15,7 +15,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { EuiCallOut, EuiButton, EuiLoadingSpinner } from '@elastic/eui'; import type { I18nStart } from '@kbn/core-i18n-browser'; -import { IUiSettingsClient } from '../../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { OverlayBannersStart } from './banners_service'; interface StartDeps { diff --git a/src/core/public/overlays/overlay_service.ts b/src/core/public/overlays/overlay_service.ts index 35e839b0e175bc..07a8cbea29a373 100644 --- a/src/core/public/overlays/overlay_service.ts +++ b/src/core/public/overlays/overlay_service.ts @@ -8,7 +8,7 @@ import type { ThemeServiceStart } from '@kbn/core-theme-browser'; import type { I18nStart } from '@kbn/core-i18n-browser'; -import { IUiSettingsClient } from '../ui_settings'; +import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { OverlayBannersStart, OverlayBannersService } from './banners'; import { FlyoutService, OverlayFlyoutStart } from './flyout'; import { ModalService, OverlayModalStart } from './modal'; diff --git a/src/core/public/plugins/plugins_service.test.ts b/src/core/public/plugins/plugins_service.test.ts index d956b0e8599a30..dbc3fd253a1c1f 100644 --- a/src/core/public/plugins/plugins_service.test.ts +++ b/src/core/public/plugins/plugins_service.test.ts @@ -34,11 +34,11 @@ import { applicationServiceMock } from '../application/application_service.mock' import { overlayServiceMock } from '../overlays/overlay_service.mock'; import { chromeServiceMock } from '../chrome/chrome_service.mock'; import { fatalErrorsServiceMock } from '@kbn/core-fatal-errors-browser-mocks'; -import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import type { CoreSetup, CoreStart, PluginInitializerContext } from '..'; import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock'; -import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock'; +import { deprecationsServiceMock } from '@kbn/core-deprecations-browser-mocks'; export let mockPluginInitializers: Map; diff --git a/src/core/public/types.ts b/src/core/public/types.ts index 5b594373e3523b..8df8b2c10f179b 100644 --- a/src/core/public/types.ts +++ b/src/core/public/types.ts @@ -11,7 +11,7 @@ export type { PublicUiSettingsParams, UserProvidedValues, UiSettingsType, -} from '../types'; +} from '@kbn/core-ui-settings-common'; /** * A function that should mount DOM content inside the provided container element diff --git a/src/core/server/capabilities/capabilities_service.test.ts b/src/core/server/capabilities/capabilities_service.test.ts index b637fe493033e3..4627c22be92f1e 100644 --- a/src/core/server/capabilities/capabilities_service.test.ts +++ b/src/core/server/capabilities/capabilities_service.test.ts @@ -7,12 +7,12 @@ */ import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { mockRouter, RouterMock } from '@kbn/core-http-router-server-mocks'; import { httpServiceMock, InternalHttpServicePrebootMock, InternalHttpServiceSetupMock, -} from '../http/http_service.mock'; -import { mockRouter, RouterMock } from '../http/router/router.mock'; +} from '@kbn/core-http-server-mocks'; import { CapabilitiesService, CapabilitiesSetup } from './capabilities_service'; describe('CapabilitiesService', () => { diff --git a/src/core/server/capabilities/capabilities_service.ts b/src/core/server/capabilities/capabilities_service.ts index 059bd4027b9801..c4de3ea5e6f8da 100644 --- a/src/core/server/capabilities/capabilities_service.ts +++ b/src/core/server/capabilities/capabilities_service.ts @@ -9,8 +9,11 @@ import type { CoreContext } from '@kbn/core-base-server-internal'; import type { Logger } from '@kbn/logging'; import type { KibanaRequest } from '@kbn/core-http-server'; +import type { + InternalHttpServicePreboot, + InternalHttpServiceSetup, +} from '@kbn/core-http-server-internal'; import { Capabilities, CapabilitiesProvider, CapabilitiesSwitcher } from './types'; -import { InternalHttpServicePreboot, InternalHttpServiceSetup } from '../http'; import { mergeCapabilities } from './merge_capabilities'; import { getCapabilitiesResolver, CapabilitiesResolver } from './resolve_capabilities'; import { registerRoutes } from './routes'; diff --git a/src/core/server/capabilities/integration_tests/capabilities_service.test.ts b/src/core/server/capabilities/integration_tests/capabilities_service.test.ts index f721c3ca76e89f..fd5310a8bf444a 100644 --- a/src/core/server/capabilities/integration_tests/capabilities_service.test.ts +++ b/src/core/server/capabilities/integration_tests/capabilities_service.test.ts @@ -12,10 +12,14 @@ import { Env } from '@kbn/config'; import { getEnvOptions } from '@kbn/config-mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { HttpService, InternalHttpServicePreboot, InternalHttpServiceSetup } from '../../http'; -import { contextServiceMock } from '../../context/context_service.mock'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { + HttpService, + InternalHttpServicePreboot, + InternalHttpServiceSetup, +} from '@kbn/core-http-server-internal'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; import { CapabilitiesService, CapabilitiesSetup } from '..'; -import { createHttpServer } from '../../http/test_utils'; const coreId = Symbol('core'); diff --git a/src/core/server/capabilities/resolve_capabilities.test.ts b/src/core/server/capabilities/resolve_capabilities.test.ts index 382e217b7011fb..f2a8e7b404918b 100644 --- a/src/core/server/capabilities/resolve_capabilities.test.ts +++ b/src/core/server/capabilities/resolve_capabilities.test.ts @@ -7,9 +7,9 @@ */ import type { KibanaRequest } from '@kbn/core-http-server'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { Capabilities } from './types'; import { resolveCapabilities } from './resolve_capabilities'; -import { httpServerMock } from '../http/http_server.mocks'; describe('resolveCapabilities', () => { let defaultCaps: Capabilities; diff --git a/src/core/server/core_app/bundle_routes/bundle_route.test.ts b/src/core/server/core_app/bundle_routes/bundle_route.test.ts index 377d8432ae9a97..ee43bea44ef05b 100644 --- a/src/core/server/core_app/bundle_routes/bundle_route.test.ts +++ b/src/core/server/core_app/bundle_routes/bundle_route.test.ts @@ -8,7 +8,7 @@ import { createDynamicAssetHandlerMock } from './bundle_route.test.mocks'; -import { httpServiceMock } from '../../http/http_service.mock'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { FileHashCache } from './file_hash_cache'; import { registerRouteForBundle } from './bundles_route'; diff --git a/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts b/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts index d3cf20592befdd..12f3041ec53fb7 100644 --- a/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts +++ b/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts @@ -9,7 +9,7 @@ import { registerRouteForBundleMock } from './register_bundle_routes.test.mocks'; import { PackageInfo } from '@kbn/config'; -import { httpServiceMock } from '../../http/http_service.mock'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { InternalPluginInfo, UiPlugins } from '../../plugins'; import { registerBundleRoutes } from './register_bundle_routes'; import { FileHashCache } from './file_hash_cache'; diff --git a/src/core/server/core_app/core_app.test.ts b/src/core/server/core_app/core_app.test.ts index 327969891a2926..913ac2aa9ef676 100644 --- a/src/core/server/core_app/core_app.test.ts +++ b/src/core/server/core_app/core_app.test.ts @@ -9,12 +9,12 @@ import { registerBundleRoutesMock } from './core_app.test.mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { mockRouter } from '@kbn/core-http-router-server-mocks'; import { coreMock, httpServerMock } from '../mocks'; import { httpResourcesMock } from '../http_resources/http_resources_service.mock'; import type { UiPlugins } from '../plugins'; import { PluginType } from '../plugins'; import { CoreApp } from './core_app'; -import { mockRouter } from '../http/router/router.mock'; import { RequestHandlerContext } from '..'; const emptyPlugins = (): UiPlugins => ({ diff --git a/src/core/server/core_app/integration_tests/bundle_routes.test.ts b/src/core/server/core_app/integration_tests/bundle_routes.test.ts index 4a34b5b42cf4e7..30ff025ac2a140 100644 --- a/src/core/server/core_app/integration_tests/bundle_routes.test.ts +++ b/src/core/server/core_app/integration_tests/bundle_routes.test.ts @@ -11,10 +11,10 @@ import { readFile } from 'fs/promises'; import supertest from 'supertest'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; import type { IRouter } from '@kbn/core-http-server'; -import { contextServiceMock } from '../../context/context_service.mock'; -import { HttpService } from '../../http'; -import { createHttpServer } from '../../http/test_utils'; +import { HttpService } from '@kbn/core-http-server-internal'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; import { registerRouteForBundle } from '../bundle_routes/bundles_route'; import { FileHashCache } from '../bundle_routes/file_hash_cache'; diff --git a/src/core/server/core_usage_data/core_usage_data_service.test.ts b/src/core/server/core_usage_data/core_usage_data_service.test.ts index 50b78a6bed8999..c22f1d36673657 100644 --- a/src/core/server/core_usage_data/core_usage_data_service.test.ts +++ b/src/core/server/core_usage_data/core_usage_data_service.test.ts @@ -17,9 +17,9 @@ import { configServiceMock } from '@kbn/config-mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { config as RawLoggingConfig } from '@kbn/core-logging-server-internal'; import { config as RawElasticsearchConfig } from '../elasticsearch/elasticsearch_config'; -import { config as RawHttpConfig } from '../http/http_config'; +import { config as RawHttpConfig } from '@kbn/core-http-server-internal'; import { savedObjectsConfig as RawSavedObjectsConfig } from '../saved_objects/saved_objects_config'; -import { httpServiceMock } from '../http/http_service.mock'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { metricsServiceMock } from '../metrics/metrics_service.mock'; import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock'; diff --git a/src/core/server/core_usage_data/core_usage_data_service.ts b/src/core/server/core_usage_data/core_usage_data_service.ts index cc1fce00698476..f18dfe0dcd624d 100644 --- a/src/core/server/core_usage_data/core_usage_data_service.ts +++ b/src/core/server/core_usage_data/core_usage_data_service.ts @@ -19,9 +19,9 @@ import type { import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import type { LoggingConfigType } from '@kbn/core-logging-server-internal'; import type { Logger } from '@kbn/logging'; +import type { HttpConfigType, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { SavedObjectsServiceStart, SavedObjectTypeRegistry } from '..'; import { ElasticsearchConfigType } from '../elasticsearch/elasticsearch_config'; -import { HttpConfigType, InternalHttpServiceSetup } from '../http'; import { SavedObjectsConfigType } from '../saved_objects/saved_objects_config'; import type { diff --git a/src/core/server/deprecations/deprecations_factory.test.ts b/src/core/server/deprecations/deprecations_factory.test.ts index b05a3ea3ce4dcf..3ae83a1886e5c5 100644 --- a/src/core/server/deprecations/deprecations_factory.test.ts +++ b/src/core/server/deprecations/deprecations_factory.test.ts @@ -9,7 +9,7 @@ import type { GetDeprecationsContext } from './types'; import { DeprecationsFactory, DeprecationsFactoryConfig } from './deprecations_factory'; import { loggerMock } from '@kbn/logging-mocks'; -import { DeprecationsDetails } from './types'; +import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; describe('DeprecationsFactory', () => { let logger: ReturnType; diff --git a/src/core/server/deprecations/deprecations_factory.ts b/src/core/server/deprecations/deprecations_factory.ts index d36d61fa2eab20..514817ed1c12a8 100644 --- a/src/core/server/deprecations/deprecations_factory.ts +++ b/src/core/server/deprecations/deprecations_factory.ts @@ -8,12 +8,9 @@ import { i18n } from '@kbn/i18n'; import type { Logger } from '@kbn/logging'; +import type { DomainDeprecationDetails, DeprecationsDetails } from '@kbn/core-deprecations-common'; import { DeprecationsRegistry } from './deprecations_registry'; -import type { - DomainDeprecationDetails, - DeprecationsDetails, - GetDeprecationsContext, -} from './types'; +import type { GetDeprecationsContext } from './types'; export interface DeprecationsFactoryDeps { logger: Logger; diff --git a/src/core/server/deprecations/deprecations_registry.ts b/src/core/server/deprecations/deprecations_registry.ts index e979bb94712e6e..6e59504d0d1d71 100644 --- a/src/core/server/deprecations/deprecations_registry.ts +++ b/src/core/server/deprecations/deprecations_registry.ts @@ -7,12 +7,8 @@ */ import { withTimeout, isPromise } from '@kbn/std'; -import type { - DeprecationsDetails, - RegisterDeprecationsConfig, - GetDeprecationsContext, -} from './types'; - +import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; +import type { RegisterDeprecationsConfig, GetDeprecationsContext } from './types'; const MsInSec = 1000; export class DeprecationsRegistry { diff --git a/src/core/server/deprecations/deprecations_service.test.ts b/src/core/server/deprecations/deprecations_service.test.ts index 9fd512f325d485..cedb524b290955 100644 --- a/src/core/server/deprecations/deprecations_service.test.ts +++ b/src/core/server/deprecations/deprecations_service.test.ts @@ -9,9 +9,9 @@ import { DeprecationsFactoryMock } from './deprecations_service.test.mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; /* eslint-disable dot-notation */ import { DeprecationsService, DeprecationsSetupDeps } from './deprecations_service'; -import { httpServiceMock } from '../http/http_service.mock'; import { savedObjectsClientMock, elasticsearchServiceMock, configServiceMock } from '../mocks'; import { mockDeprecationsFactory } from './deprecations_factory.mock'; import { mockDeprecationsRegistry } from './deprecations_registry.mock'; diff --git a/src/core/server/deprecations/deprecations_service.ts b/src/core/server/deprecations/deprecations_service.ts index 9f1a119d546ec6..7b07b4c1d10dee 100644 --- a/src/core/server/deprecations/deprecations_service.ts +++ b/src/core/server/deprecations/deprecations_service.ts @@ -7,15 +7,15 @@ */ import { firstValueFrom } from 'rxjs'; - import type { Logger } from '@kbn/logging'; import type { IConfigService } from '@kbn/config'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; +import { DomainDeprecationDetails } from '@kbn/core-deprecations-common'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { DeprecationsFactory } from './deprecations_factory'; -import { DomainDeprecationDetails, RegisterDeprecationsConfig } from './types'; +import { RegisterDeprecationsConfig } from './types'; import { registerRoutes } from './routes'; import { config as deprecationConfig, DeprecationConfigType } from './deprecation_config'; -import { InternalHttpServiceSetup } from '../http'; import { IScopedClusterClient } from '../elasticsearch/client'; import { SavedObjectsClientContract } from '../saved_objects/types'; diff --git a/src/core/server/deprecations/index.ts b/src/core/server/deprecations/index.ts index 9245179d3099a2..db6fe8193867d6 100644 --- a/src/core/server/deprecations/index.ts +++ b/src/core/server/deprecations/index.ts @@ -6,15 +6,7 @@ * Side Public License, v 1. */ -export type { - BaseDeprecationDetails, - DeprecationsDetails, - ConfigDeprecationDetails, - FeatureDeprecationDetails, - GetDeprecationsContext, - RegisterDeprecationsConfig, - DeprecationsGetResponse, -} from './types'; +export type { GetDeprecationsContext, RegisterDeprecationsConfig } from './types'; export type { DeprecationsServiceSetup, diff --git a/src/core/server/deprecations/routes/get.ts b/src/core/server/deprecations/routes/get.ts index a3ea08f04d7068..1ae70e47c2b627 100644 --- a/src/core/server/deprecations/routes/get.ts +++ b/src/core/server/deprecations/routes/get.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { DeprecationsGetResponse } from '../types'; +import type { DeprecationsGetResponse } from '@kbn/core-deprecations-common'; import type { InternalDeprecationRouter } from '../internal_types'; export const registerGetRoute = (router: InternalDeprecationRouter) => { diff --git a/src/core/server/deprecations/routes/index.ts b/src/core/server/deprecations/routes/index.ts index 5c73af882085c6..8869697eebeb35 100644 --- a/src/core/server/deprecations/routes/index.ts +++ b/src/core/server/deprecations/routes/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { InternalHttpServiceSetup } from '../../http'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import type { InternalDeprecationRequestHandlerContext } from '../internal_types'; import { registerGetRoute } from './get'; diff --git a/src/core/server/deprecations/types.ts b/src/core/server/deprecations/types.ts index 3990a76f7578e0..16104c6f9cc573 100644 --- a/src/core/server/deprecations/types.ts +++ b/src/core/server/deprecations/types.ts @@ -7,102 +7,10 @@ */ import type { MaybePromise } from '@kbn/utility-types'; +import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; import type { SavedObjectsClientContract } from '../saved_objects/types'; import type { IScopedClusterClient } from '../elasticsearch'; -/** - * Base properties shared by all types of deprecations - * - * @public - */ -export interface BaseDeprecationDetails { - /** - * The title of the deprecation. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` - */ - title: string; - /** - * The description message to be displayed for the deprecation. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` - */ - message: string; - /** - * levels: - * - warning: will not break deployment upon upgrade - * - critical: needs to be addressed before upgrade. - * - fetch_error: Deprecations service failed to grab the deprecation details for the domain. - */ - level: 'warning' | 'critical' | 'fetch_error'; - /** - * (optional) Used to identify between different deprecation types. - * Example use case: in Upgrade Assistant, we may want to allow the user to sort by - * deprecation type or show each type in a separate tab. - * - * Feel free to add new types if necessary. - * Predefined types are necessary to reduce having similar definitions with different keywords - * across kibana deprecations. - */ - deprecationType?: 'config' | 'feature'; - /** (optional) link to the documentation for more details on the deprecation. */ - documentationUrl?: string; - /** (optional) specify the fix for this deprecation requires a full kibana restart. */ - requireRestart?: boolean; - /** corrective action needed to fix this deprecation. */ - correctiveActions: { - /** - * (optional) The api to be called to automatically fix the deprecation - * Each domain should implement a POST/PUT route for their plugin to - * handle their deprecations. - */ - api?: { - /** Kibana route path. Passing a query string is allowed */ - path: string; - /** Kibana route method: 'POST' or 'PUT'. */ - method: 'POST' | 'PUT'; - /** Additional details to be passed to the route. */ - body?: { - [key: string]: any; - }; - /* Allow to omit context in the request of the body */ - omitContextFromBody?: boolean; - }; - /** - * Specify a list of manual steps users need to follow to - * fix the deprecation before upgrade. Required even if an API - * corrective action is set in case the API fails. - * Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` - */ - manualSteps: string[]; - }; -} - -/** - * @public - */ -export interface ConfigDeprecationDetails extends BaseDeprecationDetails { - configPath: string; - deprecationType: 'config'; -} - -/** - * @public - */ -export interface FeatureDeprecationDetails extends BaseDeprecationDetails { - deprecationType?: 'feature' | undefined; -} - -/** - * @public - */ -export type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; - -/** - * @internal - */ -export type DomainDeprecationDetails = DeprecationsDetails & { - domainId: string; -}; - /** * @public */ @@ -117,10 +25,3 @@ export interface GetDeprecationsContext { esClient: IScopedClusterClient; savedObjectsClient: SavedObjectsClientContract; } - -/** - * @public - */ -export interface DeprecationsGetResponse { - deprecations: DomainDeprecationDetails[]; -} diff --git a/src/core/server/elasticsearch/client/cluster_client.test.ts b/src/core/server/elasticsearch/client/cluster_client.test.ts index e6d9060981cd46..78fc0494951a78 100644 --- a/src/core/server/elasticsearch/client/cluster_client.test.ts +++ b/src/core/server/elasticsearch/client/cluster_client.test.ts @@ -12,8 +12,7 @@ import { createInternalErrorHandlerMock, } from './cluster_client.test.mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { httpServerMock } from '../../http/http_server.mocks'; -import { httpServiceMock } from '../../http/http_service.mock'; +import { httpServerMock, httpServiceMock } from '@kbn/core-http-server-mocks'; import { elasticsearchClientMock } from './mocks'; import { ClusterClient } from './cluster_client'; import { ElasticsearchClientConfig } from './client_config'; diff --git a/src/core/server/elasticsearch/client/cluster_client.ts b/src/core/server/elasticsearch/client/cluster_client.ts index 2412bf825d685b..2eaaa0d6efca4e 100644 --- a/src/core/server/elasticsearch/client/cluster_client.ts +++ b/src/core/server/elasticsearch/client/cluster_client.ts @@ -9,8 +9,12 @@ import type { Client } from '@elastic/elasticsearch'; import type { Logger } from '@kbn/logging'; import type { Headers, IAuthHeadersStorage } from '@kbn/core-http-server'; -import { isKibanaRequest, isRealRequest } from '../../http'; -import { ensureRawRequest, filterHeaders } from '../../http/router'; +import { + ensureRawRequest, + filterHeaders, + isKibanaRequest, + isRealRequest, +} from '@kbn/core-http-router-server-internal'; import { ScopeableRequest } from '../types'; import { ElasticsearchClient } from './types'; import { configureClient } from './configure_client'; diff --git a/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts b/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts index 547aae32247561..ec00badbcdf287 100644 --- a/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts +++ b/src/core/server/elasticsearch/client/get_ecs_response_log.test.ts @@ -68,6 +68,28 @@ describe('getEcsResponseLog', () => { `); }); + test('redacts x-elastic-app-auth headers by default', () => { + const event = createResponseEvent({ + requestParams: { headers: { 'x-elastic-app-auth': 'hello', 'user-agent': 'world' } }, + response: { headers: { 'content-length': '123', 'x-elastic-app-auth': 'abc' } }, + }); + const log = getEcsResponseLog(event); + // @ts-expect-error ECS custom field + expect(log.http.request.headers).toMatchInlineSnapshot(` + Object { + "user-agent": "world", + "x-elastic-app-auth": "[REDACTED]", + } + `); + // @ts-expect-error ECS custom field + expect(log.http.response.headers).toMatchInlineSnapshot(` + Object { + "content-length": "123", + "x-elastic-app-auth": "[REDACTED]", + } + `); + }); + test('does not mutate original headers', () => { const reqHeaders = { a: 'foo', b: ['hello', 'world'] }; const resHeaders = { c: 'bar' }; diff --git a/src/core/server/elasticsearch/client/get_ecs_response_log.ts b/src/core/server/elasticsearch/client/get_ecs_response_log.ts index 1a75967cf66d75..b977f03a9a062c 100644 --- a/src/core/server/elasticsearch/client/get_ecs_response_log.ts +++ b/src/core/server/elasticsearch/client/get_ecs_response_log.ts @@ -9,7 +9,9 @@ import { type IncomingHttpHeaders } from 'http'; import { type DiagnosticResult } from '@elastic/elasticsearch'; import { type LogMeta } from '@kbn/logging'; -const FORBIDDEN_HEADERS = ['authorization', 'cookie', 'set-cookie']; +// If you are updating these, consider whether they should also be updated in the +// http service `getResponseLog` +const FORBIDDEN_HEADERS = ['authorization', 'cookie', 'set-cookie', 'x-elastic-app-auth']; const REDACTED_HEADER_TEXT = '[REDACTED]'; // We are excluding sensitive headers by default, until we have a log filtering mechanism. diff --git a/src/core/server/elasticsearch/client/retry_unauthorized.test.ts b/src/core/server/elasticsearch/client/retry_unauthorized.test.ts index 16b30a25ea4175..8b8ee4e7b2f463 100644 --- a/src/core/server/elasticsearch/client/retry_unauthorized.test.ts +++ b/src/core/server/elasticsearch/client/retry_unauthorized.test.ts @@ -8,7 +8,7 @@ import type { UnauthorizedError } from '@kbn/es-errors'; import type { SetAuthHeaders } from '@kbn/core-http-server'; -import { httpServerMock } from '../../http/http_server.mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { createInternalErrorHandler, isRetryResult, diff --git a/src/core/server/elasticsearch/client/retry_unauthorized.ts b/src/core/server/elasticsearch/client/retry_unauthorized.ts index a6ef50491e1dd4..568bc530e2fe8a 100644 --- a/src/core/server/elasticsearch/client/retry_unauthorized.ts +++ b/src/core/server/elasticsearch/client/retry_unauthorized.ts @@ -9,7 +9,7 @@ import { MaybePromise } from '@kbn/utility-types'; import { UnauthorizedError } from '@kbn/es-errors'; import type { AuthHeaders, KibanaRequest, SetAuthHeaders } from '@kbn/core-http-server'; -import { isRealRequest } from '../../http'; +import { isRealRequest } from '@kbn/core-http-router-server-internal'; import { ScopeableRequest } from '../types'; /** diff --git a/src/core/server/elasticsearch/elasticsearch_service.test.ts b/src/core/server/elasticsearch/elasticsearch_service.test.ts index 61f9cb92fb6431..b40a157a4ca2fc 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.test.ts +++ b/src/core/server/elasticsearch/elasticsearch_service.test.ts @@ -31,7 +31,7 @@ import type { CoreContext } from '@kbn/core-base-server-internal'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { httpServiceMock } from '../http/http_service.mock'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { configSchema, ElasticsearchConfig } from './elasticsearch_config'; import { ElasticsearchService, SetupDeps } from './elasticsearch_service'; import { elasticsearchClientMock } from './client/mocks'; diff --git a/src/core/server/elasticsearch/elasticsearch_service.ts b/src/core/server/elasticsearch/elasticsearch_service.ts index 318a2a47d16b9a..a60069d644ca28 100644 --- a/src/core/server/elasticsearch/elasticsearch_service.ts +++ b/src/core/server/elasticsearch/elasticsearch_service.ts @@ -17,11 +17,11 @@ import type { IExecutionContext, } from '@kbn/core-execution-context-server-internal'; import type { IAuthHeadersStorage } from '@kbn/core-http-server'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { registerAnalyticsContextProvider } from './register_analytics_context_provider'; import { ClusterClient, ElasticsearchClientConfig } from './client'; import { ElasticsearchConfig, ElasticsearchConfigType } from './elasticsearch_config'; -import type { InternalHttpServiceSetup } from '../http'; import { InternalElasticsearchServicePreboot, InternalElasticsearchServiceSetup, diff --git a/src/core/server/http/integration_tests/cookie_session_storage.test.ts b/src/core/server/http/integration_tests/cookie_session_storage.test.ts index 7eb522d5de3885..713ed2dc9edfde 100644 --- a/src/core/server/http/integration_tests/cookie_session_storage.test.ts +++ b/src/core/server/http/integration_tests/cookie_session_storage.test.ts @@ -16,15 +16,11 @@ import { Env } from '@kbn/config'; import { getEnvOptions, configServiceMock } from '@kbn/config-mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; - import type { CoreContext } from '@kbn/core-base-server-internal'; -import { HttpService } from '../http_service'; - -import { contextServiceMock } from '../../context/context_service.mock'; -import { httpServerMock } from '../http_server.mocks'; - -import { createCookieSessionStorageFactory } from '../cookie_session_storage'; -import { ensureRawRequest } from '../router'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; +import { HttpService, createCookieSessionStorageFactory } from '@kbn/core-http-server-internal'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; let server: HttpService; diff --git a/src/core/server/http/integration_tests/http_server.test.ts b/src/core/server/http/integration_tests/http_server.test.ts index c77f17880cdba5..1b9da1f0fdddeb 100644 --- a/src/core/server/http/integration_tests/http_server.test.ts +++ b/src/core/server/http/integration_tests/http_server.test.ts @@ -12,9 +12,8 @@ import moment from 'moment'; import { of } from 'rxjs'; import { ByteSizeValue } from '@kbn/config-schema'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { HttpConfig } from '../http_config'; -import { Router } from '../router'; -import { HttpServer } from '../http_server'; +import { Router } from '@kbn/core-http-router-server-internal'; +import { HttpServer, HttpConfig } from '@kbn/core-http-server-internal'; describe('Http server', () => { let server: HttpServer; diff --git a/src/core/server/http/integration_tests/lifecycle.test.ts b/src/core/server/http/integration_tests/lifecycle.test.ts index 15ae184ba5e748..2833d9f0bad138 100644 --- a/src/core/server/http/integration_tests/lifecycle.test.ts +++ b/src/core/server/http/integration_tests/lifecycle.test.ts @@ -11,12 +11,10 @@ import { parse as parseCookie } from 'tough-cookie'; import { schema } from '@kbn/config-schema'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; - -import { ensureRawRequest } from '../router'; -import { HttpService } from '../http_service'; - -import { contextServiceMock } from '../../context/context_service.mock'; -import { createHttpServer } from '../test_utils'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; +import { HttpService } from '@kbn/core-http-server-internal'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; let server: HttpService; diff --git a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts index bdb67776e3da9a..6ba3f971d3db70 100644 --- a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts +++ b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts @@ -12,12 +12,9 @@ import { BehaviorSubject } from 'rxjs'; import { ByteSizeValue } from '@kbn/config-schema'; import { configServiceMock } from '@kbn/config-mocks'; import type { IRouter, RouteRegistrar } from '@kbn/core-http-server'; - -import { createHttpServer } from '../test_utils'; -import { HttpService } from '../http_service'; -import { HttpServerSetup } from '../http_server'; - -import { contextServiceMock } from '../../context/context_service.mock'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; +import { HttpService, HttpServerSetup } from '@kbn/core-http-server-internal'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/src/core/server/http/integration_tests/preboot.test.ts b/src/core/server/http/integration_tests/preboot.test.ts index d92ca5913f253f..d6ba19d066a7c8 100644 --- a/src/core/server/http/integration_tests/preboot.test.ts +++ b/src/core/server/http/integration_tests/preboot.test.ts @@ -10,9 +10,9 @@ import supertest from 'supertest'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { contextServiceMock } from '../../context/context_service.mock'; -import { createHttpServer } from '../test_utils'; -import { HttpService } from '../http_service'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; +import { HttpService } from '@kbn/core-http-server-internal'; let server: HttpService; const prebootDeps = { diff --git a/src/core/server/http/integration_tests/request.test.ts b/src/core/server/http/integration_tests/request.test.ts index 3bdf2e38a54470..3e09de6e7749df 100644 --- a/src/core/server/http/integration_tests/request.test.ts +++ b/src/core/server/http/integration_tests/request.test.ts @@ -13,11 +13,9 @@ jest.mock('uuid', () => ({ import supertest from 'supertest'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; - -import { HttpService } from '../http_service'; - -import { contextServiceMock } from '../../context/context_service.mock'; -import { createHttpServer } from '../test_utils'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import type { HttpService } from '@kbn/core-http-server-internal'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; import { schema } from '@kbn/config-schema'; let server: HttpService; diff --git a/src/core/server/http/integration_tests/router.test.ts b/src/core/server/http/integration_tests/router.test.ts index de3f45350d90e3..6e0740973d0c2b 100644 --- a/src/core/server/http/integration_tests/router.test.ts +++ b/src/core/server/http/integration_tests/router.test.ts @@ -13,10 +13,10 @@ import { schema } from '@kbn/config-schema'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { contextServiceMock } from '../../context/context_service.mock'; -import { createHttpServer } from '../test_utils'; -import { HttpService } from '../http_service'; -import { Router } from '../router'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { Router } from '@kbn/core-http-router-server-internal'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; +import type { HttpService } from '@kbn/core-http-server-internal'; import { loggerMock } from '@kbn/logging-mocks'; let server: HttpService; diff --git a/src/core/server/http/test_utils.ts b/src/core/server/http/test_utils.ts deleted file mode 100644 index f7d43a39287c9c..00000000000000 --- a/src/core/server/http/test_utils.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { BehaviorSubject } from 'rxjs'; -import moment from 'moment'; -import { REPO_ROOT } from '@kbn/utils'; -import { ByteSizeValue } from '@kbn/config-schema'; -import { Env } from '@kbn/config'; -import { getEnvOptions, configServiceMock } from '@kbn/config-mocks'; -import type { CoreContext } from '@kbn/core-base-server-internal'; -import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { HttpService } from './http_service'; - -const coreId = Symbol('core'); -const env = Env.createDefault(REPO_ROOT, getEnvOptions()); - -const logger = loggingSystemMock.create(); - -const configService = configServiceMock.create(); -configService.atPath.mockImplementation((path) => { - if (path === 'server') { - return new BehaviorSubject({ - hosts: ['localhost'], - maxPayload: new ByteSizeValue(1024), - autoListen: true, - ssl: { - enabled: false, - }, - cors: { - enabled: false, - }, - compression: { enabled: true }, - xsrf: { - disableProtection: true, - allowlist: [], - }, - securityResponseHeaders: {}, - customResponseHeaders: {}, - requestId: { - allowFromAnyIp: true, - ipAllowlist: [], - }, - shutdownTimeout: moment.duration(30, 'seconds'), - keepaliveTimeout: 120_000, - socketTimeout: 120_000, - } as any); - } - if (path === 'externalUrl') { - return new BehaviorSubject({ - policy: [], - } as any); - } - if (path === 'csp') { - return new BehaviorSubject({ - strict: false, - disableEmbedding: false, - warnLegacyBrowsers: true, - }); - } - throw new Error(`Unexpected config path: ${path}`); -}); - -const defaultContext: CoreContext = { - coreId, - env, - logger, - configService, -}; - -export const createCoreContext = (overrides: Partial = {}): CoreContext => ({ - ...defaultContext, - ...overrides, -}); - -/** - * Creates a concrete HttpServer with a mocked context. - */ -export const createHttpServer = (overrides: Partial = {}): HttpService => { - return new HttpService(createCoreContext(overrides)); -}; diff --git a/src/core/server/http_resources/http_resources_service.mock.ts b/src/core/server/http_resources/http_resources_service.mock.ts index a2ca0aa2465828..6c50d720ceab29 100644 --- a/src/core/server/http_resources/http_resources_service.mock.ts +++ b/src/core/server/http_resources/http_resources_service.mock.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { httpServerMock } from '../http/http_server.mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { HttpResources, HttpResourcesServiceToolkit } from './types'; const createHttpResourcesMock = (): jest.Mocked => ({ diff --git a/src/core/server/http_resources/http_resources_service.test.ts b/src/core/server/http_resources/http_resources_service.test.ts index d2488c618b7b3c..47b0ef049485b8 100644 --- a/src/core/server/http_resources/http_resources_service.test.ts +++ b/src/core/server/http_resources/http_resources_service.test.ts @@ -11,9 +11,8 @@ import { getApmConfigMock } from './http_resources_service.test.mocks'; import type { RouteConfig } from '@kbn/core-http-server'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks'; import { coreMock } from '../mocks'; -import { httpServiceMock } from '../http/http_service.mock'; -import { httpServerMock } from '../http/http_server.mocks'; import { renderingMock } from '../rendering/rendering_service.mock'; import { HttpResourcesService, PrebootDeps, SetupDeps } from './http_resources_service'; import { httpResourcesMock } from './http_resources_service.mock'; diff --git a/src/core/server/http_resources/http_resources_service.ts b/src/core/server/http_resources/http_resources_service.ts index fa48fc33394a12..7e95dc9e302d9c 100644 --- a/src/core/server/http_resources/http_resources_service.ts +++ b/src/core/server/http_resources/http_resources_service.ts @@ -14,8 +14,11 @@ import type { KibanaRequest, KibanaResponseFactory, } from '@kbn/core-http-server'; +import type { + InternalHttpServiceSetup, + InternalHttpServicePreboot, +} from '@kbn/core-http-server-internal'; import { RequestHandlerContext } from '..'; -import { InternalHttpServiceSetup, InternalHttpServicePreboot } from '../http'; import { InternalRenderingServicePreboot, InternalRenderingServiceSetup } from '../rendering'; import { InternalHttpResourcesSetup, diff --git a/src/core/server/i18n/i18n_service.ts b/src/core/server/i18n/i18n_service.ts index 1accf75f252d6a..5d64095cc229ac 100644 --- a/src/core/server/i18n/i18n_service.ts +++ b/src/core/server/i18n/i18n_service.ts @@ -10,7 +10,10 @@ import { firstValueFrom } from 'rxjs'; import type { Logger } from '@kbn/logging'; import type { IConfigService } from '@kbn/config'; import type { CoreContext } from '@kbn/core-base-server-internal'; -import { InternalHttpServicePreboot, InternalHttpServiceSetup } from '../http'; +import type { + InternalHttpServicePreboot, + InternalHttpServiceSetup, +} from '@kbn/core-http-server-internal'; import { config as i18nConfigDef, I18nConfigType } from './i18n_config'; import { getKibanaTranslationFiles } from './get_kibana_translation_files'; import { initTranslations } from './init_translations'; diff --git a/src/core/server/index.ts b/src/core/server/index.ts index e87c814dca851e..82d98f875241e7 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -141,7 +141,8 @@ export type { ElasticsearchRequestHandlerContext, } from './elasticsearch'; -export { kibanaResponseFactory, CoreKibanaRequest, CspConfig } from './http'; +export { CspConfig } from '@kbn/core-http-server-internal'; +export { CoreKibanaRequest, kibanaResponseFactory } from '@kbn/core-http-router-server-internal'; export type { AuthenticationHandler, @@ -404,17 +405,13 @@ export { EventLoopDelaysMonitor } from './metrics'; export type { I18nServiceSetup } from './i18n'; export type { - BaseDeprecationDetails, - DeprecationsDetails, - ConfigDeprecationDetails, - FeatureDeprecationDetails, RegisterDeprecationsConfig, GetDeprecationsContext, DeprecationsServiceSetup, DeprecationsClient, DeprecationsRequestHandlerContext, } from './deprecations'; - +export type { DeprecationsDetails } from '@kbn/core-deprecations-common'; export type { AppCategory } from '../types'; export { DEFAULT_APP_CATEGORIES, APP_WRAPPER_CLASS } from '../utils'; diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts index 298fa83e0b2d7a..ca02ad45eacf40 100644 --- a/src/core/server/internal_types.ts +++ b/src/core/server/internal_types.ts @@ -21,19 +21,22 @@ import type { InternalExecutionContextSetup, InternalExecutionContextStart, } from '@kbn/core-execution-context-server-internal'; -import { InternalPrebootServicePreboot } from '@kbn/core-preboot-server-internal'; +import type { InternalPrebootServicePreboot } from '@kbn/core-preboot-server-internal'; +import type { + InternalContextPreboot, + InternalContextSetup, +} from '@kbn/core-http-context-server-internal'; +import type { + InternalHttpServicePreboot, + InternalHttpServiceSetup, + InternalHttpServiceStart, +} from '@kbn/core-http-server-internal'; import { CapabilitiesSetup, CapabilitiesStart } from './capabilities'; -import { InternalContextPreboot, InternalContextSetup } from './context'; import { InternalElasticsearchServicePreboot, InternalElasticsearchServiceSetup, InternalElasticsearchServiceStart, } from './elasticsearch'; -import { - InternalHttpServicePreboot, - InternalHttpServiceSetup, - InternalHttpServiceStart, -} from './http'; import { InternalSavedObjectsServiceSetup, InternalSavedObjectsServiceStart, diff --git a/src/core/server/metrics/integration_tests/server_collector.test.ts b/src/core/server/metrics/integration_tests/server_collector.test.ts index 26f524b751df22..73be33c868cf5e 100644 --- a/src/core/server/metrics/integration_tests/server_collector.test.ts +++ b/src/core/server/metrics/integration_tests/server_collector.test.ts @@ -10,10 +10,10 @@ import { BehaviorSubject, Subject } from 'rxjs'; import { take, filter } from 'rxjs/operators'; import supertest from 'supertest'; import { Server as HapiServer } from '@hapi/hapi'; -import { createHttpServer } from '../../http/test_utils'; +import { createHttpServer } from '@kbn/core-http-server-mocks'; import type { IRouter } from '@kbn/core-http-server'; -import { HttpService } from '../../http'; -import { contextServiceMock } from '../../context/context_service.mock'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import type { HttpService } from '@kbn/core-http-server-internal'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { ServerMetricsCollector } from '../collectors/server'; import { setTimeout as setTimeoutPromise } from 'timers/promises'; diff --git a/src/core/server/metrics/metrics_service.test.ts b/src/core/server/metrics/metrics_service.test.ts index f2e1a278e9bc18..de78b534b2dc7a 100644 --- a/src/core/server/metrics/metrics_service.test.ts +++ b/src/core/server/metrics/metrics_service.test.ts @@ -11,9 +11,9 @@ import moment from 'moment'; import { configServiceMock } from '@kbn/config-mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { mockOpsCollector } from './metrics_service.test.mocks'; import { MetricsService } from './metrics_service'; -import { httpServiceMock } from '../http/http_service.mock'; import { take } from 'rxjs/operators'; const testInterval = 100; diff --git a/src/core/server/metrics/metrics_service.ts b/src/core/server/metrics/metrics_service.ts index f2515b29e27448..60229bde6c0ee6 100644 --- a/src/core/server/metrics/metrics_service.ts +++ b/src/core/server/metrics/metrics_service.ts @@ -9,7 +9,7 @@ import { firstValueFrom, ReplaySubject } from 'rxjs'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import { Logger } from '@kbn/logging'; -import { InternalHttpServiceSetup } from '../http'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { InternalMetricsServiceSetup, InternalMetricsServiceStart, OpsMetrics } from './types'; import { OpsMetricsCollector } from './ops_metrics_collector'; import { opsConfig, OpsConfigType } from './ops_config'; diff --git a/src/core/server/metrics/ops_metrics_collector.test.ts b/src/core/server/metrics/ops_metrics_collector.test.ts index 78160729f7bdc3..cd80c35b37f868 100644 --- a/src/core/server/metrics/ops_metrics_collector.test.ts +++ b/src/core/server/metrics/ops_metrics_collector.test.ts @@ -7,12 +7,12 @@ */ import { loggerMock } from '@kbn/logging-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { mockOsCollector, mockProcessCollector, mockServerCollector, } from './ops_metrics_collector.test.mocks'; -import { httpServiceMock } from '../http/http_service.mock'; import { OpsMetricsCollector } from './ops_metrics_collector'; describe('OpsMetricsCollector', () => { diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 2d8d34be93e5ca..9e693ac7600e83 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -18,6 +18,8 @@ import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; import { nodeServiceMock } from '@kbn/core-node-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import type { PluginInitializerContext, CoreSetup, @@ -27,9 +29,7 @@ import type { RequestHandlerContext, } from '.'; import { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; -import { httpServiceMock } from './http/http_service.mock'; import { httpResourcesMock } from './http_resources/http_resources_service.mock'; -import { contextServiceMock } from './context/context_service.mock'; import { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; import { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock'; import { typeRegistryMock as savedObjectsTypeRegistryMock } from './saved_objects/saved_objects_type_registry.mock'; @@ -42,13 +42,12 @@ import { statusServiceMock } from './status/status_service.mock'; import { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_service.mock'; import { i18nServiceMock } from './i18n/i18n_service.mock'; import { deprecationsServiceMock } from './deprecations/deprecations_service.mock'; + export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks'; export { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -export { httpServerMock } from './http/http_server.mocks'; +export { httpServerMock, sessionStorageMock, httpServiceMock } from '@kbn/core-http-server-mocks'; export { httpResourcesMock } from './http_resources/http_resources_service.mock'; -export { sessionStorageMock } from './http/cookie_session_storage.mocks'; export { elasticsearchServiceMock } from './elasticsearch/elasticsearch_service.mock'; -export { httpServiceMock } from './http/http_service.mock'; export { savedObjectsRepositoryMock } from './saved_objects/service/lib/repository.mock'; export { savedObjectsServiceMock } from './saved_objects/saved_objects_service.mock'; export { savedObjectsClientMock } from './saved_objects/service/saved_objects_client.mock'; @@ -58,7 +57,7 @@ export { uiSettingsServiceMock } from './ui_settings/ui_settings_service.mock'; export { metricsServiceMock } from './metrics/metrics_service.mock'; export { renderingMock } from './rendering/rendering_service.mock'; export { statusServiceMock } from './status/status_service.mock'; -export { contextServiceMock } from './context/context_service.mock'; +export { contextServiceMock } from '@kbn/core-http-context-server-mocks'; export { capabilitiesServiceMock } from './capabilities/capabilities_service.mock'; export { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_service.mock'; export { i18nServiceMock } from './i18n/i18n_service.mock'; diff --git a/src/core/server/node/integration_tests/logging.test.ts b/src/core/server/node/integration_tests/logging.test.ts new file mode 100644 index 00000000000000..931e56beeab733 --- /dev/null +++ b/src/core/server/node/integration_tests/logging.test.ts @@ -0,0 +1,70 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as kbnTestServer from '../../../test_helpers/kbn_server'; + +function createRootWithRoles(roles: string[]) { + return kbnTestServer.createRoot({ + node: { + roles, + }, + logging: { + appenders: { + 'test-console': { + type: 'console', + layout: { + type: 'json', + }, + }, + }, + root: { + appenders: ['test-console'], + level: 'info', + }, + }, + }); +} + +describe('node service global context', () => { + const validRoles = [['ui', 'background_tasks'], ['ui'], ['background_tasks']]; + + validRoles.forEach((roles) => { + describe(`with node.roles: ${roles}`, () => { + let root: ReturnType; + let mockConsoleLog: jest.SpyInstance; + + beforeAll(async () => { + mockConsoleLog = jest.spyOn(global.console, 'log'); + root = createRootWithRoles(roles); + + await root.preboot(); + await root.setup(); + }, 30000); + + beforeEach(() => { + mockConsoleLog.mockClear(); + }); + + afterAll(async () => { + mockConsoleLog.mockRestore(); + await root.shutdown(); + }); + + it('logs the correct roles in service.node.roles', () => { + const logger = root.logger.get('foo.bar'); + + logger.info('test info'); + + expect(mockConsoleLog).toHaveBeenCalledTimes(1); + expect(JSON.parse(mockConsoleLog.mock.calls[0][0])).toEqual( + expect.objectContaining({ service: { node: { roles } } }) + ); + }); + }); + }); +}); diff --git a/src/core/server/rendering/__mocks__/params.ts b/src/core/server/rendering/__mocks__/params.ts index 7da44d717723f2..47c5612555e481 100644 --- a/src/core/server/rendering/__mocks__/params.ts +++ b/src/core/server/rendering/__mocks__/params.ts @@ -7,8 +7,8 @@ */ import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { elasticsearchServiceMock } from '../../elasticsearch/elasticsearch_service.mock'; -import { httpServiceMock } from '../../http/http_service.mock'; import { pluginServiceMock } from '../../plugins/plugins_service.mock'; import { statusServiceMock } from '../../status/status_service.mock'; diff --git a/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts b/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts index 7df28449fd39d7..54b5b539bbd680 100644 --- a/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts +++ b/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts @@ -16,8 +16,7 @@ import { import { PackageInfo } from '@kbn/config'; import { AuthStatus } from '@kbn/core-http-server'; import { UiPlugins } from '../../plugins'; -import { httpServiceMock } from '../../http/http_service.mock'; -import { httpServerMock } from '../../http/http_server.mocks'; +import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks'; import { uiSettingsServiceMock } from '../../ui_settings/ui_settings_service.mock'; import { bootstrapRendererFactory, BootstrapRenderer } from './bootstrap_renderer'; diff --git a/src/core/server/rendering/rendering_service.test.ts b/src/core/server/rendering/rendering_service.test.ts index eb5614d5407540..477e169b3328fc 100644 --- a/src/core/server/rendering/rendering_service.test.ts +++ b/src/core/server/rendering/rendering_service.test.ts @@ -15,8 +15,8 @@ import { import { load } from 'cheerio'; -import { httpServerMock } from '../http/http_server.mocks'; -import { mockRouter } from '../http/router/router.mock'; +import { mockRouter } from '@kbn/core-http-router-server-mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock'; import { mockRenderingServiceParams, diff --git a/src/core/server/rendering/types.ts b/src/core/server/rendering/types.ts index 8a2bfa01f7a84d..d6c660f3b5ec1b 100644 --- a/src/core/server/rendering/types.ts +++ b/src/core/server/rendering/types.ts @@ -10,8 +10,11 @@ import { i18n } from '@kbn/i18n'; import type { ThemeVersion } from '@kbn/ui-shared-deps-npm'; import type { InjectedMetadata } from '@kbn/core-injected-metadata-common-internal'; import type { KibanaRequest, ICspConfig } from '@kbn/core-http-server'; +import type { + InternalHttpServicePreboot, + InternalHttpServiceSetup, +} from '@kbn/core-http-server-internal'; import { InternalElasticsearchServiceSetup } from '../elasticsearch'; -import { InternalHttpServicePreboot, InternalHttpServiceSetup } from '../http'; import { UiPlugins } from '../plugins'; import { IUiSettingsClient } from '../ui_settings'; import type { InternalStatusServiceSetup } from '../status'; diff --git a/src/core/server/saved_objects/deprecations/unknown_object_types.ts b/src/core/server/saved_objects/deprecations/unknown_object_types.ts index 9e48c84860b48e..d8762ebcfd1bd2 100644 --- a/src/core/server/saved_objects/deprecations/unknown_object_types.ts +++ b/src/core/server/saved_objects/deprecations/unknown_object_types.ts @@ -7,7 +7,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { DeprecationsDetails } from '../../deprecations'; +import type { DeprecationsDetails } from '@kbn/core-deprecations-common'; import { IScopedClusterClient } from '../../elasticsearch'; import { getAggregatedTypesDocuments } from '../migrations/actions/check_for_unknown_docs'; import { addExcludedTypesToBoolQuery } from '../migrations/model/helpers'; diff --git a/src/core/server/saved_objects/export/apply_export_transforms.test.ts b/src/core/server/saved_objects/export/apply_export_transforms.test.ts index 47bdf337c2b587..561c1ee1aed8b6 100644 --- a/src/core/server/saved_objects/export/apply_export_transforms.test.ts +++ b/src/core/server/saved_objects/export/apply_export_transforms.test.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ +import { CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { SavedObject } from '../../../types'; -import { CoreKibanaRequest } from '../../http'; -import { httpServerMock } from '../../http/http_server.mocks'; import { applyExportTransforms } from './apply_export_transforms'; import { SavedObjectsExportTransform } from './types'; diff --git a/src/core/server/saved_objects/export/collect_exported_objects.test.ts b/src/core/server/saved_objects/export/collect_exported_objects.test.ts index fbb6c1a9f786ec..7a483d3a9af207 100644 --- a/src/core/server/saved_objects/export/collect_exported_objects.test.ts +++ b/src/core/server/saved_objects/export/collect_exported_objects.test.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { applyExportTransformsMock } from './collect_exported_objects.test.mocks'; import { savedObjectsClientMock } from '../../mocks'; -import { httpServerMock } from '../../http/http_server.mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { SavedObject, SavedObjectError } from '../../../types'; import { SavedObjectTypeRegistry } from '../saved_objects_type_registry'; diff --git a/src/core/server/saved_objects/export/saved_objects_exporter.test.ts b/src/core/server/saved_objects/export/saved_objects_exporter.test.ts index 21c7eaa08090bb..6b0e0e3b277d93 100644 --- a/src/core/server/saved_objects/export/saved_objects_exporter.test.ts +++ b/src/core/server/saved_objects/export/saved_objects_exporter.test.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ +import { httpServerMock } from '@kbn/core-http-server-mocks'; import type { SavedObject } from '../../../types'; import { SavedObjectsExporter } from './saved_objects_exporter'; import { savedObjectsClientMock } from '../service/saved_objects_client.mock'; import { SavedObjectTypeRegistry } from '../saved_objects_type_registry'; -import { httpServerMock } from '../../http/http_server.mocks'; import { loggerMock, MockedLogger } from '@kbn/logging-mocks'; import { Readable } from 'stream'; import { createPromiseFromStreams, createConcatStream } from '@kbn/utils'; diff --git a/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts b/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts index 0d8d76b45a57b3..3aca162218950c 100644 --- a/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts +++ b/src/core/server/saved_objects/migrations/actions/read_with_pit.test.ts @@ -16,19 +16,54 @@ describe('readWithPit', () => { beforeEach(() => { jest.clearAllMocks(); }); + it('calls esClient.search with the appropriate params', async () => { + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createSuccessTransportRequestPromise({ + hits: { + total: 0, + hits: [], + }, + }) + ); + + await readWithPit({ + client, + pitId: 'pitId', + query: { match_all: {} }, + batchSize: 10_000, + })(); + + expect(client.search).toHaveBeenCalledTimes(1); + expect(client.search).toHaveBeenCalledWith({ + allow_partial_search_results: false, + pit: { + id: 'pitId', + keep_alive: '10m', + }, + query: { + match_all: {}, + }, + search_after: undefined, + seq_no_primary_term: undefined, + size: 10000, + sort: '_shard_doc:asc', + track_total_hits: true, + }); + }); - // Create a mock client that rejects all methods with a 503 status code - // response. - const retryableError = new EsErrors.ResponseError( - elasticsearchClientMock.createApiResponse({ - statusCode: 503, - body: { error: { type: 'es_type', reason: 'es_reason' } }, - }) - ); - const client = elasticsearchClientMock.createInternalClient( - elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) - ); it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + const task = readWithPit({ client, pitId: 'pitId', diff --git a/src/core/server/saved_objects/migrations/actions/read_with_pit.ts b/src/core/server/saved_objects/migrations/actions/read_with_pit.ts index 013cd59271ee1c..9ba54d58d37a80 100644 --- a/src/core/server/saved_objects/migrations/actions/read_with_pit.ts +++ b/src/core/server/saved_objects/migrations/actions/read_with_pit.ts @@ -49,24 +49,20 @@ export const readWithPit = () => { return client .search({ + allow_partial_search_results: false, seq_no_primary_term: seqNoPrimaryTerm, - body: { - // Sort fields are required to use searchAfter - sort: { - // the most efficient option as order is not important for the migration - _shard_doc: { order: 'asc' }, - }, - pit: { id: pitId, keep_alive: pitKeepAlive }, - size: batchSize, - search_after: searchAfter, - /** - * We want to know how many documents we need to process so we can log the progress. - * But we also want to increase the performance of these requests, - * so we ask ES to report the total count only on the first request (when searchAfter does not exist) - */ - track_total_hits: typeof searchAfter === 'undefined', - query, - }, + // Sort fields are required to use searchAfter + sort: '_shard_doc:asc', + pit: { id: pitId, keep_alive: pitKeepAlive }, + size: batchSize, + search_after: searchAfter, + /** + * We want to know how many documents we need to process so we can log the progress. + * But we also want to increase the performance of these requests, + * so we ask ES to report the total count only on the first request (when searchAfter does not exist) + */ + track_total_hits: typeof searchAfter === 'undefined', + query, }) .then((body) => { const totalHits = diff --git a/src/core/server/saved_objects/routes/index.ts b/src/core/server/saved_objects/routes/index.ts index 34083e0d6ddf87..edc52efdeaef87 100644 --- a/src/core/server/saved_objects/routes/index.ts +++ b/src/core/server/saved_objects/routes/index.ts @@ -7,7 +7,7 @@ */ import type { Logger } from '@kbn/logging'; -import { InternalHttpServiceSetup } from '../../http'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { InternalCoreUsageDataSetup } from '../../core_usage_data'; import { SavedObjectConfig } from '../saved_objects_config'; import { IKibanaMigrator } from '../migrations'; diff --git a/src/core/server/saved_objects/routes/integration_tests/get.test.ts b/src/core/server/saved_objects/routes/integration_tests/get.test.ts index 8b34c9f2ef9589..6f0cb25934ef5c 100644 --- a/src/core/server/saved_objects/routes/integration_tests/get.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/get.test.ts @@ -8,14 +8,14 @@ import supertest from 'supertest'; import { registerGetRoute } from '../get'; -import { ContextService } from '../../../context'; +import { ContextService } from '@kbn/core-http-context-server-internal'; +import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; -import { CoreUsageStatsClient } from '../../../core_usage_data'; +import type { CoreUsageStatsClient } from '../../../core_usage_data'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; -import { HttpService, InternalHttpServiceSetup } from '../../../http'; -import { createHttpServer, createCoreContext } from '../../../http/test_utils'; import { contextServiceMock, coreMock } from '../../../mocks'; import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; diff --git a/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts b/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts index 78397ca00cb608..9ee1b0f1200e63 100644 --- a/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts +++ b/src/core/server/saved_objects/routes/integration_tests/resolve.test.ts @@ -7,15 +7,15 @@ */ import supertest from 'supertest'; +import { ContextService } from '@kbn/core-http-context-server-internal'; +import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; +import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; import { registerResolveRoute } from '../resolve'; -import { ContextService } from '../../../context'; import { savedObjectsClientMock } from '../../service/saved_objects_client.mock'; import { CoreUsageStatsClient } from '../../../core_usage_data'; import { coreUsageStatsClientMock } from '../../../core_usage_data/core_usage_stats_client.mock'; import { coreUsageDataServiceMock } from '../../../core_usage_data/core_usage_data_service.mock'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { HttpService, InternalHttpServiceSetup } from '../../../http'; -import { createHttpServer, createCoreContext } from '../../../http/test_utils'; import { contextServiceMock, coreMock } from '../../../mocks'; import type { InternalSavedObjectsRequestHandlerContext } from '../../internal_types'; diff --git a/src/core/server/saved_objects/routes/test_utils.ts b/src/core/server/saved_objects/routes/test_utils.ts index 5783ecb9e5e277..74d813ab687938 100644 --- a/src/core/server/saved_objects/routes/test_utils.ts +++ b/src/core/server/saved_objects/routes/test_utils.ts @@ -7,8 +7,8 @@ */ import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { ContextService } from '../../context'; -import { createHttpServer, createCoreContext } from '../../http/test_utils'; +import { ContextService } from '@kbn/core-http-context-server-internal'; +import { createHttpServer, createCoreContext } from '@kbn/core-http-server-mocks'; import { contextServiceMock, coreMock } from '../../mocks'; import { SavedObjectsType } from '../types'; import { InternalSavedObjectsRequestHandlerContext } from '../internal_types'; diff --git a/src/core/server/saved_objects/routes/utils.test.ts b/src/core/server/saved_objects/routes/utils.test.ts index 9c245e58b59477..ddeff043f2bbab 100644 --- a/src/core/server/saved_objects/routes/utils.test.ts +++ b/src/core/server/saved_objects/routes/utils.test.ts @@ -11,13 +11,13 @@ import { Readable } from 'stream'; import { createPromiseFromStreams, createConcatStream } from '@kbn/utils'; import { catchAndReturnBoomErrors } from './utils'; import Boom from '@hapi/boom'; -import { +import type { KibanaRequest, RequestHandler, - RequestHandlerContext, + RequestHandlerContextBase, KibanaResponseFactory, - kibanaResponseFactory, -} from '../..'; +} from '@kbn/core-http-server'; +import { kibanaResponseFactory } from '@kbn/core-http-router-server-internal'; async function readStreamToCompletion(stream: Readable) { return createPromiseFromStreams([stream, createConcatStream([])]); @@ -170,7 +170,7 @@ describe('validateObjects', () => { }); describe('catchAndReturnBoomErrors', () => { - let context: RequestHandlerContext; + let context: RequestHandlerContextBase; let request: KibanaRequest; let response: KibanaResponseFactory; diff --git a/src/core/server/saved_objects/saved_objects_service.test.ts b/src/core/server/saved_objects/saved_objects_service.test.ts index a177d7b0c35270..e2b7cdb92c46be 100644 --- a/src/core/server/saved_objects/saved_objects_service.test.ts +++ b/src/core/server/saved_objects/saved_objects_service.test.ts @@ -24,14 +24,13 @@ import { REPO_ROOT } from '@kbn/utils'; import { getEnvOptions } from '@kbn/config-mocks'; import { docLinksServiceMock } from '@kbn/core-doc-links-server-mocks'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks'; import { SavedObjectsService } from './saved_objects_service'; import { configServiceMock } from '../mocks'; import { elasticsearchServiceMock } from '../elasticsearch/elasticsearch_service.mock'; import { coreUsageDataServiceMock } from '../core_usage_data/core_usage_data_service.mock'; import { deprecationsServiceMock } from '../deprecations/deprecations_service.mock'; -import { httpServiceMock } from '../http/http_service.mock'; -import { httpServerMock } from '../http/http_server.mocks'; import { SavedObjectsClientFactoryProvider } from './service/lib'; import { NodesVersionCompatibility } from '../elasticsearch/version_check/ensure_es_version'; import { SavedObjectsRepository } from './service/lib/repository'; diff --git a/src/core/server/saved_objects/saved_objects_service.ts b/src/core/server/saved_objects/saved_objects_service.ts index 8559ab2d16a6d6..83f906f0d14c91 100644 --- a/src/core/server/saved_objects/saved_objects_service.ts +++ b/src/core/server/saved_objects/saved_objects_service.ts @@ -12,6 +12,7 @@ import type { Logger } from '@kbn/logging'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import type { DocLinksServiceStart } from '@kbn/core-doc-links-server'; import type { KibanaRequest } from '@kbn/core-http-server'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { SavedObjectsClient, SavedObjectsClientProvider, @@ -30,7 +31,6 @@ import { SavedObjectsMigrationConfigType, SavedObjectConfig, } from './saved_objects_config'; -import { InternalHttpServiceSetup } from '../http'; import { SavedObjectsClientContract, SavedObjectsType, diff --git a/src/core/server/saved_objects/service/lib/scoped_client_provider.test.ts b/src/core/server/saved_objects/service/lib/scoped_client_provider.test.ts index f8a81e48bbbc33..efc04f69e6ecf0 100644 --- a/src/core/server/saved_objects/service/lib/scoped_client_provider.test.ts +++ b/src/core/server/saved_objects/service/lib/scoped_client_provider.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import { httpServerMock } from '@kbn/core-http-server-mocks'; import { SavedObjectsClientProvider } from './scoped_client_provider'; -import { httpServerMock } from '../../../http/http_server.mocks'; import { typeRegistryMock } from '../../saved_objects_type_registry.mock'; test(`uses default client factory when one isn't set`, () => { diff --git a/src/core/server/server.test.mocks.ts b/src/core/server/server.test.mocks.ts index 16f2fb3d2e1dff..e1b294fb6778af 100644 --- a/src/core/server/server.test.mocks.ts +++ b/src/core/server/server.test.mocks.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { httpServiceMock } from './http/http_service.mock'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; export const mockHttpService = httpServiceMock.create(); -jest.doMock('./http/http_service', () => ({ +jest.doMock('@kbn/core-http-server-internal', () => ({ HttpService: jest.fn(() => mockHttpService), })); @@ -44,10 +44,10 @@ jest.doMock('./saved_objects/saved_objects_service', () => ({ SavedObjectsService: jest.fn(() => mockSavedObjectsService), })); -import { contextServiceMock } from './context/context_service.mock'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; export const mockContextService = contextServiceMock.create(); -jest.doMock('./context/context_service', () => ({ +jest.doMock('@kbn/core-http-context-server-internal', () => ({ ContextService: jest.fn(() => mockContextService), })); diff --git a/src/core/server/server.ts b/src/core/server/server.ts index b8f47cdda45f74..5f811723845c11 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -30,10 +30,16 @@ import { executionContextConfig, } from '@kbn/core-execution-context-server-internal'; import { PrebootService } from '@kbn/core-preboot-server-internal'; +import { ContextService } from '@kbn/core-http-context-server-internal'; +import { + HttpService, + config as httpConfig, + cspConfig, + externalUrlConfig, +} from '@kbn/core-http-server-internal'; import { CoreApp } from './core_app'; import { I18nService } from './i18n'; import { ElasticsearchService } from './elasticsearch'; -import { HttpService } from './http'; import { HttpResourcesService } from './http_resources'; import { RenderingService } from './rendering'; import { UiSettingsService } from './ui_settings'; @@ -45,12 +51,10 @@ import { CapabilitiesService } from './capabilities'; import { StatusService } from './status/status_service'; import { config as elasticsearchConfig } from './elasticsearch'; -import { config as httpConfig, cspConfig, externalUrlConfig } from './http'; import { savedObjectsConfig, savedObjectsMigrationConfig } from './saved_objects'; import { config as uiSettingsConfig } from './ui_settings'; import { config as statusConfig } from './status'; import { config as i18nConfig } from './i18n'; -import { ContextService } from './context'; import { InternalCorePreboot, InternalCoreSetup, InternalCoreStart } from './internal_types'; import { CoreUsageDataService } from './core_usage_data'; import { DeprecationsService, config as deprecationConfig } from './deprecations'; @@ -163,7 +167,7 @@ export class Server { const analyticsPreboot = this.analytics.preboot(); const environmentPreboot = await this.environment.preboot({ analytics: analyticsPreboot }); - const nodePreboot = await this.node.preboot(); + const nodePreboot = await this.node.preboot({ loggingSystem: this.loggingSystem }); // Discover any plugins before continuing. This allows other systems to utilize the plugin dependency graph. this.discoveredPlugins = await this.plugins.discover({ diff --git a/src/core/server/status/routes/integration_tests/status.test.ts b/src/core/server/status/routes/integration_tests/status.test.ts index 0b7599941ae48c..6034542fab9328 100644 --- a/src/core/server/status/routes/integration_tests/status.test.ts +++ b/src/core/server/status/routes/integration_tests/status.test.ts @@ -10,17 +10,17 @@ import { BehaviorSubject, firstValueFrom } from 'rxjs'; import supertest from 'supertest'; import { omit } from 'lodash'; -import { createCoreContext, createHttpServer } from '../../../http/test_utils'; -import { ContextService } from '../../../context'; +import { ContextService } from '@kbn/core-http-context-server-internal'; +import { createCoreContext, createHttpServer } from '@kbn/core-http-server-mocks'; +import type { HttpService, InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { metricsServiceMock } from '../../../metrics/metrics_service.mock'; -import { MetricsServiceSetup } from '../../../metrics'; -import { HttpService, InternalHttpServiceSetup } from '../../../http'; +import type { MetricsServiceSetup } from '../../../metrics'; import { registerStatusRoute } from '../status'; import { ServiceStatus, ServiceStatusLevels, ServiceStatusLevel } from '../../types'; import { statusServiceMock } from '../../status_service.mock'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; -import { contextServiceMock } from '../../../context/context_service.mock'; +import { contextServiceMock } from '@kbn/core-http-context-server-mocks'; const coreId = Symbol('core'); diff --git a/src/core/server/status/status_service.test.ts b/src/core/server/status/status_service.test.ts index 35870b4a7540e4..13f2b65f75b993 100644 --- a/src/core/server/status/status_service.test.ts +++ b/src/core/server/status/status_service.test.ts @@ -18,9 +18,9 @@ import { StatusService } from './status_service'; import { first, take, toArray } from 'rxjs/operators'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; +import { mockRouter, RouterMock } from '@kbn/core-http-router-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { ServiceStatusLevelSnapshotSerializer } from './test_utils'; -import { httpServiceMock } from '../http/http_service.mock'; -import { mockRouter, RouterMock } from '../http/router/router.mock'; import { metricsServiceMock } from '../metrics/metrics_service.mock'; import { configServiceMock } from '@kbn/config-mocks'; import { coreUsageDataServiceMock } from '../core_usage_data/core_usage_data_service.mock'; diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index 119069d310f9c8..dc73bd83c4625b 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -24,8 +24,8 @@ import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; import type { PluginName } from '@kbn/core-base-common'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import type { InternalEnvironmentServiceSetup } from '@kbn/core-environment-server-internal'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { InternalElasticsearchServiceSetup } from '../elasticsearch'; -import { InternalHttpServiceSetup } from '../http'; import { InternalSavedObjectsServiceSetup } from '../saved_objects'; import { InternalMetricsServiceSetup } from '../metrics'; import { registerStatusRoute } from './routes'; diff --git a/src/core/server/test_utils.ts b/src/core/server/test_utils.ts index 4e2f8855209fff..ac7a70fae470de 100644 --- a/src/core/server/test_utils.ts +++ b/src/core/server/test_utils.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { createHttpServer } from './http/test_utils'; +export { createHttpServer } from '@kbn/core-http-server-mocks'; export { ServiceStatusLevelSnapshotSerializer } from './status/test_utils'; export { setupServer } from './saved_objects/routes/test_utils'; export { diff --git a/src/core/server/types.ts b/src/core/server/types.ts index 33998dd92c5558..1bcdd1ac095358 100644 --- a/src/core/server/types.ts +++ b/src/core/server/types.ts @@ -42,6 +42,9 @@ export type { SavedObjectReferenceWithContext, SavedObjectsCollectMultiNamespaceReferencesResponse, } from './saved_objects/service'; -export type { DomainDeprecationDetails, DeprecationsGetResponse } from './deprecations/types'; +export type { + DomainDeprecationDetails, + DeprecationsGetResponse, +} from '@kbn/core-deprecations-common'; export * from './ui_settings/types'; -export type { ExternalUrlConfig } from './http'; +export type { ExternalUrlConfig } from '@kbn/core-http-server-internal'; diff --git a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts b/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts index 544d113cd36220..e94c696b4eca81 100644 --- a/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts +++ b/src/core/server/ui_settings/create_or_upgrade_saved_config/integration_tests/create_or_upgrade.test.ts @@ -16,7 +16,7 @@ import { } from '../../../../test_helpers/kbn_server'; import { createOrUpgradeSavedConfig } from '../create_or_upgrade_saved_config'; import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; -import { httpServerMock } from '../../../http/http_server.mocks'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; const logger = loggingSystemMock.create().get(); describe('createOrUpgradeSavedConfig()', () => { diff --git a/src/core/server/ui_settings/integration_tests/lib/servers.ts b/src/core/server/ui_settings/integration_tests/lib/servers.ts index 8beb13e2d25345..be76df74e88ab2 100644 --- a/src/core/server/ui_settings/integration_tests/lib/servers.ts +++ b/src/core/server/ui_settings/integration_tests/lib/servers.ts @@ -8,8 +8,9 @@ import type supertest from 'supertest'; import type { Client } from '@elastic/elasticsearch'; -import type { SavedObjectsClientContract, IUiSettingsClient } from '../../..'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; +import type { SavedObjectsClientContract, IUiSettingsClient } from '../../..'; import { createTestServers, TestElasticsearchUtils, @@ -18,7 +19,6 @@ import { HttpMethod, getSupertest, } from '../../../../test_helpers/kbn_server'; -import { httpServerMock } from '../../../http/http_server.mocks'; let servers: TestUtils; let esServer: TestElasticsearchUtils; diff --git a/src/core/server/ui_settings/types.ts b/src/core/server/ui_settings/types.ts index c442e37c4b0222..a7405e8b757317 100644 --- a/src/core/server/ui_settings/types.ts +++ b/src/core/server/ui_settings/types.ts @@ -5,16 +5,20 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ +import { + UiSettingsParams, + UserProvidedValues, + PublicUiSettingsParams, +} from '@kbn/core-ui-settings-common'; import { SavedObjectsClientContract } from '../saved_objects/types'; -import { UiSettingsParams, UserProvidedValues, PublicUiSettingsParams } from '../../types'; export type { UiSettingsParams, - PublicUiSettingsParams, DeprecationSettings, + PublicUiSettingsParams, UiSettingsType, UserProvidedValues, -} from '../../types'; +} from '@kbn/core-ui-settings-common'; /** * Server-side client that provides access to the advanced settings stored in elasticsearch. diff --git a/src/core/server/ui_settings/ui_settings_service.test.ts b/src/core/server/ui_settings/ui_settings_service.test.ts index ad72f29dc4bd7e..64ba0880816e09 100644 --- a/src/core/server/ui_settings/ui_settings_service.test.ts +++ b/src/core/server/ui_settings/ui_settings_service.test.ts @@ -10,13 +10,13 @@ import { BehaviorSubject } from 'rxjs'; import { schema } from '@kbn/config-schema'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; +import { httpServiceMock } from '@kbn/core-http-server-mocks'; import { MockUiSettingsClientConstructor, MockUiSettingsDefaultsClientConstructor, getCoreSettingsMock, } from './ui_settings_service.test.mock'; import { UiSettingsService, SetupDeps } from './ui_settings_service'; -import { httpServiceMock } from '../http/http_service.mock'; import { savedObjectsClientMock } from '../mocks'; import { savedObjectsServiceMock } from '../saved_objects/saved_objects_service.mock'; import { uiSettingsType } from './saved_objects'; diff --git a/src/core/server/ui_settings/ui_settings_service.ts b/src/core/server/ui_settings/ui_settings_service.ts index 342514660e8d1f..b386396af8e33b 100644 --- a/src/core/server/ui_settings/ui_settings_service.ts +++ b/src/core/server/ui_settings/ui_settings_service.ts @@ -11,9 +11,9 @@ import { mapToObject } from '@kbn/std'; import type { Logger } from '@kbn/logging'; import type { CoreContext, CoreService } from '@kbn/core-base-server-internal'; +import type { InternalHttpServiceSetup } from '@kbn/core-http-server-internal'; import { SavedObjectsClientContract } from '../saved_objects/types'; import { InternalSavedObjectsServiceSetup } from '../saved_objects'; -import { InternalHttpServiceSetup } from '../http'; import { UiSettingsConfigType, config as uiConfigDefinition } from './ui_settings_config'; import { UiSettingsClient } from './ui_settings_client'; import { diff --git a/src/core/types/index.ts b/src/core/types/index.ts index 7b9df847703653..005e5fb611cfb8 100644 --- a/src/core/types/index.ts +++ b/src/core/types/index.ts @@ -12,6 +12,12 @@ */ export * from './capabilities'; export * from './app_category'; -export * from './ui_settings'; export * from './saved_objects'; export type { KibanaExecutionContext } from '@kbn/core-execution-context-common'; +export type { + UiSettingsType, + DeprecationSettings, + UiSettingsParams, + PublicUiSettingsParams, + UserProvidedValues, +} from '@kbn/core-ui-settings-common'; diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index b16dc39c4f50b0..0c65b924f14b1d 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -53,9 +53,6 @@ export const IGNORE_FILE_GLOBS = [ '**/preview-body.html', '**/preview-head.html', - // filename required by api-extractor - 'api-documenter.json', - // filename must match upstream filenames from lodash 'packages/elastic-safer-lodash-set/**/*', diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts index 2aa9f65f4d3db7..220eef24f3808a 100644 --- a/src/dev/run_i18n_check.ts +++ b/src/dev/run_i18n_check.ts @@ -120,6 +120,7 @@ run( { concurrent: false, exitOnError: true, + renderer: process.env.CI ? 'verbose' : 'default', } ); diff --git a/src/dev/run_i18n_extract.ts b/src/dev/run_i18n_extract.ts index 6ff9eb5164ad2a..2c1f39e929a364 100644 --- a/src/dev/run_i18n_extract.ts +++ b/src/dev/run_i18n_extract.ts @@ -38,32 +38,37 @@ run( } const srcPaths = Array().concat(path || ['./src', './packages', './x-pack']); - const list = new Listr([ - { - title: 'Merging .i18nrc.json files', - task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), - }, - { - title: 'Extracting Default Messages', - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), - }, - { - title: 'Writing to file', - enabled: (ctx) => outputDir && ctx.messages.size, - task: async (ctx) => { - const sortedMessages = [...ctx.messages].sort(([key1], [key2]) => - key1.localeCompare(key2) - ); - await writeFileAsync( - resolve(outputDir, 'en.json'), - outputFormat === 'json5' - ? serializeToJson5(sortedMessages) - : serializeToJson(sortedMessages) - ); + const list = new Listr( + [ + { + title: 'Merging .i18nrc.json files', + task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), + }, + { + title: 'Extracting Default Messages', + task: ({ config }) => + new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), }, - }, - ]); + { + title: 'Writing to file', + enabled: (ctx) => outputDir && ctx.messages.size, + task: async (ctx) => { + const sortedMessages = [...ctx.messages].sort(([key1], [key2]) => + key1.localeCompare(key2) + ); + await writeFileAsync( + resolve(outputDir, 'en.json'), + outputFormat === 'json5' + ? serializeToJson5(sortedMessages) + : serializeToJson(sortedMessages) + ); + }, + }, + ], + { + renderer: process.env.CI ? 'verbose' : 'default', + } + ); try { const reporter = new ErrorReporter(); diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts index 29696ca5f9aa50..80e2f8cb1f33b7 100644 --- a/src/dev/run_i18n_integrate.ts +++ b/src/dev/run_i18n_integrate.ts @@ -69,33 +69,38 @@ run( const srcPaths = Array().concat(path || ['./src', './packages', './x-pack']); - const list = new Listr([ - { - title: 'Merging .i18nrc.json files', - task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), - }, - { - title: 'Extracting Default Messages', - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), - }, - { - title: 'Integrating Locale File', - task: async ({ messages, config }) => { - await integrateLocaleFiles(messages, { - sourceFileName: source, - targetFileName: target, - dryRun, - ignoreIncompatible, - ignoreUnused, - ignoreMissing, - ignoreMalformed, - config, - log, - }); + const list = new Listr( + [ + { + title: 'Merging .i18nrc.json files', + task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), + }, + { + title: 'Extracting Default Messages', + task: ({ config }) => + new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), }, - }, - ]); + { + title: 'Integrating Locale File', + task: async ({ messages, config }) => { + await integrateLocaleFiles(messages, { + sourceFileName: source, + targetFileName: target, + dryRun, + ignoreIncompatible, + ignoreUnused, + ignoreMissing, + ignoreMalformed, + config, + log, + }); + }, + }, + ], + { + renderer: process.env.CI ? 'verbose' : 'default', + } + ); try { const reporter = new ErrorReporter(); diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index e1360d3b63e4e4..e4b87a07af9071 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -20,6 +20,7 @@ export const storybookAliases = { data: 'src/plugins/data/.storybook', discover: 'src/plugins/discover/.storybook', embeddable: 'src/plugins/embeddable/.storybook', + es_ui_shared: 'src/plugins/es_ui_shared/.storybook', expression_error: 'src/plugins/expression_error/.storybook', expression_image: 'src/plugins/expression_image/.storybook', expression_metric_vis: 'src/plugins/chart_expressions/expression_metric/.storybook', diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts index 6174b9d40e452a..4635fc5924b903 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/annotation_layer.ts @@ -24,10 +24,10 @@ export function annotationLayerFunction(): ExpressionFunctionDefinition< inputTypes: ['datatable'], help: strings.getAnnotationLayerFnHelp(), args: { - hide: { + simpleView: { types: ['boolean'], default: false, - help: strings.getAnnotationLayerHideHelp(), + help: strings.getAnnotationLayerSimpleViewHelp(), }, annotations: { types: ['manual_point_event_annotation', 'manual_range_event_annotation'], diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_data_layer_args.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_data_layer_args.ts index 330e31327873a6..0c173ea0754f8b 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_data_layer_args.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/common_data_layer_args.ts @@ -20,10 +20,10 @@ export const commonDataLayerArgs: Omit< CommonDataLayerFnArgs, 'accessors' | 'xAccessor' | 'splitAccessor' > = { - hide: { + simpleView: { types: ['boolean'], default: false, - help: strings.getHideHelp(), + help: strings.getSimpleView(), }, seriesType: { aliases: ['_'], diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/extended_annotation_layer.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/extended_annotation_layer.ts index 539c11854355c1..2e3f9e160ebb40 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/extended_annotation_layer.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/extended_annotation_layer.ts @@ -24,10 +24,10 @@ export function extendedAnnotationLayerFunction(): ExpressionFunctionDefinition< inputTypes: ['datatable'], help: strings.getAnnotationLayerFnHelp(), args: { - hide: { + simpleView: { types: ['boolean'], default: false, - help: strings.getAnnotationLayerHideHelp(), + help: strings.getAnnotationLayerSimpleViewHelp(), }, annotations: { types: ['manual_point_event_annotation', 'manual_range_event_annotation'], diff --git a/src/plugins/chart_expressions/expression_xy/common/expression_functions/xy_vis_fn.ts b/src/plugins/chart_expressions/expression_xy/common/expression_functions/xy_vis_fn.ts index ea619fa7e1c28c..789b7fb9ceb639 100644 --- a/src/plugins/chart_expressions/expression_xy/common/expression_functions/xy_vis_fn.ts +++ b/src/plugins/chart_expressions/expression_xy/common/expression_functions/xy_vis_fn.ts @@ -42,7 +42,7 @@ const createDataLayer = (args: XYArgs, table: Datatable): DataLayerConfigResult return { type: DATA_LAYER, seriesType: args.seriesType, - hide: args.hide, + simpleView: args.simpleView, columnToLabel: args.columnToLabel, xScaleType: args.xScaleType, isHistogram: args.isHistogram, @@ -72,7 +72,7 @@ export const xyVisFn: XyVisFn['fn'] = async (data, args, handlers) => { seriesType, accessors, xAccessor, - hide, + simpleView, splitAccessors, columnToLabel, xScaleType, diff --git a/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx b/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx index 9d1388829de3cf..75a523ab41d92f 100644 --- a/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx +++ b/src/plugins/chart_expressions/expression_xy/common/i18n/index.tsx @@ -125,9 +125,9 @@ export const strings = { i18n.translate('expressionXY.dataLayer.help', { defaultMessage: `Configure a layer in the xy chart`, }), - getHideHelp: () => - i18n.translate('expressionXY.dataLayer.hide.help', { - defaultMessage: 'Show / hide axis', + getSimpleView: () => + i18n.translate('expressionXY.dataLayer.simpleView.help', { + defaultMessage: 'Show / hide details', }), getXAccessorHelp: () => i18n.translate('expressionXY.dataLayer.xAccessor.help', { @@ -233,8 +233,8 @@ export const strings = { i18n.translate('expressionXY.annotationLayer.help', { defaultMessage: `Configure an annotation layer in the xy chart`, }), - getAnnotationLayerHideHelp: () => - i18n.translate('expressionXY.annotationLayer.hide.help', { + getAnnotationLayerSimpleViewHelp: () => + i18n.translate('expressionXY.annotationLayer.simpleView.help', { defaultMessage: 'Show / hide details', }), getAnnotationLayerAnnotationsHelp: () => diff --git a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts index 8da796c811a685..5d518c31513ae9 100644 --- a/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts +++ b/src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts @@ -115,7 +115,7 @@ export interface DataLayerArgs { accessors: Array; seriesType: SeriesType; xAccessor?: string | ExpressionValueVisDimension; - hide?: boolean; + simpleView?: boolean; splitAccessors?: Array; markSizeAccessor?: string | ExpressionValueVisDimension; lineWidth?: number; @@ -141,7 +141,7 @@ export interface ExtendedDataLayerArgs { accessors: string[]; seriesType: SeriesType; xAccessor?: string; - hide?: boolean; + simpleView?: boolean; splitAccessors?: string[]; markSizeAccessor?: string; lineWidth?: number; @@ -280,7 +280,7 @@ export interface XYProps { export interface AnnotationLayerArgs { annotations: EventAnnotationOutput[]; - hide?: boolean; + simpleView?: boolean; } export type ExtendedAnnotationLayerArgs = AnnotationLayerArgs & { diff --git a/src/plugins/chart_expressions/expression_xy/public/__mocks__/index.tsx b/src/plugins/chart_expressions/expression_xy/public/__mocks__/index.tsx index d4781db0ff915b..2e5f3163772ae4 100644 --- a/src/plugins/chart_expressions/expression_xy/public/__mocks__/index.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/__mocks__/index.tsx @@ -164,7 +164,7 @@ export const dateHistogramLayer: DataLayerConfig = { type: 'dataLayer', layerType: LayerTypes.DATA, showLines: true, - hide: false, + simpleView: false, xAccessor: 'xAccessorId', xScaleType: 'time', isHistogram: true, diff --git a/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap b/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap index 46bbe4c5b5a435..24c7d68cd6fdad 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap +++ b/src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap @@ -208,7 +208,7 @@ exports[`XYChart component annotations should render grouped line annotations wi /> `; -exports[`XYChart component annotations should render simplified annotations when hide is true 1`] = ` +exports[`XYChart component annotations should render simplified annotations when simpleView is true 1`] = ` `; -exports[`XYChart component annotations should render simplified annotations when hide is true 2`] = ` +exports[`XYChart component annotations should render simplified annotations when simpleView is true 2`] = ` Array [ >; - hide?: boolean; + simpleView?: boolean; minInterval?: number; isBarChart?: boolean; outsideDimension: number; @@ -179,7 +179,7 @@ export const Annotations = ({ formatter, isHorizontal, paddingMap, - hide, + simpleView, minInterval, isBarChart, outsideDimension, @@ -198,7 +198,7 @@ export const Annotations = ({ const header = formatter?.convert(isGrouped ? roundedTimestamp : exactTimestamp) || moment(isGrouped ? roundedTimestamp : exactTimestamp).toISOString(); - const strokeWidth = hide ? 1 : annotation.lineWidth || 1; + const strokeWidth = simpleView ? 1 : annotation.lineWidth || 1; const dataValue = isGrouped ? moment( isBarChart && minInterval ? roundedTimestamp + minInterval / 2 : roundedTimestamp @@ -210,7 +210,7 @@ export const Annotations = ({ key={id} domainType={AnnotationDomainType.XDomain} marker={ - !hide ? ( + !simpleView ? ( { layerId: 'numberLayer', type: 'dataLayer', layerType: LayerTypes.DATA, - hide: false, + simpleView: false, showLines: true, xAccessor: 'xAccessorId', xScaleType: 'linear', @@ -1251,7 +1251,7 @@ describe('XYChart component', () => { type: 'dataLayer', layerType: LayerTypes.DATA, showLines: true, - hide: false, + simpleView: false, xAccessor: 'xAccessorId', xScaleType: 'linear', isHistogram: true, @@ -3094,11 +3094,11 @@ describe('XYChart component', () => { const component = mount(); expect(component.find(RectAnnotation)).toMatchSnapshot(); }); - test('should render simplified annotations when hide is true', () => { + test('should render simplified annotations when simpleView is true', () => { const { args } = sampleArgsWithAnnotations([ createLayerWithAnnotations([defaultLineStaticAnnotation, defaultRangeStaticAnnotation]), ]); - (args.layers[1] as CommonXYAnnotationLayerConfig).hide = true; + (args.layers[1] as CommonXYAnnotationLayerConfig).simpleView = true; const component = mount(); expect(component.find('LineAnnotation')).toMatchSnapshot(); expect(component.find('RectAnnotation')).toMatchSnapshot(); diff --git a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx index 00478aa9ddd6b4..5bb7f5d6f8c47a 100644 --- a/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx +++ b/src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx @@ -360,7 +360,7 @@ export function XYChart({ ...groupedLineAnnotations, ].filter(Boolean); - const shouldHideDetails = annotationsLayers.length > 0 ? annotationsLayers[0].hide : false; + const shouldHideDetails = annotationsLayers.length > 0 ? annotationsLayers[0].simpleView : false; const linesPaddings = !shouldHideDetails ? getLinesCausedPaddings(visualConfigs, yAxesMap, shouldRotate) : {}; @@ -740,7 +740,7 @@ export function XYChart({ } title={xTitle} gridLine={gridLineStyle} - hide={xAxisConfig?.hide || dataLayers[0]?.hide || !dataLayers[0]?.xAccessor} + hide={xAxisConfig?.hide || dataLayers[0]?.simpleView || !dataLayers[0]?.xAccessor} tickFormat={(d) => { let value = safeXAccessorLabelRenderer(d) || ''; if (xAxisConfig?.truncate && value.length > xAxisConfig.truncate) { @@ -773,7 +773,7 @@ export function XYChart({ gridLine={{ visible: axis.showGridLines, }} - hide={axis.hide || dataLayers[0]?.hide} + hide={axis.hide || dataLayers[0]?.simpleView} tickFormat={(d) => { let value = axis.formatter?.convert(d) || ''; if (axis.truncate && value.length > axis.truncate) { @@ -848,7 +848,7 @@ export function XYChart({ paddingMap={linesPaddings} isBarChart={filteredBarLayers.length > 0} minInterval={minInterval} - hide={annotationsLayers?.[0].hide} + simpleView={annotationsLayers?.[0].simpleView} outsideDimension={ rangeAnnotations.length && shouldHideDetails ? OUTSIDE_RECT_ANNOTATION_WIDTH_SUGGESTION diff --git a/src/plugins/console/common/constants/index.ts b/src/plugins/console/common/constants/index.ts index 756a79883cbdb6..7d95d4693f7cf2 100644 --- a/src/plugins/console/common/constants/index.ts +++ b/src/plugins/console/common/constants/index.ts @@ -8,3 +8,4 @@ export { MAJOR_VERSION } from './plugin'; export { API_BASE_PATH, KIBANA_API_PREFIX } from './api'; +export { DEFAULT_VARIABLES } from './variables'; diff --git a/src/core/server/context/context_service.test.mocks.ts b/src/plugins/console/common/constants/variables.ts similarity index 62% rename from src/core/server/context/context_service.test.mocks.ts rename to src/plugins/console/common/constants/variables.ts index dcd6eebe6e9c83..1554f118c264bf 100644 --- a/src/core/server/context/context_service.test.mocks.ts +++ b/src/plugins/console/common/constants/variables.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { contextMock } from './context_container.mock'; +import uuid from 'uuid'; -export const MockContextConstructor = jest.fn(contextMock.create); -jest.doMock('./context_container', () => ({ - ContextContainer: MockContextConstructor, -})); +export const DEFAULT_VARIABLES = [ + { id: uuid.v4(), name: 'exampleVariable1', value: '_search' }, + { id: uuid.v4(), name: 'exampleVariable2', value: 'match_all' }, +]; diff --git a/src/plugins/console/public/application/components/index.ts b/src/plugins/console/public/application/components/index.ts index 8f8292477cb943..8170638221ebd2 100644 --- a/src/plugins/console/public/application/components/index.ts +++ b/src/plugins/console/public/application/components/index.ts @@ -6,6 +6,9 @@ * Side Public License, v 1. */ +import React from 'react'; +import { withSuspense } from '@kbn/shared-ux-utility'; + export { NetworkRequestStatusBar } from './network_request_status_bar'; export { SomethingWentWrongCallout } from './something_went_wrong_callout'; export type { TopNavMenuItem } from './top_nav_menu'; @@ -13,6 +16,40 @@ export { TopNavMenu } from './top_nav_menu'; export { ConsoleMenu } from './console_menu'; export { WelcomePanel } from './welcome_panel'; export type { AutocompleteOptions } from './settings_modal'; -export { DevToolsSettingsModal } from './settings_modal'; export { HelpPanel } from './help_panel'; export { EditorContentSpinner } from './editor_content_spinner'; +export type { DevToolsVariable } from './variables'; + +/** + * The Lazily-loaded `DevToolsSettingsModal` component. Consumers should use `React.Suspense` or + * the withSuspense` HOC to load this component. + */ +export const DevToolsSettingsModalLazy = React.lazy(() => + import('./settings_modal').then(({ DevToolsSettingsModal }) => ({ + default: DevToolsSettingsModal, + })) +); + +/** + * A `DevToolsSettingsModal` component that is wrapped by the `withSuspense` HOC. This component can + * be used directly by consumers and will load the `DevToolsSettingsModalLazy` component lazily with + * a predefined fallback and error boundary. + */ +export const DevToolsSettingsModal = withSuspense(DevToolsSettingsModalLazy); + +/** + * The Lazily-loaded `DevToolsVariablesFlyout` component. Consumers should use `React.Suspense` or + * the withSuspense` HOC to load this component. + */ +export const DevToolsVariablesFlyoutLazy = React.lazy(() => + import('./variables').then(({ DevToolsVariablesFlyout }) => ({ + default: DevToolsVariablesFlyout, + })) +); + +/** + * A `DevToolsVariablesFlyout` component that is wrapped by the `withSuspense` HOC. This component can + * be used directly by consumers and will load the `DevToolsVariablesFlyoutLazy` component lazily with + * a predefined fallback and error boundary. + */ +export const DevToolsVariablesFlyout = withSuspense(DevToolsVariablesFlyoutLazy); diff --git a/src/plugins/console/public/application/components/network_request_status_bar/network_request_status_bar.tsx b/src/plugins/console/public/application/components/network_request_status_bar/network_request_status_bar.tsx index d5d8d97a4712aa..320b0bbfee4734 100644 --- a/src/plugins/console/public/application/components/network_request_status_bar/network_request_status_bar.tsx +++ b/src/plugins/console/public/application/components/network_request_status_bar/network_request_status_bar.tsx @@ -80,7 +80,10 @@ export const NetworkRequestStatusBar: FunctionComponent = ({ }`} } > - + {/* Use   to ensure that no matter the width we don't allow line breaks */} {statusCode} - {statusText} diff --git a/src/plugins/console/public/application/components/settings_modal.tsx b/src/plugins/console/public/application/components/settings_modal.tsx index 3e6fdf2c08ccc4..04394fd50de312 100644 --- a/src/plugins/console/public/application/components/settings_modal.tsx +++ b/src/plugins/console/public/application/components/settings_modal.tsx @@ -59,7 +59,7 @@ const intervalOptions = PRESETS_IN_MINUTES.map((value) => ({ : everyNMinutesTimeInterval(value), })); -interface Props { +export interface DevToolsSettingsModalProps { onSaveSettings: (newSettings: DevToolsSettings) => void; onClose: () => void; refreshAutocompleteSettings: (selectedSettings: DevToolsSettings['autocomplete']) => void; @@ -67,7 +67,7 @@ interface Props { editorInstance: SenseEditor | null; } -export function DevToolsSettingsModal(props: Props) { +export const DevToolsSettingsModal = (props: DevToolsSettingsModalProps) => { const [fontSize, setFontSize] = useState(props.settings.fontSize); const [wrapMode, setWrapMode] = useState(props.settings.wrapMode); const [fields, setFields] = useState(props.settings.autocomplete.fields); @@ -355,4 +355,4 @@ export function DevToolsSettingsModal(props: Props) { ); -} +}; diff --git a/src/plugins/console/public/application/components/variables/index.ts b/src/plugins/console/public/application/components/variables/index.ts new file mode 100644 index 00000000000000..dd5b0273c5e0b3 --- /dev/null +++ b/src/plugins/console/public/application/components/variables/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './variables_flyout'; +export * from './utils'; diff --git a/src/plugins/console/public/application/components/variables/utils.ts b/src/plugins/console/public/application/components/variables/utils.ts new file mode 100644 index 00000000000000..9507e69644dd31 --- /dev/null +++ b/src/plugins/console/public/application/components/variables/utils.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import uuid from 'uuid'; +import type { DevToolsVariable } from './variables_flyout'; + +export const editVariable = ( + name: string, + value: string, + id: string, + variables: DevToolsVariable[] +) => { + const index = variables.findIndex((v) => v.id === id); + + if (index === -1) { + return variables; + } + + return [ + ...variables.slice(0, index), + { ...variables[index], [name]: value }, + ...variables.slice(index + 1), + ]; +}; + +export const deleteVariable = (variables: DevToolsVariable[], id: string) => { + return variables.filter((v) => v.id !== id); +}; + +export const generateEmptyVariableField = (): DevToolsVariable => ({ + id: uuid.v4(), + name: '', + value: '', +}); diff --git a/src/plugins/console/public/application/components/variables/variables_flyout.tsx b/src/plugins/console/public/application/components/variables/variables_flyout.tsx new file mode 100644 index 00000000000000..46b67bdf9075fd --- /dev/null +++ b/src/plugins/console/public/application/components/variables/variables_flyout.tsx @@ -0,0 +1,215 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState, useCallback, ChangeEvent, FormEvent } from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { + EuiFlyout, + EuiFlyoutHeader, + EuiTitle, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlexGroup, + EuiFlexItem, + EuiButton, + EuiButtonEmpty, + EuiBasicTable, + EuiFieldText, + useGeneratedHtmlId, + EuiForm, + EuiFormRow, + EuiButtonIcon, + EuiSpacer, + EuiText, + type EuiBasicTableColumn, +} from '@elastic/eui'; + +import * as utils from './utils'; + +export interface DevToolsVariablesFlyoutProps { + onClose: () => void; + onSaveVariables: (newVariables: DevToolsVariable[]) => void; + variables: []; +} + +export interface DevToolsVariable { + id: string; + name: string; + value: string; +} + +export const DevToolsVariablesFlyout = (props: DevToolsVariablesFlyoutProps) => { + const [variables, setVariables] = useState(props.variables); + const formId = useGeneratedHtmlId({ prefix: '__console' }); + + const addNewVariable = useCallback(() => { + setVariables((v) => [...v, utils.generateEmptyVariableField()]); + }, []); + + const deleteVariable = useCallback( + (id: string) => { + const updatedVariables = utils.deleteVariable(variables, id); + setVariables(updatedVariables); + }, + [variables] + ); + + const onSubmit = useCallback( + (e: FormEvent) => { + e.preventDefault(); + props.onSaveVariables(variables.filter(({ name, value }) => name.trim() && value)); + }, + [props, variables] + ); + + const onChange = useCallback( + (event: ChangeEvent, id: string) => { + const { name, value } = event.target; + const editedVariables = utils.editVariable(name, value, id, variables); + setVariables(editedVariables); + }, + [variables] + ); + + const columns: Array> = [ + { + field: 'name', + name: i18n.translate('console.variablesPage.variablesTable.columns.variableHeader', { + defaultMessage: 'Variable name', + }), + render: (name, { id }) => { + // Avoid characters that get URL-encoded, because they'll result in unusable variable names. + const isInvalid = name && !name.match(/^[a-zA-Z0-9]+$/g); + return ( + , + ]} + fullWidth={true} + css={{ flexGrow: 1 }} + > + onChange(e, id)} + isInvalid={isInvalid} + fullWidth={true} + aria-label={i18n.translate( + 'console.variablesPage.variablesTable.variableInput.ariaLabel', + { + defaultMessage: 'Variable name', + } + )} + /> + + ); + }, + }, + { + field: 'value', + name: i18n.translate('console.variablesPage.variablesTable.columns.valueHeader', { + defaultMessage: 'Value', + }), + render: (value, { id }) => ( + onChange(e, id)} + value={value} + aria-label={i18n.translate('console.variablesPage.variablesTable.valueInput.ariaLabel', { + defaultMessage: 'Variable value', + })} + /> + ), + }, + { + field: 'id', + name: '', + width: '5%', + render: (id: string) => ( + deleteVariable(id)} + data-test-subj="variablesRemoveButton" + /> + ), + }, + ]; + + return ( + + + +

+ +

+ + + +

+ + + + ), + }} + /> +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + ); +}; diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx index ba5f1e78d5f01b..ed8bd07349e8c4 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.test.tsx @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +jest.mock('../../../../../lib/utils', () => ({ replaceVariables: jest.fn() })); + import './editor.test.mock'; import React from 'react'; @@ -30,6 +32,7 @@ import { getEndpointFromPosition } from '../../../../../lib/autocomplete/get_end import type { DevToolsSettings } from '../../../../../services'; import * as consoleMenuActions from '../console_menu_actions'; import { Editor } from './editor'; +import * as utils from '../../../../../lib/utils'; describe('Legacy (Ace) Console Editor Component Smoke Test', () => { let mockedAppContextValue: ContextValue; @@ -51,6 +54,7 @@ describe('Legacy (Ace) Console Editor Component Smoke Test', () => { beforeEach(() => { document.queryCommandSupported = sinon.fake(() => true); mockedAppContextValue = serviceContextMock.create(); + (utils.replaceVariables as jest.Mock).mockReturnValue(['test']); }); afterEach(() => { diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx index e999c079b490fa..74a052646e1982 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx @@ -54,10 +54,11 @@ const abs: CSSProperties = { right: '0', }; -const DEFAULT_INPUT_VALUE = `GET _search +const DEFAULT_INPUT_VALUE = `# Click the Variables button, above, to create your own variables. +GET \${exampleVariable1} // _search { "query": { - "match_all": {} + "\${exampleVariable2}": {} // match_all } }`; @@ -233,6 +234,8 @@ function EditorUI({ initialTextValue, setEditorInstance }: EditorProps) { autocompleteInfo.clearSubscriptions(); window.removeEventListener('hashchange', onHashChange); if (editorInstanceRef.current) { + // Close autocomplete popup on unmount + editorInstanceRef.current?.getCoreEditor().detachCompleter(); editorInstanceRef.current.getCoreEditor().destroy(); } }; diff --git a/src/plugins/console/public/application/containers/main/get_top_nav.ts b/src/plugins/console/public/application/containers/main/get_top_nav.ts index 78d33b4721fa8f..66609c1ba418bb 100644 --- a/src/plugins/console/public/application/containers/main/get_top_nav.ts +++ b/src/plugins/console/public/application/containers/main/get_top_nav.ts @@ -12,9 +12,15 @@ interface Props { onClickHistory: () => void; onClickSettings: () => void; onClickHelp: () => void; + onClickVariables: () => void; } -export function getTopNavConfig({ onClickHistory, onClickSettings, onClickHelp }: Props) { +export function getTopNavConfig({ + onClickHistory, + onClickSettings, + onClickHelp, + onClickVariables, +}: Props) { return [ { id: 'history', @@ -42,6 +48,19 @@ export function getTopNavConfig({ onClickHistory, onClickSettings, onClickHelp } }, testId: 'consoleSettingsButton', }, + { + id: 'variables', + label: i18n.translate('console.topNav.variablesTabLabel', { + defaultMessage: 'Variables', + }), + description: i18n.translate('console.topNav.variablesTabDescription', { + defaultMessage: 'Variables', + }), + onClick: () => { + onClickVariables(); + }, + testId: 'consoleVariablesButton', + }, { id: 'help', label: i18n.translate('console.topNav.helpTabLabel', { diff --git a/src/plugins/console/public/application/containers/main/main.tsx b/src/plugins/console/public/application/containers/main/main.tsx index 2833bf1fbebc3d..889c9d352bc5dc 100644 --- a/src/plugins/console/public/application/containers/main/main.tsx +++ b/src/plugins/console/public/application/containers/main/main.tsx @@ -12,6 +12,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiPageContent } from '@elastic/eu import { ConsoleHistory } from '../console_history'; import { Editor } from '../editor'; import { Settings } from '../settings'; +import { Variables } from '../variables'; import { TopNavMenu, @@ -47,6 +48,7 @@ export function Main() { const [showingHistory, setShowHistory] = useState(false); const [showSettings, setShowSettings] = useState(false); const [showHelp, setShowHelp] = useState(false); + const [showVariables, setShowVariables] = useState(false); const [editorInstance, setEditorInstance] = useState(null); @@ -89,6 +91,7 @@ export function Main() { onClickHistory: () => setShowHistory(!showingHistory), onClickSettings: () => setShowSettings(true), onClickHelp: () => setShowHelp(!showHelp), + onClickVariables: () => setShowVariables(!showVariables), })} /> @@ -129,6 +132,8 @@ export function Main() { setShowSettings(false)} editorInstance={editorInstance} /> ) : null} + {showVariables ? setShowVariables(false)} /> : null} + {showHelp ? setShowHelp(false)} /> : null} ); diff --git a/src/plugins/console/public/application/containers/variables.tsx b/src/plugins/console/public/application/containers/variables.tsx new file mode 100644 index 00000000000000..665e2ca4849f00 --- /dev/null +++ b/src/plugins/console/public/application/containers/variables.tsx @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { DevToolsVariablesFlyout, DevToolsVariable } from '../components'; +import { useServicesContext } from '../contexts'; +import { StorageKeys } from '../../services'; +import { DEFAULT_VARIABLES } from '../../../common/constants'; + +interface VariablesProps { + onClose: () => void; +} + +export function Variables({ onClose }: VariablesProps) { + const { + services: { storage }, + } = useServicesContext(); + + const onSaveVariables = (newVariables: DevToolsVariable[]) => { + storage.set(StorageKeys.VARIABLES, newVariables); + onClose(); + }; + return ( + + ); +} diff --git a/src/plugins/console/public/application/contexts/services_context.tsx b/src/plugins/console/public/application/contexts/services_context.tsx index f133a49ca1fe1c..a9fb86175d02cf 100644 --- a/src/plugins/console/public/application/contexts/services_context.tsx +++ b/src/plugins/console/public/application/contexts/services_context.tsx @@ -10,7 +10,7 @@ import React, { createContext, useContext, useEffect } from 'react'; import { Observable } from 'rxjs'; import type { NotificationsSetup, CoreTheme, DocLinksStart, HttpSetup } from '@kbn/core/public'; -import { AutocompleteInfo, History, Settings, Storage } from '../../services'; +import type { AutocompleteInfo, History, Settings, Storage } from '../../services'; import { ObjectStorageClient } from '../../../common/types'; import { MetricsTracker } from '../../types'; import { EsHostService } from '../lib'; diff --git a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx index d16dc3f832d3ab..0c7e4c46d95a64 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx +++ b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.test.tsx @@ -12,6 +12,7 @@ jest.mock('../../contexts/editor_context/editor_registry', () => ({ })); jest.mock('./track', () => ({ track: jest.fn() })); jest.mock('../../contexts/request_context', () => ({ useRequestActionContext: jest.fn() })); +jest.mock('../../../lib/utils', () => ({ replaceVariables: jest.fn() })); import React from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; @@ -20,6 +21,7 @@ import { ContextValue, ServicesContextProvider } from '../../contexts'; import { serviceContextMock } from '../../contexts/services_context.mock'; import { useRequestActionContext } from '../../contexts/request_context'; import { instance as editorRegistry } from '../../contexts/editor_context/editor_registry'; +import * as utils from '../../../lib/utils'; import { sendRequest } from './send_request'; import { useSendCurrentRequest } from './use_send_current_request'; @@ -35,6 +37,7 @@ describe('useSendCurrentRequest', () => { mockContextValue = serviceContextMock.create(); dispatch = jest.fn(); (useRequestActionContext as jest.Mock).mockReturnValue(dispatch); + (utils.replaceVariables as jest.Mock).mockReturnValue(['test']); }); afterEach(() => { diff --git a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts index 6cd1eaddc35838..87f72571a63e60 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts +++ b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts @@ -16,10 +16,13 @@ import { useRequestActionContext, useServicesContext } from '../../contexts'; import { StorageQuotaError } from '../../components/storage_quota_error'; import { sendRequest } from './send_request'; import { track } from './track'; +import { replaceVariables } from '../../../lib/utils'; +import { StorageKeys } from '../../../services'; +import { DEFAULT_VARIABLES } from '../../../../common/constants'; export const useSendCurrentRequest = () => { const { - services: { history, settings, notifications, trackUiMetric, http, autocompleteInfo }, + services: { history, settings, notifications, trackUiMetric, http, autocompleteInfo, storage }, theme$, } = useServicesContext(); @@ -28,7 +31,9 @@ export const useSendCurrentRequest = () => { return useCallback(async () => { try { const editor = registry.getInputEditor(); - const requests = await editor.getRequestsInRange(); + const variables = storage.get(StorageKeys.VARIABLES, DEFAULT_VARIABLES); + let requests = await editor.getRequestsInRange(); + requests = replaceVariables(requests, variables); if (!requests.length) { notifications.toasts.add( i18n.translate('console.notification.error.noRequestSelectedTitle', { @@ -128,6 +133,7 @@ export const useSendCurrentRequest = () => { } } }, [ + storage, dispatch, http, settings, diff --git a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts index 2208de4a9dff3b..45d6eb42a96939 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts +++ b/src/plugins/console/public/application/models/legacy_core_editor/legacy_core_editor.ts @@ -228,6 +228,10 @@ export class LegacyCoreEditor implements CoreEditor { ); } + detachCompleter() { + return (this.editor as unknown as { completer: { detach(): void } }).completer.detach(); + } + private forceRetokenize() { const session = this.editor.getSession(); return new Promise((resolve) => { diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js index 6c188eca0f0ccc..bb3efc08346942 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/input_highlight_rules.js @@ -61,21 +61,26 @@ export function InputHighlightRules() { 'start', 'url' ), + addEOL(['whitespace', 'variable.template'], /(\s+)(\${\w+})/, 'start', 'url'), addEOL(['whitespace', 'url.protocol_host'], /(\s+)(https?:\/\/[^?\/,]+)/, 'start', 'url'), addEOL(['whitespace', 'url.slash'], /(\s+)(\/)/, 'start', 'url'), addEOL(['whitespace'], /(\s+)/, 'start', 'url') ), url: mergeTokens( + addEOL(['variable.template'], /(\${\w+})/, 'start'), addEOL(['url.part'], /(_sql)/, 'start-sql', 'url-sql'), addEOL(['url.part'], /([^?\/,\s]+)/, 'start'), addEOL(['url.comma'], /(,)/, 'start'), addEOL(['url.slash'], /(\/)/, 'start'), - addEOL(['url.questionmark'], /(\?)/, 'start', 'urlParams') + addEOL(['url.questionmark'], /(\?)/, 'start', 'urlParams'), + addEOL(['whitespace', 'comment.punctuation', 'comment.line'], /(\s+)(\/\/)(.*$)/, 'start') ), urlParams: mergeTokens( + addEOL(['url.param', 'url.equal', 'variable.template'], /([^&=]+)(=)(\${\w+})/, 'start'), addEOL(['url.param', 'url.equal', 'url.value'], /([^&=]+)(=)([^&]*)/, 'start'), addEOL(['url.param'], /([^&=]+)/, 'start'), - addEOL(['url.amp'], /(&)/, 'start') + addEOL(['url.amp'], /(&)/, 'start'), + addEOL(['whitespace', 'comment.punctuation', 'comment.line'], /(\s+)(\/\/)(.*$)/, 'start') ), 'url-sql': mergeTokens( addEOL(['url.part'], /([^?\/,\s]+)/, 'start-sql'), @@ -129,6 +134,8 @@ export function InputHighlightRules() { // Add comment rules to json rule set this.$rules.json.unshift({ include: 'comments' }); + this.$rules.json.unshift({ token: 'variable.template', regex: /("\${\w+}")/ }); + if (this.constructor === InputHighlightRules) { this.normalizeRules(); } diff --git a/src/plugins/console/public/application/models/sense_editor/sense_editor.ts b/src/plugins/console/public/application/models/sense_editor/sense_editor.ts index 37c3799c051194..50ee1cd1d262a1 100644 --- a/src/plugins/console/public/application/models/sense_editor/sense_editor.ts +++ b/src/plugins/console/public/application/models/sense_editor/sense_editor.ts @@ -248,7 +248,7 @@ export class SenseEditor { request.url = ''; - while (t && t.type && t.type.indexOf('url') === 0) { + while (t && t.type && (t.type.indexOf('url') === 0 || t.type === 'variable.template')) { request.url += t.value; t = tokenIter.stepForward(); } @@ -256,6 +256,12 @@ export class SenseEditor { // if the url row ends with some spaces, skip them. t = this.parser.nextNonEmptyToken(tokenIter); } + + // If the url row ends with a comment, skip it + while (this.parser.isCommentToken(t)) { + t = tokenIter.stepForward(); + } + let bodyStartLineNumber = (t ? 0 : 1) + tokenIter.getCurrentPosition().lineNumber; // artificially increase end of docs. let dataEndPos: Position; while ( @@ -291,7 +297,6 @@ export class SenseEditor { } const expandedRange = await this.expandRangeToRequestEdges(range); - if (!expandedRange) { return []; } diff --git a/src/plugins/console/public/lib/row_parser.ts b/src/plugins/console/public/lib/row_parser.ts index 5faca5ffc4a7db..55014345ae3cc5 100644 --- a/src/plugins/console/public/lib/row_parser.ts +++ b/src/plugins/console/public/lib/row_parser.ts @@ -29,10 +29,10 @@ export default class RowParser { return MODE.BETWEEN_REQUESTS; } const mode = this.editor.getLineState(lineNumber); + if (!mode) { return MODE.BETWEEN_REQUESTS; } // shouldn't really happen - // If another "start" mode is added here because we want to allow for new language highlighting // please see https://github.com/elastic/kibana/pull/51446 for a discussion on why // should consider a different approach. @@ -40,6 +40,19 @@ export default class RowParser { return MODE.IN_REQUEST; } let line = (this.editor.getLineValue(lineNumber) || '').trim(); + + // Check if the line has variables, depending on the request type, (e.g. single line, multi doc requests) return the correct mode + if (line && /(\${\w+})/.test(line)) { + lineNumber++; + line = (this.editor.getLineValue(lineNumber) || '').trim(); + + if (line.startsWith('{')) { + return MODE.REQUEST_START; + } + // next line is another request + // eslint-disable-next-line no-bitwise + return MODE.REQUEST_START | MODE.REQUEST_END; + } if (!line || line.startsWith('#') || line.startsWith('//') || line.startsWith('/*')) { return MODE.BETWEEN_REQUESTS; } // empty line or a comment waiting for a new req to start @@ -140,4 +153,14 @@ export default class RowParser { t = tokenIter.stepBackward(); return t; } + + isCommentToken(token: Token | null) { + return ( + token && + token.type && + (token.type === 'comment.punctuation' || + token.type === 'comment.line' || + token.type === 'comment.block') + ); + } } diff --git a/src/plugins/console/public/lib/utils/index.ts b/src/plugins/console/public/lib/utils/index.ts index 1beb13eb6b3d46..2495f63c7614f3 100644 --- a/src/plugins/console/public/lib/utils/index.ts +++ b/src/plugins/console/public/lib/utils/index.ts @@ -8,7 +8,11 @@ import _ from 'lodash'; import { XJson } from '@kbn/es-ui-shared-plugin/public'; -import type { RequestResult } from '../../application/hooks/use_send_current_request/send_request'; +import type { + RequestArgs, + RequestResult, +} from '../../application/hooks/use_send_current_request/send_request'; +import type { DevToolsVariable } from '../../application/components'; const { collapseLiteralStrings, expandLiteralStrings } = XJson; @@ -108,3 +112,66 @@ export const getResponseWithMostSevereStatusCode = (requestData: RequestResult[] .pop(); } }; + +export const replaceVariables = ( + requests: RequestArgs['requests'], + variables: DevToolsVariable[] +) => { + const urlRegex = /(\${\w+})/g; + const bodyRegex = /("\${\w+}")/g; + return requests.map((req) => { + if (urlRegex.test(req.url)) { + req.url = req.url.replaceAll(urlRegex, (match) => { + // Sanitize variable name + const key = match.replace('${', '').replace('}', ''); + const variable = variables.find(({ name }) => name === key); + + return variable?.value ?? match; + }); + } + + if (req.data.length) { + if (bodyRegex.test(req.data[0])) { + const data = req.data[0].replaceAll(bodyRegex, (match) => { + // Sanitize variable name + const key = match.replace('"${', '').replace('}"', ''); + const variable = variables.find(({ name }) => name === key); + + if (variable) { + // All values must be stringified to send a successful request to ES. + const { value } = variable; + + const isStringifiedObject = value.startsWith('{') && value.endsWith('}'); + if (isStringifiedObject) { + return value; + } + + const isStringifiedNumber = !isNaN(parseFloat(value)); + if (isStringifiedNumber) { + return value; + } + + const isStringifiedArray = value.startsWith('[') && value.endsWith(']'); + if (isStringifiedArray) { + return value; + } + + const isStringifiedBool = value === 'true' || value === 'false'; + if (isStringifiedBool) { + return value; + } + + // At this point the value must be an unstringified string, so we have to stringify it. + // Example: 'stringValue' -> '"stringValue"' + return JSON.stringify(value); + } + + return match; + }); + req.data = [data]; + } + } + + return req; + }); +}; diff --git a/src/plugins/console/public/lib/utils/utils.test.js b/src/plugins/console/public/lib/utils/utils.test.js index 8cdd93c3b6ed8b..406411b7a32bfb 100644 --- a/src/plugins/console/public/lib/utils/utils.test.js +++ b/src/plugins/console/public/lib/utils/utils.test.js @@ -193,4 +193,67 @@ describe('Utils class', () => { expect(utils.getResponseWithMostSevereStatusCode(undefined)).toBe(undefined); }); + + describe('replaceVariables', () => { + function testVariables(data, variables, expected) { + const result = utils.replaceVariables([data], [variables]); + expect(result).toEqual([expected]); + } + + it('should replace variables in url and body', () => { + testVariables( + { url: '${v1}/search', data: ['{\n "f": "${v1}"\n}'] }, + { name: 'v1', value: 'test' }, + { + url: 'test/search', + data: ['{\n "f": "test"\n}'], + } + ); + }); + + describe('with booleans as field value', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v2}"\n}'] }, + { name: 'v2', value: 'true' }, + { + url: 'test', + data: ['{\n "f": true\n}'], + } + ); + }); + + describe('with objects as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v3}"\n}'] }, + { name: 'v3', value: '{"f": "test"}' }, + { url: 'test', data: ['{\n "f": {"f": "test"}\n}'] } + ); + }); + + describe('with arrays as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v5}"\n}'] }, + { name: 'v5', value: '[{"t": "test"}]' }, + { url: 'test', data: ['{\n "f": [{"t": "test"}]\n}'] } + ); + }); + + describe('with numbers as field values', () => { + testVariables( + { url: 'test', data: ['{\n "f": "${v6}"\n}'] }, + { name: 'v6', value: '1' }, + { url: 'test', data: ['{\n "f": 1\n}'] } + ); + }); + + describe('with other variables as field values', () => { + // Currently, variables embedded in other variables' values aren't replaced. + // Once we build this feature, this test will fail and need to be updated. + testVariables( + { url: 'test', data: ['{\n "f": "${v4}"\n}'] }, + { name: 'v4', value: '{"v1": "${v1}", "v6": "${v6}"}' }, + { url: 'test', data: ['{\n "f": {"v1": "${v1}", "v6": "${v6}"}\n}'] } + ); + }); + }); }); diff --git a/src/plugins/console/public/services/storage.ts b/src/plugins/console/public/services/storage.ts index 4d5f897b134030..4b4d051607b8dd 100644 --- a/src/plugins/console/public/services/storage.ts +++ b/src/plugins/console/public/services/storage.ts @@ -13,6 +13,7 @@ type IStorageEngine = typeof window.localStorage; export enum StorageKeys { WIDTH = 'widths', FOLDS = 'folds', + VARIABLES = 'variables', } export class Storage { diff --git a/src/plugins/console/public/types/core_editor.ts b/src/plugins/console/public/types/core_editor.ts index aa048256421bb1..1c9d6352914a2e 100644 --- a/src/plugins/console/public/types/core_editor.ts +++ b/src/plugins/console/public/types/core_editor.ts @@ -288,4 +288,9 @@ export interface CoreEditor { * Add folds at given ranges */ addFoldsAtRanges(foldRanges: Range[]): void; + + /** + * Detach autocomplete + */ + detachCompleter(): void; } diff --git a/src/plugins/console/server/lib/proxy_request.test.ts b/src/plugins/console/server/lib/proxy_request.test.ts index 98c63d9685c87b..10f43e0a8f11bf 100644 --- a/src/plugins/console/server/lib/proxy_request.test.ts +++ b/src/plugins/console/server/lib/proxy_request.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import http, { ClientRequest } from 'http'; +import http, { ClientRequest, OutgoingHttpHeaders } from 'http'; import * as sinon from 'sinon'; import { proxyRequest } from './proxy_request'; import { URL } from 'url'; @@ -29,6 +29,28 @@ describe(`Console's send request`, () => { fakeRequest = null as any; }); + const sendProxyRequest = async ({ + headers = {}, + uri = new URL('http://noone.nowhere.none'), + timeout = 3000, + requestPath = '', + }: { + headers?: OutgoingHttpHeaders; + uri?: URL; + timeout?: number; + requestPath?: string; + }) => { + return await proxyRequest({ + agent: null as any, + headers, + method: 'get', + payload: null as any, + uri, + timeout, + requestPath, + }); + }; + it('correctly implements timeout and abort mechanism', async () => { fakeRequest = { destroy: sinon.stub(), @@ -36,14 +58,7 @@ describe(`Console's send request`, () => { once() {}, } as any; try { - await proxyRequest({ - agent: null as any, - headers: {}, - method: 'get', - payload: null as any, - timeout: 0, // immediately timeout - uri: new URL('http://noone.nowhere.none'), - }); + await sendProxyRequest({ timeout: 0 }); // immediately timeout fail('Should not reach here!'); } catch (e) { expect(e.message).toEqual('Client request timeout'); @@ -63,16 +78,9 @@ describe(`Console's send request`, () => { } as any; // Don't set a host header this time - const result1 = await proxyRequest({ - agent: null as any, - headers: {}, - method: 'get', - payload: null as any, - timeout: 30000, - uri: new URL('http://noone.nowhere.none'), - }); + const defaultResult = await sendProxyRequest({}); - expect(result1).toEqual('done'); + expect(defaultResult).toEqual('done'); const [httpRequestOptions1] = stub.firstCall.args; @@ -83,16 +91,9 @@ describe(`Console's send request`, () => { }); // Set a host header - const result2 = await proxyRequest({ - agent: null as any, - headers: { Host: 'myhost' }, - method: 'get', - payload: null as any, - timeout: 30000, - uri: new URL('http://noone.nowhere.none'), - }); + const resultWithHostHeader = await sendProxyRequest({ headers: { Host: 'myhost' } }); - expect(result2).toEqual('done'); + expect(resultWithHostHeader).toEqual('done'); const [httpRequestOptions2] = stub.secondCall.args; expect((httpRequestOptions2 as any).headers).toEqual({ @@ -102,7 +103,7 @@ describe(`Console's send request`, () => { }); }); - describe('with percent-encoded uri pathname', () => { + describe('with request path', () => { beforeEach(() => { fakeRequest = { abort: sinon.stub(), @@ -115,39 +116,45 @@ describe(`Console's send request`, () => { } as any; }); - it('should decode percent-encoded uri pathname and encode it correctly', async () => { - const uri = new URL( - `http://noone.nowhere.none/%{[@metadata][beat]}-%{[@metadata][version]}-2020.08.23` - ); - const result = await proxyRequest({ - agent: null as any, - headers: {}, - method: 'get', - payload: null as any, - timeout: 30000, + const verifyRequestPath = async ({ + initialPath, + expectedPath, + uri, + }: { + initialPath: string; + expectedPath: string; + uri?: URL; + }) => { + const result = await sendProxyRequest({ + requestPath: initialPath, uri, }); - expect(result).toEqual('done'); const [httpRequestOptions] = stub.firstCall.args; - expect((httpRequestOptions as any).path).toEqual( - '/%25%7B%5B%40metadata%5D%5Bbeat%5D%7D-%25%7B%5B%40metadata%5D%5Bversion%5D%7D-2020.08.23' - ); + expect((httpRequestOptions as any).path).toEqual(expectedPath); + }; + + it('should correctly encode invalid URL characters included in path', async () => { + await verifyRequestPath({ + initialPath: '%{[@metadata][beat]}-%{[@metadata][version]}-2020.08.23', + expectedPath: + '%25%7B%5B%40metadata%5D%5Bbeat%5D%7D-%25%7B%5B%40metadata%5D%5Bversion%5D%7D-2020.08.23', + }); }); - it('should issue request with date-math format', async () => { - const result = await proxyRequest({ - agent: null as any, - headers: {}, - method: 'get', - payload: null as any, - timeout: 30000, - uri: new URL(`http://noone.nowhere.none/%3Cmy-index-%7Bnow%2Fd%7D%3E`), + it('should not encode the path if it is encoded', async () => { + await verifyRequestPath({ + initialPath: '%3Cmy-index-%7Bnow%2Fd%7D%3E', + expectedPath: '%3Cmy-index-%7Bnow%2Fd%7D%3E', }); + }); - expect(result).toEqual('done'); - const [httpRequestOptions] = stub.firstCall.args; - expect((httpRequestOptions as any).path).toEqual('/%3Cmy-index-%7Bnow%2Fd%7D%3E'); + it('should correctly encode path with query params', async () => { + await verifyRequestPath({ + initialPath: '_index/.test', + uri: new URL('http://noone.nowhere.none/_index/.test?q=something&v=something'), + expectedPath: '_index/.test?q=something&v=something', + }); }); }); }); diff --git a/src/plugins/console/server/lib/proxy_request.ts b/src/plugins/console/server/lib/proxy_request.ts index 4a8839d1d85834..35452b4f99703c 100644 --- a/src/plugins/console/server/lib/proxy_request.ts +++ b/src/plugins/console/server/lib/proxy_request.ts @@ -11,8 +11,9 @@ import https from 'https'; import net from 'net'; import stream from 'stream'; import Boom from '@hapi/boom'; -import { URL, URLSearchParams } from 'url'; -import { trimStart } from 'lodash'; +import { URL } from 'url'; + +import { encodePath } from './utils'; interface Args { method: 'get' | 'post' | 'put' | 'delete' | 'patch' | 'head'; @@ -22,6 +23,7 @@ interface Args { timeout: number; headers: http.OutgoingHttpHeaders; rejectUnauthorized?: boolean; + requestPath: string; } /** @@ -31,22 +33,6 @@ interface Args { const sanitizeHostname = (hostName: string): string => hostName.trim().replace(/^\[/, '').replace(/\]$/, ''); -/** - * Node URL percent-encodes any invalid characters in the pathname which results a 400 bad request error. - * We need to decode the percent-encoded pathname, and encode it correctly with encodeURIComponent - */ - -const encodePathname = (pathname: string) => { - const decodedPath = new URLSearchParams(`path=${pathname}`).get('path') ?? ''; - - // Skip if it is valid - if (pathname === decodedPath) { - return pathname; - } - - return `/${encodeURIComponent(trimStart(decodedPath, '/'))}`; -}; - // We use a modified version of Hapi's Wreck because Hapi, Axios, and Superagent don't support GET requests // with bodies, but ES APIs do. Similarly with DELETE requests with bodies. Another library, `request` // diverged too much from current behaviour. @@ -58,10 +44,11 @@ export const proxyRequest = ({ timeout, payload, rejectUnauthorized, + requestPath, }: Args) => { - const { hostname, port, protocol, pathname, search } = uri; + const { hostname, port, protocol, search } = uri; const client = uri.protocol === 'https:' ? https : http; - const encodedPath = encodePathname(pathname); + const encodedPath = encodePath(requestPath); let resolved = false; let resolve: (res: http.IncomingMessage) => void; diff --git a/src/plugins/console/server/lib/utils/encode_path.test.ts b/src/plugins/console/server/lib/utils/encode_path.test.ts new file mode 100644 index 00000000000000..07c7108e9d2cf3 --- /dev/null +++ b/src/plugins/console/server/lib/utils/encode_path.test.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { encodePath } from './encode_path'; + +describe('encodePath', () => { + const tests = [ + { + description: 'encodes invalid URL characters', + source: '/%{[@metadata][beat]}-%{[@metadata][version]}-2020.08.23', + assert: + '/%25%7B%5B%40metadata%5D%5Bbeat%5D%7D-%25%7B%5B%40metadata%5D%5Bversion%5D%7D-2020.08.23', + }, + { + description: 'ignores encoded characters', + source: '/my-index/_doc/this%2Fis%2Fa%2Fdoc', + assert: '/my-index/_doc/this%2Fis%2Fa%2Fdoc', + }, + { + description: 'ignores slashes between', + source: '_index/test/.test', + assert: '_index/test/.test', + }, + ]; + + tests.forEach(({ description, source, assert }) => { + test(description, () => { + const result = encodePath(source); + expect(result).toEqual(assert); + }); + }); +}); diff --git a/src/plugins/console/server/lib/utils/encode_path.ts b/src/plugins/console/server/lib/utils/encode_path.ts new file mode 100644 index 00000000000000..273c60d3f66e4f --- /dev/null +++ b/src/plugins/console/server/lib/utils/encode_path.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { URLSearchParams } from 'url'; +import { trimStart } from 'lodash'; + +export const encodePath = (path: string) => { + const decodedPath = new URLSearchParams(`path=${path}`).get('path') ?? ''; + // Take the initial path and compare it with the decoded path. + // If the result is not the same, the path is encoded. + const isEncoded = trimStart(path, '/') !== trimStart(decodedPath, '/'); + + // Return the initial path if it is already encoded + if (isEncoded) { + return path; + } + + // Encode every component except slashes + return path + .split('/') + .map((component) => encodeURIComponent(component)) + .join('/'); +}; diff --git a/src/plugins/console/server/lib/utils/index.ts b/src/plugins/console/server/lib/utils/index.ts new file mode 100644 index 00000000000000..19c35901570e69 --- /dev/null +++ b/src/plugins/console/server/lib/utils/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { encodePath } from './encode_path'; diff --git a/src/plugins/console/server/routes/api/console/proxy/create_handler.ts b/src/plugins/console/server/routes/api/console/proxy/create_handler.ts index 8cd0400d82cb03..2e575c7723a64e 100644 --- a/src/plugins/console/server/routes/api/console/proxy/create_handler.ts +++ b/src/plugins/console/server/routes/api/console/proxy/create_handler.ts @@ -15,8 +15,7 @@ import { KibanaRequest, RequestHandler } from '@kbn/core/server'; // TODO: find a better way to get information from the request like remoteAddress and remotePort // for forwarding. -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ensureRawRequest } from '@kbn/core/server/http/router'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; import { ESConfigForProxy } from '../../../../types'; import { getElasticsearchProxyConfig, @@ -146,6 +145,10 @@ export const createHandler = const host = hosts[idx]; try { const uri = toURL(host, path); + // Invalid URL characters included in uri pathname will be percent-encoded by Node URL method, and results in a faulty request in some cases. + // To fix this issue, we need to extract the original request path and supply it to proxyRequest function to encode it correctly with encodeURIComponent. + // We ignore the search params here, since we are extracting them from the uri constructed by Node URL method. + const [requestPath] = path.split('?'); // Because this can technically be provided by a settings-defined proxy config, we need to // preserve these property names to maintain BWC. @@ -175,6 +178,7 @@ export const createHandler = payload: body, rejectUnauthorized, agent, + requestPath, }); break; diff --git a/src/plugins/console/server/routes/api/console/proxy/headers.test.ts b/src/plugins/console/server/routes/api/console/proxy/headers.test.ts index 27cad7d948696c..f30cc5a4711cf0 100644 --- a/src/plugins/console/server/routes/api/console/proxy/headers.test.ts +++ b/src/plugins/console/server/routes/api/console/proxy/headers.test.ts @@ -6,14 +6,17 @@ * Side Public License, v 1. */ -jest.mock('@kbn/core/server/http/router/request', () => ({ - ensureRawRequest: jest.fn(), -})); +jest.mock('@kbn/core-http-router-server-internal', () => { + const realModule = jest.requireActual('@kbn/core-http-router-server-internal'); + return { + ...realModule, + ensureRawRequest: jest.fn(), + }; +}); import { kibanaResponseFactory } from '@kbn/core/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ensureRawRequest } from '@kbn/core/server/http/router/request'; +import { ensureRawRequest } from '@kbn/core-http-router-server-internal'; import { getProxyRouteHandlerDeps } from './mocks'; diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx index 7726258b399e2c..318db746fbe42a 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx @@ -107,12 +107,16 @@ export class DashboardViewport extends React.Component {controlsEnabled ? ( <> - {isEditMode && panelCount !== 0 && controlGroup?.getPanelCount() === 0 ? ( + {!hideAnnouncements && + isEditMode && + panelCount !== 0 && + controlGroup?.getPanelCount() === 0 ? ( { return controlGroup?.getCreateControlButton('callout'); diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation.ts index a6b74b083d689d..8bc1af26509d5c 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation.ts @@ -18,6 +18,7 @@ import { BaseAggParams } from '../types'; export interface AggParamsStdDeviation extends BaseAggParams { field: string; + showBounds?: boolean; } interface ValProp { @@ -91,15 +92,33 @@ export const getStdDeviationMetricAgg = () => { type: 'field', filterFieldTypes: KBN_FIELD_TYPES.NUMBER, }, + { + name: 'showBounds', + type: 'boolean', + write: () => {}, + shouldShow: () => false, + }, ], getResponseAggs(agg) { + const showBounds = agg.getParam('showBounds'); + if (showBounds === false) { + return [agg]; + } const ValueAggConfig = getResponseAggConfigClass(agg, responseAggConfigProps); return [new ValueAggConfig('std_lower'), new ValueAggConfig('std_upper')]; }, + getValueBucketPath(aggConfig) { + return `${aggConfig.id}.std_deviation`; + }, + getValue(agg, bucket) { + const showBounds = agg.getParam('showBounds'); + if (showBounds === false) { + return bucket[agg.id].std_deviation; + } return get(bucket[agg.parentId], agg.valProp()); }, }); diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts index 849987695dc7c4..695540c065941f 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "showBounds": true, "timeShift": undefined, }, "schema": undefined, diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts index 1993713470dd6a..9e1868dba6ae9b 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts @@ -48,6 +48,14 @@ export const aggStdDeviation = (): FunctionDefinition => ({ defaultMessage: 'Schema to use for this aggregation', }), }, + showBounds: { + types: ['boolean'], + default: true, + help: i18n.translate('data.search.aggs.metrics.std_deviation.showBounds.help', { + defaultMessage: + 'Specifies whether this aggregation should return upper and lower bound or the standard deviation itself', + }), + }, field: { types: ['string'], required: true, diff --git a/src/plugins/data/server/search/session/mocks.ts b/src/plugins/data/server/search/session/mocks.ts index 047f12df822c49..33715810060a9d 100644 --- a/src/plugins/data/server/search/session/mocks.ts +++ b/src/plugins/data/server/search/session/mocks.ts @@ -10,9 +10,7 @@ import moment from 'moment'; import type { IScopedSearchSessionsClient } from './types'; import { SearchSessionsConfigSchema } from '../../../config'; -export function createSearchSessionsClientMock(): jest.Mocked< - IScopedSearchSessionsClient -> { +export function createSearchSessionsClientMock(): jest.Mocked { return { getId: jest.fn(), trackId: jest.fn(), diff --git a/src/plugins/data/server/search/session/session_service.ts b/src/plugins/data/server/search/session/session_service.ts index 02f12a972f8b58..e46c9bc80a2ccc 100644 --- a/src/plugins/data/server/search/session/session_service.ts +++ b/src/plugins/data/server/search/session/session_service.ts @@ -85,9 +85,7 @@ interface UpdateOrCreateQueueEntry { function sleep(ms: number) { return new Promise((r) => setTimeout(r, ms)); } -export class SearchSessionService - implements ISearchSessionService -{ +export class SearchSessionService implements ISearchSessionService { private sessionConfig: SearchSessionsConfigSchema; private readonly updateOrCreateBatchQueue: UpdateOrCreateQueueEntry[] = []; private security?: SecurityPluginSetup; diff --git a/src/plugins/data/server/search/session/types.ts b/src/plugins/data/server/search/session/types.ts index 1571136891106f..e39a33774f073b 100644 --- a/src/plugins/data/server/search/session/types.ts +++ b/src/plugins/data/server/search/session/types.ts @@ -27,7 +27,7 @@ import { SearchSessionSavedObjectAttributes } from '../../../common'; import { IKibanaSearchRequest, ISearchOptions } from '../../../common/search'; import { SearchSessionsConfigSchema, ConfigSchema } from '../../../config'; -export interface IScopedSearchSessionsClient { +export interface IScopedSearchSessionsClient { getId: (request: IKibanaSearchRequest, options: ISearchOptions) => Promise; trackId: ( request: IKibanaSearchRequest, @@ -35,18 +35,29 @@ export interface IScopedSearchSessionsClient { options: ISearchOptions ) => Promise; getSearchIdMapping: (sessionId: string) => Promise>; - save: (sessionId: string, attributes: Partial) => Promise | undefined>; - get: (sessionId: string) => Promise>; - find: (options: Omit) => Promise>; - update: (sessionId: string, attributes: Partial) => Promise>; + save: ( + sessionId: string, + attributes: Partial + ) => Promise | undefined>; + get: (sessionId: string) => Promise>; + find: ( + options: Omit + ) => Promise>; + update: ( + sessionId: string, + attributes: Partial + ) => Promise>; cancel: (sessionId: string) => Promise<{}>; delete: (sessionId: string) => Promise<{}>; - extend: (sessionId: string, expires: Date) => Promise>; + extend: ( + sessionId: string, + expires: Date + ) => Promise>; getConfig: () => SearchSessionsConfigSchema | null; } -export interface ISearchSessionService { - asScopedProvider: (core: CoreStart) => (request: KibanaRequest) => IScopedSearchSessionsClient; +export interface ISearchSessionService { + asScopedProvider: (core: CoreStart) => (request: KibanaRequest) => IScopedSearchSessionsClient; } export enum SearchStatus { diff --git a/src/plugins/data_view_editor/public/components/data_view_editor.tsx b/src/plugins/data_view_editor/public/components/data_view_editor.tsx index f984b8451b061f..ff236e804c2b7c 100644 --- a/src/plugins/data_view_editor/public/components/data_view_editor.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_editor.tsx @@ -24,6 +24,7 @@ export const DataViewEditor = ({ defaultTypeIsRollup = false, requireTimestampField = false, editData, + allowAdHocDataView, }: DataViewEditorPropsWithServices) => { const { Provider: KibanaReactContextProvider } = createKibanaReactContext(services); @@ -37,6 +38,7 @@ export const DataViewEditor = ({ defaultTypeIsRollup={defaultTypeIsRollup} requireTimestampField={requireTimestampField} editData={editData} + allowAdHocDataView={allowAdHocDataView} /> diff --git a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx index dc000de1e20fdf..3c1305d8e7860a 100644 --- a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx @@ -20,6 +20,7 @@ import { useFormData, useKibana, GetFieldsOptions, + UseField, } from '../shared_imports'; import { ensureMinimumTime, getIndices, extractTimeFields, getMatchedIndices } from '../lib'; @@ -55,7 +56,7 @@ export interface Props { /** * Handler for the "save" footer button */ - onSave: (dataViewSpec: DataViewSpec) => void; + onSave: (dataViewSpec: DataViewSpec, persist: boolean) => void; /** * Handler for the "cancel" footer button */ @@ -63,6 +64,7 @@ export interface Props { defaultTypeIsRollup?: boolean; requireTimestampField?: boolean; editData?: DataView; + allowAdHoc: boolean; } const editorTitle = i18n.translate('indexPatternEditor.title', { @@ -79,6 +81,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ defaultTypeIsRollup, requireTimestampField = false, editData, + allowAdHoc, }: Props) => { const { services: { http, dataViews, uiSettings, overlays }, @@ -88,6 +91,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ // Prefill with data if editData exists defaultValue: { type: defaultTypeIsRollup ? INDEX_PATTERN_TYPE.ROLLUP : INDEX_PATTERN_TYPE.DEFAULT, + isAdHoc: false, ...(editData ? { title: editData.title, @@ -129,11 +133,11 @@ const IndexPatternEditorFlyoutContentComponent = ({ dataViewName: formData.name || formData.title, overlays, onEdit: async () => { - await onSave(indexPatternStub); + await onSave(indexPatternStub, !formData.isAdHoc); }, }); } else { - await onSave(indexPatternStub); + await onSave(indexPatternStub, !formData.isAdHoc); } }, }); @@ -189,10 +193,11 @@ const IndexPatternEditorFlyoutContentComponent = ({ useEffect(() => { loadSources(); const getTitles = async () => { - const indexPatternTitles = await dataViews.getTitles(editData ? true : false); + const dataViewListItems = await dataViews.getIdsWithTitle(editData ? true : false); + const indexPatternNames = dataViewListItems.map((item) => item.name || item.title); setExistingIndexPatterns( - editData ? indexPatternTitles.filter((v) => v !== editData.title) : indexPatternTitles + editData ? indexPatternNames.filter((v) => v !== editData.name) : indexPatternNames ); setIsLoadingIndexPatterns(false); }; @@ -222,9 +227,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ const currentLoadingTimestampFieldsIdx = ++currentLoadingTimestampFieldsRef.current; let timestampOptions: TimestampOption[] = []; const isValidResult = - !existingIndexPatterns.includes(query) && - matchedIndices.exactMatchedIndices.length > 0 && - !isLoadingMatchedIndices; + matchedIndices.exactMatchedIndices.length > 0 && !isLoadingMatchedIndices; if (isValidResult) { setIsLoadingTimestampFields(true); const getFieldsOptions: GetFieldsOptions = { @@ -245,7 +248,6 @@ const IndexPatternEditorFlyoutContentComponent = ({ return timestampOptions; }, [ - existingIndexPatterns, dataViews, requireTimestampField, rollupIndex, @@ -371,11 +373,12 @@ const IndexPatternEditorFlyoutContentComponent = ({

{editData ? editorTitleEditMode : editorTitle}

+ {indexPatternTypeSelect} - + @@ -383,7 +386,6 @@ const IndexPatternEditorFlyoutContentComponent = ({ @@ -409,9 +410,13 @@ const IndexPatternEditorFlyoutContentComponent = ({