From 9b8f0fa93d4bf2762ff67d93d2b3acd77a3dd005 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Tue, 7 Nov 2023 22:57:26 +0100 Subject: [PATCH 01/46] [Security Solution] Fixes and unskips detection page filters tests (#170763) --- .../alerts/detection_page_filters.cy.ts | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts index 9af8f133f5c7a..55b0817483ff6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts @@ -51,6 +51,7 @@ import { import { TOASTER } from '../../../screens/alerts_detection_rules'; import { setEndDate, setStartDate } from '../../../tasks/date_picker'; import { fillAddFilterForm, openAddFilterPopover } from '../../../tasks/search_bar'; +import { deleteAlertsAndRules } from '../../../tasks/common'; const customFilters = [ { @@ -106,17 +107,13 @@ const assertFilterControlsWithFilterObject = ( }); }; -// Failing: See https://github.com/elastic/kibana/issues/167914 -describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => { - before(() => { - createRule(getNewRule({ rule_id: 'custom_rule_filters' })); - }); - +describe(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { + deleteAlertsAndRules(); + createRule(getNewRule({ rule_id: 'custom_rule_filters' })); login(); visitWithTimeRange(ALERTS_URL); waitForAlerts(); - resetFilters(); }); it('Default page filters are populated when nothing is provided in the URL', () => { @@ -124,16 +121,6 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () }); context('Alert Page Filters Customization ', () => { - beforeEach(() => { - login(); - visitWithTimeRange(ALERTS_URL); - waitForAlerts(); - }); - - afterEach(() => { - resetFilters(); - }); - it('should be able to delete Controls', () => { waitForPageFilters(); editFilterGroupControls(); @@ -234,10 +221,6 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () }); context('with data modificiation', () => { - after(() => { - createRule(getNewRule({ rule_id: 'custom_rule_filters' })); - }); - it(`Alert list is updated when the alerts are updated`, () => { // mark status of one alert to be acknowledged selectCountTable(); From 34bdce90b70799186309a86cbac8171d4570d0ff Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Tue, 7 Nov 2023 17:16:52 -0500 Subject: [PATCH 02/46] [Fleet] Display package root requirements (#170478) --- x-pack/plugins/fleet/common/services/index.ts | 1 + .../common/services/package_helpers.test.ts | 40 +++++++++++ .../fleet/common/services/package_helpers.ts | 18 +++++ .../plugins/fleet/common/types/models/epm.ts | 7 ++ .../fleet/common/types/models/package_spec.ts | 3 + .../single_page_layout/index.tsx | 23 ++++++- .../epm/screens/detail/overview/overview.tsx | 9 +++ .../screens/detail/overview/requirements.tsx | 68 +++++++++++++++++++ 8 files changed, 168 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/fleet/common/services/package_helpers.test.ts create mode 100644 x-pack/plugins/fleet/common/services/package_helpers.ts create mode 100644 x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/requirements.tsx diff --git a/x-pack/plugins/fleet/common/services/index.ts b/x-pack/plugins/fleet/common/services/index.ts index 663cd27deab73..badaff8cb29d3 100644 --- a/x-pack/plugins/fleet/common/services/index.ts +++ b/x-pack/plugins/fleet/common/services/index.ts @@ -7,6 +7,7 @@ export * from './routes'; export * as AgentStatusKueryHelper from './agent_status'; +export * from './package_helpers'; export { packageToPackagePolicyInputs, packageToPackagePolicy, diff --git a/x-pack/plugins/fleet/common/services/package_helpers.test.ts b/x-pack/plugins/fleet/common/services/package_helpers.test.ts new file mode 100644 index 0000000000000..71d3a9018ed5e --- /dev/null +++ b/x-pack/plugins/fleet/common/services/package_helpers.test.ts @@ -0,0 +1,40 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { isRootPrivilegesRequired } from './package_helpers'; + +describe('isRootPrivilegesRequired', () => { + it('should return true if root privileges is required at root level', () => { + const res = isRootPrivilegesRequired({ + agent: { + privileges: { + root: true, + }, + }, + } as any); + expect(res).toBe(true); + }); + it('should return true if root privileges is required at datastreams', () => { + const res = isRootPrivilegesRequired({ + data_streams: [ + { + agent: { + privileges: { root: true }, + }, + }, + ], + } as any); + expect(res).toBe(true); + }); + + it('should return false if root privileges is not required', () => { + const res = isRootPrivilegesRequired({ + data_streams: [], + } as any); + expect(res).toBe(false); + }); +}); diff --git a/x-pack/plugins/fleet/common/services/package_helpers.ts b/x-pack/plugins/fleet/common/services/package_helpers.ts new file mode 100644 index 0000000000000..0282d218cec39 --- /dev/null +++ b/x-pack/plugins/fleet/common/services/package_helpers.ts @@ -0,0 +1,18 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { PackageInfo } from '../types'; + +/** + * Return true if a package need Elastic Agent to be run as root/administrator + */ +export function isRootPrivilegesRequired(packageInfo: PackageInfo) { + return ( + packageInfo.agent?.privileges?.root || + packageInfo.data_streams?.some((d) => d.agent?.privileges?.root) + ); +} diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index d8400a8a61b9b..c4d4e9c763766 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -337,6 +337,7 @@ export enum RegistryDataStreamKeys { dataset_is_prefix = 'dataset_is_prefix', routing_rules = 'routing_rules', lifecycle = 'lifecycle', + agent = 'agent', } export interface RegistryDataStream { @@ -355,6 +356,12 @@ export interface RegistryDataStream { [RegistryDataStreamKeys.dataset_is_prefix]?: boolean; [RegistryDataStreamKeys.routing_rules]?: RegistryDataStreamRoutingRules[]; [RegistryDataStreamKeys.lifecycle]?: RegistryDataStreamLifecycle; + [RegistryDataStreamKeys.lifecycle]?: RegistryDataStreamLifecycle; + [RegistryDataStreamKeys.agent]?: RegistryAgent; +} + +export interface RegistryAgent { + privileges?: { root?: boolean }; } export interface RegistryElasticsearch { diff --git a/x-pack/plugins/fleet/common/types/models/package_spec.ts b/x-pack/plugins/fleet/common/types/models/package_spec.ts index d372defd72c0e..60bc051af04fc 100644 --- a/x-pack/plugins/fleet/common/types/models/package_spec.ts +++ b/x-pack/plugins/fleet/common/types/models/package_spec.ts @@ -31,6 +31,9 @@ export interface PackageSpecManifest { RegistryElasticsearch, 'index_template.settings' | 'index_template.mappings' | 'index_template.data_stream' >; + agent?: { + privileges?: { root?: boolean }; + }; asset_tags?: PackageSpecTags[]; } export interface PackageSpecTags { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx index f4e46650f2049..d0b82cf66e641 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.tsx @@ -19,6 +19,7 @@ import { EuiFlexItem, EuiSpacer, EuiErrorBoundary, + EuiCallOut, } from '@elastic/eui'; import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; @@ -29,7 +30,7 @@ import { import { useCancelAddPackagePolicy } from '../hooks'; -import { splitPkgKey } from '../../../../../../../common/services'; +import { isRootPrivilegesRequired, splitPkgKey } from '../../../../../../../common/services'; import type { NewAgentPolicy } from '../../../../types'; import { useConfig, sendGetAgentStatus, useGetPackageInfoByKeyQuery } from '../../../../hooks'; import { @@ -447,6 +448,26 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({ integration={integrationInfo?.name} /> )} + {packageInfo && isRootPrivilegesRequired(packageInfo) ? ( + <> + + } + > + + + + + ) : null} {numTransformAssets > 0 ? ( <> diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx index cd8fbebe7f2a3..517c0552f925b 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/overview.tsx @@ -23,6 +23,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { isIntegrationPolicyTemplate, isPackagePrerelease, + isRootPrivilegesRequired, } from '../../../../../../../../common/services'; import { @@ -37,6 +38,7 @@ import type { PackageInfo, RegistryPolicyTemplate } from '../../../../../types'; import { Screenshots } from './screenshots'; import { Readme } from './readme'; import { Details } from './details'; +import { Requirements } from './requirements'; interface Props { packageInfo: PackageInfo; @@ -277,6 +279,8 @@ export const OverviewPage: React.FC = memo( ]; }, [h1, navItems]); + const requireAgentRootPrivileges = isRootPrivilegesRequired(packageInfo); + return ( @@ -309,6 +313,11 @@ export const OverviewPage: React.FC = memo( + {requireAgentRootPrivileges ? ( + + + + ) : null} {screenshots.length ? ( { + return ( + + + + + +

+ +

+
+
+
+
+ + + + + + + + ), + }, + ]} + /> + +
+ ); +}); From 133fad28e0c41610a2538aa535089baf1c77693e Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 00:47:15 +0000 Subject: [PATCH 03/46] skip flaky suite (#169159) --- .../spaces_only/tests/actions/migrations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/migrations.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/migrations.ts index 4f23a5ff3a727..4c555aba0e2dc 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/migrations.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/migrations.ts @@ -15,7 +15,8 @@ export default function createGetTests({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); - describe('migrations', () => { + // FLAKY: https://github.com/elastic/kibana/issues/169159 + describe.skip('migrations', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/actions'); }); From 70fb99b4d3adf609cecaf4ee0197124191775cd5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 00:50:27 +0000 Subject: [PATCH 04/46] skip flaky suite (#168340) --- .../automated_response_actions.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/automated_response_actions.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/automated_response_actions.cy.ts index 1948434b39c9f..50bcefc65ab95 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/automated_response_actions.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/automated_response_actions.cy.ts @@ -20,7 +20,8 @@ import { createEndpointHost } from '../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../tasks/delete_all_endpoint_data'; import { enableAllPolicyProtections } from '../../tasks/endpoint_policy'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/168340 +describe.skip( 'Automated Response Actions', { tags: [ From 819b8d9eadef63ff4ff9abd9f24f9789d98f2389 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 00:51:41 +0000 Subject: [PATCH 05/46] skip flaky suite (#170674) --- .../cypress/e2e/response_actions/document_signing.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/document_signing.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/document_signing.cy.ts index b806323726018..4093581366321 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/document_signing.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/document_signing.cy.ts @@ -22,7 +22,8 @@ import { enableAllPolicyProtections } from '../../tasks/endpoint_policy'; import { createEndpointHost } from '../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../tasks/delete_all_endpoint_data'; -describe('Document signing:', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/170674 +describe.skip('Document signing:', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { let indexedPolicy: IndexedFleetEndpointPolicyResponse; let policy: PolicyData; let createdHost: CreateAndEnrollEndpointHostResponse; From 37caf6514169be6f68dcdd733a837429bbbc24fb Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 00:52:46 +0000 Subject: [PATCH 06/46] skip flaky suite (#170794) --- ...nt_from_host_changing_policy_from_disabled_to_enabled.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_disabled_to_enabled.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_disabled_to_enabled.cy.ts index 5950288f2313e..056191ad2bd7f 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_disabled_to_enabled.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_disabled_to_enabled.cy.ts @@ -24,7 +24,8 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170794 +describe.skip( 'Uninstall agent from host changing agent policy when agent tamper protection is disabled but then is switched to a policy with it enabled', { tags: ['@ess'] }, () => { From 7d1eaab50a97a325aacb68790fc726d8392685b8 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 01:34:29 +0000 Subject: [PATCH 07/46] skip flaky suite (#169689) --- .../cypress/e2e/response_actions/alerts_response_console.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/alerts_response_console.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/alerts_response_console.cy.ts index a736e05c33145..00dc41b94ef4f 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/alerts_response_console.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/alerts_response_console.cy.ts @@ -26,7 +26,8 @@ import { enableAllPolicyProtections } from '../../tasks/endpoint_policy'; import { createEndpointHost } from '../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../tasks/delete_all_endpoint_data'; -describe('Response console', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/169689 +describe.skip('Response console', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { let indexedPolicy: IndexedFleetEndpointPolicyResponse; let policy: PolicyData; let createdHost: CreateAndEnrollEndpointHostResponse; From 57085a68ccb218794f71e474e96cd5313416b3ce Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 01:36:19 +0000 Subject: [PATCH 08/46] skip flaky suite (#169821) --- .../e2e/response_actions/endpoints_list_response_console.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/endpoints_list_response_console.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/endpoints_list_response_console.cy.ts index 75074b0d3f94a..3d02bc14251dd 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/endpoints_list_response_console.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/endpoints_list_response_console.cy.ts @@ -20,7 +20,8 @@ import { enableAllPolicyProtections } from '../../tasks/endpoint_policy'; import { createEndpointHost } from '../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../tasks/delete_all_endpoint_data'; -describe('Response console', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/169821 +describe.skip('Response console', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { beforeEach(() => { login(); }); From 9a21552feab41183315eeed39e8a8e6269d04adc Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 01:37:23 +0000 Subject: [PATCH 09/46] skip flaky suite (#170604) --- ...nt_from_host_changing_policy_from_enabled_to_disabled.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_disabled.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_disabled.cy.ts index e55872351aef0..e949851677f2a 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_disabled.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_disabled.cy.ts @@ -23,7 +23,8 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170604 +describe.skip( 'Uninstall agent from host changing agent policy when agent tamper protection is enabled but then is switched to a policy with it disabled', { tags: ['@ess'] }, () => { From ce5a0ce5902ea0fd8ba48236d6cb6499cca199f2 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 01:39:40 +0000 Subject: [PATCH 10/46] skip flaky suite (#170811) --- ...t_from_fleet_changing_policy_from_disabled_to_enabled.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/unenroll_agent_from_fleet_changing_policy_from_disabled_to_enabled.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/unenroll_agent_from_fleet_changing_policy_from_disabled_to_enabled.cy.ts index d30345d8d5486..b03608c9c52f2 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/unenroll_agent_from_fleet_changing_policy_from_disabled_to_enabled.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/unenroll_agent_from_fleet_changing_policy_from_disabled_to_enabled.cy.ts @@ -22,7 +22,8 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170811 +describe.skip( 'Unenroll agent from fleet when agent tamper protection is disabled but then is switched to a policy with it enabled', { tags: ['@ess'] }, () => { From d777aba0ae2da2044ea17189e05d594c9af30017 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 01:40:43 +0000 Subject: [PATCH 11/46] skip flaky suite (#170706) --- .../tamper_protection/enabled/unenroll_agent_from_fleet.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/unenroll_agent_from_fleet.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/unenroll_agent_from_fleet.cy.ts index 17cb52c2cb042..f2aef24ad5e12 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/unenroll_agent_from_fleet.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/unenroll_agent_from_fleet.cy.ts @@ -20,7 +20,8 @@ import { login } from '../../../tasks/login'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170706 +describe.skip( 'Unenroll agent from fleet when agent tamper protection is enabled', { tags: ['@ess'] }, () => { From ec0d85069456e93ddf15df47767de821bd58ace5 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 02:28:31 +0000 Subject: [PATCH 12/46] skip flaky suite (#170812) --- ...ent_from_host_changing_policy_from_enabled_to_enabled.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_enabled.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_enabled.cy.ts index 15fd02ad14511..6dca6af07a53a 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_enabled.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/switching_policies/uninstall_agent_from_host_changing_policy_from_enabled_to_enabled.cy.ts @@ -23,7 +23,8 @@ import { login } from '../../../tasks/login'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170812 +describe.skip( 'Uninstall agent from host changing agent policy when agent tamper protection is enabled but then is switched to a policy with it also enabled', { tags: ['@ess'] }, () => { From 85aa3330a0260ee6442a6aee004f69c0082fcdcc Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 02:29:54 +0000 Subject: [PATCH 13/46] skip flaky suite (#170667) --- .../tamper_protection/disabled/uninstall_agent_from_host.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts index ed47855ac894a..b0d1f0a56ee69 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts @@ -21,7 +21,8 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170667 +describ.skip( 'Uninstall agent from host when agent tamper protection is disabled', { tags: ['@ess'] }, () => { From 014045ed4400c036e56fc32ed39f7475fc1a1317 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 02:30:34 +0000 Subject: [PATCH 14/46] chore(NA): update versions after v8.11.1 bump (#170738) This PR is a simple update of our versions file after the recent bumps. --- versions.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/versions.json b/versions.json index b6ac52d0272ce..f904685d12776 100644 --- a/versions.json +++ b/versions.json @@ -8,17 +8,11 @@ "currentMinor": true }, { - "version": "8.11.0", + "version": "8.11.1", "branch": "8.11", "currentMajor": true, "previousMinor": true }, - { - "version": "8.10.5", - "branch": "8.10", - "currentMajor": true, - "previousMinor": true - }, { "version": "7.17.15", "branch": "7.17", From e7fe2181ccf2d46e98a714f4a8e9d29befc8dee2 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 04:04:25 +0000 Subject: [PATCH 15/46] skip flaky suite (#170667) --- .../tamper_protection/disabled/uninstall_agent_from_host.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts index b0d1f0a56ee69..34aba3fcfccf2 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/disabled/uninstall_agent_from_host.cy.ts @@ -22,7 +22,7 @@ import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; // FLAKY: https://github.com/elastic/kibana/issues/170667 -describ.skip( +describe.skip( 'Uninstall agent from host when agent tamper protection is disabled', { tags: ['@ess'] }, () => { From 5b803e97562d92097cb6ae0eeafef159c41eb5cf Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 8 Nov 2023 04:05:20 +0000 Subject: [PATCH 16/46] skip flaky suite (#170601) --- .../tamper_protection/enabled/uninstall_agent_from_host.cy.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/uninstall_agent_from_host.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/uninstall_agent_from_host.cy.ts index 527566bed608b..8f45e3d70b5e6 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/uninstall_agent_from_host.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/tamper_protection/enabled/uninstall_agent_from_host.cy.ts @@ -22,7 +22,8 @@ import { login } from '../../../tasks/login'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -describe( +// FLAKY: https://github.com/elastic/kibana/issues/170601 +describe.skip( 'Uninstall agent from host when agent tamper protection is enabled', { tags: ['@ess'] }, () => { From 1e1aab3fb35bd59c0bb8d6a9465b7969f859db2f Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 7 Nov 2023 23:11:47 -0500 Subject: [PATCH 17/46] skip failing test suite (#170690) --- x-pack/test/fleet_api_integration/apis/agents/list.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test/fleet_api_integration/apis/agents/list.ts b/x-pack/test/fleet_api_integration/apis/agents/list.ts index 995a0393637c6..4bf7e84d70e7f 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/list.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/list.ts @@ -19,6 +19,7 @@ export default function ({ getService }: FtrProviderContext) { let elasticAgentpkgVersion: string; // Failing: See https://github.com/elastic/kibana/issues/170690 // Failing: See https://github.com/elastic/kibana/issues/170690 + // Failing: See https://github.com/elastic/kibana/issues/170690 describe.skip('fleet_list_agent', () => { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/fleet/agents'); From 4ddec875d157cdb7505735165e752e90c110797e Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 8 Nov 2023 01:04:44 -0500 Subject: [PATCH 18/46] [api-docs] 2023-11-08 Daily api_docs build (#170823) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/515 --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 2 +- api_docs/aiops.mdx | 2 +- api_docs/alerting.mdx | 2 +- api_docs/apm.devdocs.json | 12 +- api_docs/apm.mdx | 2 +- api_docs/apm_data_access.mdx | 2 +- api_docs/asset_manager.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.devdocs.json | 8 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/content_management.mdx | 2 +- api_docs/controls.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.devdocs.json | 22 +-- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.devdocs.json | 4 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 2 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 2 +- api_docs/deprecations_by_plugin.mdx | 2 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/ecs_data_quality_dashboard.mdx | 2 +- api_docs/elastic_assistant.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_annotation_listing.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/exploratory_view.mdx | 2 +- api_docs/expression_error.mdx | 2 +- api_docs/expression_gauge.mdx | 2 +- api_docs/expression_heatmap.mdx | 2 +- api_docs/expression_image.mdx | 2 +- api_docs/expression_legacy_metric_vis.mdx | 2 +- api_docs/expression_metric.mdx | 2 +- api_docs/expression_metric_vis.mdx | 2 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/files_management.mdx | 2 +- api_docs/fleet.devdocs.json | 44 ++++++ api_docs/fleet.mdx | 4 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/image_embeddable.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.devdocs.json | 28 ++++ api_docs/index_management.mdx | 4 +- api_docs/infra.devdocs.json | 49 ------ api_docs/infra.mdx | 4 +- api_docs/inspector.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/kbn_ace.mdx | 2 +- api_docs/kbn_aiops_components.mdx | 2 +- api_docs/kbn_aiops_utils.mdx | 2 +- .../kbn_alerting_api_integration_helpers.mdx | 2 +- api_docs/kbn_alerting_state_types.mdx | 2 +- api_docs/kbn_alerts_as_data_utils.mdx | 2 +- api_docs/kbn_alerts_ui_shared.mdx | 2 +- api_docs/kbn_analytics.mdx | 2 +- api_docs/kbn_analytics_client.mdx | 2 +- ..._analytics_shippers_elastic_v3_browser.mdx | 2 +- ...n_analytics_shippers_elastic_v3_common.mdx | 2 +- ...n_analytics_shippers_elastic_v3_server.mdx | 2 +- api_docs/kbn_analytics_shippers_fullstory.mdx | 2 +- api_docs/kbn_analytics_shippers_gainsight.mdx | 2 +- api_docs/kbn_apm_config_loader.mdx | 2 +- api_docs/kbn_apm_synthtrace.mdx | 2 +- .../kbn_apm_synthtrace_client.devdocs.json | 19 ++- api_docs/kbn_apm_synthtrace_client.mdx | 4 +- api_docs/kbn_apm_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_cases_components.mdx | 2 +- api_docs/kbn_cell_actions.mdx | 2 +- api_docs/kbn_chart_expressions_common.mdx | 2 +- api_docs/kbn_chart_icons.mdx | 2 +- api_docs/kbn_ci_stats_core.mdx | 2 +- api_docs/kbn_ci_stats_performance_metrics.mdx | 2 +- api_docs/kbn_ci_stats_reporter.mdx | 2 +- api_docs/kbn_cli_dev_mode.mdx | 2 +- api_docs/kbn_code_editor.mdx | 2 +- api_docs/kbn_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_content_editor.mdx | 2 +- ...tent_management_tabbed_table_list_view.mdx | 2 +- ...kbn_content_management_table_list_view.mdx | 2 +- ...ntent_management_table_list_view_table.mdx | 2 +- api_docs/kbn_content_management_utils.mdx | 2 +- api_docs/kbn_core_analytics_browser.mdx | 2 +- .../kbn_core_analytics_browser_internal.mdx | 2 +- api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +- api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_apps_server_internal.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_custom_branding_browser.mdx | 2 +- ..._core_custom_branding_browser_internal.mdx | 2 +- ...kbn_core_custom_branding_browser_mocks.mdx | 2 +- api_docs/kbn_core_custom_branding_common.mdx | 2 +- api_docs/kbn_core_custom_branding_server.mdx | 2 +- ...n_core_custom_branding_server_internal.mdx | 2 +- .../kbn_core_custom_branding_server_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_browser.mdx | 2 +- ...kbn_core_deprecations_browser_internal.mdx | 2 +- .../kbn_core_deprecations_browser_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_common.mdx | 2 +- api_docs/kbn_core_deprecations_server.mdx | 2 +- .../kbn_core_deprecations_server_internal.mdx | 2 +- .../kbn_core_deprecations_server_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_browser.mdx | 2 +- api_docs/kbn_core_doc_links_browser_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_server.mdx | 2 +- api_docs/kbn_core_doc_links_server_mocks.mdx | 2 +- ...e_elasticsearch_client_server_internal.mdx | 2 +- ...core_elasticsearch_client_server_mocks.mdx | 2 +- api_docs/kbn_core_elasticsearch_server.mdx | 2 +- ...kbn_core_elasticsearch_server_internal.mdx | 2 +- .../kbn_core_elasticsearch_server_mocks.mdx | 2 +- .../kbn_core_environment_server_internal.mdx | 2 +- .../kbn_core_environment_server_mocks.mdx | 2 +- .../kbn_core_execution_context_browser.mdx | 2 +- ...ore_execution_context_browser_internal.mdx | 2 +- ...n_core_execution_context_browser_mocks.mdx | 2 +- .../kbn_core_execution_context_common.mdx | 2 +- .../kbn_core_execution_context_server.mdx | 2 +- ...core_execution_context_server_internal.mdx | 2 +- ...bn_core_execution_context_server_mocks.mdx | 2 +- api_docs/kbn_core_fatal_errors_browser.mdx | 2 +- .../kbn_core_fatal_errors_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_browser.mdx | 2 +- api_docs/kbn_core_http_browser_internal.mdx | 2 +- api_docs/kbn_core_http_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_common.mdx | 2 +- .../kbn_core_http_context_server_mocks.mdx | 2 +- ...re_http_request_handler_context_server.mdx | 2 +- api_docs/kbn_core_http_resources_server.mdx | 2 +- ...bn_core_http_resources_server_internal.mdx | 2 +- .../kbn_core_http_resources_server_mocks.mdx | 2 +- .../kbn_core_http_router_server_internal.mdx | 2 +- .../kbn_core_http_router_server_mocks.mdx | 2 +- api_docs/kbn_core_http_server.devdocs.json | 4 + api_docs/kbn_core_http_server.mdx | 2 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- .../kbn_core_plugins_browser.devdocs.json | 10 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- .../kbn_core_plugins_contracts_browser.mdx | 2 +- .../kbn_core_plugins_contracts_server.mdx | 2 +- api_docs/kbn_core_plugins_server.devdocs.json | 20 ++- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...kbn_core_saved_objects_server_internal.mdx | 2 +- .../kbn_core_saved_objects_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_utils_server.mdx | 2 +- api_docs/kbn_core_status_common.mdx | 2 +- api_docs/kbn_core_status_common_internal.mdx | 2 +- api_docs/kbn_core_status_server.mdx | 2 +- api_docs/kbn_core_status_server_internal.mdx | 2 +- api_docs/kbn_core_status_server_mocks.mdx | 2 +- ...core_test_helpers_deprecations_getters.mdx | 2 +- ...n_core_test_helpers_http_setup_browser.mdx | 2 +- api_docs/kbn_core_test_helpers_kbn_server.mdx | 2 +- .../kbn_core_test_helpers_model_versions.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_test_helpers_test_utils.mdx | 2 +- api_docs/kbn_core_theme_browser.mdx | 2 +- api_docs/kbn_core_theme_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_browser.mdx | 2 +- .../kbn_core_ui_settings_browser_internal.mdx | 2 +- .../kbn_core_ui_settings_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_common.mdx | 2 +- api_docs/kbn_core_ui_settings_server.mdx | 2 +- .../kbn_core_ui_settings_server_internal.mdx | 2 +- .../kbn_core_ui_settings_server_mocks.mdx | 2 +- api_docs/kbn_core_usage_data_server.mdx | 2 +- .../kbn_core_usage_data_server_internal.mdx | 2 +- api_docs/kbn_core_usage_data_server_mocks.mdx | 2 +- api_docs/kbn_core_user_settings_server.mdx | 2 +- ...kbn_core_user_settings_server_internal.mdx | 2 +- .../kbn_core_user_settings_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_custom_integrations.mdx | 2 +- api_docs/kbn_cypress_config.mdx | 2 +- api_docs/kbn_data_service.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_deeplinks_analytics.mdx | 2 +- api_docs/kbn_deeplinks_devtools.mdx | 2 +- api_docs/kbn_deeplinks_management.mdx | 2 +- api_docs/kbn_deeplinks_ml.mdx | 2 +- api_docs/kbn_deeplinks_observability.mdx | 2 +- api_docs/kbn_deeplinks_search.mdx | 2 +- api_docs/kbn_default_nav_analytics.mdx | 2 +- api_docs/kbn_default_nav_devtools.mdx | 2 +- api_docs/kbn_default_nav_management.mdx | 2 +- api_docs/kbn_default_nav_ml.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_discover_utils.mdx | 2 +- api_docs/kbn_doc_links.mdx | 2 +- api_docs/kbn_docs_utils.mdx | 2 +- api_docs/kbn_dom_drag_drop.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs.mdx | 2 +- api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +- api_docs/kbn_elastic_assistant.devdocs.json | 17 ++ api_docs/kbn_elastic_assistant.mdx | 4 +- api_docs/kbn_es.mdx | 2 +- api_docs/kbn_es_archiver.mdx | 2 +- api_docs/kbn_es_errors.mdx | 2 +- api_docs/kbn_es_query.mdx | 2 +- api_docs/kbn_es_types.mdx | 2 +- api_docs/kbn_eslint_plugin_imports.mdx | 2 +- api_docs/kbn_event_annotation_common.mdx | 2 +- api_docs/kbn_event_annotation_components.mdx | 2 +- api_docs/kbn_expandable_flyout.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_field_utils.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_generate_console_definitions.mdx | 2 +- api_docs/kbn_generate_csv.mdx | 2 +- api_docs/kbn_generate_csv_types.mdx | 2 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_i18n_react.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_infra_forge.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_json_ast.mdx | 2 +- api_docs/kbn_kibana_manifest_schema.mdx | 2 +- .../kbn_language_documentation_popover.mdx | 2 +- api_docs/kbn_lens_embeddable_utils.mdx | 2 +- api_docs/kbn_logging.mdx | 2 +- api_docs/kbn_logging_mocks.mdx | 2 +- api_docs/kbn_managed_vscode_config.mdx | 2 +- api_docs/kbn_management_cards_navigation.mdx | 2 +- .../kbn_management_settings_application.mdx | 2 +- ...ent_settings_components_field_category.mdx | 2 +- ...gement_settings_components_field_input.mdx | 2 +- ...nagement_settings_components_field_row.mdx | 2 +- ...bn_management_settings_components_form.mdx | 2 +- ...n_management_settings_field_definition.mdx | 2 +- api_docs/kbn_management_settings_ids.mdx | 2 +- ...n_management_settings_section_registry.mdx | 2 +- api_docs/kbn_management_settings_types.mdx | 2 +- .../kbn_management_settings_utilities.mdx | 2 +- api_docs/kbn_management_storybook_config.mdx | 2 +- api_docs/kbn_mapbox_gl.devdocs.json | 149 ++++++++++++++++++ api_docs/kbn_mapbox_gl.mdx | 4 +- api_docs/kbn_maps_vector_tile_utils.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_anomaly_utils.mdx | 2 +- api_docs/kbn_ml_category_validator.mdx | 2 +- api_docs/kbn_ml_chi2test.mdx | 2 +- .../kbn_ml_data_frame_analytics_utils.mdx | 2 +- api_docs/kbn_ml_data_grid.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_date_utils.mdx | 2 +- api_docs/kbn_ml_error_utils.mdx | 2 +- api_docs/kbn_ml_in_memory_table.mdx | 2 +- api_docs/kbn_ml_is_defined.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_kibana_theme.mdx | 2 +- api_docs/kbn_ml_local_storage.mdx | 2 +- api_docs/kbn_ml_nested_property.mdx | 2 +- api_docs/kbn_ml_number_utils.mdx | 2 +- api_docs/kbn_ml_query_utils.mdx | 2 +- api_docs/kbn_ml_random_sampler_utils.mdx | 2 +- api_docs/kbn_ml_route_utils.mdx | 2 +- api_docs/kbn_ml_runtime_field_utils.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_trained_models_utils.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_object_versioning.mdx | 2 +- api_docs/kbn_observability_alert_details.mdx | 2 +- .../kbn_observability_alerting_test_data.mdx | 2 +- api_docs/kbn_openapi_generator.mdx | 2 +- api_docs/kbn_optimizer.mdx | 2 +- api_docs/kbn_optimizer_webpack_helpers.mdx | 2 +- api_docs/kbn_osquery_io_ts_types.mdx | 2 +- ..._performance_testing_dataset_extractor.mdx | 2 +- api_docs/kbn_plugin_generator.mdx | 2 +- api_docs/kbn_plugin_helpers.mdx | 2 +- api_docs/kbn_profiling_utils.mdx | 2 +- api_docs/kbn_random_sampling.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_react_kibana_context_common.mdx | 2 +- api_docs/kbn_react_kibana_context_render.mdx | 2 +- api_docs/kbn_react_kibana_context_root.mdx | 2 +- api_docs/kbn_react_kibana_context_styled.mdx | 2 +- api_docs/kbn_react_kibana_context_theme.mdx | 2 +- api_docs/kbn_react_kibana_mount.mdx | 2 +- api_docs/kbn_repo_file_maps.mdx | 2 +- api_docs/kbn_repo_linter.mdx | 2 +- api_docs/kbn_repo_path.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_reporting_common.mdx | 2 +- api_docs/kbn_resizable_layout.mdx | 2 +- api_docs/kbn_rison.mdx | 2 +- api_docs/kbn_rrule.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- api_docs/kbn_saved_objects_settings.mdx | 2 +- api_docs/kbn_search_api_panels.mdx | 2 +- api_docs/kbn_search_connectors.mdx | 2 +- api_docs/kbn_search_response_warnings.mdx | 2 +- api_docs/kbn_security_solution_features.mdx | 2 +- api_docs/kbn_security_solution_navigation.mdx | 2 +- api_docs/kbn_security_solution_side_nav.mdx | 2 +- ...kbn_security_solution_storybook_config.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_data_table.mdx | 2 +- api_docs/kbn_securitysolution_ecs.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_grouping.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_serverless_common_settings.mdx | 2 +- .../kbn_serverless_observability_settings.mdx | 2 +- api_docs/kbn_serverless_project_switcher.mdx | 2 +- api_docs/kbn_serverless_search_settings.mdx | 2 +- api_docs/kbn_serverless_security_settings.mdx | 2 +- api_docs/kbn_serverless_storybook_config.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- ...n_shared_ux_chrome_navigation.devdocs.json | 10 +- api_docs/kbn_shared_ux_chrome_navigation.mdx | 4 +- api_docs/kbn_shared_ux_error_boundary.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_types.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_slo_schema.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_subscription_tracking.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_jest_helpers.mdx | 2 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_text_based_editor.mdx | 2 +- api_docs/kbn_tooling_log.mdx | 2 +- api_docs/kbn_ts_projects.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_actions_browser.mdx | 2 +- api_docs/kbn_ui_shared_deps_src.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_unified_data_table.mdx | 2 +- api_docs/kbn_unified_doc_viewer.mdx | 2 +- api_docs/kbn_unified_field_list.mdx | 2 +- api_docs/kbn_url_state.mdx | 2 +- api_docs/kbn_use_tracked_promise.mdx | 2 +- api_docs/kbn_user_profile_components.mdx | 2 +- api_docs/kbn_utility_types.mdx | 2 +- api_docs/kbn_utility_types_jest.mdx | 2 +- api_docs/kbn_utils.mdx | 2 +- api_docs/kbn_visualization_ui_components.mdx | 2 +- api_docs/kbn_xstate_utils.mdx | 2 +- api_docs/kbn_yarn_lock_validator.mdx | 2 +- api_docs/kbn_zod_helpers.mdx | 2 +- api_docs/kibana_overview.mdx | 2 +- api_docs/kibana_react.mdx | 2 +- api_docs/kibana_utils.mdx | 2 +- api_docs/kubernetes_security.mdx | 2 +- api_docs/lens.mdx | 2 +- api_docs/license_api_guard.mdx | 2 +- api_docs/license_management.mdx | 2 +- api_docs/licensing.mdx | 2 +- api_docs/links.mdx | 2 +- api_docs/lists.mdx | 2 +- api_docs/log_explorer.mdx | 2 +- api_docs/logs_shared.devdocs.json | 101 ++++++++++++ api_docs/logs_shared.mdx | 4 +- api_docs/management.mdx | 2 +- api_docs/maps.devdocs.json | 22 ++- api_docs/maps.mdx | 4 +- api_docs/maps_ems.mdx | 2 +- api_docs/metrics_data_access.mdx | 2 +- api_docs/ml.mdx | 2 +- api_docs/monitoring.mdx | 2 +- api_docs/monitoring_collection.mdx | 2 +- api_docs/navigation.mdx | 2 +- api_docs/newsfeed.mdx | 2 +- api_docs/no_data_page.mdx | 2 +- api_docs/notifications.mdx | 2 +- api_docs/observability.mdx | 2 +- api_docs/observability_a_i_assistant.mdx | 2 +- api_docs/observability_log_explorer.mdx | 2 +- api_docs/observability_onboarding.mdx | 2 +- api_docs/observability_shared.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/painless_lab.mdx | 2 +- api_docs/plugin_directory.mdx | 24 +-- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/profiling_data_access.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/security.mdx | 2 +- api_docs/security_solution.devdocs.json | 32 +++- api_docs/security_solution.mdx | 4 +- api_docs/security_solution_ess.mdx | 2 +- api_docs/security_solution_serverless.mdx | 2 +- api_docs/serverless.mdx | 2 +- api_docs/serverless_observability.mdx | 2 +- api_docs/serverless_search.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/text_based_languages.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.mdx | 2 +- api_docs/ui_actions.mdx | 2 +- api_docs/ui_actions_enhanced.mdx | 2 +- api_docs/unified_doc_viewer.mdx | 2 +- api_docs/unified_histogram.mdx | 2 +- api_docs/unified_search.mdx | 2 +- api_docs/unified_search_autocomplete.mdx | 2 +- api_docs/uptime.mdx | 2 +- api_docs/url_forwarding.mdx | 2 +- api_docs/usage_collection.mdx | 2 +- api_docs/ux.mdx | 2 +- api_docs/vis_default_editor.mdx | 2 +- api_docs/vis_type_gauge.mdx | 2 +- api_docs/vis_type_heatmap.mdx | 2 +- api_docs/vis_type_pie.mdx | 2 +- api_docs/vis_type_table.mdx | 2 +- api_docs/vis_type_timelion.mdx | 2 +- api_docs/vis_type_timeseries.mdx | 2 +- api_docs/vis_type_vega.mdx | 2 +- api_docs/vis_type_vislib.mdx | 2 +- api_docs/vis_type_xy.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 616 files changed, 1089 insertions(+), 702 deletions(-) diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index fa6f0b70f69ec..79d6bd0fa60b9 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 9a4a940ab3973..44a00f0166f0f 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 783fbfb7a31f9..e422de610d73c 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 0a9419df63175..1859dd5070ab5 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 2878d3c994d49..c35b5362dce3d 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -124,7 +124,17 @@ "section": "def-common.LocatorPublic", "text": "LocatorPublic" }, - "<{ serviceName: undefined; } | ({ serviceName: string; } & { serviceOverviewTab?: \"errors\" | \"metrics\" | \"traces\" | \"logs\" | undefined; } & { query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + "<{ serviceName: undefined; } | ({ serviceName: string; } & { dashboardId: string; } & { query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + "Branded", + "; }; }) | ({ serviceName: string; } & { dashboardId?: undefined; } & { serviceOverviewTab?: \"errors\" | \"metrics\" | \"traces\" | \"logs\" | undefined; } & { query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", "Branded", "" ], @@ -244,7 +244,7 @@ "children": [ { "parentPluginId": "dashboard", - "id": "def-public.getEmbeddableParams.$1", + "id": "def-public.getDashboardLocatorParamsFromEmbeddable.$1", "type": "Object", "tags": [], "label": "source", @@ -274,7 +274,7 @@ }, { "parentPluginId": "dashboard", - "id": "def-public.getEmbeddableParams.$2", + "id": "def-public.getDashboardLocatorParamsFromEmbeddable.$2", "type": "Object", "tags": [], "label": "options", @@ -685,8 +685,8 @@ "pluginId": "dashboard", "scope": "public", "docId": "kibDashboardPluginApi", - "section": "def-public.DashboardAppLocatorParams", - "text": "DashboardAppLocatorParams" + "section": "def-public.DashboardLocatorParams", + "text": "DashboardLocatorParams" }, ">" ], @@ -697,10 +697,10 @@ }, { "parentPluginId": "dashboard", - "id": "def-public.DashboardAppLocatorParams", + "id": "def-public.DashboardLocatorParams", "type": "Type", "tags": [], - "label": "DashboardAppLocatorParams", + "label": "DashboardLocatorParams", "description": [], "signature": [ "Partial" ], diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 16bf8b156ab9e..09fcce9230843 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 6d4e212030ff5..c18cddf26542a 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index e64482bd4f09a..f6ce269957b10 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 33e8535c35b2f..415ada7e5549a 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 61097b12f73af..ec50a49ed74a2 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 9010ea804d7fb..9d6d93896bbd1 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index aff472aab574b..0605f38e81386 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 6339f692f0fd8..ca93120bad1d7 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index e34fe763994e1..a5e2190da91db 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 8c0bd1f7aeda3..78ea09c4352cc 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 4c718d7d2ebf4..50b5e97ce8b63 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 577b7e77db371..30026b7232aca 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 02b9efb3d3f55..6656244a0d104 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 7252758b62611..103a4765aef64 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 91447e765fb5f..67b7c83a7d522 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 707335457ed5f..f48f60612e27b 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 32fbc7c59a2c5..cd980e046c0b5 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 08416bccde75c..761f141445842 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 424d5405407d2..3c59f403f5dba 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 5d8c108d75bb4..cab0585e6f537 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index c50f1c19eadab..a48018513198b 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index b8bf9d49359ec..11688ce74c56b 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index a105a56a4c5f1..78a694fa803ca 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 7f0f0442722c9..64c97d517c370 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 5bf3b72044b7c..8cd31aeb6d5fb 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 6d1adff608fc5..f9297e12ab770 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 706729aa1e0be..6745796a8aa5e 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 7bedc54897dad..764e58d2003fd 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index fda8ab295f260..85bf89ece8e81 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 7cbc0ff5432e8..adac11ffaecf4 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 168d406227f63..7326d0fdf5254 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 563e42b05111d..a97eb757de584 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 9fc401e24f307..983544c21cbc2 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 08b3ed7c62f2d..bb7c2b81099fe 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 2026f1039a259..b4e3e9c43d205 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 0441e4071e63a..1ed61db0bee17 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 6470b347b3c48..13b1d9d3eae4e 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 9529fb800373d..c8da9bcbc5653 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 8a980a575c25f..8884fde4b0f67 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 9101b0ca949e6..c1553755bfd99 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 8575084e9822a..e46a389eb5773 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index f93667bc72e74..7f14f33cdb14c 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index c42ddd31012bf..e980892f16f03 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index aa07659af92c1..30db3006ece2f 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 59b3abf319cf5..f8533e2f32778 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 2fae327702d1c..70d72df7dda0d 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -22507,6 +22507,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "fleet", + "id": "def-common.PackageSpecManifest.agent", + "type": "Object", + "tags": [], + "label": "agent", + "description": [], + "signature": [ + "{ privileges?: { root?: boolean | undefined; } | undefined; } | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_spec.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "fleet", "id": "def-common.PackageSpecManifest.asset_tags", @@ -22863,6 +22877,36 @@ "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.RegistryDataStream.RegistryDataStreamKeys.lifecycle", + "type": "Object", + "tags": [], + "label": "[RegistryDataStreamKeys.lifecycle]", + "description": [], + "signature": [ + "RegistryDataStreamLifecycle", + " | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.RegistryDataStream.RegistryDataStreamKeys.agent", + "type": "Object", + "tags": [], + "label": "[RegistryDataStreamKeys.agent]", + "description": [], + "signature": [ + "RegistryAgent", + " | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index be0bce30ed912..862b1632b122e 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1209 | 3 | 1091 | 45 | +| 1212 | 3 | 1094 | 46 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 58feafb9b8d5f..251cfddacc854 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 3c921000c98dc..e219e64d767f7 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 1bfc0dd5b7f3f..37cd4ae02e441 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 2734c236ce877..3c969b2ab4ad2 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 744f652ec8a38..58b67e713ea3e 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.devdocs.json b/api_docs/index_management.devdocs.json index 31a67dfc57094..b5ba6df118a22 100644 --- a/api_docs/index_management.devdocs.json +++ b/api_docs/index_management.devdocs.json @@ -2585,6 +2585,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "indexManagement", + "id": "def-common.TemplateDeserialized.allowAutoCreate", + "type": "CompoundType", + "tags": [], + "label": "allowAutoCreate", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/index_management/common/types/templates.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "indexManagement", "id": "def-common.TemplateDeserialized.order", @@ -2997,6 +3011,20 @@ "path": "x-pack/plugins/index_management/common/types/templates.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "indexManagement", + "id": "def-common.TemplateSerialized.allow_auto_create", + "type": "CompoundType", + "tags": [], + "label": "allow_auto_create", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/index_management/common/types/templates.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 105073de1a0ed..a34321ff0f302 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/platform-deployment-management](https://github.com/orgs/elasti | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 204 | 0 | 199 | 4 | +| 206 | 0 | 201 | 4 | ## Client diff --git a/api_docs/infra.devdocs.json b/api_docs/infra.devdocs.json index 7bd53f61bf8b7..6329b376e20cc 100644 --- a/api_docs/infra.devdocs.json +++ b/api_docs/infra.devdocs.json @@ -400,55 +400,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "infra", - "id": "def-server.InfraPluginSetup.defineInternalSourceConfiguration", - "type": "Function", - "tags": [], - "label": "defineInternalSourceConfiguration", - "description": [], - "signature": [ - "(sourceId: string, sourceProperties: ", - "InfraStaticSourceConfiguration", - ") => void" - ], - "path": "x-pack/plugins/infra/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "infra", - "id": "def-server.InfraPluginSetup.defineInternalSourceConfiguration.$1", - "type": "string", - "tags": [], - "label": "sourceId", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/plugins/infra/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "infra", - "id": "def-server.InfraPluginSetup.defineInternalSourceConfiguration.$2", - "type": "Object", - "tags": [], - "label": "sourceProperties", - "description": [], - "signature": [ - "InfraStaticSourceConfiguration" - ], - "path": "x-pack/plugins/infra/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, { "parentPluginId": "infra", "id": "def-server.InfraPluginSetup.inventoryViews", diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index e2d6b0a17b2d3..4a367d304312d 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/inf | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 35 | 0 | 32 | 9 | +| 32 | 0 | 29 | 8 | ## Client diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index f5b95a12be7a6..0c87a6b713ba3 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 6799b154e370c..c26104ac0a39f 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index c177610fdd83c..ad0216b320304 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 3e0ff4b68b7b7..6f604c920df97 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 3d2951d200b86..98ea735696860 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index d0de2139c489a..12045a0c02eb3 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 39ba0c1e81f56..db10981e828b7 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 4bed011702fc5..1594f03974d54 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 7e32c52afcb27..28fe525991bc3 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 74b3efc22e7a8..92bcb7a2c96ce 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index f0f34d0731023..b4db143e0a9fe 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 31ed3e8613184..3a13d48ee8e29 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,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 description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index f4a9d738c9658..281da92f3e3c8 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,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 description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 1b060b7a10284..48d7861866496 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,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 description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 15fd05c72af46..d6229e94c02c5 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 6dbdf4a26208b..197bb74e250f7 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 2eef15fe62da1..86ea8741dddee 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 421eaed8682b7..168efcb3f2e39 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index b3932f6a80802..2bd574701728d 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -1181,6 +1181,23 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.MobileDevice.event", + "type": "Function", + "tags": [], + "label": "event", + "description": [], + "signature": [ + "() => ", + "Event" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "@kbn/apm-synthtrace-client", "id": "def-common.MobileDevice.transaction", @@ -2439,7 +2456,7 @@ "GeoLocation", "; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.ip': string; 'cloud.account.id': string; 'cloud.account.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.project.id': string; 'cloud.project.name': string; 'cloud.provider': string; 'cloud.region': string; 'cloud.service.name': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.manufacturer': string; 'device.model.identifier': string; 'device.model.name': string; 'ecs.version': string; 'error.exception': ", "ApmException", - "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'error.type': string; 'event.ingested': number; 'event.name': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'labels.name': string; 'labels.telemetry_auto_version': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.aggregation.overflow_count': number; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.result': string; 'transaction.sampled': boolean; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.process.cgroup.memory.mem.limit.bytes': number; 'system.process.cgroup.memory.mem.usage.bytes': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; 'application.launch.time': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>" + "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'error.type': string; 'event.ingested': number; 'event.name': string; 'event.action': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'labels.name': string; 'labels.telemetry_auto_version': string; 'labels.lifecycle_state': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.aggregation.overflow_count': number; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.result': string; 'transaction.sampled': boolean; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.process.cgroup.memory.mem.limit.bytes': number; 'system.process.cgroup.memory.mem.usage.bytes': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; 'application.launch.time': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts", "deprecated": false, diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index d280ab55a1949..d7c2d33f3bf52 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for ques | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 180 | 0 | 180 | 26 | +| 181 | 0 | 181 | 27 | ## Common diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 8f39485b88c41..0aaac9c80ad79 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 658beedbd0761..ca790ede16899 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 47a56e98e92cd..35e560b489fa5 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 49ee824435f6f..ff1d8867ba8a5 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index d503a695a016c..108e0b9677253 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index 46ff976627a94..5bd4eb8a09f47 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index c46cce68d0aea..48deda4b55534 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 9e5f134b25ed3..43471c74fa4ed 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index f8e34e1e87ae8..19825ff1f7f95 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index c6288c9d1936f..75c795f3d4acf 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 369e529d75ccc..08c9371334837 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 36f7869a6d215..b157724e74836 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 6afd61e48b6af..1fce8782a8b23 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 2553f43b2a035..b7770f070b0de 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 01ef02eb21df1..9d451640efb4d 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 4862101cab8c6..6e027fc66b3f0 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 8e891ed675ea1..76949a818d230 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 763bfc7126ce6..c183348f78a88 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index b9cddc067a278..b247c70d504a2 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 7ad87dbdb78e8..318efaf95edf3 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 50cb401912b7f..b6993c5dd6235 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index f987215712db1..21b96743400fa 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 15d293cdced1f..8fd52869f10f7 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index d5ee486ab7bb8..720686d39ecf2 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 3b28fab527c55..820084b6f71d9 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 99b4d9ae0c1c9..7bb49b7dd5fe2 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 0272b938db618..06487d7ef5fdf 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 91df4b31c1f45..9aee23e8863ad 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 9109af1c2de31..7e85a42cef8cb 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index f09b7b6b97ed3..a9cedab78adfc 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 558d86e5e87e0..eabc8a5cfef54 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 552085f579f79..2ad3bd563556a 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 462e9a103764b..445af76da653f 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0984ec76c036b..360d67cbf935e 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index f4bd6d661a401..af28a47c6f7b7 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 19a60fc50cf6b..19132a817b6f0 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index f47c6f3abbb5c..b02e22ea97295 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 6057a27f59533..43339f74622b9 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 9dce02a084a06..59e11f0fd8c4e 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index ca7fb6f6c4bbb..0f6258cb2016c 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 91c480e885268..b9239326dd787 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index a4caf2d78ea59..e4d2da5afb2b1 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 62ddfb2070c78..df3f158fbc6d2 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 5e3ccb69708d6..4fce0e412c7e1 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index a90f96336170d..3c331525f6809 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 1837c128252d8..1a185fec94c7c 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 5495242f088e0..f3752b9d4225c 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 5f559ead82f4c..f6376e4546fe2 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 399a0eceeed08..898ce905acd3e 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index e96d80a744644..5e1641b3b4ce5 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index da2649b65ceb7..9c49112e25eb4 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 245ee4f0fe149..52fbc00a463e4 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 7b3141de68291..f70d8cd177327 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 3dd7106dd07b0..d7d419049e986 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index e849f2219e491..8c66e31679dd6 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index b7a6c72b501d8..a04eec2e92756 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 1298b7838451a..0705fbc91ac14 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 420a00e540ad9..f7c350cceef81 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 65d22bc086fe1..a48105d6c1def 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index b8819cbcc3dd8..15737ed45ca32 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index b4e8a1c06258b..e940f9c36bc1c 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 910644fdf6634..a11a18a78927d 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 2096d61895acb..f6a1de48a3a2f 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 5b4423af4a777..3db04e475fe16 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index be801bd6bacf1..bdc93099433aa 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index adf0dd2707d6c..5b5f1885bd4f7 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index a61e93e61c34d..8c53db8ab16de 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 18af0311c28f5..a905ad90009e6 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index d92d0242dd73e..7e2dc38cf39ba 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 454747abc8fea..6ec1c848a1f65 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 5150662ed0507..d69ae9d51c8d0 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index b8575a862cdaa..36ba5fd37735c 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index fc345b7ff30f2..d94e85a4bbe86 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index f73242712ee03..9f6f369cb1972 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 9cd869b2e5886..e9faf33a59e14 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 83fad26214490..b73a910433022 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 2174108775f5a..c2a7abefd9840 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 9a8cd269633f2..85f47ce51191d 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index fc9e1cf37a23f..c75ce0f5d0eb4 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 48903a443df9c..d3d2f417ec826 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 5e050e96162bd..8edcbc801a845 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 0c563ab7a506f..e056393523f12 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 063c4701169f6..e275039ec9dd1 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 87050e3702d92..5e42ba2adb3ad 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 4694a0456b52b..7cb9b3f4c43c2 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 04f5504cf2dc7..c5b8eb9691b3f 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index bf5682f9d150c..5ca730bd160c8 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 937cee5714899..3ffc8b3a40ace 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 0f4fea73385cf..0b87716d3456b 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 35093ec2fe7d7..be2c3b3b165c9 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -14273,6 +14273,10 @@ "plugin": "ml", "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + }, { "plugin": "ml", "path": "x-pack/plugins/ml/server/routes/data_frame_analytics.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 65e7c48af456a..887fb1948733a 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index e05b8e56a92b9..32aa75e78a3ac 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index c4df0b06a8056..f8b1715a07cee 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 303eb54ecb493..9d425fba47514 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 0609b8e684223..000e1f4ad4a83 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 389384c80a7d0..43caace10e66a 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index e0943c08f1765..84b82148c8811 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 91da426b636bd..6a8d8ae1df4d6 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 8160283b1961c..3878f4e4a96bd 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,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 description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 64f981ed16a18..d456155e56941 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index c6fe70e0ff0f0..36a6abca5a436 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 4162d70bb0f5c..ab04ddf9a64c9 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 4c9caa7a6da66..4898e64944c2c 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index cdb116db938ae..d5246151aa7a4 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index d54af3f4b5294..46d3f3371c556 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index 93a871fcfb5dd..ad6e89d7c74a0 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index c7e01b12ea5ff..4e21f4a5ac946 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index b1807ff323f00..269b53c80f27c 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 9de7633fa5aff..aaf8ee0a2fbb5 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index eb640af26f090..dab3d30bc864c 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index d295a4b4de80f..e96f50fb4ca83 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index c4402587c2035..25b363454cf5a 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 44187b3a23185..7748399fa5f78 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 42071cda02edc..a1bf7011c0d56 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 51ee6f3848d2b..c4f03c8095bc5 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index c85f5771682b3..c74d96659a3fb 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index e3976479dac58..e86898b07e98e 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index f3f7a3cf5842f..8f761ad9f0683 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 7b8be9ebc79ea..84fe11dc540e9 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index eb4401c2b1ddc..19d6f406b8bfd 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 9f41708e32d93..f9d25a4dcee42 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 38fe611898982..3277bf01e2fa2 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 7109cfd89caea..2c69933c0b735 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 0e3d1f4d83fbb..2674634a617ad 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index fbec70283b8d1..e58442e08efca 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.devdocs.json b/api_docs/kbn_core_plugins_browser.devdocs.json index 2a0c5a298d8ab..a8013b4ccd8c6 100644 --- a/api_docs/kbn_core_plugins_browser.devdocs.json +++ b/api_docs/kbn_core_plugins_browser.devdocs.json @@ -174,7 +174,15 @@ "label": "stop", "description": [], "signature": [ - "(() => void) | undefined" + "(() => ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.MaybePromise", + "text": "MaybePromise" + }, + ") | undefined" ], "path": "packages/core/plugins/core-plugins-browser/src/plugin.ts", "deprecated": false, diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 16dbbcdb24dcb..c25380c04384b 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 622b8d6834675..1c58cca9a11e4 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 8fd9a673311ac..30ed63bab1822 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 8ea3be3536491..28bab30dce5cf 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.devdocs.json b/api_docs/kbn_core_plugins_server.devdocs.json index a816f657fea80..6de41df4a25aa 100644 --- a/api_docs/kbn_core_plugins_server.devdocs.json +++ b/api_docs/kbn_core_plugins_server.devdocs.json @@ -191,7 +191,15 @@ "label": "stop", "description": [], "signature": [ - "(() => void) | undefined" + "(() => ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.MaybePromise", + "text": "MaybePromise" + }, + ") | undefined" ], "path": "packages/core/plugins/core-plugins-server/src/types.ts", "deprecated": false, @@ -356,7 +364,15 @@ "label": "stop", "description": [], "signature": [ - "(() => void) | undefined" + "(() => ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.MaybePromise", + "text": "MaybePromise" + }, + ") | undefined" ], "path": "packages/core/plugins/core-plugins-server/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index e4569ed3eb263..30b2d43304b6d 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index ac19cb32387bf..04cf6c17985db 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index bc315b8fc4ed2..122004ad3981b 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 3fcea666f3095..50aa9328dc8d1 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 53bffc88b9978..f6405ee7549a2 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 31c3ffb0282e2..1bfab0b145962 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index 1b22f2af1c945..866389f9d2e23 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 1238344f5b3ad..5062d43925dc5 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index 9df1da111b7db..2a27057448908 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index dacc1cd31b91f..afd5aa03b645b 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 27cf381f07564..6c23da75e7b71 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index c219b14c3d1c5..9594cf99e1f80 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 1f99139e2a09a..aa8f72a0f4c4c 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 55188b52bfa0e..c844745679a3a 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 30de192e52ef7..8815a87f2283f 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 6c67670080057..f1cd4f81f240f 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index a9d3fd06e0796..5ed640fa21782 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 569007278a8db..7c4fce3446526 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 81466729d8041..bacfe3767ab4c 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index c1f389aa84e1d..b6972bd5e2b6b 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 08b2428e23652..0549f5ba24520 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 023d445224be6..d3a0d567278fc 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 84131ad41530a..d08c4f2c4b94f 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 15105920bb9f9..0a4380ca56aa1 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 4159c2de931bb..af6f99c2484eb 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 87af396a4d74b..6cc65d41c4195 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 71d4f291ce34c..d1aba02e41355 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 7b89316c51de9..5901aaf1f0cd1 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index a166ef09d4e24..e7f510246535f 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 861b1e4b2b32a..eab3ba41e0180 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index a13ea777ee1cd..433273d1d1c58 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 6c6d2c03cead7..a88b019022f70 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 32e57cec586b6..701dfd478b3b9 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 5c117709c852a..859eaee6a1937 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 4265ccc01e1ff..30c2072734aa3 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index fb9821e190f92..b3adcc6683828 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 137044204cd16..47ddf93ddfa92 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index e58cc3875fdd7..3017e5cd19d48 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index b1b910805aa73..26268bfcb3e1a 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 07ef470ec778f..dce9956fe6907 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 1a88d60132c0e..18143920c7907 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 548ce80556e7e..134488dca2650 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 356222489dcf9..1ff09d1d4d78e 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index fe290c1e5c68a..8f18b912ae975 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index d85cf87629daf..bb3af7b9503e6 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 8945251f7a62c..6105ca324856d 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 3f589798c1486..b7402f15bb751 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index cbf8160fcb771..ff0a567c8074b 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 854bf64adc2f6..e915b7f34e75a 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index ccec1df55605c..a7c4f1d6e7120 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 293535e3b8f33..4fadd67ce1fc7 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 86235caafd768..67b836359a58b 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index ed71b5d9de46b..4bd349f3de587 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 63552c587a08f..3fe1b0eed5069 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 32096f38f1c13..a3afdeaad02e1 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 9186a7aecee62..c7ea9616e4f59 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 52fb2a0f07641..0568c0f3bcdc4 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index b02ba6219ff5a..fe32464a50260 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index f3b528551b39f..4f2520d3d0b98 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index e2963385d3d04..11f7868fc42ce 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index c637e78b72da8..b6d7cdafdf68f 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 8dce90566f06d..cb7bc21a167f0 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index bd97570d5b48b..88efedef7468d 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index d1c765e6049d5..51f1bb14d960a 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 2af7a9c63ba77..b56317003cc5c 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index cf3a5de1e5fd4..4d60e923a1924 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index c4ab644aa70a2..18a40c945e946 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index b7740d856f2bf..bb409e0ab60b3 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 350e5235fd21e..9e86b9fd56748 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 37bd0588bcc70..98323049223a7 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index bb8059db376ae..33a49a8eb1d40 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index b49185f7bca7e..59bd05e52b2ee 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 6ae416fe32bda..a6b844ecb2c7e 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 9d154b7ad5704..701acd2db161a 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 18d074a2d8b18..deb2dffe0c509 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 07321a36acac8..bc638ff758be0 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx index 8f795ed80b6ff..7f372a2861437 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 255c1244a92bb..0f799e1de81af 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.devdocs.json b/api_docs/kbn_elastic_assistant.devdocs.json index f97b2b7e4528e..d308ab08ff13a 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -956,6 +956,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.Message.reader", + "type": "Object", + "tags": [], + "label": "reader", + "description": [], + "signature": [ + "ReadableStreamDefaultReader | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.Message.content", @@ -963,6 +977,9 @@ "tags": [], "label": "content", "description": [], + "signature": [ + "string | undefined" + ], "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", "deprecated": false, "trackAdoption": false diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index 07b481886264a..aaf8d0984646c 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 95 | 0 | 75 | 6 | +| 96 | 0 | 76 | 6 | ## Client diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 3d5e9936b28e5..8c943d3b493fc 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index c3c819b4d3f64..5b7a1dbc559b2 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index e57df98f2148c..3639a0d26346f 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 5e8e05dedac42..c0df38148db3e 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index ebef090c1200e..d62985dfd7f6a 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 2399c0ffdd419..2dd9d91dc5458 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 567eb30a3c553..8ee78d7ed3078 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 0d42d81c7e6d1..ca66104a17d5c 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 4a33149772150..71f35c33fb24d 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index dbe71e82c8cb3..5942741073a49 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index bae97779b76ef..1432c8e6c190a 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 8577f8d6f6f5b..4f01caae82aa6 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 3369f19e15c70..0c039b55f8212 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 39ce52068d9df..85dd015f6d898 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 24bb6bb491517..0f77ad571695c 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 14e79d00bdfd1..3ca1a8041f8bb 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_generate_csv_types.mdx b/api_docs/kbn_generate_csv_types.mdx index 8caa926d37536..d91b1be1a69af 100644 --- a/api_docs/kbn_generate_csv_types.mdx +++ b/api_docs/kbn_generate_csv_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv-types title: "@kbn/generate-csv-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv-types'] --- import kbnGenerateCsvTypesObj from './kbn_generate_csv_types.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index c3363f8a87c02..6163541650729 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index e76c15573165c..7cd2e415cb5ce 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index cfbaabe253471..fee7b2349b33b 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 0fcc2fc3cfa21..76edaacf1fa44 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index f0e1f0ea9d718..f122259677fdb 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 6dabef4fe062c..887669dd7dc82 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index e5140cb3ecd5e..4215068b0e66f 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index d0dc5f0fdf1c7..1f9208f6a7188 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index e5b72598ad308..98eb9a65bb892 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index fe948ba1420d5..ac6c06c6c981f 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 92eddd1a168ea..f11396a09a7db 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 552487bdbfc85..f8a4d3ce649de 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 319e733e8896c..7a0d4830906ae 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 034fa03ce818b..86af1e84a1d25 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index ebd5cd88823a6..f7eafdb308342 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index f46f083df5347..35b177852a474 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index cc34b6d2c7e04..2deb7a2fa3ab0 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 0f6d06d38b82a..095ab28b577a9 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 51c4a1c18feb2..abd249b9861f6 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 7e1bd5cb04bfd..46c44d5194b9d 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index a985901e4469e..77d0231d9136b 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 50cbc4d041bda..9a5b2107084c2 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index f953773df036d..25a1f4c0eee36 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 96955519772b0..51cea3f0354cf 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index a6bb7eaa7dd1f..4b3e8b1d11ecd 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 44d6e19ea4eea..8073070c26cdc 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index fb9610693c13b..72de35943576d 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index ddbaa9a509bcb..c9d6d1273a059 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 4d34e6e06cdc9..093f00a741a76 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index b911b90938555..1da482465a39a 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index f83d1271b7be2..fb9d2e6df2c3e 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index fe4a66a94ee31..8d897d09d1bce 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 06e19845bbe6a..446e951b5c819 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.devdocs.json b/api_docs/kbn_mapbox_gl.devdocs.json index 29866944ea667..18b71846c478e 100644 --- a/api_docs/kbn_mapbox_gl.devdocs.json +++ b/api_docs/kbn_mapbox_gl.devdocs.json @@ -18,6 +18,155 @@ }, "common": { "classes": [ + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError", + "type": "Class", + "tags": [], + "label": "AJAXError", + "description": [], + "signature": [ + "maplibregl.AJAXError extends Error" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.status", + "type": "number", + "tags": [], + "label": "status", + "description": [ + "\nThe response's HTTP status code." + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.statusText", + "type": "string", + "tags": [], + "label": "statusText", + "description": [ + "\nThe response's HTTP status text." + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.url", + "type": "string", + "tags": [], + "label": "url", + "description": [ + "\nThe request's URL." + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.body", + "type": "Object", + "tags": [], + "label": "body", + "description": [ + "\nThe response's body." + ], + "signature": [ + "Blob" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.Unnamed.$1", + "type": "number", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "number" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.Unnamed.$2", + "type": "string", + "tags": [], + "label": "statusText", + "description": [], + "signature": [ + "string" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.Unnamed.$3", + "type": "string", + "tags": [], + "label": "url", + "description": [], + "signature": [ + "string" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/mapbox-gl", + "id": "def-common.AJAXError.Unnamed.$4", + "type": "Object", + "tags": [], + "label": "body", + "description": [], + "signature": [ + "Blob" + ], + "path": "node_modules/maplibre-gl/dist/maplibre-gl.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/mapbox-gl", "id": "def-common.GeoJSONSource", diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index a3dc6067d159a..6c0ab70d88f5e 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 582 | 1 | 1 | 0 | +| 592 | 1 | 1 | 0 | ## Common diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 6822eeaba58eb..81ceb5c22c163 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 8433d17aa9324..3390f2aa29ae8 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index dd4c3ded898b2..868dd6f63164d 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 3be29f042ab28..18d2649ac7898 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 46c385f3901dd..6fd835578117f 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index e8025edf583b5..a4d36a1a7dd17 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 08de26b56c63c..62f91772c4620 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 528f48522d134..744369231b0d4 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 712c78d15cec0..023c7f1a65524 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index c3553d60b7c58..f479e3f74bc3b 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 2d04782c6a1e9..14bc890beed39 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 2b7fd3a5ae0b3..f6a2a1a05afc0 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 4b1f73b21d199..5b7695907d09d 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 8bd2e53ed6d39..ed416849c10d1 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index eefffa4ad27c4..f9cff23934535 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 43175eb46c336..e745c7676de39 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index 46d61785cd582..4fe451eec3af0 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index b0a8ccb675aac..3b8fedf36224e 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 9b4d089a263cb..fba05a0aa55e0 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 8280fa14649fc..c42f3b4ef0369 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 06864edf0eeb2..6ba50731ad3c1 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index bb9d8b0434ab3..0251140055373 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index f77e3efcd509c..7ccabe6a642fb 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 8941758fa9e3d..7d3ad89c97e16 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 6e1af71792909..591cca7c47f1c 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 0f4cc0b1bdd50..0589f62bcb40e 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index b986c3238cf8c..a3062145c75e0 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index be1e0be15b3ae..4beb02219d6c9 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index e9eb1d74015a5..48da152f6d22a 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index af7523fb57040..6a5a0dac93cb0 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 0430c65855dfe..a4e6f0b6fabe0 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 369c600e15998..8e61584fa1f3e 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index f089c4ad44cb5..90348167e8150 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index b9273df4515ad..1de0809809e3c 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 9b4acb55119ed..46ccc94006147 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index b1477307940e8..48576fbc7a32f 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index 8d8fa6fae40c1..df3be15b566b9 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 3f170b249f7df..e64ea0608ca6f 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 40c6bc649547e..013b5c79a4187 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 85685543307e5..a6082fdcfa91f 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index e450e567950a9..bfa3dfe2acc2b 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 2a3a7f5a9761d..364a64350d3bf 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index aeba5a58f5d54..f61655e4cc153 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 429a2bc5322fb..fad1d2eb0ad65 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 5c0f40d44c809..6e2c60e772bfb 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 5e8efd2df09e7..01e29f3224da3 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index a89bd68c9523d..a66d9c7330bc6 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index c8ad5590f14ca..02a1d10a6ca30 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 514eb199bc684..b2de84a316a81 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 5574a45c3d936..c721543728b6e 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index efd92dc677b37..59dc0964a4e02 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 4cf7369b7053e..b7fe68e229c2d 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 0e34202521362..e2d4a20e28804 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 197900c046efc..8dc883f660aea 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 7273f8b03de58..2cdbca5cf9a87 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 330a77422c248..05597b410d69d 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 787b9139b4369..22971865dffdf 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index e72d3f39e24df..0c34855f8b729 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 6ff2dc35f5ce4..9e9bded1356e2 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index dc2796286112e..095f7e2482f56 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index c0e16021c6df6..7658198f9eb18 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 027b6e8ee6de1..16bbc27043155 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index fb0c760602506..356e58f57b2b8 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index de59f001b2fc2..d4d144344f10b 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 25a84212e1f41..ebdd2db31506f 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 379ec234cfc48..b8d583ea15bfa 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index d30e31944bc09..b5bfffd4723f8 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index ab51b6cb1912f..0af6bbe1a240e 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 8c9c2e30a4578..8229f99be8a33 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,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 description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 013f582332fd7..c3afbcfc88864 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,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 description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 58ebcc56a6d41..1a8cd30377829 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 89588158fec88..1b121a8af5b73 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index 7ce52f197727c..76b31ec1fc2ec 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 321b34fc65a3d..a2a636dfcfed0 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index deb61a8436c01..33ee4721a4e5f 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 3d335bb199b1e..99c05769469d8 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 94d8661abb44b..8bde93fe251bc 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 6a33dacd5ba28..ed278f21d54d0 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 7a5f22885a026..40449d44b77e0 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index f54d3f6770566..5700ce78a734e 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index a3c64eb64781e..de330ec1cc27a 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 34d5c3e089152..f95afa09fc191 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 786d674572f6a..be23f4cf70326 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index a2645df15ec01..7fac78a9bb564 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 7bb2bd8c476c3..ca9700a614db7 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 854e8229c0656..a35895b0064e8 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 08e3fd74a66b8..c6229651ac711 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 34685b91bc252..d123dce4c6f90 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index d3a0bcc81012b..f3eeeb44351c3 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 0b71e4d745009..182c3a25dfe55 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 002bc96a3ed2b..0d7234decfc7f 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index a43c9ca971e1b..b14c67e7bb373 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,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 description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index c2c1964cbd934..d3326928c3b76 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json b/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json index c3b285c9899c7..41742443ed3bf 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json +++ b/api_docs/kbn_shared_ux_chrome_navigation.devdocs.json @@ -871,7 +871,15 @@ "label": "cloudLinks", "description": [], "signature": [ - "{ userAndRoles?: { title: string; href: string; } | undefined; performance?: { title: string; href: string; } | undefined; billingAndSub?: { title: string; href: string; } | undefined; deployment?: { title: string; href: string; } | undefined; }" + "{ userAndRoles?: ", + "CloudLink", + " | undefined; performance?: ", + "CloudLink", + " | undefined; billingAndSub?: ", + "CloudLink", + " | undefined; deployment?: ", + "CloudLink", + " | undefined; }" ], "path": "packages/shared-ux/chrome/navigation/types/index.ts", "deprecated": false, diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 639d45db1f760..1a9304dc02e81 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 60 | 0 | 49 | 4 | +| 60 | 0 | 49 | 5 | ## Common diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 79f546e0bad79..2c0b00734e8ed 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 7d3c81214c6e7..b5df255dc6b0d 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index faea7bda8c7bb..377c45c300fbb 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 0c56302682f8e..92e686be4e3d4 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 60502e2e3320e..d1b6eeb07f5ea 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 4ed0fe82a5ce4..a26a1c60e853f 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index 671d551222f3d..5d65e7ad38c18 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 4a68fd18af4b3..2a72af7fd8b6d 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index ea116b7fc0a07..d7522d4d80438 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 8643212421d54..4e1a3e6075aa4 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 823e1e052c13e..ab46b7f9c0e41 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index e2c2f5594ff71..486fafde66755 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index b218c7e2b1f74..eaf99d1e22552 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; 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 9d3ee79325d6b..d796247eded57 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,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 description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index dc76c4c65277f..a996f8a427ad3 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; 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 f2ca862566e66..a6eaf67ff7989 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,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 description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 438b36a620978..f4875283dd1ad 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index bda7cf25409f4..7998a5f67ce51 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 391d703fa617d..008e4a42ed3b6 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 05be9e7566157..5daa87a2702f3 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 50203e44441ed..9c5d9c657a3f0 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index e02e81f626a24..04446b52002b2 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index adfb36195e618..cf3e33531aace 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 434ed29e77d67..51f5f3a07c49d 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ 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 description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; 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 b0fc7d3328fe6..1482c714a4c2b 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,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 description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 9a413b32e32ec..e5de125c294aa 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index dc7f4b22dc07e..5fd7eda65f903 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 8d5bfc8093a02..3daeaebda9713 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 0f8f12478e028..1598ae3876775 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 4af1195163526..d7ead4950fb8a 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index e27449178f964..eaf36f4f961ac 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index ee573ce09e375..4d64731d7aa84 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index c34a25c621643..ac1a5b68ebbf4 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index b45f8cdf5c30d..8cd27c028c974 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 51f4e0bf57d2c..11f0cef2b3d4b 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index febdde0070fba..6dd67f31b194e 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index ee64f24bc5cd2..eacecaf19be82 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_subscription_tracking.mdx b/api_docs/kbn_subscription_tracking.mdx index 6cc8950b04871..40630d5fe3a36 100644 --- a/api_docs/kbn_subscription_tracking.mdx +++ b/api_docs/kbn_subscription_tracking.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-subscription-tracking title: "@kbn/subscription-tracking" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/subscription-tracking plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/subscription-tracking'] --- import kbnSubscriptionTrackingObj from './kbn_subscription_tracking.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 49861f073dbba..256b391a1d218 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 11f6183166010..65c19d00f5606 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 20b762efcba30..d7ac3de8c5edc 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 83817b65ee359..16d945be03279 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 1da6c8a3563ff..855250440a526 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index cd656fb6756c7..46f5ca54a06dc 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 151329ba7e20d..c458fbcca3621 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index ab687f5fd0a4e..5af49a8a89d65 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 5deea69179471..3595d9a5bf56a 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index bb90daa21c4e1..9a1f7b71479d2 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index de0f9569fb7a5..22ab2668a15aa 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index f2d9fd08a85ee..93b16354a5a63 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 4beef62fe278c..c1a77c0fe7583 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 8e26f5eda8f03..cb332ab65b48c 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_url_state.mdx b/api_docs/kbn_url_state.mdx index d2172d54bf69b..1a5f5e8e55f8f 100644 --- a/api_docs/kbn_url_state.mdx +++ b/api_docs/kbn_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-url-state title: "@kbn/url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/url-state plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/url-state'] --- import kbnUrlStateObj from './kbn_url_state.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 33bd72647b2ae..6101e37fbe13d 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 5a0147a98a0bc..9f11b02cf4498 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 0b14f644b739d..c4734fefd337f 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 3f755d6f5ebff..e6f81e2132798 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index a191365f339af..ee7c0d8e6a9b9 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index dd0275bafe4cb..4847f2d418035 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index ed616752a137e..dc30fb8f702a2 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 107d4aa3c92c7..ab36fa7eaeb4a 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 49ece4f6d0b63..8de510a043a6c 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 21d7a921834d2..a38c271a1362b 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 16095fc6441eb..eb013397ce6ad 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index e9b056b9445b7..b1050eb29ebb0 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index b4b7617296c84..f32ca38f7e803 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 145ea960d21b8..73e8c9ca0b144 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 7686b32194240..52e82f34dd57e 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index a362a86823ac5..f38b0f2cd7c44 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 93fd4daead6e9..40987eef022ec 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index fe1d497af8923..030db9e1bef80 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index 84622c0f7a0e4..2c4d6431a3ee5 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/log_explorer.mdx b/api_docs/log_explorer.mdx index c74889ed2c6e1..a611058166269 100644 --- a/api_docs/log_explorer.mdx +++ b/api_docs/log_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logExplorer title: "logExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logExplorer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logExplorer'] --- import logExplorerObj from './log_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.devdocs.json b/api_docs/logs_shared.devdocs.json index e911fdaa0f16b..38c6515cf1aa6 100644 --- a/api_docs/logs_shared.devdocs.json +++ b/api_docs/logs_shared.devdocs.json @@ -262,6 +262,38 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistant", + "type": "Function", + "tags": [], + "label": "LogAIAssistant", + "description": [], + "signature": [ + "(props: any) => JSX.Element" + ], + "path": "x-pack/plugins/logs_shared/public/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistant.$1", + "type": "Any", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/logs_shared/common/dynamic.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "logsShared", "id": "def-public.LogColumnHeader", @@ -2546,6 +2578,55 @@ } ], "interfaces": [ + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistantProps", + "type": "Interface", + "tags": [], + "label": "LogAIAssistantProps", + "description": [], + "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistantProps.aiAssistant", + "type": "Object", + "tags": [], + "label": "aiAssistant", + "description": [], + "signature": [ + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantPluginStart", + "text": "ObservabilityAIAssistantPluginStart" + } + ], + "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistantProps.doc", + "type": "Object", + "tags": [], + "label": "doc", + "description": [], + "signature": [ + "LogAIAssistantDocument", + " | undefined" + ], + "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "logsShared", "id": "def-public.LogEntryColumnWidths", @@ -2741,6 +2822,26 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogsSharedClientStartDeps.observabilityAIAssistant", + "type": "Object", + "tags": [], + "label": "observabilityAIAssistant", + "description": [], + "signature": [ + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantPluginStart", + "text": "ObservabilityAIAssistantPluginStart" + } + ], + "path": "x-pack/plugins/logs_shared/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "logsShared", "id": "def-public.LogsSharedClientStartDeps.uiActions", diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index faa737d3021d1..db509274dddc4 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/inf | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 279 | 10 | 264 | 27 | +| 285 | 11 | 270 | 28 | ## Client diff --git a/api_docs/management.mdx b/api_docs/management.mdx index aa91fdfa8993c..becb863e7f7f0 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index 2912fb874ff47..b95d0314243be 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -157,6 +157,22 @@ "trackAdoption": false, "children": [], "returnComment": [] + }, + { + "parentPluginId": "maps", + "id": "def-public.DataRequest.getError", + "type": "Function", + "tags": [], + "label": "getError", + "description": [], + "signature": [ + "() => string | undefined" + ], + "path": "x-pack/plugins/maps/public/classes/util/data_request.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false @@ -4604,7 +4620,7 @@ "signature": [ "{ __dataRequests?: ", "DataRequestDescriptor", - "[] | undefined; __isInErrorState?: boolean | undefined; __isPreviewLayer?: boolean | undefined; __errorMessage?: string | undefined; __trackedLayerDescriptor?: ", + "[] | undefined; __isPreviewLayer?: boolean | undefined; __trackedLayerDescriptor?: ", { "pluginId": "maps", "scope": "common", @@ -4612,8 +4628,10 @@ "section": "def-common.LayerDescriptor", "text": "LayerDescriptor" }, - " | undefined; __areTilesLoaded?: boolean | undefined; __metaFromTiles?: ", + " | undefined; __areTilesLoaded?: boolean | undefined; __tileMetaFeatures?: ", "TileMetaFeature", + "[] | undefined; __tileErrors?: ", + "TileError", "[] | undefined; alpha?: number | undefined; attribution?: ", "Attribution", " | undefined; id: string; label?: string | null | undefined; locale?: string | null | undefined; areLabelsOnTop?: boolean | undefined; minZoom?: number | undefined; maxZoom?: number | undefined; sourceDescriptor: ", diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index a5feddb467c07..dc5cc8b17031d 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 259 | 0 | 258 | 28 | +| 260 | 0 | 259 | 29 | ## Client diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 5049b83665709..226f35ef00c13 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 5043c3dde5fb2..ed30c0408d076 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 308adfc7bc0c4..4d24b29d60728 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 498fd70c0c9f7..d285e875528d6 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index db66874d050bd..35896402f756c 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 6c72b98044cf3..cfddc6104ff07 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index d410e23321cbd..a8b52be88372a 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index e6af864399727..6886646e95d92 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index b19753524ebd2..3768e2039b10b 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index d3b50e14771eb..583578dcba391 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index e7f247ab540b5..52c4508d1c26b 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_log_explorer.mdx b/api_docs/observability_log_explorer.mdx index 7b6ec386bc702..f736c55c923b1 100644 --- a/api_docs/observability_log_explorer.mdx +++ b/api_docs/observability_log_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogExplorer title: "observabilityLogExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogExplorer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogExplorer'] --- import observabilityLogExplorerObj from './observability_log_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 84a965b18536d..082e2d93d41c2 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index a21c8f36c672e..d60a6bee07678 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 459e897346a0f..db5498030bfa7 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index ca05cb6665459..2f7be82d8cf73 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 158868e57b6a0..daee76beae7a4 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 76048 | 232 | 65029 | 1592 | +| 76070 | 233 | 65040 | 1596 | ## Plugin Directory @@ -95,7 +95,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | 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. | 59 | 0 | 59 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 239 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 0 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1209 | 3 | 1091 | 45 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1212 | 3 | 1094 | 46 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | @@ -106,8 +106,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 149 | 0 | 109 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 3 | 0 | 3 | 1 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 204 | 0 | 199 | 4 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 35 | 0 | 32 | 9 | +| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 206 | 0 | 201 | 4 | +| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 32 | 0 | 29 | 8 | | ingestPipelines | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | | inputControlVis | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Input Control visualization to Kibana | 0 | 0 | 0 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 123 | 2 | 96 | 4 | @@ -124,10 +124,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | A dashboard panel for creating links to dashboards or external links. | 64 | 0 | 62 | 7 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 224 | 0 | 96 | 51 | | | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 22 | 0 | 22 | 7 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Exposes the shared components and APIs to access and visualize logs. | 279 | 10 | 264 | 27 | +| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Exposes the shared components and APIs to access and visualize logs. | 285 | 11 | 270 | 28 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 45 | 0 | 45 | 7 | -| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 259 | 0 | 258 | 28 | +| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 260 | 0 | 259 | 29 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 68 | 0 | 68 | 0 | | | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 4 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 150 | 3 | 64 | 33 | @@ -162,7 +162,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 5 | | searchprofiler | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-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. | 270 | 0 | 87 | 3 | -| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 173 | 0 | 106 | 35 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 174 | 0 | 106 | 35 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 7 | 0 | 7 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 19 | 0 | 18 | 0 | @@ -233,7 +233,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 31 | 0 | 31 | 7 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 180 | 0 | 180 | 26 | +| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 181 | 0 | 181 | 27 | | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 12 | 0 | 12 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 19 | 0 | 16 | 0 | @@ -440,7 +440,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 19 | 0 | 11 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 35125 | 0 | 34718 | 0 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 13 | 0 | 5 | 0 | -| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 95 | 0 | 75 | 6 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 96 | 0 | 76 | 6 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 48 | 0 | 33 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 27 | 0 | 14 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | @@ -491,7 +491,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 81 | 0 | 3 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 54 | 0 | 6 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 2 | 0 | 0 | 0 | -| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 582 | 1 | 1 | 0 | +| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 592 | 1 | 1 | 0 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 2 | 0 | 2 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 99 | 2 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 206 | 3 | 1 | 0 | @@ -585,7 +585,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 28 | 0 | 10 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 28 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 60 | 0 | 49 | 4 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 60 | 0 | 49 | 5 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 2 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 5 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 2 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 365649ee54027..cad15788af386 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 847452aa298cf..65c39106f3c7d 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 5a7a9b8a59d07..c933df9b7a3b1 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index def6616f8fb6b..8b1b854c25b95 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 11d94c6d3061e..b06e42765a180 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index e79035731bdae..aa8e5f403cdb8 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index de5b755011935..6cd95161b2d1e 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 629c95c5d04ed..cc5d1473023dd 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 15030d4ab31ab..c4ff0314c0942 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 4cab98e4ac01d..cf43f50e2e5de 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 237d03dd84196..711e48ed70b84 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index ccaa377045d5b..a32b3df0e2e16 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index f5a7035a179b9..319a378a5e20f 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 21ea73fc46c9a..7391c7a13327e 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 50f37ecc7352a..bd2d600f360d0 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index f1a634482ed94..9894eacfe9b02 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 422b8e3332759..cc464e41d7d4a 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 59b53883cd01c..ce6fc3937f3ec 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -101,7 +101,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; }" ], "path": "x-pack/plugins/security_solution/public/plugin.tsx", "deprecated": false, @@ -329,7 +329,7 @@ "label": "stop", "description": [], "signature": [ - "() => {}" + "() => void" ], "path": "x-pack/plugins/security_solution/public/plugin.tsx", "deprecated": false, @@ -494,7 +494,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"alertsPreviewChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"alertsPageFiltersEnabled\" | \"assistantModelEvaluation\" | \"newUserDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | undefined" + "\"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"alertsPreviewChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"alertsPageFiltersEnabled\" | \"assistantModelEvaluation\" | \"newUserDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -574,7 +574,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"alertsPreviewChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"alertsPageFiltersEnabled\" | \"assistantModelEvaluation\" | \"newUserDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | undefined" + "\"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"alertsPreviewChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"alertsPageFiltersEnabled\" | \"assistantModelEvaluation\" | \"newUserDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1746,6 +1746,22 @@ "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "securitySolution", + "id": "def-public.TimelineModel.changed", + "type": "CompoundType", + "tags": [], + "label": "changed", + "description": [ + "used to mark the timeline as unsaved in the UI" + ], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1791,7 +1807,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -2864,7 +2880,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3010,7 +3026,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3059,7 +3075,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly alertsPreviewChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index e092e4b26dd56..b4f32f39b3aca 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 173 | 0 | 106 | 35 | +| 174 | 0 | 106 | 35 | ## Client diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 3917e7063d0ea..9ab8031f4b959 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index f15f876a1da01..fc8302b016670 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 7ad6e4a78fb9f..e731388bcece3 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 427fd3e57996f..c266672321e10 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 1181dba00bc2c..3392af32c8ef0 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 7a7cb1b3d4dff..0f3bc5a320aff 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index bfa99db78a88f..9b005f0621e36 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 0683048601442..d7b8c4809b756 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 72bd4f5b15213..614d651ed4f7b 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index e107b06f285b0..c735c9c9c4647 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 7795802b49c69..69a87f0fd3b7a 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 10b7df753471f..ec02a9a86be92 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 6360fa40bda4c..bd1953bb1d203 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 90af0932fdd92..5d0131727876a 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index e6c9e24d27ddd..bbd273aa304ca 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index cdb89a5e33e41..541d51e4e4889 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index 7f7ffe2d8c8e0..2017b997085be 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 7af15a78e537c..69d95f9175a00 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 5c87d73da129f..1191d658adf4c 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 48c5e01ee8152..8627127fa1b1f 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index aa54d5fac7346..0de8be7789564 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 9bc5d69c12d8f..ea54386cd97bd 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index decb968f91f9d..c44c1c4aadfed 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index 654ec8def10f6..8761f7cb54937 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 8b8204e516827..46ab457726c0a 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index cdcba13ec38a3..302257f89efbf 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index a05608dd2a485..20d559e9f80d1 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 60925d4fd2a1b..fbb328b3be339 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index f320931291ebb..c8d2192b75ff7 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 489a290076069..415698c06c32e 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index bb1b196f6e2ea..b4d56592ee6f5 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 9fe29bcdb0140..91f8599224c79 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 77843db79eeb2..2369294e8f9cb 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 51f561903e745..b89d17f073342 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index ccb72d01e5b4a..5e8e770b74460 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index c7cc13451a04f..ab11707fec3d6 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 73b60f34e2054..2a47fcea37acd 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index ba42874007a62..3881e77aa37e0 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index fd42efdf6ae12..1fc50e7629f9e 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 703704eea7fcb..f50198bc12991 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index fc9716bcefacb..38029a048569c 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 8a355f0874860..a81f10ae8474b 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2023-11-06 +date: 2023-11-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From b2e3284d0f64fa73d807eaf33c951fa21416674a Mon Sep 17 00:00:00 2001 From: Cristina Amico Date: Wed, 8 Nov 2023 09:29:23 +0100 Subject: [PATCH 19/46] [Fleet] Modify bulk unenroll to include inactive agents (#170249) Fixes https://github.com/elastic/kibana/issues/169977 ## Summary [Fleet] Modify bulk unenroll to include inactive agents when passing `"includeInactive": true`. - This flag only works when the agents are selected by query. - Updated the hook in the UI to include the new flag. ### Testing #### API - Enroll some agents and make them inactive - From dev tools, run the bulk_unenroll api with option `includeInactive`: ``` POST kbn:/api/fleet/agents/bulk_unenroll { "agents": "last_checkin<=2023-11-06", "revoke": true, "includeInactive": true } ``` This should remove all the agents selected in the kuery, also the inactive ones. #### UI - Enroll some agents and make them inactive - Select all agents on all pages, from the bulk actions click on "unenroll agents" - It should remove all the agents, inactive ones too. ### Checklist - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../plugins/fleet/common/openapi/bundled.json | 20 +++-- .../plugins/fleet/common/openapi/bundled.yaml | 17 +++-- .../openapi/paths/agents@bulk_unenroll.yaml | 15 ++-- .../fleet/common/types/rest_spec/agent.ts | 1 + .../components/agent_unenroll_modal/index.tsx | 2 + .../server/routes/agent/unenroll_handler.ts | 1 + .../fleet/server/services/agents/unenroll.ts | 1 + .../fleet/server/types/rest_spec/agent.ts | 1 + .../apis/agents/unenroll.ts | 75 ++++++++++++++++++- 9 files changed, 112 insertions(+), 21 deletions(-) diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 5953bd1fdc287..e0b754430521d 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -2790,14 +2790,6 @@ "schema": { "type": "object", "properties": { - "revoke": { - "type": "boolean", - "description": "Revokes API keys of agents" - }, - "force": { - "type": "boolean", - "description": "Unenroll hosted agents too" - }, "agents": { "oneOf": [ { @@ -2812,6 +2804,18 @@ "description": "list of agent IDs" } ] + }, + "revoke": { + "type": "boolean", + "description": "Revokes API keys of agents" + }, + "force": { + "type": "boolean", + "description": "Unenrolls hosted agents too" + }, + "includeInactive": { + "type": "boolean", + "description": "When passing agents by KQL query, unenrolls inactive agents too" } }, "required": [ diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index c348cec266c12..d977af4f9c2b5 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -1750,12 +1750,6 @@ paths: schema: type: object properties: - revoke: - type: boolean - description: Revokes API keys of agents - force: - type: boolean - description: Unenroll hosted agents too agents: oneOf: - type: string @@ -1764,6 +1758,17 @@ paths: items: type: string description: list of agent IDs + revoke: + type: boolean + description: Revokes API keys of agents + force: + type: boolean + description: Unenrolls hosted agents too + includeInactive: + type: boolean + description: >- + When passing agents by KQL query, unenrolls inactive agents + too required: - agents example: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml index 1ab9e4038b978..a765e4868442b 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml @@ -23,12 +23,6 @@ post: schema: type: object properties: - revoke: - type: boolean - description: Revokes API keys of agents - force: - type: boolean - description: Unenroll hosted agents too agents: oneOf: - type: string @@ -37,6 +31,15 @@ post: items: type: string description: list of agent IDs + revoke: + type: boolean + description: Revokes API keys of agents + force: + type: boolean + description: Unenrolls hosted agents too + includeInactive: + type: boolean + description: When passing agents by KQL query, unenrolls inactive agents too required: - agents example: diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts index 1e0e82d6c2ecd..edb3f7f0eefcb 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent.ts @@ -85,6 +85,7 @@ export interface PostBulkAgentUnenrollRequest { agents: string[] | string; force?: boolean; revoke?: boolean; + includeInactive?: boolean; }; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx index 6fac687107fd1..6d32a8afeb769 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx @@ -47,6 +47,8 @@ export const AgentUnenrollAgentModal: React.FunctionComponent = ({ : await sendPostBulkAgentUnenroll({ agents: Array.isArray(agents) ? agents.map((agent) => agent.id) : agents, revoke: forceUnenroll, + // includeInactive is only used when the agents are selected by query, it's ignored in the case of agent ids + includeInactive: true, }); if (error) { throw error; diff --git a/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts b/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts index 740cf3a7b716c..ec72f23a9876d 100644 --- a/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts +++ b/x-pack/plugins/fleet/server/routes/agent/unenroll_handler.ts @@ -55,6 +55,7 @@ export const postBulkAgentsUnenrollHandler: RequestHandler< revoke: request.body?.revoke, force: request.body?.force, batchSize: request.body?.batchSize, + showInactive: request.body?.includeInactive, }); return response.ok({ body: { actionId: results.actionId } }); diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.ts index f13a8f91d81e9..e2c2a17c4d2ad 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.ts @@ -73,6 +73,7 @@ export async function unenrollAgents( force?: boolean; revoke?: boolean; batchSize?: number; + showInactive?: boolean; } ): Promise<{ actionId: string }> { if ('agentIds' in options) { diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts index e90fda99cdff9..902380fc28ca1 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts @@ -95,6 +95,7 @@ export const PostBulkAgentUnenrollRequestSchema = { force: schema.maybe(schema.boolean()), revoke: schema.maybe(schema.boolean()), batchSize: schema.maybe(schema.number()), + includeInactive: schema.maybe(schema.boolean()), }), }; diff --git a/x-pack/test/fleet_api_integration/apis/agents/unenroll.ts b/x-pack/test/fleet_api_integration/apis/agents/unenroll.ts index e3153ad422ffc..120bd026ec3f1 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/unenroll.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/unenroll.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; +import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { setupFleetAndAgents } from './services'; import { skipIfNoDockerRegistry } from '../../helpers'; @@ -149,7 +150,7 @@ export default function (providerContext: FtrProviderContext) { expect(actionStatus.nbAgentsFailed).to.eql(2); }); - it('/agents/bulk_unenroll should allow to unenroll multiple agents by id from an regular agent policy', async () => { + it('/agents/bulk_unenroll should allow to unenroll multiple agents by id from a regular agent policy', async () => { // set policy to regular await supertest .put(`/api/fleet/agent_policies/policy1`) @@ -188,6 +189,78 @@ export default function (providerContext: FtrProviderContext) { expect(body.total).to.eql(0); }); + it('/agents/bulk_unenroll should allow to unenroll active and inactive agents by kuery with includeInactive', async () => { + // Agent inactive + await esClient.update({ + id: 'agent4', + refresh: 'wait_for', + index: AGENTS_INDEX, + body: { + doc: { + policy_id: 'policy1', + policy_revision_idx: 1, + last_checkin: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }, + }); + // unenroll all agents that had last checkin before "now" + await supertest + .post(`/api/fleet/agents/bulk_unenroll`) + .set('kbn-xsrf', 'xxx') + .send({ + agents: `last_checkin<="${new Date(Date.now()).toISOString()}"`, + revoke: true, + includeInactive: true, + }) + .expect(200); + + const { body } = await supertest.get(`/api/fleet/agents`); + expect(body.total).to.eql(0); + }); + it('/agents/bulk_unenroll should allow to unenroll inactive agents that never had last checkin by kuery with includeInactive', async () => { + // Agent inactive + await esClient.update({ + id: 'agent4', + refresh: 'wait_for', + index: AGENTS_INDEX, + body: { + doc: { + policy_id: 'policy1', + policy_revision_idx: 1, + last_checkin: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }, + }); + // agent inactive through enrolled_at as no last_checkin + await esClient.create({ + id: 'agent5', + refresh: 'wait_for', + index: AGENTS_INDEX, + document: { + active: true, + access_api_key_id: 'api-key-4', + policy_id: 'policy1', + type: 'PERMANENT', + local_metadata: { host: { hostname: 'host6' } }, + user_provided_metadata: {}, + enrolled_at: new Date(Date.now() - 1000 * 60).toISOString(), // policy timeout 1 min + }, + }); + // unenroll all agents + await supertest + .post(`/api/fleet/agents/bulk_unenroll`) + .set('kbn-xsrf', 'xxx') + .send({ + agents: 'active: true', + revoke: true, + includeInactive: true, + }) + .expect(200); + + const { body } = await supertest.get(`/api/fleet/agents`); + expect(body.total).to.eql(0); + }); + it('/agents/bulk_unenroll should allow to unenroll multiple agents by kuery in batches async', async () => { const { body } = await supertest .post(`/api/fleet/agents/bulk_unenroll`) From c1681c8d49304f324895acbe73323ffacad3fcbc Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Wed, 8 Nov 2023 09:37:10 +0000 Subject: [PATCH 20/46] [ML] Disable anomaly detection job creation from ES|QL lens visualizations (#170711) Fixes https://github.com/elastic/kibana/issues/170670 We currently do not support ES|QL in anomaly detection jobs. An ES|QL Lens vis cannot have mixed layers, as in one layer using ES|QL and another using DSL, therefore we need to completely disable the ML action item in the menu. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../ml/public/application/jobs/new_job/job_from_lens/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts index e060017bc7fa0..88e66aab91933 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts @@ -186,6 +186,8 @@ export async function getVisTypeFactory(lens: LensPublicStart) { export async function isCompatibleVisualizationType(chartInfo: ChartInfo) { return ( chartInfo.visualizationType === COMPATIBLE_VISUALIZATION && + // @ts-expect-error esql is missing in the type + chartInfo.query.esql === undefined && chartInfo.layers.some((l) => l.layerType === layerTypes.DATA && l.dataView !== undefined) ); } From 0063691ad58311cd5cd111a7404d21be4a361c6b Mon Sep 17 00:00:00 2001 From: Juan Pablo Djeredjian Date: Wed, 8 Nov 2023 11:40:48 +0100 Subject: [PATCH 21/46] [Security Solution] Detection Engine: Enable remaining Cypress tests and skip flaky Cypress tests (#170540) ## Summary - skips flaky `can bulk open alerts` test on `x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts` - enables **serverless** for: `x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts` - removes outdated comments ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../detection_alerts/alert_status.cy.ts | 2 +- .../entity_analytics_management_page.cy.ts | 1 - .../add_edit_endpoint_exception.cy.ts | 279 +++++++++--------- 3 files changed, 138 insertions(+), 144 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts index c55c8f62dc4a9..7f148e531fe12 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts @@ -38,7 +38,7 @@ import { visit } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; // FLAKY: https://github.com/elastic/kibana/issues/169091 -describe('Changing alert status', () => { +describe.skip('Changing alert status', { tags: ['@ess', '@serverless'] }, () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index a676fe5038d3e..24d13322f7d9d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -38,7 +38,6 @@ import { previewErrorButtonClick, } from '../../tasks/entity_analytics'; -// TODO: https://github.com/elastic/kibana/issues/161539 describe( 'Entity analytics management page', { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index 7474fd2e5cf2d..b687821145f1a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -50,179 +50,174 @@ import { createEndpointExceptionListItem, } from '../../../tasks/api_calls/exceptions'; -// TODO: https://github.com/elastic/kibana/issues/161539 -describe( - 'Add endpoint exception from rule details', - { tags: ['@ess', '@serverless', '@brokenInServerless'] }, - () => { - const ITEM_NAME = 'Sample Exception List Item'; - const NEW_ITEM_NAME = 'Exception item-EDITED'; - const ITEM_FIELD = 'event.code'; - const FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD = 'agent.type'; - +describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverless'] }, () => { + const ITEM_NAME = 'Sample Exception List Item'; + const NEW_ITEM_NAME = 'Exception item-EDITED'; + const ITEM_FIELD = 'event.code'; + const FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD = 'agent.type'; + + beforeEach(() => { + deleteExceptionLists(); + deleteEndpointExceptionList(); + login(); + deleteAlertsAndRules(); + }); + + describe('without exception items', () => { beforeEach(() => { - deleteExceptionLists(); - deleteEndpointExceptionList(); - login(); - deleteAlertsAndRules(); - }); - - describe('without exception items', () => { - beforeEach(() => { - createEndpointExceptionList().then((response) => { - createRule( - getNewRule({ - query: 'event.code:*', - index: ['auditbeat*'], - exceptions_list: [ - { - id: response.body.id, - list_id: response.body.list_id, - type: response.body.type, - namespace_type: response.body.namespace_type, - }, - ], - rule_id: '2', - enabled: false, - }) - ).then((rule) => visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' })); - }); + createEndpointExceptionList().then((response) => { + createRule( + getNewRule({ + query: 'event.code:*', + index: ['auditbeat*'], + exceptions_list: [ + { + id: response.body.id, + list_id: response.body.list_id, + type: response.body.type, + namespace_type: response.body.namespace_type, + }, + ], + rule_id: '2', + enabled: false, + }) + ).then((rule) => visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' })); }); + }); - it('creates an exception item', () => { - // when no exceptions exist, empty component shows with action to add exception - cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); + it('creates an exception item', () => { + // when no exceptions exist, empty component shows with action to add exception + cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); - // open add exception modal - openExceptionFlyoutFromEmptyViewerPrompt(); + // open add exception modal + openExceptionFlyoutFromEmptyViewerPrompt(); - // submit button is disabled if no paramerters were added - cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); + // submit button is disabled if no paramerters were added + cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // for endpoint exceptions, must specify OS - selectOs('windows'); + // for endpoint exceptions, must specify OS + selectOs('windows'); - // add exception item conditions - addExceptionConditions({ - field: 'event.code', - operator: 'is', - values: ['foo'], - }); + // add exception item conditions + addExceptionConditions({ + field: 'event.code', + operator: 'is', + values: ['foo'], + }); - // Name is required so want to check that submit is still disabled - cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); + // Name is required so want to check that submit is still disabled + cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // add exception item name - addExceptionFlyoutItemName(ITEM_NAME); + // add exception item name + addExceptionFlyoutItemName(ITEM_NAME); - // Option to add to rule or add to list should NOT appear - cy.get(ADD_TO_RULE_OR_LIST_SECTION).should('not.exist'); + // Option to add to rule or add to list should NOT appear + cy.get(ADD_TO_RULE_OR_LIST_SECTION).should('not.exist'); - // not testing close alert functionality here, just ensuring that the options appear as expected - cy.get(CLOSE_SINGLE_ALERT_CHECKBOX).should('not.exist'); - cy.get(CLOSE_ALERTS_CHECKBOX).should('exist'); + // not testing close alert functionality here, just ensuring that the options appear as expected + cy.get(CLOSE_SINGLE_ALERT_CHECKBOX).should('not.exist'); + cy.get(CLOSE_ALERTS_CHECKBOX).should('exist'); - // submit - submitNewExceptionItem(); + // submit + submitNewExceptionItem(); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - }); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); }); + }); + + describe('with exception items', () => { + beforeEach(() => { + createEndpointExceptionList().then((response) => { + createEndpointExceptionListItem({ + comments: [], + description: 'Exception list item', + entries: [ + { + field: ITEM_FIELD, + operator: 'included', + type: 'match', + value: 'foo', + }, + ], + name: ITEM_NAME, + tags: [], + type: 'simple', + os_types: ['windows'], + }); - describe('with exception items', () => { - beforeEach(() => { - createEndpointExceptionList().then((response) => { - createEndpointExceptionListItem({ - comments: [], - description: 'Exception list item', - entries: [ + createRule( + getNewRule({ + name: 'Rule with exceptions', + query: 'event.code:*', + index: ['auditbeat*'], + exceptions_list: [ { - field: ITEM_FIELD, - operator: 'included', - type: 'match', - value: 'foo', + id: response.body.id, + list_id: response.body.list_id, + type: response.body.type, + namespace_type: response.body.namespace_type, }, ], - name: ITEM_NAME, - tags: [], - type: 'simple', - os_types: ['windows'], - }); - - createRule( - getNewRule({ - name: 'Rule with exceptions', - query: 'event.code:*', - index: ['auditbeat*'], - exceptions_list: [ - { - id: response.body.id, - list_id: response.body.list_id, - type: response.body.type, - namespace_type: response.body.namespace_type, - }, - ], - rule_id: '2', - enabled: false, - }) - ).then((rule) => { - visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' }); - waitForRuleDetailsPageToBeLoaded('Rule with exceptions'); - }); + rule_id: '2', + enabled: false, + }) + ).then((rule) => { + visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' }); + waitForRuleDetailsPageToBeLoaded('Rule with exceptions'); }); }); + }); - it('edits an endpoint exception item', () => { - // displays existing exception items - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('not.exist'); - cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', ITEM_NAME); - cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ` ${ITEM_FIELD}IS foo`); + it('edits an endpoint exception item', () => { + // displays existing exception items + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('not.exist'); + cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', ITEM_NAME); + cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ` ${ITEM_FIELD}IS foo`); - // open edit exception modal - openEditException(); + // open edit exception modal + openEditException(); - // edit exception item name - editExceptionFlyoutItemName(NEW_ITEM_NAME); + // edit exception item name + editExceptionFlyoutItemName(NEW_ITEM_NAME); - // check that the existing item's field is being populated - cy.get(EXCEPTION_ITEM_CONTAINER) - .eq(0) - .find(FIELD_INPUT_PARENT) - .eq(0) - .should('have.text', ITEM_FIELD); - cy.get(VALUES_INPUT).should('have.text', 'foo'); + // check that the existing item's field is being populated + cy.get(EXCEPTION_ITEM_CONTAINER) + .eq(0) + .find(FIELD_INPUT_PARENT) + .eq(0) + .should('have.text', ITEM_FIELD); + cy.get(VALUES_INPUT).should('have.text', 'foo'); - // edit conditions - editException(FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD, 0, 0); + // edit conditions + editException(FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD, 0, 0); - // submit - submitEditedExceptionItem(); + // submit + submitEditedExceptionItem(); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // check that updates stuck - cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', NEW_ITEM_NAME); - cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ' agent.typeIS foo'); - }); + // check that updates stuck + cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', NEW_ITEM_NAME); + cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ' agent.typeIS foo'); + }); - it('allows user to search for items', () => { - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + it('allows user to search for items', () => { + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // can search for an exception value - searchForExceptionItem('foo'); + // can search for an exception value + searchForExceptionItem('foo'); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // displays empty search result view if no matches found - searchForExceptionItem('abc'); + // displays empty search result view if no matches found + searchForExceptionItem('abc'); - // new exception item displays - cy.get(NO_EXCEPTIONS_SEARCH_RESULTS_PROMPT).should('exist'); - }); + // new exception item displays + cy.get(NO_EXCEPTIONS_SEARCH_RESULTS_PROMPT).should('exist'); }); - } -); + }); +}); From e00566fa98e6211067c5aabd436f18a606da0249 Mon Sep 17 00:00:00 2001 From: Dmitrii Shevchenko Date: Wed, 8 Nov 2023 11:58:28 +0100 Subject: [PATCH 22/46] [Security Solution] Migrate remaining public Detection Engine APIs to OpenAPI and code generation (#170330) **Related to: https://github.com/elastic/security-team/issues/7491** ## Summary Migrated remaining public Detection Engine endpoints to OpenAPI schema and code generation: - `POST /api/detection_engine/rules/_bulk_action` - `GET /api/detection_engine/rules/_find` Also completed the migration of internal APIs: - `GET /internal/detection_engine/rules/{ruleId}/execution/events` - `GET /internal/detection_engine/rules/{ruleId}/execution/results` ### Other notable changes - Changed how we compose Zod error messages for unions, see `packages/kbn-zod-helpers/src/stringify_zod_error.ts`. Now we are trying to list the validation errors of all union members but limiting the total number of validation errors displayed to users. - Addressed some remaining `TODO https://github.com/elastic/security-team/issues/7491` - Removed dependencies of the risk engine and timelines on detection engine schemas - Removed outdated legacy rule schemas that are no longer in use - Added new schema helpers that work with query params: `BooleanFromString` and `ArrayFromString` ![image](https://github.com/elastic/kibana/assets/1938181/f4898f11-04e2-4c82-bce9-e662ba78f724) ![image](https://github.com/elastic/kibana/assets/1938181/235234e7-c86c-49a1-b39f-6f9f8dc780e7) --- .../templates/zod_operation_schema.handlebars | 2 +- .../templates/zod_query_item.handlebars | 14 +- packages/kbn-zod-helpers/index.ts | 3 + .../src/array_from_string.test.ts | 34 ++ .../kbn-zod-helpers/src/array_from_string.ts | 24 + .../src/boolean_from_string.test.ts | 32 ++ .../src/boolean_from_string.ts | 24 + .../src/expect_parse_success.ts | 7 +- .../kbn-zod-helpers/src/safe_parse_result.ts | 28 ++ .../src/stringify_zod_error.ts | 45 +- .../model/error_schema.mock.ts | 4 +- .../api/detection_engine/model/index.ts | 10 +- .../detection_engine/model/pagination.gen.ts | 35 ++ .../model/pagination.schema.yaml | 31 ++ .../api/detection_engine/model/pagination.ts | 28 -- .../model/rule_response_actions/index.ts | 3 - .../rule_schema/common_attributes.gen.ts | 38 +- .../rule_schema/common_attributes.schema.yaml | 30 +- .../rule_schema/rule_request_schema.test.ts | 140 ++++-- .../rule_schema/rule_response_schema.test.ts | 16 +- .../response_actions.ts} | 17 +- .../model/rule_schema_legacy/rule_schemas.ts | 274 +--------- .../api/detection_engine/model/schemas.ts | 17 - .../detection_engine/model/sorting.test.ts | 99 +--- .../detection_engine/model/sorting_legacy.ts | 40 -- .../create_rule_exceptions_route.ts | 6 +- .../bulk_actions/bulk_actions_route.gen.ts | 291 +++++++++++ .../bulk_actions/bulk_actions_route.mock.ts | 10 +- .../bulk_actions_route.schema.yaml | 178 +++---- .../bulk_actions/bulk_actions_route.test.ts | 449 ++++++++--------- .../bulk_actions/bulk_actions_route.ts | 269 ---------- .../bulk_actions/bulk_actions_types.ts | 30 ++ .../bulk_create_rules_route.test.ts | 26 +- .../bulk_patch_rules_route.test.ts | 4 +- .../bulk_update_rules_route.test.ts | 26 +- .../bulk_crud/response_schema.test.ts | 8 +- .../crud/patch_rule/patch_rule_route.test.ts | 56 ++- .../export_rules/export_rules_route.gen.ts | 9 +- .../export_rules/export_rules_route.test.ts | 2 +- .../find_rules/find_rules_route.gen.ts | 71 +++ .../find_rules/find_rules_route.schema.yaml | 98 ++++ .../find_rules/find_rules_route.test.ts | 167 +++---- .../find_rules/find_rules_route.ts | 54 -- .../request_schema_validation.test.ts | 10 +- .../find_rules/request_schema_validation.ts | 13 +- .../import_rules/import_rules_route.gen.ts | 33 +- .../detection_engine/rule_management/index.ts | 5 +- .../detection_engine/rule_monitoring/index.ts | 8 +- .../model/execution_event.gen.ts | 44 ++ .../model/execution_event.mock.ts | 35 +- .../model/execution_event.schema.yaml | 49 ++ .../rule_monitoring/model/execution_event.ts | 61 --- .../model/execution_metrics.gen.ts | 9 +- .../model/execution_metrics.schema.yaml | 7 +- .../model/execution_metrics.ts | 28 -- .../rule_monitoring/model/execution_status.ts | 4 - .../model/execution_summary.mock.ts | 2 +- .../model/execution_summary.ts | 22 - .../rule_monitoring/model/index.ts | 6 +- .../rule_monitoring/model/log_level.ts | 47 +- .../get_rule_execution_events_route.gen.ts | 44 +- .../get_rule_execution_events_route.mock.ts | 2 +- ...et_rule_execution_events_route.schema.yaml | 55 +- .../get_rule_execution_events_route.test.ts | 88 ++-- .../get_rule_execution_events_route.ts | 60 --- .../get_rule_execution_results_route.gen.ts | 10 +- .../create_signals_migration_route.ts | 5 +- .../common/api/timeline/model/api.ts | 6 +- .../api/timeline/model/error_schema.mock.ts | 17 + .../model/error_schema.test.ts | 4 +- .../model/error_schema.ts} | 14 +- .../transform_actions.test.ts | 8 +- .../detection_engine/transform_actions.ts | 15 +- .../risk_score_calculation/request_schema.ts | 5 +- .../risk_score_preview/request_schema.ts | 5 +- .../common/types/response_actions/index.ts | 4 +- .../components/event_details/osquery_tab.tsx | 4 +- .../rule_management/api/api.test.ts | 20 +- .../rule_management/api/api.ts | 23 +- .../api/hooks/use_bulk_action_mutation.ts | 12 +- .../logic/bulk_actions/translations.ts | 65 +-- .../bulk_actions/use_bulk_export.test.ts | 6 +- .../logic/bulk_actions/use_bulk_export.ts | 8 +- .../use_download_exported_rules.ts | 6 +- .../use_execute_bulk_action.test.ts | 26 +- .../bulk_actions/use_execute_bulk_action.ts | 11 +- .../use_guess_rule_ids_for_bulk_action.ts | 7 +- .../bulk_actions/use_show_bulk_error_toast.ts | 2 +- .../use_show_bulk_success_toast.ts | 9 +- .../rule_management/logic/types.ts | 17 +- .../bulk_action_dry_run_confirmation.tsx | 10 +- .../bulk_action_rule_errors_list.test.tsx | 22 +- .../bulk_action_rule_errors_list.tsx | 6 +- .../bulk_actions/bulk_edit_flyout.tsx | 27 +- .../forms/index_patterns_form.tsx | 26 +- .../bulk_actions/forms/rule_actions_form.tsx | 8 +- .../bulk_actions/forms/schedule_form.tsx | 6 +- .../bulk_actions/forms/tags_form.tsx | 22 +- .../forms/timeline_template_form.tsx | 6 +- .../rules_table/bulk_actions/types.ts | 4 +- .../bulk_actions/use_bulk_actions.tsx | 39 +- .../use_bulk_actions_confirmation.ts | 14 +- .../bulk_actions/use_bulk_edit_form_flyout.ts | 14 +- .../compute_dry_run_edit_payload.test.ts | 19 +- .../utils/compute_dry_run_edit_payload.ts | 27 +- .../rules_management_tour.tsx | 4 +- .../rules_table/rules_table_saved_state.ts | 62 +-- .../use_rules_table_saved_state.ts | 16 +- .../components/rules_table/use_columns.tsx | 11 +- .../rules_table/use_rules_table_actions.tsx | 6 +- .../coverage_overview_dashboard_context.tsx | 4 +- .../api/__mocks__/api_client.ts | 8 +- .../rule_monitoring/api/api_client.test.ts | 11 +- .../basic/filters/event_type_filter/index.tsx | 5 +- .../indicators/event_type_indicator/utils.ts | 15 +- .../indicators/log_level_indicator/utils.ts | 13 +- .../components/basic/tables/use_sorting.ts | 9 +- .../use_execution_events.test.tsx | 8 +- .../rule_response_actions/constants.ts | 6 +- .../get_supported_response_actions.ts | 15 +- .../response_action_type_form.tsx | 6 +- .../rule_response_actions/utils.tsx | 4 +- .../rules/rule_actions_overflow/index.tsx | 6 +- .../components/rules/rule_switch/index.tsx | 4 +- .../e2e/automated_response_actions/form.cy.ts | 6 +- .../rule_assets/prebuilt_rule_asset.test.ts | 16 +- .../api/rules/bulk_actions/route.test.ts | 18 +- .../api/rules/bulk_actions/route.ts | 34 +- .../api/rules/bulk_patch_rules/route.test.ts | 4 +- .../api/rules/create_rule/route.test.ts | 4 +- .../api/rules/find_rules/route.test.ts | 4 +- .../api/rules/find_rules/route.ts | 10 +- .../api/rules/patch_rule/route.test.ts | 4 +- .../api/rules/update_rule/route.test.ts | 8 +- .../action_to_rules_client_operation.test.ts | 16 +- .../action_to_rules_client_operation.ts | 16 +- .../logic/bulk_actions/bulk_edit_rules.ts | 2 +- .../bulk_actions/rule_params_modifier.test.ts | 38 +- .../bulk_actions/rule_params_modifier.ts | 18 +- .../split_bulk_edit_actions.test.ts | 32 +- .../bulk_actions/split_bulk_edit_actions.ts | 16 +- .../logic/bulk_actions/utils.ts | 9 +- .../logic/bulk_actions/validations.ts | 8 +- .../logic/search/find_rules.ts | 39 +- .../logic/search/transform_sort_field.ts | 4 +- .../rule_management/utils/validate.test.ts | 3 +- .../get_rule_execution_events_route.test.ts | 12 +- .../get_rule_execution_events_route.ts | 6 +- .../aggregations/rule_execution_stats.ts | 39 +- .../event_log/register_event_log_provider.ts | 2 +- .../client_for_executors/client.ts | 25 +- .../event_log/event_log_reader.ts | 22 +- .../event_log/event_log_writer.ts | 15 +- ...dule_notification_response_actions.test.ts | 6 +- .../schedule_notification_response_actions.ts | 6 +- .../group1/create_rules_bulk.ts | 4 +- .../group10/patch_rules.ts | 4 +- .../group10/patch_rules_bulk.ts | 4 +- .../group10/perform_bulk_action.ts | 473 +++++++++--------- .../group10/perform_bulk_action_dry_run.ts | 46 +- .../group10/update_rules.ts | 7 +- .../group10/update_rules_bulk.ts | 4 +- .../rule_execution_logic/query.ts | 4 +- .../rule_creation/create_rules.ts | 7 +- 164 files changed, 2566 insertions(+), 2582 deletions(-) create mode 100644 packages/kbn-zod-helpers/src/array_from_string.test.ts create mode 100644 packages/kbn-zod-helpers/src/array_from_string.ts create mode 100644 packages/kbn-zod-helpers/src/boolean_from_string.test.ts create mode 100644 packages/kbn-zod-helpers/src/boolean_from_string.ts create mode 100644 packages/kbn-zod-helpers/src/safe_parse_result.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts rename x-pack/plugins/security_solution/common/api/detection_engine/model/{rule_response_actions/response_actions_legacy.ts => rule_schema_legacy/response_actions.ts} (82%) delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts create mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts delete mode 100644 x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts create mode 100644 x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts rename x-pack/plugins/security_solution/common/api/{detection_engine => timeline}/model/error_schema.test.ts (93%) rename x-pack/plugins/security_solution/common/api/{detection_engine/model/error_schema_legacy.ts => timeline/model/error_schema.ts} (69%) diff --git a/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars b/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars index 6bb6fccf7d3b3..5395edbcf5f25 100644 --- a/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars +++ b/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars @@ -6,7 +6,7 @@ */ import { z } from "zod"; -import { requiredOptional, isValidDateMath } from "@kbn/zod-helpers" +import { requiredOptional, isValidDateMath, ArrayFromString, BooleanFromString } from "@kbn/zod-helpers" {{> disclaimer}} diff --git a/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars b/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars index 7fa146cd783e4..ad51f934b7fde 100644 --- a/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars +++ b/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars @@ -19,10 +19,7 @@ {{~/if~}} {{~#if (eq type "array")}} - z.preprocess( - (value: unknown) => (typeof value === "string") ? value === '' ? [] : value.split(",") : value, - z.array({{~> zod_schema_item items ~}}) - ) + ArrayFromString({{~> zod_schema_item items ~}}) {{~#if minItems}}.min({{minItems}}){{/if~}} {{~#if maxItems}}.max({{maxItems}}){{/if~}} {{~#if (eq requiredBool false)}}.optional(){{/if~}} @@ -30,12 +27,9 @@ {{~/if~}} {{~#if (eq type "boolean")}} - z.preprocess( - (value: unknown) => (typeof value === "boolean") ? String(value) : value, - z.enum(["true", "false"]) - {{~#if (defined default)}}.default("{{{toJSON default}}}"){{/if~}} - .transform((value) => value === "true") - ) + BooleanFromString + {{~#if (eq requiredBool false)}}.optional(){{/if~}} + {{~#if (defined default)}}.default({{{toJSON default}}}){{/if~}} {{~/if~}} {{~#if (eq type "string")}} diff --git a/packages/kbn-zod-helpers/index.ts b/packages/kbn-zod-helpers/index.ts index f1062064dc5cf..d8a62f58686b2 100644 --- a/packages/kbn-zod-helpers/index.ts +++ b/packages/kbn-zod-helpers/index.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +export * from './src/array_from_string'; +export * from './src/boolean_from_string'; export * from './src/expect_parse_error'; export * from './src/expect_parse_success'; export * from './src/is_valid_date_math'; export * from './src/required_optional'; +export * from './src/safe_parse_result'; export * from './src/stringify_zod_error'; diff --git a/packages/kbn-zod-helpers/src/array_from_string.test.ts b/packages/kbn-zod-helpers/src/array_from_string.test.ts new file mode 100644 index 0000000000000..ba27fddb0c9b5 --- /dev/null +++ b/packages/kbn-zod-helpers/src/array_from_string.test.ts @@ -0,0 +1,34 @@ +/* + * 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 { ArrayFromString } from './array_from_string'; +import * as z from 'zod'; + +describe('ArrayFromString', () => { + const itemsSchema = z.string(); + + it('should return an array when input is a string', () => { + const result = ArrayFromString(itemsSchema).parse('a,b,c'); + expect(result).toEqual(['a', 'b', 'c']); + }); + + it('should return an empty array when input is an empty string', () => { + const result = ArrayFromString(itemsSchema).parse(''); + expect(result).toEqual([]); + }); + + it('should return the input as is when it is not a string', () => { + const input = ['a', 'b', 'c']; + const result = ArrayFromString(itemsSchema).parse(input); + expect(result).toEqual(input); + }); + + it('should throw an error when input is not a string or an array', () => { + expect(() => ArrayFromString(itemsSchema).parse(123)).toThrow(); + }); +}); diff --git a/packages/kbn-zod-helpers/src/array_from_string.ts b/packages/kbn-zod-helpers/src/array_from_string.ts new file mode 100644 index 0000000000000..24247e2d14c40 --- /dev/null +++ b/packages/kbn-zod-helpers/src/array_from_string.ts @@ -0,0 +1,24 @@ +/* + * 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 z from 'zod'; + +/** + * This is a helper schema to convert comma separated strings to arrays. Useful + * for processing query params. + * + * @param schema Array items schema + * @returns Array schema that accepts a comma-separated string as input + */ +export function ArrayFromString(schema: T) { + return z.preprocess( + (value: unknown) => + typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, + z.array(schema) + ); +} diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.test.ts b/packages/kbn-zod-helpers/src/boolean_from_string.test.ts new file mode 100644 index 0000000000000..842eda2d6e9a2 --- /dev/null +++ b/packages/kbn-zod-helpers/src/boolean_from_string.test.ts @@ -0,0 +1,32 @@ +/* + * 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 { BooleanFromString } from './boolean_from_string'; + +describe('BooleanFromString', () => { + it('should return true when input is "true"', () => { + expect(BooleanFromString.parse('true')).toBe(true); + }); + + it('should return false when input is "false"', () => { + expect(BooleanFromString.parse('false')).toBe(false); + }); + + it('should return true when input is true', () => { + expect(BooleanFromString.parse(true)).toBe(true); + }); + + it('should return false when input is false', () => { + expect(BooleanFromString.parse(false)).toBe(false); + }); + + it('should throw an error when input is not a boolean or "true" or "false"', () => { + expect(() => BooleanFromString.parse('not a boolean')).toThrow(); + expect(() => BooleanFromString.parse(42)).toThrow(); + }); +}); diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.ts b/packages/kbn-zod-helpers/src/boolean_from_string.ts new file mode 100644 index 0000000000000..d73e77ea1bddc --- /dev/null +++ b/packages/kbn-zod-helpers/src/boolean_from_string.ts @@ -0,0 +1,24 @@ +/* + * 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 z from 'zod'; + +/** + * This is a helper schema to convert a boolean string ("true" or "false") to a + * boolean. Useful for processing query params. + * + * Accepts "true" or "false" as strings, or a boolean. + */ +export const BooleanFromString = z + .enum(['true', 'false']) + .or(z.boolean()) + .transform((value) => { + if (typeof value === 'boolean') { + return value; + } + return value === 'true'; + }); diff --git a/packages/kbn-zod-helpers/src/expect_parse_success.ts b/packages/kbn-zod-helpers/src/expect_parse_success.ts index 4fc4a74047933..8c9e518c27b87 100644 --- a/packages/kbn-zod-helpers/src/expect_parse_success.ts +++ b/packages/kbn-zod-helpers/src/expect_parse_success.ts @@ -7,9 +7,14 @@ */ import type { SafeParseReturnType, SafeParseSuccess } from 'zod'; +import { stringifyZodError } from './stringify_zod_error'; export function expectParseSuccess( result: SafeParseReturnType ): asserts result is SafeParseSuccess { - expect(result.success).toEqual(true); + if (!result.success) { + // We are throwing here instead of using assertions because we want to show + // the stringified error to assist with debugging. + throw new Error(`Expected parse success, got error: ${stringifyZodError(result.error)}`); + } } diff --git a/packages/kbn-zod-helpers/src/safe_parse_result.ts b/packages/kbn-zod-helpers/src/safe_parse_result.ts new file mode 100644 index 0000000000000..4e9b701a18faf --- /dev/null +++ b/packages/kbn-zod-helpers/src/safe_parse_result.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 * as z from 'zod'; + +/** + * Safely parse a payload against a schema, returning the output or undefined. + * This method does not throw validation errors and is useful for validating + * optional objects when we don't care about errors. + * + * @param payload Schema payload + * @param schema Validation schema + * @returns Schema output or undefined + */ +export function safeParseResult( + payload: unknown, + schema: T +): T['_output'] | undefined { + const result = schema.safeParse(payload); + if (result.success) { + return result.data; + } +} diff --git a/packages/kbn-zod-helpers/src/stringify_zod_error.ts b/packages/kbn-zod-helpers/src/stringify_zod_error.ts index b873870f99381..1fbaec8bbac85 100644 --- a/packages/kbn-zod-helpers/src/stringify_zod_error.ts +++ b/packages/kbn-zod-helpers/src/stringify_zod_error.ts @@ -6,16 +6,41 @@ * Side Public License, v 1. */ -import { ZodError } from 'zod'; +import { ZodError, ZodIssue } from 'zod'; + +const MAX_ERRORS = 5; export function stringifyZodError(err: ZodError) { - return err.issues - .map((issue) => { - // If the path is empty, the error is for the root object - if (issue.path.length === 0) { - return issue.message; - } - return `${issue.path.join('.')}: ${issue.message}`; - }) - .join(', '); + const errorMessages: string[] = []; + + const issues = err.issues; + + // Recursively traverse all issues + while (issues.length > 0) { + const issue = issues.shift()!; + + // If the issue is an invalid union, we need to traverse all issues in the + // "unionErrors" array + if (issue.code === 'invalid_union') { + issues.push(...issue.unionErrors.flatMap((e) => e.issues)); + continue; + } + + errorMessages.push(stringifyIssue(issue)); + } + + const extraErrorCount = errorMessages.length - MAX_ERRORS; + if (extraErrorCount > 0) { + errorMessages.splice(MAX_ERRORS); + errorMessages.push(`and ${extraErrorCount} more`); + } + + return errorMessages.join(', '); +} + +function stringifyIssue(issue: ZodIssue) { + if (issue.path.length === 0) { + return issue.message; + } + return `${issue.path.join('.')}: ${issue.message}`; } diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts index 22c507804e1d8..b52f61febbafb 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts @@ -4,9 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import type { ErrorSchema } from './error_schema_legacy'; +import type { ErrorSchema } from './error_schema.gen'; export const getErrorSchemaMock = ( id: string = '819eded6-e9c8-445b-a647-519aea39e063' diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts index 0d243fc201fb9..f5c8440a07148 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts @@ -8,12 +8,8 @@ export * from './alerts'; export * from './rule_response_actions'; export * from './rule_schema'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export * from './error_schema_legacy'; -export * from './pagination'; +export * from './error_schema.gen'; +export * from './pagination.gen'; export * from './schemas'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export * from './sorting_legacy'; +export * from './sorting.gen'; export * from './warning_schema.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts new file mode 100644 index 0000000000000..0a7336b8f78c3 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +/** + * Page number + */ +export type Page = z.infer; +export const Page = z.number().int().min(1); + +/** + * Number of items per page + */ +export type PerPage = z.infer; +export const PerPage = z.number().int().min(0); + +export type PaginationResult = z.infer; +export const PaginationResult = z.object({ + page: Page, + per_page: PerPage, + /** + * Total number of items + */ + total: z.number().int().min(0), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml new file mode 100644 index 0000000000000..3afccce86e329 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml @@ -0,0 +1,31 @@ +openapi: 3.0.0 +info: + title: Pagination Schema + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + Page: + type: integer + minimum: 1 + description: Page number + PerPage: + type: integer + minimum: 0 + description: Number of items per page + PaginationResult: + type: object + properties: + page: + $ref: '#/components/schemas/Page' + per_page: + $ref: '#/components/schemas/PerPage' + total: + type: integer + minimum: 0 + description: Total number of items + required: + - page + - per_page + - total diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts deleted file mode 100644 index bed2cade86df4..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts +++ /dev/null @@ -1,28 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import { PositiveInteger, PositiveIntegerGreaterThanZero } from '@kbn/securitysolution-io-ts-types'; - -export type Page = t.TypeOf; -export const Page = PositiveIntegerGreaterThanZero; - -export type PageOrUndefined = t.TypeOf; -export const PageOrUndefined = t.union([Page, t.undefined]); - -export type PerPage = t.TypeOf; -export const PerPage = PositiveInteger; - -export type PerPageOrUndefined = t.TypeOf; -export const PerPageOrUndefined = t.union([PerPage, t.undefined]); - -export type PaginationResult = t.TypeOf; -export const PaginationResult = t.type({ - page: Page, - per_page: PerPage, - total: PositiveInteger, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts index ccaf290dc5d33..e9956d88eb45a 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts @@ -5,7 +5,4 @@ * 2.0. */ -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export { RESPONSE_ACTION_TYPES, SUPPORTED_RESPONSE_ACTION_TYPES } from './response_actions_legacy'; export * from './response_actions.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts index 0d62dfd9c21f3..79ad21ddfb009 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts @@ -367,26 +367,38 @@ export const RuleActionFrequency = z.object({ throttle: RuleActionThrottle.nullable(), }); +export type RuleActionAlertsFilter = z.infer; +export const RuleActionAlertsFilter = z.object({}).catchall(z.unknown()); + +/** + * Object containing the allowed connector fields, which varies according to the connector type. + */ +export type RuleActionParams = z.infer; +export const RuleActionParams = z.object({}).catchall(z.unknown()); + +/** + * Optionally groups actions by use cases. Use `default` for alert notifications. + */ +export type RuleActionGroup = z.infer; +export const RuleActionGroup = z.string(); + +/** + * The connector ID. + */ +export type RuleActionId = z.infer; +export const RuleActionId = z.string(); + export type RuleAction = z.infer; export const RuleAction = z.object({ /** * The action type used for sending notifications. */ action_type_id: z.string(), - /** - * Optionally groups actions by use cases. Use `default` for alert notifications. - */ - group: z.string(), - /** - * The connector ID. - */ - id: z.string(), - /** - * Object containing the allowed connector fields, which varies according to the connector type. - */ - params: z.object({}).catchall(z.unknown()), + group: RuleActionGroup, + id: RuleActionId, + params: RuleActionParams, uuid: NonEmptyString.optional(), - alerts_filter: z.object({}).catchall(z.unknown()).optional(), + alerts_filter: RuleActionAlertsFilter.optional(), frequency: RuleActionFrequency.optional(), }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml index 921f9350550b6..ad2bfaf76c4c0 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml @@ -397,6 +397,23 @@ components: - notifyWhen - throttle + RuleActionAlertsFilter: + type: object + additionalProperties: true + + RuleActionParams: + type: object + description: Object containing the allowed connector fields, which varies according to the connector type. + additionalProperties: true + + RuleActionGroup: + type: string + description: Optionally groups actions by use cases. Use `default` for alert notifications. + + RuleActionId: + type: string + description: The connector ID. + RuleAction: type: object properties: @@ -404,20 +421,15 @@ components: type: string description: The action type used for sending notifications. group: - type: string - description: Optionally groups actions by use cases. Use `default` for alert notifications. + $ref: '#/components/schemas/RuleActionGroup' id: - type: string - description: The connector ID. + $ref: '#/components/schemas/RuleActionId' params: - type: object - description: Object containing the allowed connector fields, which varies according to the connector type. - additionalProperties: true + $ref: '#/components/schemas/RuleActionParams' uuid: $ref: '#/components/schemas/NonEmptyString' alerts_filter: - type: object - additionalProperties: true + $ref: '#/components/schemas/RuleActionAlertsFilter' frequency: $ref: '#/components/schemas/RuleActionFrequency' required: diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts index abbfa4903ea31..062c913354404 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts @@ -25,7 +25,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, description: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('strips any unknown values', () => { @@ -46,7 +48,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, description: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('[rule_id, description] does not validate', () => { @@ -57,7 +61,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from] does not validate', () => { @@ -69,7 +75,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from, to] does not validate', () => { @@ -82,7 +90,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from, to, name] does not validate', () => { @@ -96,7 +106,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", and 36 more"` + ); }); test('[rule_id, description, from, to, name, severity] does not validate', () => { @@ -111,7 +123,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 28 more"` + ); }); test('[rule_id, description, from, to, name, severity, type] does not validate', () => { @@ -127,7 +141,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, interval] does not validate', () => { @@ -144,7 +160,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, interval, index] does not validate', () => { @@ -162,7 +180,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, query, index, interval] does validate', () => { @@ -202,7 +222,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", risk_score: Required, risk_score: Required, and 22 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, query, language, risk_score] does validate', () => { @@ -368,7 +390,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"references.0: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", references.0: Expected string, received number, references.0: Expected string, received number, and 22 more"` + ); }); test('indexes cannot be numbers', () => { @@ -379,7 +403,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('saved_query type can have filters with it', () => { @@ -401,7 +427,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('language validates with kuery', () => { @@ -434,7 +462,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 19 more"` + ); }); test('max_signals cannot be negative', () => { @@ -493,7 +523,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"tags.0: Expected string, received number, tags.1: Expected string, received number, tags.2: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", and 38 more"` + ); }); test('You cannot send in an array of threat that are missing "framework"', () => { @@ -519,7 +551,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.framework: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", threat.0.framework: Required, threat.0.framework: Required, and 22 more"` + ); }); test('You cannot send in an array of threat that are missing "tactic"', () => { @@ -541,7 +575,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.tactic: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", threat.0.tactic: Required, threat.0.tactic: Required, and 22 more"` + ); }); test('You can send in an array of threat that are missing "technique"', () => { @@ -583,7 +619,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"false_positives.0: Expected string, received number, false_positives.1: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", false_positives.0: Expected string, received number, and 30 more"` + ); }); test('You cannot set the risk_score to 101', () => { @@ -655,7 +693,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"meta: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", meta: Expected object, received string, meta: Expected object, received string, and 22 more"` + ); }); test('You can omit the query string when filters are present', () => { @@ -690,7 +730,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "group"', () => { @@ -701,7 +743,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.group: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.group: Required, actions.0.group: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "id"', () => { @@ -712,7 +756,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.id: Required, actions.0.id: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "action_type_id"', () => { @@ -723,7 +769,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "params"', () => { @@ -734,7 +782,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.params: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.params: Required, actions.0.params: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are including "actionTypeId"', () => { @@ -752,7 +802,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 22 more"` + ); }); describe('note', () => { @@ -788,7 +840,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"note: Expected string, received object, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", note: Expected string, received object, note: Expected string, received object, and 22 more"` + ); }); test('empty name is not valid', () => { @@ -872,7 +926,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", saved_id: Required, type: Invalid literal value, expected \\"threshold\\", and 14 more"` + ); }); test('threshold is required when type is threshold and will not validate without it', () => { @@ -880,7 +936,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 14 more"` + ); }); test('threshold rules fail validation if threshold is not greater than 0', () => { @@ -958,7 +1016,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list.0.list_id: Required, exceptions_list.0.type: Required, exceptions_list.0.namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'not a namespace type', type: Invalid literal value, expected \\"eql\\", query: Required, and 43 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, filters, risk_score, note, and non-existent exceptions_list] does validate with empty exceptions_list', () => { @@ -999,7 +1059,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 14 more"` + ); }); test('fails validation when threat_mapping is an empty array', () => { @@ -1068,7 +1130,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", data_view_id: Expected string, received number, data_view_id: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('it should validate a type of "query" with "data_view_id" defined', () => { @@ -1131,7 +1195,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields.field_names: Required, investigation_fields.field_names: Required, and 22 more"` + ); }); test('You can send in investigation_fields', () => { @@ -1166,7 +1232,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names.0: Expected string, received number, investigation_fields.field_names.1: Expected string, received number, investigation_fields.field_names.2: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", and 38 more"` + ); }); test('You cannot send in investigation_fields without specifying fields', () => { @@ -1177,7 +1245,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields.field_names: Required, investigation_fields.field_names: Required, and 22 more"` + ); }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts index e8573502cb662..d1432e5a67352 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts @@ -40,7 +40,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 15 more"` + ); }); test('it should validate a type of "query" with a saved_id together', () => { @@ -68,7 +70,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", saved_id: Required, type: Invalid literal value, expected \\"threshold\\", and 14 more"` + ); }); test('it should validate a type of "timeline_id" if there is a "timeline_title" dependent', () => { @@ -98,7 +102,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list: Expected array, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", exceptions_list: Expected array, received string, exceptions_list: Expected array, received string, and 22 more"` + ); }); }); @@ -232,6 +238,8 @@ describe('investigation_fields', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields: Expected object, received string, investigation_fields: Expected object, received string, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts similarity index 82% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts rename to x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts index 6947953b4d65d..8f176a9908041 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts @@ -4,18 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { arrayQueries, ecsMapping } from '@kbn/osquery-io-ts-types'; import * as t from 'io-ts'; import { ENABLED_AUTOMATED_RESPONSE_ACTION_COMMANDS } from '../../../../endpoint/service/response_actions/constants'; -import { ResponseActionTypesEnum } from './response_actions.gen'; - -export const RESPONSE_ACTION_TYPES = { - OSQUERY: ResponseActionTypesEnum['.osquery'], - ENDPOINT: ResponseActionTypesEnum['.endpoint'], -} as const; - -export const SUPPORTED_RESPONSE_ACTION_TYPES = Object.values(RESPONSE_ACTION_TYPES); // to enable using RESPONSE_ACTION_API_COMMANDS_NAMES as a type function keyObject(arr: T): { [K in T[number]]: null } { @@ -47,13 +38,13 @@ export const OsqueryParamsCamelCase = t.type({ // When we create new response action types, create a union of types export type RuleResponseOsqueryAction = t.TypeOf; export const RuleResponseOsqueryAction = t.strict({ - actionTypeId: t.literal(RESPONSE_ACTION_TYPES.OSQUERY), + actionTypeId: t.literal('.osquery'), params: OsqueryParamsCamelCase, }); export type RuleResponseEndpointAction = t.TypeOf; export const RuleResponseEndpointAction = t.strict({ - actionTypeId: t.literal(RESPONSE_ACTION_TYPES.ENDPOINT), + actionTypeId: t.literal('.endpoint'), params: EndpointParams, }); @@ -67,12 +58,12 @@ export const ResponseActionRuleParamsOrUndefined = t.union([ // When we create new response action types, create a union of types const OsqueryResponseAction = t.strict({ - action_type_id: t.literal(RESPONSE_ACTION_TYPES.OSQUERY), + action_type_id: t.literal('.osquery'), params: OsqueryParams, }); const EndpointResponseAction = t.strict({ - action_type_id: t.literal(RESPONSE_ACTION_TYPES.ENDPOINT), + action_type_id: t.literal('.endpoint'), params: EndpointParams, }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts index e95fa38e0d2e6..4ec9ca19ee399 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts @@ -26,20 +26,10 @@ import { threat_mapping, threat_query, } from '@kbn/securitysolution-io-ts-alerting-types'; +import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; +import { ResponseActionArray } from './response_actions'; -import { RuleExecutionSummary } from '../../rule_monitoring/model'; -// eslint-disable-next-line no-restricted-imports -import { ResponseActionArray } from '../rule_response_actions/response_actions_legacy'; - -import { - anomaly_threshold, - created_at, - created_by, - revision, - saved_id, - updated_at, - updated_by, -} from '../schemas'; +import { anomaly_threshold, saved_id } from '../schemas'; import { AlertsIndex, @@ -51,10 +41,7 @@ import { InvestigationFields, InvestigationGuide, IsRuleEnabled, - IsRuleImmutable, MaxSignals, - RelatedIntegrationArray, - RequiredFieldArray, RuleAuthorArray, RuleDescription, RuleFalsePositiveArray, @@ -63,7 +50,6 @@ import { RuleMetadata, RuleName, RuleNameOverride, - RuleObjectId, RuleQuery, RuleReferenceArray, RuleSignatureId, @@ -72,7 +58,6 @@ import { SavedObjectResolveAliasPurpose, SavedObjectResolveAliasTargetId, SavedObjectResolveOutcome, - SetupGuide, ThreatArray, TimelineTemplateId, TimelineTemplateTitle, @@ -186,28 +171,24 @@ export const baseSchema = buildRuleSchemas({ }, }); -const responseRequiredFields = { - id: RuleObjectId, - rule_id: RuleSignatureId, - immutable: IsRuleImmutable, - updated_at, - updated_by, - created_at, - created_by, - revision, - - // NOTE: For now, Related Integrations, Required Fields and Setup Guide are supported for prebuilt - // rules only. We don't want to allow users to edit these 3 fields via the API. If we added them - // to baseParams.defaultable, they would become a part of the request schema as optional fields. - // This is why we add them here, in order to add them only to the response schema. - related_integrations: RelatedIntegrationArray, - required_fields: RequiredFieldArray, - setup: SetupGuide, -}; - -const responseOptionalFields = { - execution_summary: RuleExecutionSummary, -}; +export type DurationMetric = t.TypeOf; +export const DurationMetric = PositiveInteger; + +export type RuleExecutionMetrics = t.TypeOf; + +/** + @property total_search_duration_ms - "total time spent performing ES searches as measured by Kibana; + includes network latency and time spent serializing/deserializing request/response", + @property total_indexing_duration_ms - "total time spent indexing documents during current rule execution cycle", + @property total_enrichment_duration_ms - total time spent enriching documents during current rule execution cycle + @property execution_gap_duration_s - "duration in seconds of execution gap" +*/ +export const RuleExecutionMetrics = t.partial({ + total_search_duration_ms: DurationMetric, + total_indexing_duration_ms: DurationMetric, + total_enrichment_duration_ms: DurationMetric, + execution_gap_duration_s: DurationMetric, +}); export type BaseCreateProps = t.TypeOf; export const BaseCreateProps = baseSchema.create; @@ -225,36 +206,9 @@ export const SharedCreateProps = t.intersection([ t.exact(t.partial({ rule_id: RuleSignatureId })), ]); -type SharedUpdateProps = t.TypeOf; -const SharedUpdateProps = t.intersection([ - baseSchema.create, - t.exact(t.partial({ rule_id: RuleSignatureId })), - t.exact(t.partial({ id: RuleObjectId })), -]); - -type SharedPatchProps = t.TypeOf; -const SharedPatchProps = t.intersection([ - baseSchema.patch, - t.exact(t.partial({ rule_id: RuleSignatureId, id: RuleObjectId })), -]); - -export type SharedResponseProps = t.TypeOf; -export const SharedResponseProps = t.intersection([ - baseSchema.response, - t.exact(t.type(responseRequiredFields)), - t.exact(t.partial(responseOptionalFields)), -]); - // ------------------------------------------------------------------------------------------------- // EQL rule schema -export enum QueryLanguage { - 'kuery' = 'kuery', - 'lucene' = 'lucene', - 'eql' = 'eql', - 'esql' = 'esql', -} - export type KqlQueryLanguage = t.TypeOf; export const KqlQueryLanguage = t.keyof({ kuery: null, lucene: null }); @@ -278,21 +232,6 @@ const eqlSchema = buildRuleSchemas({ defaultable: {}, }); -export type EqlRule = t.TypeOf; -export const EqlRule = t.intersection([SharedResponseProps, eqlSchema.response]); - -export type EqlRuleCreateProps = t.TypeOf; -export const EqlRuleCreateProps = t.intersection([SharedCreateProps, eqlSchema.create]); - -export type EqlRuleUpdateProps = t.TypeOf; -export const EqlRuleUpdateProps = t.intersection([SharedUpdateProps, eqlSchema.create]); - -export type EqlRulePatchProps = t.TypeOf; -export const EqlRulePatchProps = t.intersection([SharedPatchProps, eqlSchema.patch]); - -export type EqlPatchParams = t.TypeOf; -export const EqlPatchParams = eqlSchema.patch; - // ------------------------------------------------------------------------------------------------- // ES|QL rule schema @@ -309,21 +248,6 @@ const esqlSchema = buildRuleSchemas({ defaultable: {}, }); -export type EsqlRule = t.TypeOf; -export const EsqlRule = t.intersection([SharedResponseProps, esqlSchema.response]); - -export type EsqlRuleCreateProps = t.TypeOf; -export const EsqlRuleCreateProps = t.intersection([SharedCreateProps, esqlSchema.create]); - -export type EsqlRuleUpdateProps = t.TypeOf; -export const EsqlRuleUpdateProps = t.intersection([SharedUpdateProps, esqlSchema.create]); - -export type EsqlRulePatchProps = t.TypeOf; -export const EsqlRulePatchProps = t.intersection([SharedPatchProps, esqlSchema.patch]); - -export type EsqlPatchParams = t.TypeOf; -export const EsqlPatchParams = esqlSchema.patch; - // ------------------------------------------------------------------------------------------------- // Indicator Match rule schema @@ -351,30 +275,6 @@ const threatMatchSchema = buildRuleSchemas({ }, }); -export type ThreatMatchRule = t.TypeOf; -export const ThreatMatchRule = t.intersection([SharedResponseProps, threatMatchSchema.response]); - -export type ThreatMatchRuleCreateProps = t.TypeOf; -export const ThreatMatchRuleCreateProps = t.intersection([ - SharedCreateProps, - threatMatchSchema.create, -]); - -export type ThreatMatchRuleUpdateProps = t.TypeOf; -export const ThreatMatchRuleUpdateProps = t.intersection([ - SharedUpdateProps, - threatMatchSchema.create, -]); - -export type ThreatMatchRulePatchProps = t.TypeOf; -export const ThreatMatchRulePatchProps = t.intersection([ - SharedPatchProps, - threatMatchSchema.patch, -]); - -export type ThreatMatchPatchParams = t.TypeOf; -export const ThreatMatchPatchParams = threatMatchSchema.patch; - // ------------------------------------------------------------------------------------------------- // Custom Query rule schema @@ -396,21 +296,6 @@ const querySchema = buildRuleSchemas({ }, }); -export type QueryRule = t.TypeOf; -export const QueryRule = t.intersection([SharedResponseProps, querySchema.response]); - -export type QueryRuleCreateProps = t.TypeOf; -export const QueryRuleCreateProps = t.intersection([SharedCreateProps, querySchema.create]); - -export type QueryRuleUpdateProps = t.TypeOf; -export const QueryRuleUpdateProps = t.intersection([SharedUpdateProps, querySchema.create]); - -export type QueryRulePatchProps = t.TypeOf; -export const QueryRulePatchProps = t.intersection([SharedPatchProps, querySchema.patch]); - -export type QueryPatchParams = t.TypeOf; -export const QueryPatchParams = querySchema.patch; - // ------------------------------------------------------------------------------------------------- // Saved Query rule schema @@ -434,27 +319,6 @@ const savedQuerySchema = buildRuleSchemas({ }, }); -export type SavedQueryRule = t.TypeOf; -export const SavedQueryRule = t.intersection([SharedResponseProps, savedQuerySchema.response]); - -export type SavedQueryRuleCreateProps = t.TypeOf; -export const SavedQueryRuleCreateProps = t.intersection([ - SharedCreateProps, - savedQuerySchema.create, -]); - -export type SavedQueryRuleUpdateProps = t.TypeOf; -export const SavedQueryRuleUpdateProps = t.intersection([ - SharedUpdateProps, - savedQuerySchema.create, -]); - -export type SavedQueryRulePatchProps = t.TypeOf; -export const SavedQueryRulePatchProps = t.intersection([SharedPatchProps, savedQuerySchema.patch]); - -export type SavedQueryPatchParams = t.TypeOf; -export const SavedQueryPatchParams = savedQuerySchema.patch; - // ------------------------------------------------------------------------------------------------- // Threshold rule schema @@ -475,21 +339,6 @@ const thresholdSchema = buildRuleSchemas({ }, }); -export type ThresholdRule = t.TypeOf; -export const ThresholdRule = t.intersection([SharedResponseProps, thresholdSchema.response]); - -export type ThresholdRuleCreateProps = t.TypeOf; -export const ThresholdRuleCreateProps = t.intersection([SharedCreateProps, thresholdSchema.create]); - -export type ThresholdRuleUpdateProps = t.TypeOf; -export const ThresholdRuleUpdateProps = t.intersection([SharedUpdateProps, thresholdSchema.create]); - -export type ThresholdRulePatchProps = t.TypeOf; -export const ThresholdRulePatchProps = t.intersection([SharedPatchProps, thresholdSchema.patch]); - -export type ThresholdPatchParams = t.TypeOf; -export const ThresholdPatchParams = thresholdSchema.patch; - // ------------------------------------------------------------------------------------------------- // Machine Learning rule schema @@ -503,33 +352,6 @@ const machineLearningSchema = buildRuleSchemas({ defaultable: {}, }); -export type MachineLearningRule = t.TypeOf; -export const MachineLearningRule = t.intersection([ - SharedResponseProps, - machineLearningSchema.response, -]); - -export type MachineLearningRuleCreateProps = t.TypeOf; -export const MachineLearningRuleCreateProps = t.intersection([ - SharedCreateProps, - machineLearningSchema.create, -]); - -export type MachineLearningRuleUpdateProps = t.TypeOf; -export const MachineLearningRuleUpdateProps = t.intersection([ - SharedUpdateProps, - machineLearningSchema.create, -]); - -export type MachineLearningRulePatchProps = t.TypeOf; -export const MachineLearningRulePatchProps = t.intersection([ - SharedPatchProps, - machineLearningSchema.patch, -]); - -export type MachineLearningPatchParams = t.TypeOf; -export const MachineLearningPatchParams = machineLearningSchema.patch; - // ------------------------------------------------------------------------------------------------- // New Terms rule schema @@ -550,21 +372,6 @@ const newTermsSchema = buildRuleSchemas({ }, }); -export type NewTermsRule = t.TypeOf; -export const NewTermsRule = t.intersection([SharedResponseProps, newTermsSchema.response]); - -export type NewTermsRuleCreateProps = t.TypeOf; -export const NewTermsRuleCreateProps = t.intersection([SharedCreateProps, newTermsSchema.create]); - -export type NewTermsRuleUpdateProps = t.TypeOf; -export const NewTermsRuleUpdateProps = t.intersection([SharedUpdateProps, newTermsSchema.create]); - -export type NewTermsRulePatchProps = t.TypeOf; -export const NewTermsRulePatchProps = t.intersection([SharedPatchProps, newTermsSchema.patch]); - -export type NewTermsPatchParams = t.TypeOf; -export const NewTermsPatchParams = newTermsSchema.patch; - // ------------------------------------------------------------------------------------------------- // Combined type specific schemas @@ -579,42 +386,3 @@ export const TypeSpecificCreateProps = t.union([ machineLearningSchema.create, newTermsSchema.create, ]); - -export type TypeSpecificPatchProps = t.TypeOf; -export const TypeSpecificPatchProps = t.union([ - eqlSchema.patch, - esqlSchema.patch, - threatMatchSchema.patch, - querySchema.patch, - savedQuerySchema.patch, - thresholdSchema.patch, - machineLearningSchema.patch, - newTermsSchema.patch, -]); - -export type TypeSpecificResponse = t.TypeOf; -export const TypeSpecificResponse = t.union([ - eqlSchema.response, - esqlSchema.response, - threatMatchSchema.response, - querySchema.response, - savedQuerySchema.response, - thresholdSchema.response, - machineLearningSchema.response, - newTermsSchema.response, -]); - -// ------------------------------------------------------------------------------------------------- -// Final combined schemas - -export type RuleCreateProps = t.TypeOf; -export const RuleCreateProps = t.intersection([TypeSpecificCreateProps, SharedCreateProps]); - -export type RuleUpdateProps = t.TypeOf; -export const RuleUpdateProps = t.intersection([TypeSpecificCreateProps, SharedUpdateProps]); - -export type RulePatchProps = t.TypeOf; -export const RulePatchProps = t.intersection([TypeSpecificPatchProps, SharedPatchProps]); - -export type RuleResponse = t.TypeOf; -export const RuleResponse = t.intersection([TypeSpecificResponse, SharedResponseProps]); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts index 9c325d1e70fc0..35a394edcb6ad 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts @@ -33,12 +33,6 @@ export type Status = t.TypeOf; export const conflicts = t.keyof({ abort: null, proceed: null }); -export const queryFilter = t.string; -export type QueryFilter = t.TypeOf; - -export const queryFilterOrUndefined = t.union([queryFilter, t.undefined]); -export type QueryFilterOrUndefined = t.TypeOf; - export const signal_ids = t.array(t.string); export type SignalIds = t.TypeOf; @@ -48,23 +42,12 @@ export const signal_status_query = t.object; export const alert_tag_ids = t.array(t.string); export type AlertTagIds = t.TypeOf; -export const fields = t.array(t.string); -export type Fields = t.TypeOf; -export const fieldsOrUndefined = t.union([fields, t.undefined]); -export type FieldsOrUndefined = t.TypeOf; - export const created_at = IsoDateString; export const updated_at = IsoDateString; export const created_by = t.string; export const updated_by = t.string; -export const status_code = PositiveInteger; -export const message = t.string; -export const perPage = PositiveInteger; -export const total = PositiveInteger; export const revision = PositiveInteger; -export const success = t.boolean; -export const success_count = PositiveInteger; export const indexRecord = t.record( t.string, diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts index 17ad724039d7e..04a5fadefe051 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts @@ -5,85 +5,30 @@ * 2.0. */ -import { pipe } from 'fp-ts/lib/pipeable'; -import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DefaultSortOrderAsc, DefaultSortOrderDesc } from './sorting_legacy'; - -describe('Common sorting schemas', () => { - describe('DefaultSortOrderAsc', () => { - describe('Validation succeeds', () => { - it('when valid sort order is passed', () => { - const payload = 'desc'; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); - }); - }); - - describe('Validation fails', () => { - it('when invalid sort order is passed', () => { - const payload = 'behind_you'; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "behind_you" supplied to "DefaultSortOrderAsc"', - ]); - expect(message.schema).toEqual({}); - }); - }); - - describe('Validation sets the default sort order "asc"', () => { - it('when sort order is not passed', () => { - const payload = undefined; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual('asc'); - }); - }); +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; +import { SortOrder } from './sorting.gen'; + +describe('SortOrder schema', () => { + it('accepts asc value', () => { + const payload = 'asc'; + const result = SortOrder.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); - describe('DefaultSortOrderDesc', () => { - describe('Validation succeeds', () => { - it('when valid sort order is passed', () => { - const payload = 'asc'; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); - }); - }); - - describe('Validation fails', () => { - it('when invalid sort order is passed', () => { - const payload = 'behind_you'; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "behind_you" supplied to "DefaultSortOrderDesc"', - ]); - expect(message.schema).toEqual({}); - }); - }); - - describe('Validation sets the default sort order "desc"', () => { - it('when sort order is not passed', () => { - const payload = null; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); + it('accepts desc value', () => { + const payload = 'desc'; + const result = SortOrder.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); + }); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual('desc'); - }); - }); + it('fails on unknown value', () => { + const payload = 'invalid'; + const result = SortOrder.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual( + "Invalid enum value. Expected 'asc' | 'desc', received 'invalid'" + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts deleted file mode 100644 index 8aa8cf2831ea1..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts +++ /dev/null @@ -1,40 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import type { Either } from 'fp-ts/lib/Either'; -import { capitalize } from 'lodash'; - -export type SortOrder = t.TypeOf; -export const SortOrder = t.keyof({ asc: null, desc: null }); - -export type SortOrderOrUndefined = t.TypeOf; -export const SortOrderOrUndefined = t.union([SortOrder, t.undefined]); - -const defaultSortOrder = (order: SortOrder): t.Type => { - return new t.Type( - `DefaultSortOrder${capitalize(order)}`, - SortOrder.is, - (input, context): Either => - input == null ? t.success(order) : SortOrder.validate(input, context), - t.identity - ); -}; - -/** - * Types the DefaultSortOrderAsc as: - * - If undefined, then a default sort order of 'asc' will be set - * - If a string is sent in, then the string will be validated to ensure it's a valid SortOrder - */ -export const DefaultSortOrderAsc = defaultSortOrder('asc'); - -/** - * Types the DefaultSortOrderDesc as: - * - If undefined, then a default sort order of 'desc' will be set - * - If a string is sent in, then the string will be validated to ensure it's a valid SortOrder - */ -export const DefaultSortOrderDesc = defaultSortOrder('desc'); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts index feecf23faf293..75eb2b543d337 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts @@ -12,9 +12,7 @@ import type { ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { createRuleExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { RuleObjectId } from '../../model/rule_schema_legacy'; +import { UUID } from '@kbn/securitysolution-io-ts-types'; /** * URL path parameters of the API route. @@ -22,7 +20,7 @@ import { RuleObjectId } from '../../model/rule_schema_legacy'; export type CreateRuleExceptionsRequestParams = t.TypeOf; export const CreateRuleExceptionsRequestParams = t.exact( t.type({ - id: RuleObjectId, + id: UUID, }) ); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts new file mode 100644 index 0000000000000..d11eea7b16711 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts @@ -0,0 +1,291 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +import { RuleResponse } from '../../model/rule_schema/rule_schemas.gen'; +import { + RuleActionGroup, + RuleActionId, + RuleActionParams, + RuleActionFrequency, + RuleActionAlertsFilter, + IndexPatternArray, + RuleTagArray, + TimelineTemplateId, + TimelineTemplateTitle, +} from '../../model/rule_schema/common_attributes.gen'; + +export type BulkEditSkipReason = z.infer; +export const BulkEditSkipReason = z.literal('RULE_NOT_MODIFIED'); + +export type BulkActionSkipResult = z.infer; +export const BulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: BulkEditSkipReason, +}); + +export type RuleDetailsInError = z.infer; +export const RuleDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type BulkActionsDryRunErrCode = z.infer; +export const BulkActionsDryRunErrCode = z.enum([ + 'IMMUTABLE', + 'MACHINE_LEARNING_AUTH', + 'MACHINE_LEARNING_INDEX_PATTERN', + 'ESQL_INDEX_PATTERN', +]); +export type BulkActionsDryRunErrCodeEnum = typeof BulkActionsDryRunErrCode.enum; +export const BulkActionsDryRunErrCodeEnum = BulkActionsDryRunErrCode.enum; + +export type NormalizedRuleError = z.infer; +export const NormalizedRuleError = z.object({ + message: z.string(), + status_code: z.number().int(), + err_code: BulkActionsDryRunErrCode.optional(), + rules: z.array(RuleDetailsInError), +}); + +export type BulkEditActionResults = z.infer; +export const BulkEditActionResults = z.object({ + updated: z.array(RuleResponse), + created: z.array(RuleResponse), + deleted: z.array(RuleResponse), + skipped: z.array(BulkActionSkipResult), +}); + +export type BulkEditActionSummary = z.infer; +export const BulkEditActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type BulkEditActionResponse = z.infer; +export const BulkEditActionResponse = z.object({ + success: z.boolean().optional(), + status_code: z.number().int().optional(), + message: z.string().optional(), + rules_count: z.number().int().optional(), + attributes: z.object({ + results: BulkEditActionResults, + summary: BulkEditActionSummary, + errors: z.array(NormalizedRuleError).optional(), + }), +}); + +export type BulkExportActionResponse = z.infer; +export const BulkExportActionResponse = z.string(); + +export type BulkActionBase = z.infer; +export const BulkActionBase = z.object({ + /** + * Query to filter rules + */ + query: z.string().optional(), + /** + * Array of rule IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type BulkDeleteRules = z.infer; +export const BulkDeleteRules = BulkActionBase.and( + z.object({ + action: z.literal('delete'), + }) +); + +export type BulkDisableRules = z.infer; +export const BulkDisableRules = BulkActionBase.and( + z.object({ + action: z.literal('disable'), + }) +); + +export type BulkEnableRules = z.infer; +export const BulkEnableRules = BulkActionBase.and( + z.object({ + action: z.literal('enable'), + }) +); + +export type BulkExportRules = z.infer; +export const BulkExportRules = BulkActionBase.and( + z.object({ + action: z.literal('export'), + }) +); + +export type BulkDuplicateRules = z.infer; +export const BulkDuplicateRules = BulkActionBase.and( + z.object({ + action: z.literal('duplicate'), + duplicate: z + .object({ + /** + * Whether to copy exceptions from the original rule + */ + include_exceptions: z.boolean(), + /** + * Whether to copy expired exceptions from the original rule + */ + include_expired_exceptions: z.boolean(), + }) + .optional(), + }) +); + +/** + * The condition for throttling the notification: 'rule', 'no_actions', or time duration + */ +export type ThrottleForBulkActions = z.infer; +export const ThrottleForBulkActions = z.enum(['rule', '1h', '1d', '7d']); +export type ThrottleForBulkActionsEnum = typeof ThrottleForBulkActions.enum; +export const ThrottleForBulkActionsEnum = ThrottleForBulkActions.enum; + +export type BulkActionType = z.infer; +export const BulkActionType = z.enum([ + 'enable', + 'disable', + 'export', + 'delete', + 'duplicate', + 'edit', +]); +export type BulkActionTypeEnum = typeof BulkActionType.enum; +export const BulkActionTypeEnum = BulkActionType.enum; + +export type BulkActionEditType = z.infer; +export const BulkActionEditType = z.enum([ + 'add_tags', + 'delete_tags', + 'set_tags', + 'add_index_patterns', + 'delete_index_patterns', + 'set_index_patterns', + 'set_timeline', + 'add_rule_actions', + 'set_rule_actions', + 'set_schedule', +]); +export type BulkActionEditTypeEnum = typeof BulkActionEditType.enum; +export const BulkActionEditTypeEnum = BulkActionEditType.enum; + +export type NormalizedRuleAction = z.infer; +export const NormalizedRuleAction = z + .object({ + group: RuleActionGroup, + id: RuleActionId, + params: RuleActionParams, + frequency: RuleActionFrequency.optional(), + alerts_filter: RuleActionAlertsFilter.optional(), + }) + .strict(); + +export type BulkActionEditPayloadRuleActions = z.infer; +export const BulkActionEditPayloadRuleActions = z.object({ + type: z.enum(['add_rule_actions', 'set_rule_actions']), + value: z.object({ + throttle: ThrottleForBulkActions.optional(), + actions: z.array(NormalizedRuleAction), + }), +}); + +export type BulkActionEditPayloadSchedule = z.infer; +export const BulkActionEditPayloadSchedule = z.object({ + type: z.literal('set_schedule'), + value: z.object({ + /** + * Interval in which the rule is executed + */ + interval: z.string().regex(/^[1-9]\d*[smh]$/), + /** + * Lookback time for the rule + */ + lookback: z.string().regex(/^[1-9]\d*[smh]$/), + }), +}); + +export type BulkActionEditPayloadIndexPatterns = z.infer; +export const BulkActionEditPayloadIndexPatterns = z.object({ + type: z.enum(['add_index_patterns', 'delete_index_patterns', 'set_index_patterns']), + value: IndexPatternArray, + overwrite_data_views: z.boolean().optional(), +}); + +export type BulkActionEditPayloadTags = z.infer; +export const BulkActionEditPayloadTags = z.object({ + type: z.enum(['add_tags', 'delete_tags', 'set_tags']), + value: RuleTagArray, +}); + +export type BulkActionEditPayloadTimeline = z.infer; +export const BulkActionEditPayloadTimeline = z.object({ + type: z.literal('set_timeline'), + value: z.object({ + timeline_id: TimelineTemplateId, + timeline_title: TimelineTemplateTitle, + }), +}); + +export type BulkActionEditPayload = z.infer; +export const BulkActionEditPayload = z.union([ + BulkActionEditPayloadTags, + BulkActionEditPayloadIndexPatterns, + BulkActionEditPayloadTimeline, + BulkActionEditPayloadRuleActions, + BulkActionEditPayloadSchedule, +]); + +export type BulkEditRules = z.infer; +export const BulkEditRules = BulkActionBase.and( + z.object({ + action: z.literal('edit'), + /** + * Array of objects containing the edit operations + */ + edit: z.array(BulkActionEditPayload).min(1), + }) +); + +export type PerformBulkActionRequestQuery = z.infer; +export const PerformBulkActionRequestQuery = z.object({ + /** + * Enables dry run mode for the request call. + */ + dry_run: BooleanFromString.optional(), +}); +export type PerformBulkActionRequestQueryInput = z.input; + +export type PerformBulkActionRequestBody = z.infer; +export const PerformBulkActionRequestBody = z.union([ + BulkDeleteRules, + BulkDisableRules, + BulkEnableRules, + BulkExportRules, + BulkDuplicateRules, + BulkEditRules, +]); +export type PerformBulkActionRequestBodyInput = z.input; + +export type PerformBulkActionResponse = z.infer; +export const PerformBulkActionResponse = z.union([ + BulkEditActionResponse, + BulkExportActionResponse, +]); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts index 66ce78ff9b615..fa4fcefbcad1a 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { BulkActionType, BulkActionEditType } from './bulk_actions_route'; -import type { PerformBulkActionRequestBody } from './bulk_actions_route'; +import type { PerformBulkActionRequestBody } from './bulk_actions_route.gen'; +import { BulkActionEditTypeEnum, BulkActionTypeEnum } from './bulk_actions_route.gen'; export const getPerformBulkActionSchemaMock = (): PerformBulkActionRequestBody => ({ query: '', ids: undefined, - action: BulkActionType.disable, + action: BulkActionTypeEnum.disable, }); export const getPerformBulkActionEditSchemaMock = (): PerformBulkActionRequestBody => ({ query: '', ids: undefined, - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_tags, value: ['tag1'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.add_tags, value: ['tag1'] }], }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml index 8eba09881bbd9..583782f086ae7 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml @@ -6,7 +6,7 @@ paths: /api/detection_engine/rules/_bulk_action: post: operationId: PerformBulkAction - x-codegen-enabled: false + x-codegen-enabled: true summary: Applies a bulk action to multiple rules description: The bulk action is applied to all rules that match the filter or to the list of rules by their IDs. tags: @@ -22,19 +22,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PerformBulkActionRequest' + oneOf: + - $ref: '#/components/schemas/BulkDeleteRules' + - $ref: '#/components/schemas/BulkDisableRules' + - $ref: '#/components/schemas/BulkEnableRules' + - $ref: '#/components/schemas/BulkExportRules' + - $ref: '#/components/schemas/BulkDuplicateRules' + - $ref: '#/components/schemas/BulkEditRules' responses: 200: description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/BulkEditActionResponse' + oneOf: + - $ref: '#/components/schemas/BulkEditActionResponse' + - $ref: '#/components/schemas/BulkExportActionResponse' components: - x-codegen-enabled: false schemas: BulkEditSkipReason: type: string @@ -66,6 +71,11 @@ components: BulkActionsDryRunErrCode: type: string + enum: + - IMMUTABLE + - MACHINE_LEARNING_AUTH + - MACHINE_LEARNING_INDEX_PATTERN + - ESQL_INDEX_PATTERN NormalizedRuleError: type: object @@ -127,35 +137,17 @@ components: - succeeded - total - BulkEditActionSuccessResponse: + BulkEditActionResponse: type: object properties: success: type: boolean - rules_count: - type: integer - attributes: - type: object - properties: - results: - $ref: '#/components/schemas/BulkEditActionResults' - summary: - $ref: '#/components/schemas/BulkEditActionSummary' - required: - - results - - summary - required: - - success - - rules_count - - attributes - - BulkEditActionErrorResponse: - type: object - properties: status_code: type: integer message: type: string + rules_count: + type: integer attributes: type: object properties: @@ -171,35 +163,23 @@ components: - results - summary required: - - status_code - - message - attributes - BulkEditActionResponse: - oneOf: - - $ref: '#/components/schemas/BulkEditActionSuccessResponse' - - $ref: '#/components/schemas/BulkEditActionErrorResponse' + BulkExportActionResponse: + type: string BulkActionBase: - oneOf: - - type: object - properties: - query: - type: string - description: Query to filter rules - required: - - query - additionalProperties: false - - - type: object - properties: - ids: - type: array - description: Array of rule IDs - minItems: 1 - items: - type: string - additionalProperties: false + type: object + properties: + query: + type: string + description: Query to filter rules + ids: + type: array + description: Array of rule IDs + minItems: 1 + items: + type: string BulkDeleteRules: allOf: @@ -262,35 +242,20 @@ components: include_expired_exceptions: type: boolean description: Whether to copy expired exceptions from the original rule + required: + - include_exceptions + - include_expired_exceptions required: - action - RuleActionSummary: - type: boolean - description: Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert - - RuleActionNotifyWhen: - type: string - description: "The condition for throttling the notification: 'onActionGroupChange', 'onActiveAlert', or 'onThrottleInterval'" - enum: - - onActionGroupChange - - onActiveAlert - - onThrottleInterval - - RuleActionThrottle: + ThrottleForBulkActions: type: string description: "The condition for throttling the notification: 'rule', 'no_actions', or time duration" - - RuleActionFrequency: - type: object - properties: - summary: - $ref: '#/components/schemas/RuleActionSummary' - notifyWhen: - $ref: '#/components/schemas/RuleActionNotifyWhen' - throttle: - $ref: '#/components/schemas/RuleActionThrottle' - nullable: true + enum: + - rule + - 1h + - 1d + - 7d BulkActionType: type: string @@ -316,6 +281,26 @@ components: - set_rule_actions - set_schedule + # Per rulesClient.bulkEdit rules actions operation contract (x-pack/plugins/alerting/server/rules_client/rules_client.ts) normalized rule action object is expected (NormalizedAlertAction) as value for the edit operation + NormalizedRuleAction: + type: object + properties: + group: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionGroup' + id: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionId' + params: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionParams' + frequency: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionFrequency' + alerts_filter: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionAlertsFilter' + required: + - group + - id + - params + additionalProperties: false + BulkActionEditPayloadRuleActions: type: object properties: @@ -326,28 +311,11 @@ components: type: object properties: throttle: - $ref: '#/components/schemas/RuleActionThrottle' + $ref: '#/components/schemas/ThrottleForBulkActions' actions: type: array items: - type: object - properties: - group: - type: string - description: Action group - id: - type: string - description: Action ID - params: - type: object - description: Action parameters - frequency: - $ref: '#/components/schemas/RuleActionFrequency' - description: Action frequency - required: - - group - - id - - params + $ref: '#/components/schemas/NormalizedRuleAction' required: - actions required: @@ -366,12 +334,19 @@ components: interval: type: string description: Interval in which the rule is executed + pattern: '^[1-9]\d*[smh]$' # any number except zero followed by one of the suffixes 's', 'm', 'h' + example: '1h' lookback: type: string description: Lookback time for the rule + pattern: '^[1-9]\d*[smh]$' # any number except zero followed by one of the suffixes 's', 'm', 'h' + example: '1h' required: - interval - lookback + required: + - type + - value BulkActionEditPayloadIndexPatterns: type: object @@ -441,22 +416,13 @@ components: properties: action: type: string - x-type: literal enum: [edit] edit: type: array description: Array of objects containing the edit operations items: $ref: '#/components/schemas/BulkActionEditPayload' + minItems: 1 required: - action - - rule - - PerformBulkActionRequest: - oneOf: - - $ref: '#/components/schemas/BulkDeleteRules' - - $ref: '#/components/schemas/BulkDisableRules' - - $ref: '#/components/schemas/BulkEnableRules' - - $ref: '#/components/schemas/BulkExportRules' - - $ref: '#/components/schemas/BulkDuplicateRules' - - $ref: '#/components/schemas/BulkEditRules' + - edit diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts index 70ae548674332..ff5289f79d98d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts @@ -5,19 +5,12 @@ * 2.0. */ -import { left } from 'fp-ts/lib/Either'; -import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; import { + BulkActionEditTypeEnum, + BulkActionTypeEnum, PerformBulkActionRequestBody, - BulkActionType, - BulkActionEditType, -} from './bulk_actions_route'; - -const retrieveValidationMessage = (payload: unknown) => { - const decoded = PerformBulkActionRequestBody.decode(payload); - const checked = exactCheck(payload, decoded); - return foldLeftRight(checked); -}; +} from './bulk_actions_route.gen'; describe('Perform bulk action request schema', () => { describe('cases common to every bulk action', () => { @@ -25,62 +18,64 @@ describe('Perform bulk action request schema', () => { test('valid request: missing query', () => { const payload: PerformBulkActionRequestBody = { query: undefined, - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('invalid request: missing action', () => { const payload: Omit = { query: 'name: test', }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "undefined" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 2 more"` + ); }); test('invalid request: unknown action', () => { const payload: Omit & { action: 'unknown' } = { - query: 'name: test', action: 'unknown', }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "unknown" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 2 more"` + ); }); - test('invalid request: unknown property', () => { + test('strips unknown properties', () => { const payload = { query: 'name: test', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, mock: ['id'], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual(['invalid keys "mock,["id"]"']); - expect(message.schema).toEqual({}); + expect(result.data).toEqual({ + query: 'name: test', + action: BulkActionTypeEnum.enable, + }); }); test('invalid request: wrong type for ids', () => { const payload = { ids: 'mock', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "mock" supplied to "ids"']); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"ids: Expected array, received string, action: Invalid literal value, expected \\"delete\\", ids: Expected array, received string, action: Invalid literal value, expected \\"disable\\", ids: Expected array, received string, and 7 more"` + ); }); }); @@ -88,11 +83,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -100,11 +95,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.disable, + action: BulkActionTypeEnum.disable, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -112,11 +107,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -124,11 +119,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.delete, + action: BulkActionTypeEnum.delete, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -136,15 +131,15 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.duplicate, - [BulkActionType.duplicate]: { + action: BulkActionTypeEnum.duplicate, + [BulkActionTypeEnum.duplicate]: { include_exceptions: false, include_expired_exceptions: false, }, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -153,47 +148,30 @@ describe('Perform bulk action request schema', () => { test('invalid request: missing edit payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - }; - - const message = retrieveValidationMessage(payload); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); - }); - - test('invalid request: specified edit payload for another action', () => { - const payload = { - query: 'name: test', - action: BulkActionType.enable, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'invalid keys "edit,[{"type":"set_tags","value":["test-tag"]}]"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 1 more"` + ); }); test('invalid request: wrong type for edit payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: { type: BulkActionEditType.set_tags, value: ['test-tag'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: { type: BulkActionEditTypeEnum.set_tags, value: ['test-tag'] }, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"type":"set_tags","value":["test-tag"]}" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 1 more"` + ); }); }); @@ -201,57 +179,61 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong tags type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: 'test-tag' }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_tags, value: 'test-tag' }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "test-tag" supplied to "edit,value"', - 'Invalid value "set_tags" supplied to "edit,type"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 9 more"` + ); }); test('valid request: add_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.add_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: set_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.set_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: delete_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.delete_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.delete_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -259,63 +241,61 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong index_patterns type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: 'logs-*' }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_tags, value: 'logs-*' }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "logs-*" supplied to "edit,value"', - 'Invalid value "set_tags" supplied to "edit,type"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 9 more"` + ); }); test('valid request: set_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.set_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: add_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.add_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: delete_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.delete_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -323,27 +303,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong timeline payload type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_timeline, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_timeline, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "set_timeline" supplied to "edit,type"', - 'Invalid value "[]" supplied to "edit,value"', - ]); - expect(message.schema).toEqual({}); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` + ); }); test('invalid request: missing timeline_id', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_title: 'Test timeline title', }, @@ -351,24 +329,21 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "{"timeline_title":"Test timeline title"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,timeline_id"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('valid request: set_timeline edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'timelineid', timeline_title: 'Test timeline title', @@ -377,10 +352,10 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -388,27 +363,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong schedules payload type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_schedule, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_schedule, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "set_schedule" supplied to "edit,type"', - 'Invalid value "[]" supplied to "edit,value"', - ]); - expect(message.schema).toEqual({}); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` + ); }); test('invalid request: wrong type of payload data', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '-10m', lookback: '1m', @@ -417,25 +390,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"interval":"-10m","lookback":"1m"}" supplied to "edit,value"', - 'Invalid value "-10m" supplied to "edit,value,interval"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"edit.0.value.interval: Invalid"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing interval', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { lookback: '1m', }, @@ -443,25 +412,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"lookback":"1m"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,interval"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing lookback', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', }, @@ -469,25 +434,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"interval":"1m"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,lookback"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('valid request: set_schedule edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', lookback: '1m', @@ -496,10 +457,10 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -507,25 +468,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: invalid rule actions payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_rule_actions, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.add_rule_actions, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['Invalid value "[]" supplied to "edit,value"']) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing actions in payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', }, @@ -533,21 +494,21 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['Invalid value "undefined" supplied to "edit,value,actions"']) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 11 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: invalid action_type_id property in actions array', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -567,20 +528,20 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['invalid keys "action_type_id"']) + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"edit.0.value.actions.0: Unrecognized key(s) in object: 'action_type_id'"` ); - expect(message.schema).toEqual({}); }); test('valid request: add_rule_actions edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -599,19 +560,19 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: set_rule_actions edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -632,10 +593,10 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts deleted file mode 100644 index 768626d08769d..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts +++ /dev/null @@ -1,269 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; - -import { NonEmptyArray, TimeDuration } from '@kbn/securitysolution-io-ts-types'; -import { - RuleActionAlertsFilter, - RuleActionFrequency, - RuleActionGroup, - RuleActionId, - RuleActionParams, -} from '@kbn/securitysolution-io-ts-alerting-types'; - -import type { BulkActionSkipResult } from '@kbn/alerting-plugin/common'; -import type { RuleResponse } from '../../model'; -import type { BulkActionsDryRunErrCode } from '../../../../constants'; - -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { - IndexPatternArray, - RuleQuery, - RuleTagArray, - TimelineTemplateId, - TimelineTemplateTitle, -} from '../../model/rule_schema_legacy'; - -export enum BulkActionType { - 'enable' = 'enable', - 'disable' = 'disable', - 'export' = 'export', - 'delete' = 'delete', - 'duplicate' = 'duplicate', - 'edit' = 'edit', -} - -export enum BulkActionEditType { - 'add_tags' = 'add_tags', - 'delete_tags' = 'delete_tags', - 'set_tags' = 'set_tags', - 'add_index_patterns' = 'add_index_patterns', - 'delete_index_patterns' = 'delete_index_patterns', - 'set_index_patterns' = 'set_index_patterns', - 'set_timeline' = 'set_timeline', - 'add_rule_actions' = 'add_rule_actions', - 'set_rule_actions' = 'set_rule_actions', - 'set_schedule' = 'set_schedule', -} - -export type ThrottleForBulkActions = t.TypeOf; -export const ThrottleForBulkActions = t.union([ - t.literal('rule'), - t.literal('1h'), - t.literal('1d'), - t.literal('7d'), -]); - -type BulkActionEditPayloadTags = t.TypeOf; -const BulkActionEditPayloadTags = t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_tags), - t.literal(BulkActionEditType.delete_tags), - t.literal(BulkActionEditType.set_tags), - ]), - value: RuleTagArray, -}); - -export type BulkActionEditPayloadIndexPatterns = t.TypeOf< - typeof BulkActionEditPayloadIndexPatterns ->; -const BulkActionEditPayloadIndexPatterns = t.intersection([ - t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_index_patterns), - t.literal(BulkActionEditType.delete_index_patterns), - t.literal(BulkActionEditType.set_index_patterns), - ]), - value: IndexPatternArray, - }), - t.exact(t.partial({ overwrite_data_views: t.boolean })), -]); - -type BulkActionEditPayloadTimeline = t.TypeOf; -const BulkActionEditPayloadTimeline = t.type({ - type: t.literal(BulkActionEditType.set_timeline), - value: t.type({ - timeline_id: TimelineTemplateId, - timeline_title: TimelineTemplateTitle, - }), -}); - -/** - * per rulesClient.bulkEdit rules actions operation contract (x-pack/plugins/alerting/server/rules_client/rules_client.ts) - * normalized rule action object is expected (NormalizedAlertAction) as value for the edit operation - */ -export type NormalizedRuleAction = t.TypeOf; -export const NormalizedRuleAction = t.exact( - t.intersection([ - t.type({ - group: RuleActionGroup, - id: RuleActionId, - params: RuleActionParams, - }), - t.partial({ frequency: RuleActionFrequency }), - t.partial({ alerts_filter: RuleActionAlertsFilter }), - ]) -); - -export type BulkActionEditPayloadRuleActions = t.TypeOf; -export const BulkActionEditPayloadRuleActions = t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_rule_actions), - t.literal(BulkActionEditType.set_rule_actions), - ]), - value: t.intersection([ - t.partial({ throttle: ThrottleForBulkActions }), - t.type({ - actions: t.array(NormalizedRuleAction), - }), - ]), -}); - -type BulkActionEditPayloadSchedule = t.TypeOf; -const BulkActionEditPayloadSchedule = t.type({ - type: t.literal(BulkActionEditType.set_schedule), - value: t.type({ - interval: TimeDuration({ allowedUnits: ['s', 'm', 'h'] }), - lookback: TimeDuration({ allowedUnits: ['s', 'm', 'h'] }), - }), -}); - -export type BulkActionEditPayload = t.TypeOf; -export const BulkActionEditPayload = t.union([ - BulkActionEditPayloadTags, - BulkActionEditPayloadIndexPatterns, - BulkActionEditPayloadTimeline, - BulkActionEditPayloadRuleActions, - BulkActionEditPayloadSchedule, -]); - -const bulkActionDuplicatePayload = t.exact( - t.type({ - include_exceptions: t.boolean, - include_expired_exceptions: t.boolean, - }) -); - -export type BulkActionDuplicatePayload = t.TypeOf; - -/** - * actions that modify rules attributes - */ -export type BulkActionEditForRuleAttributes = - | BulkActionEditPayloadTags - | BulkActionEditPayloadRuleActions - | BulkActionEditPayloadSchedule; - -/** - * actions that modify rules params - */ -export type BulkActionEditForRuleParams = - | BulkActionEditPayloadIndexPatterns - | BulkActionEditPayloadTimeline - | BulkActionEditPayloadSchedule; - -/** - * Request body parameters of the API route. - */ -export type PerformBulkActionRequestBody = t.TypeOf; -export const PerformBulkActionRequestBody = t.intersection([ - t.exact( - t.type({ - query: t.union([RuleQuery, t.undefined]), - }) - ), - t.exact(t.partial({ ids: NonEmptyArray(t.string) })), - t.union([ - t.exact( - t.type({ - action: t.union([ - t.literal(BulkActionType.delete), - t.literal(BulkActionType.disable), - t.literal(BulkActionType.enable), - t.literal(BulkActionType.export), - ]), - }) - ), - t.intersection([ - t.exact( - t.type({ - action: t.literal(BulkActionType.duplicate), - }) - ), - t.exact( - t.partial({ - [BulkActionType.duplicate]: bulkActionDuplicatePayload, - }) - ), - ]), - t.exact( - t.type({ - action: t.literal(BulkActionType.edit), - [BulkActionType.edit]: NonEmptyArray(BulkActionEditPayload), - }) - ), - ]), -]); - -/** - * Query string parameters of the API route. - */ -export type PerformBulkActionRequestQuery = t.TypeOf; -export const PerformBulkActionRequestQuery = t.exact( - t.partial({ - dry_run: t.union([t.literal('true'), t.literal('false')]), - }) -); - -export interface RuleDetailsInError { - id: string; - name?: string; -} -export interface NormalizedRuleError { - message: string; - status_code: number; - err_code?: BulkActionsDryRunErrCode; - rules: RuleDetailsInError[]; -} -export interface BulkEditActionResults { - updated: RuleResponse[]; - created: RuleResponse[]; - deleted: RuleResponse[]; - skipped: BulkActionSkipResult[]; -} - -export interface BulkEditActionSummary { - failed: number; - skipped: number; - succeeded: number; - total: number; -} -export interface BulkEditActionSuccessResponse { - success: boolean; - rules_count: number; - attributes: { - results: BulkEditActionResults; - summary: BulkEditActionSummary; - }; -} -export interface BulkEditActionErrorResponse { - status_code: number; - message: string; - attributes: { - results: BulkEditActionResults; - summary: BulkEditActionSummary; - errors?: NormalizedRuleError[]; - }; -} - -export type BulkEditActionResponse = BulkEditActionSuccessResponse | BulkEditActionErrorResponse; - -export type BulkExportActionResponse = string; - -export type PerformBulkActionResponse = BulkEditActionResponse | BulkExportActionResponse; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts new file mode 100644 index 0000000000000..6e57e5abe2410 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts @@ -0,0 +1,30 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + BulkActionEditPayloadIndexPatterns, + BulkActionEditPayloadRuleActions, + BulkActionEditPayloadSchedule, + BulkActionEditPayloadTags, + BulkActionEditPayloadTimeline, +} from './bulk_actions_route.gen'; + +/** + * actions that modify rules attributes + */ +export type BulkActionEditForRuleAttributes = + | BulkActionEditPayloadTags + | BulkActionEditPayloadRuleActions + | BulkActionEditPayloadSchedule; + +/** + * actions that modify rules params + */ +export type BulkActionEditForRuleParams = + | BulkActionEditPayloadIndexPatterns + | BulkActionEditPayloadTimeline + | BulkActionEditPayloadSchedule; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts index 40955f2eba40a..2e6cff31f8f7d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts @@ -26,7 +26,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, 0.type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('single array element does validate', () => { @@ -56,7 +58,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is valid but the second is invalid (risk_score) will not validate', () => { @@ -68,7 +72,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.risk_score: Required, 1.type: Invalid literal value, expected \\"eql\\", 1.language: Invalid literal value, expected \\"eql\\", 1.risk_score: Required, 1.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is invalid (risk_score) but the second is valid will not validate', () => { @@ -80,7 +86,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where both are invalid (risk_score) will not validate', () => { @@ -95,7 +103,7 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"0: Invalid input, 1: Invalid input"` + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 49 more"` ); }); @@ -121,7 +129,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', and 22 more"` + ); }); test('You can set "note" to a string', () => { @@ -154,6 +164,8 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.note: Expected string, received object, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.note: Expected string, received object, 0.note: Expected string, received object, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts index 443a3e0862b45..d5325ad5ed13f 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts @@ -70,6 +70,8 @@ describe('Bulk patch rules request schema', () => { const result = BulkPatchRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, and 3 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts index 86a3a943b6626..3fa69c6ad24dc 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts @@ -27,7 +27,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, 0.type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('single array element does validate', () => { @@ -57,7 +59,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is valid but the second is invalid (risk_score) will not validate', () => { @@ -69,7 +73,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.risk_score: Required, 1.type: Invalid literal value, expected \\"eql\\", 1.language: Invalid literal value, expected \\"eql\\", 1.risk_score: Required, 1.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is invalid (risk_score) but the second is valid will not validate', () => { @@ -81,7 +87,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where both are invalid (risk_score) will not validate', () => { @@ -96,7 +104,7 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"0: Invalid input, 1: Invalid input"` + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 49 more"` ); }); @@ -122,7 +130,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', and 22 more"` + ); }); test('You can set "namespace" to a string', () => { @@ -165,6 +175,8 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.note: Expected string, received object, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.note: Expected string, received object, 0.note: Expected string, received object, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts index d8e3c997e2279..413d83f9fee01 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts @@ -45,7 +45,9 @@ describe('Bulk CRUD rules response schema', () => { const result = BulkCrudRulesResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.error: Required, 0: Unrecognized key(s) in object: 'author', 'created_at', 'updated_at', 'created_by', 'description', 'enabled', 'false_positives', 'from', 'immutable', 'references', 'revision', 'severity', 'severity_mapping', 'updated_by', 'tags', 'to', 'threat', 'version', 'output_index', 'max_signals', 'risk_score', 'risk_score_mapping', 'interval', 'exceptions_list', 'related_integrations', 'required_fields', 'setup', 'throttle', 'actions', 'building_block_type', 'note', 'license', 'outcome', 'alias_target_id', 'alias_purpose', 'timeline_id', 'timeline_title', 'meta', 'rule_name_override', 'timestamp_override', 'timestamp_override_fallback_disabled', 'namespace', 'investigation_fields', 'query', 'type', 'language', 'index', 'data_view_id', 'filters', 'saved_id', 'response_actions', 'alert_suppression', 0.name: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", and 24 more"` + ); }); test('it should NOT validate an invalid error message with a deleted value', () => { @@ -56,7 +58,9 @@ describe('Bulk CRUD rules response schema', () => { const result = BulkCrudRulesResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.error: Required, 0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, and 267 more"` + ); }); test('it should omit any extra rule props', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts index b70b5a6a7d908..1994b3de5d453 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts @@ -373,7 +373,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, and 3 more"` + ); }); test('indexes cannot be numbers', () => { @@ -385,7 +387,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", index.0: Expected string, received number, and 8 more"` + ); }); test('saved_id is not required when type is saved_query and will validate without it', () => { @@ -456,7 +460,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', and 9 more"` + ); }); test('max_signals cannot be negative', () => { @@ -518,7 +524,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"meta: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", meta: Expected object, received string, meta: Expected object, received string, and 12 more"` + ); }); test('filters cannot be a string', () => { @@ -529,7 +537,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 10 more"` + ); }); test('name cannot be an empty string', () => { @@ -631,7 +641,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, and 3 more"` + ); }); test('threat is invalid when updated with missing tactic sub-object', () => { @@ -655,7 +667,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, and 3 more"` + ); }); test('threat is valid when updated with missing technique', () => { @@ -700,7 +714,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', and 3 more"` + ); }); describe('note', () => { @@ -744,7 +760,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, and 3 more"` + ); }); }); @@ -756,7 +774,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.group: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.group: Required, actions.0.group: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are missing "id"', () => { @@ -767,7 +787,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.id: Required, actions.0.id: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are missing "params"', () => { @@ -778,7 +800,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.params: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.params: Required, actions.0.params: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are including "actionTypeId"', () => { @@ -796,7 +820,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 12 more"` + ); }); describe('exception_list', () => { @@ -862,7 +888,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list.0.list_id: Required, exceptions_list.0.type: Required, exceptions_list.0.namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'not a namespace type', type: Invalid literal value, expected \\"eql\\", exceptions_list.0.list_id: Required, and 26 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, filters, risk_score, note, and non-existent exceptions_list] does validate with empty exceptions_list', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts index 01cd91216753f..2dfb54396c9ce 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -19,13 +20,7 @@ export const ExportRulesRequestQuery = z.object({ /** * Determines whether a summary of the exported rules is returned. */ - exclude_export_details: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + exclude_export_details: BooleanFromString.optional().default(false), /** * File name for saving the exported rules. */ diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts index 49b56c6673218..783556d2076af 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts @@ -120,7 +120,7 @@ describe('Export rules request schema', () => { const result = ExportRulesRequestQuery.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toEqual( - `exclude_export_details: Invalid enum value. Expected 'true' | 'false', received 'invalid string'` + `exclude_export_details: Invalid enum value. Expected 'true' | 'false', received 'invalid string', exclude_export_details: Expected boolean, received string` ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts new file mode 100644 index 0000000000000..a515cf70f9513 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts @@ -0,0 +1,71 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +import { SortOrder } from '../../model/sorting.gen'; +import { RuleResponse } from '../../model/rule_schema/rule_schemas.gen'; + +export type FindRulesSortField = z.infer; +export const FindRulesSortField = z.enum([ + 'created_at', + 'createdAt', + 'enabled', + 'execution_summary.last_execution.date', + 'execution_summary.last_execution.metrics.execution_gap_duration_s', + 'execution_summary.last_execution.metrics.total_indexing_duration_ms', + 'execution_summary.last_execution.metrics.total_search_duration_ms', + 'execution_summary.last_execution.status', + 'name', + 'risk_score', + 'riskScore', + 'severity', + 'updated_at', + 'updatedAt', +]); +export type FindRulesSortFieldEnum = typeof FindRulesSortField.enum; +export const FindRulesSortFieldEnum = FindRulesSortField.enum; + +export type FindRulesRequestQuery = z.infer; +export const FindRulesRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindRulesSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * Rules per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindRulesRequestQueryInput = z.input; + +export type FindRulesResponse = z.infer; +export const FindRulesResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(RuleResponse), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml new file mode 100644 index 0000000000000..4fa1c14542ed0 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml @@ -0,0 +1,98 @@ +openapi: 3.0.0 +info: + title: Find Rules API endpoint + version: 2023-10-31 +paths: + /api/detection_engine/rules/_find: + get: + operationId: FindRules + x-codegen-enabled: true + description: Finds rules that match the given query. + tags: + - Rules API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindRulesSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '../../model/sorting.schema.yaml#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: Rules per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: '../../model/rule_schema/rule_schemas.schema.yaml#/components/schemas/RuleResponse' + required: + - page + - perPage + - total + - data + +components: + schemas: + FindRulesSortField: + type: string + enum: + - 'created_at' + - 'createdAt' # Legacy notation, keeping for backwards compatibility + - 'enabled' + - 'execution_summary.last_execution.date' + - 'execution_summary.last_execution.metrics.execution_gap_duration_s' + - 'execution_summary.last_execution.metrics.total_indexing_duration_ms' + - 'execution_summary.last_execution.metrics.total_search_duration_ms' + - 'execution_summary.last_execution.status' + - 'name' + - 'risk_score' + - 'riskScore' # Legacy notation, keeping for backwards compatibility + - 'severity' + - 'updated_at' + - 'updatedAt' # Legacy notation, keeping for backwards compatibility diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts index 391826fed9923..aa4bb53ab7481 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts @@ -5,21 +5,17 @@ * 2.0. */ -import { left } from 'fp-ts/lib/Either'; -import { pipe } from 'fp-ts/lib/pipeable'; -import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - -import { FindRulesRequestQuery } from './find_rules_route'; +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; +import { FindRulesRequestQuery } from './find_rules_route.gen'; describe('Find rules request schema', () => { test('empty objects do validate', () => { - const payload: FindRulesRequestQuery = {}; + const payload: FindRulesRequestQueryInput = {}; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual({ page: 1, per_page: 20, }); @@ -35,167 +31,126 @@ describe('Find rules request schema', () => { sort_order: 'asc', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); - test('made up parameters do not validate', () => { - const payload: Partial & { madeUp: string } = { + test('made up parameters are ignored', () => { + const payload: Partial & { madeUp: string } = { madeUp: 'invalid value', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['invalid keys "madeUp"']); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual({ + page: 1, + per_page: 20, + }); }); test('per_page validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { per_page: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).per_page).toEqual(payload.per_page); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.per_page).toEqual(payload.per_page); }); test('page validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { page: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).page).toEqual(payload.page); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.page).toEqual(payload.page); }); test('sort_field validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).sort_field).toEqual('name'); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.sort_field).toEqual(payload.sort_field); }); test('fields validates with a string', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { fields: ['some value'], }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).fields).toEqual(payload.fields); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.fields).toEqual(payload.fields); }); test('fields validates with multiple strings', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { fields: ['some value 1', 'some value 2'], }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).fields).toEqual(payload.fields); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.fields).toEqual(payload.fields); }); test('fields does not validate with a number', () => { - const payload: Omit & { fields: number } = { + const payload: Omit & { fields: number } = { fields: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "5" supplied to "fields"']); - expect(message.schema).toEqual({}); - }); - - test('per_page has a default of 20', () => { - const payload: FindRulesRequestQuery = {}; - - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).per_page).toEqual(20); - }); - - test('page has a default of 1', () => { - const payload: FindRulesRequestQuery = {}; - - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).page).toEqual(1); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual('fields: Expected array, received number'); }); test('filter works with a string', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { filter: 'some value 1', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).filter).toEqual(payload.filter); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.filter).toEqual(payload.filter); }); test('filter does not work with a number', () => { - const payload: Omit & { filter: number } = { + const payload: Omit & { filter: number } = { filter: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "5" supplied to "filter"']); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual('filter: Expected string, received number'); }); test('sort_order validates with desc and sort_field', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { sort_order: 'desc', sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).sort_order).toEqual(payload.sort_order); - expect((message.schema as FindRulesRequestQuery).sort_field).toEqual(payload.sort_field); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.sort_order).toEqual(payload.sort_order); + expect(result.data.sort_field).toEqual(payload.sort_field); }); test('sort_order does not validate with a string other than asc and desc', () => { - const payload: Omit & { sort_order: string } = { + const payload: Omit & { sort_order: string } = { sort_order: 'some other string', sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "some other string" supplied to "sort_order"', - ]); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual( + "sort_order: Invalid enum value. Expected 'asc' | 'desc', received 'some other string'" + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts deleted file mode 100644 index 7e16b696bdd70..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts +++ /dev/null @@ -1,54 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; -import type { RuleResponse } from '../../model'; -import { SortOrder, queryFilter, fields } from '../../model'; - -export type FindRulesSortField = t.TypeOf; -export const FindRulesSortField = t.union([ - t.literal('created_at'), - t.literal('createdAt'), // Legacy notation, keeping for backwards compatibility - t.literal('enabled'), - t.literal('execution_summary.last_execution.date'), - t.literal('execution_summary.last_execution.metrics.execution_gap_duration_s'), - t.literal('execution_summary.last_execution.metrics.total_indexing_duration_ms'), - t.literal('execution_summary.last_execution.metrics.total_search_duration_ms'), - t.literal('execution_summary.last_execution.status'), - t.literal('name'), - t.literal('risk_score'), - t.literal('riskScore'), // Legacy notation, keeping for backwards compatibility - t.literal('severity'), - t.literal('updated_at'), - t.literal('updatedAt'), // Legacy notation, keeping for backwards compatibility -]); - -export type FindRulesSortFieldOrUndefined = t.TypeOf; -export const FindRulesSortFieldOrUndefined = t.union([FindRulesSortField, t.undefined]); - -/** - * Query string parameters of the API route. - */ -export type FindRulesRequestQuery = t.TypeOf; -export const FindRulesRequestQuery = t.exact( - t.partial({ - fields, - filter: queryFilter, - sort_field: FindRulesSortField, - sort_order: SortOrder, - page: DefaultPage, // defaults to 1 - per_page: DefaultPerPage, // defaults to 20 - }) -); - -export interface FindRulesResponse { - page: number; - perPage: number; - total: number; - data: RuleResponse[]; -} diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts index 93cded33f6d94..c9fb9ce9a3524 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts @@ -5,19 +5,19 @@ * 2.0. */ -import type { FindRulesRequestQuery } from './find_rules_route'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; import { validateFindRulesRequestQuery } from './request_schema_validation'; describe('Find rules request schema, additional validation', () => { describe('validateFindRulesRequestQuery', () => { test('You can have an empty sort_field and empty sort_order', () => { - const schema: FindRulesRequestQuery = {}; + const schema: FindRulesRequestQueryInput = {}; const errors = validateFindRulesRequestQuery(schema); expect(errors).toEqual([]); }); test('You can have both a sort_field and and a sort_order', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_field: 'name', sort_order: 'asc', }; @@ -26,7 +26,7 @@ describe('Find rules request schema, additional validation', () => { }); test('You cannot have sort_field without sort_order', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_field: 'name', }; const errors = validateFindRulesRequestQuery(schema); @@ -36,7 +36,7 @@ describe('Find rules request schema, additional validation', () => { }); test('You cannot have sort_order without sort_field', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_order: 'asc', }; const errors = validateFindRulesRequestQuery(schema); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts index 769ef566d1efd..69d94be334e3f 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts @@ -5,23 +5,16 @@ * 2.0. */ -import type { FindRulesRequestQuery } from './find_rules_route'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; /** * Additional validation that is implemented outside of the schema itself. */ -export const validateFindRulesRequestQuery = (query: FindRulesRequestQuery): string[] => { - return [...validateSortOrder(query)]; -}; - -const validateSortOrder = (query: FindRulesRequestQuery): string[] => { +export const validateFindRulesRequestQuery = (query: FindRulesRequestQueryInput): string[] => { if (query.sort_order != null || query.sort_field != null) { if (query.sort_order == null || query.sort_field == null) { return ['when "sort_order" and "sort_field" must exist together or not at all']; - } else { - return []; } - } else { - return []; } + return []; }; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts index d0a105e28c2c8..225179a6c0489 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -20,43 +21,19 @@ export const ImportRulesRequestQuery = z.object({ /** * Determines whether existing rules with the same `rule_id` are overwritten. */ - overwrite: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite: BooleanFromString.optional().default(false), /** * Determines whether existing exception lists with the same `list_id` are overwritten. */ - overwrite_exceptions: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite_exceptions: BooleanFromString.optional().default(false), /** * Determines whether existing actions with the same `kibana.alert.rule.actions.id` are overwritten. */ - overwrite_action_connectors: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite_action_connectors: BooleanFromString.optional().default(false), /** * Generates a new list ID for each imported exception list. */ - as_new_list: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + as_new_list: BooleanFromString.optional().default(false), }); export type ImportRulesRequestQueryInput = z.input; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts index 7fdab0816d650..709e63a6ec402 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export * from './bulk_actions/bulk_actions_route'; +export * from './bulk_actions/bulk_actions_types'; +export * from './bulk_actions/bulk_actions_route.gen'; export * from './bulk_crud/bulk_create_rules/bulk_create_rules_route.gen'; export * from './bulk_crud/bulk_delete_rules/bulk_delete_rules_route.gen'; export * from './bulk_crud/bulk_patch_rules/bulk_patch_rules_route.gen'; @@ -22,7 +23,7 @@ export * from './crud/update_rule/request_schema_validation'; export * from './crud/update_rule/update_rule_route.gen'; export * from './export_rules/export_rules_details_schema'; export * from './export_rules/export_rules_route.gen'; -export * from './find_rules/find_rules_route'; +export * from './find_rules/find_rules_route.gen'; export * from './find_rules/request_schema_validation'; export * from './get_rule_management_filters/get_rule_management_filters_route'; export * from './import_rules/import_rules_route.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts index 1494e09b9c51a..ddb132ebf64bb 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts @@ -10,15 +10,15 @@ export * from './detection_engine_health/get_rule_health/get_rule_health_route'; export * from './detection_engine_health/get_space_health/get_space_health_route'; export * from './detection_engine_health/setup_health/setup_health_route'; export * from './detection_engine_health/model'; -export * from './rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route'; +export * from './rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen'; export * from './rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen'; export * from './urls'; -export * from './model/execution_event'; -export * from './model/execution_metrics'; +export * from './model/execution_event.gen'; +export * from './model/execution_metrics.gen'; export * from './model/execution_result.gen'; export * from './model/execution_settings'; export * from './model/execution_status.gen'; export * from './model/execution_status'; -export * from './model/execution_summary'; +export * from './model/execution_summary.gen'; export * from './model/log_level'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts new file mode 100644 index 0000000000000..e493c5233a03d --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts @@ -0,0 +1,44 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +export type LogLevel = z.infer; +export const LogLevel = z.enum(['trace', 'debug', 'info', 'warn', 'error']); +export type LogLevelEnum = typeof LogLevel.enum; +export const LogLevelEnum = LogLevel.enum; + +/** + * Type of a plain rule execution event: +- message: Simple log message of some log level, such as debug, info or error. +- status-change: We log an event of this type each time a rule changes its status during an execution. +- execution-metrics: We log an event of this type at the end of a rule execution. It contains various execution metrics such as search and indexing durations. + */ +export type RuleExecutionEventType = z.infer; +export const RuleExecutionEventType = z.enum(['message', 'status-change', 'execution-metrics']); +export type RuleExecutionEventTypeEnum = typeof RuleExecutionEventType.enum; +export const RuleExecutionEventTypeEnum = RuleExecutionEventType.enum; + +/** + * Plain rule execution event. A rule can write many of them during each execution. Events can be of different types and log levels. + +NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a subset of their fields: only those fields that are common to all types of execution events. + */ +export type RuleExecutionEvent = z.infer; +export const RuleExecutionEvent = z.object({ + timestamp: z.string().datetime(), + sequence: z.number().int(), + level: LogLevel, + type: RuleExecutionEventType, + execution_id: z.string().min(1), + message: z.string(), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts index c8efaa8dd85b8..3d987356a37c9 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts @@ -5,9 +5,8 @@ * 2.0. */ -import type { RuleExecutionEvent } from './execution_event'; -import { RuleExecutionEventType } from './execution_event'; -import { LogLevel } from './log_level'; +import type { RuleExecutionEvent } from './execution_event.gen'; +import { LogLevelEnum, RuleExecutionEventTypeEnum } from './execution_event.gen'; const DEFAULT_TIMESTAMP = '2021-12-28T10:10:00.806Z'; const DEFAULT_SEQUENCE_NUMBER = 0; @@ -17,13 +16,13 @@ const getMessageEvent = (props: Partial = {}): RuleExecution // Default values timestamp: DEFAULT_TIMESTAMP, sequence: DEFAULT_SEQUENCE_NUMBER, - level: LogLevel.debug, + level: LogLevelEnum.debug, execution_id: 'execution-id-1', message: 'Some message', // Overridden values ...props, // Mandatory values for this type of event - type: RuleExecutionEventType.message, + type: RuleExecutionEventTypeEnum.message, }; }; @@ -37,8 +36,8 @@ const getRunningStatusChange = (props: Partial = {}): RuleEx // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -54,8 +53,8 @@ const getPartialFailureStatusChange = ( // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.warn, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.warn, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -69,8 +68,8 @@ const getFailedStatusChange = (props: Partial = {}): RuleExe // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.error, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.error, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -84,8 +83,8 @@ const getSucceededStatusChange = (props: Partial = {}): Rule // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -99,8 +98,8 @@ const getExecutionMetricsEvent = (props: Partial = {}): Rule // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.debug, - type: RuleExecutionEventType['execution-metrics'], + level: LogLevelEnum.debug, + type: RuleExecutionEventTypeEnum['execution-metrics'], }; }; @@ -120,7 +119,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:06.806Z', sequence: 6, - level: LogLevel.debug, + level: LogLevelEnum.debug, message: 'Rule execution started', }), getFailedStatusChange({ @@ -138,7 +137,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:02.806Z', sequence: 2, - level: LogLevel.error, + level: LogLevelEnum.error, message: 'Some error', }), getRunningStatusChange({ @@ -148,7 +147,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:00.806Z', sequence: 0, - level: LogLevel.debug, + level: LogLevelEnum.debug, message: 'Rule execution started', }), ]; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml new file mode 100644 index 0000000000000..d49a49d222401 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml @@ -0,0 +1,49 @@ +openapi: '3.0.0' +info: + title: Execution Event Schema + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + LogLevel: + type: string + enum: ['trace', 'debug', 'info', 'warn', 'error'] + + RuleExecutionEventType: + type: string + enum: ['message', 'status-change', 'execution-metrics'] + description: |- + Type of a plain rule execution event: + - message: Simple log message of some log level, such as debug, info or error. + - status-change: We log an event of this type each time a rule changes its status during an execution. + - execution-metrics: We log an event of this type at the end of a rule execution. It contains various execution metrics such as search and indexing durations. + + RuleExecutionEvent: + type: object + properties: + timestamp: + type: string + format: date-time + sequence: + type: integer + level: + $ref: '#/components/schemas/LogLevel' + type: + $ref: '#/components/schemas/RuleExecutionEventType' + execution_id: + type: string + minLength: 1 + message: + type: string + required: + - timestamp + - sequence + - level + - type + - execution_id + - message + description: |- + Plain rule execution event. A rule can write many of them during each execution. Events can be of different types and log levels. + + NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a subset of their fields: only those fields that are common to all types of execution events. diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts deleted file mode 100644 index 64acfb01e2e2a..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts +++ /dev/null @@ -1,61 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import { enumeration, IsoDateString, NonEmptyString } from '@kbn/securitysolution-io-ts-types'; -import { enumFromString } from '../../../../utils/enum_from_string'; -import { TLogLevel } from './log_level'; - -/** - * Type of a plain rule execution event. - */ -export enum RuleExecutionEventType { - /** - * Simple log message of some log level, such as debug, info or error. - */ - 'message' = 'message', - - /** - * We log an event of this type each time a rule changes its status during an execution. - */ - 'status-change' = 'status-change', - - /** - * We log an event of this type at the end of a rule execution. It contains various execution - * metrics such as search and indexing durations. - */ - 'execution-metrics' = 'execution-metrics', -} - -export const TRuleExecutionEventType = enumeration( - 'RuleExecutionEventType', - RuleExecutionEventType -); - -/** - * An array of supported types of rule execution events. - */ -export const RULE_EXECUTION_EVENT_TYPES = Object.values(RuleExecutionEventType); - -export const ruleExecutionEventTypeFromString = enumFromString(RuleExecutionEventType); - -/** - * Plain rule execution event. A rule can write many of them during each execution. Events can be - * of different types and log levels. - * - * NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a - * subset of their fields: only those fields that are common to all types of execution events. - */ -export type RuleExecutionEvent = t.TypeOf; -export const RuleExecutionEvent = t.type({ - timestamp: IsoDateString, - sequence: t.number, - level: TLogLevel, - type: TRuleExecutionEventType, - execution_id: NonEmptyString, - message: t.string, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts index 235437cc5ed68..67aac49310a7d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts @@ -15,16 +15,19 @@ import { z } from 'zod'; export type RuleExecutionMetrics = z.infer; export const RuleExecutionMetrics = z.object({ /** - * Total time spent searching for events + * Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response */ total_search_duration_ms: z.number().int().min(0).optional(), /** - * Total time spent indexing alerts + * Total time spent indexing documents during current rule execution cycle */ total_indexing_duration_ms: z.number().int().min(0).optional(), + /** + * Total time spent enriching documents during current rule execution cycle + */ total_enrichment_duration_ms: z.number().int().min(0).optional(), /** - * Time gap between last execution and current execution + * Duration in seconds of execution gap */ execution_gap_duration_s: z.number().int().min(0).optional(), }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml index 7e04ef38a0a87..985da08e1df88 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml @@ -10,17 +10,18 @@ components: type: object properties: total_search_duration_ms: - description: Total time spent searching for events + description: Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response type: integer minimum: 0 total_indexing_duration_ms: - description: Total time spent indexing alerts + description: Total time spent indexing documents during current rule execution cycle type: integer minimum: 0 total_enrichment_duration_ms: + description: Total time spent enriching documents during current rule execution cycle type: integer minimum: 0 execution_gap_duration_s: - description: Time gap between last execution and current execution + description: Duration in seconds of execution gap type: integer minimum: 0 diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts deleted file mode 100644 index b15c76119e441..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts +++ /dev/null @@ -1,28 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; - -export type DurationMetric = t.TypeOf; -export const DurationMetric = PositiveInteger; - -export type RuleExecutionMetrics = t.TypeOf; - -/** - @property total_search_duration_ms - "total time spent performing ES searches as measured by Kibana; - includes network latency and time spent serializing/deserializing request/response", - @property total_indexing_duration_ms - "total time spent indexing documents during current rule execution cycle", - @property total_enrichment_duration_ms - total time spent enriching documents during current rule execution cycle - @property execution_gap_duration_s - "duration in seconds of execution gap" -*/ -export const RuleExecutionMetrics = t.partial({ - total_search_duration_ms: DurationMetric, - total_indexing_duration_ms: DurationMetric, - total_enrichment_duration_ms: DurationMetric, - execution_gap_duration_s: DurationMetric, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts index ae031191fd74d..903912b39cbb2 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts @@ -6,14 +6,10 @@ */ import type { RuleLastRunOutcomes } from '@kbn/alerting-plugin/common'; -import { enumeration } from '@kbn/securitysolution-io-ts-types'; import { assertUnreachable } from '../../../../utility_types'; import type { RuleExecutionStatus, RuleExecutionStatusOrder } from './execution_status.gen'; import { RuleExecutionStatusEnum } from './execution_status.gen'; -// TODO remove after the migration to Zod is done -export const TRuleExecutionStatus = enumeration('RuleExecutionStatus', RuleExecutionStatusEnum); - export const ruleExecutionStatusToNumber = ( status: RuleExecutionStatus ): RuleExecutionStatusOrder => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts index 59482e759f902..5ffc034edd172 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts @@ -6,7 +6,7 @@ */ import { RuleExecutionStatusEnum } from './execution_status.gen'; -import type { RuleExecutionSummary } from './execution_summary'; +import type { RuleExecutionSummary } from './execution_summary.gen'; const getSummarySucceeded = (): RuleExecutionSummary => ({ last_execution: { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts deleted file mode 100644 index a747d2f021b7c..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts +++ /dev/null @@ -1,22 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { IsoDateString } from '@kbn/securitysolution-io-ts-types'; -import * as t from 'io-ts'; -import { RuleExecutionMetrics } from './execution_metrics'; -import { TRuleExecutionStatus } from './execution_status'; - -export type RuleExecutionSummary = t.TypeOf; -export const RuleExecutionSummary = t.type({ - last_execution: t.type({ - date: IsoDateString, - status: TRuleExecutionStatus, - status_order: t.number, - message: t.string, - metrics: RuleExecutionMetrics, - }), -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts index b4f003cf48228..7fbb16e206197 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -export * from './execution_event'; -export * from './execution_metrics'; +export * from './execution_event.gen'; +export * from './execution_metrics.gen'; export * from './execution_result.gen'; export * from './execution_settings'; export * from './execution_status.gen'; -export * from './execution_summary'; +export * from './execution_summary.gen'; export * from './log_level'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts index 495589b3cd432..e7004455160bd 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts @@ -5,42 +5,31 @@ * 2.0. */ -import { enumeration } from '@kbn/securitysolution-io-ts-types'; -import { enumFromString } from '../../../../utils/enum_from_string'; import { assertUnreachable } from '../../../../utility_types'; import type { RuleExecutionStatus } from './execution_status.gen'; import { RuleExecutionStatusEnum } from './execution_status.gen'; - -export enum LogLevel { - 'trace' = 'trace', - 'debug' = 'debug', - 'info' = 'info', - 'warn' = 'warn', - 'error' = 'error', -} - -export const TLogLevel = enumeration('LogLevel', LogLevel); +import { LogLevel, LogLevelEnum } from './execution_event.gen'; /** * An array of supported log levels. */ -export const LOG_LEVELS = Object.values(LogLevel); +export const LOG_LEVELS = LogLevel.options; -export const logLevelToNumber = (level: keyof typeof LogLevel | null | undefined): number => { +export const logLevelToNumber = (level: LogLevel | null | undefined): number => { if (!level) { return 0; } switch (level) { - case 'trace': + case LogLevelEnum.trace: return 0; - case 'debug': + case LogLevelEnum.debug: return 10; - case 'info': + case LogLevelEnum.info: return 20; - case 'warn': + case LogLevelEnum.warn: return 30; - case 'error': + case LogLevelEnum.error: return 40; default: assertUnreachable(level); @@ -50,34 +39,32 @@ export const logLevelToNumber = (level: keyof typeof LogLevel | null | undefined export const logLevelFromNumber = (num: number | null | undefined): LogLevel => { if (num === null || num === undefined || num < 10) { - return LogLevel.trace; + return LogLevelEnum.trace; } if (num < 20) { - return LogLevel.debug; + return LogLevelEnum.debug; } if (num < 30) { - return LogLevel.info; + return LogLevelEnum.info; } if (num < 40) { - return LogLevel.warn; + return LogLevelEnum.warn; } - return LogLevel.error; + return LogLevelEnum.error; }; -export const logLevelFromString = enumFromString(LogLevel); - export const logLevelFromExecutionStatus = (status: RuleExecutionStatus): LogLevel => { switch (status) { case RuleExecutionStatusEnum['going to run']: case RuleExecutionStatusEnum.running: case RuleExecutionStatusEnum.succeeded: - return LogLevel.info; + return LogLevelEnum.info; case RuleExecutionStatusEnum['partial failure']: - return LogLevel.warn; + return LogLevelEnum.warn; case RuleExecutionStatusEnum.failed: - return LogLevel.error; + return LogLevelEnum.error; default: assertUnreachable(status); - return LogLevel.trace; + return LogLevelEnum.trace; } }; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts index 751e571aae3fd..352a8cbdf89b0 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts @@ -6,48 +6,43 @@ */ import { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. */ -import { RuleExecutionStatus } from '../../model/execution_status.gen'; import { - SortFieldOfRuleExecutionResult, - RuleExecutionResult, -} from '../../model/execution_result.gen'; + RuleExecutionEventType, + LogLevel, + RuleExecutionEvent, +} from '../../model/execution_event.gen'; import { SortOrder } from '../../../model/sorting.gen'; +import { PaginationResult } from '../../../model/pagination.gen'; export type GetRuleExecutionEventsRequestQuery = z.infer; export const GetRuleExecutionEventsRequestQuery = z.object({ /** - * Start date of the time range to query + * Include events of matching the search term. If omitted, all events will be included. */ - start: z.string().datetime(), + search_term: z.string().optional(), /** - * End date of the time range to query + * Include events of the specified types. If omitted, all types of events will be included. */ - end: z.string().datetime(), + event_types: ArrayFromString(RuleExecutionEventType).optional().default([]), /** - * Query text to filter results by + * Include events having these log levels. If omitted, events of all levels will be included. */ - query_text: z.string().optional().default(''), + log_levels: ArrayFromString(LogLevel).optional().default([]), /** - * Comma-separated list of rule execution statuses to filter results by + * Start date of the time range to query */ - status_filters: z - .preprocess( - (value: unknown) => - typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, - z.array(RuleExecutionStatus) - ) - .optional() - .default([]), + date_start: z.string().datetime().optional(), /** - * Field to sort results by + * End date of the time range to query */ - sort_field: SortFieldOfRuleExecutionResult.optional().default('timestamp'), + date_end: z.string().datetime().optional(), /** * Sort order to sort results by */ @@ -69,9 +64,6 @@ export type GetRuleExecutionEventsRequestParams = z.infer< typeof GetRuleExecutionEventsRequestParams >; export const GetRuleExecutionEventsRequestParams = z.object({ - /** - * Saved object ID of the rule to get execution results for - */ ruleId: z.string().min(1), }); export type GetRuleExecutionEventsRequestParamsInput = z.input< @@ -80,6 +72,6 @@ export type GetRuleExecutionEventsRequestParamsInput = z.input< export type GetRuleExecutionEventsResponse = z.infer; export const GetRuleExecutionEventsResponse = z.object({ - events: z.array(RuleExecutionResult).optional(), - total: z.number().int().optional(), + events: z.array(RuleExecutionEvent), + pagination: PaginationResult, }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts index b46f8d9b13870..e730350215f8e 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts @@ -6,7 +6,7 @@ */ import { ruleExecutionEventMock } from '../../model/execution_event.mock'; -import type { GetRuleExecutionEventsResponse } from './get_rule_execution_events_route'; +import type { GetRuleExecutionEventsResponse } from './get_rule_execution_events_route.gen'; const getSomeResponse = (): GetRuleExecutionEventsResponse => { const events = ruleExecutionEventMock.getSomeEvents(); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml index 677213bae4f2e..990ea4ef64876 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml @@ -14,47 +14,47 @@ paths: - name: ruleId in: path required: true - description: Saved object ID of the rule to get execution results for schema: type: string minLength: 1 - - name: start + - name: search_term in: query - required: true - description: Start date of the time range to query - schema: - type: string - format: date-time - - name: end - in: query - required: true - description: End date of the time range to query + required: false + description: Include events of matching the search term. If omitted, all events will be included. schema: type: string - format: date-time - - name: query_text + - name: event_types in: query required: false - description: Query text to filter results by + description: Include events of the specified types. If omitted, all types of events will be included. schema: - type: string - default: '' - - name: status_filters + type: array + items: + $ref: '../../model/execution_event.schema.yaml#/components/schemas/RuleExecutionEventType' + default: [] + - name: log_levels in: query required: false - description: Comma-separated list of rule execution statuses to filter results by + description: Include events having these log levels. If omitted, events of all levels will be included. schema: type: array items: - $ref: '../../model/execution_status.schema.yaml#/components/schemas/RuleExecutionStatus' + $ref: '../../model/execution_event.schema.yaml#/components/schemas/LogLevel' default: [] - - name: sort_field + - name: date_start in: query required: false - description: Field to sort results by + description: Start date of the time range to query schema: - $ref: '../../model/execution_result.schema.yaml#/components/schemas/SortFieldOfRuleExecutionResult' - default: timestamp + type: string + format: date-time + - name: date_end + in: query + required: false + description: End date of the time range to query + schema: + type: string + format: date-time - name: sort_order in: query required: false @@ -87,6 +87,9 @@ paths: events: type: array items: - $ref: '../../model/execution_result.schema.yaml#/components/schemas/RuleExecutionResult' - total: - type: integer + $ref: '../../model/execution_event.schema.yaml#/components/schemas/RuleExecutionEvent' + pagination: + $ref: '../../../model/pagination.schema.yaml#/components/schemas/PaginationResult' + required: + - events + - pagination diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts index ecf94032039ac..5f73b6109e820 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts @@ -5,14 +5,11 @@ * 2.0. */ -import { pipe } from 'fp-ts/lib/pipeable'; -import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - +import { expectParseError, expectParseSuccess } from '@kbn/zod-helpers'; import { GetRuleExecutionEventsRequestParams, GetRuleExecutionEventsRequestQuery, -} from './get_rule_execution_events_route'; +} from './get_rule_execution_events_route.gen'; describe('Request schema of Get rule execution events', () => { describe('GetRuleExecutionEventsRequestParams', () => { @@ -22,11 +19,10 @@ describe('Request schema of Get rule execution events', () => { ruleId: 'some id', }; - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseSuccess(results); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual( + expect(results.data).toEqual( expect.objectContaining({ ruleId: 'some id', }) @@ -39,23 +35,21 @@ describe('Request schema of Get rule execution events', () => { foo: 'bar', // this one is not in the schema and will be stripped }; - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseSuccess(results); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ - ruleId: 'some id', - }); + expect(results.data).toEqual( + expect.objectContaining({ + ruleId: 'some id', + }) + ); }); }); describe('Validation fails', () => { const test = (input: unknown) => { - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors)).length).toBeGreaterThan(0); - expect(message.schema).toEqual({}); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseError(results); }; it('when not all the required parameters are passed', () => { @@ -84,11 +78,10 @@ describe('Request schema of Get rule execution events', () => { per_page: 6, }; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + expect(result.data).toEqual({ event_types: ['message', 'status-change'], log_levels: ['debug', 'info', 'error'], sort_order: 'asc', @@ -107,11 +100,10 @@ describe('Request schema of Get rule execution events', () => { foo: 'bar', // this one is not in the schema and will be stripped }; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + expect(result.data).toEqual({ event_types: ['message', 'status-change'], log_levels: ['debug', 'info', 'error'], sort_order: 'asc', @@ -119,25 +111,12 @@ describe('Request schema of Get rule execution events', () => { per_page: 6, }); }); - - it('when no parameters are passed (all are have default values)', () => { - const input = {}; - - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(expect.any(Object)); - }); }); describe('Validation fails', () => { const test = (input: unknown) => { - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors)).length).toBeGreaterThan(0); - expect(message.schema).toEqual({}); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseError(result); }; it('when invalid parameters are passed', () => { @@ -147,21 +126,18 @@ describe('Request schema of Get rule execution events', () => { }); }); - describe('Validation sets default values', () => { - it('when optional parameters are not passed', () => { - const input = {}; + it('Validation sets default values when optional parameters are not passed', () => { + const input = {}; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ - event_types: [], - log_levels: [], - sort_order: 'desc', - page: 1, - per_page: 20, - }); + expect(result.data).toEqual({ + event_types: [], + log_levels: [], + sort_order: 'desc', + page: 1, + per_page: 20, }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts deleted file mode 100644 index 628e71cf51790..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts +++ /dev/null @@ -1,60 +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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; - -import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; -import { defaultCsvArray, IsoDateString, NonEmptyString } from '@kbn/securitysolution-io-ts-types'; - -import { DefaultSortOrderDesc, PaginationResult } from '../../../model'; -import { RuleExecutionEvent, TRuleExecutionEventType, TLogLevel } from '../../model'; - -/** - * URL path parameters of the API route. - */ -export type GetRuleExecutionEventsRequestParams = t.TypeOf< - typeof GetRuleExecutionEventsRequestParams ->; -export const GetRuleExecutionEventsRequestParams = t.exact( - t.type({ - ruleId: NonEmptyString, - }) -); - -/** - * Query string parameters of the API route. - */ -export type GetRuleExecutionEventsRequestQuery = t.TypeOf< - typeof GetRuleExecutionEventsRequestQuery ->; -export const GetRuleExecutionEventsRequestQuery = t.exact( - t.intersection([ - t.partial({ - search_term: NonEmptyString, - event_types: defaultCsvArray(TRuleExecutionEventType), - log_levels: defaultCsvArray(TLogLevel), - date_start: IsoDateString, - date_end: IsoDateString, - }), - t.type({ - sort_order: DefaultSortOrderDesc, // defaults to 'desc' - page: DefaultPage, // defaults to 1 - per_page: DefaultPerPage, // defaults to 20 - }), - ]) -); - -/** - * Response body of the API route. - */ -export type GetRuleExecutionEventsResponse = t.TypeOf; -export const GetRuleExecutionEventsResponse = t.exact( - t.type({ - events: t.array(RuleExecutionEvent), - pagination: PaginationResult, - }) -); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts index 442c45f3e8dc9..cb8e2f1d8ffa5 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -38,14 +39,7 @@ export const GetRuleExecutionResultsRequestQuery = z.object({ /** * Comma-separated list of rule execution statuses to filter results by */ - status_filters: z - .preprocess( - (value: unknown) => - typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, - z.array(RuleExecutionStatus) - ) - .optional() - .default([]), + status_filters: ArrayFromString(RuleExecutionStatus).optional().default([]), /** * Field to sort results by */ diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts index dd1ecc4208ef7..9089efeb87d05 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts @@ -8,9 +8,6 @@ import * as t from 'io-ts'; import { PositiveInteger, PositiveIntegerGreaterThanZero } from '@kbn/securitysolution-io-ts-types'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { IndexPatternArray } from '../../model/rule_schema_legacy'; export const signalsReindexOptions = t.partial({ requests_per_second: t.number, @@ -23,7 +20,7 @@ export type SignalsReindexOptions = t.TypeOf; export const createSignalsMigrationSchema = t.intersection([ t.exact( t.type({ - index: IndexPatternArray, + index: t.array(t.string), }) ), t.exact(signalsReindexOptions), diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/api.ts b/x-pack/plugins/security_solution/common/api/timeline/model/api.ts index 864b4613857e2..c423b2a4418bb 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/model/api.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/api.ts @@ -21,7 +21,7 @@ import { SavedObjectResolveAliasTargetId, SavedObjectResolveOutcome, } from '../../detection_engine/model/rule_schema_legacy'; -import { ErrorSchema, success, success_count as successCount } from '../../detection_engine'; +import { ErrorSchema } from './error_schema'; export const BareNoteSchema = runtimeTypes.intersection([ runtimeTypes.type({ @@ -497,8 +497,8 @@ export interface ExportTimelineNotFoundError { export const importTimelineResultSchema = runtimeTypes.exact( runtimeTypes.type({ - success, - success_count: successCount, + success: runtimeTypes.boolean, + success_count: PositiveInteger, timelines_installed: PositiveInteger, timelines_updated: PositiveInteger, errors: runtimeTypes.array(ErrorSchema), diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts new file mode 100644 index 0000000000000..7c24d605d5f98 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts @@ -0,0 +1,17 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { ErrorSchema } from './error_schema'; + +export const getErrorSchemaMock = ( + id: string = '819eded6-e9c8-445b-a647-519aea39e063' +): ErrorSchema => ({ + id, + error: { + status_code: 404, + message: 'id: "819eded6-e9c8-445b-a647-519aea39e063" not found', + }, +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts similarity index 93% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts rename to x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts index 164f5ee854efc..8326479db9c14 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts @@ -8,9 +8,7 @@ import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { ErrorSchema } from './error_schema_legacy'; +import { ErrorSchema } from './error_schema'; import { getErrorSchemaMock } from './error_schema.mock'; describe('error_schema', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts similarity index 69% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts rename to x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts index c2efee05269c1..a0ac17765c3a8 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts @@ -5,22 +5,16 @@ * 2.0. */ -import { NonEmptyString } from '@kbn/securitysolution-io-ts-types'; +import { NonEmptyString, PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { RuleSignatureId } from './rule_schema_legacy'; - -import { status_code, message } from './schemas'; - // We use id: t.string intentionally and _never_ the id from global schemas as // sometimes echo back out the id that the user gave us and it is not guaranteed // to be a UUID but rather just a string const partial = t.exact( t.partial({ id: t.string, - rule_id: RuleSignatureId, + rule_id: NonEmptyString, list_id: NonEmptyString, item_id: NonEmptyString, }) @@ -28,8 +22,8 @@ const partial = t.exact( const required = t.exact( t.type({ error: t.type({ - status_code, - message, + status_code: PositiveInteger, + message: t.string, }), }) ); diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts index 6bdce7573ed4c..1e2db97225580 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts @@ -17,8 +17,8 @@ import type { ResponseAction, RuleResponseAction, } from '../api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../api/detection_engine/model/rule_response_actions'; -import type { NormalizedRuleAction } from '../api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { ResponseActionTypesEnum } from '../api/detection_engine/model/rule_response_actions'; +import type { NormalizedRuleAction } from '../api/detection_engine/rule_management'; import type { RuleAction } from '@kbn/alerting-plugin/common'; describe('transform_actions', () => { @@ -93,7 +93,7 @@ describe('transform_actions', () => { }); test('it should transform ResponseAction[] to RuleResponseAction[]', () => { const ruleAction: ResponseAction = { - action_type_id: RESPONSE_ACTION_TYPES.OSQUERY, + action_type_id: ResponseActionTypesEnum['.osquery'], params: { ecs_mapping: {}, saved_query_id: undefined, @@ -117,7 +117,7 @@ describe('transform_actions', () => { test('it should transform RuleResponseAction[] to ResponseAction[]', () => { const alertAction: RuleResponseAction = { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ecsMapping: {}, savedQueryId: undefined, diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts index 5750f35d893e2..1f3727e6e4e0b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts @@ -7,12 +7,12 @@ import type { RuleAction as AlertingRuleAction } from '@kbn/alerting-plugin/common'; import type { NormalizedAlertAction } from '@kbn/alerting-plugin/server/rules_client'; -import type { NormalizedRuleAction } from '../api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { NormalizedRuleAction } from '../api/detection_engine/rule_management'; import type { ResponseAction, RuleResponseAction, } from '../api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../api/detection_engine/model/rule_response_actions'; import type { RuleAction } from '../api/detection_engine/model'; export const transformRuleToAlertAction = ({ @@ -63,7 +63,12 @@ export const transformNormalizedRuleToAlertAction = ({ group, id, params: params as AlertingRuleAction['params'], - ...(alertsFilter && { alertsFilter }), + ...(alertsFilter && { + // We use "unknown" as the alerts filter type which is stricter than the one + // used in the alerting plugin (what they use is essentially "any"). So we + // have to to cast here + alertsFilter: alertsFilter as AlertingRuleAction['alertsFilter'], + }), ...(frequency && { frequency }), }); @@ -85,7 +90,7 @@ export const transformRuleToAlertResponseAction = ({ action_type_id: actionTypeId, params, }: ResponseAction): RuleResponseAction => { - if (actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (actionTypeId === ResponseActionTypesEnum['.osquery']) { const { saved_query_id: savedQueryId, ecs_mapping: ecsMapping, @@ -113,7 +118,7 @@ export const transformAlertToRuleResponseAction = ({ actionTypeId, params, }: RuleResponseAction): ResponseAction => { - if (actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (actionTypeId === ResponseActionTypesEnum['.osquery']) { const { savedQueryId, ecsMapping, packId, ...rest } = params; return { params: { diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts b/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts index 6058f60e1e1c6..c05ca782aface 100644 --- a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts +++ b/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts @@ -6,9 +6,6 @@ */ import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DataViewId } from '../../api/detection_engine/model/rule_schema_legacy'; import { afterKeysSchema } from '../after_keys'; import { identifierTypeSchema } from '../identifier_types'; import { riskWeightsSchema } from '../risk_weights/schema'; @@ -16,7 +13,7 @@ import { riskWeightsSchema } from '../risk_weights/schema'; export const riskScoreCalculationRequestSchema = t.exact( t.intersection([ t.type({ - data_view_id: DataViewId, + data_view_id: t.string, identifier_type: identifierTypeSchema, range: t.type({ start: t.string, diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts b/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts index c440248311636..76ee6a303532b 100644 --- a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts +++ b/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts @@ -6,9 +6,6 @@ */ import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DataViewId } from '../../api/detection_engine/model/rule_schema_legacy'; import { afterKeysSchema } from '../after_keys'; import { identifierTypeSchema } from '../identifier_types'; import { rangeSchema } from '../range'; @@ -17,7 +14,7 @@ import { riskWeightsSchema } from '../risk_weights/schema'; export const riskScorePreviewRequestSchema = t.exact( t.intersection([ t.type({ - data_view_id: DataViewId, + data_view_id: t.string, }), t.partial({ after_keys: afterKeysSchema, diff --git a/x-pack/plugins/security_solution/common/types/response_actions/index.ts b/x-pack/plugins/security_solution/common/types/response_actions/index.ts index 07124b6bc5e45..35333bdc54eb7 100644 --- a/x-pack/plugins/security_solution/common/types/response_actions/index.ts +++ b/x-pack/plugins/security_solution/common/types/response_actions/index.ts @@ -13,7 +13,7 @@ export interface RawEventData { _index: string; } -export enum RESPONSE_ACTION_TYPES { +export enum ResponseActionTypesEnum { OSQUERY = '.osquery', ENDPOINT = '.endpoint', } @@ -34,7 +34,7 @@ export interface ExpandedEventFieldsObject { type RuleParameters = Array<{ response_actions: Array<{ - action_type_id: RESPONSE_ACTION_TYPES; + action_type_id: ResponseActionTypesEnum; params: Record; }>; }>; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx index 289561c0bc4aa..274c649ece9dc 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx @@ -20,7 +20,7 @@ import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_fe import { useKibana } from '../../lib/kibana'; import { EventsViewType } from './event_details'; import * as i18n from './translations'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; const TabContentWrapper = styled.div` height: 100%; @@ -71,7 +71,7 @@ export const useOsqueryTab = ({ } const osqueryResponseActions = responseActions.filter( - (responseAction) => responseAction.action_type_id === RESPONSE_ACTION_TYPES.OSQUERY + (responseAction) => responseAction.action_type_id === ResponseActionTypesEnum['.osquery'] ); if (!osqueryResponseActions?.length) { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts index 9e09a1754a04d..226d0a2bd16ed 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts @@ -16,9 +16,9 @@ import { getRulesSchemaMock, } from '../../../../common/api/detection_engine/model/rule_schema/mocks'; import { - BulkActionType, - BulkActionEditType, -} from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; + BulkActionTypeEnum, + BulkActionEditTypeEnum, +} from '../../../../common/api/detection_engine/rule_management'; import { rulesMock } from '../logic/mock'; import type { FindRulesReferencedByExceptionsListProp } from '../logic/types'; @@ -701,7 +701,9 @@ describe('Detections Rules API', () => { }); test('passes a query', async () => { - await performBulkAction({ bulkAction: { type: BulkActionType.enable, query: 'some query' } }); + await performBulkAction({ + bulkAction: { type: BulkActionTypeEnum.enable, query: 'some query' }, + }); expect(fetchMock).toHaveBeenCalledWith( '/api/detection_engine/rules/_bulk_action', @@ -720,7 +722,7 @@ describe('Detections Rules API', () => { test('passes ids', async () => { await performBulkAction({ - bulkAction: { type: BulkActionType.disable, ids: ['ruleId1', 'ruleId2'] }, + bulkAction: { type: BulkActionTypeEnum.disable, ids: ['ruleId1', 'ruleId2'] }, }); expect(fetchMock).toHaveBeenCalledWith( @@ -741,10 +743,10 @@ describe('Detections Rules API', () => { test('passes edit payload', async () => { await performBulkAction({ bulkAction: { - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ids: ['ruleId1'], editPayload: [ - { type: BulkActionEditType.add_index_patterns, value: ['some-index-pattern'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['some-index-pattern'] }, ], }, }); @@ -767,7 +769,7 @@ describe('Detections Rules API', () => { test('executes dry run', async () => { await performBulkAction({ - bulkAction: { type: BulkActionType.disable, query: 'some query' }, + bulkAction: { type: BulkActionTypeEnum.disable, query: 'some query' }, dryRun: true, }); @@ -787,7 +789,7 @@ describe('Detections Rules API', () => { test('returns result', async () => { const result = await performBulkAction({ bulkAction: { - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, query: 'some query', }, }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts index 860e0fc86e850..70f0a56ef74cd 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts @@ -27,12 +27,16 @@ import type { ReviewRuleInstallationResponseBody, } from '../../../../common/api/detection_engine/prebuilt_rules'; import type { + BulkDuplicateRules, + BulkActionEditPayload, + BulkActionType, CoverageOverviewResponse, GetRuleManagementFiltersResponse, } from '../../../../common/api/detection_engine/rule_management'; import { RULE_MANAGEMENT_FILTERS_URL, RULE_MANAGEMENT_COVERAGE_OVERVIEW_URL, + BulkActionTypeEnum, } from '../../../../common/api/detection_engine/rule_management'; import type { BulkActionsDryRunErrCode } from '../../../../common/constants'; import { @@ -54,11 +58,6 @@ import { import type { RulesReferencedByExceptionListsSchema } from '../../../../common/api/detection_engine/rule_exceptions'; import { DETECTION_ENGINE_RULES_EXCEPTIONS_REFERENCE_URL } from '../../../../common/api/detection_engine/rule_exceptions'; -import type { - BulkActionDuplicatePayload, - BulkActionEditPayload, -} from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionType } from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; import type { PreviewResponse, RuleResponse } from '../../../../common/api/detection_engine'; import { KibanaServices } from '../../../common/lib/kibana'; @@ -331,18 +330,18 @@ export type QueryOrIds = { query: string; ids?: undefined } | { query?: undefine type PlainBulkAction = { type: Exclude< BulkActionType, - BulkActionType.edit | BulkActionType.export | BulkActionType.duplicate + BulkActionTypeEnum['edit'] | BulkActionTypeEnum['export'] | BulkActionTypeEnum['duplicate'] >; } & QueryOrIds; type EditBulkAction = { - type: BulkActionType.edit; + type: BulkActionTypeEnum['edit']; editPayload: BulkActionEditPayload[]; } & QueryOrIds; type DuplicateBulkAction = { - type: BulkActionType.duplicate; - duplicatePayload?: BulkActionDuplicatePayload; + type: BulkActionTypeEnum['duplicate']; + duplicatePayload?: BulkDuplicateRules['duplicate']; } & QueryOrIds; export type BulkAction = PlainBulkAction | EditBulkAction | DuplicateBulkAction; @@ -368,9 +367,9 @@ export async function performBulkAction({ action: bulkAction.type, query: bulkAction.query, ids: bulkAction.ids, - edit: bulkAction.type === BulkActionType.edit ? bulkAction.editPayload : undefined, + edit: bulkAction.type === BulkActionTypeEnum.edit ? bulkAction.editPayload : undefined, duplicate: - bulkAction.type === BulkActionType.duplicate ? bulkAction.duplicatePayload : undefined, + bulkAction.type === BulkActionTypeEnum.duplicate ? bulkAction.duplicatePayload : undefined, }; return KibanaServices.get().http.fetch(DETECTION_ENGINE_RULES_BULK_ACTION, { @@ -392,7 +391,7 @@ export type BulkExportResponse = Blob; */ export async function bulkExportRules(queryOrIds: QueryOrIds): Promise { const params = { - action: BulkActionType.export, + action: BulkActionTypeEnum.export, query: queryOrIds.query, ids: queryOrIds.ids, }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts index 1a52bbb0a8194..9e54e41f1b091 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts @@ -7,7 +7,7 @@ import type { UseMutationOptions } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core/public'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import type { BulkActionErrorResponse, BulkActionResponse, PerformBulkActionProps } from '../api'; import { performBulkAction } from '../api'; import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../common/constants'; @@ -59,8 +59,8 @@ export const useBulkActionMutation = ( response?.attributes?.results?.updated ?? error?.body?.attributes?.results?.updated; switch (actionType) { - case BulkActionType.enable: - case BulkActionType.disable: { + case BulkActionTypeEnum.enable: + case BulkActionTypeEnum.disable: { invalidateFetchRuleByIdQuery(); invalidateFetchCoverageOverviewQuery(); if (updatedRules) { @@ -72,7 +72,7 @@ export const useBulkActionMutation = ( } break; } - case BulkActionType.delete: + case BulkActionTypeEnum.delete: invalidateFindRulesQuery(); invalidateFetchRuleByIdQuery(); invalidateFetchRuleManagementFilters(); @@ -81,12 +81,12 @@ export const useBulkActionMutation = ( invalidateFetchPrebuiltRulesUpgradeReviewQuery(); invalidateFetchCoverageOverviewQuery(); break; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: invalidateFindRulesQuery(); invalidateFetchRuleManagementFilters(); invalidateFetchCoverageOverviewQuery(); break; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: if (updatedRules) { // We have a list of updated rules, no need to invalidate all updateRulesCache(updatedRules); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts index 40877d8fcb2fd..99bad79536bd7 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts @@ -6,54 +6,57 @@ */ import type { HTTPError } from '../../../../../common/detection_engine/types'; -import type { BulkActionEditPayload } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { - BulkActionEditType, +import type { + BulkActionEditPayload, BulkActionType, -} from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../common/api/detection_engine/rule_management'; +import { + BulkActionEditTypeEnum, + BulkActionTypeEnum, +} from '../../../../../common/api/detection_engine/rule_management'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { BulkActionResponse, BulkActionSummary } from '../../api/api'; export function summarizeBulkSuccess(action: BulkActionType): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_SUCCESS; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_SUCCESS; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_SUCCESS; - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_SUCCESS; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_SUCCESS; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_SUCCESS; } } export function explainBulkSuccess( - action: Exclude, + action: Exclude, summary: BulkActionSummary ): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return getExportSuccessToastMessage(summary.succeeded, summary.total); - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_SUCCESS_DESCRIPTION(summary.succeeded); } } @@ -67,9 +70,9 @@ export function explainBulkEditSuccess( if ( editPayload.some( (x) => - x.type === BulkActionEditType.add_index_patterns || - x.type === BulkActionEditType.set_index_patterns || - x.type === BulkActionEditType.delete_index_patterns + x.type === BulkActionEditTypeEnum.add_index_patterns || + x.type === BulkActionEditTypeEnum.set_index_patterns || + x.type === BulkActionEditTypeEnum.delete_index_patterns ) ) { return `${i18n.RULES_BULK_EDIT_SUCCESS_DESCRIPTION( @@ -83,22 +86,22 @@ export function explainBulkEditSuccess( export function summarizeBulkError(action: BulkActionType): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_FAILURE; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_FAILURE; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_FAILURE; - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_FAILURE; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_FAILURE; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_FAILURE; } } @@ -112,22 +115,22 @@ export function explainBulkError(action: BulkActionType, error: HTTPError): stri } switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_FAILURE_DESCRIPTION(summary.failed, summary.skipped); } } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts index 1ac62109cc626..968b40c7a6026 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; import { useBulkExportMutation } from '../../api/hooks/use_bulk_export_mutation'; @@ -92,7 +92,7 @@ describe('useBulkExport', () => { expect(setLoadingRules).toHaveBeenCalledWith({ ids: ['ruleId1', 'ruleId2'], - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }); }); @@ -101,7 +101,7 @@ describe('useBulkExport', () => { expect(setLoadingRules).toHaveBeenCalledWith({ ids: [], - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts index 5554ba2296302..651b2b0e4b86c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; import { useBulkExportMutation } from '../../api/hooks/use_bulk_export_mutation'; import { useShowBulkErrorToast } from './use_show_bulk_error_toast'; @@ -24,12 +24,12 @@ export function useBulkExport() { async (queryOrIds: QueryOrIds) => { try { setLoadingRules?.({ - ids: queryOrIds.ids ?? guessRuleIdsForBulkAction(BulkActionType.export), - action: BulkActionType.export, + ids: queryOrIds.ids ?? guessRuleIdsForBulkAction(BulkActionTypeEnum.export), + action: BulkActionTypeEnum.export, }); return await mutateAsync(queryOrIds); } catch (error) { - showBulkErrorToast({ actionType: BulkActionType.export, error }); + showBulkErrorToast({ actionType: BulkActionTypeEnum.export, error }); } finally { setLoadingRules?.({ ids: [], action: null }); } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts index 94c26b278d1b1..7be106090bcfa 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { downloadBlob } from '../../../../common/utils/download_blob'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import { getExportedRulesCounts } from '../../../rule_management_ui/components/rules_table/helpers'; @@ -27,11 +27,11 @@ export function useDownloadExportedRules() { try { downloadBlob(response, DEFAULT_EXPORT_FILENAME); showBulkSuccessToast({ - actionType: BulkActionType.export, + actionType: BulkActionTypeEnum.export, summary: await getExportedRulesCounts(response), }); } catch (error) { - showBulkErrorToast({ actionType: BulkActionType.export, error }); + showBulkErrorToast({ actionType: BulkActionTypeEnum.export, error }); } }, [showBulkSuccessToast, showBulkErrorToast] diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts index 3c211247b94ec..6309d8b629bc2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../common/lib/telemetry'; import { useBulkActionMutation } from '../../api/hooks/use_bulk_action_mutation'; @@ -61,7 +61,7 @@ describe('useExecuteBulkAction', () => { it('executes bulk action', async () => { const bulkAction = { - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', } as const; @@ -73,7 +73,7 @@ describe('useExecuteBulkAction', () => { describe('state handlers', () => { it('shows success toast upon completion', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }); @@ -84,7 +84,7 @@ describe('useExecuteBulkAction', () => { it('does not shows success toast upon completion if suppressed', async () => { await executeBulkAction( { - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }, { suppressSuccessToast: true } @@ -100,7 +100,7 @@ describe('useExecuteBulkAction', () => { }); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }); @@ -126,31 +126,31 @@ describe('useExecuteBulkAction', () => { it('sets the loading state before execution', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); expect(setLoadingRules).toHaveBeenCalledWith({ ids: ['ruleId1', 'ruleId2'], - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }); }); it('sets the empty loading state before execution when query is set', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', }); expect(setLoadingRules).toHaveBeenCalledWith({ ids: [], - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }); }); it('clears loading state for the processing rules after execution', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); @@ -163,7 +163,7 @@ describe('useExecuteBulkAction', () => { }); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); @@ -174,7 +174,7 @@ describe('useExecuteBulkAction', () => { describe('telemetry', () => { it('sends for enable action', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', }); @@ -184,7 +184,7 @@ describe('useExecuteBulkAction', () => { it('sends for disable action', async () => { await executeBulkAction({ - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, query: 'some query', }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts index 9fbfb0c310f20..0a294647aad3f 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts @@ -9,7 +9,8 @@ import type { NavigateToAppOptions } from '@kbn/core/public'; import { useCallback } from 'react'; import type { BulkActionResponse } from '..'; import { APP_UI_ID } from '../../../../../common/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SecurityPageName } from '../../../../app/types'; import { getEditRuleUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../common/lib/telemetry'; @@ -58,7 +59,7 @@ export const useExecuteBulkAction = (options?: UseExecuteBulkActionOptions) => { actionType: bulkAction.type, summary: response.attributes.summary, editPayload: - bulkAction.type === BulkActionType.edit ? bulkAction.editPayload : undefined, + bulkAction.type === BulkActionTypeEnum.edit ? bulkAction.editPayload : undefined, }); } @@ -83,14 +84,14 @@ export const useExecuteBulkAction = (options?: UseExecuteBulkActionOptions) => { }; function sendTelemetry(action: BulkActionType, response: BulkActionResponse): void { - if (action !== BulkActionType.disable && action !== BulkActionType.enable) { + if (action !== BulkActionTypeEnum.disable && action !== BulkActionTypeEnum.enable) { return; } if (response.attributes.results.updated.some((rule) => rule.immutable)) { track( METRIC_TYPE.COUNT, - action === BulkActionType.enable + action === BulkActionTypeEnum.enable ? TELEMETRY_EVENT.SIEM_RULE_ENABLED : TELEMETRY_EVENT.SIEM_RULE_DISABLED ); @@ -99,7 +100,7 @@ function sendTelemetry(action: BulkActionType, response: BulkActionResponse): vo if (response.attributes.results.updated.some((rule) => !rule.immutable)) { track( METRIC_TYPE.COUNT, - action === BulkActionType.disable + action === BulkActionTypeEnum.disable ? TELEMETRY_EVENT.CUSTOM_RULE_DISABLED : TELEMETRY_EVENT.CUSTOM_RULE_ENABLED ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts index ce262ce940f43..2a1acc7a3d4c8 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts @@ -6,7 +6,8 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; export function useGuessRuleIdsForBulkAction(): (bulkActionType: BulkActionType) => string[] { @@ -16,9 +17,9 @@ export function useGuessRuleIdsForBulkAction(): (bulkActionType: BulkActionType) (bulkActionType: BulkActionType) => { const allRules = rulesTableContext?.state.isAllSelected ? rulesTableContext.state.rules : []; const processingRules = - bulkActionType === BulkActionType.enable + bulkActionType === BulkActionTypeEnum.enable ? allRules.filter((x) => !x.enabled) - : bulkActionType === BulkActionType.disable + : bulkActionType === BulkActionTypeEnum.disable ? allRules.filter((x) => x.enabled) : allRules; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts index 3f9230a36da34..bb72429ad6b0b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts @@ -8,7 +8,7 @@ import { useCallback } from 'react'; import type { HTTPError } from '../../../../../common/detection_engine/types'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; import { explainBulkError, summarizeBulkError } from './translations'; interface ShowBulkErrorToastProps { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts index dfc2ca5dcb918..03113c772818c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts @@ -8,8 +8,11 @@ import { useCallback } from 'react'; import type { BulkActionSummary } from '..'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { BulkActionEditPayload } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkActionEditPayload, + BulkActionType, +} from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { explainBulkEditSuccess, explainBulkSuccess, summarizeBulkSuccess } from './translations'; interface ShowBulkSuccessToastProps { @@ -24,7 +27,7 @@ export function useShowBulkSuccessToast() { return useCallback( ({ actionType, summary, editPayload }: ShowBulkSuccessToastProps) => { const text = - actionType === BulkActionType.edit + actionType === BulkActionTypeEnum.edit ? explainBulkEditSuccess(editPayload ?? [], summary) : explainBulkSuccess(actionType, summary); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts index d44c4effd265f..94a3d47c90ecf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts @@ -5,12 +5,11 @@ * 2.0. */ -import * as t from 'io-ts'; +import * as z from 'zod'; import type { RuleSnooze } from '@kbn/alerting-plugin/common'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; -import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import type { RuleSnoozeSettings } from '@kbn/triggers-actions-ui-plugin/public/types'; import type { WarningSchema } from '../../../../common/api/detection_engine'; import type { RuleExecutionStatus } from '../../../../common/api/detection_engine/rule_monitoring'; @@ -49,11 +48,11 @@ export interface PatchRuleProps { export type Rule = RuleResponse; -export type PaginationOptions = t.TypeOf; -export const PaginationOptions = t.type({ - page: PositiveInteger, - perPage: PositiveInteger, - total: PositiveInteger, +export type PaginationOptions = z.infer; +export const PaginationOptions = z.object({ + page: z.number().int().min(0), + perPage: z.number().int().min(0), + total: z.number().int().min(0), }); export interface FetchRulesProps { @@ -81,8 +80,8 @@ export interface RulesSnoozeSettingsBatchResponse { data: RuleSnoozeSettingsResponse[]; } -export type SortingOptions = t.TypeOf; -export const SortingOptions = t.type({ +export type SortingOptions = z.infer; +export const SortingOptions = z.object({ field: FindRulesSortField, order: SortOrder, }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx index 9e3e9c8b602b1..23bb9106d62cf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx @@ -10,7 +10,7 @@ import { EuiConfirmModal } from '@elastic/eui'; import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; import { BulkActionRuleErrorsList } from './bulk_action_rule_errors_list'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; import type { BulkActionForConfirmation, DryRunResult } from './types'; @@ -20,9 +20,9 @@ const getActionRejectedTitle = ( failedRulesCount: number ) => { switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.BULK_EDIT_CONFIRMATION_REJECTED_TITLE(failedRulesCount); - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.BULK_EXPORT_CONFIRMATION_REJECTED_TITLE(failedRulesCount); default: assertUnreachable(bulkAction); @@ -34,9 +34,9 @@ const getActionConfirmLabel = ( succeededRulesCount: number ) => { switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.BULK_EDIT_CONFIRMATION_CONFIRM(succeededRulesCount); - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.BULK_EXPORT_CONFIRMATION_CONFIRM(succeededRulesCount); default: assertUnreachable(bulkAction); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx index 05a27a17274a1..5b90a457a6bd4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx @@ -13,7 +13,7 @@ import { render, screen } from '@testing-library/react'; import { BulkActionRuleErrorsList } from './bulk_action_rule_errors_list'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; import type { DryRunResult } from './types'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; const Wrapper: FC = ({ children }) => { return ( @@ -26,7 +26,7 @@ const Wrapper: FC = ({ children }) => { describe('Component BulkEditRuleErrorsList', () => { test('should not render component if no errors present', () => { const { container } = render( - , + , { wrapper: Wrapper, } @@ -46,9 +46,12 @@ describe('Component BulkEditRuleErrorsList', () => { ruleIds: ['rule:1'], }, ]; - render(, { - wrapper: Wrapper, - }); + render( + , + { + wrapper: Wrapper, + } + ); expect(screen.getByText("2 rules can't be edited (test failure)")).toBeInTheDocument(); expect(screen.getByText("1 rule can't be edited (another failure)")).toBeInTheDocument(); @@ -80,9 +83,12 @@ describe('Component BulkEditRuleErrorsList', () => { ruleIds: ['rule:1', 'rule:2'], }, ]; - render(, { - wrapper: Wrapper, - }); + render( + , + { + wrapper: Wrapper, + } + ); expect(screen.getByText(value)).toBeInTheDocument(); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx index 674206446f85c..907e67f658bc4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx @@ -10,7 +10,7 @@ import { EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { DryRunResult, BulkActionForConfirmation } from './types'; @@ -132,7 +132,7 @@ const BulkActionRuleErrorsListComponent = ({ {ruleErrors.map(({ message, errorCode, ruleIds }) => { const rulesCount = ruleIds.length; switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return ( ); - case BulkActionType.export: + case BulkActionTypeEnum.export: return ( { switch (editAction) { - case BulkActionEditType.add_index_patterns: - case BulkActionEditType.delete_index_patterns: - case BulkActionEditType.set_index_patterns: + case BulkActionEditTypeEnum.add_index_patterns: + case BulkActionEditTypeEnum.delete_index_patterns: + case BulkActionEditTypeEnum.set_index_patterns: return ; - case BulkActionEditType.add_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.set_tags: return ; - case BulkActionEditType.set_timeline: + case BulkActionEditTypeEnum.set_timeline: return ; - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return ; - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return ; default: diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx index c9d4900e9adc7..e124e23bd0aea 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx @@ -14,8 +14,8 @@ import * as i18n from '../../../../../../detections/pages/detection_engine/rules import { DEFAULT_INDEX_KEY } from '../../../../../../../common/constants'; import { useKibana } from '../../../../../../common/lib/kibana'; -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; +import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management'; import type { FormSchema } from '../../../../../../shared_imports'; import { @@ -31,9 +31,9 @@ import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; const CommonUseField = getUseField({ component: Field }); type IndexPatternsEditActions = - | BulkActionEditType.add_index_patterns - | BulkActionEditType.delete_index_patterns - | BulkActionEditType.set_index_patterns; + | BulkActionEditTypeEnum['add_index_patterns'] + | BulkActionEditTypeEnum['delete_index_patterns'] + | BulkActionEditTypeEnum['set_index_patterns']; interface IndexPatternsFormData { index: string[]; @@ -70,7 +70,7 @@ const initialFormData: IndexPatternsFormData = { }; const getFormConfig = (editAction: IndexPatternsEditActions) => - editAction === BulkActionEditType.add_index_patterns + editAction === BulkActionEditTypeEnum.add_index_patterns ? { indexLabel: i18n.BULK_EDIT_FLYOUT_FORM_ADD_INDEX_PATTERNS_LABEL, indexHelpText: i18n.BULK_EDIT_FLYOUT_FORM_ADD_INDEX_PATTERNS_HELP_TEXT, @@ -115,13 +115,11 @@ const IndexPatternsFormComponent = ({ return; } - const payload = { + onConfirm({ value: data.index, - type: data.overwrite ? BulkActionEditType.set_index_patterns : editAction, + type: data.overwrite ? BulkActionEditTypeEnum.set_index_patterns : editAction, overwrite_data_views: data.overwriteDataViews, - }; - - onConfirm(payload); + }); }; return ( @@ -140,7 +138,7 @@ const IndexPatternsFormComponent = ({ }, }} /> - {editAction === BulkActionEditType.add_index_patterns && ( + {editAction === BulkActionEditTypeEnum.add_index_patterns && ( )} - {editAction === BulkActionEditType.add_index_patterns && ( + {editAction === BulkActionEditTypeEnum.add_index_patterns && ( )} - {editAction === BulkActionEditType.delete_index_patterns && ( + {editAction === BulkActionEditTypeEnum.delete_index_patterns && ( = { const initialFormData: TagsFormData = { tags: [], overwrite: false }; const getFormConfig = (editAction: TagsEditActions) => - editAction === BulkActionEditType.add_tags + editAction === BulkActionEditTypeEnum.add_tags ? { tagsLabel: i18n.BULK_EDIT_FLYOUT_FORM_ADD_TAGS_LABEL, tagsHelpText: i18n.BULK_EDIT_FLYOUT_FORM_ADD_TAGS_HELP_TEXT, @@ -97,12 +97,10 @@ const TagsFormComponent = ({ editAction, rulesCount, onClose, onConfirm }: TagsF return; } - const payload = { + onConfirm({ value: data.tags, - type: data.overwrite ? BulkActionEditType.set_tags : editAction, - }; - - onConfirm(payload); + type: data.overwrite ? BulkActionEditTypeEnum.set_tags : editAction, + }); }; return ( @@ -121,7 +119,7 @@ const TagsFormComponent = ({ editAction, rulesCount, onClose, onConfirm }: TagsF }, }} /> - {editAction === BulkActionEditType.add_tags ? ( + {editAction === BulkActionEditTypeEnum.add_tags ? ( { const timelineTitle = timelineId ? data.timeline.title : ''; onConfirm({ - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts index 000a7e37a9cec..409ee722c6383 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts @@ -6,14 +6,14 @@ */ import type { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import type { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; /** * Only 2 bulk actions are supported for for confirmation dry run modal: * * export * * edit */ -export type BulkActionForConfirmation = BulkActionType.export | BulkActionType.edit; +export type BulkActionForConfirmation = BulkActionTypeEnum['export'] | BulkActionTypeEnum['edit']; /** * transformed results of dry run diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx index a7c5e35ff3341..41802a4738b8d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx @@ -14,11 +14,14 @@ import { euiThemeVars } from '@kbn/ui-theme'; import React, { useCallback } from 'react'; import { convertRulesFilterToKQL } from '../../../../../../common/detection_engine/rule_management/rule_filtering'; import { DuplicateOptions } from '../../../../../../common/detection_engine/rule_management/constants'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; -import { - BulkActionType, +import type { + BulkActionEditPayload, BulkActionEditType, } from '../../../../../../common/api/detection_engine/rule_management'; +import { + BulkActionTypeEnum, + BulkActionEditTypeEnum, +} from '../../../../../../common/api/detection_engine/rule_management'; import { isMlRule } from '../../../../../../common/machine_learning/helpers'; import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { BULK_RULE_ACTIONS } from '../../../../../common/lib/apm/user_actions'; @@ -106,7 +109,7 @@ export const useBulkActions = ({ : disabledRulesNoML.map(({ id }) => id); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ...(isAllSelected ? { query: kql } : { ids: ruleIds }), }); }; @@ -118,7 +121,7 @@ export const useBulkActions = ({ const enabledIds = selectedRules.filter(({ enabled }) => enabled).map(({ id }) => id); await executeBulkAction({ - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, ...(isAllSelected ? { query: kql } : { ids: enabledIds }), }); }; @@ -132,7 +135,7 @@ export const useBulkActions = ({ return; } await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, duplicatePayload: { include_exceptions: modalDuplicationConfirmationResult === DuplicateOptions.withExceptions || @@ -159,7 +162,7 @@ export const useBulkActions = ({ startTransaction({ name: BULK_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ...(isAllSelected ? { query: kql } : { ids: selectedRuleIds }), }); }; @@ -183,7 +186,7 @@ export const useBulkActions = ({ // they can either cancel action or proceed with export of succeeded rules const hasActionBeenConfirmed = await showBulkActionConfirmation( transformExportDetailsToDryRunResult(details), - BulkActionType.export + BulkActionTypeEnum.export ); if (hasActionBeenConfirmed === false) { return; @@ -201,7 +204,7 @@ export const useBulkActions = ({ setIsPreflightInProgress(true); const dryRunResult = await executeBulkActionsDryRun({ - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ...(isAllSelected ? { query: convertRulesFilterToKQL(filterOptions) } : { ids: selectedRuleIds }), @@ -213,7 +216,7 @@ export const useBulkActions = ({ // User has cancelled edit action or there are no custom rules to proceed const hasActionBeenConfirmed = await showBulkActionConfirmation( dryRunResult, - BulkActionType.edit + BulkActionTypeEnum.edit ); if (hasActionBeenConfirmed === false) { return; @@ -264,7 +267,7 @@ export const useBulkActions = ({ }, 5 * 1000); await executeBulkAction({ - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ...prepareSearchParams({ ...(isAllSelected ? { filterOptions } : { selectedRuleIds }), dryRunResult, @@ -330,7 +333,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_ADD_RULE_ACTIONS, 'data-test-subj': 'addRuleActionsBulk', disabled: !hasActionsPrivileges || isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.add_rule_actions), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_rule_actions), toolTipContent: !hasActionsPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -342,7 +345,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_SET_SCHEDULE, 'data-test-subj': 'setScheduleBulk', disabled: isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.set_schedule), + onClick: handleBulkEdit(BulkActionEditTypeEnum.set_schedule), toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -354,7 +357,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_APPLY_TIMELINE_TEMPLATE, 'data-test-subj': 'applyTimelineTemplateBulk', disabled: isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.set_timeline), + onClick: handleBulkEdit(BulkActionEditTypeEnum.set_timeline), toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -407,7 +410,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_ADD_TAGS, name: i18n.BULK_ACTION_ADD_TAGS, 'data-test-subj': 'addTagsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.add_tags), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_tags), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -418,7 +421,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_DELETE_TAGS, name: i18n.BULK_ACTION_DELETE_TAGS, 'data-test-subj': 'deleteTagsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.delete_tags), + onClick: handleBulkEdit(BulkActionEditTypeEnum.delete_tags), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -435,7 +438,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_ADD_INDEX_PATTERNS, name: i18n.BULK_ACTION_ADD_INDEX_PATTERNS, 'data-test-subj': 'addIndexPatternsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.add_index_patterns), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_index_patterns), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -446,7 +449,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS, name: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS, 'data-test-subj': 'deleteIndexPatternsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.delete_index_patterns), + onClick: handleBulkEdit(BulkActionEditTypeEnum.delete_index_patterns), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts index 9ce813fc6d9a2..5ef159bed856b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts @@ -11,11 +11,23 @@ import { useBoolState } from '../../../../../common/hooks/use_bool_state'; import type { DryRunResult, BulkActionForConfirmation } from './types'; +interface BulkActionsConfirmation { + bulkActionsDryRunResult: DryRunResult | undefined; + bulkAction: BulkActionForConfirmation | undefined; + isBulkActionConfirmationVisible: boolean; + showBulkActionConfirmation: ( + result: DryRunResult | undefined, + action: BulkActionForConfirmation + ) => Promise; + cancelBulkActionConfirmation: () => void; + approveBulkActionConfirmation: () => void; +} + /** * hook that controls bulk actions confirmation modal window and its content */ // TODO Why does this hook exist? Consider removing it altogether -export const useBulkActionsConfirmation = () => { +export const useBulkActionsConfirmation = (): BulkActionsConfirmation => { const [bulkAction, setBulkAction] = useState(); const [dryRunResult, setDryRunResult] = useState(); const [isBulkActionConfirmationVisible, showModal, hideModal] = useBoolState(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts index 260e187e46fbe..f2dc15233cb6b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts @@ -10,10 +10,20 @@ import { useAsyncConfirmation } from '../rules_table/use_async_confirmation'; import type { BulkActionEditPayload, BulkActionEditType, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; import { useBoolState } from '../../../../../common/hooks/use_bool_state'; -export const useBulkEditFormFlyout = () => { +interface UseBulkEditFormFlyout { + bulkEditActionType: BulkActionEditType | undefined; + isBulkEditFlyoutVisible: boolean; + handleBulkEditFormConfirm: (data: BulkActionEditPayload) => void; + handleBulkEditFormCancel: () => void; + completeBulkEditForm: ( + editActionType: BulkActionEditType + ) => Promise; +} + +export const useBulkEditFormFlyout = (): UseBulkEditFormFlyout => { const dataFormRef = useRef(null); const [actionType, setActionType] = useState(); const [isBulkEditFlyoutVisible, showBulkEditFlyout, hideBulkEditFlyout] = useBoolState(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts index 3adae50d99adf..0549306036fd2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts @@ -5,19 +5,20 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { computeDryRunEditPayload } from './compute_dry_run_edit_payload'; describe('computeDryRunEditPayload', () => { - test.each([ - [BulkActionEditType.set_index_patterns, []], - [BulkActionEditType.delete_index_patterns, []], - [BulkActionEditType.add_index_patterns, []], - [BulkActionEditType.add_tags, []], - [BulkActionEditType.delete_index_patterns, []], - [BulkActionEditType.set_tags, []], - [BulkActionEditType.set_timeline, { timeline_id: '', timeline_title: '' }], + test.each<[BulkActionEditType, unknown]>([ + [BulkActionEditTypeEnum.set_index_patterns, []], + [BulkActionEditTypeEnum.delete_index_patterns, []], + [BulkActionEditTypeEnum.add_index_patterns, []], + [BulkActionEditTypeEnum.add_tags, []], + [BulkActionEditTypeEnum.delete_index_patterns, []], + [BulkActionEditTypeEnum.set_tags, []], + [BulkActionEditTypeEnum.set_timeline, { timeline_id: '', timeline_title: '' }], ])('should return correct payload for bulk edit action %s', (editAction, value) => { const payload = computeDryRunEditPayload(editAction); expect(payload).toHaveLength(1); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts index d31bbfaa91790..ba5d565e393d0 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts @@ -5,8 +5,11 @@ * 2.0. */ -import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkActionEditPayload, + BulkActionEditType, +} from '../../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../../common/utility_types'; /** @@ -17,9 +20,9 @@ import { assertUnreachable } from '../../../../../../../common/utility_types'; */ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkActionEditPayload[] { switch (editAction) { - case BulkActionEditType.add_index_patterns: - case BulkActionEditType.delete_index_patterns: - case BulkActionEditType.set_index_patterns: + case BulkActionEditTypeEnum.add_index_patterns: + case BulkActionEditTypeEnum.delete_index_patterns: + case BulkActionEditTypeEnum.set_index_patterns: return [ { type: editAction, @@ -27,9 +30,9 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.add_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.set_tags: return [ { type: editAction, @@ -37,7 +40,7 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.set_timeline: + case BulkActionEditTypeEnum.set_timeline: return [ { type: editAction, @@ -45,15 +48,15 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return [ { type: editAction, value: { actions: [] }, }, ]; - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return [ { type: editAction, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx index e27910df0b7e0..fbb81fd0b66f4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx @@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useMemo } from 'react'; import useObservable from 'react-use/lib/useObservable'; import { of } from 'rxjs'; import { siemGuideId } from '../../../../../../../common/guided_onboarding/siem_guide_config'; -import { BulkActionType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { useKibana } from '../../../../../../common/lib/kibana'; import { useFindRulesQuery } from '../../../../../rule_management/api/hooks/use_find_rules_query'; import { useExecuteBulkAction } from '../../../../../rule_management/logic/bulk_actions/use_execute_bulk_action'; @@ -113,7 +113,7 @@ export const RulesManagementTour = () => { const enableDemoRule = useCallback(async () => { if (demoRule) { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: [demoRule.id], }); } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts index 84c23a248a0db..1a4efe7517ac9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts @@ -5,41 +5,45 @@ * 2.0. */ -import * as t from 'io-ts'; -import { enumeration } from '@kbn/securitysolution-io-ts-types'; -import { SortingOptions, PaginationOptions } from '../../../../rule_management/logic'; -import { TRuleExecutionStatus } from '../../../../../../common/api/detection_engine/rule_monitoring/model/execution_status'; +import * as z from 'zod'; +import { RuleExecutionStatus } from '../../../../../../common/api/detection_engine'; +import { PaginationOptions, SortingOptions } from '../../../../rule_management/logic'; export enum RuleSource { Prebuilt = 'prebuilt', Custom = 'custom', } -export type RulesTableSavedFilter = t.TypeOf; -export const RulesTableSavedFilter = t.partial({ - searchTerm: t.string, - source: enumeration('RuleSource', RuleSource), - tags: t.array(t.string), - enabled: t.boolean, - ruleExecutionStatus: TRuleExecutionStatus, -}); - -export type RulesTableSavedSorting = t.TypeOf; -export const RulesTableSavedSorting = t.partial({ - field: SortingOptions.props.field, - order: SortingOptions.props.order, -}); - -export type RulesTableStorageSavedPagination = t.TypeOf; -export const RulesTableStorageSavedPagination = t.partial({ - perPage: PaginationOptions.props.perPage, -}); - -export type RulesTableUrlSavedPagination = t.TypeOf; -export const RulesTableUrlSavedPagination = t.partial({ - page: PaginationOptions.props.page, - perPage: PaginationOptions.props.perPage, -}); +export const RulesTableSavedFilter = z + .object({ + searchTerm: z.string(), + source: z.nativeEnum(RuleSource), + tags: z.array(z.string()), + enabled: z.boolean(), + ruleExecutionStatus: RuleExecutionStatus, + }) + .partial(); + +export type RulesTableSavedFilter = z.infer; + +export const RulesTableSavedSorting = SortingOptions.pick({ + field: true, + order: true, +}).partial(); + +export type RulesTableSavedSorting = z.infer; + +export const RulesTableStorageSavedPagination = PaginationOptions.pick({ + perPage: true, +}).partial(); + +export type RulesTableStorageSavedPagination = z.infer; + +export type RulesTableUrlSavedPagination = z.infer; +export const RulesTableUrlSavedPagination = PaginationOptions.pick({ + page: true, + perPage: true, +}).partial(); export type RulesTableStorageSavedState = RulesTableSavedFilter & RulesTableSavedSorting & diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts index bc1b28ee72a41..3055c9cbdcbba 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts @@ -6,7 +6,7 @@ */ import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; +import { safeParseResult } from '@kbn/zod-helpers'; import { useGetInitialUrlParamValue } from '../../../../../common/utils/global_query_string/helpers'; import { RULES_TABLE_MAX_PAGE_SIZE } from '../../../../../../common/constants'; import { useKibana } from '../../../../../common/lib/kibana'; @@ -57,8 +57,8 @@ function validateState( urlState: RulesTableUrlSavedState | null, storageState: RulesTableStorageSavedState | null ): [RulesTableSavedFilter, RulesTableSavedSorting, RulesTableUrlSavedPagination] { - const [filterFromUrl] = validateNonExact(urlState, RulesTableSavedFilter); - const [filterFromStorage] = validateNonExact(storageState, RulesTableSavedFilter); + const filterFromUrl = safeParseResult(urlState, RulesTableSavedFilter); + const filterFromStorage = safeParseResult(storageState, RulesTableSavedFilter); // We have to expose filter, sorting and pagination objects by explicitly specifying each field // since urlState and/or storageState may contain unnecessary fields (e.g. outdated or explicitly added by user) // and validateNonExact doesn't truncate fields not included in the type RulesTableSavedFilter and etc. @@ -71,15 +71,15 @@ function validateState( filterFromUrl?.ruleExecutionStatus ?? filterFromStorage?.ruleExecutionStatus, }; - const [sortingFromUrl] = validateNonExact(urlState, RulesTableSavedSorting); - const [sortingFromStorage] = validateNonExact(storageState, RulesTableSavedSorting); + const sortingFromUrl = safeParseResult(urlState, RulesTableSavedSorting); + const sortingFromStorage = safeParseResult(storageState, RulesTableSavedSorting); const sorting = { field: sortingFromUrl?.field ?? sortingFromStorage?.field, order: sortingFromUrl?.order ?? sortingFromStorage?.order, - }; + } as const; - const [paginationFromUrl] = validateNonExact(urlState, RulesTableUrlSavedPagination); - const [paginationFromStorage] = validateNonExact(storageState, RulesTableStorageSavedPagination); + const paginationFromUrl = safeParseResult(urlState, RulesTableUrlSavedPagination); + const paginationFromStorage = safeParseResult(storageState, RulesTableStorageSavedPagination); const pagination = { page: paginationFromUrl?.page, // We don't persist page number in the session storage since it may be outdated when restored perPage: paginationFromUrl?.perPage ?? paginationFromStorage?.perPage, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index 3525793caa3a3..acf43ebf2c36e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -16,10 +16,7 @@ import { SecurityPageName, SHOW_RELATED_INTEGRATIONS_SETTING, } from '../../../../../common/constants'; -import type { - DurationMetric, - RuleExecutionSummary, -} from '../../../../../common/api/detection_engine/rule_monitoring'; +import type { RuleExecutionSummary } from '../../../../../common/api/detection_engine/rule_monitoring'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { RuleSnoozeBadge } from '../../../rule_management/components/rule_snooze_badge'; @@ -402,7 +399,7 @@ export const useMonitoringColumns = ({ tooltipContent={i18n.COLUMN_INDEXING_TIMES_TOOLTIP} /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? value.toFixed() : getEmptyTagValue()} @@ -419,7 +416,7 @@ export const useMonitoringColumns = ({ tooltipContent={i18n.COLUMN_QUERY_TIMES_TOOLTIP} /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? value.toFixed() : getEmptyTagValue()} @@ -459,7 +456,7 @@ export const useMonitoringColumns = ({ } /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? moment.duration(value, 'seconds').humanize() : getEmptyTagValue()} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx index 1d9d6ad45c8fa..04fc59da5e027 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx @@ -9,7 +9,7 @@ import type { DefaultItemAction } from '@elastic/eui'; import { EuiToolTip } from '@elastic/eui'; import React from 'react'; import { DuplicateOptions } from '../../../../../common/detection_engine/rule_management/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { useKibana } from '../../../../common/lib/kibana'; @@ -75,7 +75,7 @@ export const useRulesTableActions = ({ return; } const result = await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, ids: [rule.id], duplicatePayload: { include_exceptions: @@ -123,7 +123,7 @@ export const useRulesTableActions = ({ startTransaction({ name: SINGLE_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ids: [rule.id], }); }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx index 3a2424664f8ab..057a75d9a5a51 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx @@ -15,7 +15,7 @@ import React, { } from 'react'; import { invariant } from '../../../../../common/utils/invariant'; import { - BulkActionType, + BulkActionTypeEnum, CoverageOverviewRuleActivity, CoverageOverviewRuleSource, } from '../../../../../common/api/detection_engine'; @@ -114,7 +114,7 @@ export const CoverageOverviewDashboardContextProvider = ({ const enableAllDisabled = useCallback( async (ruleIds: string[]) => { - await executeBulkAction({ type: BulkActionType.enable, ids: ruleIds }); + await executeBulkAction({ type: BulkActionTypeEnum.enable, ids: ruleIds }); }, [executeBulkAction] ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts index b5b8f201f0ff3..a70a9bd66671b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts @@ -10,8 +10,8 @@ import type { GetRuleExecutionResultsResponse, } from '../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../common/api/detection_engine/rule_monitoring'; import type { @@ -30,8 +30,8 @@ export const api: jest.Mocked = { { timestamp: '2021-12-29T10:42:59.996Z', sequence: 0, - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], execution_id: 'execution-id-1', message: 'Rule changed status to "succeeded". Rule execution completed without errors', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts index d1317e2f74252..640cc1a86e423 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts @@ -12,11 +12,12 @@ import type { GetRuleExecutionResultsResponse, } from '../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../common/api/detection_engine/rule_monitoring'; import { api } from './api_client'; +import type { FetchRuleExecutionEventsArgs } from './api_client_interface'; jest.mock('../../../common/lib/kibana'); @@ -74,7 +75,7 @@ describe('Rule Monitoring API Client', () => { const ISO_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; - it.each([ + it.each<[string, Omit, Record]>([ [ 'search term filter', { searchTerm: 'something to search' }, @@ -82,12 +83,12 @@ describe('Rule Monitoring API Client', () => { ], [ 'event types filter', - { eventTypes: [RuleExecutionEventType.message] }, + { eventTypes: [RuleExecutionEventTypeEnum.message] }, { event_types: 'message' }, ], [ 'log level filter', - { logLevels: [LogLevel.warn, LogLevel.error] }, + { logLevels: [LogLevelEnum.warn, LogLevelEnum.error] }, { log_levels: 'warn,error' }, ], [ diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx index 2c87a184f5b1c..5edc079ef5c42 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx @@ -7,8 +7,7 @@ import React, { useCallback } from 'react'; -import type { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; -import { RULE_EXECUTION_EVENT_TYPES } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { EventTypeIndicator } from '../../indicators/event_type_indicator'; import { MultiselectFilter } from '../multiselect_filter'; @@ -28,7 +27,7 @@ const EventTypeFilterComponent: React.FC = ({ selectedItem dataTestSubj="eventTypeFilter" title={i18n.FILTER_TITLE} - items={RULE_EXECUTION_EVENT_TYPES} + items={RuleExecutionEventType.options} selectedItems={selectedItems} onSelectionChange={onChange} renderItem={renderItem} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts index 07b3b3a6b096a..9e86215228078 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts @@ -6,18 +6,19 @@ */ import type { IconType } from '@elastic/eui'; -import { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import type { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { RuleExecutionEventTypeEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { assertUnreachable } from '../../../../../../../common/utility_types'; import * as i18n from './translations'; export const getBadgeIcon = (type: RuleExecutionEventType): IconType => { switch (type) { - case RuleExecutionEventType.message: + case RuleExecutionEventTypeEnum.message: return 'console'; - case RuleExecutionEventType['status-change']: + case RuleExecutionEventTypeEnum['status-change']: return 'dot'; - case RuleExecutionEventType['execution-metrics']: + case RuleExecutionEventTypeEnum['execution-metrics']: return 'gear'; default: return assertUnreachable(type, 'Unknown rule execution event type'); @@ -26,11 +27,11 @@ export const getBadgeIcon = (type: RuleExecutionEventType): IconType => { export const getBadgeText = (type: RuleExecutionEventType): string => { switch (type) { - case RuleExecutionEventType.message: + case RuleExecutionEventTypeEnum.message: return i18n.TYPE_MESSAGE; - case RuleExecutionEventType['status-change']: + case RuleExecutionEventTypeEnum['status-change']: return i18n.TYPE_STATUS_CHANGE; - case RuleExecutionEventType['execution-metrics']: + case RuleExecutionEventTypeEnum['execution-metrics']: return i18n.TYPE_EXECUTION_METRICS; default: return assertUnreachable(type, 'Unknown rule execution event type'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts index 639c648de0241..702d3edddda5b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts @@ -7,20 +7,21 @@ import { upperCase } from 'lodash'; import type { IconColor } from '@elastic/eui'; -import { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import type { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { LogLevelEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { assertUnreachable } from '../../../../../../../common/utility_types'; export const getBadgeColor = (logLevel: LogLevel): IconColor => { switch (logLevel) { - case LogLevel.trace: + case LogLevelEnum.trace: return 'hollow'; - case LogLevel.debug: + case LogLevelEnum.debug: return 'hollow'; - case LogLevel.info: + case LogLevelEnum.info: return 'default'; - case LogLevel.warn: + case LogLevelEnum.warn: return 'warning'; - case LogLevel.error: + case LogLevelEnum.error: return 'danger'; default: return assertUnreachable(logLevel, 'Unknown log level'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts index 39e48c3997478..5fb9c0fb32215 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts @@ -11,11 +11,18 @@ import type { SortOrder } from '../../../../../../common/api/detection_engine'; type TableItem = Record; +interface SortingState { + sort: { + field: keyof T; + direction: SortOrder; + }; +} + export const useSorting = (defaultField: keyof T, defaultOrder: SortOrder) => { const [sortField, setSortField] = useState(defaultField); const [sortOrder, setSortOrder] = useState(defaultOrder); - const state = useMemo(() => { + const state = useMemo>(() => { return { sort: { field: sortField, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx index 866e0e44b6c77..5459968b6c497 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx @@ -10,8 +10,8 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { renderHook, cleanup } from '@testing-library/react-hooks'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../common/api/detection_engine/rule_monitoring'; import { useExecutionEvents } from './use_execution_events'; @@ -85,8 +85,8 @@ describe('useExecutionEvents', () => { { timestamp: '2021-12-29T10:42:59.996Z', sequence: 0, - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], execution_id: 'execution-id-1', message: 'Rule changed status to "succeeded". Rule execution completed without errors', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts index d99be0c13e70b..19d6111b5a936 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; export const getActionDetails = (actionTypeId: string) => { switch (actionTypeId) { - case RESPONSE_ACTION_TYPES.OSQUERY: + case ResponseActionTypesEnum['.osquery']: return { logo: 'logoOsquery', name: 'Osquery' }; - case RESPONSE_ACTION_TYPES.ENDPOINT: + case ResponseActionTypesEnum['.endpoint']: return { logo: 'logoSecurity', name: 'Endpoint Security' }; // update when new responseActions are provided default: diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts index ad3e3f8392eb1..e8afdd91d1ff3 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts @@ -6,10 +6,9 @@ */ import type { EnabledFeatures } from '@kbn/spaces-plugin/public/management/edit_space/enabled_features'; -import type { ResponseActionTypes } from '../../../common/api/detection_engine/model/rule_response_actions'; import { - RESPONSE_ACTION_TYPES, - SUPPORTED_RESPONSE_ACTION_TYPES, + ResponseActionTypes, + ResponseActionTypesEnum, } from '../../../common/api/detection_engine/model/rule_response_actions'; export interface ResponseActionType { @@ -29,9 +28,9 @@ export const getSupportedResponseActions = ( userPermissions: EnabledFeatures ): ResponseActionType[] => actionTypes.reduce((acc: ResponseActionType[], actionType) => { - const isEndpointAction = actionType.id === RESPONSE_ACTION_TYPES.ENDPOINT; + const isEndpointAction = actionType.id === ResponseActionTypesEnum['.endpoint']; if (!enabledFeatures.endpoint && isEndpointAction) return acc; - if (SUPPORTED_RESPONSE_ACTION_TYPES.includes(actionType.id)) + if (ResponseActionTypes.options.includes(actionType.id)) return [ ...acc, { ...actionType, disabled: isEndpointAction ? !userPermissions.endpoint : undefined }, @@ -39,14 +38,14 @@ export const getSupportedResponseActions = ( return acc; }, []); -export const responseActionTypes = [ +export const responseActionTypes: ResponseActionType[] = [ { - id: RESPONSE_ACTION_TYPES.OSQUERY, + id: ResponseActionTypesEnum['.osquery'], name: 'Osquery', iconClass: 'logoOsquery', }, { - id: RESPONSE_ACTION_TYPES.ENDPOINT, + id: ResponseActionTypesEnum['.endpoint'], name: 'Endpoint Security', iconClass: 'logoSecurity', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx index 7b176b96c2948..97f3e932e81fe 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx @@ -21,7 +21,7 @@ import styled from 'styled-components'; import { useCheckEndpointPermissions } from './endpoint/check_permissions'; import { EndpointResponseAction } from './endpoint/endpoint_response_action'; import type { RuleResponseAction } from '../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; import { OsqueryResponseAction } from './osquery/osquery_response_action'; import { getActionDetails } from './constants'; import { useFormData } from '../../shared_imports'; @@ -48,10 +48,10 @@ const ResponseActionTypeFormComponent = ({ item, onDeleteAction }: ResponseActio const editDisabled = useCheckEndpointPermissions(action) ?? false; const getResponseActionTypeForm = useMemo(() => { - if (action?.actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (action?.actionTypeId === ResponseActionTypesEnum['.osquery']) { return ; } - if (action?.actionTypeId === RESPONSE_ACTION_TYPES.ENDPOINT) { + if (action?.actionTypeId === ResponseActionTypesEnum['.endpoint']) { return ; } // Place for other ResponseActionTypes diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx index 5b1e57e6386f4..22d190d80b9c4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx @@ -11,7 +11,7 @@ import { filter, reduce } from 'lodash'; import type { ECSMapping } from '@kbn/osquery-io-ts-types'; import type { RuleResponseAction } from '../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; import { OsqueryParser } from '../../common/components/markdown_editor/plugins/osquery/parser'; interface OsqueryNoteQuery { @@ -38,7 +38,7 @@ export const getResponseActionsFromNote = ( (acc: { responseActions: RuleResponseAction[] }, { configuration }: OsqueryNoteQuery) => { const responseActionPath = 'responseActions'; acc[responseActionPath].push({ - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { savedQueryId: undefined, packId: undefined, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx index 50c8a5bf50d1b..9a351af0803c7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx @@ -16,7 +16,7 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { APP_UI_ID, SecurityPageName } from '../../../../../common/constants'; import { DuplicateOptions } from '../../../../../common/detection_engine/rule_management/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { getRulesUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import { useBoolState } from '../../../../common/hooks/use_bool_state'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; @@ -94,7 +94,7 @@ const RuleActionsOverflowComponent = ({ return; } const result = await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, ids: [rule.id], duplicatePayload: { include_exceptions: @@ -156,7 +156,7 @@ const RuleActionsOverflowComponent = ({ startTransaction({ name: SINGLE_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ids: [rule.id], }); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx index 7e4881800f738..35434a711768e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx @@ -9,7 +9,7 @@ import type { EuiSwitchEvent } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSwitch } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { useExecuteBulkAction } from '../../../../detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action'; @@ -60,7 +60,7 @@ export const RuleSwitchComponent = ({ await startMlJobsIfNeeded?.(); } const bulkActionResponse = await executeBulkAction({ - type: enableRule ? BulkActionType.enable : BulkActionType.disable, + type: enableRule ? BulkActionTypeEnum.enable : BulkActionTypeEnum.disable, ids: [id], }); if (bulkActionResponse?.attributes.results.updated.length) { diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts index a370f2a89cb6f..fb1285fb89f05 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts @@ -15,7 +15,7 @@ import { visitRuleActions, } from '../../tasks/response_actions'; import { cleanupRule, generateRandomStringName, loadRule } from '../../tasks/api_fixtures'; -import { RESPONSE_ACTION_TYPES } from '../../../../../common/api/detection_engine'; +import { ResponseActionTypesEnum } from '../../../../../common/api/detection_engine'; import { login, ROLE } from '../../tasks/login'; describe( @@ -78,7 +78,7 @@ describe( cy.getByTestSubj(`command-type-${testedCommand}`).click(); cy.intercept('POST', '/api/detection_engine/rules', (request) => { const result = { - action_type_id: RESPONSE_ACTION_TYPES.ENDPOINT, + action_type_id: ResponseActionTypesEnum['.endpoint'], params: { command: testedCommand, comment: 'example1', @@ -127,7 +127,7 @@ describe( cy.getByTestSubj('ruleEditSubmitButton').click(); cy.wait('@updateResponseAction').should(({ request }) => { const query = { - action_type_id: RESPONSE_ACTION_TYPES.ENDPOINT, + action_type_id: ResponseActionTypesEnum['.endpoint'], params: { command: testedCommand, comment: newDescription, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts index 73350b48941db..0ec1d5580f40b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts @@ -17,7 +17,7 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"name: Required, description: Required, risk_score: Required, severity: Required, Invalid input, rule_id: Required, version: Required"` + `"name: Required, description: Required, risk_score: Required, severity: Required, rule_id: Required, and 26 more"` ); }); @@ -40,7 +40,7 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"name: Required, description: Required, risk_score: Required, severity: Required, Invalid input, version: Required"` + `"name: Required, description: Required, risk_score: Required, severity: Required, version: Required, and 25 more"` ); }); @@ -176,7 +176,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('saved_query type can have filters with it', () => { @@ -198,7 +200,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('language validates with kuery', () => { @@ -231,7 +235,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 19 more"` + ); }); test('max_signals cannot be negative', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts index 428010033c5b2..cd01a251a3c75 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts @@ -486,7 +486,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - 'Invalid value "undefined" supplied to "action",Invalid value "undefined" supplied to "edit"' + 'action: Invalid literal value, expected "delete", action: Invalid literal value, expected "disable", action: Invalid literal value, expected "enable", action: Invalid literal value, expected "export", action: Invalid literal value, expected "duplicate", and 2 more' ); }); @@ -498,7 +498,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - 'Invalid value "unknown" supplied to "action",Invalid value "undefined" supplied to "edit"' + 'action: Invalid literal value, expected "delete", action: Invalid literal value, expected "disable", action: Invalid literal value, expected "enable", action: Invalid literal value, expected "export", action: Invalid literal value, expected "duplicate", and 2 more' ); }); @@ -531,7 +531,9 @@ describe('Perform bulk action route', () => { body: { ...getPerformBulkActionSchemaMock(), ids: 'test fake' }, }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid value "test fake" supplied to "ids"'); + expect(result.badRequest).toHaveBeenCalledWith( + 'ids: Expected array, received string, action: Invalid literal value, expected "delete", ids: Expected array, received string, ids: Expected array, received string, action: Invalid literal value, expected "enable", and 7 more' + ); }); it('rejects payload if there is more than 100 ids in payload', async () => { @@ -577,7 +579,9 @@ describe('Perform bulk action route', () => { body: { ...getPerformBulkActionSchemaMock(), ids: [] }, }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid value "[]" supplied to "ids"'); + expect(result.badRequest).toHaveBeenCalledWith( + 'ids: Array must contain at least 1 element(s)' + ); }); it('rejects payloads if property "edit" actions is empty', async () => { @@ -588,7 +592,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - expect.stringContaining('Invalid value "[]" supplied to "edit"') + expect.stringContaining('edit: Array must contain at least 1 element(s)') ); }); @@ -601,7 +605,9 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - expect.stringContaining('Invalid value "invalid" supplied to "dry_run"') + expect.stringContaining( + "dry_run: Invalid enum value. Expected 'true' | 'false', received 'invalid', dry_run: Expected boolean, received string" + ) ); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts index 14022e9e44af2..8af5eeaa1a021 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts @@ -20,22 +20,24 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL, RULES_TABLE_MAX_PAGE_SIZE, } from '../../../../../../../common/constants'; -import type { PerformBulkActionResponse } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkEditActionResponse, + PerformBulkActionResponse, +} from '../../../../../../../common/api/detection_engine/rule_management'; import { - BulkActionType, + BulkActionTypeEnum, PerformBulkActionRequestBody, PerformBulkActionRequestQuery, -} from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../../common/api/detection_engine/rule_management'; import type { NormalizedRuleError, RuleDetailsInError, - BulkEditActionResponse, BulkEditActionResults, BulkEditActionSummary, } from '../../../../../../../common/api/detection_engine'; import type { SetupPlugins } from '../../../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../../../types'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { routeLimitedConcurrencyTag } from '../../../../../../utils/route_limited_concurrency_tag'; import type { PromisePoolError, PromisePoolOutcome } from '../../../../../../utils/promise_pool'; import { initPromisePool } from '../../../../../../utils/promise_pool'; @@ -249,8 +251,8 @@ export const performBulkActionRoute = ( version: '2023-10-31', validate: { request: { - body: buildRouteValidation(PerformBulkActionRequestBody), - query: buildRouteValidation(PerformBulkActionRequestQuery), + body: buildRouteValidationWithZod(PerformBulkActionRequestBody), + query: buildRouteValidationWithZod(PerformBulkActionRequestQuery), }, }, }, @@ -272,10 +274,10 @@ export const performBulkActionRoute = ( }); } - const isDryRun = request.query.dry_run === 'true'; + const isDryRun = request.query.dry_run; // dry run is not supported for export, as it doesn't change ES state and has different response format(exported JSON file) - if (isDryRun && body.action === BulkActionType.export) { + if (isDryRun && body.action === BulkActionTypeEnum.export) { return siemResponse.error({ body: `Export action doesn't support dry_run mode`, statusCode: 400, @@ -318,7 +320,7 @@ export const performBulkActionRoute = ( // handling this action before switch statement as bulkEditRules fetch rules within // rulesClient method, hence there is no need to use fetchRulesByQueryOrIds utility - if (body.action === BulkActionType.edit && !isDryRun) { + if (body.action === BulkActionTypeEnum.edit && !isDryRun) { const { rules, errors, skipped } = await bulkEditRules({ rulesClient, filter: query, @@ -348,7 +350,7 @@ export const performBulkActionRoute = ( let deleted: RuleAlertType[] = []; switch (body.action) { - case BulkActionType.enable: + case BulkActionTypeEnum.enable: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -375,7 +377,7 @@ export const performBulkActionRoute = ( .map(({ result }) => result) .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -403,7 +405,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -427,7 +429,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -486,7 +488,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.export: + case BulkActionTypeEnum.export: const exported = await getExportByObjectIds( rulesClient, exceptionsClient, @@ -510,7 +512,7 @@ export const performBulkActionRoute = ( // will be processed only when isDryRun === true // during dry run only validation is getting performed and rule is not saved in ES - case BulkActionType.edit: + case BulkActionTypeEnum.edit: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts index fc3d87d32b432..ca3cde890b738 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts @@ -191,7 +191,9 @@ describe('Bulk patch rules route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('0: Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + '0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.type: Invalid literal value, expected "query", 0.type: Invalid literal value, expected "saved_query", 0.type: Invalid literal value, expected "threshold", and 5 more' + ); }); test('allows rule type of query and custom from and interval', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts index 5fed0b4e3446a..a1d74b1445508 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts @@ -236,7 +236,9 @@ describe('Create rule route', () => { }, }); const result = await server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "saved_query", saved_id: Required, type: Invalid literal value, expected "threshold", and 18 more' + ); }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts index 76d63ddcd54b0..b9a68994a0e58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts @@ -76,7 +76,7 @@ describe('Find rules route', () => { expect(result.ok).toHaveBeenCalled(); }); - test('rejects unknown query params', async () => { + test('ignores unknown query params', async () => { const request = requestMock.create({ method: 'get', path: DETECTION_ENGINE_RULES_URL_FIND, @@ -86,7 +86,7 @@ describe('Find rules route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('invalid keys "invalid_value"'); + expect(result.ok).toHaveBeenCalled(); }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts index 76496d26cb856..3cbd164586a9d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts @@ -18,7 +18,7 @@ import { import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { findRules } from '../../../logic/search/find_rules'; import { buildSiemResponse } from '../../../../routes/utils'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { transformFindAlerts } from '../../../utils/utils'; export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { @@ -35,7 +35,7 @@ export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Log version: '2023-10-31', validate: { request: { - query: buildRouteValidation(FindRulesRequestQuery), + query: buildRouteValidationWithZod(FindRulesRequestQuery), }, }, }, @@ -63,11 +63,7 @@ export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Log }); const transformed = transformFindAlerts(rules); - if (transformed == null) { - return siemResponse.error({ statusCode: 500, body: 'Internal error transforming' }); - } else { - return response.ok({ body: transformed ?? {} }); - } + return response.ok({ body: transformed ?? {} }); } catch (err) { const error = transformError(err); return siemResponse.error({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts index 677556f314239..1255287cf52f5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts @@ -199,7 +199,9 @@ describe('Patch rule route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", type: Invalid literal value, expected "threshold", and 5 more' + ); }); test('allows rule type of query and custom from and interval', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts index e580f5cc11662..f95b10fa6154f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts @@ -23,7 +23,7 @@ import { getUpdateRulesSchemaMock, } from '../../../../../../../common/api/detection_engine/model/rule_schema/mocks'; import { getQueryRuleParams } from '../../../../rule_schema/mocks'; -import { RESPONSE_ACTION_TYPES } from '../../../../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../../../../common/api/detection_engine/model/rule_response_actions'; jest.mock('../../../../../machine_learning/authz'); @@ -245,7 +245,7 @@ describe('Update rule route', () => { ...getQueryRuleParams(), responseActions: [ { - actionTypeId: RESPONSE_ACTION_TYPES.ENDPOINT, + actionTypeId: ResponseActionTypesEnum['.endpoint'], params: { command: 'isolate', comment: '', @@ -283,7 +283,9 @@ describe('Update rule route', () => { }, }); const result = await server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "saved_query", saved_id: Required, type: Invalid literal value, expected "threshold", and 18 more' + ); }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts index e598715e8f9ec..e214b7dc3b341 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts @@ -5,13 +5,16 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { bulkEditActionToRulesClientOperation } from './action_to_rules_client_operation'; describe('bulkEditActionToRulesClientOperation', () => { test('should transform tags bulk edit actions correctly', () => { expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.add_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ + type: BulkActionEditTypeEnum.add_tags, + value: ['test'], + }) ).toEqual([ { field: 'tags', @@ -22,7 +25,7 @@ describe('bulkEditActionToRulesClientOperation', () => { }); expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.set_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ type: BulkActionEditTypeEnum.set_tags, value: ['test'] }) ).toEqual([ { field: 'tags', @@ -32,7 +35,10 @@ describe('bulkEditActionToRulesClientOperation', () => { ]); expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.delete_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ + type: BulkActionEditTypeEnum.delete_tags, + value: ['test'], + }) ).toEqual([ { field: 'tags', @@ -44,7 +50,7 @@ describe('bulkEditActionToRulesClientOperation', () => { test('should transform schedule bulk edit correctly', () => { expect( bulkEditActionToRulesClientOperation({ - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '100m', lookback: '10m', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts index dfd4ee64c0787..eac694f97944b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts @@ -8,8 +8,8 @@ import type { BulkEditOperation } from '@kbn/alerting-plugin/server'; import { transformNormalizedRuleToAlertAction } from '../../../../../../common/detection_engine/transform_actions'; -import type { BulkActionEditForRuleAttributes } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditForRuleAttributes } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; import { transformToActionFrequency } from '../../normalization/rule_actions'; @@ -23,7 +23,7 @@ export const bulkEditActionToRulesClientOperation = ( ): BulkEditOperation[] => { switch (action.type) { // tags actions - case BulkActionEditType.add_tags: + case BulkActionEditTypeEnum.add_tags: return [ { field: 'tags', @@ -32,7 +32,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.delete_tags: + case BulkActionEditTypeEnum.delete_tags: return [ { field: 'tags', @@ -41,7 +41,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.set_tags: return [ { field: 'tags', @@ -51,7 +51,7 @@ export const bulkEditActionToRulesClientOperation = ( ]; // rule actions - case BulkActionEditType.add_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: return [ { field: 'actions', @@ -62,7 +62,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return [ { field: 'actions', @@ -74,7 +74,7 @@ export const bulkEditActionToRulesClientOperation = ( ]; // schedule actions - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return [ { field: 'schedule', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts index 76034819b508d..fd2f1644480c0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts @@ -7,7 +7,7 @@ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; import type { MlAuthz } from '../../../../machine_learning/authz'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts index 0337558099532..93044fc0fed18 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts @@ -6,7 +6,7 @@ */ import { addItemsToArray, deleteItemsFromArray, ruleParamsModifier } from './rule_params_modifier'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { RuleAlertType } from '../../../rule_schema'; describe('addItemsToArray', () => { @@ -47,7 +47,7 @@ describe('ruleParamsModifier', () => { test('should increment version if rule is custom (immutable === false)', () => { const { modifiedParams } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]); @@ -57,7 +57,7 @@ describe('ruleParamsModifier', () => { test('should not increment version if rule is prebuilt (immutable === true)', () => { const { modifiedParams } = ruleParamsModifier({ ...ruleParamsMock, immutable: true }, [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]); @@ -130,7 +130,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: indexPatternsToAdd, }, ] @@ -194,7 +194,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: indexPatternsToDelete, }, ] @@ -249,7 +249,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: indexPatternsToOverwrite, }, ] @@ -267,7 +267,7 @@ describe('ruleParamsModifier', () => { { dataViewId: testDataViewId } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index-2-*'], }, ] @@ -281,7 +281,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -296,7 +296,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -311,7 +311,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*', 'index'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -327,7 +327,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: undefined } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -342,7 +342,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]) @@ -355,7 +355,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['my-index-*'], }, ]) @@ -368,7 +368,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['my-index-*'], }, ]) @@ -381,7 +381,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]) @@ -392,7 +392,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['my-index-*'], }, ]) @@ -403,7 +403,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['my-index-*'], }, ]) @@ -417,7 +417,7 @@ describe('ruleParamsModifier', () => { test('should set timeline', () => { const { modifiedParams, isParamsUpdateSkipped } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: '91832785-286d-4ebe-b884-1a208d111a70', timeline_title: 'Test timeline', @@ -438,7 +438,7 @@ describe('ruleParamsModifier', () => { const FROM_IN_SECONDS = (INTERVAL_IN_MINUTES + LOOKBACK_IN_MINUTES) * 60; const { modifiedParams, isParamsUpdateSkipped } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: `${INTERVAL_IN_MINUTES}m`, lookback: `${LOOKBACK_IN_MINUTES}m`, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts index a519aee713bec..2994d2bf7f157 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts @@ -12,8 +12,8 @@ import type { RuleAlertType } from '../../../rule_schema'; import type { BulkActionEditForRuleParams, BulkActionEditPayloadIndexPatterns, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { invariant } from '../../../../../../common/utils/invariant'; export const addItemsToArray = (arr: T[], items: T[]): T[] => @@ -52,11 +52,11 @@ const shouldSkipIndexPatternsBulkAction = ( return true; } - if (action.type === BulkActionEditType.add_index_patterns) { + if (action.type === BulkActionEditTypeEnum.add_index_patterns) { return hasIndexPatterns(indexPatterns, action); } - if (action.type === BulkActionEditType.delete_index_patterns) { + if (action.type === BulkActionEditTypeEnum.delete_index_patterns) { return hasNotIndexPattern(indexPatterns, action); } @@ -80,7 +80,7 @@ const applyBulkActionEditToRuleParams = ( switch (action.type) { // index_patterns actions // index pattern is not present in machine learning rule type, so we throw error on it - case BulkActionEditType.add_index_patterns: { + case BulkActionEditTypeEnum.add_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be added. Machine learning rule doesn't have index patterns property" @@ -102,7 +102,7 @@ const applyBulkActionEditToRuleParams = ( ruleParams.index = addItemsToArray(ruleParams.index ?? [], action.value); break; } - case BulkActionEditType.delete_index_patterns: { + case BulkActionEditTypeEnum.delete_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be deleted. Machine learning rule doesn't have index patterns property" @@ -129,7 +129,7 @@ const applyBulkActionEditToRuleParams = ( } break; } - case BulkActionEditType.set_index_patterns: { + case BulkActionEditTypeEnum.set_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be overwritten. Machine learning rule doesn't have index patterns property" @@ -152,7 +152,7 @@ const applyBulkActionEditToRuleParams = ( break; } // timeline actions - case BulkActionEditType.set_timeline: { + case BulkActionEditTypeEnum.set_timeline: { ruleParams = { ...ruleParams, timelineId: action.value.timeline_id || undefined, @@ -162,7 +162,7 @@ const applyBulkActionEditToRuleParams = ( break; } // update look-back period in from and meta.from fields - case BulkActionEditType.set_schedule: { + case BulkActionEditTypeEnum.set_schedule: { const interval = parseInterval(action.value.interval) ?? moment.duration(0); const parsedFrom = parseInterval(action.value.lookback) ?? moment.duration(0); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts index 5bde6c29e6082..cdaa6ed1afb80 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts @@ -5,20 +5,20 @@ * 2.0. */ -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { splitBulkEditActions } from './split_bulk_edit_actions'; const bulkEditActions: BulkActionEditPayload[] = [ - { type: BulkActionEditType.add_index_patterns, value: ['test'] }, - { type: BulkActionEditType.set_index_patterns, value: ['test'] }, - { type: BulkActionEditType.delete_index_patterns, value: ['test'] }, - { type: BulkActionEditType.add_tags, value: ['test'] }, - { type: BulkActionEditType.delete_tags, value: ['test'] }, - { type: BulkActionEditType.set_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_tags, value: ['test'] }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'a-1', timeline_title: 'Test title' }, }, ]; @@ -28,16 +28,16 @@ describe('splitBulkEditActions', () => { const { attributesActions, paramsActions } = splitBulkEditActions(bulkEditActions); expect(attributesActions).toEqual([ - { type: BulkActionEditType.add_tags, value: ['test'] }, - { type: BulkActionEditType.delete_tags, value: ['test'] }, - { type: BulkActionEditType.set_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_tags, value: ['test'] }, ]); expect(paramsActions).toEqual([ - { type: BulkActionEditType.add_index_patterns, value: ['test'] }, - { type: BulkActionEditType.set_index_patterns, value: ['test'] }, - { type: BulkActionEditType.delete_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test'] }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'a-1', timeline_title: 'Test title' }, }, ]); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts index 2896acbea0e85..da626722155ed 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { BulkActionEditPayload, BulkActionEditForRuleAttributes, BulkActionEditForRuleParams, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; /** * Split bulk edit actions in 2 chunks: actions applied to params and @@ -29,15 +29,15 @@ export const splitBulkEditActions = (actions: BulkActionEditPayload[]) => { return actions.reduce((acc, action) => { switch (action.type) { - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: acc.attributesActions.push(action); acc.paramsActions.push(action); break; - case BulkActionEditType.add_tags: - case BulkActionEditType.set_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.set_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: acc.attributesActions.push(action); break; default: diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts index 214fc16b40a49..d624d9033f299 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; /** * helper utility that defines whether bulk edit action is related to index patterns, i.e. one of: @@ -14,7 +15,7 @@ import { BulkActionEditType } from '../../../../../../common/api/detection_engin */ export const isIndexPatternsBulkEditAction = (editAction: BulkActionEditType) => [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.delete_index_patterns, - BulkActionEditType.set_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, ].includes(editAction); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts index fc8d13c27c567..4a1aef9ed28d7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts @@ -10,8 +10,8 @@ import { invariant } from '../../../../../../common/utils/invariant'; import { isMlRule } from '../../../../../../common/machine_learning/helpers'; import { isEsqlRule } from '../../../../../../common/detection_engine/utils'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { RuleAlertType } from '../../../rule_schema'; import { isIndexPatternsBulkEditAction } from './utils'; import { throwDryRunError } from './dry_run'; @@ -100,7 +100,9 @@ export const validateBulkEditRule = async ({ */ const istEditApplicableToImmutableRule = (edit: BulkActionEditPayload[]): boolean => { return edit.every(({ type }) => - [BulkActionEditType.set_rule_actions, BulkActionEditType.add_rule_actions].includes(type) + [BulkActionEditTypeEnum.set_rule_actions, BulkActionEditTypeEnum.add_rule_actions].includes( + type + ) ); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts index 8fb5f348ae224..892610df03bea 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts @@ -5,42 +5,29 @@ * 2.0. */ -import * as t from 'io-ts'; - import type { FindResult, RulesClient } from '@kbn/alerting-plugin/server'; -import { NonEmptyString, UUID } from '@kbn/securitysolution-io-ts-types'; -import type { FindRulesSortFieldOrUndefined } from '../../../../../../common/api/detection_engine/rule_management'; +import type { FindRulesSortField } from '../../../../../../common/api/detection_engine/rule_management'; -import type { - FieldsOrUndefined, - PageOrUndefined, - PerPageOrUndefined, - QueryFilterOrUndefined, - SortOrderOrUndefined, -} from '../../../../../../common/api/detection_engine'; +import type { Page, PerPage, SortOrder } from '../../../../../../common/api/detection_engine'; import type { RuleParams } from '../../../rule_schema'; import { enrichFilterWithRuleTypeMapping } from './enrich_filter_with_rule_type_mappings'; import { transformSortField } from './transform_sort_field'; -type HasReferences = t.TypeOf; -const HasReferences = t.type({ - type: NonEmptyString, - id: UUID, -}); - -type HasReferencesOrUndefined = t.TypeOf; -const HasReferencesOrUndefined = t.union([HasReferences, t.undefined]); +interface HasReferences { + type: string; + id: string; +} export interface FindRuleOptions { rulesClient: RulesClient; - filter: QueryFilterOrUndefined; - fields: FieldsOrUndefined; - sortField: FindRulesSortFieldOrUndefined; - sortOrder: SortOrderOrUndefined; - page: PageOrUndefined; - perPage: PerPageOrUndefined; - hasReference?: HasReferencesOrUndefined; + filter: string | undefined; + fields: string[] | undefined; + sortField: FindRulesSortField | undefined; + sortOrder: SortOrder | undefined; + page: Page | undefined; + perPage: PerPage | undefined; + hasReference?: HasReferences | undefined; } export const findRules = ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts index 53573879d07df..b55e51882345a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { FindRulesSortFieldOrUndefined } from '../../../../../../common/api/detection_engine/rule_management'; +import type { FindRulesSortField } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; /** @@ -37,7 +37,7 @@ import { assertUnreachable } from '../../../../../../common/utility_types'; * @param sortField Sort field parameter from the request * @returns Sort field matching the Alerting framework schema */ -export function transformSortField(sortField: FindRulesSortFieldOrUndefined): string | undefined { +export function transformSortField(sortField?: FindRulesSortField): string | undefined { if (!sortField) { return undefined; } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts index 07b9c9d0cbcd8..a513e8468d577 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts @@ -113,7 +113,8 @@ describe('validate', () => { const validatedOrError = transformValidateBulkError('rule-1', ruleAlert); const expected: BulkError = { error: { - message: 'Invalid input', + message: + 'name: Required, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", name: Required, name: Required, and 22 more', status_code: 500, }, rule_id: 'rule-1', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts index c01f09f1b0534..cf6054c689cdd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts @@ -9,8 +9,8 @@ import { serverMock, requestContextMock, requestMock } from '../../../../routes/ import { GET_RULE_EXECUTION_EVENTS_URL, - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { getRuleExecutionEventsResponseMock } from '../../../../../../../common/api/detection_engine/rule_monitoring/mocks'; import type { GetExecutionEventsArgs } from '../../../logic/rule_execution_log'; @@ -35,8 +35,8 @@ describe('getRuleExecutionEventsRoute', () => { ruleId: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', }, query: { - event_types: `${RuleExecutionEventType['status-change']}`, - log_levels: `${LogLevel.debug},${LogLevel.info}`, + event_types: `${RuleExecutionEventTypeEnum['status-change']}`, + log_levels: `${LogLevelEnum.debug},${LogLevelEnum.info}`, page: 3, }, }); @@ -44,8 +44,8 @@ describe('getRuleExecutionEventsRoute', () => { it('passes request arguments to rule execution log', async () => { const expectedArgs: GetExecutionEventsArgs = { ruleId: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', - eventTypes: [RuleExecutionEventType['status-change']], - logLevels: [LogLevel.debug, LogLevel.info], + eventTypes: [RuleExecutionEventTypeEnum['status-change']], + logLevels: [LogLevelEnum.debug, LogLevelEnum.info], sortOrder: 'desc', page: 3, perPage: 20, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts index 1049cbb5c89e1..4a01a6550cabc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts @@ -7,7 +7,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { IKibanaResponse } from '@kbn/core/server'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; import type { SecuritySolutionPluginRouter } from '../../../../../../types'; @@ -36,8 +36,8 @@ export const getRuleExecutionEventsRoute = (router: SecuritySolutionPluginRouter version: '1', validate: { request: { - params: buildRouteValidation(GetRuleExecutionEventsRequestParams), - query: buildRouteValidation(GetRuleExecutionEventsRequestQuery), + params: buildRouteValidationWithZod(GetRuleExecutionEventsRequestParams), + query: buildRouteValidationWithZod(GetRuleExecutionEventsRequestQuery), }, }, }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts index 4151355419586..5b667770ffa5d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts @@ -5,31 +5,32 @@ * 2.0. */ -import { mapValues } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { mapValues } from 'lodash'; import type { AggregatedMetric, + HealthOverviewStats, + LogLevel, NumberOfDetectedGaps, NumberOfExecutions, NumberOfLoggedMessages, - HealthOverviewStats, - TopMessages, RuleExecutionStatus, + TopMessages, } from '../../../../../../../../common/api/detection_engine/rule_monitoring'; import { - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, RuleExecutionStatusEnum, - LogLevel, } from '../../../../../../../../common/api/detection_engine/rule_monitoring'; -import { DEFAULT_PERCENTILES } from '../../../utils/es_aggregations'; -import type { RawData } from '../../../utils/normalization'; -import * as f from '../../../event_log/event_log_fields'; import { ALERTING_PROVIDER, RULE_EXECUTION_LOG_PROVIDER, } from '../../../event_log/event_log_constants'; +import * as f from '../../../event_log/event_log_fields'; +import { DEFAULT_PERCENTILES } from '../../../utils/es_aggregations'; +import type { RawData } from '../../../utils/normalization'; export type RuleExecutionStatsAggregationLevel = 'whole-interval' | 'histogram'; @@ -74,7 +75,7 @@ export const getRuleExecutionStatsAggregation = ( bool: { filter: [ { term: { [f.EVENT_PROVIDER]: RULE_EXECUTION_LOG_PROVIDER } }, - { term: { [f.EVENT_ACTION]: RuleExecutionEventType['status-change'] } }, + { term: { [f.EVENT_ACTION]: RuleExecutionEventTypeEnum['status-change'] } }, ], must_not: [ { @@ -101,7 +102,7 @@ export const getRuleExecutionStatsAggregation = ( bool: { filter: [ { term: { [f.EVENT_PROVIDER]: RULE_EXECUTION_LOG_PROVIDER } }, - { term: { [f.EVENT_ACTION]: RuleExecutionEventType['execution-metrics'] } }, + { term: { [f.EVENT_ACTION]: RuleExecutionEventTypeEnum['execution-metrics'] } }, ], }, }, @@ -144,8 +145,8 @@ export const getRuleExecutionStatsAggregation = ( { terms: { [f.EVENT_ACTION]: [ - RuleExecutionEventType['status-change'], - RuleExecutionEventType.message, + RuleExecutionEventTypeEnum['status-change'], + RuleExecutionEventTypeEnum.message, ], }, }, @@ -162,7 +163,7 @@ export const getRuleExecutionStatsAggregation = ( ? { errors: { filter: { - term: { [f.LOG_LEVEL]: LogLevel.error }, + term: { [f.LOG_LEVEL]: LogLevelEnum.error }, }, aggs: { topErrors: { @@ -176,7 +177,7 @@ export const getRuleExecutionStatsAggregation = ( }, warnings: { filter: { - term: { [f.LOG_LEVEL]: LogLevel.warn }, + term: { [f.LOG_LEVEL]: LogLevelEnum.warn }, }, aggs: { topWarnings: { @@ -263,11 +264,11 @@ const normalizeNumberOfLoggedMessages = ( return { total: Number(messageContainingEvents.doc_count || 0), by_level: { - error: getMessageCount(LogLevel.error), - warn: getMessageCount(LogLevel.warn), - info: getMessageCount(LogLevel.info), - debug: getMessageCount(LogLevel.debug), - trace: getMessageCount(LogLevel.trace), + error: getMessageCount(LogLevelEnum.error), + warn: getMessageCount(LogLevelEnum.warn), + info: getMessageCount(LogLevelEnum.info), + debug: getMessageCount(LogLevelEnum.debug), + trace: getMessageCount(LogLevelEnum.trace), }, }; }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts index 61a321c427205..6c1accab273ad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts @@ -12,6 +12,6 @@ import { RULE_EXECUTION_LOG_PROVIDER } from './event_log_constants'; export const registerEventLogProvider = (eventLogService: IEventLogService) => { eventLogService.registerProviderActions( RULE_EXECUTION_LOG_PROVIDER, - Object.keys(RuleExecutionEventType) + RuleExecutionEventType.options ); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts index 101884b284ebc..8e9a2970f5dbf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts @@ -16,9 +16,9 @@ import type { import type { RuleExecutionSettings, RuleExecutionStatus, + LogLevel, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, logLevelFromExecutionStatus, LogLevelSetting, logLevelToNumber, @@ -38,6 +38,7 @@ import type { StatusChangeArgs, } from './client_interface'; import type { RuleExecutionMetrics } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; +import { LogLevelEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; export const createRuleExecutionLogClientForExecutors = ( settings: RuleExecutionSettings, @@ -59,23 +60,23 @@ export const createRuleExecutionLogClientForExecutors = ( }, trace(...messages: string[]): void { - writeMessage(messages, LogLevel.trace); + writeMessage(messages, LogLevelEnum.trace); }, debug(...messages: string[]): void { - writeMessage(messages, LogLevel.debug); + writeMessage(messages, LogLevelEnum.debug); }, info(...messages: string[]): void { - writeMessage(messages, LogLevel.info); + writeMessage(messages, LogLevelEnum.info); }, warn(...messages: string[]): void { - writeMessage(messages, LogLevel.warn); + writeMessage(messages, LogLevelEnum.warn); }, error(...messages: string[]): void { - writeMessage(messages, LogLevel.error); + writeMessage(messages, LogLevelEnum.error); }, async logStatusChange(args: StatusChangeArgs): Promise { @@ -107,19 +108,19 @@ export const createRuleExecutionLogClientForExecutors = ( const writeMessageToConsole = (message: string, logLevel: LogLevel, logMeta: ExtMeta): void => { switch (logLevel) { - case LogLevel.trace: + case LogLevelEnum.trace: logger.trace(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.debug: + case LogLevelEnum.debug: logger.debug(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.info: + case LogLevelEnum.info: logger.info(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.warn: + case LogLevelEnum.warn: logger.warn(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.error: + case LogLevelEnum.error: logger.error(`${message} ${baseLogSuffix}`, logMeta); break; default: @@ -152,7 +153,7 @@ export const createRuleExecutionLogClientForExecutors = ( const writeExceptionToConsole = (e: unknown, message: string, logMeta: ExtMeta): void => { const logReason = e instanceof Error ? e.stack ?? e.message : String(e); - writeMessageToConsole(`${message}. Reason: ${logReason}`, LogLevel.error, logMeta); + writeMessageToConsole(`${message}. Reason: ${logReason}`, LogLevelEnum.error, logMeta); }; const writeStatusChangeToConsole = (args: NormalizedStatusChangeArgs, logMeta: ExtMeta): void => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts index fae8b6cfe9f5c..669f3d7e5ee04 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts @@ -9,7 +9,6 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEventLogClient, IValidatedEvent } from '@kbn/event-log-plugin/server'; import { MAX_EXECUTION_EVENTS_DISPLAYED } from '@kbn/securitysolution-rules'; -import { prepareKQLStringParam } from '../../../../../../../common/utils/kql'; import type { GetRuleExecutionEventsResponse, GetRuleExecutionResultsResponse, @@ -17,10 +16,11 @@ import type { } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { LogLevel, - logLevelFromString, + LogLevelEnum, RuleExecutionEventType, - ruleExecutionEventTypeFromString, + RuleExecutionEventTypeEnum, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { prepareKQLStringParam } from '../../../../../../../common/utils/kql'; import { assertUnreachable } from '../../../../../../../common/utility_types'; import { invariant } from '../../../../../../../common/utils/invariant'; @@ -38,11 +38,11 @@ import { } from './aggregations/execution_results'; import type { ExecutionUuidAggResult } from './aggregations/execution_results/types'; -import * as f from '../../event_log/event_log_fields'; import { RULE_EXECUTION_LOG_PROVIDER, RULE_SAVED_OBJECT_TYPE, } from '../../event_log/event_log_constants'; +import * as f from '../../event_log/event_log_fields'; export interface IEventLogReader { getExecutionEvents(args: GetExecutionEventsArgs): Promise; @@ -211,25 +211,27 @@ const normalizeEventSequence = (event: RawEvent): number => { const normalizeLogLevel = (event: RawEvent): LogLevel => { const value = event.log?.level; if (!value) { - return LogLevel.debug; + return LogLevelEnum.debug; } - return logLevelFromString(value) ?? LogLevel.trace; + const result = LogLevel.safeParse(value); + return result.success ? result.data : LogLevelEnum.trace; }; const normalizeEventType = (event: RawEvent): RuleExecutionEventType => { const value = event.event?.action; invariant(value, 'Required "event.action" field is not found'); - return ruleExecutionEventTypeFromString(value) ?? RuleExecutionEventType.message; + const result = RuleExecutionEventType.safeParse(value); + return result.success ? result.data : RuleExecutionEventTypeEnum.message; }; const normalizeEventMessage = (event: RawEvent, type: RuleExecutionEventType): string => { - if (type === RuleExecutionEventType.message) { + if (type === RuleExecutionEventTypeEnum.message) { return event.message || ''; } - if (type === RuleExecutionEventType['status-change']) { + if (type === RuleExecutionEventTypeEnum['status-change']) { invariant( event.kibana?.alert?.rule?.execution?.status, 'Required "kibana.alert.rule.execution.status" field is not found' @@ -241,7 +243,7 @@ const normalizeEventMessage = (event: RawEvent, type: RuleExecutionEventType): s return `Rule changed status to "${status}". ${message}`; } - if (type === RuleExecutionEventType['execution-metrics']) { + if (type === RuleExecutionEventTypeEnum['execution-metrics']) { invariant( event.kibana?.alert?.rule?.execution?.metrics, 'Required "kibana.alert.rule.execution.metrics" field is not found' diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts index 89696e7175a30..b0963546100e2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts @@ -8,17 +8,20 @@ import { SavedObjectsUtils } from '@kbn/core/server'; import type { IEventLogService } from '@kbn/event-log-plugin/server'; import { SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; +import type { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, logLevelFromExecutionStatus, logLevelToNumber, - RuleExecutionEventType, ruleExecutionStatusToNumber, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import type { RuleExecutionMetrics, RuleExecutionStatus, } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; +import { + LogLevelEnum, + RuleExecutionEventTypeEnum, +} from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; import { RULE_SAVED_OBJECT_TYPE, RULE_EXECUTION_LOG_PROVIDER, @@ -74,7 +77,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'event', - action: RuleExecutionEventType.message, + action: RuleExecutionEventTypeEnum.message, sequence: sequence++, severity: logLevelToNumber(args.logLevel), }, @@ -116,7 +119,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'event', - action: RuleExecutionEventType['status-change'], + action: RuleExecutionEventTypeEnum['status-change'], sequence: sequence++, severity: logLevelToNumber(logLevel), }, @@ -148,7 +151,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, logExecutionMetrics: (args: ExecutionMetricsArgs): void => { - const logLevel = LogLevel.debug; + const logLevel = LogLevelEnum.debug; eventLogger.logEvent({ '@timestamp': nowISO(), rule: { @@ -159,7 +162,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'metric', - action: RuleExecutionEventType['execution-metrics'], + action: RuleExecutionEventTypeEnum['execution-metrics'], sequence: sequence++, severity: logLevelToNumber(logLevel), }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts index fcec7e98c06c2..672434bfc94d0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts @@ -7,7 +7,7 @@ import { getScheduleNotificationResponseActionsService } from './schedule_notification_response_actions'; import type { RuleResponseAction } from '../../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; describe('ScheduleNotificationResponseActions', () => { const signalOne = { agent: { id: 'agent-id-1' }, _id: 'alert-id-1', user: { id: 'S-1-5-20' } }; @@ -68,7 +68,7 @@ describe('ScheduleNotificationResponseActions', () => { it('should handle osquery response actions with query', async () => { const responseActions: RuleResponseAction[] = [ { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ...defaultQueryParams, query: simpleQuery, @@ -86,7 +86,7 @@ describe('ScheduleNotificationResponseActions', () => { it('should handle osquery response actions with packs', async () => { const responseActions: RuleResponseAction[] = [ { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ...defaultPackParams, queries: [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts index 25efe01d15f05..a02fafe69d8f6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts @@ -8,7 +8,7 @@ import { each } from 'lodash'; import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import type { SetupPlugins } from '../../../plugin_contract'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; import { osqueryResponseAction } from './osquery_response_action'; import { endpointResponseAction } from './endpoint_response_action'; import type { ScheduleNotificationActions } from '../rule_types/types'; @@ -29,14 +29,14 @@ export const getScheduleNotificationResponseActionsService = each(responseActions, (responseAction) => { if ( - responseAction.actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY && + responseAction.actionTypeId === ResponseActionTypesEnum['.osquery'] && osqueryCreateActionService ) { osqueryResponseAction(responseAction, osqueryCreateActionService, { alerts, }); } - if (responseAction.actionTypeId === RESPONSE_ACTION_TYPES.ENDPOINT) { + if (responseAction.actionTypeId === ResponseActionTypesEnum['.endpoint']) { endpointResponseAction(responseAction, endpointAppContextService, { alerts, }); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts index 382e902424b5f..6404da38cdde7 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts @@ -446,7 +446,9 @@ export default ({ getService }: FtrProviderContext): void => { .send([{ ...getSimpleRule(), investigation_fields: ['foo'] }]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 22 more' + ); }); }); }); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts index 1b2fcee9c7143..b2000305a4dbb 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts @@ -719,7 +719,9 @@ export default ({ getService }: FtrProviderContext) => { }) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 3 more' + ); }); it('should patch a rule with a legacy investigation field and transform response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts index 4e7010a37dd49..91c18b2cfa6cc 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts @@ -542,7 +542,9 @@ export default ({ getService }: FtrProviderContext) => { ]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 3 more' + ); }); it('should patch a rule with a legacy investigation field and transform field in response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts index e9234d47a1816..2529e794089a9 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts @@ -16,8 +16,8 @@ import { } from '@kbn/security-solution-plugin/common/constants'; import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; import { - BulkActionType, - BulkActionEditType, + BulkActionTypeEnum, + BulkActionEditTypeEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management'; import { getCreateExceptionListDetectionSchemaMock } from '@kbn/lists-plugin/common/schemas/request/create_exception_list_schema.mock'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; @@ -106,7 +106,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule()); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -177,7 +177,7 @@ export default ({ getService }: FtrProviderContext): void => { }; const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -234,7 +234,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, testRule); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -269,7 +269,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -290,7 +290,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId)); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -326,7 +326,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -363,7 +363,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId, true)); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -399,7 +399,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -437,7 +437,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -516,7 +516,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: true, include_expired_exceptions: true }, }) .expect(200); @@ -622,7 +622,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: true, include_expired_exceptions: false }, }) .expect(200); @@ -696,7 +696,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -778,10 +778,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: tagsToOverwrite, }, ], @@ -835,10 +835,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_tags, + type: BulkActionEditTypeEnum.delete_tags, value: tagsToDelete, }, ], @@ -891,10 +891,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: addedTags, }, ], @@ -925,21 +925,21 @@ export default ({ getService }: FtrProviderContext): void => { existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: [], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, { caseName: '0 existing tags - 2 tags = 0 tags', existingTags: [], tagsToUpdate: ['tag4', 'tag5'], resultingTags: [], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, { caseName: '3 existing tags - 2 other tags (none of them) = 3 tags', existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: ['tag4', 'tag5'], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, // Add no-ops { @@ -947,14 +947,14 @@ export default ({ getService }: FtrProviderContext): void => { existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: ['tag1', 'tag2'], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.add_tags, + operation: BulkActionEditTypeEnum.add_tags, }, { caseName: '3 existing tags + 0 tags = 3 tags', existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: [], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.add_tags, + operation: BulkActionEditTypeEnum.add_tags, }, ]; @@ -968,8 +968,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: operation, value: tagsToUpdate, @@ -1007,10 +1007,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], }, ], @@ -1042,10 +1042,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index3-*'], }, ], @@ -1079,10 +1079,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index2-*'], }, ], @@ -1113,10 +1113,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1143,10 +1143,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [esqlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1176,10 +1176,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], }, ], @@ -1209,10 +1209,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: [], }, ], @@ -1244,21 +1244,21 @@ export default ({ getService }: FtrProviderContext): void => { existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: [], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, { caseName: '0 existing indeces - 2 indeces = 0 indeces', existingIndexPatterns: [], indexPatternsToUpdate: ['index1-*', 'index2-*'], resultingIndexPatterns: [], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, { caseName: '3 existing indeces - 2 other indeces (none of them) = 3 indeces', existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: ['index8-*', 'index9-*'], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, // Add no-ops { @@ -1266,14 +1266,14 @@ export default ({ getService }: FtrProviderContext): void => { existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: ['index1-*', 'index2-*'], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.add_index_patterns, + operation: BulkActionEditTypeEnum.add_index_patterns, }, { caseName: '3 existing indeces + 0 indeces = 3 indeces', existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: [], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.add_index_patterns, + operation: BulkActionEditTypeEnum.add_index_patterns, }, ]; @@ -1296,8 +1296,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: operation, value: indexPatternsToUpdate, @@ -1353,10 +1353,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setTagsBody } = await postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -1401,10 +1401,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -1444,10 +1444,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: '', timeline_title: '', @@ -1476,10 +1476,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1509,10 +1509,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], }, ], @@ -1538,10 +1538,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['test'], }, ], @@ -1559,35 +1559,35 @@ export default ({ getService }: FtrProviderContext): void => { describe('prebuilt rules', () => { const cases = [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['new-tag'], }, { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['new-tag'], }, { - type: BulkActionEditType.delete_tags, + type: BulkActionEditTypeEnum.delete_tags, value: ['new-tag'], }, { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'mock-id', timeline_title: 'mock-title' }, }, { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', lookback: '1m' }, }, ]; @@ -1599,8 +1599,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type, value, @@ -1648,10 +1648,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1706,10 +1706,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1766,10 +1766,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [], @@ -1818,10 +1818,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1871,10 +1871,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -1931,10 +1931,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -2004,10 +2004,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -2069,10 +2069,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [], @@ -2120,10 +2120,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [], @@ -2147,10 +2147,10 @@ export default ({ getService }: FtrProviderContext): void => { describe('prebuilt rules', () => { const cases = [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, }, { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, }, ]; cases.forEach(({ type }) => { @@ -2162,8 +2162,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type, value: { @@ -2220,10 +2220,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -2235,7 +2235,7 @@ export default ({ getService }: FtrProviderContext): void => { }, }, { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['tag-1'], }, ], @@ -2290,10 +2290,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: payloadThrottle, actions: [], @@ -2331,62 +2331,63 @@ export default ({ getService }: FtrProviderContext): void => { expectedThrottle: undefined, }, ]; - [BulkActionEditType.set_rule_actions, BulkActionEditType.add_rule_actions].forEach( - (ruleAction) => { - casesForNonEmptyActions.forEach(({ payloadThrottle, expectedThrottle }) => { - it(`throttle is updated correctly for rule action "${ruleAction}", if payload throttle="${payloadThrottle}" and actions non empty`, async () => { - // create a new connector - const webHookConnector = await createWebHookConnector(); - - const ruleId = 'ruleId'; - const createdRule = await createRule(supertest, log, getSimpleRule(ruleId)); - - const { body } = await postBulkAction() - .send({ - ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { - type: BulkActionEditType.set_rule_actions, - value: { - throttle: payloadThrottle, - actions: [ - { - id: webHookConnector.id, - group: 'default', - params: { body: '{}' }, - }, - ], - }, + [ + BulkActionEditTypeEnum.set_rule_actions, + BulkActionEditTypeEnum.add_rule_actions, + ].forEach((ruleAction) => { + casesForNonEmptyActions.forEach(({ payloadThrottle, expectedThrottle }) => { + it(`throttle is updated correctly for rule action "${ruleAction}", if payload throttle="${payloadThrottle}" and actions non empty`, async () => { + // create a new connector + const webHookConnector = await createWebHookConnector(); + + const ruleId = 'ruleId'; + const createdRule = await createRule(supertest, log, getSimpleRule(ruleId)); + + const { body } = await postBulkAction() + .send({ + ids: [createdRule.id], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { + type: BulkActionEditTypeEnum.set_rule_actions, + value: { + throttle: payloadThrottle, + actions: [ + { + id: webHookConnector.id, + group: 'default', + params: { body: '{}' }, + }, + ], }, - ], - }) - .expect(200); - - // Check that the updated rule is returned with the response - expect(body.attributes.results.updated[0].throttle).to.eql(expectedThrottle); - - const expectedActions = body.attributes.results.updated[0].actions.map( - (action: any) => ({ - ...action, - frequency: { - summary: true, - throttle: payloadThrottle !== 'rule' ? payloadThrottle : null, - notifyWhen: - payloadThrottle !== 'rule' ? 'onThrottleInterval' : 'onActiveAlert', }, - }) - ); + ], + }) + .expect(200); + + // Check that the updated rule is returned with the response + expect(body.attributes.results.updated[0].throttle).to.eql(expectedThrottle); + + const expectedActions = body.attributes.results.updated[0].actions.map( + (action: any) => ({ + ...action, + frequency: { + summary: true, + throttle: payloadThrottle !== 'rule' ? payloadThrottle : null, + notifyWhen: + payloadThrottle !== 'rule' ? 'onThrottleInterval' : 'onActiveAlert', + }, + }) + ); - // Check that the updates have been persisted - const { body: rule } = await fetchRule(ruleId).expect(200); + // Check that the updates have been persisted + const { body: rule } = await fetchRule(ruleId).expect(200); - expect(rule.throttle).to.eql(expectedThrottle); - expect(rule.actions).to.eql(expectedActions); - }); + expect(rule.throttle).to.eql(expectedThrottle); + expect(rule.actions).to.eql(expectedActions); }); - } - ); + }); + }); }); describe('notifyWhen', () => { @@ -2409,10 +2410,10 @@ export default ({ getService }: FtrProviderContext): void => { await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: payload.throttle, actions: [], @@ -2443,10 +2444,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval, lookback, @@ -2458,8 +2459,8 @@ export default ({ getService }: FtrProviderContext): void => { expect(body.statusCode).to.eql(400); expect(body.error).to.eql('Bad Request'); - expect(body.message).to.contain('Invalid value "0m" supplied to "edit,value,interval"'); - expect(body.message).to.contain('Invalid value "-1m" supplied to "edit,value,lookback"'); + expect(body.message).to.contain('edit.0.value.interval: Invalid'); + expect(body.message).to.contain('edit.0.value.lookback: Invalid'); }); it('should update schedule values in rules with a valid payload', async () => { @@ -2473,10 +2474,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval, lookback, @@ -2511,10 +2512,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], overwrite_data_views: true, }, @@ -2552,10 +2553,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], overwrite_data_views: false, }, @@ -2597,10 +2598,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], overwrite_data_views: true, }, @@ -2638,10 +2639,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: [], overwrite_data_views: true, }, @@ -2674,10 +2675,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], overwrite_data_views: false, }, @@ -2720,10 +2721,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: true, }, @@ -2761,10 +2762,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: true, }, @@ -2797,10 +2798,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: false, }, @@ -2830,14 +2831,14 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], }, { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag3'], }, ], @@ -2868,16 +2869,16 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ // Valid operation { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], }, // Operation to be skipped { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag1'], }, ], @@ -2908,16 +2909,16 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ // Operation to be skipped { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index1-*'], }, // Operation to be skipped { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag1'], }, ], @@ -2949,10 +2950,10 @@ export default ({ getService }: FtrProviderContext): void => { Array.from({ length: 10 }).map(() => postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -2978,10 +2979,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -3033,7 +3034,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should export rules with legacy investigation_fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -3094,7 +3095,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should delete rules with investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3124,7 +3125,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should enable rules with legacy investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3188,7 +3189,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should disable rules with legacy investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3251,7 +3252,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -3353,10 +3354,10 @@ export default ({ getService }: FtrProviderContext): void => { it('should edit rules with legacy investigation fields', async () => { const { body } = await postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts index a6df465d09f68..f1df03187379c 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts @@ -12,8 +12,8 @@ import { getCreateEsqlRulesSchemaMock } from '@kbn/security-solution-plugin/comm import expect from 'expect'; import { - BulkActionType, - BulkActionEditType, + BulkActionTypeEnum, + BulkActionEditTypeEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { @@ -65,7 +65,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule()); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.export }) + .send({ action: BulkActionTypeEnum.export }) .expect(400); expect(body).toEqual({ @@ -80,7 +80,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, testRule); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.delete }) + .send({ action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -101,7 +101,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId)); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.enable }) + .send({ action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -123,7 +123,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId, true)); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.disable }) + .send({ action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -146,7 +146,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, ruleToDuplicate); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.disable }) + .send({ action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -172,10 +172,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -208,10 +208,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [immutableRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -242,9 +242,9 @@ export default ({ getService }: FtrProviderContext): void => { describe('validate updating index pattern for machine learning rule', () => { const actions = [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.set_index_patterns, - BulkActionEditType.delete_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, ]; actions.forEach((editAction) => { @@ -254,8 +254,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: editAction, value: [], @@ -295,9 +295,9 @@ export default ({ getService }: FtrProviderContext): void => { describe('validate updating index pattern for ES|QL rule', () => { const actions = [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.set_index_patterns, - BulkActionEditType.delete_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, ]; actions.forEach((editAction) => { @@ -307,8 +307,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [esqlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: editAction, value: [], diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts index 7c2d88620924f..d88ed8a898f90 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts @@ -566,7 +566,8 @@ export default ({ getService }: FtrProviderContext) => { expect(body).to.eql({ error: 'Bad Request', - message: '[request body]: Invalid input', + message: + '[request body]: type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", saved_id: Required, and 14 more', statusCode: 400, }); }); @@ -955,7 +956,9 @@ export default ({ getService }: FtrProviderContext) => { .send(updatedRule) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 22 more' + ); }); it('unsets legacy investigation fields when field not specified for update', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts index b5dbf7fca40f2..a3defbb6d1c82 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts @@ -853,7 +853,9 @@ export default ({ getService }: FtrProviderContext) => { ]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 22 more' + ); }); it('updates a rule with legacy investigation fields and transforms field in response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts index 69425ac7fa4fc..4c38edaf0cd28 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts @@ -28,7 +28,7 @@ import { v4 as uuidv4 } from 'uuid'; import { QueryRuleCreateProps, - BulkActionType, + BulkActionTypeEnum, AlertSuppressionMissingFieldsStrategyEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine'; import { RuleExecutionStatusEnum } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_monitoring'; @@ -2296,7 +2296,7 @@ export default ({ getService }: FtrProviderContext) => { .post(DETECTION_ENGINE_RULES_BULK_ACTION) .set('kbn-xsrf', 'true') .set('elastic-api-version', '2023-10-31') - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); // Confirming that enabling did not migrate rule, so rule diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts index 97b602c4db617..5ace976f1f4fc 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts @@ -467,7 +467,8 @@ export default ({ getService }: FtrProviderContext) => { expect(body).to.eql({ error: 'Bad Request', - message: '[request body]: Invalid input', + message: + '[request body]: type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", saved_id: Required, and 14 more', statusCode: 400, }); }); @@ -574,7 +575,9 @@ export default ({ getService }: FtrProviderContext) => { .send(rule) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 22 more' + ); }); }); }); From 43f9712dd5fa3350d3a5ec917015e63be1e2b82f Mon Sep 17 00:00:00 2001 From: Marco Antonio Ghiani Date: Wed, 8 Nov 2023 12:35:25 +0100 Subject: [PATCH 23/46] [Log Explorer] Flyout details ai assistant registration (#170658) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 📓 Summary Closes #169506 This PR introduces a mechanism to apply customizations on the LogExplorer component. The first necessary customization which is implemented is for the flyout detail, allowing the consumer to display additional content on top of what is already displayed. This is a temporary solution which will be updated and embedded in a more structured customization system as a result of the work done for https://github.com/elastic/kibana/issues/165255. The current solution creates already a context to allow granular consumption of the customizations only for those subtrees where a specific customization should apply. The LogAIAssistant is used to customize the current LogExplorer as the first usage of this customization. https://github.com/elastic/kibana/assets/34506779/c9e6b40e-e636-456a-9e19-1778c26142db --------- Co-authored-by: Marco Antonio Ghiani Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../components/log_explorer/log_explorer.tsx | 8 +-- .../public/components/log_explorer/types.ts | 25 +++++++++ .../customizations/custom_flyout_content.tsx | 25 +++++++-- .../customizations/log_explorer_profile.tsx | 14 ++++- .../hooks/use_log_explorer_customizations.ts | 17 +++++++ x-pack/plugins/log_explorer/public/index.ts | 4 ++ .../components/log_ai_assistant/index.tsx | 21 ++++---- .../log_ai_assistant.mock.tsx | 10 ++++ .../log_ai_assistant/log_ai_assistant.tsx | 26 ++++++++-- .../log_entry_flyout/log_entry_flyout.tsx | 2 +- x-pack/plugins/logs_shared/public/index.ts | 1 + x-pack/plugins/logs_shared/public/mocks.tsx | 2 + x-pack/plugins/logs_shared/public/types.ts | 2 + .../observability_log_explorer/kibana.jsonc | 1 + .../flyout_content.tsx | 51 +++++++++++++++++++ .../log_explorer_customizations/index.ts | 15 ++++++ .../public/routes/main/main_route.tsx | 11 +++- .../public/types.ts | 2 + .../observability_log_explorer/tsconfig.json | 3 +- 19 files changed, 215 insertions(+), 25 deletions(-) create mode 100644 x-pack/plugins/log_explorer/public/components/log_explorer/types.ts create mode 100644 x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts create mode 100644 x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx create mode 100644 x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx create mode 100644 x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx index 0612713085224..57736dd4b96dd 100644 --- a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx @@ -17,6 +17,7 @@ import { createLogExplorerProfileCustomizations } from '../../customizations/log import { createPropertyGetProxy } from '../../utils/proxies'; import { LogExplorerProfileContext } from '../../state_machines/log_explorer_profile'; import { LogExplorerStartDeps } from '../../types'; +import { LogExplorerCustomizations } from './types'; export interface CreateLogExplorerArgs { core: CoreStart; @@ -29,6 +30,7 @@ export interface LogExplorerStateContainer { } export interface LogExplorerProps { + customizations?: LogExplorerCustomizations; scopedHistory: ScopedHistory; state$?: BehaviorSubject; } @@ -44,10 +46,10 @@ export const createLogExplorer = ({ core, plugins }: CreateLogExplorerArgs) => { uiSettings: createUiSettingsServiceProxy(core.uiSettings), }; - return ({ scopedHistory, state$ }: LogExplorerProps) => { + return ({ customizations = {}, scopedHistory, state$ }: LogExplorerProps) => { const logExplorerCustomizations = useMemo( - () => [createLogExplorerProfileCustomizations({ core, plugins, state$ })], - [state$] + () => [createLogExplorerProfileCustomizations({ core, customizations, plugins, state$ })], + [customizations, state$] ); return ( diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts b/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts new file mode 100644 index 0000000000000..2b366cce7c55c --- /dev/null +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts @@ -0,0 +1,25 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DataTableRecord } from '@kbn/discover-utils/types'; + +export type RenderPreviousContent = () => React.ReactNode; + +export interface LogExplorerFlyoutContentProps { + doc: DataTableRecord; +} + +export type FlyoutRenderContent = ( + renderPreviousContent: RenderPreviousContent, + props: LogExplorerFlyoutContentProps +) => React.ReactNode; + +export interface LogExplorerCustomizations { + flyout?: { + renderContent?: FlyoutRenderContent; + }; +} diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx index a4b473119744a..e7a5b7ed35915 100644 --- a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React from 'react'; +import React, { useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FlyoutDetail } from '../components/flyout_detail/flyout_detail'; import { FlyoutProps } from '../components/flyout_detail'; +import { useLogExplorerCustomizationsContext } from '../hooks/use_log_explorer_customizations'; export const CustomFlyoutContent = ({ actions, @@ -16,12 +17,28 @@ export const CustomFlyoutContent = ({ doc, renderDefaultContent, }: FlyoutProps) => { + const { flyout } = useLogExplorerCustomizationsContext(); + + const renderPreviousContent = useCallback( + () => ( + <> + {/* Apply custom Log Explorer detail */} + + + + + ), + [actions, dataView, doc] + ); + + const content = flyout?.renderContent + ? flyout?.renderContent(renderPreviousContent, { doc }) + : renderPreviousContent(); + return ( {/* Apply custom Log Explorer detail */} - - - + {content} {/* Restore default content */} {renderDefaultContent()} diff --git a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx index 85d1284752977..628ff40babc22 100644 --- a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx @@ -14,6 +14,8 @@ import { LogExplorerProfileStateService } from '../state_machines/log_explorer_p import { LogExplorerStateContainer } from '../components/log_explorer'; import { LogExplorerStartDeps } from '../types'; import { useKibanaContextForPluginProvider } from '../utils/use_kibana'; +import { LogExplorerCustomizations } from '../components/log_explorer/types'; +import { LogExplorerCustomizationsProvider } from '../hooks/use_log_explorer_customizations'; const LazyCustomDatasetFilters = dynamic(() => import('./custom_dataset_filters')); const LazyCustomDatasetSelector = dynamic(() => import('./custom_dataset_selector')); @@ -21,12 +23,18 @@ const LazyCustomFlyoutContent = dynamic(() => import('./custom_flyout_content')) export interface CreateLogExplorerProfileCustomizationsDeps { core: CoreStart; + customizations: LogExplorerCustomizations; plugins: LogExplorerStartDeps; state$?: BehaviorSubject; } export const createLogExplorerProfileCustomizations = - ({ core, plugins, state$ }: CreateLogExplorerProfileCustomizationsDeps): CustomizationCallback => + ({ + core, + customizations: logExplorerCustomizations, + plugins, + state$, + }: CreateLogExplorerProfileCustomizationsDeps): CustomizationCallback => async ({ customizations, stateContainer }) => { const { data, dataViews, discover } = plugins; // Lazy load dependencies @@ -127,7 +135,9 @@ export const createLogExplorerProfileCustomizations = return ( - + + + ); }, diff --git a/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts b/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts new file mode 100644 index 0000000000000..0557e17761cb4 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts @@ -0,0 +1,17 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import createContainer from 'constate'; +import { LogExplorerCustomizations } from '../components/log_explorer/types'; + +interface UseLogExplorerCustomizationsDeps { + value: LogExplorerCustomizations; +} + +const useLogExplorerCustomizations = ({ value }: UseLogExplorerCustomizationsDeps) => value; + +export const [LogExplorerCustomizationsProvider, useLogExplorerCustomizationsContext] = + createContainer(useLogExplorerCustomizations); diff --git a/x-pack/plugins/log_explorer/public/index.ts b/x-pack/plugins/log_explorer/public/index.ts index 00750926517e6..1ca7f37aa4c9b 100644 --- a/x-pack/plugins/log_explorer/public/index.ts +++ b/x-pack/plugins/log_explorer/public/index.ts @@ -10,6 +10,10 @@ import type { LogExplorerConfig } from '../common/plugin_config'; import { LogExplorerPlugin } from './plugin'; export type { LogExplorerPluginSetup, LogExplorerPluginStart } from './types'; export type { LogExplorerStateContainer } from './components/log_explorer'; +export type { + LogExplorerCustomizations, + LogExplorerFlyoutContentProps, +} from './components/log_explorer/types'; export function plugin(context: PluginInitializerContext) { return new LogExplorerPlugin(context); diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx index a4df6c50cbafd..8cf9b2da45c06 100644 --- a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx @@ -4,22 +4,25 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import React, { ComponentType } from 'react'; import { Optional } from '@kbn/utility-types'; import { dynamic } from '../../../common/dynamic'; -import type { LogAIAssistantProps } from './log_ai_assistant'; +import type { LogAIAssistantDeps } from './log_ai_assistant'; export const LogAIAssistant = dynamic(() => import('./log_ai_assistant')); interface LogAIAssistantFactoryDeps { - observabilityAIAssistant: LogAIAssistantProps['aiAssistant']; + observabilityAIAssistant: LogAIAssistantDeps['observabilityAIAssistant']; } -export function createLogAIAssistant({ observabilityAIAssistant }: LogAIAssistantFactoryDeps) { - return ({ - aiAssistant = observabilityAIAssistant, - ...props - }: Optional) => ( - +export type LogAIAssistantComponent = ComponentType< + Optional +>; + +export function createLogAIAssistant({ + observabilityAIAssistant: aiAssistant, +}: LogAIAssistantFactoryDeps): LogAIAssistantComponent { + return ({ observabilityAIAssistant = aiAssistant, ...props }) => ( + ); } diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx new file mode 100644 index 0000000000000..9ece10dff8188 --- /dev/null +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +export const createLogAIAssistantMock = () => jest.fn().mockReturnValue(
); diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx index bce36a6d28dc6..335a02ab3a05e 100644 --- a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx @@ -12,6 +12,8 @@ import { type Message, ObservabilityAIAssistantPluginStart, MessageRole, + ObservabilityAIAssistantProvider, + useObservabilityAIAssistant, } from '@kbn/observability-ai-assistant-plugin/public'; import { LogEntryField } from '../../../common'; import { explainLogMessageTitle, similarLogMessagesTitle } from './translations'; @@ -21,11 +23,16 @@ export interface LogAIAssistantDocument { } export interface LogAIAssistantProps { - aiAssistant: ObservabilityAIAssistantPluginStart; doc: LogAIAssistantDocument | undefined; } -export function LogAIAssistant({ aiAssistant, doc }: LogAIAssistantProps) { +export interface LogAIAssistantDeps extends LogAIAssistantProps { + observabilityAIAssistant: ObservabilityAIAssistantPluginStart; +} + +export const LogAIAssistant = withProviders(({ doc }: LogAIAssistantProps) => { + const aiAssistant = useObservabilityAIAssistant(); + const explainLogMessageMessages = useMemo(() => { if (!doc) { return undefined; @@ -80,7 +87,20 @@ export function LogAIAssistant({ aiAssistant, doc }: LogAIAssistantProps) { ) : null} ); -} +}); // eslint-disable-next-line import/no-default-export export default LogAIAssistant; + +function withProviders(Component: React.FunctionComponent) { + return function ComponentWithProviders({ + observabilityAIAssistant, + ...props + }: LogAIAssistantDeps) { + return ( + + + + ); + }; +} diff --git a/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx b/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx index 62634f2aeba13..b66e864c2a499 100644 --- a/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx +++ b/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx @@ -184,7 +184,7 @@ export const LogEntryFlyout = ({ > - + diff --git a/x-pack/plugins/logs_shared/public/index.ts b/x-pack/plugins/logs_shared/public/index.ts index 873d202b1af7d..58f22fe48bccb 100644 --- a/x-pack/plugins/logs_shared/public/index.ts +++ b/x-pack/plugins/logs_shared/public/index.ts @@ -37,6 +37,7 @@ export { useLogSummary, WithSummary } from './containers/logs/log_summary'; export { useLogEntryFlyout } from './components/logging/log_entry_flyout'; // Shared components +export type { LogAIAssistantDocument } from './components/log_ai_assistant/log_ai_assistant'; export type { LogEntryStreamItem, LogEntryColumnWidths, diff --git a/x-pack/plugins/logs_shared/public/mocks.tsx b/x-pack/plugins/logs_shared/public/mocks.tsx index 963480d8fd90f..a9b0ebd6a6aa3 100644 --- a/x-pack/plugins/logs_shared/public/mocks.tsx +++ b/x-pack/plugins/logs_shared/public/mocks.tsx @@ -5,11 +5,13 @@ * 2.0. */ +import { createLogAIAssistantMock } from './components/log_ai_assistant/log_ai_assistant.mock'; import { createLogViewsServiceStartMock } from './services/log_views/log_views_service.mock'; import { LogsSharedClientStartExports } from './types'; export const createLogsSharedPluginStartMock = (): jest.Mocked => ({ logViews: createLogViewsServiceStartMock(), + LogAIAssistant: createLogAIAssistantMock(), }); export const _ensureTypeCompatibility = (): LogsSharedClientStartExports => diff --git a/x-pack/plugins/logs_shared/public/types.ts b/x-pack/plugins/logs_shared/public/types.ts index e67f83e4becc0..c0379c6fc21fb 100644 --- a/x-pack/plugins/logs_shared/public/types.ts +++ b/x-pack/plugins/logs_shared/public/types.ts @@ -17,6 +17,7 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { ObservabilityAIAssistantPluginStart } from '@kbn/observability-ai-assistant-plugin/public'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { LogAIAssistantComponent } from './components/log_ai_assistant'; // import type { OsqueryPluginStart } from '../../osquery/public'; import { LogViewsServiceSetup, LogViewsServiceStart } from './services/log_views'; @@ -27,6 +28,7 @@ export interface LogsSharedClientSetupExports { export interface LogsSharedClientStartExports { logViews: LogViewsServiceStart; + LogAIAssistant: LogAIAssistantComponent; } // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/x-pack/plugins/observability_log_explorer/kibana.jsonc b/x-pack/plugins/observability_log_explorer/kibana.jsonc index 7ac940de86dd4..6f871e114a035 100644 --- a/x-pack/plugins/observability_log_explorer/kibana.jsonc +++ b/x-pack/plugins/observability_log_explorer/kibana.jsonc @@ -15,6 +15,7 @@ "data", "discover", "logExplorer", + "logsShared", "observabilityShared", "share", "kibanaUtils", diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx new file mode 100644 index 0000000000000..53d34a71a7237 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx @@ -0,0 +1,51 @@ +/* + * 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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { EuiFlexItem } from '@elastic/eui'; +import { + LogExplorerCustomizations, + LogExplorerFlyoutContentProps, +} from '@kbn/log-explorer-plugin/public'; +import type { LogAIAssistantDocument } from '@kbn/logs-shared-plugin/public'; +import React, { useMemo } from 'react'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; + +const ObservabilityLogAIAssistant = ({ doc }: LogExplorerFlyoutContentProps) => { + const { services } = useKibanaContextForPlugin(); + const { LogAIAssistant } = services.logsShared; + + const mappedDoc = useMemo(() => mapDocToAIAssistantFormat(doc), [doc]); + + return ; +}; + +export const renderFlyoutContent: Required['flyout']['renderContent'] = ( + renderPreviousContent, + props +) => { + return ( + <> + {renderPreviousContent()} + + + + + ); +}; + +/** + * Utils + */ +const mapDocToAIAssistantFormat = (doc: LogExplorerFlyoutContentProps['doc']) => { + if (!doc) return; + + return { + fields: Object.entries(doc.flattened).map(([field, value]) => ({ + field, + value, + })) as LogAIAssistantDocument['fields'], + }; +}; diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts new file mode 100644 index 0000000000000..a86b47e92cf01 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LogExplorerCustomizations } from '@kbn/log-explorer-plugin/public'; +import { renderFlyoutContent } from './flyout_content'; + +export const createLogExplorerCustomizations = (): LogExplorerCustomizations => ({ + flyout: { + renderContent: renderFlyoutContent, + }, +}); diff --git a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx index aece8474f0390..e17f92a46c23b 100644 --- a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx +++ b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx @@ -6,7 +6,7 @@ */ import { CoreStart } from '@kbn/core/public'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; import { LogExplorerTopNavMenu } from '../../components/log_explorer_top_nav_menu'; import { ObservabilityLogExplorerPageTemplate } from '../../components/page_template'; @@ -14,6 +14,7 @@ import { noBreadcrumbs, useBreadcrumbs } from '../../utils/breadcrumbs'; import { useKibanaContextForPlugin } from '../../utils/use_kibana'; import { ObservabilityLogExplorerAppMountParameters } from '../../types'; import { LazyOriginInterpreter } from '../../state_machines/origin_interpreter/src/lazy_component'; +import { createLogExplorerCustomizations } from '../../log_explorer_customizations'; export interface ObservablityLogExplorerMainRouteProps { appParams: ObservabilityLogExplorerAppMountParameters; core: CoreStart; @@ -31,6 +32,8 @@ export const ObservablityLogExplorerMainRoute = ({ const [state$] = useState(() => new BehaviorSubject({})); + const customizations = useMemo(() => createLogExplorerCustomizations(), []); + return ( <> - + ); diff --git a/x-pack/plugins/observability_log_explorer/public/types.ts b/x-pack/plugins/observability_log_explorer/public/types.ts index 82045faea76e8..8b315ad206ce4 100644 --- a/x-pack/plugins/observability_log_explorer/public/types.ts +++ b/x-pack/plugins/observability_log_explorer/public/types.ts @@ -12,6 +12,7 @@ import { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin import { ServerlessPluginStart } from '@kbn/serverless/public'; import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { AppMountParameters, ScopedHistory } from '@kbn/core/public'; +import { LogsSharedClientStartExports } from '@kbn/logs-shared-plugin/public'; import { ObservabilityLogExplorerLocators, ObservabilityLogExplorerLocationState, @@ -33,6 +34,7 @@ export interface ObservabilityLogExplorerStartDeps { data: DataPublicPluginStart; discover: DiscoverStart; logExplorer: LogExplorerPluginStart; + logsShared: LogsSharedClientStartExports; observabilityShared: ObservabilitySharedPluginStart; serverless?: ServerlessPluginStart; share: SharePluginStart; diff --git a/x-pack/plugins/observability_log_explorer/tsconfig.json b/x-pack/plugins/observability_log_explorer/tsconfig.json index 7266e097dae62..109b54b929ec7 100644 --- a/x-pack/plugins/observability_log_explorer/tsconfig.json +++ b/x-pack/plugins/observability_log_explorer/tsconfig.json @@ -33,7 +33,8 @@ "@kbn/core-mount-utils-browser-internal", "@kbn/xstate-utils", "@kbn/shared-ux-utility", - "@kbn/ui-theme" + "@kbn/ui-theme", + "@kbn/logs-shared-plugin" ], "exclude": [ "target/**/*" From 7449cdb14f313678081b4520629b1fc8021596d6 Mon Sep 17 00:00:00 2001 From: Juan Pablo Djeredjian Date: Wed, 8 Nov 2023 12:52:54 +0100 Subject: [PATCH 24/46] [Security Solution] Revert `security_solution_cypress` package.json change (#170663) ## Summary - Reverts unintentional change to `x-pack/test/security_solution_cypress/package.json` introduced in https://github.com/elastic/kibana/pull/169182 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts | 2 +- x-pack/test/security_solution_cypress/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index d543843641b78..ac6c723dbc0c6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -76,7 +76,7 @@ const expectedSlackMessage = 'Slack action test message'; describe( 'Detection rules, bulk edit of rule actions', - { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, + { tags: ['@ess', '@serverless', '@brokenInServerless', '@brokenInServerlessQA'] }, () => { beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 67125c9c55daa..0e34d7867d37a 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -7,7 +7,7 @@ "scripts": { "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/exceptions/shared_exception_lists_management/**/*.cy.ts'", + "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_response|exceptions)/**/*.cy.ts'", @@ -21,7 +21,7 @@ "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", - "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/exceptions/shared_exception_lists_management/**/*.cy.ts'", + "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", From 8ddf511c42ded98b5b83f60bc9205b320f6ba70a Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Wed, 8 Nov 2023 14:24:31 +0100 Subject: [PATCH 25/46] [EDR Worfklows] Osquery rules flaky test (#170832) --- .../osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts | 1 + x-pack/plugins/osquery/cypress/tasks/response_actions.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts index 15fb98540e438..cb4ce27a69031 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts @@ -63,6 +63,7 @@ describe('Alert Event Details - Response Actions Form', { tags: ['@ess', '@serve cy.getBySel('globalLoadingIndicator').should('not.exist'); closeDateTabIfVisible(); cy.getBySel('edit-rule-actions-tab').click(); + cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.contains('Response actions are run on each rule execution.'); cy.getBySel(OSQUERY_RESPONSE_ACTION_ADD_BUTTON).click(); cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { diff --git a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts index 3f59ebca9f560..d686392431b7a 100644 --- a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts +++ b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts @@ -45,6 +45,7 @@ export const checkOsqueryResponseActionsPermissions = (enabled: boolean) => { cy.getBySel('globalLoadingIndicator').should('not.exist'); closeDateTabIfVisible(); cy.getBySel('edit-rule-actions-tab').click(); + cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.contains('Response actions are run on each rule execution.'); cy.getBySel(OSQUERY_RESPONSE_ACTION_ADD_BUTTON).click(); if (enabled) { From 4199d03df69355243bb5a4b2fcad13713a512335 Mon Sep 17 00:00:00 2001 From: Sander Philipse <94373878+sphilipse@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:48:08 +0100 Subject: [PATCH 26/46] [Serverless Search] Update sidenav (#170774) ## Summary This updates the Serverless Search sidenav to match the design, and add Connectors. Screenshot 2023-11-07 at 17 48 53 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../serverless_search/public/layout/nav.tsx | 110 ++++++++---------- .../translations/translations/fr-FR.json | 3 - .../translations/translations/ja-JP.json | 3 - .../translations/translations/zh-CN.json | 3 - .../test_suites/search/navigation.ts | 12 +- 5 files changed, 50 insertions(+), 81 deletions(-) diff --git a/x-pack/plugins/serverless_search/public/layout/nav.tsx b/x-pack/plugins/serverless_search/public/layout/nav.tsx index 3aaa1ae62884c..7d4b2fd7d0fd1 100644 --- a/x-pack/plugins/serverless_search/public/layout/nav.tsx +++ b/x-pack/plugins/serverless_search/public/layout/nav.tsx @@ -15,6 +15,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import type { ServerlessPluginStart } from '@kbn/serverless/public'; import type { CloudStart } from '@kbn/cloud-plugin/public'; +import { CONNECTORS_LABEL } from '../../common/i18n_string'; const navigationTree: NavigationTreeDefinition = { body: [ @@ -37,79 +38,60 @@ const navigationTree: NavigationTreeDefinition = { getIsActive: ({ pathNameSerialized, prepend }) => { return pathNameSerialized.startsWith(prepend('/app/dev_tools')); }, + spaceBefore: 'l', }, { - id: 'explore', - title: i18n.translate('xpack.serverlessSearch.nav.explore', { - defaultMessage: 'Explore', + link: 'discover', + spaceBefore: 'm', + }, + { + link: 'dashboards', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/dashboards')); + }, + }, + { + link: 'visualize', + title: i18n.translate('xpack.serverlessSearch.nav.visualize', { + defaultMessage: 'Visualizations', }), - children: [ - { - link: 'discover', - }, - { - link: 'dashboards', - getIsActive: ({ pathNameSerialized, prepend }) => { - return pathNameSerialized.startsWith(prepend('/app/dashboards')); - }, - }, - { - link: 'visualize', - title: i18n.translate('xpack.serverlessSearch.nav.visualize', { - defaultMessage: 'Visualizations', - }), - getIsActive: ({ pathNameSerialized, prepend }) => { - return ( - pathNameSerialized.startsWith(prepend('/app/visualize')) || - pathNameSerialized.startsWith(prepend('/app/lens')) || - pathNameSerialized.startsWith(prepend('/app/maps')) - ); - }, - }, - { - link: 'management:triggersActions', - title: i18n.translate('xpack.serverlessSearch.nav.alerts', { - defaultMessage: 'Alerts', - }), - }, - ], + getIsActive: ({ pathNameSerialized, prepend }) => { + return ( + pathNameSerialized.startsWith(prepend('/app/visualize')) || + pathNameSerialized.startsWith(prepend('/app/lens')) || + pathNameSerialized.startsWith(prepend('/app/maps')) + ); + }, }, { - id: 'content', - title: i18n.translate('xpack.serverlessSearch.nav.content', { - defaultMessage: 'Content', + link: 'management:triggersActions', + title: i18n.translate('xpack.serverlessSearch.nav.alerts', { + defaultMessage: 'Alerts', }), - children: [ - { - title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { - defaultMessage: 'Index Management', - }), - link: 'management:index_management', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - { - title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', { - defaultMessage: 'Pipelines', - }), - link: 'management:ingest_pipelines', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - ], }, { - id: 'security', - title: i18n.translate('xpack.serverlessSearch.nav.security', { - defaultMessage: 'Security', + title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { + defaultMessage: 'Index Management', }), - children: [ - { - link: 'management:api_keys', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - ], + link: 'management:index_management', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + spaceBefore: 'm', + }, + { + title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', { + defaultMessage: 'Pipelines', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: CONNECTORS_LABEL, + link: 'serverlessConnectors', + }, + { + link: 'management:api_keys', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + spaceBefore: 'm', }, ], }, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index c06aff873c9bf..9024c08ddcc3d 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -37250,16 +37250,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "En savoir plus", "xpack.serverlessSearch.nav.alerts": "Alertes", - "xpack.serverlessSearch.nav.content": "Contenu", "xpack.serverlessSearch.nav.content.indices": "Gestion des index", "xpack.serverlessSearch.nav.content.pipelines": "Pipelines", "xpack.serverlessSearch.nav.devTools": "Outils de développement", - "xpack.serverlessSearch.nav.explore": "Explorer", "xpack.serverlessSearch.nav.gettingStarted": "Premiers pas", "xpack.serverlessSearch.nav.mngt": "Gestion", "xpack.serverlessSearch.nav.performance": "Performances", "xpack.serverlessSearch.nav.projectSettings": "Paramètres de projet", - "xpack.serverlessSearch.nav.security": "Sécurité", "xpack.serverlessSearch.next": "Suivant", "xpack.serverlessSearch.optional": "Facultatif", "xpack.serverlessSearch.overview.footer.description": "Votre point de terminaison Elasticsearch est configuré et vous avez effectué quelques requêtes de base. Vous voilà prêt à approfondir les outils et les cas d'utilisation avancés.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5f27f5b60da13..6f0fada5b569d 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -37248,16 +37248,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "詳細", "xpack.serverlessSearch.nav.alerts": "アラート", - "xpack.serverlessSearch.nav.content": "コンテンツ", "xpack.serverlessSearch.nav.content.indices": "インデックス管理", "xpack.serverlessSearch.nav.content.pipelines": "パイプライン", "xpack.serverlessSearch.nav.devTools": "開発ツール", - "xpack.serverlessSearch.nav.explore": "探索", "xpack.serverlessSearch.nav.gettingStarted": "はじめて使う", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "パフォーマンス", "xpack.serverlessSearch.nav.projectSettings": "プロジェクト設定", - "xpack.serverlessSearch.nav.security": "セキュリティ", "xpack.serverlessSearch.next": "次へ", "xpack.serverlessSearch.optional": "オプション", "xpack.serverlessSearch.overview.footer.description": "Elasticsearchエンドポイントが設定され、いくつかの基本的なクエリが作成されました。これで、より高度なツールやユースケースを使いこなす準備が整いました。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 7c8328a39f987..307ba7316f7fc 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -37244,16 +37244,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "了解详情", "xpack.serverlessSearch.nav.alerts": "告警", - "xpack.serverlessSearch.nav.content": "内容", "xpack.serverlessSearch.nav.content.indices": "索引管理", "xpack.serverlessSearch.nav.content.pipelines": "管道", "xpack.serverlessSearch.nav.devTools": "开发工具", - "xpack.serverlessSearch.nav.explore": "浏览", "xpack.serverlessSearch.nav.gettingStarted": "入门", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "性能", "xpack.serverlessSearch.nav.projectSettings": "项目设置", - "xpack.serverlessSearch.nav.security": "安全", "xpack.serverlessSearch.next": "下一步", "xpack.serverlessSearch.optional": "可选", "xpack.serverlessSearch.overview.footer.description": "已设置您的 Elasticsearch 终端,并且您已提出一些基本查询。现在您已准备就绪,可以更深入地了解更多高级工具和用例。", diff --git a/x-pack/test_serverless/functional/test_suites/search/navigation.ts b/x-pack/test_serverless/functional/test_suites/search/navigation.ts index 03f229f21b47a..8796dcfe93773 100644 --- a/x-pack/test_serverless/functional/test_suites/search/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/search/navigation.ts @@ -72,20 +72,16 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { it("management apps from the sidenav hide the 'stack management' root from the breadcrumbs", async () => { await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:triggersActions' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Explore', 'Alerts', 'Rules']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Alerts', 'Rules']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:index_management' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([ - 'Content', - 'Index Management', - 'Indices', - ]); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Index Management', 'Indices']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:ingest_pipelines' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Content', 'Ingest Pipelines']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Ingest Pipelines']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:api_keys' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Security', 'API keys']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['API keys']); }); it('navigate management', async () => { From 8c26f7cfe91a26bbb85e2c13815c16792cde5df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efe=20G=C3=BCrkan=20YALAMAN?= Date: Wed, 8 Nov 2023 14:48:37 +0100 Subject: [PATCH 27/46] [Enterprise Search] Update Kea to 2.6 (#170027) ## Summary First step to update KeaJS to 3.x series. Currently we are using 2.4.2. For a better jump ahead we should first update to 2.6. ### Checklist Delete any items that are not applicable to this PR. - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3f3a05f840cb0..f41f2a0d8774f 100644 --- a/package.json +++ b/package.json @@ -937,7 +937,7 @@ "json-stringify-safe": "5.0.1", "jsonwebtoken": "^9.0.0", "jsts": "^1.6.2", - "kea": "^2.4.2", + "kea": "^2.6.0", "langchain": "^0.0.151", "launchdarkly-js-client-sdk": "^3.1.4", "launchdarkly-node-server-sdk": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index 0d11dd72a0359..84d09037017b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20473,10 +20473,10 @@ kdbush@^4.0.2: resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-4.0.2.tgz#2f7b7246328b4657dd122b6c7f025fbc2c868e39" integrity sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA== -kea@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/kea/-/kea-2.4.2.tgz#53af42702f2c8962422e456e5dd943391bad26e9" - integrity sha512-cdGds/gsJsbo/KbVAMk5/tTr229eDibVT1wmPPxPO/10zYb8GFoP3udBIQb+Hop5qGEu2wIHVdXwJvXqSS8JAg== +kea@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/kea/-/kea-2.6.0.tgz#774a82188e0fb52cdb18b72843a875ee857f3807" + integrity sha512-+yaLyZx8h2v96aL01XIRZjqA8Qk4fIUziznSKnkjDItUU8YnH75xER6+vMHT5EHC3MJeSScxIx5UuqZl30DBdg== keyv@^3.0.0: version "3.0.0" From a173300abc80cfbb5b72aa6e8583442590231305 Mon Sep 17 00:00:00 2001 From: Michael Dokolin Date: Wed, 8 Nov 2023 15:05:21 +0100 Subject: [PATCH 28/46] [cli] Add workaround to set a custom heap snapshot dir (#170756) --- .../templates/base/Dockerfile | 1 + src/setup_node_env/heap_snapshot.js | 46 +++++++++++++++++++ src/setup_node_env/setup_env.js | 2 + 3 files changed, 49 insertions(+) create mode 100644 src/setup_node_env/heap_snapshot.js diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile index 8db4b419a184a..25f4345ffbcc3 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile @@ -128,6 +128,7 @@ COPY --chown=1000:0 config/serverless.oblt.yml /usr/share/kibana/config/serverle COPY --chown=1000:0 config/serverless.security.yml /usr/share/kibana/config/serverless.security.yml # Supportability enhancement: enable capturing heap snapshots. See https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal RUN echo '\n--heapsnapshot-signal=SIGUSR2' >> config/node.options +RUN echo '--diagnostic-dir=./data' >> config/node.options {{/serverless}} {{^opensslLegacyProvider}} RUN sed 's/\(--openssl-legacy-provider\)/#\1/' -i config/node.options diff --git a/src/setup_node_env/heap_snapshot.js b/src/setup_node_env/heap_snapshot.js new file mode 100644 index 0000000000000..94e4b35e2f887 --- /dev/null +++ b/src/setup_node_env/heap_snapshot.js @@ -0,0 +1,46 @@ +/* + * 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. + */ + +var getopts = require('getopts'); +var path = require('path'); +var v8 = require('node:v8'); +var worker = require('node:worker_threads'); + +var execOpts = getopts(process.execArgv); +var envOpts = getopts(process.env.NODE_OPTIONS ? process.env.NODE_OPTIONS.split(/\s+/) : []); +var diagnosticDir = execOpts['diagnostic-dir'] || envOpts['diagnostic-dir']; +var heapSnapshotSignal = execOpts['heapsnapshot-signal'] || envOpts['heapsnapshot-signal']; +var heapSnapshotSerial = 0; + +function getHeapSnapshotPath() { + var now = new Date(); + + var year = now.getFullYear(); + var month = String(now.getMonth() + 1).padStart(2, '0'); + var day = String(now.getDate()).padStart(2, '0'); + var hours = String(now.getHours()).padStart(2, '0'); + var minutes = String(now.getMinutes()).padStart(2, '0'); + var seconds = String(now.getSeconds()).padStart(2, '0'); + + var date = `${year}${month}${day}`; + var time = `${hours}${minutes}${seconds}`; + var pid = process.pid; + var threadId = worker.threadId; + var serial = (++heapSnapshotSerial).toString().padStart(3, '0'); + + return path.join(diagnosticDir, `Heap.${date}.${time}.${pid}.${threadId}.${serial}.heapsnapshot`); +} + +if (diagnosticDir && heapSnapshotSignal) { + process.removeAllListeners(heapSnapshotSignal); + + process.on(heapSnapshotSignal, function () { + var heapSnapshotPath = getHeapSnapshotPath(); + v8.writeHeapSnapshot(heapSnapshotPath); + }); +} diff --git a/src/setup_node_env/setup_env.js b/src/setup_node_env/setup_env.js index 7b37d98011cfb..d3076a2c3b9cf 100644 --- a/src/setup_node_env/setup_env.js +++ b/src/setup_node_env/setup_env.js @@ -11,6 +11,8 @@ require('./exit_on_warning'); require('./harden'); // The following require statements MUST be executed before any others - END +// @todo Remove when migrated to Node 20 (#162696) +require('./heap_snapshot'); require('symbol-observable'); require('source-map-support').install(); require('./node_version_validator'); From c834113fb1f820806b50ea76d9458521d7d9b14f Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Wed, 8 Nov 2023 15:11:43 +0100 Subject: [PATCH 29/46] Disable moment deprecation warnings in production (#170827) ## Summary Disable `momentjs` deprecation warnings in production environment to avoid unexpected `console.log` entries. --- src/cli/dist.js | 1 + src/setup_node_env/mute_libraries.js | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/setup_node_env/mute_libraries.js diff --git a/src/cli/dist.js b/src/cli/dist.js index 9bd7696a44561..5551c4e5c7774 100644 --- a/src/cli/dist.js +++ b/src/cli/dist.js @@ -9,4 +9,5 @@ require('../setup_node_env/dist'); require('./apm')(); require('../setup_node_env/root'); +require('../setup_node_env/mute_libraries'); require('./cli'); diff --git a/src/setup_node_env/mute_libraries.js b/src/setup_node_env/mute_libraries.js new file mode 100644 index 0000000000000..defb6347d80f7 --- /dev/null +++ b/src/setup_node_env/mute_libraries.js @@ -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. + */ + +// disable moment deprecation warnings +var moment = require('moment'); +moment.suppressDeprecationWarnings = true; From 3d2235949a23d39fd5d3f846f0f5d55fc30606ee Mon Sep 17 00:00:00 2001 From: Pierre Gayvallet Date: Wed, 8 Nov 2023 15:12:01 +0100 Subject: [PATCH 30/46] [logging] always escape control chars (#170826) ## Summary Follow-up of https://github.com/elastic/kibana/pull/169773 Escape message even if it's not a string --- .../src/layouts/conversions/message.test.ts | 48 +++++++++++++++++++ .../src/layouts/conversions/message.ts | 24 +++++----- 2 files changed, 61 insertions(+), 11 deletions(-) diff --git a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts index cf16b57c92782..2c84635d6711c 100644 --- a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts +++ b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts @@ -62,4 +62,52 @@ describe('MessageConversion', () => { '\\u001b\\u0000[31mESC-INJECTION-LFUNICODE:\\u001b[32mSUCCESSFUL\\u001b[0m\\u0007\n\nInjecting 10.000 lols 😂\\u001b[10000;b\\u0007' ); }); + + test('it should encode/escape ANSI chars lines from the message when not a string', () => { + expect( + MessageConversion.convert( + { + ...baseRecord, + // @ts-expect-error message is supposed to be a string + message: { + toString: () => 'toString...\u001b[5;7;6mThis is Fine\u001b[27m', + }, + }, + false + ) + ).toEqual('toString...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); + + test('it should encode/escape ANSI chars lines from the error stack', () => { + const error = new Error('Something went bad'); + error.stack = 'stack...\u001b[5;7;6mThis is Fine\u001b[27m'; + expect( + MessageConversion.convert( + { + ...baseRecord, + message: 'Some message that will be ignored', + error, + }, + false + ) + ).toEqual('stack...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); + + test('it should encode/escape ANSI chars lines from the error stack when not a string', () => { + expect( + MessageConversion.convert( + { + ...baseRecord, + message: 'Some message that will be ignored', + error: { + // @ts-expect-error message is supposed to be a string + stack: { + toString: () => 'stackToString...\u001b[5;7;6mThis is Fine\u001b[27m', + }, + }, + }, + false + ) + ).toEqual('stackToString...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); }); diff --git a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts index 706aa478d992b..1d0dd15373aaf 100644 --- a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts +++ b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts @@ -17,17 +17,19 @@ export const MessageConversion: Conversion = { pattern: /%message/g, convert(record: LogRecord) { // Error stack is much more useful than just the message. - const str = record.error?.stack || record.message; + let str = record.error?.stack || record.message; + // typings may be wrong, there's scenarios where the message is not a plain string (e.g error stacks from the ES client) + if (typeof str !== 'string') { + str = String(str); + } - return typeof str === 'string' // We need to validate it's a string because, despite types, there are use case where it's not a string :/ - ? str.replace( - CONTROL_CHAR_REGEXP, - // Escaping control chars via JSON.stringify to maintain consistency with `meta` and the JSON layout. - // This way, post analysis of the logs is easier as we can search the same patterns. - // Our benchmark didn't show a big difference in performance between custom-escaping vs. JSON.stringify one. - // The slice is removing the double-quotes. - (substr) => JSON.stringify(substr).slice(1, -1) - ) - : str; + return str.replace( + CONTROL_CHAR_REGEXP, + // Escaping control chars via JSON.stringify to maintain consistency with `meta` and the JSON layout. + // This way, post analysis of the logs is easier as we can search the same patterns. + // Our benchmark didn't show a big difference in performance between custom-escaping vs. JSON.stringify one. + // The slice is removing the double-quotes. + (substr) => JSON.stringify(substr).slice(1, -1) + ); }, }; From c72d4d3372f17e3be98196a6a8a329ca8baaf171 Mon Sep 17 00:00:00 2001 From: Paul Bianciardi <70908889+paulb-elastic@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:30:17 +0000 Subject: [PATCH 31/46] Update new codeowners for Obs team changes (#170182) Updates new teams as codeowners for Observability team changes. Also took the opportunity to: - Delete some paths that no longer exist - Split infra code ownership between teams (from #168992) --- .github/CODEOWNERS | 195 +++++++++++------- packages/deeplinks/observability/kibana.jsonc | 2 +- .../kbn-apm-synthtrace-client/kibana.jsonc | 2 +- packages/kbn-apm-synthtrace/kibana.jsonc | 2 +- packages/kbn-apm-utils/kibana.jsonc | 2 +- packages/kbn-custom-integrations/kibana.jsonc | 2 +- packages/kbn-es-types/kibana.jsonc | 2 +- packages/kbn-eslint-plugin-i18n/kibana.jsonc | 2 +- .../kbn-eslint-plugin-telemetry/kibana.jsonc | 2 +- packages/kbn-io-ts-utils/kibana.jsonc | 2 +- .../kbn-lens-embeddable-utils/kibana.jsonc | 2 +- packages/kbn-profiling-utils/kibana.jsonc | 2 +- packages/kbn-rule-data-utils/kibana.jsonc | 4 +- .../kbn-server-route-repository/kibana.jsonc | 2 +- packages/kbn-shared-svg/kibana.jsonc | 2 +- .../kibana.jsonc | 2 +- packages/kbn-use-tracked-promise/kibana.jsonc | 2 +- packages/kbn-xstate-utils/kibana.jsonc | 2 +- .../observability_project/kibana.jsonc | 2 +- test/common/plugins/otel_metrics/kibana.jsonc | 2 +- .../exploratory_view_example/kibana.jsonc | 2 +- x-pack/packages/kbn-infra-forge/kibana.jsonc | 2 +- x-pack/packages/kbn-slo-schema/kibana.jsonc | 2 +- x-pack/plugins/apm/kibana.jsonc | 2 +- x-pack/plugins/apm_data_access/kibana.jsonc | 2 +- x-pack/plugins/asset_manager/kibana.jsonc | 2 +- x-pack/plugins/exploratory_view/kibana.jsonc | 2 +- x-pack/plugins/log_explorer/kibana.jsonc | 2 +- x-pack/plugins/logs_shared/kibana.jsonc | 2 +- .../plugins/metrics_data_access/kibana.jsonc | 2 +- x-pack/plugins/monitoring/kibana.jsonc | 2 +- .../monitoring_collection/kibana.jsonc | 2 +- x-pack/plugins/observability/kibana.jsonc | 2 +- .../observability_ai_assistant/kibana.jsonc | 2 +- .../observability_log_explorer/kibana.jsonc | 2 +- .../observability_onboarding/kibana.jsonc | 2 +- x-pack/plugins/profiling/kibana.jsonc | 2 +- .../profiling_data_access/kibana.jsonc | 2 +- x-pack/plugins/rule_registry/kibana.jsonc | 2 +- .../serverless_observability/kibana.jsonc | 2 +- x-pack/plugins/synthetics/kibana.jsonc | 2 +- x-pack/plugins/uptime/kibana.jsonc | 2 +- x-pack/plugins/ux/kibana.jsonc | 2 +- 43 files changed, 167 insertions(+), 114 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1dc3be1a66d6d..94f4285976c2a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -36,14 +36,14 @@ packages/analytics/shippers/elastic_v3/server @elastic/kibana-core packages/analytics/shippers/fullstory @elastic/kibana-core packages/analytics/shippers/gainsight @elastic/kibana-core packages/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam -x-pack/plugins/apm_data_access @elastic/apm-ui -x-pack/plugins/apm @elastic/apm-ui -packages/kbn-apm-synthtrace @elastic/apm-ui -packages/kbn-apm-synthtrace-client @elastic/apm-ui -packages/kbn-apm-utils @elastic/apm-ui +x-pack/plugins/apm_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team +x-pack/plugins/apm @elastic/obs-ux-infra_services-team +packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team +packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team +packages/kbn-apm-utils @elastic/obs-ux-infra_services-team test/plugin_functional/plugins/app_link_test @elastic/kibana-core x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core -x-pack/plugins/asset_manager @elastic/infra-monitoring-ui +x-pack/plugins/asset_manager @elastic/obs-knowledge-team x-pack/test/security_api_integration/plugins/audit_log @elastic/kibana-security packages/kbn-axe-config @elastic/kibana-qa packages/kbn-babel-preset @elastic/kibana-operations @@ -300,7 +300,7 @@ x-pack/plugins/cross_cluster_replication @elastic/platform-deployment-management packages/kbn-crypto @elastic/kibana-security packages/kbn-crypto-browser @elastic/kibana-core x-pack/plugins/custom_branding @elastic/appex-sharedux -packages/kbn-custom-integrations @elastic/infra-monitoring-ui +packages/kbn-custom-integrations @elastic/obs-ux-logs-team src/plugins/custom_integrations @elastic/fleet packages/kbn-cypress-config @elastic/kibana-operations x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation @@ -319,7 +319,7 @@ packages/deeplinks/analytics @elastic/kibana-data-discovery @elastic/kibana-pres packages/deeplinks/devtools @elastic/platform-deployment-management packages/deeplinks/management @elastic/platform-deployment-management packages/deeplinks/ml @elastic/ml-ui -packages/deeplinks/observability @elastic/apm-ui +packages/deeplinks/observability @elastic/obs-ux-logs-team packages/deeplinks/search @elastic/enterprise-search-frontend packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations packages/default-nav/devtools @elastic/platform-deployment-management @@ -357,14 +357,14 @@ packages/kbn-es @elastic/kibana-operations packages/kbn-es-archiver @elastic/kibana-operations @elastic/appex-qa packages/kbn-es-errors @elastic/kibana-core packages/kbn-es-query @elastic/kibana-data-discovery -packages/kbn-es-types @elastic/kibana-core @elastic/apm-ui +packages/kbn-es-types @elastic/kibana-core @elastic/obs-knowledge-team src/plugins/es_ui_shared @elastic/platform-deployment-management packages/kbn-eslint-config @elastic/kibana-operations packages/kbn-eslint-plugin-disable @elastic/kibana-operations packages/kbn-eslint-plugin-eslint @elastic/kibana-operations -packages/kbn-eslint-plugin-i18n @elastic/actionable-observability +packages/kbn-eslint-plugin-i18n @elastic/obs-knowledge-team packages/kbn-eslint-plugin-imports @elastic/kibana-operations -packages/kbn-eslint-plugin-telemetry @elastic/actionable-observability +packages/kbn-eslint-plugin-telemetry @elastic/obs-knowledge-team x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security packages/kbn-event-annotation-common @elastic/kibana-visualizations packages/kbn-event-annotation-components @elastic/kibana-visualizations @@ -374,8 +374,8 @@ x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops x-pack/plugins/event_log @elastic/response-ops packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations packages/kbn-expect @elastic/kibana-operations @elastic/appex-qa -x-pack/examples/exploratory_view_example @elastic/uptime -x-pack/plugins/exploratory_view @elastic/uptime +x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team +x-pack/plugins/exploratory_view @elastic/obs-ux-infra_services-team src/plugins/expression_error @elastic/kibana-presentation src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations @@ -444,7 +444,7 @@ packages/kbn-import-resolver @elastic/kibana-operations x-pack/plugins/index_lifecycle_management @elastic/platform-deployment-management x-pack/plugins/index_management @elastic/platform-deployment-management test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery -x-pack/packages/kbn-infra-forge @elastic/actionable-observability +x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team x-pack/plugins/infra @elastic/infra-monitoring-ui x-pack/plugins/ingest_pipelines @elastic/platform-deployment-management src/plugins/input_control_vis @elastic/kibana-presentation @@ -452,7 +452,7 @@ src/plugins/inspector @elastic/kibana-presentation src/plugins/interactive_setup @elastic/kibana-security test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security packages/kbn-interpreter @elastic/kibana-visualizations -packages/kbn-io-ts-utils @elastic/apm-ui +packages/kbn-io-ts-utils @elastic/obs-knowledge-team packages/kbn-jest-serializers @elastic/kibana-operations packages/kbn-journeys @elastic/kibana-operations @elastic/appex-qa packages/kbn-json-ast @elastic/kibana-operations @@ -469,7 +469,7 @@ src/plugins/kibana_usage_collection @elastic/kibana-core src/plugins/kibana_utils @elastic/appex-sharedux x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture packages/kbn-language-documentation-popover @elastic/kibana-visualizations -packages/kbn-lens-embeddable-utils @elastic/infra-monitoring-ui +packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team x-pack/plugins/lens @elastic/kibana-visualizations x-pack/plugins/license_api_guard @elastic/platform-deployment-management x-pack/plugins/license_management @elastic/platform-deployment-management @@ -480,10 +480,10 @@ packages/kbn-lint-ts-projects-cli @elastic/kibana-operations x-pack/plugins/lists @elastic/security-detection-engine examples/locator_examples @elastic/appex-sharedux examples/locator_explorer @elastic/appex-sharedux -x-pack/plugins/log_explorer @elastic/infra-monitoring-ui +x-pack/plugins/log_explorer @elastic/obs-ux-logs-team packages/kbn-logging @elastic/kibana-core packages/kbn-logging-mocks @elastic/kibana-core -x-pack/plugins/logs_shared @elastic/infra-monitoring-ui +x-pack/plugins/logs_shared @elastic/obs-ux-logs-team x-pack/plugins/logstash @elastic/logstash packages/kbn-managed-vscode-config @elastic/kibana-operations packages/kbn-managed-vscode-config-cli @elastic/kibana-operations @@ -506,7 +506,7 @@ x-pack/examples/third_party_maps_source_example @elastic/kibana-gis src/plugins/maps_ems @elastic/kibana-gis x-pack/plugins/maps @elastic/kibana-gis x-pack/packages/maps/vector_tile_utils @elastic/kibana-gis -x-pack/plugins/metrics_data_access @elastic/infra-monitoring-ui +x-pack/plugins/metrics_data_access @elastic/obs-knowledge-team x-pack/packages/ml/agg_utils @elastic/ml-ui x-pack/packages/ml/anomaly_utils @elastic/ml-ui x-pack/packages/ml/category_validator @elastic/ml-ui @@ -533,24 +533,24 @@ x-pack/packages/ml/string_hash @elastic/ml-ui x-pack/packages/ml/trained_models_utils @elastic/ml-ui x-pack/packages/ml/url_state @elastic/ml-ui packages/kbn-monaco @elastic/appex-sharedux -x-pack/plugins/monitoring_collection @elastic/infra-monitoring-ui -x-pack/plugins/monitoring @elastic/infra-monitoring-ui +x-pack/plugins/monitoring_collection @elastic/obs-ux-infra_services-team +x-pack/plugins/monitoring @elastic/obs-ux-infra_services-team src/plugins/navigation @elastic/appex-sharedux src/plugins/newsfeed @elastic/kibana-core test/common/plugins/newsfeed @elastic/kibana-core src/plugins/no_data_page @elastic/appex-sharedux x-pack/plugins/notifications @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux -x-pack/plugins/observability_ai_assistant @elastic/obs-ai-assistant +x-pack/plugins/observability_ai_assistant @elastic/obs-knowledge-team x-pack/packages/observability/alert_details @elastic/actionable-observability x-pack/packages/observability/alerting_test_data @elastic/actionable-observability x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops -x-pack/plugins/observability_log_explorer @elastic/infra-monitoring-ui -x-pack/plugins/observability_onboarding @elastic/apm-ui -x-pack/plugins/observability @elastic/actionable-observability +x-pack/plugins/observability_log_explorer @elastic/obs-ux-logs-team +x-pack/plugins/observability_onboarding @elastic/obs-ux-logs-team +x-pack/plugins/observability @elastic/obs-ux-management-team x-pack/plugins/observability_shared @elastic/observability-ui x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security -test/common/plugins/otel_metrics @elastic/infra-monitoring-ui +test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team packages/kbn-openapi-generator @elastic/security-detection-rule-management packages/kbn-optimizer @elastic/kibana-operations packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations @@ -567,9 +567,9 @@ packages/kbn-plugin-helpers @elastic/kibana-operations examples/portable_dashboards_example @elastic/kibana-presentation examples/preboot_example @elastic/kibana-security @elastic/kibana-core src/plugins/presentation_util @elastic/kibana-presentation -x-pack/plugins/profiling_data_access @elastic/profiling-ui -x-pack/plugins/profiling @elastic/profiling-ui -packages/kbn-profiling-utils @elastic/profiling-ui +x-pack/plugins/profiling_data_access @elastic/obs-ux-infra_services-team +x-pack/plugins/profiling @elastic/obs-ux-infra_services-team +packages/kbn-profiling-utils @elastic/obs-ux-infra_services-team x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations packages/kbn-react-field @elastic/kibana-data-discovery packages/react/kibana_context/common @elastic/appex-sharedux @@ -598,8 +598,8 @@ packages/kbn-rison @elastic/kibana-operations x-pack/plugins/rollup @elastic/platform-deployment-management examples/routing_example @elastic/kibana-core packages/kbn-rrule @elastic/response-ops -packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/actionable-observability @elastic/response-ops -x-pack/plugins/rule_registry @elastic/response-ops @elastic/actionable-observability +packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team +x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team x-pack/plugins/runtime_fields @elastic/platform-deployment-management packages/kbn-safer-lodash-set @elastic/kibana-security x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-security @@ -656,11 +656,11 @@ packages/kbn-securitysolution-rules @elastic/security-detection-engine packages/kbn-securitysolution-t-grid @elastic/security-detection-engine packages/kbn-securitysolution-utils @elastic/security-detection-engine packages/kbn-server-http-tools @elastic/kibana-core -packages/kbn-server-route-repository @elastic/apm-ui +packages/kbn-server-route-repository @elastic/obs-knowledge-team @elastic/obs-ux-management-team x-pack/plugins/serverless @elastic/appex-sharedux packages/serverless/settings/common @elastic/appex-sharedux @elastic/platform-deployment-management -x-pack/plugins/serverless_observability @elastic/appex-sharedux @elastic/apm-ui -packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management +x-pack/plugins/serverless_observability @elastic/appex-sharedux @elastic/obs-ux-management-team +packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team packages/serverless/project_switcher @elastic/appex-sharedux x-pack/plugins/serverless_search @elastic/enterprise-search-frontend packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/platform-deployment-management @@ -672,7 +672,7 @@ x-pack/plugins/session_view @elastic/kibana-cloud-security-posture packages/kbn-set-map @elastic/kibana-operations examples/share_examples @elastic/appex-sharedux src/plugins/share @elastic/appex-sharedux -packages/kbn-shared-svg @elastic/apm-ui +packages/kbn-shared-svg @elastic/obs-ux-infra_services-team packages/shared-ux/avatar/solution @elastic/appex-sharedux packages/shared-ux/button/exit_full_screen @elastic/appex-sharedux packages/shared-ux/button_toolbar @elastic/appex-sharedux @@ -721,7 +721,7 @@ packages/shared-ux/router/types @elastic/appex-sharedux packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/kbn-shared-ux-utility @elastic/appex-sharedux -x-pack/packages/kbn-slo-schema @elastic/actionable-observability +x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team x-pack/plugins/snapshot_restore @elastic/platform-deployment-management packages/kbn-some-dev-log @elastic/kibana-operations packages/kbn-sort-package-json @elastic/kibana-operations @@ -738,7 +738,7 @@ packages/kbn-std @elastic/kibana-core packages/kbn-stdio-dev-helpers @elastic/kibana-operations packages/kbn-storybook @elastic/kibana-operations packages/kbn-subscription-tracking @elastic/security-threat-hunting-investigations -x-pack/plugins/synthetics @elastic/uptime +x-pack/plugins/synthetics @elastic/obs-ux-infra_services-team x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops x-pack/plugins/task_manager @elastic/response-ops @@ -768,7 +768,7 @@ x-pack/examples/triggers_actions_ui_example @elastic/response-ops x-pack/plugins/triggers_actions_ui @elastic/response-ops packages/kbn-ts-projects @elastic/kibana-operations packages/kbn-ts-type-check-cli @elastic/kibana-operations -packages/kbn-typed-react-router-config @elastic/apm-ui +packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-management-team packages/kbn-ui-actions-browser @elastic/appex-sharedux x-pack/examples/ui_actions_enhanced_examples @elastic/appex-sharedux src/plugins/ui_actions_enhanced @elastic/appex-sharedux @@ -788,20 +788,20 @@ examples/unified_field_list_examples @elastic/kibana-data-discovery src/plugins/unified_histogram @elastic/kibana-data-discovery src/plugins/unified_search @elastic/kibana-visualizations x-pack/plugins/upgrade_assistant @elastic/platform-deployment-management -x-pack/plugins/uptime @elastic/uptime +x-pack/plugins/uptime @elastic/obs-ux-infra_services-team x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux src/plugins/url_forwarding @elastic/kibana-visualizations packages/kbn-url-state @elastic/security-threat-hunting-investigations src/plugins/usage_collection @elastic/kibana-core test/plugin_functional/plugins/usage_collection @elastic/kibana-core -packages/kbn-use-tracked-promise @elastic/infra-monitoring-ui +packages/kbn-use-tracked-promise @elastic/obs-ux-logs-team packages/kbn-user-profile-components @elastic/kibana-security examples/user_profile_examples @elastic/kibana-security x-pack/test/security_api_integration/plugins/user_profiles_consumer @elastic/kibana-security packages/kbn-utility-types @elastic/kibana-core packages/kbn-utility-types-jest @elastic/kibana-operations packages/kbn-utils @elastic/kibana-operations -x-pack/plugins/ux @elastic/uptime +x-pack/plugins/ux @elastic/obs-ux-infra_services-team examples/v8_profiler_examples @elastic/response-ops packages/kbn-validate-next-docs-cli @elastic/kibana-operations src/plugins/vis_default_editor @elastic/kibana-visualizations @@ -822,7 +822,7 @@ src/plugins/visualizations @elastic/kibana-visualizations x-pack/plugins/watcher @elastic/platform-deployment-management packages/kbn-web-worker-stub @elastic/kibana-operations packages/kbn-whereis-pkg-cli @elastic/kibana-operations -packages/kbn-xstate-utils @elastic/infra-monitoring-ui +packages/kbn-xstate-utils @elastic/obs-ux-logs-team packages/kbn-yarn-lock-validator @elastic/kibana-operations packages/kbn-zod-helpers @elastic/security-detection-rule-management #### @@ -927,24 +927,79 @@ packages/kbn-monaco/src/esql @elastic/kibana-visualizations ### Observability Plugins # Actionable observability -x-pack/packages/observability/alert_details @elastic/actionable-observability -x-pack/test/observability_functional @elastic/actionable-observability -x-pack/plugins/infra/public/alerting @elastic/actionable-observability -x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability +x-pack/packages/observability/alert_details @elastic/obs-ux-management-team +x-pack/test/observability_functional @elastic/obs-ux-management-team +x-pack/plugins/infra/public/alerting @elastic/obs-ux-management-team +x-pack/plugins/infra/server/lib/alerting @elastic/obs-ux-management-team # Observability robots /.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots /.github/workflows/oblt-github-commands @elastic/observablt-robots # Infra Monitoring -/x-pack/test/functional/apps/infra @elastic/infra-monitoring-ui -/x-pack/test/api_integration/apis/infra @elastic/infra-monitoring-ui +/x-pack/plugins/infra @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/routes @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/routes/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/routes/log_alerts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/saved_objects/metrics_explorer_view @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/saved_objects/inventory_view @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/services @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/services/rules @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/lib @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/lib/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/docs/state_machines @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/inventory_models @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/metrics_api.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/snapshot_api.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/http_api/metrics_explorer_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/host_details @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/log_alerts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/snapshot_metric_i18n.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/inventory_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/color_palette.test.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/performance_tracing.ts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/log_search_summary @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/metrics_sources @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/saved_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/infra_ml @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/formatters @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/log_text_scale @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/search_strategies/log_entries @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/metrics_explorer_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/source_configuration @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/color_palette.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/log_search_result @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/apps/logs_app.tsx @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/apps/metrics_app.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/lens @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/try_it_button.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/fixed_datepicker.tsx +/x-pack/plugins/infra/public/components/logging @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/saved_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/feature_feedback_button.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/log_stream @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/components/source_configuration @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/asset_details @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/containers/metrics_source @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/metrics_explorer @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/ml @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/pages/logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/pages/metrics @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/common @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/observability_logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/services @elastic/obs-ux-infra_services-team +/x-pack/test/functional/apps/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/test/api_integration/apis/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team # Elastic Stack Monitoring -/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 -/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer @elastic/infra-monitoring-ui +/x-pack/test/functional/apps/monitoring @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/monitoring @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/monitoring_collection @elastic/obs-ux-infra_services-team +/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer @elastic/obs-ux-logs-team # Fleet /fleet_packages.json @elastic/fleet @@ -955,29 +1010,27 @@ x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability /x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @elastic/fleet @elastic/obs-cloudnative-monitoring # APM -/x-pack/test/functional/apps/apm/ @elastic/apm-ui -/x-pack/test/apm_api_integration/ @elastic/apm-ui +/x-pack/test/functional/apps/apm/ @elastic/obs-ux-infra_services-team +/x-pack/test/apm_api_integration/ @elastic/obs-ux-infra_services-team /src/apm.js @elastic/kibana-core @vigneshshanmugam -/src/core/types/elasticsearch @elastic/apm-ui /packages/kbn-utility-types/src/dot.ts @dgieselaar /packages/kbn-utility-types/src/dot_test.ts @dgieselaar #CC# /src/plugins/apm_oss/ @elastic/apm-ui #CC# /x-pack/plugins/observability/ @elastic/apm-ui # Uptime -/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/uptime -/x-pack/test/functional/apps/uptime @elastic/uptime -/x-pack/test/functional/es_archives/uptime @elastic/uptime -/x-pack/test/functional/services/uptime @elastic/uptime -/x-pack/test/api_integration/apis/uptime @elastic/uptime -/x-pack/test/api_integration/apis/synthetics @elastic/uptime -/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/uptime -/x-pack/test/alerting_api_integration/observability/index.ts @elastic/uptime - -# 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/test/apm_api_integration/tests/csm/ @elastic/uptime +/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-infra_services-team +/x-pack/test/functional/apps/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/functional/services/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-infra_services-team +/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-infra_services-team +/x-pack/test/alerting_api_integration/observability/index.ts @elastic/obs-ux-management-team + +# Logs +/x-pack/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team +/x-pack/test/functional/apps/observability_log_explorer @elastic/obs-ux-logs-team # Observability onboarding tour /x-pack/plugins/observability_shared/public/components/tour @elastic/platform-onboarding @@ -1118,7 +1171,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib # Response Ops team /x-pack/test/alerting_api_integration/ @elastic/response-ops -/x-pack/test/alerting_api_integration/observability @elastic/actionable-observability +/x-pack/test/alerting_api_integration/observability @elastic/obs-ux-management-team /x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/response-ops /docs/user/alerting/ @elastic/response-ops @@ -1440,10 +1493,10 @@ x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_en x-pack/plugins/translations/translations # Profiling api integration testing -x-pack/test/profiling_api_integration @elastic/profiling-ui +x-pack/test/profiling_api_integration @elastic/obs-ux-infra_services-team # Observability shared profiling -x-pack/plugins/observability_shared/public/components/profiling @elastic/profiling-ui +x-pack/plugins/observability_shared/public/components/profiling @elastic/obs-ux-infra_services-team # Shared UX packages/react @elastic/appex-sharedux diff --git a/packages/deeplinks/observability/kibana.jsonc b/packages/deeplinks/observability/kibana.jsonc index 4a93ff4427da8..bc014b05aa407 100644 --- a/packages/deeplinks/observability/kibana.jsonc +++ b/packages/deeplinks/observability/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/deeplinks-observability", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-apm-synthtrace-client/kibana.jsonc b/packages/kbn-apm-synthtrace-client/kibana.jsonc index b9f2d79601d6d..99055f3da4fe9 100644 --- a/packages/kbn-apm-synthtrace-client/kibana.jsonc +++ b/packages/kbn-apm-synthtrace-client/kibana.jsonc @@ -2,5 +2,5 @@ "type": "shared-common", "id": "@kbn/apm-synthtrace-client", "devOnly": true, - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-apm-synthtrace/kibana.jsonc b/packages/kbn-apm-synthtrace/kibana.jsonc index c1efc5fd09c00..1b3ef5b846149 100644 --- a/packages/kbn-apm-synthtrace/kibana.jsonc +++ b/packages/kbn-apm-synthtrace/kibana.jsonc @@ -2,5 +2,5 @@ "type": "shared-server", "id": "@kbn/apm-synthtrace", "devOnly": true, - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-apm-utils/kibana.jsonc b/packages/kbn-apm-utils/kibana.jsonc index 950a5dacb9ba8..2ee2a3b45335a 100644 --- a/packages/kbn-apm-utils/kibana.jsonc +++ b/packages/kbn-apm-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/apm-utils", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-custom-integrations/kibana.jsonc b/packages/kbn-custom-integrations/kibana.jsonc index 61c9067c7e659..995d5bb4ef69d 100644 --- a/packages/kbn-custom-integrations/kibana.jsonc +++ b/packages/kbn-custom-integrations/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/custom-integrations", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-es-types/kibana.jsonc b/packages/kbn-es-types/kibana.jsonc index 1c00cab81d2c4..2435d7666cf9a 100644 --- a/packages/kbn-es-types/kibana.jsonc +++ b/packages/kbn-es-types/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/es-types", - "owner": ["@elastic/kibana-core", "@elastic/apm-ui"] + "owner": ["@elastic/kibana-core", "@elastic/obs-knowledge-team"] } diff --git a/packages/kbn-eslint-plugin-i18n/kibana.jsonc b/packages/kbn-eslint-plugin-i18n/kibana.jsonc index 7d8c994400108..72e051941db68 100644 --- a/packages/kbn-eslint-plugin-i18n/kibana.jsonc +++ b/packages/kbn-eslint-plugin-i18n/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", "id": "@kbn/eslint-plugin-i18n", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-knowledge-team", "devOnly": true } diff --git a/packages/kbn-eslint-plugin-telemetry/kibana.jsonc b/packages/kbn-eslint-plugin-telemetry/kibana.jsonc index 79c8fbf8adb2b..e3c245a5275d8 100644 --- a/packages/kbn-eslint-plugin-telemetry/kibana.jsonc +++ b/packages/kbn-eslint-plugin-telemetry/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", "id": "@kbn/eslint-plugin-telemetry", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-knowledge-team", "devOnly": true } diff --git a/packages/kbn-io-ts-utils/kibana.jsonc b/packages/kbn-io-ts-utils/kibana.jsonc index 7d03717a53153..ea3032a472dc6 100644 --- a/packages/kbn-io-ts-utils/kibana.jsonc +++ b/packages/kbn-io-ts-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/io-ts-utils", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-knowledge-team" } diff --git a/packages/kbn-lens-embeddable-utils/kibana.jsonc b/packages/kbn-lens-embeddable-utils/kibana.jsonc index d637ea2f24ccb..9dc67508d99e9 100644 --- a/packages/kbn-lens-embeddable-utils/kibana.jsonc +++ b/packages/kbn-lens-embeddable-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-browser", "id": "@kbn/lens-embeddable-utils", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-profiling-utils/kibana.jsonc b/packages/kbn-profiling-utils/kibana.jsonc index dc45e822e620b..d41a4db71299d 100644 --- a/packages/kbn-profiling-utils/kibana.jsonc +++ b/packages/kbn-profiling-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/profiling-utils", - "owner": "@elastic/profiling-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-rule-data-utils/kibana.jsonc b/packages/kbn-rule-data-utils/kibana.jsonc index 6650a9b1d67f0..4d9d77fbeeb72 100644 --- a/packages/kbn-rule-data-utils/kibana.jsonc +++ b/packages/kbn-rule-data-utils/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/rule-data-utils", "owner": [ "@elastic/security-detections-response", - "@elastic/actionable-observability", - "@elastic/response-ops" + "@elastic/response-ops", + "@elastic/obs-ux-management-team" ] } diff --git a/packages/kbn-server-route-repository/kibana.jsonc b/packages/kbn-server-route-repository/kibana.jsonc index 8161be4b80951..dbf7fc396428c 100644 --- a/packages/kbn-server-route-repository/kibana.jsonc +++ b/packages/kbn-server-route-repository/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/server-route-repository", - "owner": "@elastic/apm-ui" + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-management-team"] } diff --git a/packages/kbn-shared-svg/kibana.jsonc b/packages/kbn-shared-svg/kibana.jsonc index 6634bd9dffc5d..89949f5b7d276 100644 --- a/packages/kbn-shared-svg/kibana.jsonc +++ b/packages/kbn-shared-svg/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/shared-svg", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-typed-react-router-config/kibana.jsonc b/packages/kbn-typed-react-router-config/kibana.jsonc index f508346f8c26e..0462d28238890 100644 --- a/packages/kbn-typed-react-router-config/kibana.jsonc +++ b/packages/kbn-typed-react-router-config/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/typed-react-router-config", - "owner": "@elastic/apm-ui" + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-management-team"] } diff --git a/packages/kbn-use-tracked-promise/kibana.jsonc b/packages/kbn-use-tracked-promise/kibana.jsonc index a7b90045c462a..959dda0d05a66 100644 --- a/packages/kbn-use-tracked-promise/kibana.jsonc +++ b/packages/kbn-use-tracked-promise/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/use-tracked-promise", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-xstate-utils/kibana.jsonc b/packages/kbn-xstate-utils/kibana.jsonc index 086bce23401aa..cd1151a3f2103 100644 --- a/packages/kbn-xstate-utils/kibana.jsonc +++ b/packages/kbn-xstate-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/xstate-utils", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/serverless/settings/observability_project/kibana.jsonc b/packages/serverless/settings/observability_project/kibana.jsonc index 4df29091e6619..e2db00d894bcf 100644 --- a/packages/serverless/settings/observability_project/kibana.jsonc +++ b/packages/serverless/settings/observability_project/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-observability-settings", - "owner": "@elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management" + "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team" } diff --git a/test/common/plugins/otel_metrics/kibana.jsonc b/test/common/plugins/otel_metrics/kibana.jsonc index 0b25b57d06a53..e64546f446052 100644 --- a/test/common/plugins/otel_metrics/kibana.jsonc +++ b/test/common/plugins/otel_metrics/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/open-telemetry-instrumented-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "openTelemetryInstrumentedPlugin", "server": true, diff --git a/x-pack/examples/exploratory_view_example/kibana.jsonc b/x-pack/examples/exploratory_view_example/kibana.jsonc index c524e4fda32f7..6cf8fa64983ac 100644 --- a/x-pack/examples/exploratory_view_example/kibana.jsonc +++ b/x-pack/examples/exploratory_view_example/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/exploratory-view-example-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "exploratoryViewExample", "server": false, diff --git a/x-pack/packages/kbn-infra-forge/kibana.jsonc b/x-pack/packages/kbn-infra-forge/kibana.jsonc index a66a733662735..a450d148358a9 100644 --- a/x-pack/packages/kbn-infra-forge/kibana.jsonc +++ b/x-pack/packages/kbn-infra-forge/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/infra-forge", - "owner": "@elastic/actionable-observability" + "owner": "@elastic/obs-ux-management-team" } diff --git a/x-pack/packages/kbn-slo-schema/kibana.jsonc b/x-pack/packages/kbn-slo-schema/kibana.jsonc index 2d12cd108585c..b4ca324fc112b 100644 --- a/x-pack/packages/kbn-slo-schema/kibana.jsonc +++ b/x-pack/packages/kbn-slo-schema/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/slo-schema", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-ux-management-team" } diff --git a/x-pack/plugins/apm/kibana.jsonc b/x-pack/plugins/apm/kibana.jsonc index 61ba6be743370..858cd142f399c 100644 --- a/x-pack/plugins/apm/kibana.jsonc +++ b/x-pack/plugins/apm/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/apm-plugin", - "owner": "@elastic/apm-ui", + "owner": "@elastic/obs-ux-infra_services-team", "description": "The user interface for Elastic APM", "plugin": { "id": "apm", diff --git a/x-pack/plugins/apm_data_access/kibana.jsonc b/x-pack/plugins/apm_data_access/kibana.jsonc index d0ee0befda101..ede5cd53c9a6c 100644 --- a/x-pack/plugins/apm_data_access/kibana.jsonc +++ b/x-pack/plugins/apm_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/apm-data-access-plugin", - "owner": "@elastic/apm-ui", + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-infra_services-team"], "plugin": { "id": "apmDataAccess", "server": true, diff --git a/x-pack/plugins/asset_manager/kibana.jsonc b/x-pack/plugins/asset_manager/kibana.jsonc index b3fcd1b3a4fa1..1ee4b12d55ea7 100644 --- a/x-pack/plugins/asset_manager/kibana.jsonc +++ b/x-pack/plugins/asset_manager/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/assetManager-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-knowledge-team", "description": "Asset manager plugin for entity assets (inventory, topology, etc)", "plugin": { "id": "assetManager", diff --git a/x-pack/plugins/exploratory_view/kibana.jsonc b/x-pack/plugins/exploratory_view/kibana.jsonc index e541ad7858650..b8041aaec89df 100644 --- a/x-pack/plugins/exploratory_view/kibana.jsonc +++ b/x-pack/plugins/exploratory_view/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/exploratory-view-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "exploratoryView", "server": false, diff --git a/x-pack/plugins/log_explorer/kibana.jsonc b/x-pack/plugins/log_explorer/kibana.jsonc index 76eb47e4a5915..71781ca9cada3 100644 --- a/x-pack/plugins/log_explorer/kibana.jsonc +++ b/x-pack/plugins/log_explorer/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/log-explorer-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption.", "plugin": { "id": "logExplorer", diff --git a/x-pack/plugins/logs_shared/kibana.jsonc b/x-pack/plugins/logs_shared/kibana.jsonc index 051d1a452740e..b78503b140a71 100644 --- a/x-pack/plugins/logs_shared/kibana.jsonc +++ b/x-pack/plugins/logs_shared/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/logs-shared-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "Exposes the shared components and APIs to access and visualize logs.", "plugin": { "id": "logsShared", diff --git a/x-pack/plugins/metrics_data_access/kibana.jsonc b/x-pack/plugins/metrics_data_access/kibana.jsonc index 6842ec7d4a724..10ddf6c04e21e 100644 --- a/x-pack/plugins/metrics_data_access/kibana.jsonc +++ b/x-pack/plugins/metrics_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/metrics-data-access-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-knowledge-team", "description": "Exposes utilities for accessing metrics data", "plugin": { "id": "metricsDataAccess", diff --git a/x-pack/plugins/monitoring/kibana.jsonc b/x-pack/plugins/monitoring/kibana.jsonc index 8da632c4b7d6f..4992da373a73d 100644 --- a/x-pack/plugins/monitoring/kibana.jsonc +++ b/x-pack/plugins/monitoring/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/monitoring-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "monitoring", "server": true, diff --git a/x-pack/plugins/monitoring_collection/kibana.jsonc b/x-pack/plugins/monitoring_collection/kibana.jsonc index 1c84d9ee4f84c..246dcce086a07 100644 --- a/x-pack/plugins/monitoring_collection/kibana.jsonc +++ b/x-pack/plugins/monitoring_collection/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/monitoring-collection-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "monitoringCollection", "server": true, diff --git a/x-pack/plugins/observability/kibana.jsonc b/x-pack/plugins/observability/kibana.jsonc index 86db25972fb1b..c03e0b499d424 100644 --- a/x-pack/plugins/observability/kibana.jsonc +++ b/x-pack/plugins/observability/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-plugin", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-ux-management-team", "plugin": { "id": "observability", "server": true, diff --git a/x-pack/plugins/observability_ai_assistant/kibana.jsonc b/x-pack/plugins/observability_ai_assistant/kibana.jsonc index 3af934a10fcfa..291c7e658de18 100644 --- a/x-pack/plugins/observability_ai_assistant/kibana.jsonc +++ b/x-pack/plugins/observability_ai_assistant/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-ai-assistant-plugin", - "owner": "@elastic/obs-ai-assistant", + "owner": "@elastic/obs-knowledge-team", "plugin": { "id": "observabilityAIAssistant", "server": true, diff --git a/x-pack/plugins/observability_log_explorer/kibana.jsonc b/x-pack/plugins/observability_log_explorer/kibana.jsonc index 6f871e114a035..72d03b82d3386 100644 --- a/x-pack/plugins/observability_log_explorer/kibana.jsonc +++ b/x-pack/plugins/observability_log_explorer/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-log-explorer-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "This plugin exposes and registers observability log consumption features.", "plugin": { "id": "observabilityLogExplorer", diff --git a/x-pack/plugins/observability_onboarding/kibana.jsonc b/x-pack/plugins/observability_onboarding/kibana.jsonc index 5c1615c3a95ba..c2b89c8c9b4fa 100644 --- a/x-pack/plugins/observability_onboarding/kibana.jsonc +++ b/x-pack/plugins/observability_onboarding/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-onboarding-plugin", - "owner": "@elastic/apm-ui", + "owner": "@elastic/obs-ux-logs-team", "plugin": { "id": "observabilityOnboarding", "server": true, diff --git a/x-pack/plugins/profiling/kibana.jsonc b/x-pack/plugins/profiling/kibana.jsonc index 104196bababc9..296b4e40bb822 100644 --- a/x-pack/plugins/profiling/kibana.jsonc +++ b/x-pack/plugins/profiling/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/profiling-plugin", - "owner": "@elastic/profiling-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "profiling", "server": true, diff --git a/x-pack/plugins/profiling_data_access/kibana.jsonc b/x-pack/plugins/profiling_data_access/kibana.jsonc index a6bcd9f7ecff4..a2c3fb4cb267b 100644 --- a/x-pack/plugins/profiling_data_access/kibana.jsonc +++ b/x-pack/plugins/profiling_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/profiling-data-access-plugin", - "owner": "@elastic/profiling-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "profilingDataAccess", "server": true, diff --git a/x-pack/plugins/rule_registry/kibana.jsonc b/x-pack/plugins/rule_registry/kibana.jsonc index d5c867247e811..28612bff2b9cc 100644 --- a/x-pack/plugins/rule_registry/kibana.jsonc +++ b/x-pack/plugins/rule_registry/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/rule-registry-plugin", "owner": [ "@elastic/response-ops", - "@elastic/actionable-observability" + "@elastic/obs-ux-management-team" ], "plugin": { "id": "ruleRegistry", diff --git a/x-pack/plugins/serverless_observability/kibana.jsonc b/x-pack/plugins/serverless_observability/kibana.jsonc index 0c68668e473ea..692d721c20a30 100644 --- a/x-pack/plugins/serverless_observability/kibana.jsonc +++ b/x-pack/plugins/serverless_observability/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/serverless-observability", "owner": [ "@elastic/appex-sharedux", - "@elastic/apm-ui" + "@elastic/obs-ux-management-team" ], "description": "Serverless customizations for observability.", "plugin": { diff --git a/x-pack/plugins/synthetics/kibana.jsonc b/x-pack/plugins/synthetics/kibana.jsonc index d03d0d384938f..9e85c2ec6c604 100644 --- a/x-pack/plugins/synthetics/kibana.jsonc +++ b/x-pack/plugins/synthetics/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/synthetics-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "description": "This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "synthetics", diff --git a/x-pack/plugins/uptime/kibana.jsonc b/x-pack/plugins/uptime/kibana.jsonc index df0b2e13839cf..c07d0dc342a74 100644 --- a/x-pack/plugins/uptime/kibana.jsonc +++ b/x-pack/plugins/uptime/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/uptime-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "description": "This plugin visualizes data from Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "uptime", diff --git a/x-pack/plugins/ux/kibana.jsonc b/x-pack/plugins/ux/kibana.jsonc index af8d92f151786..e35cddbabbba6 100644 --- a/x-pack/plugins/ux/kibana.jsonc +++ b/x-pack/plugins/ux/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/ux-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "ux", "server": true, From 3a784106df00d7070e110f5921a576c2db542160 Mon Sep 17 00:00:00 2001 From: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:53:48 +0100 Subject: [PATCH 32/46] [testing] replace testing-library/dom package with testing-library/react (#170594) ## Summary Removes `testing-library/dom` from dependencies. As all the utilities from`dom` are available already in `testing-library/react`, there's no need to have both `dom` and `react` libraries available in our package.json. Following the [@testing-library/react documentation:](https://testing-library.com/docs/react-testing-library/intro) > [React Testing Library](https://github.com/testing-library/react-testing-library) builds on top of DOM Testing Library by adding APIs for working with React components. Let's just import everything from `testing-library/react`, this way we won't need to worry about inconsistencies between `testing-library/dom` we have in our `package.json` and the one that is `testing-library/react` dependency. --- package.json | 1 - .../use_data_grid_column_cell_actions.test.tsx | 4 ++-- .../src/panels_resizable.test.tsx | 2 +- .../src/list_header/use_list_header.test.ts | 2 +- .../embeddables/embeddable_renderer.test.tsx | 2 +- .../context_menu/open_context_menu.test.ts | 2 +- .../tests/execute_trigger_actions.test.ts | 2 +- .../public/chart/hooks/use_total_hits.test.ts | 2 +- .../query_string_input.test.tsx | 3 +-- .../navigation/src/navigation.test.ts | 2 +- .../use_archive_maintenance_window.test.tsx | 2 +- .../use_create_maintenance_window.test.tsx | 2 +- .../hooks/use_find_maintenance_windows.test.tsx | 2 +- ...nish_and_archive_maintenance_window.test.tsx | 2 +- .../use_finish_maintenance_window.test.tsx | 2 +- .../hooks/use_get_maintenance_window.test.tsx | 2 +- .../use_update_maintenance_window.test.tsx | 2 +- .../components/status_filter.test.tsx | 2 +- .../components/table_actions_popover.test.tsx | 2 +- .../cases/public/common/mock/test_providers.tsx | 2 +- .../public/common/use_cases_toast.test.tsx | 2 +- ...se_cases_add_to_existing_case_modal.test.tsx | 2 +- .../all_cases/severity_filter.test.tsx | 2 +- .../components/all_cases/use_actions.test.tsx | 2 +- .../components/case_action_bar/actions.test.tsx | 2 +- .../components/case_view_alerts.test.tsx | 2 +- .../public/components/case_view/index.test.tsx | 2 +- .../public/components/create/form.test.tsx | 3 +-- .../public/components/create/severity.test.tsx | 2 +- .../components/custom_fields/index.test.tsx | 2 +- .../experimental_badge.test.tsx | 2 +- .../actions/add_to_existing_case.test.tsx | 2 +- .../actions/add_to_new_case.test.tsx | 2 +- .../use_get_case_configuration.test.tsx | 2 +- .../public/containers/use_get_case.test.tsx | 2 +- .../containers/use_get_feature_ids.test.tsx | 2 +- .../templates/assignees/renderer.test.ts | 2 +- .../templates/assignees/template.test.ts | 2 +- .../dashboard_sections/summary_section.test.tsx | 3 +-- .../engine_assignment_selector.test.tsx | 2 +- .../group_assignment_selector.test.tsx | 2 +- .../components/action_menu/action_menu.test.tsx | 2 +- .../exploratory_view/exploratory_view.test.tsx | 2 +- .../header/add_to_case_action.test.tsx | 2 +- .../header/chart_creation_info.test.tsx | 2 +- .../hooks/use_add_to_case.test.tsx | 2 +- .../views/add_series_button.test.tsx | 2 +- .../views/view_actions.test.tsx | 2 +- .../components/action_menu.test.tsx | 2 +- .../components/agent_upgrade_status.test.tsx | 2 +- .../components/table_row_actions.test.tsx | 2 +- .../components/count_widget/index.test.tsx | 2 +- .../plugins/lens/public/mocks/store_mocks.tsx | 17 +++-------------- .../components/builder/entry_renderer.test.tsx | 2 +- .../public/pages/slo_edit/slo_edit.test.tsx | 3 +-- .../event_details/event_details.test.tsx | 2 +- .../components/ml/score/anomaly_score.test.tsx | 2 +- .../components/ml/score/anomaly_scores.test.tsx | 2 +- .../ml/score/create_descriptions_list.test.tsx | 2 +- .../components/popover_items/index.test.tsx | 3 +-- .../common/components/sourcerer/index.test.tsx | 2 +- .../use_add_to_rules_table.test.tsx | 5 ++--- .../management/components/console/mocks.tsx | 3 +-- .../integration_tests/search_bar.test.tsx | 3 +-- .../policy_artifacts_assignable_list.test.tsx | 2 +- .../components/advanced_section.test.tsx | 2 +- .../components/event_collection_card.test.tsx | 2 +- .../timeline/query_bar/index.test.tsx | 2 +- .../detail_panel_alert_tab/index.test.tsx | 2 +- .../session_view_search_bar/index.test.tsx | 2 +- .../swimlane/swimlane_connectors.test.tsx | 4 +--- .../date_picker/synthetics_date_picker.test.tsx | 2 +- .../simple_monitor_form.test.tsx | 3 +-- .../waterfall_marker_icon.test.tsx | 2 +- .../synthetics/utils/testing/rtl_helpers.tsx | 12 +++++++++--- .../transform_list/expanded_row.test.tsx | 3 +-- .../hooks/use_get_query_delay_setting.test.tsx | 2 +- .../hooks/use_load_rule_aggregations.test.tsx | 2 +- .../application/hooks/use_load_rules.test.tsx | 2 +- .../hooks/use_load_tags_query.test.tsx | 2 +- .../hooks/use_update_rules_settings.test.tsx | 2 +- .../connector_form.test.tsx | 2 +- .../connector_form_fields.test.tsx | 2 +- .../create_connector_flyout/index.test.tsx | 3 +-- .../edit_connector_flyout/index.test.tsx | 3 +-- .../hooks/use_bulk_get_cases.test.tsx | 2 +- .../use_bulk_get_maintenance_windows.test.ts | 2 +- .../common/uptime_date_picker.test.tsx | 2 +- .../waterfall/components/waterfall.test.tsx | 2 +- .../components/waterfall_marker_icon.test.tsx | 2 +- .../alert_monitor_status.test.tsx | 2 +- .../columns/define_connectors.test.tsx | 3 +-- .../monitor_list/columns/enable_alert.test.tsx | 2 +- .../check_steps/use_expanded_row.test.tsx | 2 +- .../legacy_uptime/lib/helper/rtl_helpers.tsx | 3 +-- .../legacy_uptime/pages/settings.test.tsx | 2 +- yarn.lock | 2 +- 97 files changed, 108 insertions(+), 130 deletions(-) diff --git a/package.json b/package.json index f41f2a0d8774f..869529d6836a9 100644 --- a/package.json +++ b/package.json @@ -1276,7 +1276,6 @@ "@storybook/react-docgen-typescript-plugin": "^1.0.1", "@storybook/testing-react": "^1.3.0", "@storybook/theming": "^6.5.16", - "@testing-library/dom": "^8.19.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", "@testing-library/react-hooks": "^8.0.1", diff --git a/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx b/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx index 136ca441588f4..014cb526c81fe 100644 --- a/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx +++ b/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx @@ -13,8 +13,8 @@ import { EuiDataGridRefProps, type EuiDataGridColumnCellAction, } from '@elastic/eui'; -import { render, waitFor } from '@testing-library/react'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { render, waitFor, act } from '@testing-library/react'; +import { renderHook } from '@testing-library/react-hooks'; import { makeAction } from '../mocks/helpers'; import { useDataGridColumnsCellActions, diff --git a/packages/kbn-resizable-layout/src/panels_resizable.test.tsx b/packages/kbn-resizable-layout/src/panels_resizable.test.tsx index 3ea2ccc87aaeb..f3ebde2aa73ed 100644 --- a/packages/kbn-resizable-layout/src/panels_resizable.test.tsx +++ b/packages/kbn-resizable-layout/src/panels_resizable.test.tsx @@ -24,7 +24,7 @@ jest.mock('@elastic/eui', () => ({ })); import * as eui from '@elastic/eui'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { ResizableLayoutDirection } from '../types'; describe('Panels resizable', () => { diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts b/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts index 9ddd782e132cd..867ad6ce8e3e6 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts +++ b/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act, renderHook } from '@testing-library/react-hooks'; import { useExceptionListHeader } from './use_list_header'; diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx index b919672ad01e3..a1be9c560bf3c 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx @@ -7,7 +7,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { render } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks'; import { diff --git a/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts b/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts index f8b54fb33e122..ddd7d77812add 100644 --- a/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts +++ b/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts @@ -7,7 +7,7 @@ */ import { createInteractionPositionTracker } from './open_context_menu'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; let targetEl: Element; const top = 100; diff --git a/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts b/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts index 950c70ec7c60d..ea9d343845442 100644 --- a/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts +++ b/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts @@ -10,7 +10,7 @@ import { ActionDefinition } from '../actions'; import { openContextMenu } from '../context_menu'; import { uiActionsPluginMock } from '../mocks'; import type { Trigger } from '@kbn/ui-actions-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../context_menu'); diff --git a/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts b/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts index e6f3aeaa3a002..3135f3c86f465 100644 --- a/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts +++ b/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts @@ -15,7 +15,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { of, Subject, throwError } from 'rxjs'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { DataViewType, SearchSourceSearchOptions } from '@kbn/data-plugin/common'; import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx index 8e60c720e1154..aa348d59d85f4 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx @@ -15,8 +15,7 @@ import { import React from 'react'; import { I18nProvider } from '@kbn/i18n-react'; import { mount } from 'enzyme'; -import { waitFor } from '@testing-library/dom'; -import { render } from '@testing-library/react'; +import { waitFor, render } from '@testing-library/react'; import { EuiTextArea, EuiIcon } from '@elastic/eui'; diff --git a/x-pack/packages/security-solution/navigation/src/navigation.test.ts b/x-pack/packages/security-solution/navigation/src/navigation.test.ts index ab9ab891aaef8..a4290563476ea 100644 --- a/x-pack/packages/security-solution/navigation/src/navigation.test.ts +++ b/x-pack/packages/security-solution/navigation/src/navigation.test.ts @@ -7,7 +7,7 @@ import { useGetAppUrl, useNavigateTo } from './navigation'; import { mockGetUrlForApp, mockNavigateToApp, mockNavigateToUrl } from '../mocks/context'; import { renderHook } from '@testing-library/react-hooks'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; jest.mock('./context'); diff --git a/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx index e6bd2a4071b27..d72f0bda9dc93 100644 --- a/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx index 195af1bb083e5..f827287532445 100644 --- a/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx b/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx index 2080b9ff39d43..d21b145aea937 100644 --- a/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; import { useFindMaintenanceWindows } from './use_find_maintenance_windows'; diff --git a/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx index b80dbbae355bc..453a3b88cef8f 100644 --- a/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx index ed534cb835c8d..06608125fd836 100644 --- a/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx index eaef1f4fc4b99..3003f1003ce12 100644 --- a/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; import { useGetMaintenanceWindow } from './use_get_maintenance_window'; diff --git a/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx index 897b44295d8c0..b29161f0e006d 100644 --- a/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx index f7cb8023323ef..3875545e36df4 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx @@ -6,7 +6,7 @@ */ import { Query } from '@elastic/eui'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import React from 'react'; import { AppMockRenderer, createAppMockRenderer } from '../../../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx index 2b1a1057084f5..8da3e12847e3a 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import React from 'react'; import { AppMockRenderer, createAppMockRenderer } from '../../../lib/test_utils'; diff --git a/x-pack/plugins/cases/public/common/mock/test_providers.tsx b/x-pack/plugins/cases/public/common/mock/test_providers.tsx index 7dfed5d7188de..846ae8172b327 100644 --- a/x-pack/plugins/cases/public/common/mock/test_providers.tsx +++ b/x-pack/plugins/cases/public/common/mock/test_providers.tsx @@ -11,6 +11,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; +import { render as reactRender } from '@testing-library/react'; import type { RenderOptions, RenderResult } from '@testing-library/react'; import type { ILicense } from '@kbn/licensing-plugin/public'; import type { ScopedFilesClient } from '@kbn/files-plugin/public'; @@ -20,7 +21,6 @@ import { I18nProvider } from '@kbn/i18n-react'; import { createMockFilesClient } from '@kbn/shared-ux-file-mocks'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { render as reactRender } from '@testing-library/react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { FilesContext } from '@kbn/shared-ux-file-context'; diff --git a/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx b/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx index d6597e31362e7..53fe9118a6aa0 100644 --- a/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx +++ b/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx @@ -14,7 +14,7 @@ import { alertComment, basicComment, mockCase } from '../containers/mock'; import React from 'react'; import userEvent from '@testing-library/user-event'; import type { SupportedCaseAttachment } from '../types'; -import { getByTestId } from '@testing-library/dom'; +import { getByTestId } from '@testing-library/react'; import { OWNER_INFO } from '../../common/constants'; jest.mock('./lib/kibana'); diff --git a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx index 2cfaacc8383ca..a80e1935d1add 100644 --- a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act, renderHook } from '@testing-library/react-hooks'; import userEvent from '@testing-library/user-event'; import React from 'react'; diff --git a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx index 30d5c75e63589..26169e16c5bed 100644 --- a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { SeverityFilter } from './severity_filter'; diff --git a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx index 0efc7a5862893..ecc9233fc327c 100644 --- a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx @@ -6,7 +6,7 @@ */ import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks/dom'; import { useActions } from './use_actions'; diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx index c79e88ce350ab..ef97a5f8d854d 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx @@ -13,7 +13,7 @@ import { basicCase, basicPush } from '../../containers/mock'; import { Actions } from './actions'; import * as i18n from '../case_view/translations'; import * as api from '../../containers/api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../containers/api'); diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx index cba9169590839..b85dbe7564cf9 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { OBSERVABILITY_OWNER } from '../../../../common/constants'; import { alertCommentWithIndices, basicCase } from '../../../containers/mock'; import type { AppMockRenderer } from '../../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/case_view/index.test.tsx b/x-pack/plugins/cases/public/components/case_view/index.test.tsx index 07b58820b52b7..13524989bc7b8 100644 --- a/x-pack/plugins/cases/public/components/case_view/index.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/index.test.tsx @@ -30,7 +30,7 @@ import { useGetSupportedActionConnectors } from '../../containers/configure/use_ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import CaseView from '.'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useGetTags } from '../../containers/use_get_tags'; import { casesQueriesKeys } from '../../containers/constants'; import { diff --git a/x-pack/plugins/cases/public/components/create/form.test.tsx b/x-pack/plugins/cases/public/components/create/form.test.tsx index e7bd2fc754f34..05e7788624800 100644 --- a/x-pack/plugins/cases/public/components/create/form.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form.test.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { act, render, within, fireEvent } from '@testing-library/react'; -import { waitFor } from '@testing-library/dom'; +import { act, render, within, fireEvent, waitFor } from '@testing-library/react'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; import { NONE_CONNECTOR_ID } from '../../../common/constants'; diff --git a/x-pack/plugins/cases/public/components/create/severity.test.tsx b/x-pack/plugins/cases/public/components/create/severity.test.tsx index 328b9b4cd5e00..bf81dfc357fc7 100644 --- a/x-pack/plugins/cases/public/components/create/severity.test.tsx +++ b/x-pack/plugins/cases/public/components/create/severity.test.tsx @@ -15,7 +15,7 @@ import { Severity } from './severity'; import type { FormProps } from './schema'; import { schema } from './schema'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; let globalForm: FormHook; diff --git a/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx b/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx index d81e31ba69d6d..7864361063b31 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; -import { screen, waitFor } from '@testing-library/dom'; +import { screen, waitFor } from '@testing-library/react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx b/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx index a13aea90e8e6e..38b5960898cf0 100644 --- a/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx +++ b/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx index 9c911e5aa89b4..a32ece05eac74 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx @@ -24,7 +24,7 @@ import { mockTimeRange, } from './mocks'; import { useKibana } from '../../../common/lib/kibana'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { canUseCases } from '../../../client/helpers/can_use_cases'; import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx index f55f95cbfb0ec..3549ca3301d18 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx @@ -8,7 +8,7 @@ import { LENS_EMBEDDABLE_TYPE, type Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import type { Action } from '@kbn/ui-actions-plugin/public'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { createAddToNewCaseLensAction } from './add_to_new_case'; import type { ActionContext } from './types'; diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx index 1cb8685e26cbf..d625e247cb572 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetCaseConfiguration } from './use_get_case_configuration'; import * as api from './api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useToasts } from '../../common/lib/kibana'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/containers/use_get_case.test.tsx b/x-pack/plugins/cases/public/containers/use_get_case.test.tsx index 0514acf4a71ea..2b5082a9e22a5 100644 --- a/x-pack/plugins/cases/public/containers/use_get_case.test.tsx +++ b/x-pack/plugins/cases/public/containers/use_get_case.test.tsx @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetCase } from './use_get_case'; import * as api from './api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useToasts } from '../common/lib/kibana'; diff --git a/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx b/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx index fdec17c215fda..298abb5d133e7 100644 --- a/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx +++ b/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useToasts } from '../common/lib/kibana'; import type { AppMockRenderer } from '../common/mock'; import { createAppMockRenderer } from '../common/mock'; diff --git a/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts b/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts index ecd0bc08393bb..fb6509aeceeb4 100644 --- a/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts +++ b/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts @@ -6,7 +6,7 @@ */ import { mockCases } from '../../../../mocks'; -import { getByText } from '@testing-library/dom'; +import { getByText } from '@testing-library/react'; import { assigneesTemplateRenderer } from './renderer'; import type { CaseSavedObjectTransformed } from '../../../../common/types/case'; diff --git a/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts b/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts index b888cd6017b24..79589f4e58bef 100644 --- a/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts +++ b/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts @@ -6,7 +6,7 @@ */ import { mockCases } from '../../../../mocks'; -import { getByText } from '@testing-library/dom'; +import { getByText } from '@testing-library/react'; import { assigneesTemplateRenderer } from './renderer'; import type { CaseSavedObjectTransformed } from '../../../../common/types/case'; diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx index 0545d4f3bb429..04c8382529593 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import { expectIdsInDoc } from '../../../test/utils'; import { DASHBOARD_COUNTER_CARDS } from '../test_subjects'; import { SummarySection } from './summary_section'; import { mockDashboardData } from '../mock'; import { TestProvider } from '../../../test/test_provider'; -import { screen } from '@testing-library/react'; import { KSPM_POLICY_TEMPLATE } from '../../../../common/constants'; describe('', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx index a8f8b2af988f2..74ca02e1d91db 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx @@ -13,7 +13,7 @@ import { engines } from '../../__mocks__/engines.mock'; import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { shallow } from 'enzyme'; import { EuiComboBox, EuiComboBoxOptionOption, EuiRadioGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx index 9312b1b6bbdb2..1cea94e434de1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx @@ -11,7 +11,7 @@ import { setMockActions, setMockValues } from '../../../__mocks__/kea_logic'; import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { shallow } from 'enzyme'; import { EuiComboBox, EuiComboBoxOptionOption, EuiRadioGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx index c72899d8041c7..4e81ca840199f 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx @@ -6,7 +6,7 @@ */ import { render } from '../../rtl_helpers'; -import { fireEvent, screen } from '@testing-library/dom'; +import { fireEvent, screen } from '@testing-library/react'; import React from 'react'; import { sampleAttribute } from '../../configurations/test_data/sample_attribute'; import * as pluginHook from '../../../../../hooks/use_plugin_context'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx index 443a6eb846cd8..7b4e0cb5cc57f 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { render, mockAppDataView } from './rtl_helpers'; import { ExploratoryView } from './exploratory_view'; import * as obsvDataViews from '../../../utils/observability_data_views/observability_data_views'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx index a4d8a88507e82..ffccfdf6db3f2 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render, forNearestButton } from '../rtl_helpers'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { AddToCaseAction } from './add_to_case_action'; import * as useCaseHook from '../hooks/use_add_to_case'; import * as datePicker from '../components/date_range_picker'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx index 570362a63c33f..f8da480072ab3 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { render } from '../rtl_helpers'; import { ChartCreationInfo } from './chart_creation_info'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx index 9ab9d00d2bc82..3821c703e7cee 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx @@ -9,7 +9,7 @@ import { useAddToCase } from './use_add_to_case'; import React, { useEffect } from 'react'; import { render } from '../rtl_helpers'; import { EuiButton } from '@elastic/eui'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { act } from '@testing-library/react'; describe('useAddToCase', function () { diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx index 978296a295efc..65f80245c2ceb 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen, waitFor, fireEvent } from '@testing-library/dom'; +import { screen, waitFor, fireEvent } from '@testing-library/react'; import { render } from '../rtl_helpers'; import { AddSeriesButton } from './add_series_button'; import { DEFAULT_TIME, ReportTypes } from '../configurations/constants'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx index df709c94abcde..ae2d2ce65d91c 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen, waitFor, fireEvent } from '@testing-library/dom'; +import { screen, waitFor, fireEvent } from '@testing-library/react'; import { render } from '../rtl_helpers'; import * as hooks from '../hooks/use_series_storage'; import { ViewActions } from './view_actions'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx index 2f05354b09a04..2d39700da5caa 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../../mock'; import type { Agent, AgentPolicy } from '../../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx index 9937126213c91..dffa4bc665bdb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import React from 'react'; import { createFleetTestRendererMock } from '../../../../../../mock'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx index a2fed8d3ed613..4e8d25f313ea5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../../mock'; import type { Agent, AgentPolicy } from '../../../../types'; diff --git a/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx b/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx index a0fbe2c90c690..d3230a33f203e 100644 --- a/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx @@ -10,7 +10,7 @@ import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { GlobalFilter } from '../../types'; import { CountWidget, LOADING_TEST_ID, TOOLTIP_TEST_ID, VALUE_TEST_ID } from '.'; import { useFetchCountWidgetData } from './hooks'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; const TITLE = 'Count Widget Title'; const GLOBAL_FILTER: GlobalFilter = { diff --git a/x-pack/plugins/lens/public/mocks/store_mocks.tsx b/x-pack/plugins/lens/public/mocks/store_mocks.tsx index cafb7796969c8..9a3d33afa1aa7 100644 --- a/x-pack/plugins/lens/public/mocks/store_mocks.tsx +++ b/x-pack/plugins/lens/public/mocks/store_mocks.tsx @@ -13,26 +13,14 @@ import { act } from 'react-dom/test-utils'; import { PreloadedState } from '@reduxjs/toolkit'; import { RenderOptions, render } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; -// imported to prevent a type error from testing library https://github.com/testing-library/react-testing-library/issues/587 -import * as ___ from '@testing-library/dom'; - import { LensAppServices } from '../app_plugin/types'; -import { - makeConfigureStore, - LensAppState, - LensState, - LensStoreDeps, - LensRootStore, -} from '../state_management'; +import { makeConfigureStore, LensAppState, LensState, LensStoreDeps } from '../state_management'; import { getResolvedDateRange } from '../utils'; import { DatasourceMap, VisualizationMap } from '../types'; import { mockVisualizationMap } from './visualization_mock'; import { mockDatasourceMap } from './datasource_mock'; import { makeDefaultServices } from './services_mock'; -// preventing a type error from testing library https://github.com/testing-library/react-testing-library/issues/587 -export const unusedFn = () => ___; - export const mockStoreDeps = (deps?: { lensServices?: LensAppServices; datasourceMap?: DatasourceMap; @@ -85,7 +73,8 @@ export const renderWithReduxStore = ( preloadedState: {}, storeDeps: mockStoreDeps(), } -): ReturnType & { store: LensRootStore } => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any +): any => { const { store } = makeLensStore({ preloadedState, storeDeps }); const Wrapper: React.FC<{ diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx index b73379acd1518..7edcf5b53f724 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx +++ b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx @@ -25,7 +25,7 @@ import { useFindListsBySize } from '@kbn/securitysolution-list-hooks'; import type { FieldSpec } from '@kbn/data-plugin/common'; import { fields, getField } from '@kbn/data-plugin/common/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { ReactWrapper, mount } from 'enzyme'; import { getFoundListsBySizeSchemaMock } from '../../../../common/schemas/response/found_lists_by_size_schema.mock'; diff --git a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx index 21972da276691..8d4d45a08d709 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx @@ -5,8 +5,7 @@ * 2.0. */ -import { fireEvent, waitFor } from '@testing-library/dom'; -import { cleanup } from '@testing-library/react'; +import { fireEvent, waitFor, cleanup } from '@testing-library/react'; import { createBrowserHistory } from 'history'; import React from 'react'; import Router from 'react-router-dom'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx index 7323c293cd94c..edc72e92ff153 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; import type { ReactWrapper } from 'enzyme'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx index 4bdbbdca8bdca..d8b43fa9a603b 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx @@ -15,7 +15,7 @@ import { mockAnomalies } from '../mock'; import { TestProviders } from '../../../mock/test_providers'; import { useMountAppended } from '../../../utils/use_mount_appended'; import type { Anomalies } from '../types'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx index 6a72d72a9eb59..b54ec85bab0e4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx @@ -16,7 +16,7 @@ import { TestProviders } from '../../../mock/test_providers'; import { getEmptyValue } from '../../empty_value'; import type { Anomalies } from '../types'; import { useMountAppended } from '../../../utils/use_mount_appended'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx index c9de8aad04de8..832c60c69be87 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx @@ -11,7 +11,7 @@ import { mockAnomalies } from '../mock'; import { createDescriptionList } from './create_description_list'; import { EuiDescriptionList } from '@elastic/eui'; import type { Anomaly } from '../types'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx index 8d7123bfe6d66..58584f4325d4e 100644 --- a/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx @@ -10,8 +10,7 @@ import React from 'react'; import type { PopoverItemsProps } from '.'; import { PopoverItems } from '.'; import { TestProviders } from '../../mock'; -import { render, screen } from '@testing-library/react'; -import { within } from '@testing-library/dom'; +import { render, screen, within } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; const mockTags = ['Elastic', 'Endpoint', 'Data Protection', 'ML', 'Continuous Monitoring']; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx index ceab08373993a..ebda7e6748ebd 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx @@ -22,7 +22,7 @@ import { } from '../../mock'; import { createStore } from '../../store'; import type { EuiSuperSelectOption } from '@elastic/eui/src/components/form/super_select/super_select_control'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useSourcererDataView } from '../../containers/sourcerer'; import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; import { TimelineId } from '../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx index 7afa5e5a7eef0..8862c626ea6e4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx @@ -6,9 +6,8 @@ */ import React from 'react'; -import { fireEvent, render as rTLRender } from '@testing-library/react'; -import { waitFor } from '@testing-library/dom'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { fireEvent, render as rTLRender, waitFor, act } from '@testing-library/react'; +import { renderHook } from '@testing-library/react-hooks'; import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import type { Rule } from '../../../../rule_management/logic/types'; import { getRulesSchemaMock } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx b/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx index ac729f898c6be..d756e6aaea2e5 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx @@ -10,8 +10,7 @@ import React, { memo, useEffect } from 'react'; import { EuiCode } from '@elastic/eui'; import userEvent from '@testing-library/user-event'; -import { act } from '@testing-library/react'; -import { within } from '@testing-library/dom'; +import { act, within } from '@testing-library/react'; import { convertToTestId } from './components/command_list'; import { Console } from './console'; import type { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx index ab0a856ff1fa6..f053ee5ef8d68 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx @@ -9,10 +9,9 @@ import React from 'react'; import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { endpointPageHttpMock } from '../../../mocks'; -import { act, waitFor, cleanup } from '@testing-library/react'; +import { act, waitFor, cleanup, fireEvent } from '@testing-library/react'; import { getEndpointListPath } from '../../../../../common/routing'; import { AdminSearchBar } from '../search_bar'; -import { fireEvent } from '@testing-library/dom'; import { uiQueryParams } from '../../../store/selectors'; import type { EndpointIndexUIQueryParams } from '../../../types'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx index aa57df82276c6..c1f95b1f4d067 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx @@ -10,7 +10,7 @@ import { PolicyArtifactsAssignableList } from './policy_artifacts_assignable_lis import * as reactTestingLibrary from '@testing-library/react'; import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { getMockListResponse } from '../../../test_utils'; describe('Policy artifacts list', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx index 0eb65818b9347..6688c12c7f853 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx @@ -17,7 +17,7 @@ import type { AdvancedSectionProps } from './advanced_section'; import { AdvancedSection } from './advanced_section'; import userEvent from '@testing-library/user-event'; import { AdvancedPolicySchema } from '../../../models/advanced_policy_schema'; -import { within } from '@testing-library/dom'; +import { within } from '@testing-library/react'; import { set } from 'lodash'; jest.mock('../../../../../../common/hooks/use_license'); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx index eeaa22aa14f6b..54ade4d11b4dd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx @@ -18,7 +18,7 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { expectIsViewOnly, exactMatchText } from '../mocks'; import userEvent from '@testing-library/user-event'; import { cloneDeep, set } from 'lodash'; -import { within } from '@testing-library/dom'; +import { within } from '@testing-library/react'; describe('Policy Event Collection Card common component', () => { let formProps: EventCollectionCardProps; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx index 153b24dcf0bf8..cd0a21d99cdfe 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx @@ -21,7 +21,7 @@ import { buildGlobalQuery } from '../helpers'; import type { QueryBarTimelineComponentProps } from '.'; import { QueryBarTimeline, getDataProviderFilter, TIMELINE_FILTER_DROP_AREA } from '.'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; const mockUiSettingsForFilterManager = coreMock.createStart().uiSettings; diff --git a/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx b/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx index 989c4fd45cfbc..b729824478e2c 100644 --- a/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx +++ b/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { DetailPanelAlertTab } from '.'; import { mockAlerts } from '../../../common/mocks/constants/session_view_process.mock'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { INVESTIGATED_ALERT_TEST_ID, VIEW_MODE_TOGGLE, ALERTS_TAB_EMPTY_STATE_TEST_ID } from '.'; import { ALERT_LIST_ITEM_TEST_ID, diff --git a/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx b/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx index 8b3498f2a11b8..4bfd695530b43 100644 --- a/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx +++ b/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx @@ -10,7 +10,7 @@ import { processMock } from '../../../common/mocks/constants/session_view_proces import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { SessionViewSearchBar } from '.'; import userEvent from '@testing-library/user-event'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('SessionViewSearchBar component', () => { let render: () => ReturnType; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx index 643d43d8b10b3..cb6652052d65e 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx @@ -7,14 +7,12 @@ import React from 'react'; import { mountWithIntl, nextTick } from '@kbn/test-jest-helpers'; -import { act } from 'react-dom/test-utils'; import SwimlaneActionConnectorFields from './swimlane_connectors'; import { useGetApplication } from './use_get_application'; import { applicationFields, mappings } from './mocks'; import { ConnectorFormTestProvider } from '../lib/test_utils'; -import { waitFor } from '@testing-library/dom'; +import { waitFor, render, act } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { render } from '@testing-library/react'; jest.mock('@kbn/triggers-actions-ui-plugin/public/common/lib/kibana'); jest.mock('./use_get_application'); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx index a78710dd9994e..1a0ec3002655a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx @@ -10,7 +10,7 @@ import { SyntheticsDatePicker } from './synthetics_date_picker'; import { startPlugins } from '../../../utils/testing/__mocks__/synthetics_plugin_start_mock'; import { createMemoryHistory } from 'history'; import { render } from '../../../utils/testing'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('SyntheticsDatePicker component', () => { jest.setTimeout(10_000); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx index 9c392b6a409f0..322cc2c653ef9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx @@ -12,10 +12,9 @@ import { WEBSITE_URL_HELP_TEXT, WEBSITE_URL_LABEL, } from './simple_monitor_form'; -import { screen } from '@testing-library/react'; import { render } from '../../utils/testing'; import React from 'react'; -import { act, fireEvent, waitFor } from '@testing-library/react'; +import { act, fireEvent, waitFor, screen } from '@testing-library/react'; import { syntheticsTestSubjects } from '../../../../../common/constants/data_test_subjects'; import { apiService } from '../../../../utils/api_service'; import * as reduxHooks from 'react-redux'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx index 3ebbb2b1c6b57..a91da97ce3a5c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; import { TestWrapper } from './waterfall_marker_test_helper'; import { render } from '../../../../../utils/testing'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx index 27452ce3254c2..552229fe47346 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx @@ -6,12 +6,14 @@ */ import React, { ReactElement, ReactNode } from 'react'; +import { i18n } from '@kbn/i18n'; import { of } from 'rxjs'; // eslint-disable-next-line import/no-extraneous-dependencies import { render as reactTestLibRender, MatcherFunction, RenderOptions, + configure, } from '@testing-library/react'; import { Router } from '@kbn/shared-ux-router'; import { Route } from '@kbn/shared-ux-router'; @@ -21,8 +23,6 @@ import { createMemoryHistory, History } from 'history'; import { CoreStart } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { coreMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { configure } from '@testing-library/dom'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaServices } from '@kbn/kibana-react-plugin/public'; @@ -161,7 +161,13 @@ export const mockCore: () => Partial = () => { exploratoryView: { createExploratoryViewUrl: jest.fn(), getAppDataView: jest.fn(), - ExploratoryViewEmbeddable: () =>
Embeddable exploratory view
, + ExploratoryViewEmbeddable: () => ( +
+ {i18n.translate('xpack.synthetics.core.div.embeddableExploratoryViewLabel', { + defaultMessage: 'Embeddable exploratory view', + })} +
+ ), }, }; diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx index 370d7c2da05d5..4f9eacc38ecc5 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx @@ -5,14 +5,13 @@ * 2.0. */ -import { render, fireEvent, screen, waitFor } from '@testing-library/react'; +import { render, fireEvent, screen, waitFor, within } from '@testing-library/react'; import React from 'react'; import moment from 'moment-timezone'; import { TransformListRow } from '../../../../common'; import { ExpandedRow } from './expanded_row'; import transformListRow from '../../../../common/__mocks__/transform_list_row.json'; -import { within } from '@testing-library/dom'; jest.mock('../../../../../shared_imports'); jest.mock('../../../../app_dependencies'); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx index bf792e29ed604..c4e3ec261e6e3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useGetQueryDelaySettings } from './use_get_query_delay_settings'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx index b9f33ab40c6fc..6ea281765496f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx @@ -11,7 +11,7 @@ import { RuleStatus } from '../../types'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../common/lib/kibana'); jest.mock('../lib/rule_api/aggregate_kuery_filter', () => ({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx index 1342746223889..1a2c07eaaa9cf 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx @@ -15,7 +15,7 @@ import { RuleStatus } from '../../types'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../common/lib/kibana'); jest.mock('../lib/rule_api/rules_kuery_filter', () => ({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx index 7e36b5e4290ad..bb2dab67c0d4e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx @@ -10,7 +10,7 @@ import { useLoadTagsQuery } from './use_load_tags_query'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; const MOCK_TAGS = ['a', 'b', 'c']; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx index 6a36a32ed2522..e431a4c2cf7aa 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useUpdateRuleSettings } from './use_update_rules_settings'; const mockAddDanger = jest.fn(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx index 95e7b0c85ab55..cf12e2ce38af4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx @@ -9,7 +9,7 @@ import React, { lazy } from 'react'; import { ConnectorForm } from './connector_form'; import { actionTypeRegistryMock } from '../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx index c2a6a86bb446b..45937cee8b22a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx @@ -10,7 +10,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { FormTestProvider } from '../../components/test_utils'; import { ConnectorFormFields } from './connector_form_fields'; import { actionTypeRegistryMock } from '../../action_type_registry.mock'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../test_utils'; describe('ConnectorFormFields', () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx index 9cc4603025ff3..554fb9aff3c30 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx @@ -9,8 +9,7 @@ import React, { lazy } from 'react'; import { actionTypeRegistryMock } from '../../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; -import { act } from '@testing-library/react'; +import { waitFor, act } from '@testing-library/react'; import CreateConnectorFlyout from '.'; import { betaBadgeProps } from '../beta_badge_props'; import { AppMockRenderer, createAppMockRenderer } from '../../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx index e687189ed0205..a108de1dc6f6c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx @@ -9,8 +9,7 @@ import React, { lazy } from 'react'; import { actionTypeRegistryMock } from '../../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; -import { act } from '@testing-library/react'; +import { waitFor, act } from '@testing-library/react'; import EditConnectorFlyout from '.'; import { ActionConnector, EditConnectorTabs, GenericValidationResult } from '../../../../types'; import { betaBadgeProps } from '../beta_badge_props'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx index 5f027e9b57fd0..945028df8118f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx @@ -7,7 +7,7 @@ import { renderHook } from '@testing-library/react-hooks'; import * as api from './apis/bulk_get_cases'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useKibana } from '../../../../common/lib/kibana'; import { useBulkGetCases } from './use_bulk_get_cases'; import { AppMockRenderer, createAppMockRenderer } from '../../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts index e5b45a25b5dea..b46424c286c00 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindowStatus } from '@kbn/alerting-plugin/common'; import * as api from './apis/bulk_get_maintenance_windows'; import { coreMock } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx index 1510fe28f1721..66fd680d3fdfe 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx @@ -10,7 +10,7 @@ import { UptimeDatePicker } from './uptime_date_picker'; import { startPlugins } from '../../lib/__mocks__/uptime_plugin_start_mock'; import { createMemoryHistory } from 'history'; import { render } from '../../lib/helper/rtl_helpers'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('UptimeDatePicker component', () => { jest.setTimeout(10_000); diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx index 28e82930f3341..7761fe4206fda 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx @@ -11,7 +11,7 @@ import { renderLegendItem } from '../../step_detail/waterfall/waterfall_chart_wr import { render } from '../../../../../lib/helper/rtl_helpers'; import 'jest-canvas-mock'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; describe('waterfall', () => { it('sets the correct height in case of full height', () => { diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx index 4241a7238ecd6..4bfe9d2dccfdd 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import { render } from '../../../../../lib/helper/rtl_helpers'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; import { TestWrapper } from './waterfall_marker_test_helper'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx index 6dbef12159a18..c547b66748ffc 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { AlertMonitorStatusComponent, AlertMonitorStatusProps, diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx index 29f0dd189594c..3774e94e190b8 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { DefineAlertConnectors } from './define_connectors'; -import { screen } from '@testing-library/react'; -import { fireEvent } from '@testing-library/dom'; +import { screen, fireEvent } from '@testing-library/react'; import { ENABLE_STATUS_ALERT } from './translations'; import { render } from '../../../../lib/helper/rtl_helpers'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx index 416dd8e963e9b..2f18c3e89f147 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EnableMonitorAlert } from './enable_alert'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../../common/constants'; import { makePing } from '../../../../../../common/runtime_types/ping'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx index f79a93eee53e4..a139abe5d86a0 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import ReactRouterDom from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; -import { fireEvent, screen } from '@testing-library/dom'; +import { fireEvent, screen } from '@testing-library/react'; import { renderHook, act as hooksAct } from '@testing-library/react-hooks'; import { createMemoryHistory } from 'history'; import { EuiButtonIcon } from '@elastic/eui'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx b/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx index b2f96c4bac8a3..0b23c089385d7 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx @@ -12,6 +12,7 @@ import { render as reactTestLibRender, MatcherFunction, RenderOptions, + configure, } from '@testing-library/react'; import { Router } from '@kbn/shared-ux-router'; import { Route } from '@kbn/shared-ux-router'; @@ -21,8 +22,6 @@ import { createMemoryHistory, History } from 'history'; import { CoreStart } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { coreMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { configure } from '@testing-library/dom'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaServices } from '@kbn/kibana-react-plugin/public'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx index 5c8fb95448fca..a8144f540a03e 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { isValidCertVal, SettingsPage } from './settings'; import { render } from '../lib/helper/rtl_helpers'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import * as alertApi from '../state/api/alerts'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common/constants'; diff --git a/yarn.lock b/yarn.lock index 84d09037017b3..813e52bcf4912 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8251,7 +8251,7 @@ resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.3.tgz#fbb68696899d7b8c1b9b891eded9c04fe2cd5529" integrity sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A== -"@testing-library/dom@^8.0.0", "@testing-library/dom@^8.19.0": +"@testing-library/dom@^8.0.0": version "8.19.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.19.0.tgz#bd3f83c217ebac16694329e413d9ad5fdcfd785f" integrity sha512-6YWYPPpxG3e/xOo6HIWwB/58HukkwIVTOaZ0VwdMVjhRUX/01E4FtQbck9GazOOj7MXHc5RBzMrU86iBJHbI+A== From b36b331eef5b279a8f3f23b3d13f351af9ec98b8 Mon Sep 17 00:00:00 2001 From: jennypavlova Date: Wed, 8 Nov 2023 16:11:08 +0100 Subject: [PATCH 33/46] [ObsUx] Metadata flaky test fix (#170866) Closes #167710 ## Summary This PR changes the `max` date to avoid conflict with the metadata fixture (checking that the fixture date is *after* the constant date defined which currently matches) ## Testing Test server run: `node scripts/functional_tests_server --config x-pack/test/api_integration/config` Test run: ` node scripts/functional_test_runner --config=x-pack/test/api_integration/apis/metrics_ui/config --grep="metadata"` --- x-pack/test/api_integration/apis/metrics_ui/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/api_integration/apis/metrics_ui/constants.ts b/x-pack/test/api_integration/apis/metrics_ui/constants.ts index 7fd25f09875b4..13fd1acf7b199 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/constants.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/constants.ts @@ -40,7 +40,7 @@ export const DATES = { }, logs_and_metrics_with_aws: { min: 1564083185000, - max: 1564083493080, + max: 1564083705100, }, }, 'alert-test-data': { From bb15bb14482ad2ebad232a53678f7be64c1eb7eb Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 8 Nov 2023 07:12:54 -0800 Subject: [PATCH 34/46] [OAS] Fix cases API data types for comments (#170698) --- .../plugins/cases/docs/openapi/bundled.json | 126 +++++++++++++++++- .../plugins/cases/docs/openapi/bundled.yaml | 102 +++++++++++++- .../get_case_observability_response.yaml | 97 ++++++++++++++ .../examples/get_case_response.yaml | 1 + .../alert_comment_response_properties.yaml | 17 ++- .../openapi/paths/api@cases@{caseid}.yaml | 4 +- .../paths/s@{spaceid}@api@cases@{caseid}.yaml | 2 + 7 files changed, 328 insertions(+), 21 deletions(-) create mode 100644 x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 80cdefd30e957..54a9c31d34312 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -1206,8 +1206,11 @@ "$ref": "#/components/schemas/case_response_properties" }, "examples": { - "getCaseResponse": { + "getDefaultCaseResponse": { "$ref": "#/components/examples/get_case_response" + }, + "getDefaultObservabilityCaseReponse": { + "$ref": "#/components/examples/get_case_observability_response" } } } @@ -3078,6 +3081,9 @@ "examples": { "getCaseResponse": { "$ref": "#/components/examples/get_case_response" + }, + "getObservabilityCaseReponse": { + "$ref": "#/components/examples/get_case_observability_response" } } } @@ -4614,13 +4620,16 @@ ], "properties": { "alertId": { - "type": "string", - "example": "6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42" + "type": "array", + "items": { + "type": "string", + "example": "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + } }, "created_at": { "type": "string", "format": "date-time", - "example": "2022-03-24T02:31:03.210Z" + "example": "2023-11-06T19:29:38.424Z" }, "created_by": { "type": "object", @@ -4656,8 +4665,11 @@ "example": "73362370-ab1a-11ec-985f-97e55adae8b9" }, "index": { - "type": "string", - "example": ".internal.alerts-security.alerts-default-000001" + "type": "array", + "items": { + "type": "string", + "example": ".internal.alerts-security.alerts-default-000001" + } }, "owner": { "$ref": "#/components/schemas/owners" @@ -4723,10 +4735,11 @@ "updated_at": { "type": "string", "format": "date-time", - "example": null + "nullable": true }, "updated_by": { "type": "object", + "nullable": true, "required": [ "email", "full_name", @@ -6971,6 +6984,7 @@ "syncAlerts": true }, "owner": "cases", + "category": null, "customFields": [ { "type": "text", @@ -7017,6 +7031,104 @@ "external_service": null } }, + "get_case_observability_response": { + "summary": "Retrieves information about an Observability case including its alerts and comments.", + "value": { + "description": "An Observability case description.", + "owner": "observability", + "settings": { + "syncAlerts": false + }, + "tags": [ + "observability", + "tag 1" + ], + "title": "Observability case title 1", + "category": null, + "customFields": [], + "assignees": [ + { + "uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" + } + ], + "connector": { + "id": "none", + "type": ".none", + "fields": null, + "name": "none" + }, + "severity": "low", + "status": "in-progress", + "duration": null, + "closed_at": null, + "closed_by": null, + "created_at": "2023-11-06T19:29:04.086Z", + "created_by": { + "username": "elastic", + "full_name": null, + "email": null + }, + "updated_at": "2023-11-06T19:47:55.662Z", + "updated_by": { + "username": "elastic", + "full_name": null, + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "external_service": null, + "id": "c3ff7550-def1-4e90-b6bc-c9969a4a09b1", + "version": "WzI0NywyXQ==", + "totalComment": 1, + "totalAlerts": 1, + "comments": [ + { + "alertId": [ + "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + ], + "index": [ + ".internal.alerts-observability.logs.alerts-default-000001" + ], + "type": "alert", + "rule": { + "id": "03e4eb87-62ca-4e5d-9570-3d7625e9669d", + "name": "Observability rule" + }, + "owner": "observability", + "created_at": "2023-11-06T19:29:38.424Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "59d438d0-79a9-4864-8d4b-e63adacebf6e", + "version": "WzY3LDJd" + }, + { + "comment": "The first comment.", + "type": "user", + "owner": "observability", + "created_at": "2023-11-06T19:29:57.812Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "d99342d3-3aa3-4b80-90ec-a702607604f5", + "version": "WzcyLDJd" + } + ] + } + }, "get_case_alerts_response": { "summary": "Retrieves all alerts attached to a case", "value": [ diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index ec5c1db337f29..8347d7d85741b 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -811,8 +811,10 @@ paths: schema: $ref: '#/components/schemas/case_response_properties' examples: - getCaseResponse: + getDefaultCaseResponse: $ref: '#/components/examples/get_case_response' + getDefaultObservabilityCaseReponse: + $ref: '#/components/examples/get_case_observability_response' '401': description: Authorization information is missing or invalid. content: @@ -2017,6 +2019,8 @@ paths: examples: getCaseResponse: $ref: '#/components/examples/get_case_response' + getObservabilityCaseReponse: + $ref: '#/components/examples/get_case_observability_response' '401': description: Authorization information is missing or invalid. content: @@ -3068,12 +3072,14 @@ components: - type properties: alertId: - type: string - example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + type: array + items: + type: string + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - example: '2022-03-24T02:31:03.210Z' + example: '2023-11-06T19:29:38.424Z' created_by: type: object required: @@ -3100,8 +3106,10 @@ components: type: string example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: - type: string - example: .internal.alerts-security.alerts-default-000001 + type: array + items: + type: string + example: .internal.alerts-security.alerts-default-000001 owner: $ref: '#/components/schemas/owners' pushed_at: @@ -3151,9 +3159,10 @@ components: updated_at: type: string format: date-time - example: null + nullable: true updated_by: type: object + nullable: true required: - email - full_name @@ -4769,6 +4778,7 @@ components: settings: syncAlerts: true owner: cases + category: null customFields: - type: text key: d312efda-ec2b-42ec-9e2c-84981795c581 @@ -4802,6 +4812,84 @@ components: type: .none fields: null external_service: null + get_case_observability_response: + summary: Retrieves information about an Observability case including its alerts and comments. + value: + description: An Observability case description. + owner: observability + settings: + syncAlerts: false + tags: + - observability + - tag 1 + title: Observability case title 1 + category: null + customFields: [] + assignees: + - uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + connector: + id: none + type: .none + fields: null + name: none + severity: low + status: in-progress + duration: null + closed_at: null + closed_by: null + created_at: '2023-11-06T19:29:04.086Z' + created_by: + username: elastic + full_name: null + email: null + updated_at: '2023-11-06T19:47:55.662Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + external_service: null + id: c3ff7550-def1-4e90-b6bc-c9969a4a09b1 + version: WzI0NywyXQ== + totalComment: 1 + totalAlerts: 1 + comments: + - alertId: + - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + index: + - .internal.alerts-observability.logs.alerts-default-000001 + type: alert + rule: + id: 03e4eb87-62ca-4e5d-9570-3d7625e9669d + name: Observability rule + owner: observability + created_at: '2023-11-06T19:29:38.424Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: 59d438d0-79a9-4864-8d4b-e63adacebf6e + version: WzY3LDJd + - comment: The first comment. + type: user + owner: observability + created_at: '2023-11-06T19:29:57.812Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: d99342d3-3aa3-4b80-90ec-a702607604f5 + version: WzcyLDJd get_case_alerts_response: summary: Retrieves all alerts attached to a case value: diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml new file mode 100644 index 0000000000000..49b9aa692a335 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml @@ -0,0 +1,97 @@ +summary: Retrieves information about an Observability case including its alerts and comments. +value: + { + "description": "An Observability case description.", + "owner": "observability", + "settings": { + "syncAlerts": false + }, + "tags": [ + "observability", + "tag 1" + ], + "title": "Observability case title 1", + "category": null, + "customFields": [], + "assignees": [ + { + "uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" + } + ], + "connector": { + "id": "none", + "type": ".none", + "fields": null, + "name": "none" + }, + "severity": "low", + "status": "in-progress", + "duration": null, + "closed_at": null, + "closed_by": null, + "created_at": "2023-11-06T19:29:04.086Z", + "created_by": { + "username": "elastic", + "full_name": null, + "email": null + }, + "updated_at": "2023-11-06T19:47:55.662Z", + "updated_by": { + "username": "elastic", + "full_name": null, + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "external_service": null, + "id": "c3ff7550-def1-4e90-b6bc-c9969a4a09b1", + "version": "WzI0NywyXQ==", + "totalComment": 1, + "totalAlerts": 1, + "comments": [ + { + "alertId": [ + "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + ], + "index": [ + ".internal.alerts-observability.logs.alerts-default-000001" + ], + "type": "alert", + "rule": { + "id": "03e4eb87-62ca-4e5d-9570-3d7625e9669d", + "name": "Observability rule" + }, + "owner": "observability", + "created_at": "2023-11-06T19:29:38.424Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "59d438d0-79a9-4864-8d4b-e63adacebf6e", + "version": "WzY3LDJd" + }, + { + "comment": "The first comment.", + "type": "user", + "owner": "observability", + "created_at": "2023-11-06T19:29:57.812Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "d99342d3-3aa3-4b80-90ec-a702607604f5", + "version": "WzcyLDJd" + } + ] +} \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml index d4fc3db97a169..50dabd2dc8a9b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml @@ -27,6 +27,7 @@ value: "tags":["tag 1"], "settings":{"syncAlerts":true}, "owner":"cases", + "category":null, "customFields": [ { "type": "text", diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml index aa39aad1381a0..443d9dcc55523 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml @@ -4,12 +4,14 @@ required: - type properties: alertId: - type: string - example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + type: array + items: + type: string + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - example: 2022-03-24T02:31:03.210Z + example: 2023-11-06T19:29:38.424Z created_by: type: object required: @@ -22,8 +24,10 @@ properties: type: string example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: - type: string - example: .internal.alerts-security.alerts-default-000001 + type: array + items: + type: string + example: .internal.alerts-security.alerts-default-000001 owner: $ref: 'owners.yaml' pushed_at: @@ -52,9 +56,10 @@ properties: updated_at: type: string format: date-time - example: null + nullable: true updated_by: type: object + nullable: true required: - email - full_name diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml index 9629049c9b342..c5b52a52b741f 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml @@ -18,8 +18,10 @@ get: schema: $ref: '../components/schemas/case_response_properties.yaml' examples: - getCaseResponse: + getDefaultCaseResponse: $ref: '../components/examples/get_case_response.yaml' + getDefaultObservabilityCaseReponse: + $ref: '../components/examples/get_case_observability_response.yaml' '401': description: Authorization information is missing or invalid. content: diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml index 32e3434f15add..aecd3f6394bb7 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml @@ -21,6 +21,8 @@ get: examples: getCaseResponse: $ref: '../components/examples/get_case_response.yaml' + getObservabilityCaseReponse: + $ref: '../components/examples/get_case_observability_response.yaml' '401': description: Authorization information is missing or invalid. content: From 5fab32d28fd495f3cefc0e731bbeff851f88e126 Mon Sep 17 00:00:00 2001 From: dkirchan <55240027+dkirchan@users.noreply.github.com> Date: Wed, 8 Nov 2023 17:29:42 +0200 Subject: [PATCH 35/46] [Security][EDR Workflows Serverless] Introduced the EDR Workflows pipeline for serverless (#170843) ## Summary In this PR I get the folder structure better for the security solution quality gate pipelines and introducing a new pipeline to be working on for EDR Workflows. In this [kibana-buildkite](https://github.com/elastic/kibana-buildkite/pull/128) PR you can see the architecture of the pipelines and the necessary relevant changes for this PR. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../{base.yml => security_solution_cypress.yml} | 6 +++--- .../edr_workflows/pipeline.sh | 5 +++++ .../mki_security_solution_cypress.sh | 0 .../{ => security_solution_cypress}/pipeline.sh | 0 .../{ => security_solution_cypress}/pipeline.ts | 4 +++- 5 files changed, 11 insertions(+), 4 deletions(-) rename .buildkite/pipelines/security_solution/{base.yml => security_solution_cypress.yml} (79%) create mode 100755 .buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh rename .buildkite/scripts/pipelines/security_solution_quality_gate/{ => security_solution_cypress}/mki_security_solution_cypress.sh (100%) rename .buildkite/scripts/pipelines/security_solution_quality_gate/{ => security_solution_cypress}/pipeline.sh (100%) rename .buildkite/scripts/pipelines/security_solution_quality_gate/{ => security_solution_cypress}/pipeline.ts (90%) diff --git a/.buildkite/pipelines/security_solution/base.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml similarity index 79% rename from .buildkite/pipelines/security_solution/base.yml rename to .buildkite/pipelines/security_solution/security_solution_cypress.yml index 337c44ccdcc7e..247505ef1c85a 100644 --- a/.buildkite/pipelines/security_solution/base.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -1,5 +1,5 @@ steps: - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless label: 'Serverless MKI QA Security Cypress Tests' agents: queue: n2-4-spot @@ -11,7 +11,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' agents: queue: n2-4-spot @@ -23,7 +23,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests' agents: queue: n2-4-spot diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh new file mode 100755 index 0000000000000..807ec48ab48ed --- /dev/null +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -euo pipefail + +echo "Running the EDR-Workflows testing for Kibana" \ No newline at end of file diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh similarity index 100% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh similarity index 100% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts similarity index 90% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts index 4084696d5c21c..fb9ec67fba888 100644 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts @@ -28,7 +28,9 @@ const uploadPipeline = (pipelineContent: string | object) => { try { const pipeline = []; - pipeline.push(getPipeline('.buildkite/pipelines/security_solution/base.yml', false)); + pipeline.push( + getPipeline('.buildkite/pipelines/security_solution/security_solution_cypress.yml', false) + ); // remove duplicated steps uploadPipeline([...new Set(pipeline)].join('\n')); } catch (ex) { From 71f1dc7bd58ed636a02a707893eb4e07e3e1f35f Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Wed, 8 Nov 2023 15:38:21 +0000 Subject: [PATCH 36/46] [Entity Analytics] Remove nested `message.message` property from risk engine API error responses (#170645) ## Summary **TLDR:** change risk engine API error response bodies from `{ message : { message : 'blah', full_error : 'something'}}` to `{ message : 'blah', full_error : 'something'}` I noticed a UI bug when the risk engine "init" call returns an error, this was because the UI was expecting `error.message` to be a string but it was an object with another nested message property. This lead me to investigate why this was the case, turns out our error wrapper was always putting things under a `message` key which in our case we do not want. ### UI crash before ``` Uncaught Error: Objects are not valid as a React child (found: object with keys {message}). If you meant to render a collection of children, use an array instead. ``` Screenshot 2023-11-06 at 14 02 17 ### Correct error display after Screenshot 2023-11-06 at 13 51 04 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../server/routes/utils/build_siem_response.ts | 8 ++++++-- .../components/risk_score_enable_section.tsx | 8 ++++---- .../routes/risk_engine_disable_route.test.ts | 10 ++++------ .../routes/risk_engine_disable_route.ts | 7 +++---- .../routes/risk_engine_enable_route.test.ts | 10 ++++------ .../routes/risk_engine_enable_route.ts | 8 +++----- .../risk_engine/routes/risk_engine_init_route.ts | 9 ++++----- .../routes/risk_engine_status_route.ts | 1 + .../routes/risk_score_calculation_route.ts | 1 + .../routes/risk_score_preview_route.ts | 1 + .../lib/risk_engine/routes/translations.ts | 16 ++++++++++++++++ .../server/lib/risk_engine/types.ts | 12 ++++-------- 12 files changed, 51 insertions(+), 40 deletions(-) create mode 100644 x-pack/plugins/security_solution/server/lib/risk_engine/routes/translations.ts diff --git a/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts b/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts index 4a5ed5cc4b0e0..d61a02a869d28 100644 --- a/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts +++ b/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts @@ -49,7 +49,7 @@ export class SiemResponseFactory { constructor(private response: KibanaResponseFactory) {} // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - error({ statusCode, body, headers }: CustomHttpResponseOptions) { + error({ statusCode, body, headers, bypassErrorFormat }: CustomHttpResponseOptions) { // KibanaResponse is not exported so we cannot use a return type here and that is why the linter is turned off above const contentType: CustomHttpResponseOptions['headers'] = { 'content-type': 'application/json', @@ -59,10 +59,14 @@ export class SiemResponseFactory { ...(headers ?? {}), }; + const formattedBody = bypassErrorFormat + ? body + : { message: body ?? statusToErrorMessage(statusCode) }; + return this.response.custom({ body: Buffer.from( JSON.stringify({ - message: body ?? statusToErrorMessage(statusCode), + ...formattedBody, status_code: statusCode, }) ), diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx index 0eead8683e4f2..bd0b0e262e3cc 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx @@ -235,11 +235,11 @@ export const RiskScoreEnableSection = () => { let initRiskEngineErrors: string[] = []; if (initRiskEngineMutation.isError) { - const errorBody = initRiskEngineMutation.error.body.message; + const errorBody = initRiskEngineMutation.error.body; if (errorBody?.full_error?.errors) { initRiskEngineErrors = errorBody.full_error?.errors; } else { - initRiskEngineErrors = [errorBody]; + initRiskEngineErrors = [errorBody.message]; } } @@ -266,10 +266,10 @@ export const RiskScoreEnableSection = () => { {initRiskEngineMutation.isError && } {disableRiskEngineMutation.isError && ( - + )} {enableRiskEngineMutation.isError && ( - + )} diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts index e7c162ddd08e8..90a2182fee573 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts @@ -16,7 +16,7 @@ import { } from '../../detection_engine/routes/__mocks__'; import { riskEngineDataClientMock } from '../risk_engine_data_client.mock'; -describe('risk score calculation route', () => { +describe('risk score disable route', () => { let server: ReturnType; let context: ReturnType; let mockTaskManagerStart: ReturnType; @@ -78,7 +78,7 @@ describe('risk score calculation route', () => { const response = await server.inject(request, context); expect(response.status).toEqual(500); - expect(response.body.message.message).toEqual('something went wrong'); + expect(response.body.message).toEqual('something went wrong'); }); }); @@ -94,10 +94,8 @@ describe('risk score calculation route', () => { expect(response.status).toEqual(400); expect(response.body).toEqual({ - message: { - message: - 'Task Manager is unavailable, but is required to disable the risk engine. Please enable the taskManager plugin and try again.', - }, + message: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', status_code: 400, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts index b5ae6287c40fd..6a2221c4eb2be 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts @@ -9,6 +9,7 @@ import type { StartServicesAccessor } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; import { RISK_ENGINE_DISABLE_URL, APP_ID } from '../../../../common/constants'; +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; import type { StartPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; @@ -34,10 +35,7 @@ export const riskEngineDisableRoute = ( if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to disable the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -50,6 +48,7 @@ export const riskEngineDisableRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts index 8ef30ae60e368..b64fd3f025c41 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts @@ -16,7 +16,7 @@ import { } from '../../detection_engine/routes/__mocks__'; import { riskEngineDataClientMock } from '../risk_engine_data_client.mock'; -describe('risk score calculation route', () => { +describe('risk score enable route', () => { let server: ReturnType; let context: ReturnType; let mockTaskManagerStart: ReturnType; @@ -78,7 +78,7 @@ describe('risk score calculation route', () => { const response = await server.inject(request, context); expect(response.status).toEqual(500); - expect(response.body.message.message).toEqual('something went wrong'); + expect(response.body.message).toEqual('something went wrong'); }); }); @@ -94,10 +94,8 @@ describe('risk score calculation route', () => { expect(response.status).toEqual(400); expect(response.body).toEqual({ - message: { - message: - 'Task Manager is unavailable, but is required to enable the risk engine. Please enable the taskManager plugin and try again.', - }, + message: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', status_code: 400, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts index af5eb77374bba..cd8cb05072ff1 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts @@ -9,6 +9,7 @@ import type { StartServicesAccessor } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; import { RISK_ENGINE_ENABLE_URL, APP_ID } from '../../../../common/constants'; +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; import type { StartPlugins } from '../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../types'; @@ -29,14 +30,10 @@ export const riskEngineEnableRoute = ( const [_, { taskManager }] = await getStartServices(); const securitySolution = await context.securitySolution; const riskEngineClient = securitySolution.getRiskEngineDataClient(); - if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to enable the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -49,6 +46,7 @@ export const riskEngineEnableRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts index 2a0a5fafc70b0..bacd8ba55bcf0 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts @@ -10,7 +10,7 @@ import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; import { RISK_ENGINE_INIT_URL, APP_ID } from '../../../../common/constants'; import type { StartPlugins } from '../../../plugin'; - +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; import type { SecuritySolutionPluginRouter } from '../../../types'; export const riskEngineInitRoute = ( @@ -36,10 +36,7 @@ export const riskEngineInitRoute = ( if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to initialize the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -67,6 +64,7 @@ export const riskEngineInitRoute = ( message: initResultResponse.errors.join('\n'), full_error: initResultResponse, }, + bypassErrorFormat: true, }); } return response.ok({ body: { result: initResultResponse } }); @@ -76,6 +74,7 @@ export const riskEngineInitRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts index d741ee5dd23ff..4d8c9a1547f68 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts @@ -44,6 +44,7 @@ export const riskEngineStatusRoute = (router: SecuritySolutionPluginRouter) => { return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts index 1b02c4a10fd25..f9ebd13131562 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts @@ -89,6 +89,7 @@ export const riskScoreCalculationRoute = (router: SecuritySolutionPluginRouter, return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } } diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts index 9a1a5f2b83d7c..e91a2fa1144bb 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts @@ -91,6 +91,7 @@ export const riskScorePreviewRoute = (router: SecuritySolutionPluginRouter, logg return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } } diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/translations.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/translations.ts new file mode 100644 index 0000000000000..648ec23ea6b3c --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/routes/translations.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const TASK_MANAGER_UNAVAILABLE_ERROR = i18n.translate( + 'xpack.securitySolution.api.riskEngine.taskManagerUnavailable', + { + defaultMessage: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', + } +); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts b/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts index 1e9751ff1388e..4b6da2b65f553 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts +++ b/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts @@ -78,19 +78,15 @@ export interface InitRiskEngineResponse { export interface InitRiskEngineError { body: { - message: { - message: string; - full_error: InitRiskEngineResultResponse | undefined; - } & string; + message: string; + full_error: InitRiskEngineResultResponse | undefined; }; } export interface EnableDisableRiskEngineErrorResponse { body: { - message: { - message: string; - full_error: string; - }; + message: string; + full_error: string; }; } From 48ba61554f55af2e995247c693b94dd57df124ba Mon Sep 17 00:00:00 2001 From: Anton Dosov Date: Wed, 8 Nov 2023 16:41:40 +0100 Subject: [PATCH 37/46] Fix the empty space in the project header in some cases (#170833) ## Summary Fixes this empty space issue in some cases: Screenshot 2023-11-08 at 10 38 09 To keep it simple, let's just remove this section from DOM until or if we need it. Previously this was used for spaces, but if we support spaces in serverless they will become part of breadcrumbs anyways --- .../core-chrome-browser-internal/src/ui/project/header.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx index 0892b0c363911..30fe35be0b551 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx @@ -196,10 +196,6 @@ export const ProjectHeader = ({ /> - - - - From 8912834af3c8d2317889968057cb1a87e18c69b5 Mon Sep 17 00:00:00 2001 From: Carlos Crespo Date: Wed, 8 Nov 2023 16:59:27 +0100 Subject: [PATCH 38/46] [ObsUX] Fix transaction bar being pushed to the right (#170406) closes https://github.com/elastic/kibana/issues/146869 ## Summary This PR fixes the timeline bar pushed by the children's count label. image It also caps the max width of the label, so that large numbers don't overlap with the transaction bar. image A tooltip will now always appear when hovering over the count, regardless of how much space it takes image ### Checklist - Start Kibana pointing to an oblt-cli cluster - Alternatively, point to a local es cluster and use synthtrace: - `node scripts/synthtrace distributed_trace_long.ts --target=http://elastic:changeme@localhost:9200 --live --kibana=http://elastic:changeme@0.0.0.0:5601/ftw --clean ` - Navigate to `APM` > `Traces` --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../waterfall/accordion_waterfall.tsx | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx index 1aa7c9ecb127b..f705244d6963e 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx @@ -12,11 +12,13 @@ import { EuiFlexItem, EuiIcon, EuiText, + EuiToolTip, } from '@elastic/eui'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { groupBy } from 'lodash'; import { transparentize } from 'polished'; import React, { useState } from 'react'; +import { asBigNumber } from '../../../../../../../common/utils/formatters'; import { getCriticalPath } from '../../../../../../../common/critical_path/get_critical_path'; import { useTheme } from '../../../../../../hooks/use_theme'; import { Margins } from '../../../../../shared/charts/timeline'; @@ -148,7 +150,7 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) {
@@ -200,12 +202,12 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { function ToggleAccordionButton({ show, isOpen, - childrenAmount, + childrenCount, onClick, }: { show: boolean; isOpen: boolean; - childrenAmount: number; + childrenCount: number; onClick: () => void; }) { if (!show) { @@ -213,7 +215,12 @@ function ToggleAccordionButton({ } return ( -
+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */} @@ -226,8 +233,18 @@ function ToggleAccordionButton({
- - {childrenAmount} + +
+ + {asBigNumber(childrenCount)} + +
From 55d8ea45aca36fa61bb20597b1d5676ecf4d3773 Mon Sep 17 00:00:00 2001 From: dkirchan <55240027+dkirchan@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:10:33 +0200 Subject: [PATCH 39/46] [Security][Fix] Fixed wrong path file invocation error (#170881) ## Summary An error occured in our pipeline after merging a wrong filepath. This PR fixes this error defining the correct path. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../security_solution_cypress/pipeline.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh index 3f4b2093b807e..b3d93e083fa41 100755 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh @@ -2,4 +2,4 @@ set -euo pipefail -ts-node .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts +ts-node .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts From 552e87ba8fe8cef176dd977d695d548a9a476e30 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Wed, 8 Nov 2023 17:12:27 +0100 Subject: [PATCH 40/46] Rename document count aggregation and add default filter title (#170845) Closes #166472 ## Summary Rename document count aggregation and add default filter title. https://github.com/elastic/kibana/assets/12370520/134b9253-eb09-4613-85c4-b262af062338 --- .../components/custom_equation/metric_row_with_agg.tsx | 9 ++++++++- .../custom_threshold/components/expression_row.tsx | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx index 80a379134806c..834cffada60ce 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx @@ -38,6 +38,11 @@ interface MetricRowWithAggProps extends MetricRowBaseProps { fields: NormalizedFields; } +const DEFAULT_COUNT_FILTER_TITLE = i18n.translate( + 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.defaultCountFilterTitle', + { defaultMessage: 'all documents' } +); + export function MetricRowWithAgg({ name, aggType = Aggregators.COUNT, @@ -126,7 +131,9 @@ export function MetricRowWithAgg({ { diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx index e508977658c0c..bfb2c2f4c33de 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/expression_row.tsx @@ -292,7 +292,7 @@ export const aggregationType: { [key: string]: AggregationType } = { text: i18n.translate( 'xpack.observability.customThreshold.rule.alertFlyout.aggregationText.count', { - defaultMessage: 'Document count', + defaultMessage: 'Count', } ), fieldRequired: false, From c902f90a71b88027b92d339172af8a948a9bb79a Mon Sep 17 00:00:00 2001 From: Drew Tate Date: Wed, 8 Nov 2023 10:00:26 -0700 Subject: [PATCH 41/46] [Event annotations] re-enable data view switching tests (#170804) ## Summary Fix https://github.com/elastic/kibana/issues/170578 Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3936 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../apps/visualize/group3/_annotation_listing.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/visualize/group3/_annotation_listing.ts b/test/functional/apps/visualize/group3/_annotation_listing.ts index 71489388b54b5..3f361919b0279 100644 --- a/test/functional/apps/visualize/group3/_annotation_listing.ts +++ b/test/functional/apps/visualize/group3/_annotation_listing.ts @@ -18,8 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); - // Failing: See https://github.com/elastic/kibana/issues/170578 - describe.skip('annotation listing page', function () { + describe('annotation listing page', function () { before(async function () { await kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/annotation_listing_page_search' @@ -156,11 +155,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); await PageObjects.annotationEditor.saveGroup(); - await listingTable.clearSearchFilter(); }); }); describe('data view switching', () => { + before(async () => { + await listingTable.clearSearchFilter(); + }); + it('recovers from missing data view', async () => { await listingTable.clickItemLink('eventAnnotation', 'missing data view'); From 09f4708de40dc7f7609bda34ba75affa6083db3d Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 8 Nov 2023 11:23:19 -0700 Subject: [PATCH 42/46] Functional tests for KibanaErrorBoundary (#170569) Part of https://github.com/elastic/kibana-team/issues/646 This PR adds an example plugin in `examples/error_boundary` that shows usage of KibanaErrorBoundary. The example plugin is used in a functional test to ensure errors are caught in the appropriate way, and error messages include a working Refresh button. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .github/CODEOWNERS | 1 + examples/error_boundary/README.md | 3 + examples/error_boundary/kibana.jsonc | 14 +++ examples/error_boundary/public/index.ts | 12 ++ examples/error_boundary/public/plugin.tsx | 111 ++++++++++++++++++ examples/error_boundary/tsconfig.json | 22 ++++ package.json | 1 + .../src/ui/error_boundary.test.tsx | 4 +- .../src/ui/message_components.tsx | 30 +++-- test/examples/config.js | 1 + test/examples/error_boundary/index.ts | 68 +++++++++++ tsconfig.base.json | 2 + yarn.lock | 4 + 13 files changed, 262 insertions(+), 11 deletions(-) create mode 100755 examples/error_boundary/README.md create mode 100644 examples/error_boundary/kibana.jsonc create mode 100755 examples/error_boundary/public/index.ts create mode 100755 examples/error_boundary/public/plugin.tsx create mode 100644 examples/error_boundary/tsconfig.json create mode 100644 test/examples/error_boundary/index.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 94f4285976c2a..72f3f7e7a884f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -353,6 +353,7 @@ src/plugins/embeddable @elastic/kibana-presentation x-pack/examples/embedded_lens_example @elastic/kibana-visualizations x-pack/plugins/encrypted_saved_objects @elastic/kibana-security x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend +examples/error_boundary @elastic/appex-sharedux packages/kbn-es @elastic/kibana-operations packages/kbn-es-archiver @elastic/kibana-operations @elastic/appex-qa packages/kbn-es-errors @elastic/kibana-core diff --git a/examples/error_boundary/README.md b/examples/error_boundary/README.md new file mode 100755 index 0000000000000..3a293c9a7b465 --- /dev/null +++ b/examples/error_boundary/README.md @@ -0,0 +1,3 @@ +## Error Boundary Example + +A very simple example plugin for testing Kibana Error Boundary. diff --git a/examples/error_boundary/kibana.jsonc b/examples/error_boundary/kibana.jsonc new file mode 100644 index 0000000000000..3acabfbb5006c --- /dev/null +++ b/examples/error_boundary/kibana.jsonc @@ -0,0 +1,14 @@ +{ + "type": "plugin", + "id": "@kbn/error-boundary-example-plugin", + "owner": "@elastic/appex-sharedux", + "description": "A plugin which exemplifes the KibanaErrorBoundary", + "plugin": { + "id": "error_boundary_example", + "server": false, + "browser": true, + "requiredPlugins": [ + "developerExamples" + ] + } +} diff --git a/examples/error_boundary/public/index.ts b/examples/error_boundary/public/index.ts new file mode 100755 index 0000000000000..41d35a8f5bec1 --- /dev/null +++ b/examples/error_boundary/public/index.ts @@ -0,0 +1,12 @@ +/* + * 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 { ErrorBoundaryExamplePlugin } from './plugin'; + +export function plugin() { + return new ErrorBoundaryExamplePlugin(); +} diff --git a/examples/error_boundary/public/plugin.tsx b/examples/error_boundary/public/plugin.tsx new file mode 100755 index 0000000000000..2c5d4e7487005 --- /dev/null +++ b/examples/error_boundary/public/plugin.tsx @@ -0,0 +1,111 @@ +/* + * 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 { EuiButton } from '@elastic/eui'; + +import React, { useState } from 'react'; +import ReactDOM from 'react-dom'; + +import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; +import { KibanaErrorBoundary, KibanaErrorBoundaryProvider } from '@kbn/shared-ux-error-boundary'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; + +interface SetupDeps { + developerExamples: DeveloperExamplesSetup; +} + +const useErrors = () => { + return useState(false); +}; + +export const FatalComponent = () => { + const [hasError, setHasError] = useErrors(); + + if (hasError) { + const fatalError = new Error('Example of unknown error type'); + throw fatalError; + } + + return ( + { + setHasError(true); + }} + data-test-subj="fatalErrorBtn" + > + Click for fatal error + + ); +}; + +export const RecoverableComponent = () => { + const [hasError, setHasError] = useErrors(); + + if (hasError) { + // FIXME: use network interception to disable responses + // for chunk requests and attempt to lazy-load a component + // https://github.com/elastic/kibana/issues/170777 + const upgradeError = new Error('ChunkLoadError'); + upgradeError.name = 'ChunkLoadError'; + throw upgradeError; + } + + return ( + { + setHasError(true); + }} + data-test-subj="recoverableErrorBtn" + > + Click for recoverable error + + ); +}; + +export class ErrorBoundaryExamplePlugin implements Plugin { + public setup(core: CoreSetup, deps: SetupDeps) { + // Register an application into the side navigation menu + core.application.register({ + id: 'errorBoundaryExample', + title: 'Error Boundary Example', + async mount({ element }: AppMountParameters) { + ReactDOM.render( + + + + + + + + + + + + + , + element + ); + return () => ReactDOM.unmountComponentAtNode(element); + }, + }); + + // This section is only needed to get this example plugin to show up in our Developer Examples. + deps.developerExamples.register({ + appId: 'errorBoundaryExample', + title: 'Error Boundary Example Application', + description: `Build a plugin that registers an application that simply says "Error Boundary Example"`, + }); + } + public start(_core: CoreStart) { + return {}; + } + public stop() {} +} diff --git a/examples/error_boundary/tsconfig.json b/examples/error_boundary/tsconfig.json new file mode 100644 index 0000000000000..2df5023cbdadb --- /dev/null +++ b/examples/error_boundary/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": [ + "index.ts", + "common/**/*.ts", + "public/**/*.ts", + "public/**/*.tsx", + "../../typings/**/*" + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core", + "@kbn/developer-examples-plugin", + "@kbn/shared-ux-error-boundary", + "@kbn/shared-ux-page-kibana-template" + ] +} diff --git a/package.json b/package.json index 869529d6836a9..4e4c2441fe9fc 100644 --- a/package.json +++ b/package.json @@ -398,6 +398,7 @@ "@kbn/embedded-lens-example-plugin": "link:x-pack/examples/embedded_lens_example", "@kbn/encrypted-saved-objects-plugin": "link:x-pack/plugins/encrypted_saved_objects", "@kbn/enterprise-search-plugin": "link:x-pack/plugins/enterprise_search", + "@kbn/error-boundary-example-plugin": "link:examples/error_boundary", "@kbn/es-errors": "link:packages/kbn-es-errors", "@kbn/es-query": "link:packages/kbn-es-query", "@kbn/es-types": "link:packages/kbn-es-types", diff --git a/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx b/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx index ed5d4a60534c0..05a69a7ccab9e 100644 --- a/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx +++ b/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx @@ -49,7 +49,7 @@ describe('', () => { expect(await findByText(strings.recoverable.callout.title())).toBeVisible(); expect(await findByText(strings.recoverable.callout.pageReloadButton())).toBeVisible(); - (await findByTestId('recoverablePromptReloadBtn')).click(); + (await findByTestId('errorBoundaryRecoverablePromptReloadBtn')).click(); expect(reloadSpy).toHaveBeenCalledTimes(1); }); @@ -69,7 +69,7 @@ describe('', () => { expect(await findByText(strings.fatal.callout.showDetailsButton())).toBeVisible(); expect(await findByText(strings.fatal.callout.pageReloadButton())).toBeVisible(); - (await findByTestId('fatalPromptReloadBtn')).click(); + (await findByTestId('errorBoundaryFatalPromptReloadBtn')).click(); expect(reloadSpy).toHaveBeenCalledTimes(1); }); diff --git a/packages/shared-ux/error_boundary/src/ui/message_components.tsx b/packages/shared-ux/error_boundary/src/ui/message_components.tsx index 6e481cb5d8216..1e44fa68141bc 100644 --- a/packages/shared-ux/error_boundary/src/ui/message_components.tsx +++ b/packages/shared-ux/error_boundary/src/ui/message_components.tsx @@ -55,7 +55,7 @@ const CodePanel: React.FC void }> = (props) - +

{(error.stack ?? error.toString()) + '\n\n'}

{errorName} @@ -93,25 +93,29 @@ export const FatalPrompt: React.FC = (props) => { return ( {strings.fatal.callout.title()}} + title={

{strings.fatal.callout.title()}

} color="danger" iconType="error" body={ <> -

{strings.fatal.callout.body()}

+

{strings.fatal.callout.body()}

{strings.fatal.callout.pageReloadButton()}

- setIsFlyoutVisible(true)}> + setIsFlyoutVisible(true)} + data-test-subj="errorBoundaryFatalShowDetailsBtn" + > {strings.fatal.callout.showDetailsButton()} {isFlyoutVisible ? ( @@ -128,17 +132,25 @@ export const RecoverablePrompt = (props: ErrorCalloutProps) => { const { onClickRefresh } = props; return ( {strings.recoverable.callout.title()}} - body={

{strings.recoverable.callout.body()}

} + title={ +

+ {strings.recoverable.callout.title()} +

+ } color="warning" + iconType="warning" + body={ +

+ {strings.recoverable.callout.body()} +

+ } actions={ {strings.recoverable.callout.pageReloadButton()} diff --git a/test/examples/config.js b/test/examples/config.js index 36f4a007b7983..dbc9d32055cc7 100644 --- a/test/examples/config.js +++ b/test/examples/config.js @@ -31,6 +31,7 @@ export default async function ({ readConfigFile }) { require.resolve('./content_management'), require.resolve('./unified_field_list_examples'), require.resolve('./discover_customization_examples'), + require.resolve('./error_boundary'), ], services: { ...functionalConfig.get('services'), diff --git a/test/examples/error_boundary/index.ts b/test/examples/error_boundary/index.ts new file mode 100644 index 0000000000000..f240ebd1442b2 --- /dev/null +++ b/test/examples/error_boundary/index.ts @@ -0,0 +1,68 @@ +/* + * 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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../functional/ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const retry = getService('retry'); + const testSubjects = getService('testSubjects'); + const PageObjects = getPageObjects(['common']); + const log = getService('log'); + + describe('Error Boundary Examples', () => { + before(async () => { + await PageObjects.common.navigateToApp('errorBoundaryExample'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + + it('fatal error', async () => { + log.debug('clicking button for fatal error'); + await testSubjects.click('fatalErrorBtn'); + const errorHeader = await testSubjects.getVisibleText('errorBoundaryFatalHeader'); + expect(errorHeader).to.not.be(undefined); + + log.debug('checking that the error has taken over the page'); + await testSubjects.missingOrFail('errorBoundaryExampleHeader'); + + await testSubjects.click('errorBoundaryFatalShowDetailsBtn'); + const errorString = await testSubjects.getVisibleText('errorBoundaryFatalDetailsErrorString'); + expect(errorString).to.match(/Error: Example of unknown error type/); + + log.debug('closing error flyout'); + await testSubjects.click('euiFlyoutCloseButton'); + + log.debug('clicking page refresh'); + await testSubjects.click('errorBoundaryFatalPromptReloadBtn'); + + await retry.try(async () => { + log.debug('checking for page refresh'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + }); + + it('recoverable error', async () => { + log.debug('clicking button for recoverable error'); + await testSubjects.click('recoverableErrorBtn'); + const errorHeader = await testSubjects.getVisibleText('errorBoundaryRecoverableHeader'); + expect(errorHeader).to.not.be(undefined); + + log.debug('checking that the error has taken over the page'); + await testSubjects.missingOrFail('errorBoundaryExampleHeader'); + + log.debug('clicking page refresh'); + await testSubjects.click('errorBoundaryRecoverablePromptReloadBtn'); + + await retry.try(async () => { + log.debug('checking for page refresh'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + }); + }); +} diff --git a/tsconfig.base.json b/tsconfig.base.json index 107b8e1f6ff46..40b1ede664328 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -700,6 +700,8 @@ "@kbn/encrypted-saved-objects-plugin/*": ["x-pack/plugins/encrypted_saved_objects/*"], "@kbn/enterprise-search-plugin": ["x-pack/plugins/enterprise_search"], "@kbn/enterprise-search-plugin/*": ["x-pack/plugins/enterprise_search/*"], + "@kbn/error-boundary-example-plugin": ["examples/error_boundary"], + "@kbn/error-boundary-example-plugin/*": ["examples/error_boundary/*"], "@kbn/es": ["packages/kbn-es"], "@kbn/es/*": ["packages/kbn-es/*"], "@kbn/es-archiver": ["packages/kbn-es-archiver"], diff --git a/yarn.lock b/yarn.lock index 813e52bcf4912..68faac71450cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,6 +4304,10 @@ version "0.0.0" uid "" +"@kbn/error-boundary-example-plugin@link:examples/error_boundary": + version "0.0.0" + uid "" + "@kbn/es-archiver@link:packages/kbn-es-archiver": version "0.0.0" uid "" From d95426af357f83f93db605bae127e8b7f67e8c1a Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Wed, 8 Nov 2023 12:29:04 -0600 Subject: [PATCH 43/46] Update references to serverless npm package (#170176) Updates serverless JS client install snippets. And some whitespace, for good measure. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../components/languages/javascript.ts | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts b/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts index 1302bebff7137..72d865f1030bc 100644 --- a/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts +++ b/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts @@ -20,12 +20,15 @@ const searchResult = await client.search({ console.log(searchResult.hits.hits) `, - configureClient: ({ url, apiKey }) => `const { Client } = require('@elastic/elasticsearch'); + configureClient: ({ + url, + apiKey, + }) => `const { Client } = require('@elastic/elasticsearch-serverless'); const client = new Client({ -node: '${url}', -auth: { + node: '${url}', + auth: { apiKey: '${apiKey}' -} + } });`, docLink: docLinks.jsClient, github: { @@ -44,34 +47,34 @@ const dataset = [ {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227}, {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268}, {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} - ]; +]; // Index with the bulk helper const result = await client.helpers.bulk({ -datasource: dataset, -onDocument (doc) { - return { index: { _index: 'my-index-name' }}; -} + datasource: dataset, + onDocument (doc) { + return { index: { _index: 'my-index-name' }}; + } }); console.log(result); /** { -total: 6, -failed: 0, -retry: 0, -successful: 6, -noop: 0, -time: 191, -bytes: 787, -aborted: false + total: 6, + failed: 0, + retry: 0, + successful: 6, + noop: 0, + time: 191, + bytes: 787, + aborted: false } */`, ingestDataIndex: ({ apiKey, url, indexName, - }) => `const { Client } = require('@elastic/elasticsearch'); + }) => `const { Client } = require('@elastic/elasticsearch-serverless'); const client = new Client({ node: '${url}', auth: { @@ -91,7 +94,7 @@ const result = await client.helpers.bulk({ }); console.log(result); `, - installClient: 'npm install @elastic/elasticsearch@8', + installClient: 'npm install @elastic/elasticsearch-serverless', name: i18n.translate('xpack.serverlessSearch.languages.javascript', { defaultMessage: 'JavaScript', }), @@ -100,20 +103,20 @@ console.log(result); console.log(resp); /** { -name: 'instance-0000000000', -cluster_name: 'd9dcd35d12fe46dfaa28ec813f65d57b', -cluster_uuid: 'iln8jaivThSezhTkzp0Knw', -version: { - build_flavor: 'default', - build_type: 'docker', - build_hash: 'c94b4700cda13820dad5aa74fae6db185ca5c304', - build_date: '2022-10-24T16:54:16.433628434Z', - build_snapshot: false, - lucene_version: '9.4.1', - minimum_wire_compatibility_version: '7.17.0', - minimum_index_compatibility_version: '7.0.0' -}, -tagline: 'You Know, for Search' + name: 'instance-0000000000', + cluster_name: 'd9dcd35d12fe46dfaa28ec813f65d57b', + cluster_uuid: 'iln8jaivThSezhTkzp0Knw', + version: { + build_flavor: 'default', + build_type: 'docker', + build_hash: 'c94b4700cda13820dad5aa74fae6db185ca5c304', + build_date: '2022-10-24T16:54:16.433628434Z', + build_snapshot: false, + lucene_version: '9.4.1', + minimum_wire_compatibility_version: '7.17.0', + minimum_index_compatibility_version: '7.0.0' + }, + tagline: 'You Know, for Search' } */`, }; From 2f038e1ba7c82e737ef66a3acd095ef5c7f0ddc3 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Wed, 8 Nov 2023 11:41:07 -0700 Subject: [PATCH 44/46] [Serverless/Reporting] use 3m reporting poll interval for report job cleanup (#170787) Monitoring of task consumption has shown the `reports:monitor` task takes an aggressively high amount of cycles from Kibana Task Manager. This impacts the throughput of alerts. This first step is a serverless-only config change to give an immediate increase in overall task throughput. It's safe to lower this polling frequency: **the impact is limited to the responsiveness of retries** when a report job is found to be timed out. Long-term, the plan will be to tune other parts of the code: https://github.com/elastic/kibana/issues/170462 ## Testing 1. Adjust the Dev mode settings to match a value set in production. Add this to `config/kibana.dev.yml`: ``` xpack.reporting.capture.maxAttempts: 3 # usually in Dev mode, this is set to 1 ``` 2. Start the scripts in different terminal windows to run Elasticsearch and Kibana dev servers ``` yarn es serverless --------------- yarn serverless ``` 3. Open a search in Discover that covers about 4,000 hits and request a CSV export using the Share menu. 4. Monitor the Kibana server logs and wait until the background job begins. Restart the server while the job is executing (saving a file in code under `packages/` or `server/` will trigger a restart). 5. Around 3 minutes after restart, the report job will get a re-attempt Compare this behavior vs in non-serverless, where a report job will get a re-attempt around 3 seconds after restart. --- config/serverless.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/serverless.yml b/config/serverless.yml index e830bb33e6fa9..a6aba80736f2d 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -146,6 +146,7 @@ xpack.task_manager.requeue_invalid_tasks.enabled: true # Reporting feature xpack.screenshotting.enabled: false +xpack.reporting.queue.pollInterval: 3m xpack.reporting.roles.enabled: false xpack.reporting.statefulSettings.enabled: false From ed9956daea8304c53f701c93e93bfba24807b3a5 Mon Sep 17 00:00:00 2001 From: Ryland Herrick Date: Wed, 8 Nov 2023 13:10:11 -0600 Subject: [PATCH 45/46] [Entity Analytics]Integration test cleanup (#168869) ## Summary Followup to some recent work to improve test reliability (namely https://github.com/elastic/kibana/pull/168469): * Consolidates teardown of risk engine artifacts into a single helper function * Removes references to flaky test issues in comments * Log utils errors at the warning level --- .../risk_engine/init_and_status_apis.ts | 33 +++---------------- .../risk_scoring_task_execution.ts | 15 ++------- .../group10/risk_engine/telemetry_usage.ts | 16 ++------- .../group10/risk_engine/utils.ts | 26 ++++++++++++--- 4 files changed, 33 insertions(+), 57 deletions(-) diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts index 480ebd9d9c845..ecf413fcfed70 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts @@ -9,17 +9,14 @@ import expect from '@kbn/expect'; import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/risk_engine/saved_object'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; import { - cleanRiskEngineConfig, legacyTransformIds, createLegacyTransforms, clearLegacyTransforms, riskEngineRouteHelpersFactory, - clearTransforms, installLegacyRiskScore, getLegacyRiskScoreDashboards, clearLegacyDashboards, - deleteRiskEngineTask, - deleteAllRiskScores, + cleanRiskEngine, } from './utils'; // eslint-disable-next-line import/no-default-export @@ -32,35 +29,15 @@ export default ({ getService }: FtrProviderContext) => { describe('Risk Engine', () => { beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); - await clearTransforms({ - es, - log, - }); + await cleanRiskEngine({ kibanaServer, es, log }); }); afterEach(async () => { - await cleanRiskEngineConfig({ - kibanaServer, - }); - await clearLegacyTransforms({ - es, - log, - }); - await clearTransforms({ - es, - log, - }); - await clearLegacyDashboards({ - supertest, - log, - }); - await deleteRiskEngineTask({ es, log }); + await cleanRiskEngine({ kibanaServer, es, log }); + await clearLegacyTransforms({ es, log }); + await clearLegacyDashboards({ supertest, log }); }); - // FLAKY: https://github.com/elastic/kibana/issues/168376 describe('init api', () => { it('should return response with success status', async () => { const response = await riskEngineRoutes.init(); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts index 6a95d236a9d0a..4985bede5dd6f 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts @@ -13,18 +13,15 @@ import { dataGeneratorFactory } from '../../../utils/data_generator'; import { buildDocument, createAndSyncRuleAndAlertsFactory, - deleteRiskEngineTask, - deleteAllRiskScores, readRiskScores, waitForRiskScoresToBePresent, normalizeScores, riskEngineRouteHelpersFactory, updateRiskEngineConfigSO, getRiskEngineTask, - cleanRiskEngineConfig, waitForRiskEngineTaskToBeGone, deleteRiskScoreIndices, - clearTransforms, + cleanRiskEngine, } from './utils'; // eslint-disable-next-line import/no-default-export @@ -57,21 +54,15 @@ export default ({ getService }: FtrProviderContext): void => { }); beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); afterEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); describe('with some alerts containing hosts', () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts index 2e7888fe00591..75e91eb1a6fc4 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts @@ -12,12 +12,9 @@ import { deleteAllRules, deleteAllAlerts, getRiskEngineStats } from '../../../ut import { buildDocument, createAndSyncRuleAndAlertsFactory, - deleteRiskEngineTask, - deleteRiskScoreIndices, waitForRiskScoresToBePresent, riskEngineRouteHelpersFactory, - cleanRiskEngineConfig, - clearTransforms, + cleanRiskEngine, } from './utils'; import { dataGeneratorFactory } from '../../../utils/data_generator'; @@ -49,12 +46,9 @@ export default ({ getService }: FtrProviderContext) => { }); beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteRiskScoreIndices({ log, es }); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); describe('Risk engine not enabled', () => { @@ -67,7 +61,6 @@ export default ({ getService }: FtrProviderContext) => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/168429 describe('Risk engine enabled', () => { let hostId: string; let userId: string; @@ -105,12 +98,9 @@ export default ({ getService }: FtrProviderContext) => { }); afterEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteRiskScoreIndices({ log, es }); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); it('should return riskEngineMetrics with expected values', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts index 7af59dfab7cf8..3911f55d01631 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts @@ -119,7 +119,7 @@ export const deleteRiskScoreIndices = async ({ }), ]); } catch (e) { - log.error(`Error deleting risk score indices: ${e.message}`); + log.warning(`Error deleting risk score indices: ${e.message}`); } }; @@ -302,6 +302,24 @@ export const cleanRiskEngineConfig = async ({ } }; +/** + * General helper for cleaning up risk engine artifacts. This should be used before and after any risk engine tests so as not to pollute the test environment. + */ +export const cleanRiskEngine = async ({ + es, + kibanaServer, + log, +}: { + es: Client; + kibanaServer: KbnClient; + log: ToolingLog; +}): Promise => { + await deleteRiskEngineTask({ es, log }); + await cleanRiskEngineConfig({ kibanaServer }); + await clearTransforms({ es, log }); + await deleteRiskScoreIndices({ log, es }); +}; + export const updateRiskEngineConfigSO = async ({ attributes, kibanaServer, @@ -344,7 +362,7 @@ export const clearTransforms = async ({ force: true, }); } catch (e) { - log.error(`Error deleting risk_score_latest_transform_default: ${e.message}`); + log.warning(`Error deleting risk_score_latest_transform_default: ${e.message}`); } }; @@ -364,7 +382,7 @@ export const clearLegacyTransforms = async ({ try { await Promise.all(transforms); } catch (e) { - log.error(`Error deleting legacy transforms: ${e.message}`); + log.warning(`Error deleting legacy transforms: ${e.message}`); } }; @@ -392,7 +410,7 @@ export const clearLegacyDashboards = async ({ .send() .expect(200); } catch (e) { - log.error(`Error deleting legacy dashboards: ${e.message}`); + log.warning(`Error deleting legacy dashboards: ${e.message}`); } }; From d644c7085a2efec54073e60c9d3f06686f54fc53 Mon Sep 17 00:00:00 2001 From: Ievgen Sorokopud Date: Wed, 8 Nov 2023 22:16:23 +0100 Subject: [PATCH 46/46] [Security Solution] Unfriendly error message when creating an invalid exception (#168213) (#170764) ## Summary Addresses https://github.com/elastic/kibana/issues/168213 With this PR we limit the length of the comments in exceptions to 30K characters. We took same approach as used in Cases. User will not be allowed to create/edit exception with the comment longer than 30K and validation error will be shown. Right now if user tries to add a very long comment (above 32K characters) the server throws an exception due to the length limitation of the `keyword` type. After the fix, user will see a validation error on putting very long text as a comment Screenshot 2023-11-07 at 16 47 10 --- .../security_solution/common/constants.ts | 5 ++ .../add_exception_flyout/index.test.tsx | 44 +++++++++++++- .../components/add_exception_flyout/index.tsx | 14 +++++ .../add_exception_flyout/reducer.ts | 15 +++++ .../edit_exception_flyout/index.test.tsx | 58 ++++++++++++++++++- .../edit_exception_flyout/index.tsx | 24 +++++++- .../edit_exception_flyout/reducer.ts | 13 +++++ .../components/item_comments/index.test.tsx | 50 ++++++++++++++++ .../components/item_comments/index.tsx | 35 ++++++++--- .../components/item_comments/translations.ts | 7 +++ .../view/components/form.test.tsx | 32 ++++++++++ .../event_filters/view/components/form.tsx | 5 +- .../manage_exceptions.cy.ts | 27 +++------ .../cypress/tasks/exceptions.ts | 3 +- 14 files changed, 300 insertions(+), 32 deletions(-) diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index c6edaf898f67f..a7460bcd70345 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -505,3 +505,8 @@ export const DEFAULT_ALERT_TAGS_VALUE = [ i18n.FALSE_POSITIVE, i18n.FURTHER_INVESTIGATION_REQUIRED, ] as const; + +/** + * Max length for the comments within security solution + */ +export const MAX_COMMENT_LENGTH = 30000 as const; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx index 573419676a086..63b0490b91e60 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { ReactWrapper } from 'enzyme'; import { mount, shallow } from 'enzyme'; -import { waitFor, render } from '@testing-library/react'; +import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { getExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; import { getExceptionBuilderComponentLazy } from '@kbn/lists-plugin/public'; @@ -35,6 +35,7 @@ import { import type { AlertData } from '../../utils/types'; import { useFindRules } from '../../../rule_management/logic/use_find_rules'; import { useFindExceptionListReferences } from '../../logic/use_find_references'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index'); jest.mock('../../../../common/lib/kibana'); @@ -1305,5 +1306,46 @@ describe('When the add exception modal is opened', () => { wrapper.find('button[data-test-subj="addExceptionConfirmButton"]').getDOMNode() ).toBeDisabled(); }); + + test('when there is a comment error has submit button disabled', async () => { + const { getByLabelText, queryByText, getByTestId } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(getByTestId('addExceptionConfirmButton')).toBeDisabled(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx index d4108c3eddede..9eefb96be62c9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx @@ -157,6 +157,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ selectedRulesToAddTo, exceptionListsToAddTo, newComment, + commentErrorExists, itemConditionValidationErrorExists, errorSubmitting, expireTime, @@ -267,6 +268,16 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ [dispatch] ); + const setCommentError = useCallback( + (errorExists: boolean): void => { + dispatch({ + type: 'setCommentError', + errorExists, + }); + }, + [dispatch] + ); + const setBulkCloseIndex = useCallback( (index: string[] | undefined): void => { dispatch({ @@ -445,6 +456,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ exceptionItemName.trim() === '' || exceptionItems.every((item) => item.entries.length === 0) || itemConditionValidationErrorExists || + commentErrorExists || expireErrorExists || (addExceptionToRadioSelection === 'add_to_lists' && isEmpty(exceptionListsToAddTo)) || (addExceptionToRadioSelection === 'select_rules_to_add_to' && @@ -462,6 +474,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ expireErrorExists, selectedRulesToAddTo, listType, + commentErrorExists, ] ); @@ -555,6 +568,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ initialIsOpen={!!newComment} newCommentValue={newComment} newCommentOnChange={setComment} + setCommentError={setCommentError} /> {listType !== ExceptionListTypeEnum.ENDPOINT && ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts index 04d13c3a1b4e9..ec8040d1fe7cc 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts @@ -21,6 +21,7 @@ export interface State { initialItems: ExceptionsBuilderExceptionItem[]; exceptionItems: ExceptionsBuilderReturnExceptionItem[]; newComment: string; + commentErrorExists: boolean; addExceptionToRadioSelection: string; itemConditionValidationErrorExists: boolean; closeSingleAlert: boolean; @@ -40,6 +41,7 @@ export const initialState: State = { exceptionItems: [], exceptionItemMeta: { name: '' }, newComment: '', + commentErrorExists: false, itemConditionValidationErrorExists: false, closeSingleAlert: false, bulkCloseAlerts: false, @@ -76,6 +78,10 @@ export type Action = type: 'setComment'; comment: string; } + | { + type: 'setCommentError'; + errorExists: boolean; + } | { type: 'setCloseSingleAlert'; close: boolean; @@ -127,6 +133,7 @@ export type Action = export const createExceptionItemsReducer = () => + /* eslint complexity: ["error", 21]*/ (state: State, action: Action): State => { switch (action.type) { case 'setExceptionItemMeta': { @@ -172,6 +179,14 @@ export const createExceptionItemsReducer = newComment: comment, }; } + case 'setCommentError': { + const { errorExists } = action; + + return { + ...state, + commentErrorExists: errorExists, + }; + } case 'setCloseSingleAlert': { const { close } = action; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx index faa7c1385142c..077befdad52ba 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/react'; +import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { ThemeProvider } from 'styled-components'; import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; @@ -34,6 +34,7 @@ import { useFetchIndexPatterns } from '../../logic/use_exception_flyout_data'; import { useCreateOrUpdateException } from '../../logic/use_create_update_exception'; import { useFindExceptionListReferences } from '../../logic/use_find_references'; import * as i18n from './translations'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; const mockTheme = getMockTheme({ eui: { @@ -693,5 +694,60 @@ describe('When the edit exception modal is opened', () => { wrapper.find('button[data-test-subj="editExceptionConfirmButton"]').getDOMNode() ).toBeDisabled(); }); + + test('when there is a comment error has submit button disabled', async () => { + const { getByLabelText, queryByText, getByTestId } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(getByTestId('editExceptionConfirmButton')).toBeDisabled(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx index 4d9e7c3bbc4ef..6d2526cdbf239 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx @@ -117,6 +117,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems, exceptionItemMeta: { name: exceptionItemName }, newComment, + commentErrorExists, bulkCloseAlerts, disableBulkClose, bulkCloseIndex, @@ -129,6 +130,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems: [itemToEdit], exceptionItemMeta: { name: itemToEdit.name }, newComment: '', + commentErrorExists: false, bulkCloseAlerts: false, disableBulkClose: true, bulkCloseIndex: undefined, @@ -197,6 +199,16 @@ const EditExceptionFlyoutComponent: React.FC = ({ [dispatch] ); + const setCommentError = useCallback( + (errorExists: boolean): void => { + dispatch({ + type: 'setCommentError', + errorExists, + }); + }, + [dispatch] + ); + const setBulkCloseAlerts = useCallback( (bulkClose: boolean): void => { dispatch({ @@ -337,8 +349,17 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems.every((item) => item.entries.length === 0) || isLoading || entryErrorExists || + expireErrorExists || + commentErrorExists, + [ + isLoading, + entryErrorExists, + exceptionItems, + isSubmitting, + isClosingAlerts, expireErrorExists, - [isLoading, entryErrorExists, exceptionItems, isSubmitting, isClosingAlerts, expireErrorExists] + commentErrorExists, + ] ); return ( @@ -398,6 +419,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItemComments={itemToEdit.comments} newCommentValue={newComment} newCommentOnChange={setComment} + setCommentError={setCommentError} /> {listType !== ExceptionListTypeEnum.ENDPOINT && ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts index e08b3c8d135c0..e6dee3af16572 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts @@ -12,6 +12,7 @@ export interface State { exceptionItems: ExceptionsBuilderReturnExceptionItem[]; exceptionItemMeta: { name: string }; newComment: string; + commentErrorExists: boolean; bulkCloseAlerts: boolean; disableBulkClose: boolean; bulkCloseIndex: string[] | undefined; @@ -29,6 +30,10 @@ export type Action = type: 'setComment'; comment: string; } + | { + type: 'setCommentError'; + errorExists: boolean; + } | { type: 'setBulkCloseAlerts'; bulkClose: boolean; @@ -81,6 +86,14 @@ export const createExceptionItemsReducer = newComment: comment, }; } + case 'setCommentError': { + const { errorExists } = action; + + return { + ...state, + commentErrorExists: errorExists, + }; + } case 'setBulkCloseAlerts': { const { bulkClose } = action; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx index 47933db0b3522..6dd8684eaeaac 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import { act, fireEvent, render } from '@testing-library/react'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { EuiTextArea } from '@elastic/eui'; @@ -13,6 +14,7 @@ import { ExceptionItemComments } from '.'; import { TestProviders } from '../../../../common/mock'; import { useCurrentUser } from '../../../../common/lib/kibana'; import { shallow } from 'enzyme'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; jest.mock('../../../../common/lib/kibana'); @@ -38,6 +40,7 @@ describe('ExceptionItemComments', () => { ); @@ -65,6 +68,7 @@ describe('ExceptionItemComments', () => { ); @@ -92,6 +96,7 @@ describe('ExceptionItemComments', () => { ); @@ -106,6 +111,7 @@ describe('ExceptionItemComments', () => { ); @@ -122,6 +128,7 @@ describe('ExceptionItemComments', () => { ); @@ -152,10 +159,53 @@ describe('ExceptionItemComments', () => { ]} newCommentValue={''} newCommentOnChange={mockOnCommentChange} + setCommentError={jest.fn()} /> ); expect(wrapper.find('[data-test-subj="exceptionItemCommentsAccordion"]').exists()).toBeTruthy(); }); + + it('it calls setCommentError on comment error update change', async () => { + const mockSetCommentError = jest.fn(); + const { getByLabelText, queryByText } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(mockSetCommentError).toHaveBeenCalledWith(true); + + // Put comment with the allowed length + act(() => { + fireEvent.change(commentInput, { + target: { + value: 'Updating my new comment', + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).toBeNull(); + expect(mockSetCommentError).toHaveBeenCalledWith(false); + }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx index 0f32e2b4d1ab8..f262c7a07754a 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx @@ -5,19 +5,21 @@ * 2.0. */ -import React, { memo, useState, useCallback, useMemo } from 'react'; +import React, { memo, useState, useCallback, useMemo, useEffect } from 'react'; import styled, { css } from 'styled-components'; import type { EuiCommentProps } from '@elastic/eui'; import { EuiTextArea, EuiFlexGroup, EuiFlexItem, + EuiFormRow, EuiAvatar, EuiAccordion, EuiCommentList, EuiText, } from '@elastic/eui'; import type { Comment } from '@kbn/securitysolution-io-ts-list-types'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; import * as i18n from './translations'; import { useCurrentUser } from '../../../../common/lib/kibana'; import { getFormattedComments } from '../../utils/helpers'; @@ -28,6 +30,7 @@ interface ExceptionItemCommentsProps { accordionTitle?: JSX.Element; initialIsOpen?: boolean; newCommentOnChange: (value: string) => void; + setCommentError: (errorExists: boolean) => void; } const COMMENT_ACCORDION_BUTTON_CLASS_NAME = 'exceptionCommentAccordionButton'; @@ -53,8 +56,11 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ accordionTitle, initialIsOpen = false, newCommentOnChange, + setCommentError, }: ExceptionItemCommentsProps) { + const [errorExists, setErrorExists] = useState(false); const [shouldShowComments, setShouldShowComments] = useState(false); + const currentUser = useCurrentUser(); const fullName = currentUser?.fullName; const userName = currentUser?.username; @@ -73,9 +79,14 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ return userName && userName.length > 0 ? userName : i18n.UNKNOWN_AVATAR_NAME; }, [fullName, userEmail, userName]); + useEffect(() => { + setCommentError(errorExists); + }, [errorExists, setCommentError]); + const handleOnChange = useCallback( (event: React.ChangeEvent) => { newCommentOnChange(event.target.value); + setErrorExists(event.target.value.length > MAX_COMMENT_LENGTH); }, [newCommentOnChange] ); @@ -121,14 +132,20 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ - + + +
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts index afe20c6aada98..90c3d9bd0bc48 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts @@ -32,3 +32,10 @@ export const COMMENTS_HIDE = (comments: number) => values: { comments }, defaultMessage: 'Hide ({comments}) {comments, plural, =1 {Comment} other {Comments}}', }); + +export const COMMENT_MAX_LENGTH_ERROR = (length: number) => + i18n.translate('xpack.securitySolution.rule_exceptions.itemComments.maxLengthError', { + values: { length }, + defaultMessage: + 'The length of the comment is too long. The maximum length is {length} characters.', + }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx index be028512cb0a8..2870a67e7042c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx @@ -25,6 +25,7 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { EventFiltersForm } from './form'; import { EndpointDocGenerator } from '../../../../../../common/endpoint/generate_data'; import type { PolicyData } from '../../../../../../common/endpoint/types'; +import { MAX_COMMENT_LENGTH } from '../../../../../../common/constants'; jest.mock('../../../../../common/lib/kibana'); jest.mock('../../../../../common/containers/source'); @@ -466,4 +467,35 @@ describe('Event filter form', () => { expect(renderResult.findByTestId('duplicate-fields-warning-message')).not.toBeNull(); }); }); + + describe('Errors', () => { + beforeEach(() => { + render(); + }); + + it('should not show warning text when unique fields are added', async () => { + rerender(); + + const commentInput = renderResult.getByLabelText('Comment Input'); + + expect( + renderResult.queryByText( + `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.` + ) + ).toBeNull(); + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect( + renderResult.queryByText( + `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.` + ) + ).not.toBeNull(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx index 3b4ff4e394a82..e4e1fa7e14638 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx @@ -133,6 +133,7 @@ export const EventFiltersForm: React.FC(!exception.name); const [newComment, setNewComment] = useState(''); + const [hasCommentError, setHasCommentError] = useState(false); const [hasBeenInputNameVisited, setHasBeenInputNameVisited] = useState(false); const [selectedPolicies, setSelectedPolicies] = useState([]); const isPlatinumPlus = useLicense().isPlatinumPlus(); @@ -173,10 +174,11 @@ export const EventFiltersForm: React.FC e.value !== '' || e.value.length) ); - }, [hasNameError, exception.entries]); + }, [hasCommentError, hasNameError, exception.entries]); const processChanged = useCallback( (updatedItem?: Partial) => { @@ -340,6 +342,7 @@ export const EventFiltersForm: React.FC ), [existingComments, handleOnChangeComment, newComment] diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts index eba0c3a64570f..023140d420f2a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts @@ -6,6 +6,7 @@ */ import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; +import { MAX_COMMENT_LENGTH } from '@kbn/security-solution-plugin/common/constants'; import { getNewRule } from '../../../objects/rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -20,9 +21,7 @@ import { submitEditedExceptionItem, submitNewExceptionItem, deleteFirstExceptionItemInListDetailPage, - dismissExceptionItemErrorCallOut, addExceptionHugeComment, - submitNewExceptionItemWithFailure, editExceptionComment, } from '../../../tasks/exceptions'; import { EXCEPTIONS_URL } from '../../../urls/navigation'; @@ -42,7 +41,6 @@ import { } from '../../../tasks/exceptions_table'; import { visitRuleDetailsPage } from '../../../tasks/rule_details'; import { deleteEndpointExceptionList, deleteExceptionLists } from '../../../tasks/common'; -import { closeErrorToast } from '../../../tasks/alerts_detection_rules'; describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { @@ -147,7 +145,7 @@ describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () cy.get(EMPTY_EXCEPTIONS_VIEWER).should('exist'); }); - it('should handle huge text as a comment gracefully and allow user create exception item after user updates the comment', function () { + it('should not allow to add huge text as a comment', function () { createSharedExceptionList( { name: 'Newly created list', description: 'This is my list.' }, true @@ -173,26 +171,19 @@ describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () linkFirstSharedListOnExceptionFlyout(); // add exception comment which is super long - addExceptionHugeComment([...new Array(5000).keys()].map((_) => `Test text!`).join('')); - - // submit - submitNewExceptionItemWithFailure(); + addExceptionHugeComment( + [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join('') + ); - // Failed to add exception due to comment length and submit button should be disabled + // submit button should be disabled due to comment length cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // Close error toast - closeErrorToast(); - - // Dismiss error callout - dismissExceptionItemErrorCallOut(); - - // Submit button should be enabled after we dismissed error callout - cy.get(CONFIRM_BTN).should('not.have.attr', 'disabled'); - // update exception comment to a reasonable (length wise) text editExceptionComment('Exceptional comment'); + // submit button should be enabled + cy.get(CONFIRM_BTN).should('not.have.attr', 'disabled'); + // submit submitNewExceptionItem(); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts b/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts index 00d6c2d405b87..4ed5ff5ef2f8d 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts @@ -237,8 +237,9 @@ export const addExceptionComment = (comment: string) => { export const addExceptionHugeComment = (comment: string) => { cy.get(EXCEPTION_COMMENTS_ACCORDION_BTN).click(); + cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(` {backspace}`); cy.get(EXCEPTION_COMMENT_TEXT_AREA).invoke('val', comment); - cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(`!{backspace}`); + cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(` {backspace}`); cy.get(EXCEPTION_COMMENT_TEXT_AREA).should('have.value', comment); };