diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 7e50b6fcd8c33..39a8b8b9f0a66 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -55,6 +55,7 @@ disabled: - x-pack/test/load/config.ts - x-pack/test/plugin_api_perf/config.js - x-pack/test/screenshot_creation/config.ts + - x-pack/test/fleet_packages/config.ts defaultQueue: 'n2-4-spot' enabled: diff --git a/.buildkite/scripts/steps/fleet/install_all_packages.sh b/.buildkite/scripts/steps/fleet/install_all_packages.sh index 1c5c661abd8c5..f9fbe6d465c69 100755 --- a/.buildkite/scripts/steps/fleet/install_all_packages.sh +++ b/.buildkite/scripts/steps/fleet/install_all_packages.sh @@ -2,10 +2,11 @@ set -euo pipefail -source .buildkite/scripts/common/util.sh - -.buildkite/scripts/bootstrap.sh +source .buildkite/scripts/steps/functional/common.sh echo '--- Installing all packages' -cd x-pack/plugins/fleet -node scripts/install_all_packages + +checks-reporter-with-killswitch "Fleet packages Tests" \ + node scripts/functional_tests \ + --debug --bail \ + --config x-pack/test/fleet_packages/config.ts \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index dbb76d34ca0e5..385d241e52fff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1211,6 +1211,14 @@ module.exports = { 'vars-on-top': 'error', '@typescript-eslint/no-duplicate-imports': ['error'], }, + overrides: [ + { + files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + }, + }, + ], }, { files: ['x-pack/plugins/cases/public/**/*.{js,mjs,ts,tsx}'], @@ -1632,6 +1640,7 @@ module.exports = { 'prefer-arrow-callback': 'error', 'no-unused-vars': 'off', 'react/prop-types': 'off', + '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/explicit-module-boundary-types': 'off', }, }, diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index cc87c75f00be1..a022f19967a0b 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github summary: API docs for the actions plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index c44a7f73ddfff..75a113a41c39b 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github summary: API docs for the advancedSettings plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 70bf5acc0a682..8fdcf98bea476 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github summary: API docs for the aiops plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index f47a91695fd1e..1490336adc3e9 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -829,6 +829,37 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-server.isRuleSnoozed", + "type": "Function", + "tags": [], + "label": "isRuleSnoozed", + "description": [], + "signature": [ + "(rule: RuleSnoozeProps) => boolean" + ], + "path": "x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.isRuleSnoozed.$1", + "type": "Object", + "tags": [], + "label": "rule", + "description": [], + "signature": [ + "RuleSnoozeProps" + ], + "path": "x-pack/plugins/alerting/server/lib/is_rule_snoozed.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-server.parseDuration", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 053e9d09b16a1..2ba9845c5a5ee 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github summary: API docs for the alerting plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 363 | 0 | 354 | 20 | +| 365 | 0 | 356 | 20 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index e6cf3c2084774..530350ff2cb0d 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github summary: API docs for the apm plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index b79ba1e8af005..bbde20ffe2fc2 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github summary: API docs for the banners plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index db394505f761a..907f5f2c5df4a 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github summary: API docs for the bfetch plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 878ac404f7017..2b3d2dfffdd4f 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github summary: API docs for the canvas plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 6924f27635cec..a019a06a5063f 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github summary: API docs for the cases plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 0714eec2581d3..ea4ce3f409c17 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github summary: API docs for the charts plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 1067b8bc0f571..c431101cb489d 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloud plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index e796ea487f71d..883141780077b 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github summary: API docs for the cloudSecurityPosture plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 791470a0a4ded..497825a8cb658 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github summary: API docs for the console plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index f757da4169120..451a717752ff1 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github summary: API docs for the controls plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core.mdx b/api_docs/core.mdx index 690f5e960593f..1418ea0688c29 100644 --- a/api_docs/core.mdx +++ b/api_docs/core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core title: "core" image: https://source.unsplash.com/400x175/?github summary: API docs for the core plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_application.mdx b/api_docs/core_application.mdx index bf76d96254d08..e72fcd7445f91 100644 --- a/api_docs/core_application.mdx +++ b/api_docs/core_application.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-application title: "core.application" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.application plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.application'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_chrome.mdx b/api_docs/core_chrome.mdx index 781b84bd0244a..dbc886414e9ce 100644 --- a/api_docs/core_chrome.mdx +++ b/api_docs/core_chrome.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-chrome title: "core.chrome" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.chrome plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.chrome'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_http.mdx b/api_docs/core_http.mdx index fbaa93c5a9edb..fb861e104213e 100644 --- a/api_docs/core_http.mdx +++ b/api_docs/core_http.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-http title: "core.http" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.http plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.http'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/core_saved_objects.mdx b/api_docs/core_saved_objects.mdx index 0ea4edfa4c9ae..72f08b916c800 100644 --- a/api_docs/core_saved_objects.mdx +++ b/api_docs/core_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/core-savedObjects title: "core.savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the core.savedObjects plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core.savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 9b151ac7c47ca..baeee2c555ff2 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github summary: API docs for the customIntegrations plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 6c792e3c80ae3..c0aa8b78de0f2 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboard plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 67acdfe281ddb..3dd4fd0da368c 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the dashboardEnhanced plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index 21320db919b4e..37616aad58f02 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -4667,7 +4667,13 @@ "description": [], "signature": [ "(x: unknown) => x is ", - "TimeRange" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + } ], "path": "src/plugins/data/common/query/timefilter/is_time_range.ts", "deprecated": false, @@ -8450,7 +8456,13 @@ ], "signature": [ "{ calculateAutoTimeExpression: (range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined; createAggConfigs: (indexPattern: ", { "pluginId": "dataViews", @@ -8661,7 +8673,13 @@ " | ", "Query", "[] | undefined; timeRange?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; }" ], "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", @@ -9398,7 +9416,13 @@ ], "signature": [ "{ time?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; refreshInterval?: ", { "pluginId": "data", diff --git a/api_docs/data.mdx b/api_docs/data.mdx index c86092c76c90e..fbc3fbb0d8cb3 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github summary: API docs for the data plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3073 | 34 | 2400 | 22 | +| 3075 | 34 | 2402 | 21 | ## Client diff --git a/api_docs/data_query.devdocs.json b/api_docs/data_query.devdocs.json index e8ed18e14eced..53a88b9a47a48 100644 --- a/api_docs/data_query.devdocs.json +++ b/api_docs/data_query.devdocs.json @@ -1921,7 +1921,13 @@ "label": "time", "description": [], "signature": [ - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined" ], "path": "src/plugins/data/public/query/state_sync/types.ts", @@ -3589,7 +3595,13 @@ "description": [], "signature": [ "(x: unknown) => x is ", - "TimeRange" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + } ], "path": "src/plugins/data/common/query/timefilter/is_time_range.ts", "deprecated": false, @@ -3843,7 +3855,13 @@ ], "signature": [ "{ time?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; refreshInterval?: ", { "pluginId": "data", @@ -3884,7 +3902,13 @@ "label": "SavedQueryTimeFilter", "description": [], "signature": [ - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " & { refreshInterval: ", { "pluginId": "data", @@ -3898,6 +3922,20 @@ "path": "src/plugins/data/common/query/types.ts", "deprecated": false, "initialIsOpen": false + }, + { + "parentPluginId": "data", + "id": "def-common.TimeRange", + "type": "Type", + "tags": [], + "label": "TimeRange", + "description": [], + "signature": [ + "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" + ], + "path": "src/plugins/data/common/query/timefilter/types.ts", + "deprecated": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 274ee879fa371..9827310477396 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.query plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3073 | 34 | 2400 | 22 | +| 3075 | 34 | 2402 | 21 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 9efe48bc9f826..6232f70b6be2a 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -420,7 +420,13 @@ ], "signature": [ "{ calculateAutoTimeExpression: (range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined; createAggConfigs: (indexPattern: ", { "pluginId": "dataViews", @@ -6338,7 +6344,7 @@ "label": "start", "description": [], "signature": [ - "({ getConfig, fieldFormats, calculateBoundsOptions, }: ", + "({ getConfig, fieldFormats, calculateBounds, }: ", { "pluginId": "data", "scope": "common", @@ -6363,7 +6369,7 @@ "id": "def-common.AggsCommonService.start.$1", "type": "Object", "tags": [], - "label": "{\n getConfig,\n fieldFormats,\n calculateBoundsOptions,\n }", + "label": "{\n getConfig,\n fieldFormats,\n calculateBounds,\n }", "description": [], "signature": [ { @@ -12276,7 +12282,13 @@ "description": [], "signature": [ "(getConfig: (key: string) => any) => (range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined" ], "path": "src/plugins/data/common/search/aggs/utils/calculate_auto_time_expression.ts", @@ -15709,7 +15721,13 @@ "description": [], "signature": [ "(timerange: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => ", { "pluginId": "expressions", @@ -15730,7 +15748,13 @@ "label": "timerange", "description": [], "signature": [ - "TimeRange" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + } ], "path": "src/plugins/data/common/search/expressions/timerange_to_ast.ts", "deprecated": false, @@ -20885,7 +20909,13 @@ "description": [], "signature": [ "(range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined" ], "path": "src/plugins/data/common/search/aggs/types.ts", @@ -21287,16 +21317,41 @@ }, { "parentPluginId": "data", - "id": "def-common.AggsCommonStartDependencies.calculateBoundsOptions", - "type": "Object", + "id": "def-common.AggsCommonStartDependencies.calculateBounds", + "type": "Function", "tags": [], - "label": "calculateBoundsOptions", + "label": "calculateBounds", "description": [], "signature": [ - "CalculateBoundsOptions" + "(timeRange: ", + "TimeRange", + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRangeBounds", + "text": "TimeRangeBounds" + } ], "path": "src/plugins/data/common/search/aggs/aggs_service.ts", - "deprecated": false + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggsCommonStartDependencies.calculateBounds.$1", + "type": "Object", + "tags": [], + "label": "timeRange", + "description": [], + "signature": [ + "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" + ], + "path": "src/plugins/data/common/search/aggs/buckets/date_histogram.ts", + "deprecated": false + } + ] } ], "initialIsOpen": false @@ -25208,7 +25263,13 @@ "description": [], "signature": [ "{ calculateAutoTimeExpression: (range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined; createAggConfigs: (indexPattern: ", { "pluginId": "dataViews", @@ -26647,7 +26708,13 @@ ], "signature": [ "{ calculateAutoTimeExpression: (range: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => string | undefined; createAggConfigs: (indexPattern: ", { "pluginId": "dataViews", @@ -27325,7 +27392,13 @@ " | ", "Query", "[] | undefined; timeRange?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; }" ], "path": "src/plugins/data/common/search/expressions/kibana_context_type.ts", @@ -27925,7 +27998,13 @@ "text": "ExpressionFunctionDefinition" }, "<\"timerange\", null, ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ", ", { "pluginId": "data", @@ -29431,7 +29510,13 @@ "description": [], "signature": [ "{ type: \"timerange\"; } & ", - "TimeRange" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + } ], "path": "src/plugins/data/common/search/expressions/timerange.ts", "deprecated": false, @@ -32805,7 +32890,13 @@ "description": [], "signature": [ "(input: null, args: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, ") => { type: \"timerange\"; from: string; to: string; mode: \"absolute\" | \"relative\" | undefined; }" ], "path": "src/plugins/data/common/search/expressions/timerange.ts", @@ -32833,7 +32924,13 @@ "label": "args", "description": [], "signature": [ - "TimeRange" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + } ], "path": "src/plugins/data/common/search/expressions/timerange.ts", "deprecated": false, @@ -34936,7 +35033,13 @@ " | ", "Query", "[] | undefined; timeRange?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; }" ], "path": "src/plugins/data/common/search/expressions/remove_filter.ts", @@ -35233,7 +35336,13 @@ " | ", "Query", "[] | undefined; timeRange?: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined; }" ], "path": "src/plugins/data/common/search/expressions/select_filter.ts", diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 7b9084dd12411..3c16a3c8278de 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github summary: API docs for the data.search plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3073 | 34 | 2400 | 22 | +| 3075 | 34 | 2402 | 21 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 96b0dd9bfb0a9..4ae2900de37e9 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewEditor plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index d7fc2ac7cf1b2..97304ba2cdf8a 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewFieldEditor plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 260e99e6d9496..86b1d8f37a0ca 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViewManagement plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 0bb3bfdf33d60..c746fe7b7400d 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataViews plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index dbdaaafa47524..f1099aefee61c 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the dataVisualizer plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index d2f79b6909b4d..864a82a0d93ec 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index f70915925e4af..86dc108ed9be8 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin summary: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 915c89a9e43e0..9f5673c2d61a3 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -3,7 +3,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team summary: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index df328f4fb50f3..f16f4311b822f 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github summary: API docs for the devTools plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 193406fbcc1cb..65fbcba576479 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github summary: API docs for the discover plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 89c76333bb99a..927048b3341b7 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the discoverEnhanced plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/elastic_apm_synthtrace.mdx b/api_docs/elastic_apm_synthtrace.mdx index 8a009ab9e95c1..5c1b30101fb48 100644 --- a/api_docs/elastic_apm_synthtrace.mdx +++ b/api_docs/elastic_apm_synthtrace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/elastic-apm-synthtrace title: "@elastic/apm-synthtrace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @elastic/apm-synthtrace plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@elastic/apm-synthtrace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 8cafd9bff6eea..5f00d406d857f 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddable plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 7f3b83b9fd3d8..75016bb8522d3 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the embeddableEnhanced plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index d50435829fe5a..6bc9c1b2fff3b 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the encryptedSavedObjects plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index eae0940e8dce9..f386cfae1e269 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the enterpriseSearch plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 499a7f0fd0797..5a25ca54bfa5e 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github summary: API docs for the esUiShared plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index bacf6cf4a7be5..fa80082909281 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventAnnotation plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 917337b346ff5..2c6fe10f187c1 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github summary: API docs for the eventLog plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index ac7cdef44e5a3..7206bfc8a7261 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionError plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index db6a110f8aa93..188dfefa8eae9 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionGauge plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 7f02bfe7bbfc0..0c44764482c58 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionHeatmap plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 692eccdf431de..7bd3a7bd91d97 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionImage plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_legacy_metric_vis.devdocs.json b/api_docs/expression_legacy_metric_vis.devdocs.json new file mode 100644 index 0000000000000..4706884222b9f --- /dev/null +++ b/api_docs/expression_legacy_metric_vis.devdocs.json @@ -0,0 +1,822 @@ +{ + "id": "expressionLegacyMetricVis", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.metricVisFunction", + "type": "Function", + "tags": [], + "label": "metricVisFunction", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.MetricVisExpressionFunctionDefinition", + "text": "MetricVisExpressionFunctionDefinition" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/expression_functions/metric_vis_function.ts", + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.DimensionsVisParam", + "type": "Interface", + "tags": [], + "label": "DimensionsVisParam", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.DimensionsVisParam.metrics", + "type": "Array", + "tags": [], + "label": "metrics", + "description": [], + "signature": [ + "(string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + ")[]" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.DimensionsVisParam.bucket", + "type": "CompoundType", + "tags": [], + "label": "bucket", + "description": [], + "signature": [ + "string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + " | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments", + "type": "Interface", + "tags": [], + "label": "MetricArguments", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.percentageMode", + "type": "boolean", + "tags": [], + "label": "percentageMode", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.colorMode", + "type": "CompoundType", + "tags": [], + "label": "colorMode", + "description": [], + "signature": [ + "\"Background\" | \"Labels\" | \"None\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.showLabels", + "type": "boolean", + "tags": [], + "label": "showLabels", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.palette", + "type": "Object", + "tags": [], + "label": "palette", + "description": [], + "signature": [ + "PaletteOutput", + "<", + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.CustomPaletteState", + "text": "CustomPaletteState" + }, + "> | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.font", + "type": "Object", + "tags": [], + "label": "font", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionTypeStyle", + "text": "ExpressionTypeStyle" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.labelFont", + "type": "Object", + "tags": [], + "label": "labelFont", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionTypeStyle", + "text": "ExpressionTypeStyle" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.labelPosition", + "type": "CompoundType", + "tags": [], + "label": "labelPosition", + "description": [], + "signature": [ + "\"top\" | \"bottom\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.metric", + "type": "Array", + "tags": [], + "label": "metric", + "description": [], + "signature": [ + "(string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + ")[]" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.bucket", + "type": "CompoundType", + "tags": [], + "label": "bucket", + "description": [], + "signature": [ + "string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + " | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.colorFullBackground", + "type": "boolean", + "tags": [], + "label": "colorFullBackground", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricArguments.autoScale", + "type": "CompoundType", + "tags": [], + "label": "autoScale", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions", + "type": "Interface", + "tags": [], + "label": "MetricOptions", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.value", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.color", + "type": "string", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.bgColor", + "type": "string", + "tags": [], + "label": "bgColor", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.lightText", + "type": "boolean", + "tags": [], + "label": "lightText", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.colIndex", + "type": "number", + "tags": [], + "label": "colIndex", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricOptions.rowIndex", + "type": "number", + "tags": [], + "label": "rowIndex", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam", + "type": "Interface", + "tags": [], + "label": "MetricVisParam", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.percentageMode", + "type": "boolean", + "tags": [], + "label": "percentageMode", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.percentageFormatPattern", + "type": "string", + "tags": [], + "label": "percentageFormatPattern", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.metricColorMode", + "type": "CompoundType", + "tags": [], + "label": "metricColorMode", + "description": [], + "signature": [ + "\"Background\" | \"Labels\" | \"None\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.palette", + "type": "Object", + "tags": [], + "label": "palette", + "description": [], + "signature": [ + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.CustomPaletteState", + "text": "CustomPaletteState" + }, + " | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.labels", + "type": "CompoundType", + "tags": [], + "label": "labels", + "description": [], + "signature": [ + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.Labels", + "text": "Labels" + }, + " & { style: ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionTypeStyle", + "text": "ExpressionTypeStyle" + }, + "; position: ", + "LabelPositionType", + "; }" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.style", + "type": "CompoundType", + "tags": [], + "label": "style", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionTypeStyle", + "text": "ExpressionTypeStyle" + }, + " & Pick<", + { + "pluginId": "charts", + "scope": "common", + "docId": "kibChartsPluginApi", + "section": "def-common.Style", + "text": "Style" + }, + ", \"bgColor\" | \"labelColor\">" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.colorFullBackground", + "type": "boolean", + "tags": [], + "label": "colorFullBackground", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisParam.autoScale", + "type": "CompoundType", + "tags": [], + "label": "autoScale", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisRenderConfig", + "type": "Interface", + "tags": [], + "label": "MetricVisRenderConfig", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisRenderConfig.visType", + "type": "string", + "tags": [], + "label": "visType", + "description": [], + "signature": [ + "\"metric\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisRenderConfig.visData", + "type": "Object", + "tags": [], + "label": "visData", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Datatable", + "text": "Datatable" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisRenderConfig.visConfig", + "type": "Object", + "tags": [], + "label": "visConfig", + "description": [], + "signature": [ + "{ metric: ", + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.MetricVisParam", + "text": "MetricVisParam" + }, + "; dimensions: ", + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.DimensionsVisParam", + "text": "DimensionsVisParam" + }, + "; }" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams", + "type": "Interface", + "tags": [], + "label": "VisParams", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams.addTooltip", + "type": "boolean", + "tags": [], + "label": "addTooltip", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams.addLegend", + "type": "boolean", + "tags": [], + "label": "addLegend", + "description": [], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams.dimensions", + "type": "Object", + "tags": [], + "label": "dimensions", + "description": [], + "signature": [ + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.DimensionsVisParam", + "text": "DimensionsVisParam" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams.metric", + "type": "Object", + "tags": [], + "label": "metric", + "description": [], + "signature": [ + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.MetricVisParam", + "text": "MetricVisParam" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.VisParams.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"metric\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_renderers.ts", + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.EXPRESSION_METRIC_NAME", + "type": "string", + "tags": [], + "label": "EXPRESSION_METRIC_NAME", + "description": [], + "signature": [ + "\"legacyMetricVis\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/constants.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricInput", + "type": "Type", + "tags": [], + "label": "MetricInput", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Datatable", + "text": "Datatable" + } + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.MetricVisExpressionFunctionDefinition", + "type": "Type", + "tags": [], + "label": "MetricVisExpressionFunctionDefinition", + "description": [], + "signature": [ + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionFunctionDefinition", + "text": "ExpressionFunctionDefinition" + }, + "<\"legacyMetricVis\", ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.Datatable", + "text": "Datatable" + }, + ", ", + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.MetricArguments", + "text": "MetricArguments" + }, + ", ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExpressionValueRender", + "text": "ExpressionValueRender" + }, + "<", + { + "pluginId": "expressionLegacyMetricVis", + "scope": "common", + "docId": "kibExpressionLegacyMetricVisPluginApi", + "section": "def-common.MetricVisRenderConfig", + "text": "MetricVisRenderConfig" + }, + ">, ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExecutionContext", + "text": "ExecutionContext" + }, + "<", + { + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Adapters", + "text": "Adapters" + }, + ", ", + "SerializableRecord", + ">>" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/types/expression_functions.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"expressionLegacyMetricVis\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/index.ts", + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "expressionLegacyMetricVis", + "id": "def-common.PLUGIN_NAME", + "type": "string", + "tags": [], + "label": "PLUGIN_NAME", + "description": [], + "signature": [ + "\"expressionLegacyMetricVis\"" + ], + "path": "src/plugins/chart_expressions/expression_legacy_metric/common/index.ts", + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx new file mode 100644 index 0000000000000..f18026f5b241b --- /dev/null +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -0,0 +1,33 @@ +--- +id: kibExpressionLegacyMetricVisPluginApi +slug: /kibana-dev-docs/api/expressionLegacyMetricVis +title: "expressionLegacyMetricVis" +image: https://source.unsplash.com/400x175/?github +summary: API docs for the expressionLegacyMetricVis plugin +date: 2022-07-11 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] +warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. +--- +import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; + +Adds a `metric` renderer and function to the expression plugin. The renderer will display the `legacy metric` chart. + +Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 48 | 0 | 48 | 1 | + +## Common + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index a165a177c922b..53974676b8de4 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetric plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_metric_vis.devdocs.json b/api_docs/expression_metric_vis.devdocs.json index 1cb75f69b1e8f..65485ff919e65 100644 --- a/api_docs/expression_metric_vis.devdocs.json +++ b/api_docs/expression_metric_vis.devdocs.json @@ -56,13 +56,33 @@ "children": [ { "parentPluginId": "expressionMetricVis", - "id": "def-common.DimensionsVisParam.metrics", - "type": "Array", + "id": "def-common.DimensionsVisParam.metric", + "type": "CompoundType", + "tags": [], + "label": "metric", + "description": [], + "signature": [ + "string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + } + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.DimensionsVisParam.secondaryMetric", + "type": "CompoundType", "tags": [], - "label": "metrics", + "label": "secondaryMetric", "description": [], "signature": [ - "(string | ", + "string | ", { "pluginId": "visualizations", "scope": "common", @@ -70,17 +90,38 @@ "section": "def-common.ExpressionValueVisDimension", "text": "ExpressionValueVisDimension" }, - ")[]" + " | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.DimensionsVisParam.bucket", + "id": "def-common.DimensionsVisParam.breakdownBy", "type": "CompoundType", "tags": [], - "label": "bucket", + "label": "breakdownBy", + "description": [], + "signature": [ + "string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + " | undefined" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.DimensionsVisParam.progressMax", + "type": "CompoundType", + "tags": [], + "label": "progressMax", "description": [], "signature": [ "string | ", @@ -111,119 +152,101 @@ "children": [ { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.percentageMode", - "type": "boolean", - "tags": [], - "label": "percentageMode", - "description": [], - "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", - "deprecated": false - }, - { - "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.colorMode", + "id": "def-common.MetricArguments.metric", "type": "CompoundType", "tags": [], - "label": "colorMode", + "label": "metric", "description": [], "signature": [ - "\"Background\" | \"Labels\" | \"None\"" + "string | ", + { + "pluginId": "visualizations", + "scope": "common", + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + } ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.showLabels", - "type": "boolean", - "tags": [], - "label": "showLabels", - "description": [], - "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", - "deprecated": false - }, - { - "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.palette", - "type": "Object", + "id": "def-common.MetricArguments.secondaryMetric", + "type": "CompoundType", "tags": [], - "label": "palette", + "label": "secondaryMetric", "description": [], "signature": [ - "PaletteOutput", - "<", + "string | ", { - "pluginId": "charts", + "pluginId": "visualizations", "scope": "common", - "docId": "kibChartsPluginApi", - "section": "def-common.CustomPaletteState", - "text": "CustomPaletteState" + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" }, - "> | undefined" + " | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.font", - "type": "Object", + "id": "def-common.MetricArguments.breakdownBy", + "type": "CompoundType", "tags": [], - "label": "font", + "label": "breakdownBy", "description": [], "signature": [ + "string | ", { - "pluginId": "expressions", + "pluginId": "visualizations", "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExpressionTypeStyle", - "text": "ExpressionTypeStyle" - } + "docId": "kibVisualizationsPluginApi", + "section": "def-common.ExpressionValueVisDimension", + "text": "ExpressionValueVisDimension" + }, + " | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.labelFont", - "type": "Object", + "id": "def-common.MetricArguments.subtitle", + "type": "string", "tags": [], - "label": "labelFont", + "label": "subtitle", "description": [], "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExpressionTypeStyle", - "text": "ExpressionTypeStyle" - } + "string | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.labelPosition", - "type": "CompoundType", + "id": "def-common.MetricArguments.extraText", + "type": "string", "tags": [], - "label": "labelPosition", + "label": "extraText", "description": [], "signature": [ - "\"top\" | \"bottom\"" + "string | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.metric", - "type": "Array", + "id": "def-common.MetricArguments.progressMax", + "type": "CompoundType", "tags": [], - "label": "metric", + "label": "progressMax", "description": [], "signature": [ - "(string | ", + "string | ", { "pluginId": "visualizations", "scope": "common", @@ -231,51 +254,65 @@ "section": "def-common.ExpressionValueVisDimension", "text": "ExpressionValueVisDimension" }, - ")[]" + " | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.bucket", + "id": "def-common.MetricArguments.progressDirection", "type": "CompoundType", "tags": [], - "label": "bucket", + "label": "progressDirection", "description": [], "signature": [ - "string | ", + "\"horizontal\" | \"vertical\"" + ], + "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", + "deprecated": false + }, + { + "parentPluginId": "expressionMetricVis", + "id": "def-common.MetricArguments.palette", + "type": "Object", + "tags": [], + "label": "palette", + "description": [], + "signature": [ + "PaletteOutput", + "<", { - "pluginId": "visualizations", + "pluginId": "charts", "scope": "common", - "docId": "kibVisualizationsPluginApi", - "section": "def-common.ExpressionValueVisDimension", - "text": "ExpressionValueVisDimension" + "docId": "kibChartsPluginApi", + "section": "def-common.CustomPaletteState", + "text": "CustomPaletteState" }, - " | undefined" + "> | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.colorFullBackground", - "type": "boolean", + "id": "def-common.MetricArguments.maxCols", + "type": "number", "tags": [], - "label": "colorFullBackground", + "label": "maxCols", "description": [], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricArguments.autoScale", - "type": "CompoundType", + "id": "def-common.MetricArguments.minTiles", + "type": "number", "tags": [], - "label": "autoScale", + "label": "minTiles", "description": [], "signature": [ - "boolean | undefined" + "number | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_functions.ts", "deprecated": false @@ -384,20 +421,10 @@ "children": [ { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.percentageMode", - "type": "boolean", - "tags": [], - "label": "percentageMode", - "description": [], - "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", - "deprecated": false - }, - { - "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.percentageFormatPattern", + "id": "def-common.MetricVisParam.subtitle", "type": "string", "tags": [], - "label": "percentageFormatPattern", + "label": "subtitle", "description": [], "signature": [ "string | undefined" @@ -407,13 +434,13 @@ }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.metricColorMode", - "type": "CompoundType", + "id": "def-common.MetricVisParam.extraText", + "type": "string", "tags": [], - "label": "metricColorMode", + "label": "extraText", "description": [], "signature": [ - "\"Background\" | \"Labels\" | \"None\"" + "string | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", "deprecated": false @@ -440,81 +467,36 @@ }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.labels", - "type": "CompoundType", - "tags": [], - "label": "labels", - "description": [], - "signature": [ - { - "pluginId": "charts", - "scope": "common", - "docId": "kibChartsPluginApi", - "section": "def-common.Labels", - "text": "Labels" - }, - " & { style: ", - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExpressionTypeStyle", - "text": "ExpressionTypeStyle" - }, - "; position: ", - "LabelPositionType", - "; }" - ], - "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", - "deprecated": false - }, - { - "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.style", + "id": "def-common.MetricVisParam.progressDirection", "type": "CompoundType", "tags": [], - "label": "style", + "label": "progressDirection", "description": [], "signature": [ - { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExpressionTypeStyle", - "text": "ExpressionTypeStyle" - }, - " & Pick<", - { - "pluginId": "charts", - "scope": "common", - "docId": "kibChartsPluginApi", - "section": "def-common.Style", - "text": "Style" - }, - ", \"bgColor\" | \"labelColor\">" + "\"horizontal\" | \"vertical\"" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.colorFullBackground", - "type": "boolean", + "id": "def-common.MetricVisParam.maxCols", + "type": "number", "tags": [], - "label": "colorFullBackground", + "label": "maxCols", "description": [], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", "deprecated": false }, { "parentPluginId": "expressionMetricVis", - "id": "def-common.MetricVisParam.autoScale", - "type": "CompoundType", + "id": "def-common.MetricVisParam.minTiles", + "type": "number", "tags": [], - "label": "autoScale", + "label": "minTiles", "description": [], "signature": [ - "boolean | undefined" + "number | undefined" ], "path": "src/plugins/chart_expressions/expression_metric/common/types/expression_renderers.ts", "deprecated": false diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index d9d61927ce1fa..a5d37b7b29144 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -4,13 +4,13 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionMetricVis plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; -Expression MetricVis plugin adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. +Adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) for questions regarding this plugin. @@ -18,7 +18,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 48 | 0 | 48 | 1 | +| 47 | 0 | 47 | 0 | ## Common diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 5387b42db46ff..113733c074c1b 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionPartitionVis plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 514e08253a766..b65524ffc23a4 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRepeatImage plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 13284a24e6160..eaf758ec5ed88 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionRevealImage plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 507c7ac5d0bac..05aa0bb459fd0 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionShape plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 930b423d8460e..93b7f382179d8 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionTagcloud plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 977c736c9d811..c8e43d7bc6703 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressionXY plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index d22a063cb33ba..55a2a78829ee7 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github summary: API docs for the expressions plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 7d854ff4d53ca..28544e78a1979 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github summary: API docs for the features plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index dc0a47d49ed55..9e90ef5436b1e 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github summary: API docs for the fieldFormats plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 2d9425cf88aca..dd775f6d2be86 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github summary: API docs for the fileUpload plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index b7a5c120c2e3c..88c1b5ee80528 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -10322,6 +10322,19 @@ "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false }, + { + "parentPluginId": "fleet", + "id": "def-common.Agent.default_api_key_history", + "type": "Array", + "tags": [], + "label": "default_api_key_history", + "description": [], + "signature": [ + "{ id: string; retired_at: string; }[] | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false + }, { "parentPluginId": "fleet", "id": "def-common.Agent.status", @@ -12268,6 +12281,52 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetErrorResponse", + "type": "Interface", + "tags": [], + "label": "FleetErrorResponse", + "description": [], + "path": "x-pack/plugins/fleet/common/types/rest_spec/error.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-common.FleetErrorResponse.message", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "path": "x-pack/plugins/fleet/common/types/rest_spec/error.ts", + "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetErrorResponse.statusCode", + "type": "number", + "tags": [], + "label": "statusCode", + "description": [], + "path": "x-pack/plugins/fleet/common/types/rest_spec/error.ts", + "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetErrorResponse.attributes", + "type": "Object", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "{ type?: \"verification_failed\" | undefined; } | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/rest_spec/error.ts", + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.FleetServerAgent", @@ -12665,6 +12724,21 @@ ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetServerAgent.default_api_key_history", + "type": "Array", + "tags": [], + "label": "default_api_key_history", + "description": [ + "\nDefault API Key History" + ], + "signature": [ + "{ id: string; retired_at: string; }[] | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false } ], "initialIsOpen": false @@ -14070,6 +14144,19 @@ ], "path": "x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.GetFleetStatusResponse.package_verification_key_id", + "type": "string", + "tags": [], + "label": "package_verification_key_id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts", + "deprecated": false } ], "initialIsOpen": false @@ -15674,6 +15761,32 @@ ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.IntegrationCardItem.isUnverified", + "type": "CompoundType", + "tags": [], + "label": "isUnverified", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.IntegrationCardItem.showLabels", + "type": "CompoundType", + "tags": [], + "label": "showLabels", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false } ], "initialIsOpen": false @@ -19131,7 +19244,7 @@ "label": "[RegistryVarsEntryKeys.type]", "description": [], "signature": [ - "\"string\" | \"text\" | \"yaml\" | \"password\" | \"integer\" | \"bool\"" + "\"string\" | \"text\" | \"yaml\" | \"textarea\" | \"password\" | \"integer\" | \"bool\"" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false @@ -21126,6 +21239,20 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetErrorType", + "type": "Type", + "tags": [], + "label": "FleetErrorType", + "description": [], + "signature": [ + "\"verification_failed\"" + ], + "path": "x-pack/plugins/fleet/common/types/rest_spec/error.ts", + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.FullAgentPolicyOutput", @@ -22618,7 +22745,7 @@ "label": "RegistryVarType", "description": [], "signature": [ - "\"string\" | \"text\" | \"yaml\" | \"password\" | \"integer\" | \"bool\"" + "\"string\" | \"text\" | \"yaml\" | \"textarea\" | \"password\" | \"integer\" | \"bool\"" ], "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 5325f445c988f..8c2a1163e62bc 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github summary: API docs for the fleet plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1511 | 8 | 1380 | 10 | +| 1521 | 8 | 1389 | 10 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 4fe6aed8e1197..8474a5e08cc62 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the globalSearch plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 03062d50973ac..17c3c86417954 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github summary: API docs for the home plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 4d82f6aec8474..2976130f0426b 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexLifecycleManagement plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index c006a935554a9..37c9150cedd5f 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the indexManagement plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 3006aa3e79ef5..ce250ea235796 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github summary: API docs for the infra plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index e596655095dc8..b77ff9a441821 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github summary: API docs for the inspector plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index d8bb019ad6f51..a52c185646472 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github summary: API docs for the interactiveSetup plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index a1c22cb2c4cdd..a03bc524f6146 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ace plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index f896b8cc1a1d2..12f157c31ce52 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-components plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index d23eeedd05c44..748f8d759cfa2 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/aiops-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx index 863132d0d3633..e88429db95337 100644 --- a/api_docs/kbn_alerts.mdx +++ b/api_docs/kbn_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-alerts title: "@kbn/alerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/alerts plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index c86cdb9e634d7..ed7e0280c2073 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 32ec74b1a7b96..5c38d08fcca7b 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-client plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index ae50dd2c3e24d..f6875f4260270 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index fd7914c20f3e2..e9bd560607daf 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index d8d7ba1c05a61..21fd9288b116d 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index c14296cc7bcd5..5b6c4f255efa9 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index aa7019af06e06..015df16445fe5 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-config-loader plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 7aaab99fef413..e7aff01878e85 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/apm-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 33dc88180e65b..e258a30230fb7 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/axe-config plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_packages.mdx b/api_docs/kbn_bazel_packages.mdx index 31650f710868c..88fa1bea3ec94 100644 --- a/api_docs/kbn_bazel_packages.mdx +++ b/api_docs/kbn_bazel_packages.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-packages title: "@kbn/bazel-packages" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/bazel-packages plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-packages'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_bazel_runner.mdx b/api_docs/kbn_bazel_runner.mdx index 8b12370f39f48..1f35a1d4bed1d 100644 --- a/api_docs/kbn_bazel_runner.mdx +++ b/api_docs/kbn_bazel_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-bazel-runner title: "@kbn/bazel-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/bazel-runner plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bazel-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 7dc03362fc1ed..e3a88a18f7a14 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-core plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 5fc04b35fc008..24310abb47739 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index c98d5ee2831e2..2f5778175c7c1 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ci-stats-reporter plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index b9bb3dd15c5c3..03824e43f3d3b 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/cli-dev-mode plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 2e9099f9331be..f1e29569f57fe 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/coloring plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 052788049ac97..86d97a5b56bd8 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index f733f22e12326..b7b7652aca4c5 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 37af5bfd203ba..6b61cd7115081 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/config-schema plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index a51b728f05b0b..e2624d60c9802 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index e6d5c420b0bbf..0cf1695af6a7c 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 97629162bee3d..b7ee3a9f6ae52 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index a6785843619fa..4a1e2d0280c48 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index af2b03df76f55..51ff788a42df0 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 82ac37807a2a0..5d593fdd7ecc3 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 0b09dfc52c060..edd00ea495a03 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 952a91629c965..010ee8d9c3efb 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-common plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 20818ba149837..b9660c993e9d5 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 7a17a722a3d87..601a93cf0ac3d 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-base-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 083cea389a981..5690498d83f5b 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-config-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index e6ca33db3f9ab..8b6855dd35b36 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 563716acb7cb4..7a7b6e70f7dff 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 3c7df28c1068e..188729bcb5d5a 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 821f1bd698b52..ef26b60250ac2 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index bcad50c60ab1d..d18c98c419302 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 33811991746d7..2dbc0c75fb5d3 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-environment-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 4ffa681ed1023..c87c7e6bc8aa0 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 8a24c2513c6d8..fe5a4e38723e8 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 19c3d30aa1293..03064c9aa9736 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index d88974f44eb05..5d9ea672a742f 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-common plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 566040a68bf98..5cde6bdcc71df 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 2b32d538b796a..91a783c509259 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index e42745eb21550..ca81141eab3b8 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 55f672570bee1..d61d3291f30c7 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 0bba4dd60a595..fd0fc8701dc42 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 5760c273eb73c..a96c9c6bd2c8f 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 23ae286cfc20b..2f854b467db8b 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx index ee24325a7c0ba..f9b955bf74d1b 100644 --- a/api_docs/kbn_core_injected_metadata_browser.mdx +++ b/api_docs/kbn_core_injected_metadata_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser title: "@kbn/core-injected-metadata-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 8479ac3cf5a7e..6e45d37b61d00 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 8dd3eb2e41765..b784feda2e314 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index b179e60a85d34..f221b342cbc73 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index d5c7d6fc00cc3..4a6aa7dd3931f 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-logging-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 02f3e483fba46..cffa601f3848a 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 2c650dee080cf..34369234aaaef 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 6067302d93ca5..c957b4655d511 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-node-server-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 8debec0140d4f..294d01ce5776b 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx index dd0d0dc80e65b..353dd6c64cf86 100644 --- a/api_docs/kbn_core_theme_browser_internal.mdx +++ b/api_docs/kbn_core_theme_browser_internal.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal title: "@kbn/core-theme-browser-internal" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-internal plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index a55dfcfdbdda5..5fac4ed90ccc1 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index b8429ca926bc8..b2d165a4abd88 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/crypto plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index a2027101ba5b8..dd2087a0bd167 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/datemath plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index f0e7ad6cd86fe..b0e6f0a5d84a8 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-errors plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 438e5b33375a8..9755a142ec3a7 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-cli-runner plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index d9e604449ce62..202df9bf78e32 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-proc-runner plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 1c0d21c78d623..132908e24062e 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/dev-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index e576f082f77b5..3dca7c16dcc20 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/doc-links plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 640b4d58c9f6e..61fb95177b098 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/docs-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 2320419213624..be64967634db8 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-archiver plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 3fbfd574d3884..00a3f88a220be 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-errors plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 03aa808da6ab2..0cc5656857776 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/es-query plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 91315aebe9cf6..19d8ec9025c1b 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/eslint-plugin-imports plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 4c53cae5132cf..42acc093c6c47 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/field-types plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 9740972c41d08..3b68d3908f8c9 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/find-used-node-modules plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index b951e23497a4a..cc4ba1e51e0a3 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/generate plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 453023d198d4a..37fa95206ecbb 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/handlebars plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_home_sample_data_cards.mdx b/api_docs/kbn_home_sample_data_cards.mdx index 92e4028a0b307..6f990142cf388 100644 --- a/api_docs/kbn_home_sample_data_cards.mdx +++ b/api_docs/kbn_home_sample_data_cards.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-cards title: "@kbn/home-sample-data-cards" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/home-sample-data-cards plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-cards'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 353795f63fa5b..7d31d9236dfbe 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/i18n plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 382738a8b956e..543c395f2e9f7 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/import-resolver plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 6503cd45417ce..7d25c737e5bab 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/interpreter plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 1eacb2ece233c..9238e69ad672d 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/io-ts-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 416b669a7f212..b87d2d3a58c8e 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/jest-serializers plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_kibana_json_schema.mdx b/api_docs/kbn_kibana_json_schema.mdx index 5baa09af8bb27..1beae227c03d8 100644 --- a/api_docs/kbn_kibana_json_schema.mdx +++ b/api_docs/kbn_kibana_json_schema.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-json-schema title: "@kbn/kibana-json-schema" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/kibana-json-schema plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-json-schema'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index e00b9355ad068..ddced69be4bf4 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index 1173b5ff8b07a..d3bc892733c32 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/logging-mocks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 6f0c1dfe9e6f8..8a07a4f5b9541 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/mapbox-gl plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_agg_utils.devdocs.json b/api_docs/kbn_ml_agg_utils.devdocs.json index db456a2c0fec0..7f26b4a84ded5 100644 --- a/api_docs/kbn_ml_agg_utils.devdocs.json +++ b/api_docs/kbn_ml_agg_utils.devdocs.json @@ -198,9 +198,131 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.numberValidator", + "type": "Function", + "tags": [], + "label": "numberValidator", + "description": [ + "\nValidate if a number is greater than a specified minimum & lesser than specified maximum" + ], + "signature": [ + "(conditions: { min?: number | undefined; max?: number | undefined; integerOnly?: boolean | undefined; } | undefined) => (value: number) => ", + { + "pluginId": "@kbn/ml-agg-utils", + "scope": "server", + "docId": "kibKbnMlAggUtilsPluginApi", + "section": "def-server.NumberValidationResult", + "text": "NumberValidationResult" + }, + " | null" + ], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.numberValidator.$1", + "type": "Object", + "tags": [], + "label": "conditions", + "description": [], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.numberValidator.$1.min", + "type": "number", + "tags": [], + "label": "min", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.numberValidator.$1.max", + "type": "number", + "tags": [], + "label": "max", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.numberValidator.$1.integerOnly", + "type": "CompoundType", + "tags": [], + "label": "integerOnly", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.NumberValidationResult", + "type": "Interface", + "tags": [], + "label": "NumberValidationResult", + "description": [], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.NumberValidationResult.min", + "type": "boolean", + "tags": [], + "label": "min", + "description": [], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.NumberValidationResult.max", + "type": "boolean", + "tags": [], + "label": "max", + "description": [], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + }, + { + "parentPluginId": "@kbn/ml-agg-utils", + "id": "def-server.NumberValidationResult.integerOnly", + "type": "boolean", + "tags": [], + "label": "integerOnly", + "description": [], + "path": "x-pack/packages/ml/agg_utils/src/validate_number.ts", + "deprecated": false + } + ], + "initialIsOpen": false } ], - "interfaces": [], "enums": [], "misc": [], "objects": [] diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index c629af2fe03a1..8be196fb4cea6 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-agg-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,10 +18,13 @@ Contact Machine Learning UI for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 1 | 10 | 0 | +| 21 | 1 | 18 | 0 | ## Server ### Functions +### Interfaces + + diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index fe9f62522645d..3ef1b0339bd8b 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-is-populated-object plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index a05afab5777ab..76a7fcb617e0e 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ml-string-hash plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 9a3800df2921d..a91689dd10cd9 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/monaco plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 5c374949cc002..a69a781be417a 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index eacbf5f872414..7218aa0e8fabe 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index ded4110fcc497..6e6e4265b3eb3 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_discovery.mdx b/api_docs/kbn_plugin_discovery.mdx index 34253e91d5de7..59c92b6015f0d 100644 --- a/api_docs/kbn_plugin_discovery.mdx +++ b/api_docs/kbn_plugin_discovery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-discovery title: "@kbn/plugin-discovery" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-discovery plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-discovery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 533d98007ee8c..20906a9bac8b4 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-generator plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 6d9446a577f09..1206d063b0506 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/plugin-helpers plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_pm.mdx b/api_docs/kbn_pm.mdx index dd852a15aec85..cafaed833a306 100644 --- a/api_docs/kbn_pm.mdx +++ b/api_docs/kbn_pm.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-pm title: "@kbn/pm" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/pm plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/pm'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 3303e89d73ddf..d40a6eda8c20d 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/react-field plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 2abe7808c0a6b..6006d71fd1992 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/rule-data-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_scalability_simulation_generator.mdx b/api_docs/kbn_scalability_simulation_generator.mdx index 3aedb11fd65e9..c00a04346514d 100644 --- a/api_docs/kbn_scalability_simulation_generator.mdx +++ b/api_docs/kbn_scalability_simulation_generator.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-scalability-simulation-generator title: "@kbn/scalability-simulation-generator" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/scalability-simulation-generator plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/scalability-simulation-generator'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index e20e4e9ac21f7..b923af6144a01 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index bbd3c41a8701a..75139091f24f2 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-es-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 03854b2486b2d..390443eb1c136 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 4c618b1035fc7..5e686027803f7 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index 879a8d62ec04e..05725ece4016d 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index ebc795b95ec2a..74128e4ce61fd 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 25922c474605e..679bc61bf693f 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index fe2e0ef934eb5..74207b0e55ec1 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-api plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 34b37875a5a29..170517d9be2ef 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-constants plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 23bab9ee0055c..ae32ed89333ef 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index e51108397850a..153a00c98dc98 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-list-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 0a183fd7af456..258ec99b73502 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-rules plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 3f622022d418f..a54e2eb038abb 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-t-grid plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 6d6f8abc73065..da8f8a17a6df8 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/securitysolution-utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 6f2d3e81a8f18..d148ccffae8d2 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-http-tools plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 40e4f8e845960..e0a86c00d9f48 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/server-route-repository plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 2feaa0c6ab96c..2a7a6e9eff832 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index a57845d82c208..3cdd2d2660a64 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_components.mdx b/api_docs/kbn_shared_ux_components.mdx index 334cc26db4679..62fd9dee78f14 100644 --- a/api_docs/kbn_shared_ux_components.mdx +++ b/api_docs/kbn_shared_ux_components.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-components title: "@kbn/shared-ux-components" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-components plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-components'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- 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 f03f70e31ea04..e5c84a2b966c9 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index cbd75c7cfbb54..f2b0042c0ac62 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 0a12baa165ba5..73eba3b605169 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_services.mdx b/api_docs/kbn_shared_ux_services.mdx index 4a11f2bd1efd0..105ace97c1e66 100644 --- a/api_docs/kbn_shared_ux_services.mdx +++ b/api_docs/kbn_shared_ux_services.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-services title: "@kbn/shared-ux-services" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-services plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-services'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_storybook.mdx b/api_docs/kbn_shared_ux_storybook.mdx index 0fdd74c2a29d6..585e3c74b52f8 100644 --- a/api_docs/kbn_shared_ux_storybook.mdx +++ b/api_docs/kbn_shared_ux_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook title: "@kbn/shared-ux-storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-storybook plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index d65b15498d756..df672110d3e72 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/shared-ux-utility plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx index a567bd36ecc9c..b167971389633 100644 --- a/api_docs/kbn_sort_package_json.mdx +++ b/api_docs/kbn_sort_package_json.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json title: "@kbn/sort-package-json" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/sort-package-json plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 9a061b5cd4fd4..de1b7d0c7f155 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/std plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index c44175c201971..e2196590d5ae7 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/stdio-dev-helpers plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index bd1b62238a26c..696e54a2239f3 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/storybook plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 69e5817c29f49..d79e5f6fa96d7 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/telemetry-tools plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_test.devdocs.json b/api_docs/kbn_test.devdocs.json index 5ef0d045fbc3f..0304ca46ffea1 100644 --- a/api_docs/kbn_test.devdocs.json +++ b/api_docs/kbn_test.devdocs.json @@ -1908,6 +1908,90 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/test", + "id": "def-server.getKibanaCliArg", + "type": "Function", + "tags": [], + "label": "getKibanaCliArg", + "description": [ + "\nParse a list of Kibana CLI Arg flags and find the flag with the given name. If the flag has no\nvalue then a boolean will be returned (assumed to be a switch flag). If the flag does have a value\nthat can be parsed by `JSON.stringify()` the parsed result is returned. Otherwise the raw string\nvalue is returned." + ], + "signature": [ + "(rawFlags: string[], name: string) => ", + "ArgValue", + " | ", + "ArgValue", + "[] | undefined" + ], + "path": "packages/kbn-test/src/functional_tests/lib/kibana_cli_args.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/test", + "id": "def-server.getKibanaCliArg.$1", + "type": "Array", + "tags": [], + "label": "rawFlags", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-test/src/functional_tests/lib/kibana_cli_args.ts", + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/test", + "id": "def-server.getKibanaCliArg.$2", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/functional_tests/lib/kibana_cli_args.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/test", + "id": "def-server.getKibanaCliLoggers", + "type": "Function", + "tags": [], + "label": "getKibanaCliLoggers", + "description": [ + "\nParse the list of Kibana CLI Arg flags and extract the loggers config so that they can be extended\nin a subsequent FTR config" + ], + "signature": [ + "(rawFlags: string[]) => unknown[]" + ], + "path": "packages/kbn-test/src/functional_tests/lib/kibana_cli_args.ts", + "deprecated": false, + "children": [ + { + "parentPluginId": "@kbn/test", + "id": "def-server.getKibanaCliLoggers.$1", + "type": "Array", + "tags": [], + "label": "rawFlags", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-test/src/functional_tests/lib/kibana_cli_args.ts", + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/test", "id": "def-server.getUrl", diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index c470a0c64dad0..2f4cc1419d3c2 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -18,7 +18,7 @@ Contact Operations for questions regarding this plugin. | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 246 | 5 | 207 | 9 | +| 251 | 5 | 210 | 10 | ## Server diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 3caf5ad0c5dba..aee7aa18c3690 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/test-jest-helpers plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 69ca346bca6bb..cbd597b456cf9 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/tooling-log plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx index de3a505265bfa..c570eccfc0519 100644 --- a/api_docs/kbn_type_summarizer.mdx +++ b/api_docs/kbn_type_summarizer.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer title: "@kbn/type-summarizer" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx index 2926205b755cf..8dcc913751043 100644 --- a/api_docs/kbn_type_summarizer_core.mdx +++ b/api_docs/kbn_type_summarizer_core.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core title: "@kbn/type-summarizer-core" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/type-summarizer-core plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index f68d8330c07d2..e8b84f738a79f 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/typed-react-router-config plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 4f5f175e5c286..363ecf4ecafdf 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/ui-theme plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 0f73d452ef1b1..7700408705dbc 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index c9927f2a9ef06..4c8683c9117d0 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utility-types-jest plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index eb60b53140ad6..88db19bf5e7d0 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github summary: API docs for the @kbn/utils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 8042d7688a1f6..fe087d8a4512a 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaOverview plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index ebfab2af4e696..f6a12a04b8f79 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaReact plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 758ed0d03ee1d..0dd353e5c1bf5 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github summary: API docs for the kibanaUtils plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 5bae1224d96ab..9eede5cefe95c 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github summary: API docs for the kubernetesSecurity plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 0b273638bd947..08678f653942c 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -8962,7 +8962,13 @@ "description": [], "signature": [ "(id: string | undefined, timeRange: ", - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined) => string" ], "path": "x-pack/plugins/lens/common/constants.ts", @@ -8990,7 +8996,13 @@ "label": "timeRange", "description": [], "signature": [ - "TimeRange", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, " | undefined" ], "path": "x-pack/plugins/lens/common/constants.ts", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 038cee591bc63..6fe37f4802cec 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github summary: API docs for the lens plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 5d8616135b42e..dfab565c56aa0 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseApiGuard plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 2f496b17e5d12..43edf7db407ad 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the licenseManagement plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index ca466e45be735..7dd8d3b6a57cd 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github summary: API docs for the licensing plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index aa13e92d02706..4d4165bef760f 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github summary: API docs for the lists plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 35a032b454112..ea54c9ba54274 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github summary: API docs for the management plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index dc4d28b0415a9..6fc37732f82f3 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github summary: API docs for the maps plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 0aef78e1817a9..664b7266284e8 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github summary: API docs for the mapsEms plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 97c7ca70de5ea..9325f014abee2 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github summary: API docs for the ml plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index b6c13eccc670f..6d4c8820331c0 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoring plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 5d941a373fc72..b7bb575168740 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the monitoringCollection plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 6c7184671cd3d..2c1488cb349f8 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github summary: API docs for the navigation plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 25b7a5f175272..393daf44003d0 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github summary: API docs for the newsfeed plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 8f44da366fc5b..3ebe6d5b9c829 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github summary: API docs for the observability plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 3fa2520efec45..3a13dfad6c840 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github summary: API docs for the osquery plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 9ff2d2a5d3038..f7ed0b2b7a9c4 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -3,7 +3,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory summary: Directory of public APIs available through plugins or packages. -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- @@ -12,13 +12,13 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 323 | 265 | 36 | +| 324 | 266 | 36 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 26772 | 172 | 19329 | 1322 | +| 26847 | 172 | 19400 | 1322 | ## Plugin Directory @@ -27,7 +27,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 241 | 0 | 236 | 19 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 23 | 0 | 19 | 1 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 12 | 0 | 0 | 0 | -| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 363 | 0 | 354 | 20 | +| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 365 | 0 | 356 | 20 | | | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 40 | 0 | 40 | 55 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 78 | 1 | 69 | 2 | @@ -43,7 +43,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 101 | 0 | 82 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 143 | 0 | 141 | 12 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 52 | 0 | 51 | 0 | -| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3073 | 34 | 2400 | 22 | +| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3075 | 34 | 2402 | 21 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | This plugin provides the ability to create data views via a modal flyout from any kibana app | 14 | 0 | 7 | 0 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Reusable data view field editor across Kibana | 42 | 0 | 37 | 3 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Data view management app | 2 | 0 | 2 | 0 | @@ -63,8 +63,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 61 | 0 | 61 | 2 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 107 | 0 | 103 | 3 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'image' function and renderer to expressions | 26 | 0 | 26 | 0 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `legacy metric` chart. | 48 | 0 | 48 | 1 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'metric' function and renderer to expressions | 32 | 0 | 27 | 0 | -| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression MetricVis plugin adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 48 | 0 | 48 | 1 | +| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Adds a `metric` renderer and function to the expression plugin. The renderer will display the `metric` chart. | 47 | 0 | 47 | 0 | | | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Expression Partition Visualization plugin adds a `partitionVis` renderer and `pieVis`, `mosaicVis`, `treemapVis`, `waffleVis` functions to the expression plugin. The renderer will display the `pie`, `waffle`, `treemap` and `mosaic` charts. | 70 | 0 | 70 | 2 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'repeatImage' function and renderer to expressions | 32 | 0 | 32 | 0 | | | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'revealImage' function and renderer to expressions | 14 | 0 | 14 | 3 | @@ -75,7 +76,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 95 | 2 | | | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 5 | 249 | 3 | | | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | -| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1511 | 8 | 1380 | 10 | +| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1521 | 8 | 1389 | 10 | | | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -259,7 +260,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 30 | 0 | 5 | 36 | | | [Owner missing] | - | 8 | 0 | 8 | 0 | | | [Owner missing] | - | 494 | 1 | 1 | 0 | -| | Machine Learning UI | This package includes utility functions related to creating elasticsearch aggregation queries, data manipulation and verification. | 12 | 1 | 10 | 0 | +| | Machine Learning UI | This package includes utility functions related to creating elasticsearch aggregation queries, data manipulation and verification. | 21 | 1 | 18 | 0 | | | Machine Learning UI | A type guard to check record like object structures. | 3 | 0 | 2 | 0 | | | Machine Learning UI | Creates a deterministic number based hash out of a string. | 2 | 0 | 1 | 0 | | | [Owner missing] | - | 55 | 0 | 55 | 2 | @@ -303,7 +304,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [Owner missing] | - | 4 | 0 | 2 | 0 | | | Operations | - | 38 | 2 | 21 | 0 | | | [Owner missing] | - | 2 | 0 | 2 | 0 | -| | Operations | - | 246 | 5 | 207 | 9 | +| | Operations | - | 251 | 5 | 210 | 10 | | | [Owner missing] | - | 135 | 8 | 103 | 2 | | | [Owner missing] | - | 72 | 0 | 55 | 0 | | | [Owner missing] | - | 8 | 0 | 2 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 33171fda54964..f250fddea5611 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github summary: API docs for the presentationUtil plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 3bf68c8c4e3f1..3c8bb3dea29b8 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github summary: API docs for the remoteClusters plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index c7caa85c2c2e6..190c648de0d92 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github summary: API docs for the reporting plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 364d65643baef..41c84a2b7d638 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github summary: API docs for the rollup plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 8db2ad0b7b811..92b769fab3bba 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github summary: API docs for the ruleRegistry plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index d67bb9aeb7daf..1b2c01b149e1e 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github summary: API docs for the runtimeFields plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 6049f7993503e..db943e605387b 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjects plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index aa6c4c15b1cba..592136b206dd6 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsManagement plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 3772ecaf89446..84e2121b2d2c7 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTagging plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 7ecd16331a059..045d2b4b6473c 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github summary: API docs for the savedObjectsTaggingOss plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 52ed1b93a0ce2..06aa991f1e6b0 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotMode plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index a2496d6c5d2df..d267438f40e3c 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github summary: API docs for the screenshotting plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 0f4c45c00c176..6ff69b8e2d064 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github summary: API docs for the security plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index c4ba9e5044b5f..c0c9e8e1f19e6 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github summary: API docs for the securitySolution plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 173bf97235503..83d32cbf1a6d1 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github summary: API docs for the sessionView plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/share.mdx b/api_docs/share.mdx index d1018ad32f92e..56c6b2c598eae 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github summary: API docs for the share plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/shared_u_x.mdx b/api_docs/shared_u_x.mdx index 96adb50da6a7e..9fee98f17877a 100644 --- a/api_docs/shared_u_x.mdx +++ b/api_docs/shared_u_x.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/sharedUX title: "sharedUX" image: https://source.unsplash.com/400x175/?github summary: API docs for the sharedUX plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sharedUX'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index f3a9d9ca738f8..83714e031702e 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github summary: API docs for the snapshotRestore plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index c207eeec176f4..90c78cd0a3624 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github summary: API docs for the spaces plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index c633896cb6431..4b923239549c5 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github summary: API docs for the stackAlerts plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 30f8633b02787..c45d79117db50 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the taskManager plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 903093f3243d5..39058e437a4da 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetry plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index b0b5e6cd52cf9..0eaab1a600677 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionManager plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 03cfa77285ffc..e4b22d239ecd6 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryCollectionXpack plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 4f1931223ab7f..c7259bfd0abde 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github summary: API docs for the telemetryManagementSection plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index ac26970140b49..42cbbca2ad90f 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github summary: API docs for the timelines plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index c3e7992d29a18..cd5be8ee1ab9a 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github summary: API docs for the transform plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 1b8b3f4fb2a8d..a782d4581e29f 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github summary: API docs for the triggersActionsUi plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 6361fd904f7aa..598a870631ace 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActions plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 60b8890c2265a..0c51c3092f2dc 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github summary: API docs for the uiActionsEnhanced plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 7aeb8c56e3c80..1ee7ab0db84ce 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 16560f649b3bb..a4496a610e468 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github summary: API docs for the unifiedSearch.autocomplete plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index f283fb33548c1..052deae9d8054 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github summary: API docs for the urlForwarding plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index e1eafd2b34466..c57196aab0504 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github summary: API docs for the usageCollection plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 6c4ad8ae3f57b..f9ded6a7f35a8 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github summary: API docs for the ux plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index ed698232e50e1..ad8aa52f4a2c6 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github summary: API docs for the visDefaultEditor plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 4c41f58a47f3c..405dc50d73ce1 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeGauge plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index a20e249c0d941..0ff72f3eecb86 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeHeatmap plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 28f0a2f5b357a..09ac4941b257e 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypePie plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 2e72cc2df2e92..1929113958171 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTable plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 2e5c936926c72..452fefe609534 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimelion plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 29850031c6b32..4c58916345666 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeTimeseries plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 0b41438106def..54687d186f301 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVega plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index cc38d00877c9a..11e94a93a44b6 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeVislib plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 6d22db92cb7a8..92c8fed181ec9 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github summary: API docs for the visTypeXy plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 3f728b694c2f7..a1999e49711e9 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -4,7 +4,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github summary: API docs for the visualizations plugin -date: 2022-07-08 +date: 2022-07-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] warning: This document is auto-generated and is meant to be viewed inside our experimental, new docs system. Reach out in #docs-engineering for more info. --- diff --git a/package.json b/package.json index ca926c602b688..586a4ca3612b0 100644 --- a/package.json +++ b/package.json @@ -189,6 +189,9 @@ "@kbn/core-node-server": "link:bazel-bin/packages/core/node/core-node-server", "@kbn/core-node-server-internal": "link:bazel-bin/packages/core/node/core-node-server-internal", "@kbn/core-node-server-mocks": "link:bazel-bin/packages/core/node/core-node-server-mocks", + "@kbn/core-preboot-server": "link:bazel-bin/packages/core/preboot/core-preboot-server", + "@kbn/core-preboot-server-internal": "link:bazel-bin/packages/core/preboot/core-preboot-server-internal", + "@kbn/core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks", "@kbn/core-theme-browser": "link:bazel-bin/packages/core/theme/core-theme-browser", "@kbn/core-theme-browser-internal": "link:bazel-bin/packages/core/theme/core-theme-browser-internal", "@kbn/core-theme-browser-mocks": "link:bazel-bin/packages/core/theme/core-theme-browser-mocks", @@ -744,6 +747,9 @@ "@types/kbn__core-node-server": "link:bazel-bin/packages/core/node/core-node-server/npm_module_types", "@types/kbn__core-node-server-internal": "link:bazel-bin/packages/core/node/core-node-server-internal/npm_module_types", "@types/kbn__core-node-server-mocks": "link:bazel-bin/packages/core/node/core-node-server-mocks/npm_module_types", + "@types/kbn__core-preboot-server": "link:bazel-bin/packages/core/preboot/core-preboot-server/npm_module_types", + "@types/kbn__core-preboot-server-internal": "link:bazel-bin/packages/core/preboot/core-preboot-server-internal/npm_module_types", + "@types/kbn__core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks/npm_module_types", "@types/kbn__core-public-internal-base": "link:bazel-bin/packages/core/public/internal-base/npm_module_types", "@types/kbn__core-server-internal-base": "link:bazel-bin/packages/core/server/internal-base/npm_module_types", "@types/kbn__core-theme-browser": "link:bazel-bin/packages/core/theme/core-theme-browser/npm_module_types", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index 07d7212cf6a79..8c89ae7d0af1a 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -58,6 +58,9 @@ filegroup( "//packages/core/node/core-node-server-internal:build", "//packages/core/node/core-node-server-mocks:build", "//packages/core/node/core-node-server:build", + "//packages/core/preboot/core-preboot-server-internal:build", + "//packages/core/preboot/core-preboot-server-mocks:build", + "//packages/core/preboot/core-preboot-server:build", "//packages/core/theme/core-theme-browser-internal:build", "//packages/core/theme/core-theme-browser-mocks:build", "//packages/core/theme/core-theme-browser:build", @@ -238,6 +241,9 @@ filegroup( "//packages/core/node/core-node-server-internal:build_types", "//packages/core/node/core-node-server-mocks:build_types", "//packages/core/node/core-node-server:build_types", + "//packages/core/preboot/core-preboot-server-internal:build_types", + "//packages/core/preboot/core-preboot-server-mocks:build_types", + "//packages/core/preboot/core-preboot-server:build_types", "//packages/core/theme/core-theme-browser-internal:build_types", "//packages/core/theme/core-theme-browser-mocks:build_types", "//packages/core/theme/core-theme-browser:build_types", diff --git a/packages/core/preboot/core-preboot-server-internal/BUILD.bazel b/packages/core/preboot/core-preboot-server-internal/BUILD.bazel new file mode 100644 index 0000000000000..4afb072e6387b --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/BUILD.bazel @@ -0,0 +1,111 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-preboot-server-internal" +PKG_REQUIRE_NAME = "@kbn/core-preboot-server-internal" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/kbn-logging", + "//packages/core/base/core-base-server-internal", + "//packages/core/base/core-base-common", + "//packages/kbn-utils", + "//packages/kbn-config", + "//packages/kbn-config-mocks", + "//packages/core/logging/core-logging-server-mocks", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-logging:npm_module_types", + "//packages/core/base/core-base-server-internal:npm_module_types", + "//packages/core/base/core-base-common:npm_module_types", + "//packages/kbn-utils:npm_module_types", + "//packages/kbn-config:npm_module_types", + "//packages/kbn-config-mocks:npm_module_types", + "//packages/core/logging/core-logging-server-mocks:npm_module_types", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/preboot/core-preboot-server-internal/README.md b/packages/core/preboot/core-preboot-server-internal/README.md new file mode 100644 index 0000000000000..c26e2d00210c3 --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/README.md @@ -0,0 +1,3 @@ +# @kbn/core-preboot-server-internal + +This package contains the internal types and implementation for Core's server-side preboot service. diff --git a/packages/core/preboot/core-preboot-server-internal/jest.config.js b/packages/core/preboot/core-preboot-server-internal/jest.config.js new file mode 100644 index 0000000000000..419bd4ebf014c --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/preboot/core-preboot-server-internal'], +}; diff --git a/packages/core/preboot/core-preboot-server-internal/package.json b/packages/core/preboot/core-preboot-server-internal/package.json new file mode 100644 index 0000000000000..897d4506b3f7f --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-preboot-server-internal", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/preboot/index.ts b/packages/core/preboot/core-preboot-server-internal/src/index.ts similarity index 82% rename from src/core/server/preboot/index.ts rename to packages/core/preboot/core-preboot-server-internal/src/index.ts index 2b7f25538dcb1..e4e0571da72e4 100644 --- a/src/core/server/preboot/index.ts +++ b/packages/core/preboot/core-preboot-server-internal/src/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ +export type { InternalPrebootServicePreboot } from './types'; export { PrebootService } from './preboot_service'; -export type { InternalPrebootServicePreboot, PrebootServicePreboot } from './types'; diff --git a/src/core/server/preboot/preboot_service.test.ts b/packages/core/preboot/core-preboot-server-internal/src/preboot_service.test.ts similarity index 97% rename from src/core/server/preboot/preboot_service.test.ts rename to packages/core/preboot/core-preboot-server-internal/src/preboot_service.test.ts index 7dc0eac5c4348..beb3e9d71b9c7 100644 --- a/src/core/server/preboot/preboot_service.test.ts +++ b/packages/core/preboot/core-preboot-server-internal/src/preboot_service.test.ts @@ -9,8 +9,8 @@ import { REPO_ROOT } from '@kbn/utils'; import { LoggerFactory } from '@kbn/logging'; import { Env } from '@kbn/config'; -import { getEnvOptions } from '@kbn/config-mocks'; -import { configServiceMock, loggingSystemMock } from '../mocks'; +import { configServiceMock, getEnvOptions } from '@kbn/config-mocks'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; import { PrebootService } from './preboot_service'; diff --git a/src/core/server/preboot/preboot_service.ts b/packages/core/preboot/core-preboot-server-internal/src/preboot_service.ts similarity index 96% rename from src/core/server/preboot/preboot_service.ts rename to packages/core/preboot/core-preboot-server-internal/src/preboot_service.ts index 328f4f2cdd360..d62996bb04b1a 100644 --- a/src/core/server/preboot/preboot_service.ts +++ b/packages/core/preboot/core-preboot-server-internal/src/preboot_service.ts @@ -8,7 +8,7 @@ import type { Logger } from '@kbn/logging'; import type { CoreContext } from '@kbn/core-base-server-internal'; -import { InternalPrebootServicePreboot } from './types'; +import type { InternalPrebootServicePreboot } from './types'; /** @internal */ export class PrebootService { diff --git a/packages/core/preboot/core-preboot-server-internal/src/types.ts b/packages/core/preboot/core-preboot-server-internal/src/types.ts new file mode 100644 index 0000000000000..a8d5a60fd9e48 --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/src/types.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { PluginName } from '@kbn/core-base-common'; + +/** @internal */ +export interface InternalPrebootServicePreboot { + /** + * Indicates whether Kibana is currently on hold and cannot proceed to `setup` yet. + */ + readonly isSetupOnHold: () => boolean; + + /** + * Registers a `Promise` as a precondition before Kibana can proceed to `setup`. This method can be invoked multiple + * times and from multiple `preboot` plugins. Kibana will proceed to `setup` only when all registered `Promise` are + * resolved, or it will shut down if any of them are rejected. + * @param pluginName Name of the plugin that needs to hold `setup`. + * @param reason A string that explains the reason why this promise should hold `setup`. It's supposed to be a human + * readable string that will be recorded in the logs or standard output. + * @param promise A `Promise` that should resolved before Kibana can proceed to `setup`. + */ + readonly holdSetupUntilResolved: ( + pluginName: PluginName, + reason: string, + promise: Promise<{ shouldReloadConfig: boolean } | undefined> + ) => void; + + /** + * Returns a `Promise` that is resolved only when all `Promise` instances registered with {@link holdSetupUntilResolved} + * are resolved, or rejected if any of them are rejected. If the supplied `Promise` resolves to an object with the + * `shouldReloadConfig` property set to `true`, it indicates that Kibana configuration might have changed and Kibana + * needs to reload it from the disk. + */ + readonly waitUntilCanSetup: () => Promise<{ shouldReloadConfig: boolean }>; +} diff --git a/packages/core/preboot/core-preboot-server-internal/tsconfig.json b/packages/core/preboot/core-preboot-server-internal/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/preboot/core-preboot-server-internal/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/preboot/core-preboot-server-mocks/BUILD.bazel b/packages/core/preboot/core-preboot-server-mocks/BUILD.bazel new file mode 100644 index 0000000000000..572a8f80d6012 --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/BUILD.bazel @@ -0,0 +1,102 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-preboot-server-mocks" +PKG_REQUIRE_NAME = "@kbn/core-preboot-server-mocks" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ + "//packages/kbn-utility-types", + "//packages/core/preboot/core-preboot-server-internal", +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", + "//packages/kbn-utility-types:npm_module_types", + "//packages/core/preboot/core-preboot-server-internal:npm_module_types", + "//packages/core/preboot/core-preboot-server:npm_module_types" +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/preboot/core-preboot-server-mocks/README.md b/packages/core/preboot/core-preboot-server-mocks/README.md new file mode 100644 index 0000000000000..b52c6777c72be --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/README.md @@ -0,0 +1,3 @@ +# @kbn/core-preboot-server-mocks + +This package contains the mocks for Core's server-side preboot service. diff --git a/packages/core/preboot/core-preboot-server-mocks/jest.config.js b/packages/core/preboot/core-preboot-server-mocks/jest.config.js new file mode 100644 index 0000000000000..00a08d96aeace --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/preboot/core-preboot-server-mocks'], +}; diff --git a/packages/core/preboot/core-preboot-server-mocks/package.json b/packages/core/preboot/core-preboot-server-mocks/package.json new file mode 100644 index 0000000000000..e88cee9cfd551 --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-preboot-server-mocks", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/packages/core/preboot/core-preboot-server-mocks/src/index.ts b/packages/core/preboot/core-preboot-server-mocks/src/index.ts new file mode 100644 index 0000000000000..fc1c1edbf2c58 --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/src/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { prebootServiceMock } from './preboot_service.mock'; +export type { + InternalPrebootServicePrebootMock, + PrebootServicePrebootMock, +} from './preboot_service.mock'; diff --git a/src/core/server/preboot/preboot_service.mock.ts b/packages/core/preboot/core-preboot-server-mocks/src/preboot_service.mock.ts similarity index 85% rename from src/core/server/preboot/preboot_service.mock.ts rename to packages/core/preboot/core-preboot-server-mocks/src/preboot_service.mock.ts index acdd9458a462d..f0077549f33a1 100644 --- a/src/core/server/preboot/preboot_service.mock.ts +++ b/packages/core/preboot/core-preboot-server-mocks/src/preboot_service.mock.ts @@ -5,10 +5,12 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { InternalPrebootServicePreboot, PrebootServicePreboot } from './types'; -import { PrebootService } from './preboot_service'; +import { PublicMethodsOf } from '@kbn/utility-types'; +import type { + InternalPrebootServicePreboot, + PrebootService, +} from '@kbn/core-preboot-server-internal'; +import type { PrebootServicePreboot } from '@kbn/core-preboot-server'; export type InternalPrebootServicePrebootMock = jest.Mocked; export type PrebootServicePrebootMock = jest.Mocked; diff --git a/packages/core/preboot/core-preboot-server-mocks/tsconfig.json b/packages/core/preboot/core-preboot-server-mocks/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/preboot/core-preboot-server-mocks/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/core/preboot/core-preboot-server/BUILD.bazel b/packages/core/preboot/core-preboot-server/BUILD.bazel new file mode 100644 index 0000000000000..e568ca5ab8a3b --- /dev/null +++ b/packages/core/preboot/core-preboot-server/BUILD.bazel @@ -0,0 +1,97 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") + +PKG_DIRNAME = "core-preboot-server" +PKG_REQUIRE_NAME = "@kbn/core-preboot-server" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], + exclude = [ + "**/*.test.*", + "**/*.stories.*", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +RUNTIME_DEPS = [ +] + +TYPES_DEPS = [ + "@npm//@types/node", + "@npm//@types/jest", +] + +jsts_transpiler( + name = "target_node", + srcs = SRCS, + build_pkg_name = package_name(), +) + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + "//:tsconfig.bazel.json", + ], +) + +ts_project( + name = "tsc_types", + args = ['--pretty'], + srcs = SRCS, + deps = TYPES_DEPS, + declaration = True, + declaration_map = True, + emit_declaration_only = True, + out_dir = "target_types", + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_DIRNAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = RUNTIME_DEPS + [":target_node"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [":" + PKG_DIRNAME], +) + +filegroup( + name = "build", + srcs = [":npm_module"], + visibility = ["//visibility:public"], +) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [":npm_module_types"], + visibility = ["//visibility:public"], +) diff --git a/packages/core/preboot/core-preboot-server/README.md b/packages/core/preboot/core-preboot-server/README.md new file mode 100644 index 0000000000000..8eaed8836415f --- /dev/null +++ b/packages/core/preboot/core-preboot-server/README.md @@ -0,0 +1,3 @@ +# @kbn/core-preboot-server + +Contains public types for Core's server-side `preboot` service diff --git a/packages/core/preboot/core-preboot-server/jest.config.js b/packages/core/preboot/core-preboot-server/jest.config.js new file mode 100644 index 0000000000000..aae1c1ac8f821 --- /dev/null +++ b/packages/core/preboot/core-preboot-server/jest.config.js @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../../../..', + roots: ['/packages/core/preboot/core-preboot-server'], +}; diff --git a/packages/core/preboot/core-preboot-server/package.json b/packages/core/preboot/core-preboot-server/package.json new file mode 100644 index 0000000000000..ef598d368ace4 --- /dev/null +++ b/packages/core/preboot/core-preboot-server/package.json @@ -0,0 +1,7 @@ +{ + "name": "@kbn/core-preboot-server", + "private": true, + "version": "1.0.0", + "main": "./target_node/index.js", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/src/core/server/preboot/types.ts b/packages/core/preboot/core-preboot-server/src/contracts.ts similarity index 59% rename from src/core/server/preboot/types.ts rename to packages/core/preboot/core-preboot-server/src/contracts.ts index 4d36eeb569429..b76298e4d3e98 100644 --- a/src/core/server/preboot/types.ts +++ b/packages/core/preboot/core-preboot-server/src/contracts.ts @@ -5,40 +5,6 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -import type { PluginName } from '@kbn/core-base-common'; - -/** @internal */ -export interface InternalPrebootServicePreboot { - /** - * Indicates whether Kibana is currently on hold and cannot proceed to `setup` yet. - */ - readonly isSetupOnHold: () => boolean; - - /** - * Registers a `Promise` as a precondition before Kibana can proceed to `setup`. This method can be invoked multiple - * times and from multiple `preboot` plugins. Kibana will proceed to `setup` only when all registered `Promise` are - * resolved, or it will shut down if any of them are rejected. - * @param pluginName Name of the plugin that needs to hold `setup`. - * @param reason A string that explains the reason why this promise should hold `setup`. It's supposed to be a human - * readable string that will be recorded in the logs or standard output. - * @param promise A `Promise` that should resolved before Kibana can proceed to `setup`. - */ - readonly holdSetupUntilResolved: ( - pluginName: PluginName, - reason: string, - promise: Promise<{ shouldReloadConfig: boolean } | undefined> - ) => void; - - /** - * Returns a `Promise` that is resolved only when all `Promise` instances registered with {@link holdSetupUntilResolved} - * are resolved, or rejected if any of them are rejected. If the supplied `Promise` resolves to an object with the - * `shouldReloadConfig` property set to `true`, it indicates that Kibana configuration might have changed and Kibana - * needs to reload it from the disk. - */ - readonly waitUntilCanSetup: () => Promise<{ shouldReloadConfig: boolean }>; -} - /** * Kibana Preboot Service allows to control the boot flow of Kibana. Preboot plugins can use it to hold the boot until certain condition is met. * diff --git a/packages/core/preboot/core-preboot-server/src/index.ts b/packages/core/preboot/core-preboot-server/src/index.ts new file mode 100644 index 0000000000000..eb8e763e53b14 --- /dev/null +++ b/packages/core/preboot/core-preboot-server/src/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { PrebootServicePreboot } from './contracts'; diff --git a/packages/core/preboot/core-preboot-server/tsconfig.json b/packages/core/preboot/core-preboot-server/tsconfig.json new file mode 100644 index 0000000000000..39d3c7097814a --- /dev/null +++ b/packages/core/preboot/core-preboot-server/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../../tsconfig.bazel.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true, + "emitDeclarationOnly": true, + "outDir": "target_types", + "rootDir": "src", + "stripInternal": false, + "types": [ + "jest", + "node" + ] + }, + "include": [ + "src/**/*" + ] +} diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 1f1bdaeab57f0..5a143bdf22a45 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -42,6 +42,7 @@ import type { ExecutionContextSetup, ExecutionContextStart, } from '@kbn/core-execution-context-server'; +import type { PrebootServicePreboot } from '@kbn/core-preboot-server'; import { ElasticsearchServiceSetup, configSchema as elasticsearchConfigSchema, @@ -76,13 +77,10 @@ import { CoreEnvironmentUsageData, CoreServicesUsageData, } from './core_usage_data'; -import { PrebootServicePreboot } from './preboot'; import type { CoreRequestHandlerContext } from './core_route_handler_context'; import type { PrebootCoreRequestHandlerContext } from './preboot_core_route_handler_context'; import { KibanaResponseFactory, RouteMethod } from './http'; -export type { PrebootServicePreboot } from './preboot'; - export type { CoreUsageStats, CoreUsageData, diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts index 98fb13be13d28..298fa83e0b2d7 100644 --- a/src/core/server/internal_types.ts +++ b/src/core/server/internal_types.ts @@ -21,6 +21,7 @@ import type { InternalExecutionContextSetup, InternalExecutionContextStart, } from '@kbn/core-execution-context-server-internal'; +import { InternalPrebootServicePreboot } from '@kbn/core-preboot-server-internal'; import { CapabilitiesSetup, CapabilitiesStart } from './capabilities'; import { InternalContextPreboot, InternalContextSetup } from './context'; import { @@ -49,7 +50,6 @@ import { InternalStatusServiceSetup } from './status'; import { CoreUsageDataStart, InternalCoreUsageDataSetup } from './core_usage_data'; import { I18nServiceSetup } from './i18n'; import { InternalDeprecationsServiceSetup, InternalDeprecationsServiceStart } from './deprecations'; -import { InternalPrebootServicePreboot } from './preboot'; /** @internal */ export interface InternalCorePreboot { diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index f224ff76418ab..2d8d34be93e5c 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -17,6 +17,7 @@ import { analyticsServiceMock } from '@kbn/core-analytics-server-mocks'; import { environmentServiceMock } from '@kbn/core-environment-server-mocks'; import { nodeServiceMock } from '@kbn/core-node-server-mocks'; import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; +import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; import type { PluginInitializerContext, CoreSetup, @@ -41,8 +42,6 @@ import { statusServiceMock } from './status/status_service.mock'; import { coreUsageDataServiceMock } from './core_usage_data/core_usage_data_service.mock'; import { i18nServiceMock } from './i18n/i18n_service.mock'; import { deprecationsServiceMock } from './deprecations/deprecations_service.mock'; -import { prebootServiceMock } from './preboot/preboot_service.mock'; - export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks'; export { loggingSystemMock } from '@kbn/core-logging-server-mocks'; export { httpServerMock } from './http/http_server.mocks'; diff --git a/src/core/server/server.test.mocks.ts b/src/core/server/server.test.mocks.ts index 8594d51dcd756..16f2fb3d2e1df 100644 --- a/src/core/server/server.test.mocks.ts +++ b/src/core/server/server.test.mocks.ts @@ -110,10 +110,10 @@ jest.doMock('./i18n/i18n_service', () => ({ I18nService: jest.fn(() => mockI18nService), })); -import { prebootServiceMock } from './preboot/preboot_service.mock'; +import { prebootServiceMock } from '@kbn/core-preboot-server-mocks'; export const mockPrebootService = prebootServiceMock.create(); -jest.doMock('./preboot/preboot_service', () => ({ +jest.doMock('@kbn/core-preboot-server-internal', () => ({ PrebootService: jest.fn(() => mockPrebootService), })); diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 3f877d31eec3a..b8f47cdda45f7 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -29,6 +29,7 @@ import { ExecutionContextService, executionContextConfig, } from '@kbn/core-execution-context-server-internal'; +import { PrebootService } from '@kbn/core-preboot-server-internal'; import { CoreApp } from './core_app'; import { I18nService } from './i18n'; import { ElasticsearchService } from './elasticsearch'; @@ -55,7 +56,6 @@ import { CoreUsageDataService } from './core_usage_data'; import { DeprecationsService, config as deprecationConfig } from './deprecations'; import { CoreRouteHandlerContext } from './core_route_handler_context'; import { PrebootCoreRouteHandlerContext } from './preboot_core_route_handler_context'; -import { PrebootService } from './preboot'; import { DiscoveredPlugins } from './plugins'; import type { RequestHandlerContext, PrebootRequestHandlerContext } from '.'; diff --git a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx index 370a268e2e1f1..dc000de1e20fd 100644 --- a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx @@ -25,6 +25,8 @@ import { import { ensureMinimumTime, getIndices, extractTimeFields, getMatchedIndices } from '../lib'; import { FlyoutPanels } from './flyout_panels'; +import { removeSpaces } from '../lib'; + import { MatchedItem, DataViewEditorContext, @@ -79,7 +81,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ editData, }: Props) => { const { - services: { http, dataViews, uiSettings, searchClient, overlays }, + services: { http, dataViews, uiSettings, overlays }, } = useKibana(); const { form } = useForm({ @@ -106,7 +108,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ } const indexPatternStub: DataViewSpec = { - title: formData.title, + title: removeSpaces(formData.title), timeFieldName: formData.timestampField?.value, id: formData.id, name: formData.name, @@ -268,7 +270,6 @@ const IndexPatternEditorFlyoutContentComponent = ({ ? await loadMatchedIndices(query, allowHidden, allSources, { isRollupIndex, http, - searchClient, }) : { matchedIndicesResult: { @@ -299,21 +300,22 @@ const IndexPatternEditorFlyoutContentComponent = ({ return fetchIndices(newTitle); }, - [http, allowHidden, allSources, type, rollupIndicesCapabilities, searchClient, isLoadingSources] + [http, allowHidden, allSources, type, rollupIndicesCapabilities, isLoadingSources] ); // If editData exists, loadSources so that MatchedIndices can be loaded for the Timestampfields useEffect(() => { if (editData) { loadSources(); - reloadMatchedIndices(editData.title); + reloadMatchedIndices(removeSpaces(editData.title)); } // We use the below eslint-disable as adding 'loadSources' and 'reloadMatchedIndices' as a dependency creates an infinite loop // eslint-disable-next-line react-hooks/exhaustive-deps }, [editData]); useEffect(() => { - loadTimestampFieldOptions(editData ? editData.title : title); + const timeFieldQuery = editData ? editData.title : title; + loadTimestampFieldOptions(removeSpaces(timeFieldQuery)); if (!editData) getFields().timestampField?.setValue(''); // We use the below eslint-disable as adding editData as a dependency create an infinite loop // eslint-disable-next-line react-hooks/exhaustive-deps @@ -442,11 +444,9 @@ const loadMatchedIndices = memoizeOne( { isRollupIndex, http, - searchClient, }: { isRollupIndex: (index: string) => boolean; http: DataViewEditorContext['http']; - searchClient: DataViewEditorContext['searchClient']; } ): Promise<{ matchedIndicesResult: MatchedIndicesSet; diff --git a/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx b/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx index 8bedc17d64135..29bb64bb53997 100644 --- a/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx +++ b/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx @@ -15,7 +15,7 @@ import { ValidationConfig, FieldConfig, } from '../../shared_imports'; -import { canAppendWildcard } from '../../lib'; +import { canAppendWildcard, removeSpaces } from '../../lib'; import { schema } from '../form_schema'; import { MatchedItem, @@ -81,7 +81,9 @@ const createMatchesIndicesValidator = ({ isRollup, }: MatchesValidatorArgs): ValidationConfig<{}, string, string> => ({ validator: async ({ value }) => { - const { matchedIndicesResult, newRollupIndexName } = await refreshMatchedIndices(value); + const { matchedIndicesResult, newRollupIndexName } = await refreshMatchedIndices( + removeSpaces(value) + ); const rollupIndices = Object.keys(rollupIndicesCapabilities); if (matchedIndicesResult.exactMatchedIndices.length === 0) { diff --git a/src/plugins/data_view_editor/public/lib/index.ts b/src/plugins/data_view_editor/public/lib/index.ts index 371712b70a0d2..981c9df03527b 100644 --- a/src/plugins/data_view_editor/public/lib/index.ts +++ b/src/plugins/data_view_editor/public/lib/index.ts @@ -17,3 +17,5 @@ export { getMatchedIndices } from './get_matched_indices'; export { containsIllegalCharacters } from './contains_illegal_characters'; export { extractTimeFields } from './extract_time_fields'; + +export { removeSpaces } from './remove_spaces'; diff --git a/src/plugins/data_view_editor/public/lib/remove_spaces.test.ts b/src/plugins/data_view_editor/public/lib/remove_spaces.test.ts new file mode 100644 index 0000000000000..3d5ab29ab4ff6 --- /dev/null +++ b/src/plugins/data_view_editor/public/lib/remove_spaces.test.ts @@ -0,0 +1,21 @@ +/* + * 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 { removeSpaces } from './remove_spaces'; + +describe('removeSpaces', () => { + it('should remove spaces after commas', () => { + const noSpaces = 'ki*,kib*'; + const oneSpace = 'ki*, kib*'; + const twoSpaces = 'ki*, kib*'; + + expect(removeSpaces(noSpaces)).toEqual(noSpaces); + expect(removeSpaces(oneSpace)).toEqual(noSpaces); + expect(removeSpaces(twoSpaces)).toEqual(noSpaces); + }); +}); diff --git a/src/plugins/data_view_editor/public/lib/remove_spaces.ts b/src/plugins/data_view_editor/public/lib/remove_spaces.ts new file mode 100644 index 0000000000000..fb53b804bc8e8 --- /dev/null +++ b/src/plugins/data_view_editor/public/lib/remove_spaces.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const removeSpaces = (value: string) => value.replace(/,\s+/g, ','); diff --git a/src/plugins/interactive_setup/server/routes/index.ts b/src/plugins/interactive_setup/server/routes/index.ts index 804bc9bddbc91..410fb5b42037c 100644 --- a/src/plugins/interactive_setup/server/routes/index.ts +++ b/src/plugins/interactive_setup/server/routes/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import type { IBasePath, IRouter, Logger, PrebootServicePreboot } from '@kbn/core/server'; +import type { PrebootServicePreboot } from '@kbn/core-preboot-server'; +import type { IBasePath, IRouter, Logger } from '@kbn/core/server'; import type { PublicContract, PublicMethodsOf } from '@kbn/utility-types'; import type { ConfigType } from '../config'; diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts index bcc0782b1bf0c..5013f2fbe1552 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts @@ -268,6 +268,35 @@ describe('asKqlFiltersByRuleTypeAndConsumer', () => { ) ); }); + + test('constructs KQL filter for single rule type with no authorized consumer', async () => { + const result = asFiltersByRuleTypeAndConsumer( + new Set([ + { + actionGroups: [], + defaultActionGroupId: 'default', + recoveryActionGroup: RecoveredActionGroup, + id: 'myAppAlertType', + name: 'myAppAlertType', + producer: 'myApp', + minimumLicenseRequired: 'basic', + isExportable: true, + authorizedConsumers: {}, + enabledInLicense: true, + }, + ]), + { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + }, + }, + 'space1' + ); + + expect(result).toEqual(fromKueryExpression(`path.to.rule_type_id:myAppAlertType`)); + }); }); describe('asEsDslFiltersByRuleTypeAndConsumer', () => { @@ -602,6 +631,48 @@ describe('asEsDslFiltersByRuleTypeAndConsumer', () => { }, }); }); + + test('constructs KQL filter for single rule type with no authorized consumer', async () => { + const result = asFiltersByRuleTypeAndConsumer( + new Set([ + { + actionGroups: [], + defaultActionGroupId: 'default', + recoveryActionGroup: RecoveredActionGroup, + id: 'myAppAlertType', + name: 'myAppAlertType', + producer: 'myApp', + minimumLicenseRequired: 'basic', + isExportable: true, + authorizedConsumers: {}, + enabledInLicense: true, + }, + ]), + { + type: AlertingAuthorizationFilterType.ESDSL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + }, + }, + 'space1' + ); + + expect(result).toMatchInlineSnapshot(` + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "path.to.rule_type_id": "myAppAlertType", + }, + }, + ], + }, + } + `); + }); }); describe('asFiltersBySpaceId', () => { diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts index d718373446b60..01e30dfb38327 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts @@ -42,15 +42,20 @@ export function asFiltersByRuleTypeAndConsumer( const kueryNode = nodeBuilder.or( Array.from(ruleTypes).reduce((filters, { id, authorizedConsumers }) => { ensureFieldIsSafeForQuery('ruleTypeId', id); - const andNodes = [ - nodeBuilder.is(opts.fieldNames.ruleTypeId, id), - nodeBuilder.or( - Object.keys(authorizedConsumers).map((consumer) => { - ensureFieldIsSafeForQuery('consumer', consumer); - return nodeBuilder.is(opts.fieldNames.consumer, consumer); - }) - ), - ]; + + const andNodes: KueryNode[] = [nodeBuilder.is(opts.fieldNames.ruleTypeId, id)]; + + const authorizedConsumersKeys = Object.keys(authorizedConsumers); + if (authorizedConsumersKeys.length) { + andNodes.push( + nodeBuilder.or( + authorizedConsumersKeys.map((consumer) => { + ensureFieldIsSafeForQuery('consumer', consumer); + return nodeBuilder.is(opts.fieldNames.consumer, consumer); + }) + ) + ); + } if (opts.fieldNames.spaceIds != null && spaceId != null) { andNodes.push(nodeBuilder.is(opts.fieldNames.spaceIds, spaceId)); diff --git a/x-pack/plugins/osquery/common/ecs/destination/index.ts b/x-pack/plugins/osquery/common/ecs/destination/index.ts index f69b094ff557c..e8fbdac6578b2 100644 --- a/x-pack/plugins/osquery/common/ecs/destination/index.ts +++ b/x-pack/plugins/osquery/common/ecs/destination/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GeoEcs } from '../geo'; +import type { GeoEcs } from '../geo'; export interface DestinationEcs { bytes?: number[]; diff --git a/x-pack/plugins/osquery/common/ecs/index.ts b/x-pack/plugins/osquery/common/ecs/index.ts index e3bcd11097cf7..570cb2b13917f 100644 --- a/x-pack/plugins/osquery/common/ecs/index.ts +++ b/x-pack/plugins/osquery/common/ecs/index.ts @@ -5,28 +5,28 @@ * 2.0. */ -import { AgentEcs } from './agent'; -import { AuditdEcs } from './auditd'; -import { DestinationEcs } from './destination'; -import { DnsEcs } from './dns'; -import { EndgameEcs } from './endgame'; -import { EventEcs } from './event'; -import { FileEcs } from './file'; -import { GeoEcs } from './geo'; -import { HostEcs } from './host'; -import { NetworkEcs } from './network'; -import { RuleEcs } from './rule'; -import { SignalEcs } from './signal'; -import { SourceEcs } from './source'; -import { SuricataEcs } from './suricata'; -import { TlsEcs } from './tls'; -import { ZeekEcs } from './zeek'; -import { HttpEcs } from './http'; -import { UrlEcs } from './url'; -import { UserEcs } from './user'; -import { WinlogEcs } from './winlog'; -import { ProcessEcs } from './process'; -import { SystemEcs } from './system'; +import type { AgentEcs } from './agent'; +import type { AuditdEcs } from './auditd'; +import type { DestinationEcs } from './destination'; +import type { DnsEcs } from './dns'; +import type { EndgameEcs } from './endgame'; +import type { EventEcs } from './event'; +import type { FileEcs } from './file'; +import type { GeoEcs } from './geo'; +import type { HostEcs } from './host'; +import type { NetworkEcs } from './network'; +import type { RuleEcs } from './rule'; +import type { SignalEcs } from './signal'; +import type { SourceEcs } from './source'; +import type { SuricataEcs } from './suricata'; +import type { TlsEcs } from './tls'; +import type { ZeekEcs } from './zeek'; +import type { HttpEcs } from './http'; +import type { UrlEcs } from './url'; +import type { UserEcs } from './user'; +import type { WinlogEcs } from './winlog'; +import type { ProcessEcs } from './process'; +import type { SystemEcs } from './system'; export interface Ecs { _id: string; diff --git a/x-pack/plugins/osquery/common/ecs/signal/index.ts b/x-pack/plugins/osquery/common/ecs/signal/index.ts index eb5e629a1abcf..a130270c1e308 100644 --- a/x-pack/plugins/osquery/common/ecs/signal/index.ts +++ b/x-pack/plugins/osquery/common/ecs/signal/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleEcs } from '../rule'; +import type { RuleEcs } from '../rule'; export interface SignalEcs { rule?: RuleEcs; diff --git a/x-pack/plugins/osquery/common/ecs/source/index.ts b/x-pack/plugins/osquery/common/ecs/source/index.ts index 10a2025eb43ec..fcc2bf31aed3c 100644 --- a/x-pack/plugins/osquery/common/ecs/source/index.ts +++ b/x-pack/plugins/osquery/common/ecs/source/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GeoEcs } from '../geo'; +import type { GeoEcs } from '../geo'; export interface SourceEcs { bytes?: number[]; diff --git a/x-pack/plugins/osquery/common/schemas/routes/saved_query/create_saved_query_request_schema.ts b/x-pack/plugins/osquery/common/schemas/routes/saved_query/create_saved_query_request_schema.ts index 7cc803f5584c2..b58ed0e789cd7 100644 --- a/x-pack/plugins/osquery/common/schemas/routes/saved_query/create_saved_query_request_schema.ts +++ b/x-pack/plugins/osquery/common/schemas/routes/saved_query/create_saved_query_request_schema.ts @@ -7,17 +7,17 @@ import * as t from 'io-ts'; +import type { Description } from '../../common/schemas'; import { id, descriptionOrUndefined, - Description, platformOrUndefined, query, versionOrUndefined, interval, ecsMappingOrUndefined, } from '../../common/schemas'; -import { RequiredKeepUndefined } from '../../../types'; +import type { RequiredKeepUndefined } from '../../../types'; export const createSavedQueryRequestSchema = t.type({ id, diff --git a/x-pack/plugins/osquery/common/schemas/types/default_uuid.ts b/x-pack/plugins/osquery/common/schemas/types/default_uuid.ts index 0546862748b36..f19884aca0d25 100644 --- a/x-pack/plugins/osquery/common/schemas/types/default_uuid.ts +++ b/x-pack/plugins/osquery/common/schemas/types/default_uuid.ts @@ -6,7 +6,7 @@ */ import * as t from 'io-ts'; -import { Either } from 'fp-ts/lib/Either'; +import type { Either } from 'fp-ts/lib/Either'; import uuid from 'uuid'; import { NonEmptyString } from './non_empty_string'; diff --git a/x-pack/plugins/osquery/common/schemas/types/non_empty_string.ts b/x-pack/plugins/osquery/common/schemas/types/non_empty_string.ts index 5ba85f2ab0249..47922b3f38906 100644 --- a/x-pack/plugins/osquery/common/schemas/types/non_empty_string.ts +++ b/x-pack/plugins/osquery/common/schemas/types/non_empty_string.ts @@ -6,7 +6,7 @@ */ import * as t from 'io-ts'; -import { Either } from 'fp-ts/lib/Either'; +import type { Either } from 'fp-ts/lib/Either'; /** * Types the NonEmptyString as: diff --git a/x-pack/plugins/osquery/common/search_strategy/common/index.ts b/x-pack/plugins/osquery/common/search_strategy/common/index.ts index 0fbb0cf22ecf3..a0b7b5719cbcc 100644 --- a/x-pack/plugins/osquery/common/search_strategy/common/index.ts +++ b/x-pack/plugins/osquery/common/search_strategy/common/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; export type Maybe = T | null; diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts b/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts index 3e7c574dae963..217f150f514a4 100644 --- a/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts +++ b/x-pack/plugins/osquery/common/search_strategy/osquery/actions/index.ts @@ -6,10 +6,10 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, PageInfoPaginated } from '../../common'; -import { RequestOptions, RequestOptionsPaginated } from '../..'; +import type { Inspect, Maybe, PageInfoPaginated } from '../../common'; +import type { RequestOptions, RequestOptionsPaginated } from '../..'; export type ActionEdges = estypes.SearchResponse['hits']['hits']; diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts b/x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts index 3e7422adc91a2..53492f937db58 100644 --- a/x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts +++ b/x-pack/plugins/osquery/common/search_strategy/osquery/agents/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, PageInfoPaginated } from '../../common'; -import { RequestOptionsPaginated } from '../..'; -import { Agent } from '../../../shared_imports'; +import type { Inspect, Maybe, PageInfoPaginated } from '../../common'; +import type { RequestOptionsPaginated } from '../..'; +import type { Agent } from '../../../shared_imports'; export interface AgentsStrategyResponse extends IEsSearchResponse { edges: Agent[]; diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/index.ts b/x-pack/plugins/osquery/common/search_strategy/osquery/index.ts index 9367449a1c5bb..b089d1fcf6484 100644 --- a/x-pack/plugins/osquery/common/search_strategy/osquery/index.ts +++ b/x-pack/plugins/osquery/common/search_strategy/osquery/index.ts @@ -6,9 +6,9 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IEsSearchRequest } from '@kbn/data-plugin/common'; -import { ESQuery } from '../../typed_json'; -import { +import type { IEsSearchRequest } from '@kbn/data-plugin/common'; +import type { ESQuery } from '../../typed_json'; +import type { ActionsStrategyResponse, ActionsRequestOptions, ActionDetailsStrategyResponse, @@ -16,10 +16,10 @@ import { ActionResultsStrategyResponse, ActionResultsRequestOptions, } from './actions'; -import { AgentsStrategyResponse, AgentsRequestOptions } from './agents'; -import { ResultsStrategyResponse, ResultsRequestOptions } from './results'; +import type { AgentsStrategyResponse, AgentsRequestOptions } from './agents'; +import type { ResultsStrategyResponse, ResultsRequestOptions } from './results'; -import { DocValueFields, SortField, PaginationInputPaginated } from '../common'; +import type { DocValueFields, SortField, PaginationInputPaginated } from '../common'; export * from './actions'; export * from './agents'; diff --git a/x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts b/x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts index d60b972ea6441..5a0e14f99ed70 100644 --- a/x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts +++ b/x-pack/plugins/osquery/common/search_strategy/osquery/results/index.ts @@ -6,10 +6,10 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, PageInfoPaginated, SortField } from '../../common'; -import { RequestOptionsPaginated } from '../..'; +import type { Inspect, Maybe, PageInfoPaginated, SortField } from '../../common'; +import type { RequestOptionsPaginated } from '../..'; export type ResultEdges = estypes.SearchResponse['hits']['hits']; diff --git a/x-pack/plugins/osquery/common/typed_json.ts b/x-pack/plugins/osquery/common/typed_json.ts index 527a8ed381654..5621f2c52be04 100644 --- a/x-pack/plugins/osquery/common/typed_json.ts +++ b/x-pack/plugins/osquery/common/typed_json.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; -import { JsonObject } from '@kbn/utility-types'; +import type { BoolQuery } from '@kbn/es-query'; +import type { JsonObject } from '@kbn/utility-types'; export type ESQuery = | ESRangeQuery diff --git a/x-pack/plugins/osquery/common/types.ts b/x-pack/plugins/osquery/common/types.ts index 6704761fe558f..ef2c077056b86 100644 --- a/x-pack/plugins/osquery/common/types.ts +++ b/x-pack/plugins/osquery/common/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { PackagePolicy, PackagePolicyInput, PackagePolicyInputStream, diff --git a/x-pack/plugins/osquery/common/utility_types.ts b/x-pack/plugins/osquery/common/utility_types.ts index a7cea8d8cdd6f..75a30adad3bf1 100644 --- a/x-pack/plugins/osquery/common/utility_types.ts +++ b/x-pack/plugins/osquery/common/utility_types.ts @@ -6,7 +6,7 @@ */ import * as runtimeTypes from 'io-ts'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; // This type is for typing EuiDescriptionList export interface DescriptionList { diff --git a/x-pack/plugins/osquery/common/utils/build_query/filters.ts b/x-pack/plugins/osquery/common/utils/build_query/filters.ts index d37fb0cf39fd4..a9a9b3319661b 100644 --- a/x-pack/plugins/osquery/common/utils/build_query/filters.ts +++ b/x-pack/plugins/osquery/common/utils/build_query/filters.ts @@ -7,7 +7,7 @@ import { isEmpty, isString } from 'lodash/fp'; -import { ESQuery } from '../../typed_json'; +import type { ESQuery } from '../../typed_json'; export const createQueryFilterClauses = (filterQuery: ESQuery | string | undefined) => !isEmpty(filterQuery) ? [isString(filterQuery) ? JSON.parse(filterQuery) : filterQuery] : []; diff --git a/x-pack/plugins/osquery/cypress/tasks/login.ts b/x-pack/plugins/osquery/cypress/tasks/login.ts index 77d53ab470830..0f19f71f67011 100644 --- a/x-pack/plugins/osquery/cypress/tasks/login.ts +++ b/x-pack/plugins/osquery/cypress/tasks/login.ts @@ -6,8 +6,9 @@ */ import * as yaml from 'js-yaml'; -import Url, { UrlObject } from 'url'; -import { ROLES } from '../test'; +import type { UrlObject } from 'url'; +import Url from 'url'; +import type { ROLES } from '../test'; /** * Credentials in the `kibana.dev.yml` config file will be used to authenticate diff --git a/x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx b/x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx index 7244c2417151b..95b96ca454610 100644 --- a/x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx +++ b/x-pack/plugins/osquery/public/action_results/action_agents_status_badges.tsx @@ -13,7 +13,7 @@ import { getColorForAgentStatus, getLabelForAgentStatus, } from './services/agent_status'; -import { ActionAgentStatus } from './types'; +import type { ActionAgentStatus } from './types'; export const ActionAgentsStatusBadges = memo<{ agentStatus: { [k in ActionAgentStatus]: number }; diff --git a/x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx b/x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx index 9a826457cf8cd..d6173e7ac2fc8 100644 --- a/x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx +++ b/x-pack/plugins/osquery/public/action_results/action_agents_status_bar.tsx @@ -10,7 +10,7 @@ import { EuiColorPaletteDisplay } from '@elastic/eui'; import React, { useMemo } from 'react'; import { AGENT_STATUSES, getColorForAgentStatus } from './services/agent_status'; -import { ActionAgentStatus } from './types'; +import type { ActionAgentStatus } from './types'; const StyledEuiColorPaletteDisplay = styled(EuiColorPaletteDisplay)` &.osquery-action-agent-status-bar { diff --git a/x-pack/plugins/osquery/public/action_results/use_action_results.ts b/x-pack/plugins/osquery/public/action_results/use_action_results.ts index d8dd3186238f7..629c490660a2e 100644 --- a/x-pack/plugins/osquery/public/action_results/use_action_results.ts +++ b/x-pack/plugins/osquery/public/action_results/use_action_results.ts @@ -10,22 +10,22 @@ import { useQuery } from 'react-query'; import { i18n } from '@kbn/i18n'; import { lastValueFrom } from 'rxjs'; +import type { InspectResponse } from '../common/helpers'; import { createFilter, getInspectResponse, - InspectResponse, generateTablePaginationOptions, } from '../common/helpers'; import { useKibana } from '../common/lib/kibana'; -import { +import type { ResultEdges, PageInfoPaginated, - OsqueryQueries, ActionResultsRequestOptions, ActionResultsStrategyResponse, Direction, } from '../../common/search_strategy'; -import { ESTermQuery } from '../../common/typed_json'; +import { OsqueryQueries } from '../../common/search_strategy'; +import type { ESTermQuery } from '../../common/typed_json'; import { queryClient } from '../query_client'; import { useErrorToast } from '../common/hooks/use_error_toast'; diff --git a/x-pack/plugins/osquery/public/actions/use_action_details.ts b/x-pack/plugins/osquery/public/actions/use_action_details.ts index 32b8d4578cb77..39abf4ac23852 100644 --- a/x-pack/plugins/osquery/public/actions/use_action_details.ts +++ b/x-pack/plugins/osquery/public/actions/use_action_details.ts @@ -11,12 +11,12 @@ import { i18n } from '@kbn/i18n'; import { lastValueFrom } from 'rxjs'; import { createFilter } from '../common/helpers'; import { useKibana } from '../common/lib/kibana'; -import { - OsqueryQueries, +import type { ActionDetailsRequestOptions, ActionDetailsStrategyResponse, } from '../../common/search_strategy'; -import { ESTermQuery } from '../../common/typed_json'; +import { OsqueryQueries } from '../../common/search_strategy'; +import type { ESTermQuery } from '../../common/typed_json'; import { useErrorToast } from '../common/hooks/use_error_toast'; export interface ActionDetailsArgs { diff --git a/x-pack/plugins/osquery/public/actions/use_all_actions.ts b/x-pack/plugins/osquery/public/actions/use_all_actions.ts index 34a25fa47b6e9..a0a53ab4566bd 100644 --- a/x-pack/plugins/osquery/public/actions/use_all_actions.ts +++ b/x-pack/plugins/osquery/public/actions/use_all_actions.ts @@ -9,22 +9,22 @@ import { useQuery } from 'react-query'; import { i18n } from '@kbn/i18n'; import { lastValueFrom } from 'rxjs'; +import type { InspectResponse } from '../common/helpers'; import { createFilter, generateTablePaginationOptions, getInspectResponse, - InspectResponse, } from '../common/helpers'; import { useKibana } from '../common/lib/kibana'; -import { +import type { ActionEdges, PageInfoPaginated, - OsqueryQueries, ActionsRequestOptions, ActionsStrategyResponse, Direction, } from '../../common/search_strategy'; -import { ESTermQuery } from '../../common/typed_json'; +import { OsqueryQueries } from '../../common/search_strategy'; +import type { ESTermQuery } from '../../common/typed_json'; import { useErrorToast } from '../common/hooks/use_error_toast'; diff --git a/x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts b/x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts index d405593910763..5eb70c802140c 100644 --- a/x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts +++ b/x-pack/plugins/osquery/public/agent_policies/use_agent_policies.ts @@ -9,7 +9,7 @@ import { mapKeys } from 'lodash'; import { useQuery } from 'react-query'; import { i18n } from '@kbn/i18n'; -import { GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; +import type { GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; import { useKibana } from '../common/lib/kibana'; import { useErrorToast } from '../common/hooks/use_error_toast'; diff --git a/x-pack/plugins/osquery/public/agents/agent_grouper.test.ts b/x-pack/plugins/osquery/public/agents/agent_grouper.test.ts index 423b608f6092a..337d1b98fa4ba 100644 --- a/x-pack/plugins/osquery/public/agents/agent_grouper.test.ts +++ b/x-pack/plugins/osquery/public/agents/agent_grouper.test.ts @@ -6,7 +6,8 @@ */ import { AgentGrouper } from './agent_grouper'; -import { AGENT_GROUP_KEY, Group, GroupedAgent, GroupOptionValue } from './types'; +import type { Group, GroupedAgent, GroupOptionValue } from './types'; +import { AGENT_GROUP_KEY } from './types'; import uuid from 'uuid'; import { ALL_AGENTS_LABEL } from './translations'; diff --git a/x-pack/plugins/osquery/public/agents/agent_grouper.ts b/x-pack/plugins/osquery/public/agents/agent_grouper.ts index f0bf423672269..156f09b5c130b 100644 --- a/x-pack/plugins/osquery/public/agents/agent_grouper.ts +++ b/x-pack/plugins/osquery/public/agents/agent_grouper.ts @@ -12,7 +12,8 @@ import { AGENT_POLICY_LABEL, AGENT_SELECTION_LABEL, } from './translations'; -import { AGENT_GROUP_KEY, Group, GroupOption, GroupedAgent } from './types'; +import type { Group, GroupOption, GroupedAgent } from './types'; +import { AGENT_GROUP_KEY } from './types'; const getColor = generateColorPicker(); diff --git a/x-pack/plugins/osquery/public/agents/agents_table.tsx b/x-pack/plugins/osquery/public/agents/agents_table.tsx index f4baf70cf5593..e892a7f7a4840 100644 --- a/x-pack/plugins/osquery/public/agents/agents_table.tsx +++ b/x-pack/plugins/osquery/public/agents/agents_table.tsx @@ -29,13 +29,8 @@ import { AGENT_SELECTION_LABEL, } from './translations'; -import { - AGENT_GROUP_KEY, - SelectedGroups, - AgentOptionValue, - GroupOption, - AgentSelection, -} from './types'; +import type { SelectedGroups, AgentOptionValue, GroupOption, AgentSelection } from './types'; +import { AGENT_GROUP_KEY } from './types'; interface AgentsTableProps { agentSelection: AgentSelection; diff --git a/x-pack/plugins/osquery/public/agents/helpers.test.ts b/x-pack/plugins/osquery/public/agents/helpers.test.ts index 3ec75f2b5bba7..610810082ccc1 100644 --- a/x-pack/plugins/osquery/public/agents/helpers.test.ts +++ b/x-pack/plugins/osquery/public/agents/helpers.test.ts @@ -13,7 +13,8 @@ import { processAggregations, generateAgentSelection, } from './helpers'; -import { AGENT_GROUP_KEY, GroupOption, Overlap, SelectedGroups } from './types'; +import type { GroupOption, Overlap, SelectedGroups } from './types'; +import { AGENT_GROUP_KEY } from './types'; describe('generateAgentSelection', () => { it('should handle empty input', () => { diff --git a/x-pack/plugins/osquery/public/agents/helpers.ts b/x-pack/plugins/osquery/public/agents/helpers.ts index db48b5d417c96..62ad37de506cb 100644 --- a/x-pack/plugins/osquery/public/agents/helpers.ts +++ b/x-pack/plugins/osquery/public/agents/helpers.ts @@ -7,8 +7,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { euiPaletteColorBlindBehindText } from '@elastic/eui'; -import { - AGENT_GROUP_KEY, +import type { SelectedGroups, Overlap, Group, @@ -18,6 +17,7 @@ import { GroupOptionValue, GroupOption, } from './types'; +import { AGENT_GROUP_KEY } from './types'; export const getNumOverlapped = ( { policy = {}, platform = {} }: SelectedGroups, diff --git a/x-pack/plugins/osquery/public/agents/types.ts b/x-pack/plugins/osquery/public/agents/types.ts index 87ca2a6e91592..71ebdc2983aef 100644 --- a/x-pack/plugins/osquery/public/agents/types.ts +++ b/x-pack/plugins/osquery/public/agents/types.ts @@ -6,8 +6,8 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { EuiComboBoxOptionOption } from '@elastic/eui'; -import { Agent } from '../../common/shared_imports'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import type { Agent } from '../../common/shared_imports'; interface BaseDataPoint { key: string; @@ -64,6 +64,5 @@ export enum AGENT_GROUP_KEY { All, Platform, Policy, - // eslint-disable-next-line @typescript-eslint/no-shadow Agent, } diff --git a/x-pack/plugins/osquery/public/agents/use_agent_details.ts b/x-pack/plugins/osquery/public/agents/use_agent_details.ts index b343d75262905..59ac973eb1dc1 100644 --- a/x-pack/plugins/osquery/public/agents/use_agent_details.ts +++ b/x-pack/plugins/osquery/public/agents/use_agent_details.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { useQuery } from 'react-query'; -import { GetOneAgentResponse } from '@kbn/fleet-plugin/common'; +import type { GetOneAgentResponse } from '@kbn/fleet-plugin/common'; import { useErrorToast } from '../common/hooks/use_error_toast'; import { useKibana } from '../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/agents/use_agent_groups.ts b/x-pack/plugins/osquery/public/agents/use_agent_groups.ts index 3dc96c1f150c7..5076082563ba3 100644 --- a/x-pack/plugins/osquery/public/agents/use_agent_groups.ts +++ b/x-pack/plugins/osquery/public/agents/use_agent_groups.ts @@ -10,11 +10,8 @@ import { lastValueFrom } from 'rxjs'; import { useKibana } from '../common/lib/kibana'; import { useAgentPolicies } from './use_agent_policies'; -import { - OsqueryQueries, - AgentsRequestOptions, - AgentsStrategyResponse, -} from '../../common/search_strategy'; +import type { AgentsRequestOptions, AgentsStrategyResponse } from '../../common/search_strategy'; +import { OsqueryQueries } from '../../common/search_strategy'; import { processAggregations } from './helpers'; import { generateTablePaginationOptions } from '../common/helpers'; diff --git a/x-pack/plugins/osquery/public/agents/use_agent_policies.ts b/x-pack/plugins/osquery/public/agents/use_agent_policies.ts index 0d96c88771858..58032f8476f32 100644 --- a/x-pack/plugins/osquery/public/agents/use_agent_policies.ts +++ b/x-pack/plugins/osquery/public/agents/use_agent_policies.ts @@ -6,9 +6,10 @@ */ import { mapKeys } from 'lodash'; -import { useQueries, UseQueryResult } from 'react-query'; +import type { UseQueryResult } from 'react-query'; +import { useQueries } from 'react-query'; import { i18n } from '@kbn/i18n'; -import { GetOneAgentPolicyResponse } from '@kbn/fleet-plugin/common'; +import type { GetOneAgentPolicyResponse } from '@kbn/fleet-plugin/common'; import { useKibana } from '../common/lib/kibana'; import { useErrorToast } from '../common/hooks/use_error_toast'; diff --git a/x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts b/x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts index 1359ec6706ea5..4007f14ccc3e0 100644 --- a/x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts +++ b/x-pack/plugins/osquery/public/agents/use_agent_policy_agent_ids.ts @@ -9,7 +9,8 @@ import { map } from 'lodash'; import { i18n } from '@kbn/i18n'; import { useQuery } from 'react-query'; -import { AGENTS_PREFIX, Agent } from '@kbn/fleet-plugin/common'; +import type { Agent } from '@kbn/fleet-plugin/common'; +import { AGENTS_PREFIX } from '@kbn/fleet-plugin/common'; import { useErrorToast } from '../common/hooks/use_error_toast'; import { useKibana } from '../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/agents/use_agent_status.ts b/x-pack/plugins/osquery/public/agents/use_agent_status.ts index 8da32307f9188..dd733c27675cd 100644 --- a/x-pack/plugins/osquery/public/agents/use_agent_status.ts +++ b/x-pack/plugins/osquery/public/agents/use_agent_status.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { useQuery } from 'react-query'; -import { GetAgentStatusResponse } from '@kbn/fleet-plugin/common'; +import type { GetAgentStatusResponse } from '@kbn/fleet-plugin/common'; import { useErrorToast } from '../common/hooks/use_error_toast'; import { useKibana } from '../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/agents/use_all_agents.ts b/x-pack/plugins/osquery/public/agents/use_all_agents.ts index defe625eb9a28..39a77fa72fa4e 100644 --- a/x-pack/plugins/osquery/public/agents/use_all_agents.ts +++ b/x-pack/plugins/osquery/public/agents/use_all_agents.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { useQuery } from 'react-query'; -import { GetAgentsResponse } from '@kbn/fleet-plugin/common'; +import type { GetAgentsResponse } from '@kbn/fleet-plugin/common'; import { useErrorToast } from '../common/hooks/use_error_toast'; import { useKibana } from '../common/lib/kibana'; import { useOsqueryPolicies } from './use_osquery_policies'; diff --git a/x-pack/plugins/osquery/public/application.tsx b/x-pack/plugins/osquery/public/application.tsx index 4cc7afc54203f..c57a9cb46795f 100644 --- a/x-pack/plugins/osquery/public/application.tsx +++ b/x-pack/plugins/osquery/public/application.tsx @@ -15,10 +15,10 @@ import { ThemeProvider } from 'styled-components'; import { QueryClientProvider } from 'react-query'; import { ReactQueryDevtools } from 'react-query/devtools'; -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; import { useUiSetting$, KibanaThemeProvider } from './shared_imports'; -import { AppPluginStartDependencies } from './types'; +import type { AppPluginStartDependencies } from './types'; import { OsqueryApp } from './components/app'; import { DEFAULT_DARK_MODE, PLUGIN_NAME } from '../common'; import { KibanaContextProvider } from './common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/assets/use_assets_status.ts b/x-pack/plugins/osquery/public/assets/use_assets_status.ts index a3ae65c964cca..28e752df6b2f4 100644 --- a/x-pack/plugins/osquery/public/assets/use_assets_status.ts +++ b/x-pack/plugins/osquery/public/assets/use_assets_status.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObject } from '@kbn/core/public'; +import type { SavedObject } from '@kbn/core/public'; import { useQuery } from 'react-query'; import { useKibana } from '../common/lib/kibana'; import { INTEGRATION_ASSETS_STATUS_ID } from './constants'; diff --git a/x-pack/plugins/osquery/public/common/helpers.test.ts b/x-pack/plugins/osquery/public/common/helpers.test.ts index d8a5dee9f185e..968023d726b3b 100644 --- a/x-pack/plugins/osquery/public/common/helpers.test.ts +++ b/x-pack/plugins/osquery/public/common/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ESQuery } from '../../common/typed_json'; +import type { ESQuery } from '../../common/typed_json'; import { createFilter } from './helpers'; diff --git a/x-pack/plugins/osquery/public/common/helpers.ts b/x-pack/plugins/osquery/public/common/helpers.ts index a4683b60bcfa7..42860bfb80edc 100644 --- a/x-pack/plugins/osquery/public/common/helpers.ts +++ b/x-pack/plugins/osquery/public/common/helpers.ts @@ -7,15 +7,15 @@ import { isString } from 'lodash/fp'; -import { +import type { PaginationInputPaginated, FactoryQueryTypes, StrategyResponseType, Inspect, } from '../../common/search_strategy'; -import { ESQuery } from '../../common/typed_json'; -import { ArrayItem } from '../shared_imports'; +import type { ESQuery } from '../../common/typed_json'; +import type { ArrayItem } from '../shared_imports'; export const createFilter = (filterQuery: ESQuery | string | undefined) => isString(filterQuery) ? filterQuery : JSON.stringify(filterQuery); diff --git a/x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx b/x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx index 42a8b23143a53..7286528fbfa96 100644 --- a/x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx +++ b/x-pack/plugins/osquery/public/common/hooks/use_error_toast.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ErrorToastOptions, Toast } from '@kbn/core/public'; +import type { ErrorToastOptions, Toast } from '@kbn/core/public'; import { useState } from 'react'; import { useKibana } from '../lib/kibana'; diff --git a/x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts b/x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts index f58467cc9a5dc..8762ee38142c5 100644 --- a/x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts +++ b/x-pack/plugins/osquery/public/common/lib/kibana/kibana_react.ts @@ -5,19 +5,19 @@ * 2.0. */ -import React from 'react'; +import type React from 'react'; import { useHistory } from 'react-router-dom'; import { FieldIcon } from '@kbn/react-field'; +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; import { KibanaContextProvider, - KibanaReactContextValue, useKibana, useUiSetting, useUiSetting$, withKibana, reactRouterNavigate, } from '@kbn/kibana-react-plugin/public'; -import { StartServices } from '../../../types'; +import type { StartServices } from '../../../types'; export type KibanaContext = KibanaReactContextValue; export interface WithKibanaProps { diff --git a/x-pack/plugins/osquery/public/common/validations.ts b/x-pack/plugins/osquery/public/common/validations.ts index 09c43c16b12a3..1dc2ddbf139b8 100644 --- a/x-pack/plugins/osquery/public/common/validations.ts +++ b/x-pack/plugins/osquery/public/common/validations.ts @@ -7,7 +7,8 @@ import { i18n } from '@kbn/i18n'; -import { ValidationFunc, fieldValidators } from '../shared_imports'; +import type { ValidationFunc } from '../shared_imports'; +import { fieldValidators } from '../shared_imports'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export const queryFieldValidation: ValidationFunc = fieldValidators.emptyField( diff --git a/x-pack/plugins/osquery/public/components/layouts/header.tsx b/x-pack/plugins/osquery/public/components/layouts/header.tsx index fdf9b00633f95..14e2804b10ced 100644 --- a/x-pack/plugins/osquery/public/components/layouts/header.tsx +++ b/x-pack/plugins/osquery/public/components/layouts/header.tsx @@ -10,8 +10,8 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, EuiTabs, EuiTab, EuiSpacer } from '@elastic/eui'; -import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; -import { EuiFlexItemProps } from '@elastic/eui/src/components/flex/flex_item'; +import type { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; +import type { EuiFlexItemProps } from '@elastic/eui/src/components/flex/flex_item'; const Container = styled.div` border-bottom: ${(props) => props.theme.eui.euiBorderThin}; diff --git a/x-pack/plugins/osquery/public/components/layouts/with_header.tsx b/x-pack/plugins/osquery/public/components/layouts/with_header.tsx index 97db914fedcf2..595b4d260e537 100644 --- a/x-pack/plugins/osquery/public/components/layouts/with_header.tsx +++ b/x-pack/plugins/osquery/public/components/layouts/with_header.tsx @@ -8,7 +8,8 @@ import React, { Fragment } from 'react'; import { EuiPageBody, EuiSpacer } from '@elastic/eui'; -import { Header, HeaderProps } from './header'; +import type { HeaderProps } from './header'; +import { Header } from './header'; import { Page, ContentWrapper } from './without_header'; export interface WithHeaderLayoutProps extends HeaderProps { diff --git a/x-pack/plugins/osquery/public/components/osquery_icon/index.tsx b/x-pack/plugins/osquery/public/components/osquery_icon/index.tsx index 0c2a24ef7b694..fe7b811bd70fd 100644 --- a/x-pack/plugins/osquery/public/components/osquery_icon/index.tsx +++ b/x-pack/plugins/osquery/public/components/osquery_icon/index.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { EuiIcon, EuiIconProps } from '@elastic/eui'; +import type { EuiIconProps } from '@elastic/eui'; +import { EuiIcon } from '@elastic/eui'; import OsqueryLogo from './osquery.svg'; export type OsqueryIconProps = Omit; diff --git a/x-pack/plugins/osquery/public/editor/index.tsx b/x-pack/plugins/osquery/public/editor/index.tsx index 9718e80926d06..2c6a505af55cd 100644 --- a/x-pack/plugins/osquery/public/editor/index.tsx +++ b/x-pack/plugins/osquery/public/editor/index.tsx @@ -9,7 +9,8 @@ import React, { useEffect, useState } from 'react'; import useDebounce from 'react-use/lib/useDebounce'; import 'brace/theme/tomorrow'; -import { EuiCodeEditor, EuiCodeEditorProps } from '../shared_imports'; +import type { EuiCodeEditorProps } from '../shared_imports'; +import { EuiCodeEditor } from '../shared_imports'; import './osquery_mode'; diff --git a/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts b/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts index c14899b902e2e..7ec61e6a2d80a 100644 --- a/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts +++ b/x-pack/plugins/osquery/public/editor/osquery_highlight_rules.ts @@ -7,7 +7,7 @@ import ace from 'brace'; import 'brace/ext/language_tools'; -import { AceInterface } from './ace_types'; +import type { AceInterface } from './ace_types'; import { getOsqueryTableNames } from './osquery_tables'; const osqueryTables = getOsqueryTableNames().join('|'); diff --git a/x-pack/plugins/osquery/public/editor/osquery_mode.ts b/x-pack/plugins/osquery/public/editor/osquery_mode.ts index 85da6fb0fa5c4..25751c3c04a12 100644 --- a/x-pack/plugins/osquery/public/editor/osquery_mode.ts +++ b/x-pack/plugins/osquery/public/editor/osquery_mode.ts @@ -8,7 +8,7 @@ import ace from 'brace'; import 'brace/mode/sql'; import 'brace/ext/language_tools'; -import { AceInterface } from './ace_types'; +import type { AceInterface } from './ace_types'; import './osquery_highlight_rules'; (ace as unknown as AceInterface).define( diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx index 6d1ae8f63cf1f..3b26c609c2481 100644 --- a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx +++ b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_custom_button_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackageCustomExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackageCustomExtensionComponent } from '@kbn/fleet-plugin/public'; export const LazyOsqueryManagedCustomButtonExtension = lazy( async () => { diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx index 7783f4a4b6dd7..c89f01c1d0d28 100644 --- a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx +++ b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_create_import_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; export const LazyOsqueryManagedPolicyCreateImportExtension = lazy(async () => { diff --git a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx index ac4f50e6a97b3..095bf04c7f6b9 100644 --- a/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx +++ b/x-pack/plugins/osquery/public/fleet_integration/lazy_osquery_managed_policy_edit_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; export const LazyOsqueryManagedPolicyEditExtension = lazy( async () => { diff --git a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx b/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx index 393c3a00991b2..c06f567f5b753 100644 --- a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx +++ b/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_custom_button_extension.tsx @@ -8,7 +8,7 @@ import { EuiLoadingContent } from '@elastic/eui'; import React from 'react'; -import { PackageCustomExtensionComponentProps } from '@kbn/fleet-plugin/public'; +import type { PackageCustomExtensionComponentProps } from '@kbn/fleet-plugin/public'; import { NavigationButtons } from './navigation_buttons'; import { DisabledCallout } from './disabled_callout'; import { MissingPrivileges } from '../routes/components/missing_privileges'; diff --git a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx b/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx index 2cc6a3230d0ea..a4dd17a66c48f 100644 --- a/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx +++ b/x-pack/plugins/osquery/public/fleet_integration/osquery_managed_policy_create_import_extension.tsx @@ -21,21 +21,18 @@ import { i18n } from '@kbn/i18n'; import useDebounce from 'react-use/lib/useDebounce'; import styled from 'styled-components'; -import { - agentRouteService, - agentPolicyRouteService, - AgentPolicy, - PLUGIN_ID, -} from '@kbn/fleet-plugin/common'; -import { - pagePathGetters, +import type { AgentPolicy } from '@kbn/fleet-plugin/common'; +import { agentRouteService, agentPolicyRouteService, PLUGIN_ID } from '@kbn/fleet-plugin/common'; +import type { PackagePolicyCreateExtensionComponentProps, PackagePolicyEditExtensionComponentProps, } from '@kbn/fleet-plugin/public'; +import { pagePathGetters } from '@kbn/fleet-plugin/public'; import { useKibana } from '../common/lib/kibana'; import { NavigationButtons } from './navigation_buttons'; import { DisabledCallout } from './disabled_callout'; import { ConfigUploader } from './config_uploader'; +import type { ValidationFunc } from '../shared_imports'; import { Form, useForm, @@ -44,7 +41,6 @@ import { getUseField, FIELD_TYPES, fieldValidators, - ValidationFunc, } from '../shared_imports'; import { useFetchStatus } from './use_fetch_status'; diff --git a/x-pack/plugins/osquery/public/index.ts b/x-pack/plugins/osquery/public/index.ts index fe8eba699f030..155bf44079cfe 100644 --- a/x-pack/plugins/osquery/public/index.ts +++ b/x-pack/plugins/osquery/public/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PluginInitializerContext } from '@kbn/core/public'; +import type { PluginInitializerContext } from '@kbn/core/public'; import { OsqueryPlugin } from './plugin'; // This exports static code and TypeScript types, diff --git a/x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx b/x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx index ccde0fd8305f9..b4fd3bdaf216c 100644 --- a/x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx +++ b/x-pack/plugins/osquery/public/live_queries/form/agents_table_field.tsx @@ -6,9 +6,9 @@ */ import React, { useCallback } from 'react'; -import { FieldHook } from '../../shared_imports'; +import type { FieldHook } from '../../shared_imports'; import { AgentsTable } from '../../agents/agents_table'; -import { AgentSelection } from '../../agents/types'; +import type { AgentSelection } from '../../agents/types'; interface AgentsTableFieldProps { field: FieldHook; diff --git a/x-pack/plugins/osquery/public/live_queries/form/index.tsx b/x-pack/plugins/osquery/public/live_queries/form/index.tsx index d8b2b9e38d509..908cd60f893f1 100644 --- a/x-pack/plugins/osquery/public/live_queries/form/index.tsx +++ b/x-pack/plugins/osquery/public/live_queries/form/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiAccordionProps } from '@elastic/eui'; import { EuiButton, EuiButtonEmpty, @@ -12,7 +13,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiAccordion, - EuiAccordionProps, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; @@ -21,7 +21,8 @@ import styled from 'styled-components'; import { pickBy, isEmpty, map } from 'lodash'; import { convertECSMappingToObject } from '../../../common/schemas/common/utils'; -import { UseField, Form, FormData, useForm, useFormData } from '../../shared_imports'; +import type { FormData } from '../../shared_imports'; +import { UseField, Form, useForm, useFormData } from '../../shared_imports'; import { AgentsTableField } from './agents_table_field'; import { LiveQueryQueryField } from './live_query_query_field'; import { useKibana } from '../../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx b/x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx index 3b5f8aee661e6..86775040c7f73 100644 --- a/x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx +++ b/x-pack/plugins/osquery/public/live_queries/form/live_query_query_field.tsx @@ -9,7 +9,7 @@ import { EuiCodeBlock, EuiFormRow } from '@elastic/eui'; import React, { useCallback } from 'react'; import styled from 'styled-components'; -import { EuiCodeEditorProps, FieldHook } from '../../shared_imports'; +import type { EuiCodeEditorProps, FieldHook } from '../../shared_imports'; import { OsqueryEditor } from '../../editor'; import { useKibana } from '../../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/packs/active_state_switch.tsx b/x-pack/plugins/osquery/public/packs/active_state_switch.tsx index 648f42d29f765..6ba0e8998f4d7 100644 --- a/x-pack/plugins/osquery/public/packs/active_state_switch.tsx +++ b/x-pack/plugins/osquery/public/packs/active_state_switch.tsx @@ -11,7 +11,7 @@ import { useQueryClient } from 'react-query'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { useKibana } from '../common/lib/kibana'; import { useAgentPolicies } from '../agent_policies/use_agent_policies'; import { ConfirmDeployAgentPolicyModal } from './form/confirmation_modal'; diff --git a/x-pack/plugins/osquery/public/packs/add_pack_button.tsx b/x-pack/plugins/osquery/public/packs/add_pack_button.tsx index 1473cee6e7aa2..70a97f2354a54 100644 --- a/x-pack/plugins/osquery/public/packs/add_pack_button.tsx +++ b/x-pack/plugins/osquery/public/packs/add_pack_button.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiButton, EuiButtonProps } from '@elastic/eui'; +import type { EuiButtonProps } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { useKibana, useRouterNavigate } from '../common/lib/kibana'; interface AddPackButtonComponentProps { diff --git a/x-pack/plugins/osquery/public/packs/form/index.tsx b/x-pack/plugins/osquery/public/packs/form/index.tsx index 262b57f7d2ec8..5b0d3c19888ec 100644 --- a/x-pack/plugins/osquery/public/packs/form/index.tsx +++ b/x-pack/plugins/osquery/public/packs/form/index.tsx @@ -19,7 +19,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { OsqueryManagerPackagePolicy } from '../../../common/types'; +import type { OsqueryManagerPackagePolicy } from '../../../common/types'; import { Form, useForm, diff --git a/x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx b/x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx index 4b4420ec8bfd5..e91ed3bce4ea0 100644 --- a/x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx +++ b/x-pack/plugins/osquery/public/packs/form/policy_id_combobox_field.tsx @@ -7,12 +7,14 @@ import { reduce } from 'lodash'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiFlexGroup, EuiFlexItem, EuiTextColor, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiTextColor } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; -import { ComboBoxField, FieldHook } from '../../shared_imports'; +import type { GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; +import type { FieldHook } from '../../shared_imports'; +import { ComboBoxField } from '../../shared_imports'; // Custom styling for drop down list items due to: // 1) the max-width and overflow properties is added to prevent long agent policy diff --git a/x-pack/plugins/osquery/public/packs/form/queries_field.tsx b/x-pack/plugins/osquery/public/packs/form/queries_field.tsx index 631f63d5f8038..909a0db2f558e 100644 --- a/x-pack/plugins/osquery/public/packs/form/queries_field.tsx +++ b/x-pack/plugins/osquery/public/packs/form/queries_field.tsx @@ -6,13 +6,14 @@ */ import { isEmpty, findIndex, forEach, pullAt, pullAllBy, pickBy } from 'lodash'; -import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiSpacer, EuiComboBoxProps } from '@elastic/eui'; +import type { EuiComboBoxProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiSpacer } from '@elastic/eui'; import { produce } from 'immer'; import React, { useCallback, useMemo, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { OsqueryManagerPackagePolicyInputStream } from '../../../common/types'; -import { FieldHook } from '../../shared_imports'; +import type { OsqueryManagerPackagePolicyInputStream } from '../../../common/types'; +import type { FieldHook } from '../../shared_imports'; import { PackQueriesTable } from '../pack_queries_table'; import { QueryFlyout } from '../queries/query_flyout'; import { OsqueryPackUploader } from './pack_uploader'; diff --git a/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx b/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx index 2dd2a0b85d590..5b7eb30d54b34 100644 --- a/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx +++ b/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx @@ -32,10 +32,10 @@ import type { } from '@kbn/lens-plugin/public'; import { DOCUMENT_FIELD_NAME as RECORDS_FIELD } from '@kbn/lens-plugin/common/constants'; import { FilterStateStore } from '@kbn/es-query'; -import { DataView } from '@kbn/data-plugin/common'; +import type { DataView } from '@kbn/data-plugin/common'; import { removeMultilines } from '../../common/utils/build_query/remove_multilines'; import { useKibana } from '../common/lib/kibana'; -import { OsqueryManagerPackagePolicyInputStream } from '../../common/types'; +import type { OsqueryManagerPackagePolicyInputStream } from '../../common/types'; import { ScheduledQueryErrorsTable } from './scheduled_query_errors_table'; import { usePackQueryLastResults } from './use_pack_query_last_results'; import { usePackQueryErrors } from './use_pack_query_errors'; diff --git a/x-pack/plugins/osquery/public/packs/pack_queries_table.tsx b/x-pack/plugins/osquery/public/packs/pack_queries_table.tsx index 16653e3058b08..d042e850a3861 100644 --- a/x-pack/plugins/osquery/public/packs/pack_queries_table.tsx +++ b/x-pack/plugins/osquery/public/packs/pack_queries_table.tsx @@ -11,7 +11,7 @@ import { EuiBasicTable, EuiCodeBlock, EuiButtonIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { PlatformIcons } from './queries/platforms'; -import { OsqueryManagerPackagePolicyInputStream } from '../../common/types'; +import type { OsqueryManagerPackagePolicyInputStream } from '../../common/types'; export interface PackQueriesTableProps { data: OsqueryManagerPackagePolicyInputStream[]; diff --git a/x-pack/plugins/osquery/public/packs/packs_table.tsx b/x-pack/plugins/osquery/public/packs/packs_table.tsx index b64d999b4ecf6..9c37056534b4e 100644 --- a/x-pack/plugins/osquery/public/packs/packs_table.tsx +++ b/x-pack/plugins/osquery/public/packs/packs_table.tsx @@ -5,12 +5,12 @@ * 2.0. */ +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiButtonEmpty, EuiText, EuiPopover, EuiInMemoryTable, - EuiBasicTableColumn, EuiLink, EuiToolTip, EuiLoadingContent, @@ -24,7 +24,7 @@ import { useRouterNavigate } from '../common/lib/kibana'; import { usePacks } from './use_packs'; import { ActiveStateSwitch } from './active_state_switch'; import { AgentsPolicyLink } from '../agent_policies/agents_policy_link'; -import { PackSavedObject } from './types'; +import type { PackSavedObject } from './types'; const UpdatedBy = styled.span` white-space: nowrap; diff --git a/x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx b/x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx index 989e08f64d274..87008f3d943ad 100644 --- a/x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx +++ b/x-pack/plugins/osquery/public/packs/queries/ecs_mapping_editor_field.tsx @@ -19,6 +19,7 @@ import { get, } from 'lodash'; import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; +import type { EuiComboBoxProps, EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiFormLabel, EuiButtonIcon, @@ -26,8 +27,6 @@ import { EuiFlexItem, EuiFormRow, EuiComboBox, - EuiComboBoxProps, - EuiComboBoxOptionOption, EuiSpacer, EuiTitle, EuiText, @@ -45,19 +44,16 @@ import ECSSchema from '../../common/schemas/ecs/v8.2.0.json'; import osquerySchema from '../../common/schemas/osquery/v5.2.2.json'; import { FieldIcon } from '../../common/lib/kibana'; +import type { FieldHook, ValidationFuncArg, ArrayItem, FormArrayField } from '../../shared_imports'; import { FIELD_TYPES, - FieldHook, getFieldValidityAndErrorMessage, useFormData, Field, getUseField, fieldValidators, - ValidationFuncArg, UseMultiFields, UseArray, - ArrayItem, - FormArrayField, useFormContext, } from '../../shared_imports'; import { OsqueryIcon } from '../../components/osquery_icon'; diff --git a/x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx b/x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx index c9e29abb34fea..1aa83a39f12b7 100644 --- a/x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx +++ b/x-pack/plugins/osquery/public/packs/queries/platform_checkbox_group_field.tsx @@ -7,16 +7,12 @@ import { isEmpty, pickBy } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiFormRow, - EuiCheckboxGroup, - EuiCheckboxGroupOption, -} from '@elastic/eui'; +import type { EuiCheckboxGroupOption } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiCheckboxGroup } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../shared_imports'; +import type { FieldHook } from '../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../shared_imports'; import { PlatformIcon } from './platforms/platform_icon'; interface Props { diff --git a/x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx b/x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx index 5c6d2609c44df..31b4cbd81d5c3 100644 --- a/x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx +++ b/x-pack/plugins/osquery/public/packs/queries/query_flyout.tsx @@ -27,7 +27,8 @@ import { CodeEditorField } from '../../saved_queries/form/code_editor_field'; import { Form, getUseField, Field } from '../../shared_imports'; import { PlatformCheckBoxGroupField } from './platform_checkbox_group_field'; import { ALL_OSQUERY_VERSIONS_OPTIONS } from './constants'; -import { UsePackQueryFormProps, PackFormData, usePackQueryForm } from './use_pack_query_form'; +import type { UsePackQueryFormProps, PackFormData } from './use_pack_query_form'; +import { usePackQueryForm } from './use_pack_query_form'; import { SavedQueriesDropdown } from '../../saved_queries/saved_queries_dropdown'; import { ECSMappingEditorField } from './lazy_ecs_mapping_editor_field'; import { useKibana } from '../../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx b/x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx index 41a25bce0405f..1d10b61168cef 100644 --- a/x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx +++ b/x-pack/plugins/osquery/public/packs/queries/use_pack_query_form.tsx @@ -11,7 +11,8 @@ import { produce } from 'immer'; import { useMemo } from 'react'; import { convertECSMappingToObject } from '../../../common/schemas/common/utils'; -import { FormConfig, useForm } from '../../shared_imports'; +import type { FormConfig } from '../../shared_imports'; +import { useForm } from '../../shared_imports'; import { createFormSchema } from './schema'; const FORM_ID = 'editQueryFlyoutForm'; diff --git a/x-pack/plugins/osquery/public/packs/queries/validations.ts b/x-pack/plugins/osquery/public/packs/queries/validations.ts index abc5c2c225fe3..ba8aad28fa17a 100644 --- a/x-pack/plugins/osquery/public/packs/queries/validations.ts +++ b/x-pack/plugins/osquery/public/packs/queries/validations.ts @@ -7,7 +7,8 @@ import { i18n } from '@kbn/i18n'; -import { ValidationConfig, ValidationFunc, fieldValidators } from '../../shared_imports'; +import type { ValidationConfig, ValidationFunc } from '../../shared_imports'; +import { fieldValidators } from '../../shared_imports'; export { queryFieldValidation } from '../../common/validations'; const idPattern = /^[a-zA-Z0-9-_]+$/; diff --git a/x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx b/x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx index 2174c7ce1cc8f..5a9a85fbc94b2 100644 --- a/x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx +++ b/x-pack/plugins/osquery/public/packs/scheduled_query_errors_table.tsx @@ -14,7 +14,7 @@ import { stringify } from 'querystring'; import { useKibana, isModifiedEvent, isLeftClickEvent } from '../common/lib/kibana'; import { AgentIdToName } from '../agents/agent_id_to_name'; import { usePackQueryErrors } from './use_pack_query_errors'; -import { SearchHit } from '../../common/search_strategy'; +import type { SearchHit } from '../../common/search_strategy'; const VIEW_IN_LOGS = i18n.translate( 'xpack.osquery.pack.queriesTable.viewLogsErrorsActionAriaLabel', diff --git a/x-pack/plugins/osquery/public/packs/types.ts b/x-pack/plugins/osquery/public/packs/types.ts index 7b8b23a36629b..fb78eccc86629 100644 --- a/x-pack/plugins/osquery/public/packs/types.ts +++ b/x-pack/plugins/osquery/public/packs/types.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { SavedObject } from '@kbn/core/public'; +import type { SavedObject } from '@kbn/core/public'; export interface IQueryPayload { attributes?: { diff --git a/x-pack/plugins/osquery/public/packs/use_create_pack.ts b/x-pack/plugins/osquery/public/packs/use_create_pack.ts index a926730ca9f23..7af682a2ff872 100644 --- a/x-pack/plugins/osquery/public/packs/use_create_pack.ts +++ b/x-pack/plugins/osquery/public/packs/use_create_pack.ts @@ -13,7 +13,7 @@ import { PLUGIN_ID } from '../../common'; import { pagePathGetters } from '../common/page_paths'; import { PACKS_ID } from './constants'; import { useErrorToast } from '../common/hooks/use_error_toast'; -import { IQueryPayload } from './types'; +import type { IQueryPayload } from './types'; interface UseCreatePackProps { withRedirect?: boolean; diff --git a/x-pack/plugins/osquery/public/packs/use_pack.ts b/x-pack/plugins/osquery/public/packs/use_pack.ts index fb9d92dec81b2..e57b232d0ea2a 100644 --- a/x-pack/plugins/osquery/public/packs/use_pack.ts +++ b/x-pack/plugins/osquery/public/packs/use_pack.ts @@ -7,9 +7,9 @@ import { useQuery } from 'react-query'; -import { GetOnePackagePolicyResponse } from '@kbn/fleet-plugin/common'; +import type { GetOnePackagePolicyResponse } from '@kbn/fleet-plugin/common'; import { useKibana } from '../common/lib/kibana'; -import { OsqueryManagerPackagePolicy } from '../../common/types'; +import type { OsqueryManagerPackagePolicy } from '../../common/types'; interface UsePack { packId: string; diff --git a/x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts b/x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts index fbb16d011fe62..1f77b5b6f947b 100644 --- a/x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts +++ b/x-pack/plugins/osquery/public/packs/use_pack_query_errors.ts @@ -7,7 +7,8 @@ import { useQuery } from 'react-query'; import { lastValueFrom } from 'rxjs'; -import { DataView, SortDirection } from '@kbn/data-plugin/common'; +import type { DataView } from '@kbn/data-plugin/common'; +import { SortDirection } from '@kbn/data-plugin/common'; import { useKibana } from '../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts b/x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts index a68f361d850fb..b25a8f403fcae 100644 --- a/x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts +++ b/x-pack/plugins/osquery/public/packs/use_pack_query_last_results.ts @@ -8,7 +8,8 @@ import { useQuery } from 'react-query'; import moment from 'moment-timezone'; import { lastValueFrom } from 'rxjs'; -import { DataView, SortDirection } from '@kbn/data-plugin/common'; +import type { DataView } from '@kbn/data-plugin/common'; +import { SortDirection } from '@kbn/data-plugin/common'; import { useKibana } from '../common/lib/kibana'; interface UsePackQueryLastResultsProps { diff --git a/x-pack/plugins/osquery/public/packs/use_update_pack.ts b/x-pack/plugins/osquery/public/packs/use_update_pack.ts index 829db7b081aca..8f7fbedad9288 100644 --- a/x-pack/plugins/osquery/public/packs/use_update_pack.ts +++ b/x-pack/plugins/osquery/public/packs/use_update_pack.ts @@ -13,7 +13,7 @@ import { PLUGIN_ID } from '../../common'; import { pagePathGetters } from '../common/page_paths'; import { PACKS_ID } from './constants'; import { useErrorToast } from '../common/hooks/use_error_toast'; -import { IQueryPayload } from './types'; +import type { IQueryPayload } from './types'; interface UseUpdatePackProps { withRedirect?: boolean; diff --git a/x-pack/plugins/osquery/public/plugin.ts b/x-pack/plugins/osquery/public/plugin.ts index e21defbaa8828..9b8d012e7b084 100644 --- a/x-pack/plugins/osquery/public/plugin.ts +++ b/x-pack/plugins/osquery/public/plugin.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { +import type { AppMountParameters, CoreSetup, Plugin, PluginInitializerContext, CoreStart, - DEFAULT_APP_CATEGORIES, } from '@kbn/core/public'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { +import type { OsqueryPluginSetup, OsqueryPluginStart, StartPlugins, diff --git a/x-pack/plugins/osquery/public/results/results_table.tsx b/x-pack/plugins/osquery/public/results/results_table.tsx index 6196a9d6e201e..2abbefe7e4396 100644 --- a/x-pack/plugins/osquery/public/results/results_table.tsx +++ b/x-pack/plugins/osquery/public/results/results_table.tsx @@ -6,20 +6,22 @@ */ import { get, isEmpty, isArray, isObject, isEqual, keys, map, reduce } from 'lodash/fp'; +import type { + EuiDataGridSorting, + EuiDataGridProps, + EuiDataGridColumn, + EuiDataGridCellValueElementProps, + EuiDataGridControlColumn, +} from '@elastic/eui'; import { EuiCallOut, EuiCode, EuiDataGrid, - EuiDataGridSorting, - EuiDataGridProps, - EuiDataGridColumn, EuiLink, EuiLoadingContent, EuiProgress, EuiSpacer, EuiIconTip, - EuiDataGridCellValueElementProps, - EuiDataGridControlColumn, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -27,7 +29,8 @@ import React, { createContext, useEffect, useState, useCallback, useContext, use import { pagePathGetters } from '@kbn/fleet-plugin/public'; import { useAllResults } from './use_all_results'; -import { Direction, ResultEdges } from '../../common/search_strategy'; +import type { ResultEdges } from '../../common/search_strategy'; +import { Direction } from '../../common/search_strategy'; import { useKibana } from '../common/lib/kibana'; import { useActionResults } from '../action_results/use_action_results'; import { generateEmptyDataMessage } from './translations'; diff --git a/x-pack/plugins/osquery/public/results/use_all_results.ts b/x-pack/plugins/osquery/public/results/use_all_results.ts index aa63e584bccef..cb6889a086e3a 100644 --- a/x-pack/plugins/osquery/public/results/use_all_results.ts +++ b/x-pack/plugins/osquery/public/results/use_all_results.ts @@ -9,22 +9,22 @@ import { useQuery } from 'react-query'; import { i18n } from '@kbn/i18n'; import { lastValueFrom } from 'rxjs'; +import type { InspectResponse } from '../common/helpers'; import { createFilter, generateTablePaginationOptions, getInspectResponse, - InspectResponse, } from '../common/helpers'; import { useKibana } from '../common/lib/kibana'; -import { +import type { ResultEdges, PageInfoPaginated, - OsqueryQueries, ResultsRequestOptions, ResultsStrategyResponse, Direction, } from '../../common/search_strategy'; -import { ESTermQuery } from '../../common/typed_json'; +import { OsqueryQueries } from '../../common/search_strategy'; +import type { ESTermQuery } from '../../common/typed_json'; import { useErrorToast } from '../common/hooks/use_error_toast'; diff --git a/x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx b/x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx index a4d7374d21697..4c82efc1aae2d 100644 --- a/x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx +++ b/x-pack/plugins/osquery/public/routes/packs/list/load_integration_assets.tsx @@ -6,7 +6,8 @@ */ import React, { useCallback } from 'react'; -import { EuiButton, EuiButtonProps } from '@elastic/eui'; +import type { EuiButtonProps } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { useImportAssets } from '../../../assets/use_import_assets'; import { useAssetsStatus } from '../../../assets/use_assets_status'; import { diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx b/x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx index 2fe33261e69d9..19f5dbc997a9e 100644 --- a/x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx +++ b/x-pack/plugins/osquery/public/routes/saved_queries/list/index.tsx @@ -6,6 +6,7 @@ */ import moment from 'moment-timezone'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiInMemoryTable, EuiButton, @@ -13,7 +14,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, - EuiBasicTableColumn, EuiToolTip, } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; @@ -21,8 +21,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useHistory } from 'react-router-dom'; -import { SavedObject } from '@kbn/core/public'; -import { ECSMapping } from '../../../../common/schemas/common'; +import type { SavedObject } from '@kbn/core/public'; +import type { ECSMapping } from '../../../../common/schemas/common'; import { WithHeaderLayout } from '../../../components/layouts'; import { useBreadcrumbs } from '../../../common/hooks/use_breadcrumbs'; import { useKibana, useRouterNavigate } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx b/x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx index 441960e1c2c98..de9d62fe1406c 100644 --- a/x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx +++ b/x-pack/plugins/osquery/public/saved_queries/form/code_editor_field.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { OsquerySchemaLink } from '../../components/osquery_schema_link'; import { OsqueryEditor } from '../../editor'; -import { FieldHook } from '../../shared_imports'; +import type { FieldHook } from '../../shared_imports'; const StyledEuiCodeBlock = styled(EuiCodeBlock)` min-height: 100px; diff --git a/x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx b/x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx index a1350eceff89c..cfa9b0c714827 100644 --- a/x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx +++ b/x-pack/plugins/osquery/public/saved_queries/form/use_saved_query_form.tsx @@ -13,7 +13,7 @@ import { useMemo } from 'react'; import { convertECSMappingToObject } from '../../../common/schemas/common/utils'; import { useForm } from '../../shared_imports'; import { createFormSchema } from '../../packs/queries/schema'; -import { PackFormData } from '../../packs/queries/use_pack_query_form'; +import type { PackFormData } from '../../packs/queries/use_pack_query_form'; import { useSavedQueries } from '../use_saved_queries'; const SAVED_QUERY_FORM_ID = 'savedQueryForm'; diff --git a/x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx b/x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx index 6722ade12ad16..9b15b193d8803 100644 --- a/x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx +++ b/x-pack/plugins/osquery/public/saved_queries/saved_queries_dropdown.tsx @@ -8,7 +8,7 @@ import { find } from 'lodash/fp'; import { EuiCodeBlock, EuiFormRow, EuiComboBox, EuiTextColor } from '@elastic/eui'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { SimpleSavedObject } from '@kbn/core/public'; +import type { SimpleSavedObject } from '@kbn/core/public'; import styled from 'styled-components'; import { QUERIES_DROPDOWN_LABEL, QUERIES_DROPDOWN_SEARCH_FIELD_LABEL } from './constants'; import { OsquerySchemaLink } from '../components/osquery_schema_link'; diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx index 01285ed69c5d0..3cffdbde50dd1 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx @@ -8,7 +8,7 @@ import { EuiErrorBoundary, EuiLoadingContent, EuiEmptyPrompt, EuiCode } from '@elastic/eui'; import React, { useMemo } from 'react'; import { QueryClientProvider } from 'react-query'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { AGENT_STATUS_ERROR, EMPTY_PROMPT, @@ -23,7 +23,7 @@ import { queryClient } from '../../query_client'; import { OsqueryIcon } from '../../components/osquery_icon'; import { KibanaThemeProvider } from '../../shared_imports'; import { useIsOsqueryAvailable } from './use_is_osquery_available'; -import { StartPlugins } from '../../types'; +import type { StartPlugins } from '../../types'; interface OsqueryActionProps { agentId?: string; diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available.ts b/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available.ts index 4fa52dcb75f01..452d1f4b24567 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available.ts +++ b/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { find } from 'lodash'; -import { AgentStatus } from '@kbn/fleet-plugin/common'; +import type { AgentStatus } from '@kbn/fleet-plugin/common'; import { useAgentDetails } from '../../agents/use_agent_details'; import { useAgentPolicy } from '../../agent_policies'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx index e871e185b830f..6b1a8cb0b4b0c 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_action/use_is_osquery_available_simple.tsx @@ -8,7 +8,7 @@ import { useEffect, useState } from 'react'; import { find } from 'lodash'; -import { AgentPolicy, FleetServerAgent, NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import type { AgentPolicy, FleetServerAgent, NewPackagePolicy } from '@kbn/fleet-plugin/common'; import { useKibana } from '../../common/lib/kibana'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; diff --git a/x-pack/plugins/osquery/public/types.ts b/x-pack/plugins/osquery/public/types.ts index 8679f4fa9373f..69c4befec1b6c 100644 --- a/x-pack/plugins/osquery/public/types.ts +++ b/x-pack/plugins/osquery/public/types.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { DiscoverStart } from '@kbn/discover-plugin/public'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { FleetStart } from '@kbn/fleet-plugin/public'; -import { LensPublicStart } from '@kbn/lens-plugin/public'; -import { SecurityPluginStart } from '@kbn/security-plugin/public'; -import { CoreStart } from '@kbn/core/public'; -import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; -import { +import type { DiscoverStart } from '@kbn/discover-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { FleetStart } from '@kbn/fleet-plugin/public'; +import type { LensPublicStart } from '@kbn/lens-plugin/public'; +import type { SecurityPluginStart } from '@kbn/security-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; +import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; +import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import { getLazyOsqueryAction } from './shared_components'; +import type { getLazyOsqueryAction } from './shared_components'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface OsqueryPluginSetup {} diff --git a/x-pack/plugins/osquery/server/common/types.ts b/x-pack/plugins/osquery/server/common/types.ts index 30e504e10996e..e7f1cf4e15320 100644 --- a/x-pack/plugins/osquery/server/common/types.ts +++ b/x-pack/plugins/osquery/server/common/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObject } from '@kbn/core/server'; +import type { SavedObject } from '@kbn/core/server'; export interface IQueryPayload { attributes?: { diff --git a/x-pack/plugins/osquery/server/config.ts b/x-pack/plugins/osquery/server/config.ts index 88bdc368a0bba..d00e351bae561 100644 --- a/x-pack/plugins/osquery/server/config.ts +++ b/x-pack/plugins/osquery/server/config.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { TypeOf, schema } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; export const ConfigSchema = schema.object({ actionEnabled: schema.boolean({ defaultValue: false }), diff --git a/x-pack/plugins/osquery/server/create_config.ts b/x-pack/plugins/osquery/server/create_config.ts index cf07e739ded29..417ee77d249cd 100644 --- a/x-pack/plugins/osquery/server/create_config.ts +++ b/x-pack/plugins/osquery/server/create_config.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { PluginInitializerContext } from '@kbn/core/server'; +import type { PluginInitializerContext } from '@kbn/core/server'; -import { ConfigType } from './config'; +import type { ConfigType } from './config'; export const createConfig = (context: PluginInitializerContext): Readonly => context.config.get(); diff --git a/x-pack/plugins/osquery/server/index.ts b/x-pack/plugins/osquery/server/index.ts index 7b47aec4c6caa..6530e3c40d67d 100644 --- a/x-pack/plugins/osquery/server/index.ts +++ b/x-pack/plugins/osquery/server/index.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; +import type { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; import { OsqueryPlugin } from './plugin'; -import { ConfigSchema, ConfigType } from './config'; +import type { ConfigType } from './config'; +import { ConfigSchema } from './config'; export const config: PluginConfigDescriptor = { schema: ConfigSchema, diff --git a/x-pack/plugins/osquery/server/lib/fleet_integration.ts b/x-pack/plugins/osquery/server/lib/fleet_integration.ts index b0cfcbd32a029..6eac2b2efd948 100644 --- a/x-pack/plugins/osquery/server/lib/fleet_integration.ts +++ b/x-pack/plugins/osquery/server/lib/fleet_integration.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SavedObjectReference, SavedObjectsClient } from '@kbn/core/server'; +import type { SavedObjectReference, SavedObjectsClient } from '@kbn/core/server'; import { filter, map } from 'lodash'; -import { PostPackagePolicyDeleteCallback } from '@kbn/fleet-plugin/server'; +import type { PostPackagePolicyDeleteCallback } from '@kbn/fleet-plugin/server'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { packSavedObjectType } from '../../common/types'; import { OSQUERY_INTEGRATION_NAME } from '../../common'; diff --git a/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts b/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts index a7191712f8dc7..6078f418026ed 100644 --- a/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts +++ b/x-pack/plugins/osquery/server/lib/osquery_app_context_services.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { CoreSetup, Logger, LoggerFactory } from '@kbn/core/server'; -import { SecurityPluginStart } from '@kbn/security-plugin/server'; -import { +import type { CoreSetup, Logger, LoggerFactory } from '@kbn/core/server'; +import type { SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { AgentService, FleetStartContract, PackageService, AgentPolicyServiceInterface, PackagePolicyServiceInterface, } from '@kbn/fleet-plugin/server'; -import { ConfigType } from '../config'; -import { TelemetryEventsSender } from './telemetry/sender'; +import type { ConfigType } from '../config'; +import type { TelemetryEventsSender } from './telemetry/sender'; export type OsqueryAppContextServiceStartContract = Partial< Pick< diff --git a/x-pack/plugins/osquery/server/lib/parse_agent_groups.ts b/x-pack/plugins/osquery/server/lib/parse_agent_groups.ts index b586ef309b202..ec028a6c4dbd9 100644 --- a/x-pack/plugins/osquery/server/lib/parse_agent_groups.ts +++ b/x-pack/plugins/osquery/server/lib/parse_agent_groups.ts @@ -9,7 +9,7 @@ import { uniq } from 'lodash'; import type { SavedObjectsClientContract } from '@kbn/core/server'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { OSQUERY_INTEGRATION_NAME } from '../../common'; -import { OsqueryAppContext } from './osquery_app_context_services'; +import type { OsqueryAppContext } from './osquery_app_context_services'; export interface AgentSelection { agents: string[]; diff --git a/x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts b/x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts index cbf94bb2e5250..0031d887df8db 100644 --- a/x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts +++ b/x-pack/plugins/osquery/server/lib/saved_query/saved_object_mappings.ts @@ -6,7 +6,7 @@ */ import { produce } from 'immer'; -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { savedQuerySavedObjectType, packSavedObjectType, diff --git a/x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts b/x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts index e5814e6db55ee..6d15c981f2095 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/__mocks__/index.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { ConcreteTaskInstance, TaskStatus } from '@kbn/task-manager-plugin/server'; -import { TelemetryEventsSender } from '../sender'; -import { TelemetryReceiver } from '../receiver'; -import { OsqueryTelemetryTaskConfig } from '../task'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; +import type { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server'; +import { TaskStatus } from '@kbn/task-manager-plugin/server'; +import type { TelemetryEventsSender } from '../sender'; +import type { TelemetryReceiver } from '../receiver'; +import type { OsqueryTelemetryTaskConfig } from '../task'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; export const createMockTelemetryEventsSender = ( enableTelemetry?: boolean diff --git a/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts b/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts index 3e4f957b29cef..97db8541e4004 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { SavedObjectsFindResponse } from '@kbn/core/server'; +import type { SavedObjectsFindResponse } from '@kbn/core/server'; import { copyAllowlistedFields, packEventFields, savedQueryEventFields } from './filters'; import type { ESClusterInfo, ESLicense, ListTemplate, TelemetryEvent } from './types'; diff --git a/x-pack/plugins/osquery/server/lib/telemetry/receiver.ts b/x-pack/plugins/osquery/server/lib/telemetry/receiver.ts index 393f6b502c2a9..a8b4315ec1d23 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/receiver.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/receiver.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { +import type { Logger, CoreStart, ElasticsearchClient, SavedObjectsClientContract, } from '@kbn/core/server'; -import { AgentClient, AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { AgentClient, AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server'; import { packSavedObjectType, savedQuerySavedObjectType } from '../../../common/types'; import type { ESLicense, ESClusterInfo } from './types'; -import { OsqueryAppContextService } from '../osquery_app_context_services'; +import type { OsqueryAppContextService } from '../osquery_app_context_services'; export class TelemetryReceiver { private readonly logger: Logger; diff --git a/x-pack/plugins/osquery/server/lib/telemetry/sender.ts b/x-pack/plugins/osquery/server/lib/telemetry/sender.ts index ef1d9c9dff1ca..f45ea6f317c71 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/sender.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/sender.ts @@ -9,19 +9,20 @@ import axios from 'axios'; import { URL } from 'url'; import { transformDataToNdjson } from '@kbn/securitysolution-utils'; -import { Logger } from '@kbn/core/server'; -import { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import type { TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { TelemetryReceiver } from './receiver'; +import type { TelemetryReceiver } from './receiver'; import { createTelemetryTaskConfigs } from './tasks'; import { createUsageCounterLabel } from './helpers'; import type { TelemetryEvent } from './types'; import { TELEMETRY_MAX_BUFFER_SIZE } from './constants'; -import { OsqueryTelemetryTask, OsqueryTelemetryTaskConfig } from './task'; +import type { OsqueryTelemetryTaskConfig } from './task'; +import { OsqueryTelemetryTask } from './task'; const usageLabelPrefix: string[] = ['osquery_telemetry', 'sender']; diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task.test.ts b/x-pack/plugins/osquery/server/lib/telemetry/task.test.ts index 9af355a2fd00a..5f4d2726e1ad1 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/task.test.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/task.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import { SuccessfulRunResult } from '@kbn/task-manager-plugin/server/task'; +import type { SuccessfulRunResult } from '@kbn/task-manager-plugin/server/task'; import { OsqueryTelemetryTask } from './task'; import { createMockTaskInstance, diff --git a/x-pack/plugins/osquery/server/lib/telemetry/task.ts b/x-pack/plugins/osquery/server/lib/telemetry/task.ts index 30ce7c8ce925a..ff66327871551 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/task.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/task.ts @@ -6,14 +6,14 @@ */ import moment from 'moment'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { ConcreteTaskInstance, TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { TelemetryReceiver } from './receiver'; -import { TelemetryEventsSender } from './sender'; +import type { TelemetryReceiver } from './receiver'; +import type { TelemetryEventsSender } from './sender'; export interface OsqueryTelemetryTaskConfig { type: string; diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts b/x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts index eb0d166c19d41..6ca7814daf401 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/tasks/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { OsqueryTelemetryTaskConfig } from '../task'; +import type { OsqueryTelemetryTaskConfig } from '../task'; import { createTelemetryPacksTaskConfig } from './packs'; import { createTelemetrySavedQueriesTaskConfig } from './saved_queries'; diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts b/x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts index fdc4ce088b288..1640b412bf575 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/tasks/packs.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { TELEMETRY_CHANNEL_PACKS } from '../constants'; import { templatePacks } from '../helpers'; -import { TelemetryEventsSender } from '../sender'; -import { TelemetryReceiver } from '../receiver'; +import type { TelemetryEventsSender } from '../sender'; +import type { TelemetryReceiver } from '../receiver'; import type { ESClusterInfo, ESLicense } from '../types'; export function createTelemetryPacksTaskConfig() { diff --git a/x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts b/x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts index 86218710ca67a..7834577fecced 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/tasks/saved_queries.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { TELEMETRY_CHANNEL_SAVED_QUERIES } from '../constants'; import { templateSavedQueries } from '../helpers'; -import { TelemetryEventsSender } from '../sender'; -import { TelemetryReceiver } from '../receiver'; +import type { TelemetryEventsSender } from '../sender'; +import type { TelemetryReceiver } from '../receiver'; import type { ESClusterInfo, ESLicense } from '../types'; export function createTelemetrySavedQueriesTaskConfig() { diff --git a/x-pack/plugins/osquery/server/lib/telemetry/types.ts b/x-pack/plugins/osquery/server/lib/telemetry/types.ts index d7ba5fa34cf09..e49a31e48c00d 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/types.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/types.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; type BaseSearchTypes = string | number | boolean | object; export type SearchTypes = BaseSearchTypes | BaseSearchTypes[] | undefined; diff --git a/x-pack/plugins/osquery/server/plugin.ts b/x-pack/plugins/osquery/server/plugin.ts index 93646ab40137e..fd5ae2eca6005 100644 --- a/x-pack/plugins/osquery/server/plugin.ts +++ b/x-pack/plugins/osquery/server/plugin.ts @@ -6,25 +6,25 @@ */ import { i18n } from '@kbn/i18n'; -import { +import type { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger, - SavedObjectsClient, - DEFAULT_APP_CATEGORIES, } from '@kbn/core/server'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import { SavedObjectsClient, DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { createConfig } from './create_config'; -import { OsqueryPluginSetup, OsqueryPluginStart, SetupPlugins, StartPlugins } from './types'; +import type { OsqueryPluginSetup, OsqueryPluginStart, SetupPlugins, StartPlugins } from './types'; import { defineRoutes } from './routes'; import { osquerySearchStrategyProvider } from './search_strategy/osquery'; import { initSavedObjects } from './saved_objects'; import { initUsageCollectors } from './usage'; -import { OsqueryAppContext, OsqueryAppContextService } from './lib/osquery_app_context_services'; -import { ConfigType } from './config'; +import type { OsqueryAppContext } from './lib/osquery_app_context_services'; +import { OsqueryAppContextService } from './lib/osquery_app_context_services'; +import type { ConfigType } from './config'; import { packSavedObjectType, packAssetSavedObjectType, diff --git a/x-pack/plugins/osquery/server/routes/action/create_action_route.ts b/x-pack/plugins/osquery/server/routes/action/create_action_route.ts index a67b6ee95b9d3..8534c29144822 100644 --- a/x-pack/plugins/osquery/server/routes/action/create_action_route.ts +++ b/x-pack/plugins/osquery/server/routes/action/create_action_route.ts @@ -9,15 +9,14 @@ import { pickBy, isEmpty } from 'lodash'; import uuid from 'uuid'; import moment from 'moment-timezone'; -import { IRouter } from '@kbn/core/server'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { IRouter } from '@kbn/core/server'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; -import { parseAgentSelection, AgentSelection } from '../../lib/parse_agent_groups'; +import type { AgentSelection } from '../../lib/parse_agent_groups'; +import { parseAgentSelection } from '../../lib/parse_agent_groups'; import { buildRouteValidation } from '../../utils/build_validation/route_validation'; -import { - createActionRequestBodySchema, - CreateActionRequestBodySchema, -} from '../../../common/schemas/routes/action/create_action_request_body_schema'; +import type { CreateActionRequestBodySchema } from '../../../common/schemas/routes/action/create_action_request_body_schema'; +import { createActionRequestBodySchema } from '../../../common/schemas/routes/action/create_action_request_body_schema'; import { incrementCount } from '../usage'; import { getInternalSavedObjectsClient } from '../../usage/collector'; diff --git a/x-pack/plugins/osquery/server/routes/action/index.ts b/x-pack/plugins/osquery/server/routes/action/index.ts index 92793aeff44f1..81b873d2f0456 100644 --- a/x-pack/plugins/osquery/server/routes/action/index.ts +++ b/x-pack/plugins/osquery/server/routes/action/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { createActionRoute } from './create_action_route'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const initActionRoutes = (router: IRouter, context: OsqueryAppContext) => { createActionRoute(router, context); diff --git a/x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts b/x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts index 2b8c8b0de23d5..c40e1488ca11e 100644 --- a/x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts +++ b/x-pack/plugins/osquery/server/routes/asset/get_assets_status_route.ts @@ -8,12 +8,12 @@ import { filter } from 'lodash/fp'; import { schema } from '@kbn/config-schema'; import { asyncForEach } from '@kbn/std'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; -import { KibanaAssetReference } from '@kbn/fleet-plugin/common'; +import type { KibanaAssetReference } from '@kbn/fleet-plugin/common'; import { packAssetSavedObjectType, packSavedObjectType } from '../../../common/types'; import { PLUGIN_ID, OSQUERY_INTEGRATION_NAME } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const getAssetsStatusRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.get( diff --git a/x-pack/plugins/osquery/server/routes/asset/index.ts b/x-pack/plugins/osquery/server/routes/asset/index.ts index 72294d8cf4b5b..e34028ebafc44 100644 --- a/x-pack/plugins/osquery/server/routes/asset/index.ts +++ b/x-pack/plugins/osquery/server/routes/asset/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { getAssetsStatusRoute } from './get_assets_status_route'; import { updateAssetsRoute } from './update_assets_route'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const initAssetRoutes = (router: IRouter, context: OsqueryAppContext) => { getAssetsStatusRoute(router, context); diff --git a/x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts b/x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts index 9990c8dbc7b82..5f63a3f615c9e 100644 --- a/x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts +++ b/x-pack/plugins/osquery/server/routes/asset/update_assets_route.ts @@ -11,14 +11,14 @@ import { schema } from '@kbn/config-schema'; import { asyncForEach } from '@kbn/std'; import deepmerge from 'deepmerge'; -import { IRouter } from '@kbn/core/server'; -import { KibanaAssetReference } from '@kbn/fleet-plugin/common'; +import type { IRouter } from '@kbn/core/server'; +import type { KibanaAssetReference } from '@kbn/fleet-plugin/common'; import { packAssetSavedObjectType, packSavedObjectType } from '../../../common/types'; import { combineMerge } from './utils'; import { PLUGIN_ID, OSQUERY_INTEGRATION_NAME } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { convertSOQueriesToPack, convertPackQueriesToSO } from '../pack/utils'; -import { PackSavedObjectAttributes } from '../../common/types'; +import type { PackSavedObjectAttributes } from '../../common/types'; export const updateAssetsRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.post( diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts index 38642bc0bb770..016675b9585d2 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_details.ts @@ -6,9 +6,9 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const getAgentDetailsRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.get( diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts index 4dcaf33200dda..63031e7fb3264 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policies.ts @@ -9,14 +9,11 @@ import pMap from 'p-map'; import { schema } from '@kbn/config-schema'; import { filter, uniq, map } from 'lodash'; import { satisfies } from 'semver'; -import { - GetAgentPoliciesResponseItem, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, - PackagePolicy, -} from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { GetAgentPoliciesResponseItem, PackagePolicy } from '@kbn/fleet-plugin/common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import type { IRouter } from '@kbn/core/server'; import { OSQUERY_INTEGRATION_NAME, PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { getInternalSavedObjectsClient } from '../../usage/collector'; export const getAgentPoliciesRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts index 3532f8352cd76..aace36dc48e1c 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_policy.ts @@ -6,9 +6,9 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { getInternalSavedObjectsClient } from '../../usage/collector'; export const getAgentPolicyRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts index 52c35cfe669e1..f59a2f38d6c86 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agent_status_for_agent_policy.ts @@ -6,10 +6,10 @@ */ import { schema } from '@kbn/config-schema'; -import { GetAgentStatusResponse } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { GetAgentStatusResponse } from '@kbn/fleet-plugin/common'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const getAgentStatusForAgentPolicyRoute = ( router: IRouter, diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts index c742e6abdde84..7f8f472ba578e 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_agents.ts @@ -6,9 +6,9 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const getAgentsRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.get( diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts index 255b532558d69..00d86cc058ec3 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/get_package_policies.ts @@ -6,10 +6,10 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { PLUGIN_ID, OSQUERY_INTEGRATION_NAME } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { getInternalSavedObjectsClient } from '../../usage/collector'; export const getPackagePoliciesRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts b/x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts index 394ca5bbcad72..358ea1fc7202c 100644 --- a/x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts +++ b/x-pack/plugins/osquery/server/routes/fleet_wrapper/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { IRouter } from '@kbn/core/server'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { getAgentPoliciesRoute } from './get_agent_policies'; import { getAgentPolicyRoute } from './get_agent_policy'; import { getAgentStatusForAgentPolicyRoute } from './get_agent_status_for_agent_policy'; diff --git a/x-pack/plugins/osquery/server/routes/index.ts b/x-pack/plugins/osquery/server/routes/index.ts index f723fe9dbd9ae..fb2ea12043ecd 100644 --- a/x-pack/plugins/osquery/server/routes/index.ts +++ b/x-pack/plugins/osquery/server/routes/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { initActionRoutes } from './action'; -import { OsqueryAppContext } from '../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../lib/osquery_app_context_services'; import { initSavedQueryRoutes } from './saved_query'; import { initStatusRoutes } from './status'; import { initFleetWrapperRoutes } from './fleet_wrapper'; diff --git a/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts index 67ae97b9af5cd..1c40530bcfd8e 100644 --- a/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts @@ -9,13 +9,13 @@ import moment from 'moment-timezone'; import { has, mapKeys, set, unset, find } from 'lodash'; import { schema } from '@kbn/config-schema'; import { produce } from 'immer'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, - PackagePolicy, } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { IRouter } from '@kbn/core/server'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; import { PLUGIN_ID } from '../../../common'; import { packSavedObjectType } from '../../../common/types'; diff --git a/x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts index 9fc8713348c14..c1d0b7c5ce967 100644 --- a/x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/delete_pack_route.ts @@ -9,12 +9,12 @@ import { has, filter, unset } from 'lodash'; import { produce } from 'immer'; import { schema } from '@kbn/config-schema'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; import { PLUGIN_ID } from '../../../common'; import { packSavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const deletePackRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.delete( diff --git a/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts index b9e2326d941b9..800c5201539c5 100644 --- a/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts @@ -9,11 +9,11 @@ import { filter, map } from 'lodash'; import { schema } from '@kbn/config-schema'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { packSavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { PLUGIN_ID } from '../../../common'; -import { PackSavedObjectAttributes } from '../../common/types'; +import type { PackSavedObjectAttributes } from '../../common/types'; // eslint-disable-next-line @typescript-eslint/no-unused-vars export const findPackRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/pack/index.ts b/x-pack/plugins/osquery/server/routes/pack/index.ts index 0af02dd9694f5..7656c954c10ae 100644 --- a/x-pack/plugins/osquery/server/routes/pack/index.ts +++ b/x-pack/plugins/osquery/server/routes/pack/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { IRouter } from '@kbn/core/server'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { createPackRoute } from './create_pack_route'; import { deletePackRoute } from './delete_pack_route'; diff --git a/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts index bd9f27a569af8..63c605549f3a7 100644 --- a/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts @@ -8,12 +8,12 @@ import { filter, map } from 'lodash'; import { schema } from '@kbn/config-schema'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; -import { PackSavedObjectAttributes } from '../../common/types'; +import type { IRouter } from '@kbn/core/server'; +import type { PackSavedObjectAttributes } from '../../common/types'; import { PLUGIN_ID } from '../../../common'; import { packSavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { convertSOQueriesToPack } from './utils'; // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts index cb79165f3dca1..3a22de6b9d615 100644 --- a/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts @@ -9,20 +9,20 @@ import moment from 'moment-timezone'; import { set, unset, has, difference, filter, find, map, mapKeys, uniq } from 'lodash'; import { schema } from '@kbn/config-schema'; import { produce } from 'immer'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, - PackagePolicy, } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; import { packSavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { PLUGIN_ID } from '../../../common'; import { convertSOQueriesToPack, convertPackQueriesToSO } from './utils'; import { getInternalSavedObjectsClient } from '../../usage/collector'; -import { PackSavedObjectAttributes } from '../../common/types'; +import type { PackSavedObjectAttributes } from '../../common/types'; export const updatePackRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.put( diff --git a/x-pack/plugins/osquery/server/routes/privileges_check/index.ts b/x-pack/plugins/osquery/server/routes/privileges_check/index.ts index d05b914ade03f..ea91924254bed 100644 --- a/x-pack/plugins/osquery/server/routes/privileges_check/index.ts +++ b/x-pack/plugins/osquery/server/routes/privileges_check/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { privilegesCheckRoute } from './privileges_check_route'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const initPrivilegesCheckRoutes = (router: IRouter, context: OsqueryAppContext) => { privilegesCheckRoute(router, context); diff --git a/x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts b/x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts index 376f131f09b8e..07e5e40ac69fd 100644 --- a/x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts +++ b/x-pack/plugins/osquery/server/routes/privileges_check/privileges_check_route.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { OSQUERY_INTEGRATION_NAME, PLUGIN_ID } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const privilegesCheckRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { router.get( diff --git a/x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts b/x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts index e8bcb9d6bb3b2..d401c17cded4c 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/create_saved_query_route.ts @@ -6,15 +6,13 @@ */ import { isEmpty, pickBy } from 'lodash'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; -import { - createSavedQueryRequestSchema, - CreateSavedQueryRequestSchemaDecoded, -} from '../../../common/schemas/routes/saved_query/create_saved_query_request_schema'; +import type { CreateSavedQueryRequestSchemaDecoded } from '../../../common/schemas/routes/saved_query/create_saved_query_request_schema'; +import { createSavedQueryRequestSchema } from '../../../common/schemas/routes/saved_query/create_saved_query_request_schema'; import { savedQuerySavedObjectType } from '../../../common/types'; import { buildRouteValidation } from '../../utils/build_validation/route_validation'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { convertECSMappingToArray } from '../utils'; export const createSavedQueryRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts b/x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts index a27c4a0953098..3016b15931893 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/delete_saved_query_route.ts @@ -6,10 +6,10 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { PLUGIN_ID } from '../../../common'; import { savedQuerySavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { isSavedQueryPrebuilt } from './utils'; export const deleteSavedQueryRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts b/x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts index abf62ca782daa..d9b94136c6a6d 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/find_saved_query_route.ts @@ -6,9 +6,9 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { PLUGIN_ID } from '../../../common'; import { savedQuerySavedObjectType } from '../../../common/types'; import { convertECSMappingToObject } from '../utils'; diff --git a/x-pack/plugins/osquery/server/routes/saved_query/index.ts b/x-pack/plugins/osquery/server/routes/saved_query/index.ts index 025199dcba6b6..ef6c01cc00f6a 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/index.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/index.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { createSavedQueryRoute } from './create_saved_query_route'; import { deleteSavedQueryRoute } from './delete_saved_query_route'; import { findSavedQueryRoute } from './find_saved_query_route'; import { readSavedQueryRoute } from './read_saved_query_route'; import { updateSavedQueryRoute } from './update_saved_query_route'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const initSavedQueryRoutes = (router: IRouter, context: OsqueryAppContext) => { createSavedQueryRoute(router, context); diff --git a/x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts b/x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts index d1627d220682a..adb56a1fe1160 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/read_saved_query_route.ts @@ -6,9 +6,9 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { isSavedQueryPrebuilt } from './utils'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { PLUGIN_ID } from '../../../common'; import { savedQuerySavedObjectType } from '../../../common/types'; import { convertECSMappingToObject } from '../utils'; diff --git a/x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts b/x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts index e2686868b7eff..e53f92f449902 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/update_saved_query_route.ts @@ -8,11 +8,11 @@ import { filter } from 'lodash'; import { schema } from '@kbn/config-schema'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { isSavedQueryPrebuilt } from './utils'; import { PLUGIN_ID } from '../../../common'; import { savedQuerySavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { convertECSMappingToArray, convertECSMappingToObject } from '../utils'; export const updateSavedQueryRoute = (router: IRouter, osqueryContext: OsqueryAppContext) => { diff --git a/x-pack/plugins/osquery/server/routes/saved_query/utils.ts b/x-pack/plugins/osquery/server/routes/saved_query/utils.ts index e05dcd00e4682..9b38f17699917 100644 --- a/x-pack/plugins/osquery/server/routes/saved_query/utils.ts +++ b/x-pack/plugins/osquery/server/routes/saved_query/utils.ts @@ -6,11 +6,11 @@ */ import { find, reduce } from 'lodash'; -import { KibanaAssetReference } from '@kbn/fleet-plugin/common'; +import type { KibanaAssetReference } from '@kbn/fleet-plugin/common'; import { OSQUERY_INTEGRATION_NAME } from '../../../common'; import { savedQuerySavedObjectType } from '../../../common/types'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; const getInstallation = async (osqueryContext: OsqueryAppContext) => await osqueryContext.service diff --git a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts index 019582addabb5..1bb7436fa1b62 100644 --- a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts +++ b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts @@ -12,10 +12,10 @@ import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, AGENT_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common'; -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { packSavedObjectType } from '../../../common/types'; import { PLUGIN_ID, OSQUERY_INTEGRATION_NAME } from '../../../common'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; import { convertPackQueriesToSO } from '../pack/utils'; import { getInternalSavedObjectsClient } from '../../usage/collector'; diff --git a/x-pack/plugins/osquery/server/routes/status/index.ts b/x-pack/plugins/osquery/server/routes/status/index.ts index 4844547d369fe..59a79737d1662 100644 --- a/x-pack/plugins/osquery/server/routes/status/index.ts +++ b/x-pack/plugins/osquery/server/routes/status/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { createStatusRoute } from './create_status_route'; -import { OsqueryAppContext } from '../../lib/osquery_app_context_services'; +import type { OsqueryAppContext } from '../../lib/osquery_app_context_services'; export const initStatusRoutes = (router: IRouter, context: OsqueryAppContext) => { createStatusRoute(router, context); diff --git a/x-pack/plugins/osquery/server/routes/usage/recorder.test.ts b/x-pack/plugins/osquery/server/routes/usage/recorder.test.ts index 97109a7211d9d..525f0b897dc4a 100644 --- a/x-pack/plugins/osquery/server/routes/usage/recorder.test.ts +++ b/x-pack/plugins/osquery/server/routes/usage/recorder.test.ts @@ -9,14 +9,8 @@ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { usageMetricSavedObjectType } from '../../../common/types'; -import { - CounterValue, - getOrCreateMetricObject, - getRouteMetric, - incrementCount, - RouteString, - routeStrings, -} from './recorder'; +import type { CounterValue, RouteString } from './recorder'; +import { getOrCreateMetricObject, getRouteMetric, incrementCount, routeStrings } from './recorder'; const savedObjectsClient = savedObjectsClientMock.create(); diff --git a/x-pack/plugins/osquery/server/routes/usage/recorder.ts b/x-pack/plugins/osquery/server/routes/usage/recorder.ts index 78e2fdf96c1d7..308166aefb08f 100644 --- a/x-pack/plugins/osquery/server/routes/usage/recorder.ts +++ b/x-pack/plugins/osquery/server/routes/usage/recorder.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { usageMetricSavedObjectType } from '../../../common/types'; -import { LiveQuerySessionUsage } from '../../usage/types'; +import type { LiveQuerySessionUsage } from '../../usage/types'; export interface RouteUsageMetric { queries: number; diff --git a/x-pack/plugins/osquery/server/routes/usage/saved_object_mappings.ts b/x-pack/plugins/osquery/server/routes/usage/saved_object_mappings.ts index b149fa6d3e69f..6b76d2875a958 100644 --- a/x-pack/plugins/osquery/server/routes/usage/saved_object_mappings.ts +++ b/x-pack/plugins/osquery/server/routes/usage/saved_object_mappings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { usageMetricSavedObjectType } from '../../../common/types'; diff --git a/x-pack/plugins/osquery/server/saved_objects.ts b/x-pack/plugins/osquery/server/saved_objects.ts index 4281d02c84339..def48b6a8a411 100644 --- a/x-pack/plugins/osquery/server/saved_objects.ts +++ b/x-pack/plugins/osquery/server/saved_objects.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreSetup } from '@kbn/core/server'; +import type { CoreSetup } from '@kbn/core/server'; import { savedQueryType, packType, packAssetType } from './lib/saved_query/saved_object_mappings'; import { usageMetricType } from './routes/usage/saved_object_mappings'; diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts index d66d71413b07d..9aa614e7f13c2 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/index.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { ActionsStrategyResponse, ActionsRequestOptions, OsqueryQueries, } from '../../../../../../common/search_strategy/osquery'; import { inspectStringifyObject } from '../../../../../../common/utils/build_query'; -import { OsqueryFactory } from '../../types'; +import type { OsqueryFactory } from '../../types'; import { buildActionsQuery } from './query.all_actions.dsl'; export const allActions: OsqueryFactory = { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts index 1f920d00a13b0..923604c1d060a 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts @@ -7,8 +7,8 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { AgentsRequestOptions } from '../../../../../../common/search_strategy'; +import type { ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { AgentsRequestOptions } from '../../../../../../common/search_strategy'; // import { createQueryFilterClauses } from '../../../../../../common/utils/build_query'; export const buildActionsQuery = ({ diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts index bdef6fb3bf868..59f1d5f56da9a 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/index.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { ActionDetailsStrategyResponse, ActionDetailsRequestOptions, OsqueryQueries, } from '../../../../../../common/search_strategy/osquery'; import { inspectStringifyObject } from '../../../../../../common/utils/build_query'; -import { OsqueryFactory } from '../../types'; +import type { OsqueryFactory } from '../../types'; import { buildActionDetailsQuery } from './query.action_details.dsl'; export const actionDetails: OsqueryFactory = { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts index 3551493baca9c..fb18d1562a668 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { ActionDetailsRequestOptions } from '../../../../../../common/search_strategy'; +import type { ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { ActionDetailsRequestOptions } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../../common/utils/build_query'; export const buildActionDetailsQuery = ({ diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts index b7de47f60e5dd..48596c4ba440f 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/index.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { ActionResultsStrategyResponse, ActionResultsRequestOptions, OsqueryQueries, } from '../../../../../../common/search_strategy/osquery'; import { inspectStringifyObject } from '../../../../../../common/utils/build_query'; -import { OsqueryFactory } from '../../types'; +import type { OsqueryFactory } from '../../types'; import { buildActionResultsQuery } from './query.action_results.dsl'; export const actionResults: OsqueryFactory = { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts index 47f4f814c45a3..9b8b73fd6bc37 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { ActionResultsRequestOptions } from '../../../../../../common/search_strategy'; +import type { ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { ActionResultsRequestOptions } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../../common/utils/build_query'; export const buildActionResultsQuery = ({ diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/index.ts index 194d9eac5d697..0ffe2acacbc22 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/index.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../common/constants'; -import { +import type { AgentsStrategyResponse, AgentsRequestOptions, OsqueryQueries, } from '../../../../../common/search_strategy/osquery'; -import { Agent } from '../../../../../common/shared_imports'; +import type { Agent } from '../../../../../common/shared_imports'; import { inspectStringifyObject } from '../../../../../common/utils/build_query'; -import { OsqueryFactory } from '../types'; +import type { OsqueryFactory } from '../types'; import { buildAgentsQuery } from './query.all_agents.dsl'; export const allAgents: OsqueryFactory = { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts index 45e03f6f5da65..d48b3ddef3110 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { AgentsRequestOptions } from '../../../../../common/search_strategy'; +import type { ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { AgentsRequestOptions } from '../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../common/utils/build_query'; export const buildAgentsQuery = ({ diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts index f53cd492a71c4..d1af1cf36622a 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/index.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { FactoryQueryTypes, OsqueryQueries } from '../../../../common/search_strategy/osquery'; +import type { FactoryQueryTypes } from '../../../../common/search_strategy/osquery'; +import { OsqueryQueries } from '../../../../common/search_strategy/osquery'; import { allActions, actionDetails, actionResults } from './actions'; import { allAgents } from './agents'; import { allResults } from './results'; -import { OsqueryFactory } from './types'; +import type { OsqueryFactory } from './types'; export const osqueryFactory: Record> = { [OsqueryQueries.actions]: allActions, diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts index fa0bdd2899288..ca3f58f911546 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/index.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../common/constants'; -import { +import type { ResultsStrategyResponse, ResultsRequestOptions, OsqueryQueries, } from '../../../../../common/search_strategy/osquery'; import { inspectStringifyObject } from '../../../../../common/utils/build_query'; -import { OsqueryFactory } from '../types'; +import type { OsqueryFactory } from '../types'; import { buildResultsQuery } from './query.all_results.dsl'; export const allResults: OsqueryFactory = { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts index c269789fd56a3..8a33b4b5a8371 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { ISearchRequestParams } from '@kbn/data-plugin/common'; import { OSQUERY_INTEGRATION_NAME } from '../../../../../common'; -import { ResultsRequestOptions } from '../../../../../common/search_strategy'; +import type { ResultsRequestOptions } from '../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../common/utils/build_query'; export const buildResultsQuery = ({ diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts index 2c241583e4aa8..be5aeefa1c48c 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IEsSearchResponse, ISearchRequestParams } from '@kbn/data-plugin/common'; -import { +import type { IEsSearchResponse, ISearchRequestParams } from '@kbn/data-plugin/common'; +import type { FactoryQueryTypes, StrategyRequestType, StrategyResponseType, diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts index 1b96296659092..5ca13d53ff204 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/index.ts @@ -6,15 +6,16 @@ */ import { map, mergeMap } from 'rxjs/operators'; -import { ISearchStrategy, PluginStart, shimHitsTotal } from '@kbn/data-plugin/server'; +import type { ISearchStrategy, PluginStart } from '@kbn/data-plugin/server'; +import { shimHitsTotal } from '@kbn/data-plugin/server'; import { ENHANCED_ES_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; -import { +import type { FactoryQueryTypes, StrategyResponseType, StrategyRequestType, } from '../../../common/search_strategy/osquery'; import { osqueryFactory } from './factory'; -import { OsqueryFactory } from './factory/types'; +import type { OsqueryFactory } from './factory/types'; export const osquerySearchStrategyProvider = ( data: PluginStart diff --git a/x-pack/plugins/osquery/server/types.ts b/x-pack/plugins/osquery/server/types.ts index 05679cb19c56e..d3a95e61c8cdc 100644 --- a/x-pack/plugins/osquery/server/types.ts +++ b/x-pack/plugins/osquery/server/types.ts @@ -15,7 +15,7 @@ import type { FleetStartContract } from '@kbn/fleet-plugin/server'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import type { PluginSetupContract } from '@kbn/features-plugin/server'; import type { SecurityPluginStart } from '@kbn/security-plugin/server'; -import { +import type { TaskManagerSetupContract as TaskManagerPluginSetup, TaskManagerStartContract as TaskManagerPluginStart, } from '@kbn/task-manager-plugin/server'; diff --git a/x-pack/plugins/osquery/server/usage/collector.ts b/x-pack/plugins/osquery/server/usage/collector.ts index c08776b2d7601..f9a68908a1c67 100644 --- a/x-pack/plugins/osquery/server/usage/collector.ts +++ b/x-pack/plugins/osquery/server/usage/collector.ts @@ -5,10 +5,12 @@ * 2.0. */ -import { CoreSetup, SavedObjectsClient } from '@kbn/core/server'; -import { CollectorFetchContext } from '@kbn/usage-collection-plugin/server'; +import type { CoreSetup } from '@kbn/core/server'; +import { SavedObjectsClient } from '@kbn/core/server'; +import type { CollectorFetchContext } from '@kbn/usage-collection-plugin/server'; import { getBeatUsage, getLiveQueryUsage, getPolicyLevelUsage } from './fetchers'; -import { CollectorDependencies, usageSchema, UsageData } from './types'; +import type { CollectorDependencies, UsageData } from './types'; +import { usageSchema } from './types'; export type RegisterCollector = (deps: CollectorDependencies) => void; export const getInternalSavedObjectsClient = async ( diff --git a/x-pack/plugins/osquery/server/usage/fetchers.ts b/x-pack/plugins/osquery/server/usage/fetchers.ts index 737c0160166db..7afb2a6615a20 100644 --- a/x-pack/plugins/osquery/server/usage/fetchers.ts +++ b/x-pack/plugins/osquery/server/usage/fetchers.ts @@ -5,23 +5,20 @@ * 2.0. */ -import { +import type { AggregationsSingleBucketAggregateBase, AggregationsTopHitsAggregate, AggregationsRateAggregate, SearchResponse, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { - ListResult, - PackagePolicy, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, -} from '@kbn/fleet-plugin/common'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ListResult, PackagePolicy } from '@kbn/fleet-plugin/common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { getRouteMetric } from '../routes/usage'; import { OSQUERY_INTEGRATION_NAME } from '../../common'; import { METRICS_INDICES } from './constants'; -import { AgentInfo, BeatMetricsUsage, LiveQueryUsage } from './types'; +import type { AgentInfo, BeatMetricsUsage, LiveQueryUsage } from './types'; interface PolicyLevelUsage { scheduled_queries?: ScheduledQueryUsageMetrics; diff --git a/x-pack/plugins/osquery/server/usage/index.ts b/x-pack/plugins/osquery/server/usage/index.ts index 2982ae92a5bbe..fad6f9616bf41 100644 --- a/x-pack/plugins/osquery/server/usage/index.ts +++ b/x-pack/plugins/osquery/server/usage/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CollectorDependencies } from './types'; +import type { CollectorDependencies } from './types'; import { registerCollector } from './collector'; export type InitUsageCollectors = (deps: CollectorDependencies) => void; diff --git a/x-pack/plugins/osquery/server/usage/types.ts b/x-pack/plugins/osquery/server/usage/types.ts index 9da333599e785..95533255040b6 100644 --- a/x-pack/plugins/osquery/server/usage/types.ts +++ b/x-pack/plugins/osquery/server/usage/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { CoreSetup } from '@kbn/core/server'; -import { MakeSchemaFrom } from '@kbn/usage-collection-plugin/server'; -import { OsqueryAppContext } from '../lib/osquery_app_context_services'; -import { SetupPlugins } from '../types'; +import type { CoreSetup } from '@kbn/core/server'; +import type { MakeSchemaFrom } from '@kbn/usage-collection-plugin/server'; +import type { OsqueryAppContext } from '../lib/osquery_app_context_services'; +import type { SetupPlugins } from '../types'; export type CollectorDependencies = { osqueryContext: OsqueryAppContext; diff --git a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts b/x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts index 6d1dceb482332..65f73e2636a4f 100644 --- a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts +++ b/x-pack/plugins/osquery/server/utils/build_validation/route_validation.test.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { RouteValidationResultFactory } from '@kbn/core/server'; +import type { RouteValidationResultFactory } from '@kbn/core/server'; import { buildRouteValidation, buildRouteValidationWithExcess } from './route_validation'; diff --git a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts b/x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts index 7590bb7bbde05..aaadc2da8a91d 100644 --- a/x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts +++ b/x-pack/plugins/osquery/server/utils/build_validation/route_validation.ts @@ -7,14 +7,15 @@ import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import * as rt from 'io-ts'; +import type * as rt from 'io-ts'; import { formatErrors, exactCheck } from '@kbn/securitysolution-io-ts-utils'; -import { +import type { RouteValidationFunction, RouteValidationResultFactory, RouteValidationError, } from '@kbn/core/server'; -import { excess, GenericIntersectionC } from '../runtime_types'; +import type { GenericIntersectionC } from '../runtime_types'; +import { excess } from '../runtime_types'; type RequestValidationResult = | { diff --git a/x-pack/plugins/security_solution/common/detection_engine/get_query_filter.ts b/x-pack/plugins/security_solution/common/detection_engine/get_query_filter.ts index 326dc88a1ebd6..8219b480bfe5d 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/get_query_filter.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/get_query_filter.ts @@ -5,16 +5,17 @@ * 2.0. */ -import { Language } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Language } from '@kbn/securitysolution-io-ts-alerting-types'; import type { ExceptionListItemSchema, CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { buildExceptionFilter } from '@kbn/securitysolution-list-utils'; -import { Filter, EsQueryConfig, DataViewBase, buildEsQuery } from '@kbn/es-query'; +import type { Filter, EsQueryConfig, DataViewBase } from '@kbn/es-query'; +import { buildEsQuery } from '@kbn/es-query'; -import { ESBoolQuery } from '../typed_json'; -import { Query, Index } from './schemas/common/schemas'; +import type { ESBoolQuery } from '../typed_json'; +import type { Query, Index } from './schemas/common/schemas'; export const getQueryFilter = ( query: Query, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.0.0/index.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.0.0/index.ts index 40f6144b5ac17..e9528b77e213d 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.0.0/index.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.0.0/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ALERT_BUILDING_BLOCK_TYPE, ALERT_REASON, ALERT_RISK_SCORE, @@ -41,16 +41,16 @@ import { TIMESTAMP, } from '@kbn/rule-data-utils'; // TODO: Create and import 8.0.0 versioned ListArray schema -import { ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { ListArray } from '@kbn/securitysolution-io-ts-list-types'; // TODO: Create and import 8.0.0 versioned alerting-types schemas -import { +import type { RiskScoreMapping, SeverityMapping, Threats, Type, } from '@kbn/securitysolution-io-ts-alerting-types'; -import { AlertWithCommonFields800 } from '@kbn/rule-registry-plugin/common/schemas/8.0.0'; -import { +import type { AlertWithCommonFields800 } from '@kbn/rule-registry-plugin/common/schemas/8.0.0'; +import type { ALERT_ANCESTORS, ALERT_DEPTH, ALERT_ORIGINAL_TIME, @@ -70,7 +70,7 @@ import { ALERT_RULE_TIMESTAMP_OVERRIDE, } from '../../../../field_maps/field_names'; // TODO: Create and import 8.0.0 versioned RuleAlertAction type -import { RuleAlertAction, SearchTypes } from '../../../types'; +import type { RuleAlertAction, SearchTypes } from '../../../types'; /* DO NOT MODIFY THIS SCHEMA TO ADD NEW FIELDS. These types represent the alerts that shipped in 8.0.0. Any changes to these types should be bug fixes so the types more accurately represent the alerts from 8.0.0. diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.3.0/index.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.3.0/index.ts index 82306bb9b21e8..96cc39fc95a29 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.3.0/index.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/alerts/8.3.0/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ALERT_BUILDING_BLOCK_TYPE, ALERT_UUID } from '@kbn/rule-data-utils'; -import { AlertWithCommonFields800 } from '@kbn/rule-registry-plugin/common/schemas/8.0.0'; -import { +import type { ALERT_BUILDING_BLOCK_TYPE, ALERT_UUID } from '@kbn/rule-data-utils'; +import type { AlertWithCommonFields800 } from '@kbn/rule-registry-plugin/common/schemas/8.0.0'; +import type { ALERT_GROUP_ID, ALERT_GROUP_INDEX, ALERT_RULE_INDICES, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.mock.ts index 3ae72f8b903d7..d3ed91d19b783 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; export const getAddPrepackagedRulesSchemaMock = (): AddPrepackagedRulesSchema => ({ description: 'some description', diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.test.ts index f8c901b3311df..091ce8bd10fa3 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_schema.test.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - addPrepackagedRulesSchema, - AddPrepackagedRulesSchema, -} from './add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; +import { addPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.test.ts index 5eb7829c16d97..f9fd09d0a956b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; import { addPrepackagedRuleValidateTypeDependents } from './add_prepackaged_rules_type_dependents'; import { getAddPrepackagedRulesSchemaMock } from './add_prepackaged_rules_schema.mock'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.ts index a850259936648..c2595163b83be 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/add_prepackaged_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from './add_prepackaged_rules_schema'; export const validateTimelineId = (rule: AddPrepackagedRulesSchema): string[] => { if (rule.timeline_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_bulk_schema.test.ts index e606e1f77fc2b..5155b593583f9 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_bulk_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_bulk_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { createRulesBulkSchema, CreateRulesBulkSchema } from './create_rules_bulk_schema'; +import type { CreateRulesBulkSchema } from './create_rules_bulk_schema'; +import { createRulesBulkSchema } from './create_rules_bulk_schema'; import { exactCheck, foldLeftRight, formatErrors } from '@kbn/securitysolution-io-ts-utils'; import { getCreateRulesSchemaMock } from './rule_schemas.mock'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.test.ts index b2a6dbfc3e69c..1fecd82cc2708 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.test.ts @@ -6,7 +6,7 @@ */ import { getCreateRulesSchemaMock, getCreateThreatMatchRulesSchemaMock } from './rule_schemas.mock'; -import { CreateRulesSchema } from './rule_schemas'; +import type { CreateRulesSchema } from './rule_schemas'; import { createRuleValidateTypeDependents } from './create_rules_type_dependents'; describe('create_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.ts index c6ee6a1af94b4..c429656d575f8 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CreateRulesSchema } from './rule_schemas'; +import type { CreateRulesSchema } from './rule_schemas'; export const validateTimelineId = (rule: CreateRulesSchema): string[] => { if (rule.timeline_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_signals_migration_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_signals_migration_schema.mock.ts index 04e6a4ab33593..19b409e8eab95 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_signals_migration_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/create_signals_migration_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CreateSignalsMigrationSchema } from './create_signals_migration_schema'; +import type { CreateSignalsMigrationSchema } from './create_signals_migration_schema'; export const getCreateSignalsMigrationSchemaMock = ( index: string = 'signals-index' diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.test.ts index 186f170ad700f..d2b29a5152e96 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.test.ts @@ -5,13 +5,12 @@ * 2.0. */ -import { - exportRulesQuerySchema, - exportRulesSchema, +import type { ExportRulesSchema, ExportRulesQuerySchema, ExportRulesQuerySchemaDecoded, } from './export_rules_schema'; +import { exportRulesQuerySchema, exportRulesSchema } from './export_rules_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts index a83e1c2c0f462..9541d37c78049 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/export_rules_schema.ts @@ -9,7 +9,8 @@ import * as t from 'io-ts'; import { DefaultExportFileName } from '@kbn/securitysolution-io-ts-alerting-types'; import { DefaultStringBooleanFalse } from '@kbn/securitysolution-io-ts-types'; -import { rule_id, FileName, ExcludeExportDetails } from '../common/schemas'; +import type { FileName, ExcludeExportDetails } from '../common/schemas'; +import { rule_id } from '../common/schemas'; const objects = t.array(t.exact(t.type({ rule_id }))); export const exportRulesSchema = t.union([t.exact(t.type({ objects })), t.null]); diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/finalize_signals_migration_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/finalize_signals_migration_schema.mock.ts index 9133623f4e7d8..b6b7a54cd533b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/finalize_signals_migration_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/finalize_signals_migration_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FinalizeSignalsMigrationSchema } from './finalize_signals_migration_schema'; +import type { FinalizeSignalsMigrationSchema } from './finalize_signals_migration_schema'; export const getFinalizeSignalsMigrationSchemaMock = (): FinalizeSignalsMigrationSchema => ({ migration_ids: ['migrationSOIdentifier'], diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rule_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rule_type_dependents.test.ts index b747aab03b7bb..50afe7f970acb 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rule_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rule_type_dependents.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FindRulesSchema } from './find_rules_schema'; +import type { FindRulesSchema } from './find_rules_schema'; import { findRuleValidateTypeDependents } from './find_rules_type_dependents'; describe('find_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.test.ts index cd221c9f0a4b5..41e765c8c268b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.test.ts @@ -8,7 +8,8 @@ import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { FindRulesSchema, findRulesSchema } from './find_rules_schema'; +import type { FindRulesSchema } from './find_rules_schema'; +import { findRulesSchema } from './find_rules_schema'; describe('find_rules_schema', () => { test('empty objects do validate', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts index b04afd14375cc..885fe22b1ccb2 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_schema.ts @@ -8,7 +8,8 @@ import * as t from 'io-ts'; import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; -import { queryFilter, fields, sort_field, sort_order, PerPage, Page } from '../common/schemas'; +import type { PerPage, Page } from '../common/schemas'; +import { queryFilter, fields, sort_field, sort_order } from '../common/schemas'; export const findRulesSchema = t.exact( t.partial({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_type_dependents.ts index 23baab5ecb1e0..f9bd6dc56f104 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/find_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FindRulesSchema } from './find_rules_schema'; +import type { FindRulesSchema } from './find_rules_schema'; export const validateSortOrder = (find: FindRulesSchema): string[] => { if (find.sort_order != null || find.sort_field != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_rule_execution_events_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_rule_execution_events_schema.ts index 07795709aaf90..520f4555fb672 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_rule_execution_events_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_rule_execution_events_schema.ts @@ -10,13 +10,9 @@ import * as t from 'io-ts'; import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; import { DefaultEmptyString, IsoDateString } from '@kbn/securitysolution-io-ts-types'; -import { Either } from 'fp-ts/lib/Either'; -import { - ExecutionLogTableSortColumns, - executionLogTableSortColumns, - ruleExecutionStatus, - RuleExecutionStatus, -} from '../common'; +import type { Either } from 'fp-ts/lib/Either'; +import type { ExecutionLogTableSortColumns, RuleExecutionStatus } from '../common'; +import { executionLogTableSortColumns, ruleExecutionStatus } from '../common'; /** * Types the DefaultStatusFiltersStringArray as: diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_signals_migration_status_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_signals_migration_status_schema.mock.ts index e6afa5126aaa3..0de1cf9ea8456 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_signals_migration_status_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_signals_migration_status_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GetSignalsMigrationStatusSchema } from './get_signals_migration_status_schema'; +import type { GetSignalsMigrationStatusSchema } from './get_signals_migration_status_schema'; export const getSignalsMigrationStatusSchemaMock = (): GetSignalsMigrationStatusSchema => ({ from: 'now-30d', diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.mock.ts index a827852a4166d..c469926104131 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ImportRulesSchema } from './import_rules_schema'; +import type { ImportRulesSchema } from './import_rules_schema'; export const getImportRulesSchemaMock = (ruleId = 'rule-1'): ImportRulesSchema => ({ description: 'some description', diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts index 4386415bc605b..1c119e696e7b7 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_schema.test.ts @@ -8,12 +8,8 @@ import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { - importRulesPayloadSchema, - ImportRulesPayloadSchema, - ImportRulesSchema, - importRulesSchema, -} from './import_rules_schema'; +import type { ImportRulesPayloadSchema, ImportRulesSchema } from './import_rules_schema'; +import { importRulesPayloadSchema, importRulesSchema } from './import_rules_schema'; import { getImportRulesSchemaMock, getImportThreatMatchRulesSchemaMock, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.test.ts index 211f649a218e4..cd7ec37a85edb 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.test.ts @@ -6,7 +6,7 @@ */ import { getImportRulesSchemaMock } from './import_rules_schema.mock'; -import { ImportRulesSchema } from './import_rules_schema'; +import type { ImportRulesSchema } from './import_rules_schema'; import { importRuleValidateTypeDependents } from './import_rules_type_dependents'; describe('import_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.ts index 1b55be7bfda98..bdb025583b404 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/import_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ImportRulesSchema } from './import_rules_schema'; +import type { ImportRulesSchema } from './import_rules_schema'; export const validateTimelineId = (rule: ImportRulesSchema): string[] => { if (rule.timeline_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_bulk_schema.test.ts index 84a3607310caf..1b9b1f92faf2f 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_bulk_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_bulk_schema.test.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { patchRulesBulkSchema, PatchRulesBulkSchema } from './patch_rules_bulk_schema'; +import type { PatchRulesBulkSchema } from './patch_rules_bulk_schema'; +import { patchRulesBulkSchema } from './patch_rules_bulk_schema'; import { exactCheck, formatErrors, foldLeftRight } from '@kbn/securitysolution-io-ts-utils'; -import { PatchRulesSchema } from './patch_rules_schema'; +import type { PatchRulesSchema } from './patch_rules_schema'; // only the basics of testing are here. // see: patch_rules_schema.test.ts for the bulk of the validation tests diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.mock.ts index 2581b6098eff5..1b3dab2e00691 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PatchRulesSchema, ThresholdPatchSchema } from './patch_rules_schema'; +import type { PatchRulesSchema, ThresholdPatchSchema } from './patch_rules_schema'; export const getPatchRulesSchemaMock = (): PatchRulesSchema => ({ description: 'some description', diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.test.ts index 9352d1e008384..2084f11ed4efa 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { patchRulesSchema, PatchRulesSchema } from './patch_rules_schema'; +import type { PatchRulesSchema } from './patch_rules_schema'; +import { patchRulesSchema } from './patch_rules_schema'; import { getPatchRulesSchemaMock } from './patch_rules_schema.mock'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.test.ts index 3e81ad62bf335..abb64ec5522f2 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.test.ts @@ -9,7 +9,7 @@ import { getPatchRulesSchemaMock, getPatchThresholdRulesSchemaMock, } from './patch_rules_schema.mock'; -import { PatchRulesSchema, ThresholdPatchSchema } from './patch_rules_schema'; +import type { PatchRulesSchema, ThresholdPatchSchema } from './patch_rules_schema'; import { patchRuleValidateTypeDependents } from './patch_rules_type_dependents'; describe('patch_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.ts index cdba19f45ca2a..263f28e28ac30 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/patch_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PatchRulesSchema } from './patch_rules_schema'; +import type { PatchRulesSchema } from './patch_rules_schema'; export const validateTimelineId = (rule: PatchRulesSchema): string[] => { if (rule.timeline_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.mock.ts index 4c6bdef3a4e80..b3988568a4765 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.mock.ts @@ -6,7 +6,7 @@ */ import { BulkAction, BulkActionEditType } from '../common/schemas'; -import { PerformBulkActionSchema } from './perform_bulk_action_schema'; +import type { PerformBulkActionSchema } from './perform_bulk_action_schema'; export const getPerformBulkActionSchemaMock = (): PerformBulkActionSchema => ({ query: '', diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.test.ts index 35083052141a4..a1f6122a2ef35 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/perform_bulk_action_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { performBulkActionSchema, PerformBulkActionSchema } from './perform_bulk_action_schema'; +import type { PerformBulkActionSchema } from './perform_bulk_action_schema'; +import { performBulkActionSchema } from './perform_bulk_action_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { left } from 'fp-ts/lib/Either'; import { BulkAction, BulkActionEditType } from '../common/schemas'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.test.ts index fa167090b2f3a..dfbb168f24520 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { queryRulesBulkSchema, QueryRulesBulkSchema } from './query_rules_bulk_schema'; +import type { QueryRulesBulkSchema } from './query_rules_bulk_schema'; +import { queryRulesBulkSchema } from './query_rules_bulk_schema'; import { exactCheck, formatErrors, foldLeftRight } from '@kbn/securitysolution-io-ts-utils'; // only the basics of testing are here. diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.ts index dd9cb80a43239..afa485687043f 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_bulk_schema.ts @@ -7,7 +7,8 @@ import * as t from 'io-ts'; -import { queryRulesSchema, QueryRulesSchemaDecoded } from './query_rules_schema'; +import type { QueryRulesSchemaDecoded } from './query_rules_schema'; +import { queryRulesSchema } from './query_rules_schema'; export const queryRulesBulkSchema = t.array(queryRulesSchema); export type QueryRulesBulkSchema = t.TypeOf; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.test.ts index 566d752a8623e..faccffb1e6864 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { queryRulesSchema, QueryRulesSchema } from './query_rules_schema'; +import type { QueryRulesSchema } from './query_rules_schema'; +import { queryRulesSchema } from './query_rules_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.test.ts index 12f717bce71cd..060fd189a40a9 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryRulesSchema } from './query_rules_schema'; +import type { QueryRulesSchema } from './query_rules_schema'; import { queryRuleValidateTypeDependents } from './query_rules_type_dependents'; describe('query_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.ts index d4806ba764022..a646d0e97f96a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryRulesSchema } from './query_rules_schema'; +import type { QueryRulesSchema } from './query_rules_schema'; export const validateId = (rule: QueryRulesSchema): string[] => { if (rule.id != null && rule.rule_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_signals_index_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_signals_index_schema.test.ts index 65107079c5800..f2c1313f9e592 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_signals_index_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/query_signals_index_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { QuerySignalsSchema, querySignalsSchema } from './query_signals_index_schema'; +import type { QuerySignalsSchema } from './query_signals_index_schema'; +import { querySignalsSchema } from './query_signals_index_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.mock.ts index 994f8dc643425..a8b127563d6aa 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.mock.ts @@ -6,7 +6,7 @@ */ import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../constants'; -import { +import type { MachineLearningCreateSchema, MachineLearningUpdateSchema, QueryCreateSchema, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.test.ts index 4342a37620d78..ad4350b864499 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/rule_schemas.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { createRulesSchema, CreateRulesSchema, SavedQueryCreateSchema } from './rule_schemas'; +import type { CreateRulesSchema, SavedQueryCreateSchema } from './rule_schemas'; +import { createRulesSchema } from './rule_schemas'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.test.ts index 994691ecfa571..ef5353c91213c 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_schema.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { setSignalsStatusSchema, SetSignalsStatusSchema } from './set_signal_status_schema'; +import type { SetSignalsStatusSchema } from './set_signal_status_schema'; +import { setSignalsStatusSchema } from './set_signal_status_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.test.ts index 5bdc6da5409c2..efe5e6cedd303 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.test.ts @@ -6,7 +6,7 @@ */ import { setSignalStatusValidateTypeDependents } from './set_signal_status_type_dependents'; -import { SetSignalsStatusSchema } from './set_signal_status_schema'; +import type { SetSignalsStatusSchema } from './set_signal_status_schema'; describe('update_rules_type_dependents', () => { test('You can have just a "signals_id"', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.ts index 106fd13344d69..38ec66493ea39 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/set_signal_status_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SetSignalsStatusSchema } from './set_signal_status_schema'; +import type { SetSignalsStatusSchema } from './set_signal_status_schema'; export const validateId = (signalStatus: SetSignalsStatusSchema): string[] => { if (signalStatus.signal_ids != null && signalStatus.query != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_bulk_schema.test.ts index c5549913eb05c..416e43ccfa967 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_bulk_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_bulk_schema.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { updateRulesBulkSchema, UpdateRulesBulkSchema } from './update_rules_bulk_schema'; +import type { UpdateRulesBulkSchema } from './update_rules_bulk_schema'; +import { updateRulesBulkSchema } from './update_rules_bulk_schema'; import { exactCheck, formatErrors, foldLeftRight } from '@kbn/securitysolution-io-ts-utils'; import { getUpdateRulesSchemaMock } from './rule_schemas.mock'; -import { UpdateRulesSchema } from './rule_schemas'; +import type { UpdateRulesSchema } from './rule_schemas'; // only the basics of testing are here. // see: update_rules_schema.test.ts for the bulk of the validation tests diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.test.ts index ba7adc90ade43..e2f5024418005 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.test.ts @@ -6,7 +6,7 @@ */ import { getUpdateRulesSchemaMock } from './rule_schemas.mock'; -import { UpdateRulesSchema } from './rule_schemas'; +import type { UpdateRulesSchema } from './rule_schemas'; import { updateRuleValidateTypeDependents } from './update_rules_type_dependents'; describe('update_rules_type_dependents', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.ts index 277b5eb4e2116..518937193cc4f 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/request/update_rules_type_dependents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UpdateRulesSchema } from './rule_schemas'; +import type { UpdateRulesSchema } from './rule_schemas'; export const validateTimelineId = (rule: UpdateRulesSchema): string[] => { if (rule.timeline_id != null) { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.mocks.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.mocks.ts index d435a8b8c9070..06bfa3e973820 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.mocks.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ErrorSchema } from './error_schema'; +import type { ErrorSchema } from './error_schema'; export const getErrorSchemaMock = ( id: string = '819eded6-e9c8-445b-a647-519aea39e063' diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts index 5ef7f80a09a2d..3265eb5bfff3e 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/error_schema.test.ts @@ -8,7 +8,8 @@ import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { errorSchema, ErrorSchema } from './error_schema'; +import type { ErrorSchema } from './error_schema'; +import { errorSchema } from './error_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { getErrorSchemaMock } from './error_schema.mocks'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.mock.ts index b16b29c533d77..9b79238bef6c7 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.mock.ts @@ -5,11 +5,9 @@ * 2.0. */ -import { ExportRulesDetails } from './export_rules_details_schema'; -import { - ExportExceptionDetailsMock, - getExceptionExportDetailsMock, -} from '@kbn/lists-plugin/common/schemas/response/exception_export_details_schema.mock'; +import type { ExportRulesDetails } from './export_rules_details_schema'; +import type { ExportExceptionDetailsMock } from '@kbn/lists-plugin/common/schemas/response/exception_export_details_schema.mock'; +import { getExceptionExportDetailsMock } from '@kbn/lists-plugin/common/schemas/response/exception_export_details_schema.mock'; interface RuleDetailsMock { totalCount?: number; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.test.ts index af0295ee46046..2c84a34b34928 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/export_rules_details_schema.test.ts @@ -20,10 +20,8 @@ import { getOutputDetailsSample, getOutputDetailsSampleWithExceptions, } from './export_rules_details_schema.mock'; -import { - ExportRulesDetails, - exportRulesDetailsWithExceptionsSchema, -} from './export_rules_details_schema'; +import type { ExportRulesDetails } from './export_rules_details_schema'; +import { exportRulesDetailsWithExceptionsSchema } from './export_rules_details_schema'; describe('exportRulesDetailsWithExceptionsSchema', () => { test('it should validate export details response', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/get_installed_integrations_response_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/get_installed_integrations_response_schema.ts index b21a8d1bbd50d..882fc3d81828a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/get_installed_integrations_response_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/get_installed_integrations_response_schema.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InstalledIntegrationArray } from '../common'; +import type { InstalledIntegrationArray } from '../common'; export interface GetInstalledIntegrationsResponse { installed_integrations: InstalledIntegrationArray; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts index 0179c61fbffd4..db1fc33e9d44e 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/import_rules_schema.test.ts @@ -6,10 +6,12 @@ */ import { pipe } from 'fp-ts/lib/pipeable'; -import { left, Either } from 'fp-ts/lib/Either'; -import { ImportRulesSchema, importRulesSchema } from './import_rules_schema'; -import { ErrorSchema } from './error_schema'; -import { Errors } from 'io-ts'; +import type { Either } from 'fp-ts/lib/Either'; +import { left } from 'fp-ts/lib/Either'; +import type { ImportRulesSchema } from './import_rules_schema'; +import { importRulesSchema } from './import_rules_schema'; +import type { ErrorSchema } from './error_schema'; +import type { Errors } from 'io-ts'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; describe('import_rules_schema', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts index fbbc754f597a0..393a071d21b32 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_schema.test.ts @@ -7,10 +7,8 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { - PrePackagedRulesAndTimelinesSchema, - prePackagedRulesAndTimelinesSchema, -} from './prepackaged_rules_schema'; +import type { PrePackagedRulesAndTimelinesSchema } from './prepackaged_rules_schema'; +import { prePackagedRulesAndTimelinesSchema } from './prepackaged_rules_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; describe('prepackaged_rules_schema', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts index de44c7e5e37ad..8997ecadb36b6 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/prepackaged_rules_status_schema.test.ts @@ -7,10 +7,8 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { left } from 'fp-ts/lib/Either'; -import { - PrePackagedRulesAndTimelinesStatusSchema, - prePackagedRulesAndTimelinesStatusSchema, -} from './prepackaged_rules_status_schema'; +import type { PrePackagedRulesAndTimelinesStatusSchema } from './prepackaged_rules_status_schema'; +import { prePackagedRulesAndTimelinesStatusSchema } from './prepackaged_rules_status_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; describe('prepackaged_rules_schema', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.mocks.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.mocks.ts index 63459a4e8ff6c..4ae06e4f9daab 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.mocks.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RulesBulkSchema } from './rules_bulk_schema'; +import type { RulesBulkSchema } from './rules_bulk_schema'; import { getRulesSchemaMock } from './rules_schema.mocks'; export const getRulesBulkSchemaMock = (): RulesBulkSchema => [getRulesSchemaMock()]; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts index 55d5444bccf7e..00800b9474716 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_bulk_schema.test.ts @@ -8,9 +8,10 @@ import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { RulesBulkSchema, rulesBulkSchema } from './rules_bulk_schema'; -import { RulesSchema } from './rules_schema'; -import { ErrorSchema } from './error_schema'; +import type { RulesBulkSchema } from './rules_bulk_schema'; +import { rulesBulkSchema } from './rules_bulk_schema'; +import type { RulesSchema } from './rules_schema'; +import type { ErrorSchema } from './error_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { getRulesSchemaMock } from './rules_schema.mocks'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts index ca663e8acbc9a..a99626148743a 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.mocks.ts @@ -8,7 +8,7 @@ import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../constants'; import { getListArrayMock } from '../types/lists.mock'; -import { RulesSchema } from './rules_schema'; +import type { RulesSchema } from './rules_schema'; export const ANCHOR_DATE = '2020-02-20T03:57:54.037Z'; diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts index c8b4490355fc8..f19cc6e6ccd70 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.test.ts @@ -7,11 +7,11 @@ import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import * as t from 'io-ts'; +import type * as t from 'io-ts'; +import type { RulesSchema } from './rules_schema'; import { rulesSchema, - RulesSchema, checkTypeDependents, getDependents, addSavedId, @@ -22,7 +22,7 @@ import { addEqlFields, } from './rules_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; -import { TypeAndTimelineOnly } from './type_timeline_only_schema'; +import type { TypeAndTimelineOnly } from './type_timeline_only_schema'; import { getRulesSchemaMock, getRulesMlSchemaMock, diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts index b48ef59f132e8..c55d61617671e 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/rules_schema.ts @@ -7,7 +7,8 @@ import * as t from 'io-ts'; import { isObject } from 'lodash/fp'; -import { Either, left, fold } from 'fp-ts/lib/Either'; +import type { Either } from 'fp-ts/lib/Either'; +import { left, fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; import { @@ -82,7 +83,8 @@ import { SetupGuide, } from '../common'; -import { typeAndTimelineOnlySchema, TypeAndTimelineOnly } from './type_timeline_only_schema'; +import type { TypeAndTimelineOnly } from './type_timeline_only_schema'; +import { typeAndTimelineOnlySchema } from './type_timeline_only_schema'; /** * This is the required fields for the rules schema response. Put all required properties on diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts index 58612376760ba..8026d99713214 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/response/type_timeline_only_schema.test.ts @@ -8,7 +8,8 @@ import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { TypeAndTimelineOnly, typeAndTimelineOnlySchema } from './type_timeline_only_schema'; +import type { TypeAndTimelineOnly } from './type_timeline_only_schema'; +import { typeAndTimelineOnlySchema } from './type_timeline_only_schema'; import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; describe('prepackaged_rule_schema', () => { diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists.mock.ts index 1114c2b5d0fe9..f99c0c2207d78 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/lists.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { List, ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { List, ListArray } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; export const getListMock = (): List => ({ diff --git a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/threat.mock.ts b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/threat.mock.ts index fb063a130e83f..4391ef4b97c7d 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/schemas/types/threat.mock.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/schemas/types/threat.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; export const getThreatMock = (): Threats => [ { 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 33bcd0e82972f..638b28fb919fb 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 @@ -5,8 +5,8 @@ * 2.0. */ -import { RuleAction } from '@kbn/alerting-plugin/common'; -import { RuleAlertAction } from './types'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleAlertAction } from './types'; export const transformRuleToAlertAction = ({ group, diff --git a/x-pack/plugins/security_solution/common/detection_engine/types.ts b/x-pack/plugins/security_solution/common/detection_engine/types.ts index b8994266707a4..dad66ce3f8641 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/types.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; export type RuleAlertAction = Omit & { action_type_id: string; diff --git a/x-pack/plugins/security_solution/common/detection_engine/utils.ts b/x-pack/plugins/security_solution/common/detection_engine/utils.ts index 5d81e1af7ea4a..2095f2f8d2d9b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/utils.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/utils.ts @@ -13,10 +13,10 @@ import type { ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { hasLargeValueList } from '@kbn/securitysolution-list-utils'; -import { Threshold, ThresholdNormalized } from './schemas/common'; +import type { Threshold, ThresholdNormalized } from './schemas/common'; export const hasLargeValueItem = ( exceptionItems: Array diff --git a/x-pack/plugins/security_solution/common/ecs/destination/index.ts b/x-pack/plugins/security_solution/common/ecs/destination/index.ts index 2d3b6154276b9..b5133062d7935 100644 --- a/x-pack/plugins/security_solution/common/ecs/destination/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/destination/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GeoEcs } from '../geo'; +import type { GeoEcs } from '../geo'; export interface DestinationEcs { bytes?: number[]; diff --git a/x-pack/plugins/security_solution/common/ecs/dll/index.ts b/x-pack/plugins/security_solution/common/ecs/dll/index.ts index 0634d29c691cf..99fb6ae64442f 100644 --- a/x-pack/plugins/security_solution/common/ecs/dll/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/dll/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CodeSignature } from '../file'; -import { ProcessPe } from '../process'; +import type { CodeSignature } from '../file'; +import type { ProcessPe } from '../process'; export interface DllEcs { path?: string; diff --git a/x-pack/plugins/security_solution/common/ecs/index.ts b/x-pack/plugins/security_solution/common/ecs/index.ts index c3e589447313a..e68e25cf4c396 100644 --- a/x-pack/plugins/security_solution/common/ecs/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/index.ts @@ -5,34 +5,34 @@ * 2.0. */ -import { AgentEcs } from './agent'; -import { AuditdEcs } from './auditd'; -import { DestinationEcs } from './destination'; -import { DnsEcs } from './dns'; -import { DllEcs } from './dll'; -import { EndgameEcs } from './endgame'; -import { EventEcs } from './event'; -import { FileEcs } from './file'; -import { GeoEcs } from './geo'; -import { HostEcs } from './host'; -import { NetworkEcs } from './network'; -import { RegistryEcs } from './registry'; -import { RuleEcs } from './rule'; -import { SignalEcs, SignalEcsAAD } from './signal'; -import { SourceEcs } from './source'; -import { SuricataEcs } from './suricata'; -import { TlsEcs } from './tls'; -import { ZeekEcs } from './zeek'; -import { HttpEcs } from './http'; -import { UrlEcs } from './url'; -import { UserEcs } from './user'; -import { WinlogEcs } from './winlog'; -import { ProcessEcs } from './process'; -import { SystemEcs } from './system'; -import { ThreatEcs } from './threat'; -import { Ransomware } from './ransomware'; -import { MemoryProtection } from './memory_protection'; -import { Target } from './target_type'; +import type { AgentEcs } from './agent'; +import type { AuditdEcs } from './auditd'; +import type { DestinationEcs } from './destination'; +import type { DnsEcs } from './dns'; +import type { DllEcs } from './dll'; +import type { EndgameEcs } from './endgame'; +import type { EventEcs } from './event'; +import type { FileEcs } from './file'; +import type { GeoEcs } from './geo'; +import type { HostEcs } from './host'; +import type { NetworkEcs } from './network'; +import type { RegistryEcs } from './registry'; +import type { RuleEcs } from './rule'; +import type { SignalEcs, SignalEcsAAD } from './signal'; +import type { SourceEcs } from './source'; +import type { SuricataEcs } from './suricata'; +import type { TlsEcs } from './tls'; +import type { ZeekEcs } from './zeek'; +import type { HttpEcs } from './http'; +import type { UrlEcs } from './url'; +import type { UserEcs } from './user'; +import type { WinlogEcs } from './winlog'; +import type { ProcessEcs } from './process'; +import type { SystemEcs } from './system'; +import type { ThreatEcs } from './threat'; +import type { Ransomware } from './ransomware'; +import type { MemoryProtection } from './memory_protection'; +import type { Target } from './target_type'; export interface Ecs { _id: string; diff --git a/x-pack/plugins/security_solution/common/ecs/process/index.ts b/x-pack/plugins/security_solution/common/ecs/process/index.ts index 02122c776e95d..ac432c1e39d06 100644 --- a/x-pack/plugins/security_solution/common/ecs/process/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/process/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CodeSignature, Ext } from '../file'; +import type { CodeSignature, Ext } from '../file'; export interface ProcessEcs { Ext?: Ext; diff --git a/x-pack/plugins/security_solution/common/ecs/signal/index.ts b/x-pack/plugins/security_solution/common/ecs/signal/index.ts index b419fb38388c5..acbde877e5c74 100644 --- a/x-pack/plugins/security_solution/common/ecs/signal/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/signal/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleEcs } from '../rule'; +import type { RuleEcs } from '../rule'; export interface SignalEcs { rule?: RuleEcs; diff --git a/x-pack/plugins/security_solution/common/ecs/source/index.ts b/x-pack/plugins/security_solution/common/ecs/source/index.ts index 10a2025eb43ec..fcc2bf31aed3c 100644 --- a/x-pack/plugins/security_solution/common/ecs/source/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/source/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GeoEcs } from '../geo'; +import type { GeoEcs } from '../geo'; export interface SourceEcs { bytes?: number[]; diff --git a/x-pack/plugins/security_solution/common/ecs/target_type/index.ts b/x-pack/plugins/security_solution/common/ecs/target_type/index.ts index 3c19b51173a04..8b8f36b231612 100644 --- a/x-pack/plugins/security_solution/common/ecs/target_type/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/target_type/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ProcessEcs } from '../process'; +import type { ProcessEcs } from '../process'; export interface Target { process: ProcessEcs; diff --git a/x-pack/plugins/security_solution/common/ecs/threat/index.ts b/x-pack/plugins/security_solution/common/ecs/threat/index.ts index 8136c5693d0e6..3ed272497ce57 100644 --- a/x-pack/plugins/security_solution/common/ecs/threat/index.ts +++ b/x-pack/plugins/security_solution/common/ecs/threat/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { EventEcs } from '../event'; -import { UrlEcs } from '../url'; +import type { EventEcs } from '../event'; +import type { UrlEcs } from '../url'; interface ThreatMatchEcs { atomic?: string[]; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts index 00c157f9a2fd1..11d1900dfa41a 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/base_data_generator.ts @@ -7,7 +7,7 @@ import seedrandom from 'seedrandom'; import uuid from 'uuid'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; const OS_FAMILY = ['windows', 'macos', 'linux']; /** Array of 14 day offsets */ diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts index 9277917625ec8..cc8bcabd55d94 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ENDPOINT_ACTION_RESPONSES_DS, ENDPOINT_ACTIONS_DS } from '../constants'; import { BaseDataGenerator } from './base_data_generator'; import type { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts index 044a35b872d53..53c6bb3d1cd2f 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_action_generator.ts @@ -5,19 +5,18 @@ * 2.0. */ -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { AGENT_ACTIONS_INDEX, AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common'; import { BaseDataGenerator } from './base_data_generator'; -import { +import type { ActivityLogAction, ActivityLogActionResponse, - ActivityLogItemTypes, EndpointAction, EndpointActionResponse, - RESPONSE_ACTION_COMMANDS, } from '../types'; +import { ActivityLogItemTypes, RESPONSE_ACTION_COMMANDS } from '../types'; export class FleetActionGenerator extends BaseDataGenerator { /** Generate a random endpoint Action (isolate or unisolate) */ diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts index 599072a1b90e9..240bfdfdab2dc 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_generator.ts @@ -6,9 +6,10 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; -import { Agent, AGENTS_INDEX, AgentStatus, FleetServerAgent } from '@kbn/fleet-plugin/common'; +import type { Agent, AgentStatus, FleetServerAgent } from '@kbn/fleet-plugin/common'; +import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; import { BaseDataGenerator } from './base_data_generator'; const agentStatusList: readonly AgentStatus[] = [ diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_policy_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_policy_generator.ts index cdc27c9da57e5..82294ac754fce 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_policy_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_agent_policy_generator.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { agentPolicyStatuses, GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; +import type { GetAgentPoliciesResponseItem } from '@kbn/fleet-plugin/common'; +import { agentPolicyStatuses } from '@kbn/fleet-plugin/common'; import { BaseDataGenerator } from './base_data_generator'; export class FleetAgentPolicyGenerator extends BaseDataGenerator { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_package_policy_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_package_policy_generator.ts index 4fe7d06868355..fef93fe1e674b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_package_policy_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/fleet_package_policy_generator.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { BaseDataGenerator } from './base_data_generator'; import { policyFactory } from '../models/policy_config'; -import { PolicyData } from '../types'; +import type { PolicyData } from '../types'; type PartialPackagePolicy = Partial> & { inputs?: PackagePolicy['inputs']; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/trusted_app_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/trusted_app_generator.ts index 2163805606495..9cd9e0393b9a6 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/trusted_app_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/trusted_app_generator.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; import { ConditionEntryField } from '@kbn/securitysolution-utils'; import { BaseDataGenerator } from './base_data_generator'; -import { EffectScope, NewTrustedApp, TrustedApp } from '../types'; +import type { EffectScope, NewTrustedApp, TrustedApp } from '../types'; const TRUSTED_APP_NAMES = [ 'Symantec Endpoint Security', diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_alerts.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_alerts.ts index c8678960ed3b9..504c7723bc091 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_alerts.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_alerts.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; -import { EndpointDocGenerator, Event, TreeOptions } from '../generate_data'; +import type { Client } from '@elastic/elasticsearch'; +import type { EndpointDocGenerator, Event, TreeOptions } from '../generate_data'; import { firstNonNullValue } from '../models/ecs_safety_helpers'; function delay(ms: number) { diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts index 55e7dc3b13e53..0b64b00946eae 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_fleet_actions.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { AGENT_ACTIONS_INDEX, AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common'; -import { +import type { EndpointAction, EndpointActionResponse, HostMetadata, diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts index 4b6722ba8d452..39fb7e720ae4c 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts @@ -5,33 +5,39 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import { cloneDeep } from 'lodash'; -import { AxiosResponse } from 'axios'; +import type { AxiosResponse } from 'axios'; import uuid from 'uuid'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { KbnClient } from '@kbn/test'; -import { DeleteByQueryResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Agent, CreatePackagePolicyResponse, GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { KbnClient } from '@kbn/test'; +import type { DeleteByQueryResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { + Agent, + CreatePackagePolicyResponse, + GetPackagesResponse, +} from '@kbn/fleet-plugin/common'; import { EndpointDocGenerator } from '../generate_data'; -import { HostMetadata, HostPolicyResponse } from '../types'; -import { - deleteIndexedFleetAgents, +import type { HostMetadata, HostPolicyResponse } from '../types'; +import type { DeleteIndexedFleetAgentsResponse, IndexedFleetAgentResponse, - indexFleetAgentForHost, } from './index_fleet_agent'; -import { - deleteIndexedEndpointAndFleetActions, +import { deleteIndexedFleetAgents, indexFleetAgentForHost } from './index_fleet_agent'; +import type { DeleteIndexedEndpointFleetActionsResponse, IndexedEndpointAndFleetActionsForHostResponse, +} from './index_endpoint_fleet_actions'; +import { + deleteIndexedEndpointAndFleetActions, indexEndpointAndFleetActionsForHost, } from './index_endpoint_fleet_actions'; -import { - deleteIndexedFleetEndpointPolicies, +import type { DeleteIndexedFleetEndpointPoliciesResponse, IndexedFleetEndpointPolicyResponse, +} from './index_fleet_endpoint_policy'; +import { + deleteIndexedFleetEndpointPolicies, indexFleetEndpointPolicy, } from './index_fleet_endpoint_policy'; import { metadataCurrentIndexPattern } from '../constants'; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_agent.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_agent.ts index 8719db5036b83..056b44310dfb2 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_agent.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_agent.ts @@ -5,18 +5,13 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; -import { AxiosResponse } from 'axios'; -import { DeleteByQueryResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { KbnClient } from '@kbn/test'; -import { - Agent, - AGENT_API_ROUTES, - FleetServerAgent, - GetOneAgentResponse, -} from '@kbn/fleet-plugin/common'; -import { HostMetadata } from '../types'; +import type { Client } from '@elastic/elasticsearch'; +import type { AxiosResponse } from 'axios'; +import type { DeleteByQueryResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { KbnClient } from '@kbn/test'; +import type { Agent, FleetServerAgent, GetOneAgentResponse } from '@kbn/fleet-plugin/common'; +import { AGENT_API_ROUTES } from '@kbn/fleet-plugin/common'; +import type { HostMetadata } from '../types'; import { FleetAgentGenerator } from '../data_generators/fleet_agent_generator'; import { wrapErrorAndRejectPromise } from './utils'; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy.ts index 37c0e37a4fbf8..47be1a0061868 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy.ts @@ -5,11 +5,9 @@ * 2.0. */ -// eslint-disable-next-line import/no-extraneous-dependencies -import { KbnClient } from '@kbn/test'; -import { AxiosResponse } from 'axios'; -import { - AGENT_POLICY_API_ROUTES, +import type { KbnClient } from '@kbn/test'; +import type { AxiosResponse } from 'axios'; +import type { AgentPolicy, CreateAgentPolicyRequest, CreateAgentPolicyResponse, @@ -17,9 +15,9 @@ import { CreatePackagePolicyResponse, DeleteAgentPolicyResponse, DeletePackagePoliciesResponse, - PACKAGE_POLICY_API_ROUTES, } from '@kbn/fleet-plugin/common'; -import { PolicyData } from '../types'; +import { AGENT_POLICY_API_ROUTES, PACKAGE_POLICY_API_ROUTES } from '@kbn/fleet-plugin/common'; +import type { PolicyData } from '../types'; import { policyFactory as policyConfigFactory } from '../models/policy_config'; import { wrapErrorAndRejectPromise } from './utils'; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_server.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_server.ts index 8b8a15a1164e5..da1bb6062ac86 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_server.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_server.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import { FLEET_SERVER_SERVERS_INDEX } from '@kbn/fleet-plugin/common'; import { wrapErrorAndRejectPromise } from './utils'; diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts index 762fd556dc698..6266bb60056d8 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/setup_fleet_for_endpoint.ts @@ -5,18 +5,15 @@ * 2.0. */ -import { AxiosResponse } from 'axios'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { KbnClient } from '@kbn/test'; -import { - AGENTS_SETUP_API_ROUTES, +import type { AxiosResponse } from 'axios'; +import type { KbnClient } from '@kbn/test'; +import type { BulkInstallPackageInfo, BulkInstallPackagesResponse, - EPM_API_ROUTES, IBulkInstallPackageHTTPError, PostFleetSetupResponse, - SETUP_API_ROUTE, } from '@kbn/fleet-plugin/common'; +import { AGENTS_SETUP_API_ROUTES, EPM_API_ROUTES, SETUP_API_ROUTE } from '@kbn/fleet-plugin/common'; import { EndpointDataLoadingError, wrapErrorAndRejectPromise } from './utils'; export interface SetupFleetForEndpointResponse { diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts index 6d750ae3c6670..1586e47aa1f4c 100644 --- a/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.test.ts @@ -6,11 +6,9 @@ */ import _ from 'lodash'; +import type { Event, Tree, TreeNode } from './generate_data'; import { EndpointDocGenerator, - Event, - Tree, - TreeNode, RelatedEventCategory, ECSCategory, ANCESTRY_LIMIT, diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts index c817c53b7658f..d2b6f0f353eaa 100644 --- a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts @@ -5,28 +5,27 @@ * 2.0. */ -import seedrandom from 'seedrandom'; +import type seedrandom from 'seedrandom'; import semverLte from 'semver/functions/lte'; import { assertNever } from '@kbn/std'; -import { +import type { GetAgentPoliciesResponseItem, GetPackagesResponse, EsAssetReference, KibanaAssetReference, - agentPolicyStatuses, } from '@kbn/fleet-plugin/common'; -import { +import { agentPolicyStatuses } from '@kbn/fleet-plugin/common'; +import type { AlertEvent, DataStream, - EndpointStatus, Host, HostMetadata, HostPolicyResponse, - HostPolicyResponseActionStatus, OSFields, PolicyData, SafeEndpointEvent, } from './types'; +import { EndpointStatus, HostPolicyResponseActionStatus } from './types'; import { policyFactory } from './models/policy_config'; import { ancestryArray, @@ -36,7 +35,7 @@ import { timestampSafeVersion, } from './models/event'; import { firstNonNullValue } from './models/ecs_safety_helpers'; -import { EventOptions } from './types/generator'; +import type { EventOptions } from './types/generator'; import { BaseDataGenerator } from './data_generators/base_data_generator'; export type Event = AlertEvent | SafeEndpointEvent; diff --git a/x-pack/plugins/security_solution/common/endpoint/index_data.ts b/x-pack/plugins/security_solution/common/endpoint/index_data.ts index e063f9695e7ed..ea01e62fbc807 100644 --- a/x-pack/plugins/security_solution/common/endpoint/index_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/index_data.ts @@ -5,21 +5,20 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import seedrandom from 'seedrandom'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { KbnClient } from '@kbn/test'; -import { AxiosResponse } from 'axios'; -import { - CreatePackagePolicyResponse, - EPM_API_ROUTES, - GetPackagesResponse, -} from '@kbn/fleet-plugin/common'; -import { EndpointDocGenerator, TreeOptions } from './generate_data'; -import { - deleteIndexedEndpointHosts, +import type { KbnClient } from '@kbn/test'; +import type { AxiosResponse } from 'axios'; +import type { CreatePackagePolicyResponse, GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import { EPM_API_ROUTES } from '@kbn/fleet-plugin/common'; +import type { TreeOptions } from './generate_data'; +import { EndpointDocGenerator } from './generate_data'; +import type { DeleteIndexedEndpointHostsResponse, IndexedHostsResponse, +} from './data_loaders/index_endpoint_hosts'; +import { + deleteIndexedEndpointHosts, indexEndpointHostDocs, } from './data_loaders/index_endpoint_hosts'; import { enableFleetServerIfNecessary } from './data_loaders/index_fleet_server'; diff --git a/x-pack/plugins/security_solution/common/endpoint/models/ecs_safety_helpers.ts b/x-pack/plugins/security_solution/common/endpoint/models/ecs_safety_helpers.ts index 75260ea409743..a5bdb447e8bb5 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/ecs_safety_helpers.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/ecs_safety_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ECSField } from '../types'; +import type { ECSField } from '../types'; /** * Use these functions to accecss information held in `ECSField`s. diff --git a/x-pack/plugins/security_solution/common/endpoint/models/event.test.ts b/x-pack/plugins/security_solution/common/endpoint/models/event.test.ts index d1f66e1b7ddca..3e46041b8d8bf 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/event.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/event.test.ts @@ -7,7 +7,7 @@ import { EndpointDocGenerator } from '../generate_data'; import { isProcessRunning } from './event'; -import { SafeResolverEvent } from '../types'; +import type { SafeResolverEvent } from '../types'; describe('Generated documents', () => { let generator: EndpointDocGenerator; diff --git a/x-pack/plugins/security_solution/common/endpoint/models/event.ts b/x-pack/plugins/security_solution/common/endpoint/models/event.ts index 9c102e77b6946..c7725afe8ab89 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/event.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/event.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { LegacyEndpointEvent, ResolverEvent, SafeResolverEvent, diff --git a/x-pack/plugins/security_solution/common/endpoint/models/node.ts b/x-pack/plugins/security_solution/common/endpoint/models/node.ts index 8ed75f1582392..2007597b40fd2 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/node.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/node.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ResolverNode } from '../types'; +import type { ResolverNode } from '../types'; import { firstNonNullValue } from './ecs_safety_helpers'; /** diff --git a/x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts b/x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts index e2cb3503910be..416e12ea0aba7 100644 --- a/x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts +++ b/x-pack/plugins/security_solution/common/endpoint/models/policy_config.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { PolicyConfig, ProtectionModes } from '../types'; +import type { PolicyConfig } from '../types'; +import { ProtectionModes } from '../types'; /** * Return a new default `PolicyConfig` for platinum and above licenses diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts index 682042fe3026a..0776840abcf46 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { ENDPOINT_DEFAULT_PAGE_SIZE } from '../constants'; const BaseActionRequestSchema = { diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/metadata.ts b/x-pack/plugins/security_solution/common/endpoint/schema/metadata.ts index 4271b8417a984..e442a044f7a92 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/metadata.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/metadata.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { ENDPOINT_DEFAULT_PAGE, ENDPOINT_DEFAULT_PAGE_SIZE } from '../constants'; import { HostStatus } from '../types'; diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.test.ts b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.test.ts index 7c8d6dd6138aa..014eb66d3cb81 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.test.ts @@ -12,7 +12,11 @@ import { PutTrustedAppUpdateRequestSchema, } from './trusted_apps'; import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; -import { TrustedAppConditionEntry, NewTrustedApp, PutTrustedAppsRequestParams } from '../types'; +import type { + TrustedAppConditionEntry, + NewTrustedApp, + PutTrustedAppsRequestParams, +} from '../types'; describe('When invoking Trusted Apps Schema', () => { describe('for GET List', () => { diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts index 317ee194ccc20..0f08c221de91a 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts @@ -7,7 +7,7 @@ import { schema } from '@kbn/config-schema'; import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; -import { TrustedAppConditionEntry } from '../types'; +import type { TrustedAppConditionEntry } from '../types'; import { getDuplicateFields, isValidHash } from '../service/artifacts/validations'; export const DeleteTrustedAppsRequestSchema = { diff --git a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.test.ts index 75076e191dcdc..35931d78210ee 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { BY_POLICY_ARTIFACT_TAG_PREFIX, GLOBAL_ARTIFACT_TAG } from './constants'; import { createExceptionListItemForCreate, diff --git a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.ts b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.ts index 332667064a605..465460563e3fa 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ExceptionListItemSchema, CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/validations.ts b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/validations.ts index df9ff68e5ef3a..967ccd8416ab5 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/artifacts/validations.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/artifacts/validations.ts @@ -6,7 +6,7 @@ */ import { ConditionEntryField } from '@kbn/securitysolution-utils'; -import { TrustedAppConditionEntry } from '../../types'; +import type { TrustedAppConditionEntry } from '../../types'; const HASH_LENGTHS: readonly number[] = [ 32, // MD5 diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts index f22a23ba13575..5dde46c85fa00 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts @@ -6,9 +6,10 @@ */ import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz'; -import { createFleetAuthzMock, FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { FleetAuthz } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; import { createLicenseServiceMock } from '../../../license/mocks'; -import { EndpointAuthzKeyList } from '../../types/authz'; +import type { EndpointAuthzKeyList } from '../../types/authz'; describe('Endpoint Authz service', () => { let licenseService: ReturnType; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts index 994d77408771d..8eeb02bd9aba0 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { FleetAuthz } from '@kbn/fleet-plugin/common'; -import { LicenseService } from '../../../license'; -import { EndpointAuthz } from '../../types/authz'; -import { MaybeImmutable } from '../../types'; +import type { FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { LicenseService } from '../../../license'; +import type { EndpointAuthz } from '../../types/authz'; +import type { MaybeImmutable } from '../../types'; /** * Used by both the server and the UI to generate the Authorization for access to Endpoint related diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts index 7f1a6f969272b..a1ea4c9c4847b 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EndpointAuthz } from '../../types/authz'; +import type { EndpointAuthz } from '../../types/authz'; import { getEndpointAuthzInitialState } from './authz'; export const getEndpointAuthzInitialStateMock = ( diff --git a/x-pack/plugins/security_solution/common/endpoint/service/host_isolation/utils.ts b/x-pack/plugins/security_solution/common/endpoint/service/host_isolation/utils.ts index 0e9404f250786..97d7eb2db641f 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/host_isolation/utils.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/host_isolation/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ import semverLte from 'semver/functions/lte'; -import { ImmutableArray } from '../../types'; +import type { ImmutableArray } from '../../types'; const minSupportedVersion = '7.14.0'; const minCapabilitiesVersion = '7.15.0'; diff --git a/x-pack/plugins/security_solution/common/endpoint/service/policy/get_policy_data_for_update.ts b/x-pack/plugins/security_solution/common/endpoint/service/policy/get_policy_data_for_update.ts index 0787525a38b66..3abf10c9c7147 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/policy/get_policy_data_for_update.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/policy/get_policy_data_for_update.ts @@ -6,7 +6,7 @@ */ import { cloneDeep } from 'lodash'; -import { MaybeImmutable, NewPolicyData, PolicyData } from '../../types'; +import type { MaybeImmutable, NewPolicyData, PolicyData } from '../../types'; /** * Given a Policy Data (package policy) object, return back a new object with only the field diff --git a/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/mapping.ts b/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/mapping.ts index cf36c6911ca91..322b88a3f2005 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/mapping.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/mapping.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EffectScope } from '../../types'; +import type { EffectScope } from '../../types'; import { BY_POLICY_ARTIFACT_TAG_PREFIX } from '../artifacts/constants'; /** diff --git a/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/to_update_trusted_app.ts b/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/to_update_trusted_app.ts index fcde1d44b682d..b27467ca05141 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/to_update_trusted_app.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/trusted_apps/to_update_trusted_app.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MaybeImmutable, NewTrustedApp, UpdateTrustedApp } from '../../types'; +import type { MaybeImmutable, NewTrustedApp, UpdateTrustedApp } from '../../types'; const NEW_TRUSTED_APP_KEYS: Array = [ 'name', diff --git a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts index c89d12c9a2efa..6777b028d2533 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; -import { +import type { TypeOf } from '@kbn/config-schema'; +import type { ActionStatusRequestSchema, NoParametersRequestSchema, ResponseActionBodySchema, diff --git a/x-pack/plugins/security_solution/common/endpoint/types/exception_list_items.ts b/x-pack/plugins/security_solution/common/endpoint/types/exception_list_items.ts index bcb452abd50e0..af21ac9447922 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/exception_list_items.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/exception_list_items.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AllConditionEntryFields, EntryTypes } from '@kbn/securitysolution-utils'; +import type { AllConditionEntryFields, EntryTypes } from '@kbn/securitysolution-utils'; export type ConditionEntriesMap = { [K in AllConditionEntryFields]?: T; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/generator.ts b/x-pack/plugins/security_solution/common/endpoint/types/generator.ts index edfdbee854f67..34e999f493d65 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/generator.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataStream } from '.'; +import type { DataStream } from '.'; /** * The configuration options for generating an event. diff --git a/x-pack/plugins/security_solution/common/endpoint/types/index.ts b/x-pack/plugins/security_solution/common/endpoint/types/index.ts index 28aa5052db48c..4e2fd4ec5bd64 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ApplicationStart } from '@kbn/core/public'; -import { Agent, PackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/common'; -import { ManifestSchema } from '../schema/manifest'; +import type { ApplicationStart } from '@kbn/core/public'; +import type { Agent, PackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/common'; +import type { ManifestSchema } from '../schema/manifest'; export * from './actions'; export * from './os'; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/trusted_apps.ts b/x-pack/plugins/security_solution/common/endpoint/types/trusted_apps.ts index ab56d35d79f99..6ec47e24486ec 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/trusted_apps.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/trusted_apps.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; -import { +import type { TypeOf } from '@kbn/config-schema'; +import type { ConditionEntryField, OperatingSystem, TrustedAppEntryTypes, } from '@kbn/securitysolution-utils'; -import { +import type { DeleteTrustedAppsRequestSchema, GetOneTrustedAppRequestSchema, GetTrustedAppsRequestSchema, @@ -19,7 +19,7 @@ import { PutTrustedAppUpdateRequestSchema, GetTrustedAppsSummaryRequestSchema, } from '../schema/trusted_apps'; -import { ConditionEntry } from './exception_list_items'; +import type { ConditionEntry } from './exception_list_items'; /** API request params for deleting Trusted App entry */ export type DeleteTrustedAppsRequestParams = TypeOf; diff --git a/x-pack/plugins/security_solution/common/field_maps/8.0.0/index.ts b/x-pack/plugins/security_solution/common/field_maps/8.0.0/index.ts index e293dac663816..95d9000ef69a9 100644 --- a/x-pack/plugins/security_solution/common/field_maps/8.0.0/index.ts +++ b/x-pack/plugins/security_solution/common/field_maps/8.0.0/index.ts @@ -5,7 +5,9 @@ * 2.0. */ -import { AlertsFieldMap, alertsFieldMap } from './alerts'; -import { RulesFieldMap, rulesFieldMap } from './rules'; +import type { AlertsFieldMap } from './alerts'; +import { alertsFieldMap } from './alerts'; +import type { RulesFieldMap } from './rules'; +import { rulesFieldMap } from './rules'; export type { AlertsFieldMap, RulesFieldMap }; export { alertsFieldMap, rulesFieldMap }; diff --git a/x-pack/plugins/security_solution/common/field_maps/index.ts b/x-pack/plugins/security_solution/common/field_maps/index.ts index 260b56ffe9141..e3f65946cc9df 100644 --- a/x-pack/plugins/security_solution/common/field_maps/index.ts +++ b/x-pack/plugins/security_solution/common/field_maps/index.ts @@ -5,7 +5,9 @@ * 2.0. */ -import { AlertsFieldMap, alertsFieldMap } from './8.0.0/alerts'; -import { RulesFieldMap, rulesFieldMap } from './8.0.0/rules'; +import type { AlertsFieldMap } from './8.0.0/alerts'; +import { alertsFieldMap } from './8.0.0/alerts'; +import type { RulesFieldMap } from './8.0.0/rules'; +import { rulesFieldMap } from './8.0.0/rules'; export type { AlertsFieldMap, RulesFieldMap }; export { alertsFieldMap, rulesFieldMap }; diff --git a/x-pack/plugins/security_solution/common/license/license.ts b/x-pack/plugins/security_solution/common/license/license.ts index 4761d40c440de..c82fc21d80ceb 100644 --- a/x-pack/plugins/security_solution/common/license/license.ts +++ b/x-pack/plugins/security_solution/common/license/license.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Observable, Subscription } from 'rxjs'; -import { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { Observable, Subscription } from 'rxjs'; +import type { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; // Generic license service class that works with the license observable // Both server and client plugins instancates a singleton version of this class diff --git a/x-pack/plugins/security_solution/common/license/mocks.ts b/x-pack/plugins/security_solution/common/license/mocks.ts index b691e1510822f..a6a4c33a8f14f 100644 --- a/x-pack/plugins/security_solution/common/license/mocks.ts +++ b/x-pack/plugins/security_solution/common/license/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LicenseService } from './license'; +import type { LicenseService } from './license'; export const createLicenseServiceMock = (): jest.Mocked => { return { diff --git a/x-pack/plugins/security_solution/common/license/policy_config.ts b/x-pack/plugins/security_solution/common/license/policy_config.ts index 0ac19a448c4e4..da702591912dd 100644 --- a/x-pack/plugins/security_solution/common/license/policy_config.ts +++ b/x-pack/plugins/security_solution/common/license/policy_config.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { isAtLeast } from './license'; -import { PolicyConfig } from '../endpoint/types'; +import type { PolicyConfig } from '../endpoint/types'; import { DefaultPolicyNotificationMessage, DefaultPolicyRuleNotificationMessage, diff --git a/x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts b/x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts index 68a29dd3c55b9..dee25d72c0850 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/empty_ml_capabilities.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; import { getDefaultMlCapabilities } from '@kbn/ml-plugin/common'; export const emptyMlCapabilities: MlCapabilitiesResponse = { diff --git a/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts index 6c27f1b7603d8..6cc9ca8229fe2 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/has_ml_admin_permissions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; export const hasMlAdminPermissions = (capabilities: MlCapabilitiesResponse): boolean => getDataFeedPermissions(capabilities) && diff --git a/x-pack/plugins/security_solution/common/machine_learning/has_ml_license.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_license.ts index 600670af1b588..eb6ea0156a92a 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/has_ml_license.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/has_ml_license.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; export const hasMlLicense = (capabilities: MlCapabilitiesResponse): boolean => capabilities.isPlatinumOrTrialLicense; diff --git a/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts b/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts index bfc9c302193fc..a45b8357516bd 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/has_ml_user_permissions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/common/types/capabilities'; export const hasMlUserPermissions = (capabilities: MlCapabilitiesResponse): boolean => capabilities.capabilities.canGetJobs && diff --git a/x-pack/plugins/security_solution/common/machine_learning/helpers.ts b/x-pack/plugins/security_solution/common/machine_learning/helpers.ts index 819337d8b715a..e073d023e8904 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/helpers.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; // Based on ML Job/Datafeed States from x-pack/legacy/plugins/ml/common/constants/states.js const enabledStates = ['started', 'opened']; diff --git a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts index a3e0c078449ab..149511316e7b1 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MlSummaryJob } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; +import type { MlSummaryJob } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; import { isSecurityJob } from './is_security_job'; describe('isSecurityJob', () => { diff --git a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts index 3372690fd54cd..38a13c2dd96a3 100644 --- a/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts +++ b/x-pack/plugins/security_solution/common/machine_learning/is_security_job.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { LEGACY_ML_GROUP_ID, ML_GROUP_ID, ML_GROUP_IDS } from '../constants'; +import type { LEGACY_ML_GROUP_ID, ML_GROUP_ID } from '../constants'; +import { ML_GROUP_IDS } from '../constants'; export const isSecurityJob = (job: { groups: string[] }): boolean => job.groups.some((group) => diff --git a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts index 0c620fbdd348d..ca44885d164d6 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts @@ -6,7 +6,7 @@ */ import type { TransportResult } from '@elastic/elasticsearch'; -import { ErrorResponse } from './helpers'; +import type { ErrorResponse } from './helpers'; export const getValidEqlResponse = (): TransportResult['body'] => ({ is_partial: false, diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts index 40fc2b7e0830e..df454c19d52b2 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.mock.ts @@ -8,12 +8,12 @@ // eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { IEsSearchResponse } from '@kbn/data-plugin/public'; -import { +import type { CtiEnrichment, CtiEventEnrichmentRequestOptions, CtiEventEnrichmentStrategyResponse, - CtiQueries, } from '.'; +import { CtiQueries } from '.'; export const buildEventEnrichmentRequestOptionsMock = ( overrides: Partial = {} diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts index f4ac81a6e9d34..4d9a054b49461 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/cti/index.ts @@ -7,11 +7,11 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { IEsSearchResponse, IEsSearchRequest } from '@kbn/data-plugin/public'; -import { FactoryQueryTypes } from '../..'; +import type { IEsSearchResponse, IEsSearchRequest } from '@kbn/data-plugin/public'; +import type { FactoryQueryTypes } from '../..'; import { EVENT_ENRICHMENT_INDICATOR_FIELD_MAP } from '../../../cti/constants'; -import { Inspect, Maybe, TimerangeInput } from '../../common'; -import { RequestBasicOptions } from '..'; +import type { Inspect, Maybe, TimerangeInput } from '../../common'; +import type { RequestBasicOptions } from '..'; export enum CtiQueries { eventEnrichment = 'eventEnrichment', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/first_last_seen/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/first_last_seen/index.ts index 1ee05066d8ae7..7d161bd73a2ed 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/first_last_seen/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/first_last_seen/index.ts @@ -7,8 +7,8 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, Direction } from '../../common'; -import { RequestBasicOptions } from '../..'; +import type { Inspect, Maybe, Direction } from '../../common'; +import type { RequestBasicOptions } from '../..'; export const FirstLastSeenQuery = 'firstlastseen'; export interface FirstLastSeenRequestOptions extends Partial { diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/all/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/all/index.ts index 124388b84c3c8..84ad9b1f3e88a 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/all/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/all/index.ts @@ -7,9 +7,9 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { HostItem, HostsFields } from '../common'; -import { CursorType, Direction, Inspect, Maybe, PageInfoPaginated } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; +import type { HostItem, HostsFields } from '../common'; +import type { CursorType, Direction, Inspect, Maybe, PageInfoPaginated } from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; export interface HostsEdges { node: HostItem; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts index 70fa8ed5892ce..8b951d0a007b6 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/common/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { CloudEcs } from '../../../../ecs/cloud'; -import { HostEcs, OsEcs } from '../../../../ecs/host'; -import { Hit, Hits, Maybe, SearchHit, StringOrNumber, TotalValue } from '../../../common'; -import { EndpointPendingActions, HostStatus } from '../../../../endpoint/types'; -import { CommonFields } from '../..'; +import type { CloudEcs } from '../../../../ecs/cloud'; +import type { HostEcs, OsEcs } from '../../../../ecs/host'; +import type { Hit, Hits, Maybe, SearchHit, StringOrNumber, TotalValue } from '../../../common'; +import type { EndpointPendingActions, HostStatus } from '../../../../endpoint/types'; +import type { CommonFields } from '../..'; export enum HostPolicyResponseActionStatus { success = 'success', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/details/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/details/index.ts index 2271f18ad326a..4a1f6384214ca 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/details/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/details/index.ts @@ -8,9 +8,9 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, TimerangeInput } from '../../../common'; -import { HostItem, HostsFields } from '../common'; -import { RequestOptionsPaginated } from '../..'; +import type { Inspect, Maybe, TimerangeInput } from '../../../common'; +import type { HostItem, HostsFields } from '../common'; +import type { RequestOptionsPaginated } from '../..'; export interface HostDetailsStrategyResponse extends IEsSearchResponse { hostDetails: HostItem; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/common/index.ts index 9bc5daee4869f..dd4e3b1bef58f 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/common/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Maybe } from '../../../../common'; +import type { Maybe } from '../../../../common'; export interface HostsKpiHistogramData { x?: Maybe; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/hosts/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/hosts/index.ts index 535a5f57cf724..9f92e0b91fe99 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/hosts/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/hosts/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; -import { HostsKpiHistogramData } from '../common'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; +import type { HostsKpiHistogramData } from '../common'; export type HostsKpiHostsRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/index.ts index 94da316f3b0ae..fec98228d3ff6 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/index.ts @@ -10,9 +10,9 @@ export * from './common'; export * from './hosts'; export * from './unique_ips'; -import { UsersKpiAuthenticationsStrategyResponse } from '../../users/kpi/authentications'; -import { HostsKpiHostsStrategyResponse } from './hosts'; -import { HostsKpiUniqueIpsStrategyResponse } from './unique_ips'; +import type { UsersKpiAuthenticationsStrategyResponse } from '../../users/kpi/authentications'; +import type { HostsKpiHostsStrategyResponse } from './hosts'; +import type { HostsKpiUniqueIpsStrategyResponse } from './unique_ips'; export enum HostsKpiQueries { kpiHosts = 'hostsKpiHosts', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/unique_ips/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/unique_ips/index.ts index b0c3edde0dda7..beab78122e2a2 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/unique_ips/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/kpi/unique_ips/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; -import { HostsKpiHistogramData } from '../common'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; +import type { HostsKpiHistogramData } from '../common'; export type HostsKpiUniqueIpsRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/overview/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/overview/index.ts index 791da07d26cd9..87b348db6c304 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/overview/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/overview/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, SearchHit } from '../../../common'; -import { RequestBasicOptions } from '../..'; +import type { Inspect, Maybe, SearchHit } from '../../../common'; +import type { RequestBasicOptions } from '../..'; export type HostOverviewRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/uncommon_processes/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/uncommon_processes/index.ts index 5bca04713f7b9..2153426e507a4 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/uncommon_processes/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/hosts/uncommon_processes/index.ts @@ -7,10 +7,10 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { HostEcs } from '../../../../ecs/host'; -import { UserEcs } from '../../../../ecs/user'; -import { ProcessEcs } from '../../../../ecs/process'; -import { +import type { HostEcs } from '../../../../ecs/host'; +import type { UserEcs } from '../../../../ecs/user'; +import type { ProcessEcs } from '../../../../ecs/process'; +import type { RequestOptionsPaginated, SortField, CursorType, diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/index.ts index 2648ac98cbbdc..df072319ec5c4 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/index.ts @@ -6,8 +6,8 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEsSearchRequest } from '@kbn/data-plugin/common'; -import { ESQuery } from '../../typed_json'; -import { +import type { ESQuery } from '../../typed_json'; +import type { HostDetailsStrategyResponse, HostDetailsRequestOptions, HostsOverviewStrategyResponse, @@ -23,7 +23,7 @@ import { HostsKpiUniqueIpsStrategyResponse, HostsKpiUniqueIpsRequestOptions, } from './hosts'; -import { +import type { NetworkQueries, NetworkDetailsStrategyResponse, NetworkDetailsRequestOptions, @@ -53,13 +53,18 @@ import { NetworkKpiUniquePrivateIpsStrategyResponse, NetworkKpiUniquePrivateIpsRequestOptions, } from './network'; -import { +import type { MatrixHistogramQuery, MatrixHistogramRequestOptions, MatrixHistogramStrategyResponse, } from './matrix_histogram'; -import { TimerangeInput, SortField, PaginationInput, PaginationInputPaginated } from '../common'; -import { +import type { + TimerangeInput, + SortField, + PaginationInput, + PaginationInputPaginated, +} from '../common'; +import type { CtiEventEnrichmentRequestOptions, CtiEventEnrichmentStrategyResponse, CtiQueries, @@ -67,31 +72,31 @@ import { CtiDataSourceStrategyResponse, } from './cti'; -import { +import type { RiskScoreStrategyResponse, RiskQueries, RiskScoreRequestOptions, KpiRiskScoreStrategyResponse, KpiRiskScoreRequestOptions, } from './risk_score'; -import { UsersQueries } from './users'; -import { UserDetailsRequestOptions, UserDetailsStrategyResponse } from './users/details'; -import { +import type { UsersQueries } from './users'; +import type { UserDetailsRequestOptions, UserDetailsStrategyResponse } from './users/details'; +import type { TotalUsersKpiRequestOptions, TotalUsersKpiStrategyResponse, } from './users/kpi/total_users'; -import { +import type { UsersKpiAuthenticationsRequestOptions, UsersKpiAuthenticationsStrategyResponse, } from './users/kpi/authentications'; -import { UsersRequestOptions, UsersStrategyResponse } from './users/all'; -import { +import type { UsersRequestOptions, UsersStrategyResponse } from './users/all'; +import type { UserAuthenticationsRequestOptions, UserAuthenticationsStrategyResponse, } from './users/authentications'; -import { +import type { FirstLastSeenQuery, FirstLastSeenRequestOptions, FirstLastSeenStrategyResponse, diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/alerts/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/alerts/index.ts index ba895abf21860..7780a5273b596 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/alerts/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/alerts/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HistogramBucket } from '../common'; +import type { HistogramBucket } from '../common'; export interface AlertsGroupData { key: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/anomalies/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/anomalies/index.ts index faae15802e6b9..d5ce3ebe89538 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/anomalies/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/anomalies/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SearchHit } from '../../../common'; +import type { SearchHit } from '../../../common'; interface AnomaliesOverTimeHistogramData { key_as_string: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/events/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/events/index.ts index 460264e776838..ec2ad46a9b75e 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/events/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/events/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SearchHit } from '../../../common'; +import type { SearchHit } from '../../../common'; interface EventsMatrixHistogramData { key_as_string: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts index ecd00cefd5f88..65c83902403ef 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, TimerangeInput } from '../../common'; -import { AuthenticationHit, RequestBasicOptions } from '..'; -import { AlertsGroupData } from './alerts'; -import { AnomaliesActionGroupData, AnomalyHit } from './anomalies'; -import { DnsHistogramGroupData } from './dns'; -import { AuthenticationsActionGroupData } from './authentications'; -import { EventsActionGroupData, EventHit } from './events'; -import { PreviewHistogramGroupData } from './preview'; +import type { Inspect, Maybe, TimerangeInput } from '../../common'; +import type { AuthenticationHit, RequestBasicOptions } from '..'; +import type { AlertsGroupData } from './alerts'; +import type { AnomaliesActionGroupData, AnomalyHit } from './anomalies'; +import type { DnsHistogramGroupData } from './dns'; +import type { AuthenticationsActionGroupData } from './authentications'; +import type { EventsActionGroupData, EventHit } from './events'; +import type { PreviewHistogramGroupData } from './preview'; export * from './alerts'; export * from './anomalies'; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/preview/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/preview/index.ts index ce5b9b94929c3..1c58eca3b4d9b 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/preview/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/preview/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HistogramBucket } from '../common'; +import type { HistogramBucket } from '../common'; export interface PreviewHistogramGroupData { key: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/common/index.ts index 9ba84253f7cbf..042164f6311c9 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/common/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { GeoEcs } from '../../../../ecs/geo'; -import { Maybe } from '../../..'; +import type { GeoEcs } from '../../../../ecs/geo'; +import type { Maybe } from '../../..'; export enum NetworkDirectionEcs { inbound = 'inbound', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/details/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/details/index.ts index ea7de5b640773..a516bc9525e1c 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/details/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/details/index.ts @@ -6,10 +6,10 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { HostEcs } from '../../../../ecs/host'; -import { GeoEcs } from '../../../../ecs/geo'; -import { Inspect, Maybe, TotalValue, Hit, ShardsResponse } from '../../../common'; -import { RequestBasicOptions } from '../..'; +import type { HostEcs } from '../../../../ecs/host'; +import type { GeoEcs } from '../../../../ecs/geo'; +import type { Inspect, Maybe, TotalValue, Hit, ShardsResponse } from '../../../common'; +import type { RequestBasicOptions } from '../..'; export interface NetworkDetailsRequestOptions extends Omit { ip: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/dns/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/dns/index.ts index ba298fab2771c..54c1b418f83bd 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/dns/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/dns/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { CursorType, Inspect, Maybe, PageInfoPaginated, SortField } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; +import type { CursorType, Inspect, Maybe, PageInfoPaginated, SortField } from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; export enum NetworkDnsFields { dnsName = 'dnsName', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/http/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/http/index.ts index 26eab7b3877db..e523b4a1f45c4 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/http/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/http/index.ts @@ -6,8 +6,14 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Maybe, CursorType, Inspect, PageInfoPaginated, GenericBuckets } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; +import type { + Maybe, + CursorType, + Inspect, + PageInfoPaginated, + GenericBuckets, +} from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; export enum NetworkHttpFields { domains = 'domains', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/dns/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/dns/index.ts index 70328ffaad991..3c068014221be 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/dns/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/dns/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; export type NetworkKpiDnsRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts index fa9e55096f7a6..7c482608cea04 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/index.ts @@ -11,11 +11,11 @@ export * from './tls_handshakes'; export * from './unique_flows'; export * from './unique_private_ips'; -import { NetworkKpiDnsStrategyResponse } from './dns'; -import { NetworkKpiNetworkEventsStrategyResponse } from './network_events'; -import { NetworkKpiTlsHandshakesStrategyResponse } from './tls_handshakes'; -import { NetworkKpiUniqueFlowsStrategyResponse } from './unique_flows'; -import { NetworkKpiUniquePrivateIpsStrategyResponse } from './unique_private_ips'; +import type { NetworkKpiDnsStrategyResponse } from './dns'; +import type { NetworkKpiNetworkEventsStrategyResponse } from './network_events'; +import type { NetworkKpiTlsHandshakesStrategyResponse } from './tls_handshakes'; +import type { NetworkKpiUniqueFlowsStrategyResponse } from './unique_flows'; +import type { NetworkKpiUniquePrivateIpsStrategyResponse } from './unique_private_ips'; export enum NetworkKpiQueries { dns = 'networkKpiDns', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/network_events/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/network_events/index.ts index 75889617fb050..aa237a6b9e74e 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/network_events/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/network_events/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; export type NetworkKpiNetworkEventsRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/tls_handshakes/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/tls_handshakes/index.ts index 88259a74df110..9c50f565806a9 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/tls_handshakes/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/tls_handshakes/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; export type NetworkKpiTlsHandshakesRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_flows/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_flows/index.ts index 4a71c01ba7c03..339463323f72b 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_flows/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_flows/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; export type NetworkKpiUniqueFlowsRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_private_ips/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_private_ips/index.ts index fb5fc0596435f..7df7050821526 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_private_ips/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/kpi/unique_private_ips/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; export interface NetworkKpiHistogramData { x?: Maybe; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/overview/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/overview/index.ts index 7fff355e54c1b..9548cf0f890c5 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/overview/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/overview/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, SearchHit } from '../../../common'; -import { RequestBasicOptions } from '../..'; +import type { Inspect, Maybe, SearchHit } from '../../../common'; +import type { RequestBasicOptions } from '../..'; export type NetworkOverviewRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/tls/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/tls/index.ts index d512f12bcbb6b..7c854f6f29fa2 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/tls/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/tls/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; -import { FlowTargetSourceDest } from '../common'; +import type { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; +import type { FlowTargetSourceDest } from '../common'; export interface NetworkTlsBuckets { key: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_countries/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_countries/index.ts index 3a94d92a6c844..47989aa6ba49a 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_countries/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_countries/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; -import { +import type { CursorType, Inspect, Maybe, PageInfoPaginated } from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; +import type { GeoItem, FlowTargetSourceDest, NetworkTopTablesFields, diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_n_flow/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_n_flow/index.ts index 0524b34d8e538..310476a470d30 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_n_flow/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/top_n_flow/index.ts @@ -6,13 +6,13 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { GeoItem, FlowTargetSourceDest, TopNetworkTablesEcsField, NetworkTopTablesFields, } from '../common'; -import { +import type { CursorType, Inspect, Maybe, @@ -20,7 +20,7 @@ import { TotalValue, GenericBuckets, } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; +import type { RequestOptionsPaginated } from '../..'; export interface NetworkTopNFlowRequestOptions extends RequestOptionsPaginated { diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/users/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/users/index.ts index 2b4767b20bd5c..49720c298338e 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/users/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/network/users/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { CursorType, Inspect, Maybe, PageInfoPaginated, SortField } from '../../../common'; -import { FlowTargetSourceDest } from '../common'; -import { RequestOptionsPaginated } from '../..'; +import type { CursorType, Inspect, Maybe, PageInfoPaginated, SortField } from '../../../common'; +import type { FlowTargetSourceDest } from '../common'; +import type { RequestOptionsPaginated } from '../..'; export enum NetworkUsersFields { name = 'name', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts index 0ee560090090c..a09c8a1617240 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts @@ -6,10 +6,10 @@ */ import type { IEsSearchRequest, IEsSearchResponse } from '@kbn/data-plugin/common'; -import { FactoryQueryTypes } from '../..'; +import type { FactoryQueryTypes } from '../..'; -import { ESQuery } from '../../../../typed_json'; -import { Inspect, Maybe, SortField, TimerangeInput } from '../../../common'; +import type { ESQuery } from '../../../../typed_json'; +import type { Inspect, Maybe, SortField, TimerangeInput } from '../../../common'; export interface RiskScoreRequestOptions extends IEsSearchRequest { defaultIndex: string[]; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/kpi/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/kpi/index.ts index 6f1dd9ec0e991..2fe24f4440088 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/kpi/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/risk_score/kpi/index.ts @@ -6,10 +6,10 @@ */ import type { IEsSearchRequest, IEsSearchResponse } from '@kbn/data-plugin/common'; -import { FactoryQueryTypes, RiskScoreAggByFields, RiskSeverity } from '../..'; -import { ESQuery } from '../../../../typed_json'; +import type { FactoryQueryTypes, RiskScoreAggByFields, RiskSeverity } from '../..'; +import type { ESQuery } from '../../../../typed_json'; -import { Inspect, Maybe } from '../../../common'; +import type { Inspect, Maybe } from '../../../common'; export interface KpiRiskScoreRequestOptions extends IEsSearchRequest { defaultIndex: string[]; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/all/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/all/index.ts index 67b65fa098c2a..7bed3ffe95c0d 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/all/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/all/index.ts @@ -7,9 +7,9 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, PageInfoPaginated } from '../../../common'; -import { RequestOptionsPaginated } from '../..'; -import { SortableUsersFields } from '../common'; +import type { Inspect, Maybe, PageInfoPaginated } from '../../../common'; +import type { RequestOptionsPaginated } from '../..'; +import type { SortableUsersFields } from '../common'; export interface User { name: string; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/authentications/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/authentications/index.ts index 5ce6df9c89915..e409898e77926 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/authentications/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/authentications/index.ts @@ -7,10 +7,10 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { UserEcs } from '../../../../ecs/user'; -import { SourceEcs } from '../../../../ecs/source'; -import { HostEcs } from '../../../../ecs/host'; -import { +import type { UserEcs } from '../../../../ecs/user'; +import type { SourceEcs } from '../../../../ecs/source'; +import type { HostEcs } from '../../../../ecs/host'; +import type { CursorType, Inspect, Maybe, @@ -19,7 +19,7 @@ import { Hit, TotalHit, } from '../../../common'; -import { CommonFields, RequestOptionsPaginated } from '../..'; +import type { CommonFields, RequestOptionsPaginated } from '../..'; export interface UserAuthenticationsStrategyResponse extends IEsSearchResponse { edges: AuthenticationsEdges[]; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/common/index.ts index 0b338b197e9c5..c5cb4351757a0 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/common/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CommonFields, Maybe, RiskSeverity, SortField } from '../../..'; -import { HostEcs } from '../../../../ecs/host'; -import { UserEcs } from '../../../../ecs/user'; +import type { CommonFields, Maybe, RiskSeverity, SortField } from '../../..'; +import type { HostEcs } from '../../../../ecs/host'; +import type { UserEcs } from '../../../../ecs/user'; export const enum UserRiskScoreFields { timestamp = '@timestamp', diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/details/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/details/index.ts index 3fc5d86b61a24..e1a7255f71195 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/details/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/details/index.ts @@ -7,9 +7,9 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe, TimerangeInput } from '../../../common'; -import { UserItem } from '../common'; -import { RequestBasicOptions } from '../..'; +import type { Inspect, Maybe, TimerangeInput } from '../../../common'; +import type { UserItem } from '../common'; +import type { RequestBasicOptions } from '../..'; export interface UserDetailsStrategyResponse extends IEsSearchResponse { userDetails: UserItem; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/index.ts index 050610b9049c1..c83b0bcbb3e41 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TotalUsersKpiStrategyResponse } from './kpi/total_users'; +import type { TotalUsersKpiStrategyResponse } from './kpi/total_users'; export * from './all'; export * from './common'; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/authentications/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/authentications/index.ts index 342bd601291a5..2eb7676f3552a 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/authentications/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/authentications/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { KpiHistogramData, RequestBasicOptions } from '../../..'; +import type { Inspect, Maybe } from '../../../../common'; +import type { KpiHistogramData, RequestBasicOptions } from '../../..'; export interface UsersKpiAuthenticationsHistogramCount { doc_count: number; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/common/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/common/index.ts index 27f83e2ec623a..a151b39fe95aa 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/common/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/common/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Maybe } from '../../../..'; +import type { Maybe } from '../../../..'; export interface KpiHistogramData { x?: Maybe; diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/total_users/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/total_users/index.ts index 6aac185f71238..b493685244ee4 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/total_users/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/users/kpi/total_users/index.ts @@ -6,9 +6,9 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { Inspect, Maybe } from '../../../../common'; -import { RequestBasicOptions } from '../../..'; -import { KpiHistogramData } from '../common'; +import type { Inspect, Maybe } from '../../../../common'; +import type { RequestBasicOptions } from '../../..'; +import type { KpiHistogramData } from '../common'; export type TotalUsersKpiRequestOptions = RequestBasicOptions; diff --git a/x-pack/plugins/security_solution/common/search_strategy/timeline/index.ts b/x-pack/plugins/security_solution/common/search_strategy/timeline/index.ts index c25845ab7036d..871c24dc668d1 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/timeline/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/timeline/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEsSearchRequest } from '@kbn/data-plugin/common'; -import { ESQuery } from '../../typed_json'; -import { +import type { ESQuery } from '../../typed_json'; +import type { TimelineEventsQueries, TimelineEventsAllRequestOptions, TimelineEventsAllStrategyResponse, @@ -18,14 +18,14 @@ import { TimelineEventsLastEventTimeStrategyResponse, TimelineKpiStrategyResponse, } from './events'; -import { +import type { DocValueFields, PaginationInputPaginated, TimerangeInput, SortField, Maybe, } from '../common'; -import { +import type { DataProviderType, TimelineType, TimelineStatus, diff --git a/x-pack/plugins/security_solution/common/typed_json.ts b/x-pack/plugins/security_solution/common/typed_json.ts index 527a8ed381654..5621f2c52be04 100644 --- a/x-pack/plugins/security_solution/common/typed_json.ts +++ b/x-pack/plugins/security_solution/common/typed_json.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; -import { JsonObject } from '@kbn/utility-types'; +import type { BoolQuery } from '@kbn/es-query'; +import type { JsonObject } from '@kbn/utility-types'; export type ESQuery = | ESRangeQuery diff --git a/x-pack/plugins/security_solution/common/types/timeline/index.ts b/x-pack/plugins/security_solution/common/types/timeline/index.ts index 9b1405b78a57d..2e9a735546f6b 100644 --- a/x-pack/plugins/security_solution/common/types/timeline/index.ts +++ b/x-pack/plugins/security_solution/common/types/timeline/index.ts @@ -9,21 +9,20 @@ import * as runtimeTypes from 'io-ts'; import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import { stringEnum, unionWithNullType } from '../../utility_types'; -import { NoteResult, NoteSavedObject, NoteSavedObjectToReturnRuntimeType } from './note'; -import { - PinnedEventToReturnSavedObjectRuntimeType, - PinnedEventSavedObject, - PinnedEvent, -} from './pinned_event'; +import type { NoteResult, NoteSavedObject } from './note'; +import { NoteSavedObjectToReturnRuntimeType } from './note'; +import type { PinnedEventSavedObject, PinnedEvent } from './pinned_event'; +import { PinnedEventToReturnSavedObjectRuntimeType } from './pinned_event'; import { alias_purpose as savedObjectResolveAliasPurpose, outcome as savedObjectResolveOutcome, success, success_count as successCount, } from '../../detection_engine/schemas/common/schemas'; -import { FlowTargetSourceDest } from '../../search_strategy/security_solution/network'; +import type { FlowTargetSourceDest } from '../../search_strategy/security_solution/network'; import { errorSchema } from '../../detection_engine/schemas/response/error_schema'; -import { Direction, Maybe } from '../../search_strategy'; +import type { Maybe } from '../../search_strategy'; +import { Direction } from '../../search_strategy'; export * from './actions'; export * from './cells'; diff --git a/x-pack/plugins/security_solution/common/types/timeline/note/index.ts b/x-pack/plugins/security_solution/common/types/timeline/note/index.ts index 4bda81d75d92e..427db536dce3f 100644 --- a/x-pack/plugins/security_solution/common/types/timeline/note/index.ts +++ b/x-pack/plugins/security_solution/common/types/timeline/note/index.ts @@ -8,7 +8,8 @@ /* eslint-disable @typescript-eslint/no-empty-interface */ import * as runtimeTypes from 'io-ts'; -import { Direction, Maybe } from '../../../search_strategy/common'; +import type { Maybe } from '../../../search_strategy/common'; +import { Direction } from '../../../search_strategy/common'; import { unionWithNullType } from '../../../utility_types'; diff --git a/x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts b/x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts index df230615818ac..178c31bde4735 100644 --- a/x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts +++ b/x-pack/plugins/security_solution/common/types/timeline/pinned_event/index.ts @@ -8,7 +8,7 @@ /* eslint-disable @typescript-eslint/no-empty-interface */ import * as runtimeTypes from 'io-ts'; -import { Maybe } from '../../../search_strategy/common'; +import type { Maybe } from '../../../search_strategy/common'; import { unionWithNullType } from '../../../utility_types'; diff --git a/x-pack/plugins/security_solution/common/types/timeline/store.ts b/x-pack/plugins/security_solution/common/types/timeline/store.ts index f9399e4eeb6f4..af7662122b5d3 100644 --- a/x-pack/plugins/security_solution/common/types/timeline/store.ts +++ b/x-pack/plugins/security_solution/common/types/timeline/store.ts @@ -6,7 +6,7 @@ */ import type { Filter } from '@kbn/es-query'; -import { +import type { ColumnHeaderOptions, ColumnId, RowRendererId, @@ -14,8 +14,8 @@ import { TimelineTypeLiteral, } from '.'; -import { Direction } from '../../search_strategy'; -import { DataProvider } from './data_provider'; +import type { Direction } from '../../search_strategy'; +import type { DataProvider } from './data_provider'; export type KueryFilterQueryKind = 'kuery' | 'lucene' | 'eql'; diff --git a/x-pack/plugins/security_solution/common/utility_types.ts b/x-pack/plugins/security_solution/common/utility_types.ts index ccdbc254033fd..67e3591fd29e5 100644 --- a/x-pack/plugins/security_solution/common/utility_types.ts +++ b/x-pack/plugins/security_solution/common/utility_types.ts @@ -6,7 +6,7 @@ */ import * as runtimeTypes from 'io-ts'; -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; // This type is for typing EuiDescriptionList export interface DescriptionList { diff --git a/x-pack/plugins/security_solution/common/utils/field_formatters.test.ts b/x-pack/plugins/security_solution/common/utils/field_formatters.test.ts index 87e81921b2c13..4b253a8838095 100644 --- a/x-pack/plugins/security_solution/common/utils/field_formatters.test.ts +++ b/x-pack/plugins/security_solution/common/utils/field_formatters.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EventHit, EventSource } from '../search_strategy'; +import type { EventHit, EventSource } from '../search_strategy'; import { getDataFromFieldsHits, getDataFromSourceHits, getDataSafety } from './field_formatters'; import { eventDetailsFormattedFields, eventHit } from '@kbn/securitysolution-t-grid'; diff --git a/x-pack/plugins/security_solution/common/utils/field_formatters.ts b/x-pack/plugins/security_solution/common/utils/field_formatters.ts index b436f8e616122..27188d53d1864 100644 --- a/x-pack/plugins/security_solution/common/utils/field_formatters.ts +++ b/x-pack/plugins/security_solution/common/utils/field_formatters.ts @@ -7,7 +7,7 @@ import { get, isEmpty, isNumber, isObject, isString } from 'lodash/fp'; -import { EventHit, EventSource, TimelineEventsDetailsItem } from '../search_strategy'; +import type { EventHit, EventSource, TimelineEventsDetailsItem } from '../search_strategy'; import { toObjectArrayOfStrings, toStringArray } from './to_array'; export const baseCategoryFields = ['@timestamp', 'labels', 'message', 'tags']; diff --git a/x-pack/plugins/security_solution/common/utils/path_placeholder.test.ts b/x-pack/plugins/security_solution/common/utils/path_placeholder.test.ts index 58f9fa70f7395..657bb05c330ad 100644 --- a/x-pack/plugins/security_solution/common/utils/path_placeholder.test.ts +++ b/x-pack/plugins/security_solution/common/utils/path_placeholder.test.ts @@ -6,11 +6,8 @@ */ import { getPlaceholderTextByOSType, getPlaceholderText } from './path_placeholder'; -import { - ConditionEntryField, - OperatingSystem, - TrustedAppEntryTypes, -} from '@kbn/securitysolution-utils'; +import type { TrustedAppEntryTypes } from '@kbn/securitysolution-utils'; +import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; const trustedAppEntry = { os: OperatingSystem.LINUX, diff --git a/x-pack/plugins/security_solution/common/utils/path_placeholder.ts b/x-pack/plugins/security_solution/common/utils/path_placeholder.ts index b915c390b2011..498b55c27b41e 100644 --- a/x-pack/plugins/security_solution/common/utils/path_placeholder.ts +++ b/x-pack/plugins/security_solution/common/utils/path_placeholder.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ConditionEntryField, OperatingSystem, EntryTypes } from '@kbn/securitysolution-utils'; +import type { EntryTypes } from '@kbn/securitysolution-utils'; +import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; export const getPlaceholderText = () => ({ windows: { diff --git a/x-pack/plugins/security_solution/cypress/helpers/rules.ts b/x-pack/plugins/security_solution/cypress/helpers/rules.ts index 63542f9a78f84..5806654e71d88 100644 --- a/x-pack/plugins/security_solution/cypress/helpers/rules.ts +++ b/x-pack/plugins/security_solution/cypress/helpers/rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Mitre } from '../objects/rule'; +import type { Mitre } from '../objects/rule'; export const formatMitreAttackDescription = (mitre: Mitre[]) => { return mitre diff --git a/x-pack/plugins/security_solution/cypress/integration/cases/creation.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases/creation.spec.ts index 8207e2256c48b..0b53557dbcd03 100644 --- a/x-pack/plugins/security_solution/cypress/integration/cases/creation.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/cases/creation.spec.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { getCase1, TestCase } from '../../objects/case'; +import type { TestCase } from '../../objects/case'; +import { getCase1 } from '../../objects/case'; import { ALL_CASES_CLOSED_CASES_STATS, diff --git a/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts b/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts index 702d2dd35ee7c..a33e7f9bd295c 100644 --- a/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/cases/privileges.spec.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TestCaseWithoutTimeline } from '../../objects/case'; +import type { TestCaseWithoutTimeline } from '../../objects/case'; import { ALL_CASES_NAME } from '../../screens/all_cases'; import { goToCreateNewCase } from '../../tasks/all_cases'; diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/override.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/override.spec.ts index 31f6d83436437..701efb2706bf3 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/override.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/override.spec.ts @@ -6,12 +6,8 @@ */ import { formatMitreAttackDescription } from '../../helpers/rules'; -import { - getIndexPatterns, - getNewOverrideRule, - getSeveritiesOverride, - OverrideRule, -} from '../../objects/rule'; +import type { OverrideRule } from '../../objects/rule'; +import { getIndexPatterns, getNewOverrideRule, getSeveritiesOverride } from '../../objects/rule'; import { NUMBER_OF_ALERTS, ALERT_GRID_CELL } from '../../screens/alerts'; diff --git a/x-pack/plugins/security_solution/cypress/integration/detection_rules/threshold_rule.spec.ts b/x-pack/plugins/security_solution/cypress/integration/detection_rules/threshold_rule.spec.ts index a28d39ce7798d..9673de50bbae9 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detection_rules/threshold_rule.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/detection_rules/threshold_rule.spec.ts @@ -6,12 +6,8 @@ */ import { formatMitreAttackDescription } from '../../helpers/rules'; -import { - getIndexPatterns, - getNewRule, - getNewThresholdRule, - ThresholdRule, -} from '../../objects/rule'; +import type { ThresholdRule } from '../../objects/rule'; +import { getIndexPatterns, getNewRule, getNewThresholdRule } from '../../objects/rule'; import { ALERT_GRID_CELL, NUMBER_OF_ALERTS } from '../../screens/alerts'; diff --git a/x-pack/plugins/security_solution/cypress/objects/case.ts b/x-pack/plugins/security_solution/cypress/objects/case.ts index b0bfdbf16c705..e274922044fb5 100644 --- a/x-pack/plugins/security_solution/cypress/objects/case.ts +++ b/x-pack/plugins/security_solution/cypress/objects/case.ts @@ -6,7 +6,8 @@ */ import { flatten } from 'lodash'; -import { CompleteTimeline, getTimeline } from './timeline'; +import type { CompleteTimeline } from './timeline'; +import { getTimeline } from './timeline'; export interface TestCase extends TestCaseWithoutTimeline { timeline: CompleteTimeline; diff --git a/x-pack/plugins/security_solution/cypress/objects/rule.ts b/x-pack/plugins/security_solution/cypress/objects/rule.ts index eeb4b7b5b13ce..2e33c8d1c94bd 100644 --- a/x-pack/plugins/security_solution/cypress/objects/rule.ts +++ b/x-pack/plugins/security_solution/cypress/objects/rule.ts @@ -9,7 +9,8 @@ import type { RulesSchema } from '../../common/detection_engine/schemas/response /* eslint-disable @kbn/eslint/no-restricted-paths */ import { rawRules } from '../../server/lib/detection_engine/rules/prepackaged_rules'; import { getMockThreatData } from '../../public/detections/mitre/mitre_tactics_techniques'; -import { getTimeline, CompleteTimeline, getIndicatorMatchTimelineTemplate } from './timeline'; +import type { CompleteTimeline } from './timeline'; +import { getTimeline, getIndicatorMatchTimelineTemplate } from './timeline'; export const totalNumberOfPrebuiltRules = rawRules.length; diff --git a/x-pack/plugins/security_solution/cypress/objects/timeline.ts b/x-pack/plugins/security_solution/cypress/objects/timeline.ts index 028de768ae204..e4efc5bf0ea6a 100644 --- a/x-pack/plugins/security_solution/cypress/objects/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/objects/timeline.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TimelineResponse } from '../../common/types/timeline'; +import type { TimelineResponse } from '../../common/types/timeline'; export interface Timeline { title: string; diff --git a/x-pack/plugins/security_solution/cypress/screens/timeline.ts b/x-pack/plugins/security_solution/cypress/screens/timeline.ts index b1ece0d951766..34eebad2746cf 100644 --- a/x-pack/plugins/security_solution/cypress/screens/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/screens/timeline.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TimelineFilter } from '../objects/timeline'; +import type { TimelineFilter } from '../objects/timeline'; export const ADD_NOTE_BUTTON = '[data-test-subj="add-note"]'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/cases.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/cases.ts index 798cd184d6012..f41f1f40d5493 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/cases.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/cases.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TestCase } from '../../objects/case'; +import type { TestCase } from '../../objects/case'; export const createCase = (newCase: TestCase) => cy.request({ diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/exceptions.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/exceptions.ts index ab6c649c7c61f..68909d37dd1e4 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/exceptions.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/exceptions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExceptionList, ExceptionListItem } from '../../objects/exception'; +import type { ExceptionList, ExceptionListItem } from '../../objects/exception'; export const createExceptionList = ( exceptionList: ExceptionList, diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts index 3f60a8f01bc6e..829870fd35f5b 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CustomRule, ThreatIndicatorRule } from '../../objects/rule'; +import type { CustomRule, ThreatIndicatorRule } from '../../objects/rule'; export const createCustomRule = (rule: CustomRule, ruleId = 'rule_testing', interval = '100m') => cy.request({ diff --git a/x-pack/plugins/security_solution/cypress/tasks/api_calls/timelines.ts b/x-pack/plugins/security_solution/cypress/tasks/api_calls/timelines.ts index 32bdc9476073c..07655c399b218 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/api_calls/timelines.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/api_calls/timelines.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CompleteTimeline } from '../../objects/timeline'; +import type { CompleteTimeline } from '../../objects/timeline'; export const createTimeline = (timeline: CompleteTimeline) => cy.request({ diff --git a/x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts b/x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts index 4366ccf946e65..4019468ddc43e 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/configure_cases.ts @@ -18,7 +18,7 @@ import { } from '../screens/configure_cases'; import { MAIN_PAGE } from '../screens/security_main'; -import { Connector } from '../objects/case'; +import type { Connector } from '../objects/case'; export const addServiceNowConnector = (connector: Connector) => { cy.get(SERVICE_NOW_CONNECTOR_CARD).click(); diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts index 6f1868d047c06..6af4f167089cb 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_case.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { IbmResilientConnectorOptions, JiraConnectorOptions, ServiceNowconnectorOptions, diff --git a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts index 23602c6493da3..a1fd41d9703d1 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { getEmailConnector, EmailConnector } from '../objects/connector'; -import { +import type { EmailConnector } from '../objects/connector'; +import { getEmailConnector } from '../objects/connector'; +import type { CustomRule, MachineLearningRule, - getMachineLearningRule, OverrideRule, ThreatIndicatorRule, ThresholdRule, } from '../objects/rule'; +import { getMachineLearningRule } from '../objects/rule'; import { ABOUT_CONTINUE_BTN, ABOUT_EDIT_TAB, diff --git a/x-pack/plugins/security_solution/cypress/tasks/inspect.ts b/x-pack/plugins/security_solution/cypress/tasks/inspect.ts index 92c14b65b681b..fbb64430c59e9 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/inspect.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/inspect.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { INSPECT_BUTTON_ICON, InspectButtonMetadata } from '../screens/inspect'; +import type { InspectButtonMetadata } from '../screens/inspect'; +import { INSPECT_BUTTON_ICON } from '../screens/inspect'; export const closesModal = () => { cy.get('[data-test-subj="modal-inspect-close"]').click(); diff --git a/x-pack/plugins/security_solution/cypress/tasks/login.ts b/x-pack/plugins/security_solution/cypress/tasks/login.ts index f2beaa28ab8b6..7bf00aa573c83 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/login.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/login.ts @@ -6,9 +6,10 @@ */ import * as yaml from 'js-yaml'; -import Url, { UrlObject } from 'url'; +import type { UrlObject } from 'url'; +import Url from 'url'; -import { ROLES } from '../../common/test'; +import type { ROLES } from '../../common/test'; import { RULES_MANAGEMENT_FEATURE_TOUR_STORAGE_KEY } from '../../common/constants'; import { TIMELINE_FLYOUT_BODY } from '../screens/timeline'; import { hostDetailsUrl, LOGOUT_URL, userDetailsUrl } from '../urls/navigation'; diff --git a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts index 159f62778f74e..7f46061d4b03c 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/rule_details.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Exception } from '../objects/exception'; +import type { Exception } from '../objects/exception'; import { RULE_STATUS } from '../screens/create_new_rule'; import { ADD_EXCEPTIONS_BTN, diff --git a/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts b/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts index abb2e4a172a2e..5f6ebafcc7660 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SearchBarFilter } from '../objects/filter'; +import type { SearchBarFilter } from '../objects/filter'; import { GLOBAL_SEARCH_BAR_ADD_FILTER, diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts index deca534c89c6e..13286db96ae39 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Timeline, TimelineFilter } from '../objects/timeline'; +import type { Timeline, TimelineFilter } from '../objects/timeline'; import { ALL_CASES_CREATE_NEW_CASE_TABLE_BTN } from '../screens/all_cases'; import { FIELDS_BROWSER_CHECKBOX } from '../screens/fields_browser'; diff --git a/x-pack/plugins/security_solution/public/app/app.tsx b/x-pack/plugins/security_solution/public/app/app.tsx index 34b717e99145c..74aaa25f615fa 100644 --- a/x-pack/plugins/security_solution/public/app/app.tsx +++ b/x-pack/plugins/security_solution/public/app/app.tsx @@ -5,14 +5,15 @@ * 2.0. */ -import { History } from 'history'; -import React, { memo, FC } from 'react'; -import { Store, Action } from 'redux'; +import type { History } from 'history'; +import type { FC } from 'react'; +import React, { memo } from 'react'; +import type { Store, Action } from 'redux'; import { Provider as ReduxStoreProvider } from 'react-redux'; import { EuiErrorBoundary } from '@elastic/eui'; import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; +import type { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { ManageUserInfo } from '../detections/components/user_info'; @@ -26,9 +27,9 @@ import { useKibana, useUiSetting$, } from '../common/lib/kibana'; -import { State } from '../common/store'; +import type { State } from '../common/store'; -import { StartServices } from '../types'; +import type { StartServices } from '../types'; import { PageRouter } from './routes'; import { UserPrivilegesProvider } from '../common/components/user_privileges/user_privileges_context'; import { ReactQueryClientProvider } from '../common/containers/query_client/query_client_provider'; diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts index 409b27c9ede41..2e829e87c1490 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { getDeepLinks } from '.'; -import { AppDeepLink, Capabilities } from '@kbn/core/public'; +import type { AppDeepLink, Capabilities } from '@kbn/core/public'; import { SecurityPageName } from '../types'; import { mockGlobalState } from '../../common/mock'; import { CASES_FEATURE_ID, SERVER_APP_ID } from '../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/app/deep_links/index.ts b/x-pack/plugins/security_solution/public/app/deep_links/index.ts index 4758b91e961f1..c6745b4f9b614 100644 --- a/x-pack/plugins/security_solution/public/app/deep_links/index.ts +++ b/x-pack/plugins/security_solution/public/app/deep_links/index.ts @@ -8,10 +8,11 @@ import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; -import { LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { LicenseType } from '@kbn/licensing-plugin/common/types'; import { getCasesDeepLinks } from '@kbn/cases-plugin/public'; -import { AppDeepLink, AppNavLinkStatus, AppUpdater, Capabilities } from '@kbn/core/public'; -import { Subject, Subscription } from 'rxjs'; +import type { AppDeepLink, AppUpdater, Capabilities } from '@kbn/core/public'; +import { AppNavLinkStatus } from '@kbn/core/public'; +import type { Subject, Subscription } from 'rxjs'; import { SecurityPageName } from '../types'; import { OVERVIEW, @@ -63,9 +64,9 @@ import { RULES_CREATE_PATH, RESPONSE_ACTIONS_PATH, } from '../../../common/constants'; -import { ExperimentalFeatures } from '../../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../../common/experimental_features'; import { subscribeAppLinks } from '../../common/links'; -import { AppLinkItems } from '../../common/links/types'; +import type { AppLinkItems } from '../../common/links/types'; const FEATURE = { general: `${SERVER_APP_ID}.show`, diff --git a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx index bc21dc804cb33..13a1a70a8c174 100644 --- a/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/global_header/index.tsx @@ -15,7 +15,7 @@ import { useLocation } from 'react-router-dom'; import { createPortalNode, InPortal, OutPortal } from 'react-reverse-portal'; import { i18n } from '@kbn/i18n'; -import { AppMountParameters } from '@kbn/core/public'; +import type { AppMountParameters } from '@kbn/core/public'; import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { MlPopover } from '../../../common/components/ml_popover/ml_popover'; import { useKibana } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts index b890b42fef1b0..0d8795dcdf8a7 100644 --- a/x-pack/plugins/security_solution/public/app/home/home_navigations.ts +++ b/x-pack/plugins/security_solution/public/app/home/home_navigations.ts @@ -6,11 +6,8 @@ */ import * as i18n from '../translations'; -import { - SecurityNav, - SecurityNavGroup, - SecurityNavGroupKey, -} from '../../common/components/navigation/types'; +import type { SecurityNav, SecurityNavGroup } from '../../common/components/navigation/types'; +import { SecurityNavGroupKey } from '../../common/components/navigation/types'; import { APP_OVERVIEW_PATH, APP_DETECTION_RESPONSE_PATH, diff --git a/x-pack/plugins/security_solution/public/app/home/index.tsx b/x-pack/plugins/security_solution/public/app/home/index.tsx index 2597f1ab41ff2..ad2a22b5024b6 100644 --- a/x-pack/plugins/security_solution/public/app/home/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { useLocation } from 'react-router-dom'; -import { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; +import type { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; import { DragDropContextWrapper } from '../../common/components/drag_and_drop/drag_drop_context_wrapper'; import { SecuritySolutionAppWrapper } from '../../common/components/page'; import { HelpMenu } from '../../common/components/help_menu'; diff --git a/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx b/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx index 853c4b634d348..407c0db35f49d 100644 --- a/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/template_wrapper/bottom_bar/index.tsx @@ -8,8 +8,8 @@ /* eslint-disable react/display-name */ import React from 'react'; -import { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; -import { AppLeaveHandler } from '@kbn/core/public'; +import type { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; +import type { AppLeaveHandler } from '@kbn/core/public'; import { TimelineId } from '../../../../../common/types/timeline'; import { AutoSaveWarningMsg } from '../../../../timelines/components/timeline/auto_save_warning'; import { Flyout } from '../../../../timelines/components/flyout'; diff --git a/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx b/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx index 36022b4a91ed2..ff786ba943dae 100644 --- a/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx +++ b/x-pack/plugins/security_solution/public/app/home/template_wrapper/index.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; import { EuiPanel, EuiThemeProvider, useEuiTheme } from '@elastic/eui'; import { IS_DRAGGING_CLASS_NAME } from '@kbn/securitysolution-t-grid'; -import { AppLeaveHandler } from '@kbn/core/public'; +import type { AppLeaveHandler } from '@kbn/core/public'; import { KibanaPageTemplate } from '@kbn/shared-ux-components'; import { useSecuritySolutionNavigation } from '../../../common/components/navigation/use_security_solution_navigation'; import { TimelineId } from '../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/app/index.tsx b/x-pack/plugins/security_solution/public/app/index.tsx index 1e4817307c227..98b82a8d5b8fa 100644 --- a/x-pack/plugins/security_solution/public/app/index.tsx +++ b/x-pack/plugins/security_solution/public/app/index.tsx @@ -12,7 +12,7 @@ import { Route } from '@kbn/kibana-react-plugin/public'; import { NotFoundPage } from './404'; import { SecurityApp } from './app'; -import { RenderAppProps } from './types'; +import type { RenderAppProps } from './types'; export const renderApp = ({ element, diff --git a/x-pack/plugins/security_solution/public/app/routes.tsx b/x-pack/plugins/security_solution/public/app/routes.tsx index a5a82a68d06ef..38625c0d7fc27 100644 --- a/x-pack/plugins/security_solution/public/app/routes.tsx +++ b/x-pack/plugins/security_solution/public/app/routes.tsx @@ -5,16 +5,17 @@ * 2.0. */ -import { History } from 'history'; -import React, { FC, memo, useEffect } from 'react'; +import type { History } from 'history'; +import type { FC } from 'react'; +import React, { memo, useEffect } from 'react'; import { Router, Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; import { useDispatch } from 'react-redux'; -import { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; +import type { AppLeaveHandler, AppMountParameters } from '@kbn/core/public'; import { ManageRoutesSpy } from '../common/utils/route/manage_spy_routes'; import { RouteCapture } from '../common/components/endpoint/route_capture'; -import { AppAction } from '../common/store/actions'; +import type { AppAction } from '../common/store/actions'; import { NotFoundPage } from './404'; import { HomePage } from './home'; diff --git a/x-pack/plugins/security_solution/public/app/types.ts b/x-pack/plugins/security_solution/public/app/types.ts index 455420472e5af..f44f27609a5d1 100644 --- a/x-pack/plugins/security_solution/public/app/types.ts +++ b/x-pack/plugins/security_solution/public/app/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { Reducer, AnyAction, Middleware, @@ -15,10 +15,10 @@ import { StateFromReducersMapObject, CombinedState, } from 'redux'; -import { RouteProps } from 'react-router-dom'; -import { AppMountParameters } from '@kbn/core/public'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; -import { StartServices } from '../types'; +import type { RouteProps } from 'react-router-dom'; +import type { AppMountParameters } from '@kbn/core/public'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +import type { StartServices } from '../types'; /** * The React properties used to render `SecurityApp` as well as the `element` to render it into. @@ -30,10 +30,10 @@ export interface RenderAppProps extends AppMountParameters { usageCollection?: UsageCollectionSetup; } -import { State, SubPluginsInitReducer } from '../common/store'; -import { Immutable } from '../../common/endpoint/types'; -import { AppAction } from '../common/store/actions'; -import { TimelineState } from '../timelines/store/timeline/types'; +import type { State, SubPluginsInitReducer } from '../common/store'; +import type { Immutable } from '../../common/endpoint/types'; +import type { AppAction } from '../common/store/actions'; +import type { TimelineState } from '../timelines/store/timeline/types'; export { SecurityPageName } from '../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/cases/index.ts b/x-pack/plugins/security_solution/public/cases/index.ts index 631276a6bf6b4..2fd472756adc5 100644 --- a/x-pack/plugins/security_solution/public/cases/index.ts +++ b/x-pack/plugins/security_solution/public/cases/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { routes } from './routes'; export class Cases { diff --git a/x-pack/plugins/security_solution/public/cases/links.ts b/x-pack/plugins/security_solution/public/cases/links.ts index 57e01813c77ed..4beb1c625cda1 100644 --- a/x-pack/plugins/security_solution/public/cases/links.ts +++ b/x-pack/plugins/security_solution/public/cases/links.ts @@ -7,7 +7,7 @@ import { getCasesDeepLinks } from '@kbn/cases-plugin/public'; import { CASES_FEATURE_ID, CASES_PATH, SecurityPageName } from '../../common/constants'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; export const getCasesLinkItems = (): LinkItem => { const casesLinks = getCasesDeepLinks({ diff --git a/x-pack/plugins/security_solution/public/cases/pages/index.tsx b/x-pack/plugins/security_solution/public/cases/pages/index.tsx index 9eb4c57da74c2..081f9a62ef96a 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/cases/pages/index.tsx @@ -7,7 +7,7 @@ import React, { useCallback, useRef } from 'react'; import { useDispatch } from 'react-redux'; -import { CaseViewRefreshPropInterface } from '@kbn/cases-plugin/common'; +import type { CaseViewRefreshPropInterface } from '@kbn/cases-plugin/common'; import { TimelineId } from '../../../common/types/timeline'; import { getRuleDetailsUrl, useFormatUrl } from '../../common/components/link_to'; diff --git a/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts b/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts index 73a41cfdddbab..bfbf8659a2026 100644 --- a/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts +++ b/x-pack/plugins/security_solution/public/cases/pages/use_fetch_alert_data.ts @@ -6,11 +6,12 @@ */ import { useMemo } from 'react'; -import { Ecs } from '@kbn/cases-plugin/common'; +import type { Ecs } from '@kbn/cases-plugin/common'; import { useSourcererDataView } from '../../common/containers/sourcerer'; import { SourcererScopeName } from '../../common/store/sourcerer/model'; import { useQueryAlerts } from '../../detections/containers/detection_engine/alerts/use_query'; -import { buildAlertsQuery, formatAlertToEcsSignal, SignalHit } from '../../common/utils/alerts'; +import type { SignalHit } from '../../common/utils/alerts'; +import { buildAlertsQuery, formatAlertToEcsSignal } from '../../common/utils/alerts'; export const useFetchAlertData = (alertIds: string[]): [boolean, Record] => { const { selectedPatterns } = useSourcererDataView(SourcererScopeName.detections); diff --git a/x-pack/plugins/security_solution/public/cases/routes.tsx b/x-pack/plugins/security_solution/public/cases/routes.tsx index 8774b3e11a556..802dde39b251a 100644 --- a/x-pack/plugins/security_solution/public/cases/routes.tsx +++ b/x-pack/plugins/security_solution/public/cases/routes.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; import { CASES_PATH } from '../../common/constants'; import { Cases } from './pages'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx index 75b3965736d25..60a4f1c8a23d3 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/alerts_table.tsx @@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux'; import type { Filter } from '@kbn/es-query'; import type { EntityType } from '@kbn/timelines-plugin/common'; import { timelineActions } from '../../../timelines/store/timeline'; -import { TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { TimelineIdLiteral } from '../../../../common/types/timeline'; import { StatefulEventsViewer } from '../events_viewer'; import { alertsDefaultModel } from './default_headers'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts index b848af576e96d..3bf7ab3e9a4da 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/default_headers.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { ColumnHeaderOptions, RowRendererId } from '../../../../common/types/timeline'; +import type { ColumnHeaderOptions } from '../../../../common/types/timeline'; +import { RowRendererId } from '../../../../common/types/timeline'; import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; -import { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; +import type { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; export const alertsHeaders: ColumnHeaderOptions[] = [ diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts index f8500651145cb..143bfb3d4fe7e 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/histogram_configs.ts @@ -6,7 +6,7 @@ */ import * as i18n from './translations'; -import { MatrixHistogramOption, MatrixHistogramConfigs } from '../matrix_histogram/types'; +import type { MatrixHistogramOption, MatrixHistogramConfigs } from '../matrix_histogram/types'; import { MatrixHistogramType } from '../../../../common/search_strategy/security_solution/matrix_histogram'; import { getExternalAlertLensAttributes } from '../visualization_actions/lens_attributes/common/external_alert'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx index b0471a72c6ee6..e6dde5c8c0cd1 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/index.tsx @@ -11,13 +11,13 @@ import numeral from '@elastic/numeral'; import { DEFAULT_NUMBER_FORMAT } from '../../../../common/constants'; import { useGlobalFullScreen } from '../../containers/use_full_screen'; -import { AlertsComponentsProps } from './types'; +import type { AlertsComponentsProps } from './types'; import { AlertsTable } from './alerts_table'; import * as i18n from './translations'; import { useUiSetting$ } from '../../lib/kibana'; import { MatrixHistogram } from '../matrix_histogram'; import { histogramConfigs } from './histogram_configs'; -import { MatrixHistogramConfigs } from '../matrix_histogram/types'; +import type { MatrixHistogramConfigs } from '../matrix_histogram/types'; const ID = 'alertsHistogramQuery'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts index 6c9e5dc704ecb..d212fe21c54a8 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/alerts_viewer/types.ts @@ -7,10 +7,10 @@ import type { Filter } from '@kbn/es-query'; import type { EntityType } from '@kbn/timelines-plugin/common'; -import { TimelineIdLiteral } from '../../../../common/types/timeline'; -import { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; -import { NetworkComponentQueryProps } from '../../../network/pages/navigation/types'; -import { MatrixHistogramOption } from '../matrix_histogram/types'; +import type { TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; +import type { NetworkComponentQueryProps } from '../../../network/pages/navigation/types'; +import type { MatrixHistogramOption } from '../matrix_histogram/types'; type CommonQueryProps = HostsComponentsQueryProps | NetworkComponentQueryProps; diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx index 8695ad1539477..730e742f424c3 100644 --- a/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/__examples__/index.stories.tsx @@ -6,7 +6,8 @@ */ import { storiesOf } from '@storybook/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { ThemeProvider } from 'styled-components'; import { euiLightVars } from '@kbn/ui-theme'; import { EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge.tsx index eac20b0673426..83e2ee4a69ff1 100644 --- a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge.tsx +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge.tsx @@ -10,7 +10,7 @@ import React from 'react'; import styled from 'styled-components'; import * as i18n from './translations'; -import { AndOr } from '.'; +import type { AndOr } from '.'; const RoundBadge = styled(EuiBadge)` align-items: center; diff --git a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.tsx b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.tsx index 0de488c4af102..399dc434a6505 100644 --- a/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.tsx +++ b/x-pack/plugins/security_solution/public/common/components/and_or_badge/rounded_badge_antenna.tsx @@ -10,7 +10,7 @@ import React from 'react'; import styled, { css } from 'styled-components'; import { RoundedBadge } from './rounded_badge'; -import { AndOr } from '.'; +import type { AndOr } from '.'; const antennaStyles = css` background: ${({ theme }) => theme.eui.euiColorLightShade}; diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx b/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx index d462b8bb5f2e4..65ac3b8a790ff 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/authentication/authentications_host_table.tsx @@ -19,7 +19,7 @@ import { } from './helpers'; import { useAuthentications } from '../../containers/authentications'; import { useQueryInspector } from '../page/manage_query'; -import { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; +import type { HostsComponentsQueryProps } from '../../../hosts/pages/navigation/types'; import { hostsActions, hostsModel, hostsSelectors } from '../../../hosts/store'; import { useQueryToggle } from '../../containers/query_toggle'; import { useDeepEqualSelector } from '../../hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx b/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx index 4a717530ddda1..f0c9a7318bc9f 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/authentication/authentications_user_table.tsx @@ -23,7 +23,7 @@ import { useQueryInspector } from '../page/manage_query'; import { useQueryToggle } from '../../containers/query_toggle'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { usersActions, usersModel, usersSelectors } from '../../../users/store'; -import { AuthenticationsUserTableProps } from './types'; +import type { AuthenticationsUserTableProps } from './types'; const TABLE_QUERY_ID = 'authenticationsUsersTableQuery'; diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx index 38c4f55cb6e3b..f87c0c3362359 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/authentication/helpers.tsx @@ -10,19 +10,20 @@ import React from 'react'; import { getEmptyTagValue } from '../empty_value'; import { FormattedRelativePreferenceDate } from '../formatted_date'; -import { Columns, ItemsPerRow } from '../paginated_table'; +import type { Columns, ItemsPerRow } from '../paginated_table'; import { getRowItemDraggables } from '../tables/helpers'; import * as i18n from './translations'; import { HostDetailsLink, NetworkDetailsLink, UserDetailsLink } from '../links'; -import { AuthenticationsEdges, MatrixHistogramType } from '../../../../common/search_strategy'; -import { AuthTableColumns } from './types'; -import { +import type { AuthenticationsEdges } from '../../../../common/search_strategy'; +import { MatrixHistogramType } from '../../../../common/search_strategy'; +import type { AuthTableColumns } from './types'; +import type { MatrixHistogramConfigs, MatrixHistogramMappingTypes, MatrixHistogramOption, } from '../matrix_histogram/types'; -import { LensAttributes } from '../visualization_actions/types'; +import type { LensAttributes } from '../visualization_actions/types'; import { authenticationLensAttributes } from '../visualization_actions/lens_attributes/common/authentication'; export const getHostDetailsAuthenticationColumns = (): AuthTableColumns => [ diff --git a/x-pack/plugins/security_solution/public/common/components/authentication/types.ts b/x-pack/plugins/security_solution/public/common/components/authentication/types.ts index 4c1000dc8e1ac..79bae099239fb 100644 --- a/x-pack/plugins/security_solution/public/common/components/authentication/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/authentication/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { AuthenticationsEdges } from '../../../../common/search_strategy'; -import { UsersComponentsQueryProps } from '../../../users/pages/navigation/types'; -import { Columns } from '../paginated_table'; +import type { AuthenticationsEdges } from '../../../../common/search_strategy'; +import type { UsersComponentsQueryProps } from '../../../users/pages/navigation/types'; +import type { Columns } from '../paginated_table'; export type AuthTableColumns = Array>; export interface AuthenticationsUserTableProps extends UsersComponentsQueryProps { diff --git a/x-pack/plugins/security_solution/public/common/components/autofocus_button/autofocus_button.tsx b/x-pack/plugins/security_solution/public/common/components/autofocus_button/autofocus_button.tsx index 5c84b4625ef30..6b53e48714c70 100644 --- a/x-pack/plugins/security_solution/public/common/components/autofocus_button/autofocus_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/autofocus_button/autofocus_button.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import { EuiButton, EuiButtonProps, PropsForButton } from '@elastic/eui'; -import React, { FC, memo, useEffect, useRef } from 'react'; +import type { EuiButtonProps, PropsForButton } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; +import type { FC } from 'react'; +import React, { memo, useEffect, useRef } from 'react'; export const AutoFocusButton: FC> = memo((props) => { const buttonRef = useRef(null); diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout.test.tsx b/x-pack/plugins/security_solution/public/common/components/callouts/callout.test.tsx index f908a79361d0a..a2c3f8cd4ccae 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout.test.tsx @@ -9,7 +9,7 @@ import { mount } from 'enzyme'; import React from 'react'; import { TestProviders } from '../../mock'; import { CallOut } from './callout'; -import { CallOutMessage } from './callout_types'; +import type { CallOutMessage } from './callout_types'; describe('callout', () => { let message: CallOutMessage = { diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout.tsx b/x-pack/plugins/security_solution/public/common/components/callouts/callout.tsx index 2077e421c427a..49df22b02c7fb 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout.tsx +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import React, { FC, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; import { EuiCallOut } from '@elastic/eui'; import { assertUnreachable } from '../../../../common/utility_types'; -import { CallOutType, CallOutMessage } from './callout_types'; +import type { CallOutType, CallOutMessage } from './callout_types'; import { CallOutDismissButton } from './callout_dismiss_button'; export interface CallOutProps { diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout_dismiss_button.tsx b/x-pack/plugins/security_solution/public/common/components/callouts/callout_dismiss_button.tsx index b00072be6cc5f..18e4e58fa5e7d 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout_dismiss_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout_dismiss_button.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { FC, useCallback } from 'react'; +import type { FC } from 'react'; +import React, { useCallback } from 'react'; import { EuiButton } from '@elastic/eui'; import { noop } from 'lodash/fp'; -import { CallOutMessage } from './callout_types'; +import type { CallOutMessage } from './callout_types'; import * as i18n from './translations'; export interface CallOutDismissButtonProps { diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout_persistent_switcher.tsx b/x-pack/plugins/security_solution/public/common/components/callouts/callout_persistent_switcher.tsx index 5b67410bb904a..fdbe6262b1b75 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout_persistent_switcher.tsx +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout_persistent_switcher.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { FC, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; -import { CallOutMessage } from './callout_types'; +import type { CallOutMessage } from './callout_types'; import { CallOut } from './callout'; export interface CallOutPersistentSwitcherProps { diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout_switcher.tsx b/x-pack/plugins/security_solution/public/common/components/callouts/callout_switcher.tsx index 43f10604d8582..9cfa1a34a924e 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout_switcher.tsx +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout_switcher.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { FC, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import { CallOutMessage } from './callout_types'; +import type { CallOutMessage } from './callout_types'; import { CallOut } from './callout'; import { useCallOutStorage } from './use_callout_storage'; diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/callout_types.ts b/x-pack/plugins/security_solution/public/common/components/callouts/callout_types.ts index e04638a57ad06..9a4f033efec60 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/callout_types.ts +++ b/x-pack/plugins/security_solution/public/common/components/callouts/callout_types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiCallOutProps } from '@elastic/eui'; +import type { EuiCallOutProps } from '@elastic/eui'; export type CallOutType = NonNullable; diff --git a/x-pack/plugins/security_solution/public/common/components/callouts/use_callout_storage.ts b/x-pack/plugins/security_solution/public/common/components/callouts/use_callout_storage.ts index ae7acdf3001c9..ef905d860f520 100644 --- a/x-pack/plugins/security_solution/public/common/components/callouts/use_callout_storage.ts +++ b/x-pack/plugins/security_solution/public/common/components/callouts/use_callout_storage.ts @@ -9,7 +9,7 @@ import { difference, fromPairs, identity, intersection, isEqual } from 'lodash/f import { useCallback, useEffect } from 'react'; import useMap from 'react-use/lib/useMap'; import { useMessagesStorage } from '../../containers/local_storage/use_messages_storage'; -import { CallOutMessage } from './callout_types'; +import type { CallOutMessage } from './callout_types'; export interface CallOutStorage { getVisibleMessageIds: () => string[]; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx index 1b64fa5d990cc..4655564a9725f 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/areachart.test.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { ShallowWrapper, shallow } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; import React from 'react'; import { AreaChartBaseComponent, AreaChartComponent } from './areachart'; -import { ChartSeriesData } from './common'; +import type { ChartSeriesData } from './common'; import { ScaleType, AreaSeries, Axis } from '@elastic/charts'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx index 8da0b0b707be4..aa5db991bc088 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/areachart.tsx @@ -6,16 +6,8 @@ */ import React, { useMemo } from 'react'; -import { - Axis, - AreaSeries, - Chart, - Position, - ScaleType, - Settings, - AreaSeriesStyle, - RecursivePartial, -} from '@elastic/charts'; +import type { AreaSeriesStyle, RecursivePartial } from '@elastic/charts'; +import { Axis, AreaSeries, Chart, Position, ScaleType, Settings } from '@elastic/charts'; import { getOr, get, isNull, isNumber } from 'lodash/fp'; @@ -23,10 +15,9 @@ import { EuiFlexItem } from '@elastic/eui'; import { useThrottledResizeObserver } from '../utils'; import { ChartPlaceHolder } from './chart_place_holder'; import { useTimeZone } from '../../lib/kibana'; +import type { ChartSeriesConfigs, ChartSeriesData } from './common'; import { chartDefaultSettings, - ChartSeriesConfigs, - ChartSeriesData, getChartHeight, getChartWidth, WrappedByAutoSizer, @@ -35,7 +26,7 @@ import { ChartWrapper, } from './common'; import { VisualizationActions, HISTOGRAM_ACTIONS_BUTTON_CLASS } from '../visualization_actions'; -import { VisualizationActionsProps } from '../visualization_actions/types'; +import type { VisualizationActionsProps } from '../visualization_actions/types'; import { HoverVisibilityContainer } from '../hover_visibility_container'; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx index 2315401b3c760..38d3aeb37bac9 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/barchart.test.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import { Chart, BarSeries, Axis, ScaleType, AxisStyle } from '@elastic/charts'; -import { mount, ReactWrapper, shallow, ShallowWrapper } from 'enzyme'; +import type { AxisStyle } from '@elastic/charts'; +import { Chart, BarSeries, Axis, ScaleType } from '@elastic/charts'; +import type { ReactWrapper, ShallowWrapper } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import React from 'react'; import { escapeDataProviderId } from '../drag_and_drop/helpers'; @@ -15,7 +17,7 @@ import '../../mock/match_media'; import '../../mock/react_beautiful_dnd'; import { BarChartBaseComponent, BarChartComponent } from './barchart'; -import { ChartSeriesData } from './common'; +import type { ChartSeriesData } from './common'; jest.mock('@elastic/eui', () => { const original = jest.requireActual('@elastic/eui'); diff --git a/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx index 91e328c876775..7b0c87d919a0b 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/barchart.tsx @@ -24,8 +24,6 @@ import { EMPTY_VALUE_LABEL } from './translation'; import { ChartPlaceHolder } from './chart_place_holder'; import { chartDefaultSettings, - ChartSeriesConfigs, - ChartSeriesData, checkIfAllValuesAreZero, getChartHeight, getChartWidth, @@ -35,10 +33,10 @@ import { ChartWrapper, } from './common'; import { DraggableLegend } from './draggable_legend'; -import { LegendItem } from './draggable_legend_item'; -import type { ChartData } from './common'; +import type { LegendItem } from './draggable_legend_item'; +import type { ChartData, ChartSeriesConfigs, ChartSeriesData } from './common'; import { VisualizationActions, HISTOGRAM_ACTIONS_BUTTON_CLASS } from '../visualization_actions'; -import { VisualizationActionsProps } from '../visualization_actions/types'; +import type { VisualizationActionsProps } from '../visualization_actions/types'; import { HoverVisibilityContainer } from '../hover_visibility_container'; const LegendFlexItem = styled(EuiFlexItem)` diff --git a/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx index 3c5715b6b7968..429f459714af7 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.test.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { shallow, ShallowWrapper } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; import React from 'react'; import { ChartPlaceHolder } from './chart_place_holder'; -import { ChartSeriesData } from './common'; +import type { ChartSeriesData } from './common'; describe('ChartPlaceHolder', () => { let shallowWrapper: ShallowWrapper; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx index c15ab72df1c7a..bce7146d3c1db 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/chart_place_holder.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { EuiFlexItem, EuiText, EuiFlexGroup } from '@elastic/eui'; import styled from 'styled-components'; -import { ChartSeriesData, checkIfAllValuesAreZero } from './common'; +import type { ChartSeriesData } from './common'; +import { checkIfAllValuesAreZero } from './common'; import * as i18n from './translation'; const FlexGroup = styled(EuiFlexGroup)<{ height?: string | null; width?: string | null }>` diff --git a/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx index 765045f503ab5..e6d9143566b40 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx @@ -10,13 +10,13 @@ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { useUiSetting } from '../../lib/kibana'; +import type { ChartSeriesData } from './common'; import { checkIfAllValuesAreZero, defaultChartHeight, getChartHeight, getChartWidth, WrappedByAutoSizer, - ChartSeriesData, useTheme, } from './common'; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx index cc24da4f27eb7..0cdfebdb47d57 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/common.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/common.tsx @@ -5,21 +5,18 @@ * 2.0. */ -import { - DARK_THEME, - LIGHT_THEME, - mergeWithDefaultTheme, +import type { PartialTheme, Rendering, Rotation, ScaleType, SettingsProps, TickFormatter, - Position, BrushEndListener, AxisStyle, BarSeriesStyle, } from '@elastic/charts'; +import { DARK_THEME, LIGHT_THEME, mergeWithDefaultTheme, Position } from '@elastic/charts'; import { EuiFlexGroup } from '@elastic/eui'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/donutchart.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/donutchart.test.tsx index 82e51f0b4a06f..d68bb2d2266bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/donutchart.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/donutchart.test.tsx @@ -6,11 +6,12 @@ */ import React from 'react'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import { Partition, Settings } from '@elastic/charts'; import { parsedMockAlertsData } from '../../../overview/components/detection_response/alerts_by_status/mock_data'; import { render } from '@testing-library/react'; -import { DonutChart, DonutChartProps } from './donutchart'; +import type { DonutChartProps } from './donutchart'; +import { DonutChart } from './donutchart'; import { DraggableLegend } from './draggable_legend'; import { ChartLabel } from '../../../overview/components/detection_response/alerts_by_status/chart_label'; import { escapeDataProviderId } from '../drag_and_drop/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/donutchart.tsx b/x-pack/plugins/security_solution/public/common/components/charts/donutchart.tsx index 2708fefc76522..74d67b8e554a5 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/donutchart.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/donutchart.tsx @@ -8,20 +8,18 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, useEuiTheme } from '@elastic/eui'; import React, { useMemo } from 'react'; +import type { Datum, NodeColorAccessor, PartialTheme } from '@elastic/charts'; import { Chart, - Datum, Partition, Settings, PartitionLayout, defaultPartitionValueFormatter, - NodeColorAccessor, - PartialTheme, } from '@elastic/charts'; import styled from 'styled-components'; import { useTheme } from './common'; import { DraggableLegend } from './draggable_legend'; -import { LegendItem } from './draggable_legend_item'; +import type { LegendItem } from './draggable_legend_item'; import { DonutChartEmpty } from './donutchart_empty'; export const NO_LEGEND_DATA: LegendItem[] = []; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx index 4dd6fa32db0ab..6b7fa6fb5354b 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import '../../mock/match_media'; @@ -13,7 +14,7 @@ import '../../mock/react_beautiful_dnd'; import { TestProviders } from '../../mock'; import { MIN_LEGEND_HEIGHT, DraggableLegend } from './draggable_legend'; -import { LegendItem } from './draggable_legend_item'; +import type { LegendItem } from './draggable_legend_item'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx index beb104a925810..6c511ba874128 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend.tsx @@ -10,7 +10,8 @@ import { rgba } from 'polished'; import React from 'react'; import styled from 'styled-components'; -import { DraggableLegendItem, LegendItem } from './draggable_legend_item'; +import type { LegendItem } from './draggable_legend_item'; +import { DraggableLegendItem } from './draggable_legend_item'; export const MIN_LEGEND_HEIGHT = 175; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx index a712296873b88..5072df82c96c6 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/draggable_legend_item.test.tsx @@ -5,14 +5,16 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import '../../mock/match_media'; import '../../mock/react_beautiful_dnd'; import { TestProviders } from '../../mock'; -import { DraggableLegendItem, LegendItem } from './draggable_legend_item'; +import type { LegendItem } from './draggable_legend_item'; +import { DraggableLegendItem } from './draggable_legend_item'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/conditions_table/index.tsx b/x-pack/plugins/security_solution/public/common/components/conditions_table/index.tsx index 62d52b6bfd08b..29d6a8e430d6a 100644 --- a/x-pack/plugins/security_solution/public/common/components/conditions_table/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/conditions_table/index.tsx @@ -7,15 +7,11 @@ import React from 'react'; import styled from 'styled-components'; -import { - EuiBasicTableProps, - EuiBasicTable, - EuiFlexGroup, - EuiFlexItem, - EuiHideFor, -} from '@elastic/eui'; +import type { EuiBasicTableProps } from '@elastic/eui'; +import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiHideFor } from '@elastic/eui'; -import { AndOr, AndOrBadge } from '../and_or_badge'; +import type { AndOr } from '../and_or_badge'; +import { AndOrBadge } from '../and_or_badge'; const AndOrBadgeContainer = styled(EuiFlexItem)` padding-top: ${({ theme }) => theme.eui.euiSizeXL}; diff --git a/x-pack/plugins/security_solution/public/common/components/conditions_table/test_utils.ts b/x-pack/plugins/security_solution/public/common/components/conditions_table/test_utils.ts index aa4120bee70f4..2b1884552a5c1 100644 --- a/x-pack/plugins/security_solution/public/common/components/conditions_table/test_utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/conditions_table/test_utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiTableFieldDataColumnType } from '@elastic/eui'; +import type { EuiTableFieldDataColumnType } from '@elastic/eui'; export interface TestItem { name: string; diff --git a/x-pack/plugins/security_solution/public/common/components/current_license/index.tsx b/x-pack/plugins/security_solution/public/common/components/current_license/index.tsx index 11ca7cc1bda3c..50843302c621d 100644 --- a/x-pack/plugins/security_solution/public/common/components/current_license/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/current_license/index.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import React, { FC, memo, useEffect } from 'react'; +import type { FC } from 'react'; +import React, { memo, useEffect } from 'react'; import { useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { Dispatch } from 'redux'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { licenseService } from '../../hooks/use_license'; -import { AppAction } from '../../store/actions'; +import type { AppAction } from '../../store/actions'; export const CurrentLicense: FC = memo(({ children }) => { const dispatch = useDispatch>(); diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx index a19d16d25013f..02f5d26e2d58d 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context.tsx @@ -7,7 +7,7 @@ // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/40309 -import { MovementMode, DraggableId } from 'react-beautiful-dnd'; +import type { MovementMode, DraggableId } from 'react-beautiful-dnd'; export interface BeforeCapture { draggableId: DraggableId; diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx index bb600238da135..f8d73dd10a779 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/drag_drop_context_wrapper.tsx @@ -7,9 +7,10 @@ import { noop, pick } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; -import { DropResult, DragDropContext } from 'react-beautiful-dnd'; +import type { DropResult } from 'react-beautiful-dnd'; +import { DragDropContext } from 'react-beautiful-dnd'; import { useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import deepEqual from 'fast-deep-equal'; import { IS_DRAGGING_CLASS_NAME } from '@kbn/securitysolution-t-grid'; @@ -17,12 +18,12 @@ import { addFieldToTimelineColumns, getTimelineIdFromColumnDroppableId, } from '@kbn/timelines-plugin/public'; -import { BeforeCapture } from './drag_drop_context'; -import { BrowserFields } from '../../containers/source'; +import type { BeforeCapture } from './drag_drop_context'; +import type { BrowserFields } from '../../containers/source'; import { dragAndDropSelectors } from '../../store'; import { timelineSelectors } from '../../../timelines/store/timeline'; -import { IdToDataProvider } from '../../store/drag_and_drop/model'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { IdToDataProvider } from '../../store/drag_and_drop/model'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; import { reArrangeProviders } from '../../../timelines/components/timeline/data_providers/helpers'; import { ADDED_TO_TIMELINE_MESSAGE, diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx index bf2e6de1675b6..c12643a30f943 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.test.tsx @@ -7,7 +7,7 @@ import { shallow } from 'enzyme'; import React from 'react'; -import { DraggableStateSnapshot, DraggingStyle } from 'react-beautiful-dnd'; +import type { DraggableStateSnapshot, DraggingStyle } from 'react-beautiful-dnd'; import { waitFor } from '@testing-library/react'; import '../../mock/match_media'; import { mockBrowserFields } from '../../containers/source/mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx index 738f9f96d67c0..f972bcf463b5b 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper.tsx @@ -8,19 +8,18 @@ import { EuiScreenReaderOnly } from '@elastic/eui'; import { DRAGGABLE_KEYBOARD_WRAPPER_CLASS_NAME } from '@kbn/securitysolution-t-grid'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { - Draggable, +import type { DraggableProvided, DraggableStateSnapshot, DraggingStyle, - Droppable, NotDraggingStyle, } from 'react-beautiful-dnd'; +import { Draggable, Droppable } from 'react-beautiful-dnd'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { dragAndDropActions } from '../../store/drag_and_drop'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; import { ROW_RENDERER_BROWSER_EXAMPLE_TIMELINE_ID } from '../../../timelines/components/row_renderers_browser/constants'; import { TruncatableText } from '../truncatable_text'; diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx index 34e82d0ddecd8..dc3c963a8adfb 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/droppable_wrapper.tsx @@ -7,7 +7,8 @@ import { rgba } from 'polished'; import React, { useCallback } from 'react'; -import { Droppable, DraggableChildrenFn } from 'react-beautiful-dnd'; +import type { DraggableChildrenFn } from 'react-beautiful-dnd'; +import { Droppable } from 'react-beautiful-dnd'; import styled from 'styled-components'; interface Props { diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts index 4858b6f2da66c..25206ce7da209 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.test.ts @@ -6,10 +6,10 @@ */ import { omit } from 'lodash/fp'; -import { DropResult } from 'react-beautiful-dnd'; +import type { DropResult } from 'react-beautiful-dnd'; import { getTimelineIdFromColumnDroppableId } from '@kbn/timelines-plugin/public'; -import { IdToDataProvider } from '../../store/drag_and_drop/model'; +import type { IdToDataProvider } from '../../store/drag_and_drop/model'; import { addProviderToTimeline, diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts index 99af5e2443915..ad38235d1b757 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts @@ -4,15 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { DropResult } from 'react-beautiful-dnd'; -import { Dispatch } from 'redux'; -import { ActionCreator } from 'typescript-fsa'; +import type { DropResult } from 'react-beautiful-dnd'; +import type { Dispatch } from 'redux'; +import type { ActionCreator } from 'typescript-fsa'; import { getProviderIdFromDraggable } from '@kbn/securitysolution-t-grid'; import { dragAndDropActions } from '../../store/actions'; -import { IdToDataProvider } from '../../store/drag_and_drop/model'; +import type { IdToDataProvider } from '../../store/drag_and_drop/model'; import { addContentToTimeline } from '../../../timelines/components/timeline/data_providers/helpers'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; export { draggableIdPrefix, diff --git a/x-pack/plugins/security_solution/public/common/components/draggables/index.tsx b/x-pack/plugins/security_solution/public/common/components/draggables/index.tsx index 1c98d385d671c..a29ab7f2cc3ba 100644 --- a/x-pack/plugins/security_solution/public/common/components/draggables/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/draggables/index.tsx @@ -13,10 +13,8 @@ import styled from 'styled-components'; import { DragEffects, DraggableWrapper } from '../drag_and_drop/draggable_wrapper'; import { escapeDataProviderId } from '../drag_and_drop/helpers'; import { getEmptyStringTag } from '../empty_value'; -import { - DataProvider, - IS_OPERATOR, -} from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; export interface DefaultDraggableType { diff --git a/x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx index ac691d8be2bd5..819fbf3cc5627 100644 --- a/x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/empty_page/index.tsx @@ -5,15 +5,10 @@ * 2.0. */ -import { - EuiButton, - EuiEmptyPrompt, - EuiFlexGroup, - EuiFlexItem, - IconType, - EuiCard, -} from '@elastic/eui'; -import React, { MouseEventHandler, ReactNode, useMemo } from 'react'; +import type { IconType } from '@elastic/eui'; +import { EuiButton, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiCard } from '@elastic/eui'; +import type { MouseEventHandler, ReactNode } from 'react'; +import React, { useMemo } from 'react'; import styled from 'styled-components'; const EmptyPrompt = styled(EuiEmptyPrompt)` diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/agent_status.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/agent_status.tsx index 64206feeac3c4..7b7a9c5fb9e56 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/agent_status.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/agent_status.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiBadge } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { HostStatus } from '../../../../common/endpoint/types'; +import type { HostStatus } from '../../../../common/endpoint/types'; import { HOST_STATUS_TO_BADGE_COLOR } from '../../../management/pages/endpoint_hosts/view/host_constants'; export const AgentStatus = React.memo(({ hostStatus }: { hostStatus: HostStatus }) => { diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context.tsx index a8bbf1833b4db..182681d3242f8 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_cases_context.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { MutableRefObject, useContext } from 'react'; -import { CaseViewRefreshPropInterface } from '@kbn/cases-plugin/common'; +import type { MutableRefObject } from 'react'; +import React, { useContext } from 'react'; +import type { CaseViewRefreshPropInterface } from '@kbn/cases-plugin/common'; /** * React Context that can hold the `Ref` that is created an passed to `CaseViewProps['refreshRef`]`, enabling diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_status.test.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_status.test.tsx index 8ed591d96fd4b..f50036041a0d6 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_status.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/endpoint_host_isolation_status.test.tsx @@ -6,11 +6,10 @@ */ import React from 'react'; -import { - EndpointHostIsolationStatus, - EndpointHostIsolationStatusProps, -} from './endpoint_host_isolation_status'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../mock/endpoint'; +import type { EndpointHostIsolationStatusProps } from './endpoint_host_isolation_status'; +import { EndpointHostIsolationStatus } from './endpoint_host_isolation_status'; +import type { AppContextTestRender } from '../../../mock/endpoint'; +import { createAppRootMockRenderer } from '../../../mock/endpoint'; describe('when using the EndpointHostIsolationStatus component', () => { let render: ( diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_form.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_form.tsx index 258c981cf6057..ce1e1939ef1bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_form.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_form.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ChangeEventHandler, memo, ReactNode, useCallback } from 'react'; +import type { ChangeEventHandler, ReactNode } from 'react'; +import React, { memo, useCallback } from 'react'; import { EuiButton, EuiButtonEmpty, diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_success.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_success.tsx index 881cea7c3c276..d041c94183ccc 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_success.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/isolate_success.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo, useMemo } from 'react'; import { EuiCallOut, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { GET_ISOLATION_SUCCESS_MESSAGE, GET_UNISOLATION_SUCCESS_MESSAGE } from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/unisolate_form.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/unisolate_form.tsx index a0913d58a6bdb..4e8358f3810fb 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/unisolate_form.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/host_isolation/unisolate_form.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ChangeEventHandler, memo, useCallback } from 'react'; +import type { ChangeEventHandler } from 'react'; +import React, { memo, useCallback } from 'react'; import { EuiButton, EuiButtonEmpty, @@ -18,7 +19,7 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { CANCEL, COMMENT, COMMENT_PLACEHOLDER, CONFIRM, UNISOLATE, ISOLATED } from './translations'; -import { EndpointIsolatedFormProps } from './isolate_form'; +import type { EndpointIsolatedFormProps } from './isolate_form'; export const EndpointUnisolateForm = memo( ({ hostName, onCancel, onConfirm, onChange, comment = '', messageAppend, isLoading = false }) => { diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx index 8480239f48a95..724d0489a6dbc 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { LinkToApp } from './link_to_app'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { coreMock } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx index dba8dce6d2df7..cb4856fbf3728 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/link_to_app.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { memo, MouseEventHandler } from 'react'; -import { EuiLink, EuiLinkProps, EuiButton, EuiButtonProps } from '@elastic/eui'; +import type { MouseEventHandler } from 'react'; +import React, { memo } from 'react'; +import type { EuiLinkProps, EuiButtonProps } from '@elastic/eui'; +import { EuiLink, EuiButton } from '@elastic/eui'; import { useNavigateToAppEventHandler } from '../../hooks/endpoint/use_navigate_to_app_event_handler'; import { APP_UI_ID } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx b/x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx index cbbec4a623e6b..75149e7351448 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/route_capture.tsx @@ -9,7 +9,7 @@ import React, { memo, useEffect } from 'react'; import { useLocation } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import { TimelineId } from '@kbn/timelines-plugin/common'; -import { AppLocation } from '../../../../common/endpoint/types'; +import type { AppLocation } from '../../../../common/endpoint/types'; import { timelineActions } from '../../../timelines/store/timeline'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx index 98be87c737d58..51888a1a6bda8 100644 --- a/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/error_toast_dispatcher/index.test.tsx @@ -18,7 +18,7 @@ import { import { createStore } from '../../store/store'; import { ErrorToastDispatcher } from '.'; -import { State } from '../../store/types'; +import type { State } from '../../store/types'; describe('Error Toast Dispatcher', () => { const state: State = mockGlobalState; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx index 3e6da12efe8e8..e354c1e6600cc 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.test.tsx @@ -10,7 +10,7 @@ import { waitFor, render, act } from '@testing-library/react'; import { AlertSummaryView } from './alert_summary_view'; import { mockAlertDetailsData } from './__mocks__'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { useRuleWithFallback } from '../../../detections/containers/detection_engine/rules/use_rule_with_fallback'; import { TestProviders, TestProvidersComponent } from '../../mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx index 69c881ef6eac8..037b2f4312827 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/alert_summary_view.tsx @@ -7,10 +7,10 @@ import React, { useMemo } from 'react'; -import { BrowserFields } from '../../../../common/search_strategy/index_fields'; +import type { BrowserFields } from '../../../../common/search_strategy/index_fields'; import { SummaryView } from './summary_view'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { getSummaryRows } from './get_alert_summary_rows'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx index be197499a700b..79676e76076f6 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/columns.test.tsx @@ -4,13 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; import React from 'react'; import { getColumns } from './columns'; import { TestProviders } from '../../mock'; import { useMountAppended } from '../../utils/use_mount_appended'; import { mockBrowserFields } from '../../containers/source/mock'; -import { EventFieldsData } from './types'; +import type { EventFieldsData } from './types'; import { get } from 'lodash/fp'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx index baea88334bb05..d76e5dcf8587a 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx @@ -10,12 +10,12 @@ import { get } from 'lodash'; import memoizeOne from 'memoize-one'; import React from 'react'; import styled from 'styled-components'; -import { BrowserFields } from '../../containers/source'; -import { OnUpdateColumns } from '../../../timelines/components/timeline/events'; +import type { BrowserFields } from '../../containers/source'; +import type { OnUpdateColumns } from '../../../timelines/components/timeline/events'; import * as i18n from './translations'; -import { EventFieldsData } from './types'; -import { ColumnHeaderOptions } from '../../../../common/types'; -import { BrowserField } from '../../../../common/search_strategy'; +import type { EventFieldsData } from './types'; +import type { ColumnHeaderOptions } from '../../../../common/types'; +import type { BrowserField } from '../../../../common/search_strategy'; import { FieldValueCell } from './table/field_value_cell'; import { FieldNameCell } from './table/field_name_cell'; import { ActionCell } from './table/action_cell'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx index a88e47690dd51..71100ee3bc07d 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_accordion_group.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; import styled from 'styled-components'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiAccordion, EuiFlexGroup, @@ -13,16 +14,11 @@ import { EuiLink, EuiSpacer, EuiToolTip, - EuiBasicTableColumn, } from '@elastic/eui'; -import { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; -import { - getEnrichmentIdentifiers, - isInvestigationTimeEnrichment, - getFirstSeen, - ThreatDetailsRow, -} from './helpers'; +import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; +import type { ThreatDetailsRow } from './helpers'; +import { getEnrichmentIdentifiers, isInvestigationTimeEnrichment, getFirstSeen } from './helpers'; import { EnrichmentButtonContent } from './enrichment_button_content'; import { ThreatSummaryTitle } from './threat_summary_title'; import { InspectButton } from '../../inspect'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx index 5f185307e8247..b6367e9f7ffeb 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx @@ -11,12 +11,12 @@ import React from 'react'; import { EuiPanel, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { partition } from 'lodash'; import * as i18n from './translations'; -import { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; +import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; import { getEnrichmentIdentifiers, isInvestigationTimeEnrichment } from './helpers'; -import { FieldsData } from '../types'; +import type { FieldsData } from '../types'; import { ActionCell } from '../table/action_cell'; -import { +import type { BrowserField, BrowserFields, TimelineEventsDetailsItem, diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx index 4787ac1a95f30..9e54506f424d7 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/helpers.tsx @@ -16,13 +16,13 @@ import { MATCHED_TYPE, FEED_NAME, } from '../../../../../common/cti/constants'; -import { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; -import { +import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; +import type { CtiEnrichment, CtiEnrichmentIdentifiers, EventFields, - isValidEventField, } from '../../../../../common/search_strategy/security_solution/cti'; +import { isValidEventField } from '../../../../../common/search_strategy/security_solution/cti'; import { getFirstElement } from '../../../../../common/utils/data_retrieval'; import { getDataFromSourceHits } from '../../../../../common/utils/field_formatters'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx index e42b87ecb4909..078fb0e1442cd 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/host_risk_summary.tsx @@ -12,8 +12,8 @@ import * as i18n from './translations'; import { RISKY_HOSTS_DOC_LINK } from '../../../../overview/components/overview_risky_host_links/risky_hosts_disabled_module'; import { EnrichedDataRow, ThreatSummaryPanelHeader } from './threat_summary_view'; import { RiskScore } from '../../severity/common'; -import { RiskSeverity } from '../../../../../common/search_strategy'; -import { HostRisk } from '../../../../risk_score/containers'; +import type { RiskSeverity } from '../../../../../common/search_strategy'; +import type { HostRisk } from '../../../../risk_score/containers'; const HostRiskSummaryComponent: React.FC<{ hostRisk: HostRisk; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx index 5800ffb4beb9d..2602220ee1850 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_details_view.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { groupBy } from 'lodash'; import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; -import { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; +import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; import * as i18n from './translations'; import { EnrichmentIcon } from './enrichment_icon'; import { EnrichmentAccordionGroup } from './enrichment_accordion_group'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx index 64c547842cd11..91a0a0397602f 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_table.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import styled, { AnyStyledComponent } from 'styled-components'; +import type { AnyStyledComponent } from 'styled-components'; +import styled from 'styled-components'; import { EuiInMemoryTable } from '@elastic/eui'; export const ThreatSummaryTable = styled(EuiInMemoryTable as unknown as AnyStyledComponent)` diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.test.tsx index cfccea2cadf81..94c2aa6bc9e8d 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.test.tsx @@ -12,7 +12,7 @@ import { TestProviders } from '../../../mock'; import { render } from '@testing-library/react'; import { buildEventEnrichmentMock } from '../../../../../common/search_strategy/security_solution/cti/index.mock'; import { mockAlertDetailsData } from '../__mocks__'; -import { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; import { mockBrowserFields } from '../../../containers/source/mock'; import { mockTimelines } from '../../../mock/mock_timelines_plugin'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx index 5de2ea5c6235c..d626b862ab778 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/threat_summary_view.tsx @@ -19,18 +19,18 @@ import { EuiText, } from '@elastic/eui'; import * as i18n from './translations'; -import { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; +import type { CtiEnrichment } from '../../../../../common/search_strategy/security_solution/cti'; -import { FieldsData } from '../types'; +import type { FieldsData } from '../types'; -import { +import type { BrowserField, BrowserFields, TimelineEventsDetailsItem, } from '../../../../../common/search_strategy'; import { HostRiskSummary } from './host_risk_summary'; import { EnrichmentSummary } from './enrichment_summary'; -import { HostRisk } from '../../../../risk_score/containers'; +import type { HostRisk } from '../../../../risk_score/containers'; export interface ThreatSummaryDescription { browserField: BrowserField; 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 bd4170a9cbbe7..cb4affec563d5 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 @@ -6,7 +6,7 @@ */ import { waitFor } from '@testing-library/dom'; -import { ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; import React from 'react'; import '../../mock/match_media'; @@ -17,7 +17,7 @@ import { EventDetails, EventsViewType } from './event_details'; import { mockBrowserFields } from '../../containers/source/mock'; import { useMountAppended } from '../../utils/use_mount_appended'; import { mockAlertDetailsData } from './__mocks__'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { TimelineTabs } from '../../../../common/types/timeline'; import { useInvestigationTimeEnrichment } from '../../containers/cti/event_enrichment'; import { useGetUserCasesPermissions } from '../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx index 1bebeb09b58d0..ea9dc050cc32b 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.tsx @@ -5,10 +5,10 @@ * 2.0. */ +import type { EuiTabbedContentTab } from '@elastic/eui'; import { EuiHorizontalRule, EuiTabbedContent, - EuiTabbedContentTab, EuiSpacer, EuiLoadingContent, EuiNotificationBadge, @@ -26,10 +26,10 @@ import { ThreatSummaryView } from './cti_details/threat_summary_view'; import { ThreatDetailsView } from './cti_details/threat_details_view'; import * as i18n from './translations'; import { AlertSummaryView } from './alert_summary_view'; -import { BrowserFields } from '../../containers/source'; +import type { BrowserFields } from '../../containers/source'; import { useInvestigationTimeEnrichment } from '../../containers/cti/event_enrichment'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; -import { TimelineTabs } from '../../../../common/types/timeline'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; +import type { TimelineTabs } from '../../../../common/types/timeline'; import { filterDuplicateEnrichments, getEnrichmentFields, @@ -40,7 +40,7 @@ import { EnrichmentRangePicker } from './cti_details/enrichment_range_picker'; import { Reason } from './reason'; import { InvestigationGuideView } from './investigation_guide_view'; import { Overview } from './overview'; -import { HostRisk } from '../../../risk_score/containers'; +import type { HostRisk } from '../../../risk_score/containers'; import { RelatedCases } from './related_cases'; type EventViewTab = EuiTabbedContentTab; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx index 344b21589f9de..ba837f09e44d3 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_fields_browser.tsx @@ -21,14 +21,15 @@ import { import { ADD_TIMELINE_BUTTON_CLASS_NAME } from '../../../timelines/components/flyout/add_timeline_button'; import { timelineActions, timelineSelectors } from '../../../timelines/store/timeline'; -import { BrowserFields, getAllFieldsByName } from '../../containers/source'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; +import type { BrowserFields } from '../../containers/source'; +import { getAllFieldsByName } from '../../containers/source'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; import { getColumnHeaders } from '../../../timelines/components/timeline/body/column_headers/helpers'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; import { getColumns } from './columns'; import { EVENT_FIELDS_TABLE_CLASS_NAME, onEventDetailsTabKeyPressed, search } from './helpers'; import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { ColumnHeaderOptions, TimelineTabs } from '../../../../common/types/timeline'; +import type { ColumnHeaderOptions, TimelineTabs } from '../../../../common/types/timeline'; interface Props { browserFields: BrowserFields; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/get_alert_summary_rows.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/get_alert_summary_rows.tsx index eb4bc09580ead..a9884aa2262fe 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/get_alert_summary_rows.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/get_alert_summary_rows.tsx @@ -9,7 +9,7 @@ import { find, isEmpty, uniqBy } from 'lodash/fp'; import { ALERT_RULE_PARAMETERS, ALERT_RULE_TYPE } from '@kbn/rule-data-utils'; import * as i18n from './translations'; -import { BrowserFields } from '../../../../common/search_strategy/index_fields'; +import type { BrowserFields } from '../../../../common/search_strategy/index_fields'; import { ALERTS_HEADERS_THRESHOLD_CARDINALITY, ALERTS_HEADERS_THRESHOLD_COUNT, @@ -18,9 +18,10 @@ import { } from '../../../detections/components/alerts_table/translations'; import { ALERT_THRESHOLD_RESULT } from '../../../../common/field_maps/field_names'; import { AGENT_STATUS_FIELD_NAME } from '../../../timelines/components/timeline/body/renderers/constants'; -import { getEnrichedFieldInfo, AlertSummaryRow } from './helpers'; -import { EventSummaryField, EnrichedFieldInfo } from './types'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; +import type { AlertSummaryRow } from './helpers'; +import { getEnrichedFieldInfo } from './helpers'; +import type { EventSummaryField, EnrichedFieldInfo } from './types'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy/timeline'; import { isAlertFromEndpointEvent } from '../../utils/endpoint_alert_check'; import { EventCode, EventCategory } from '../../../../common/ecs/event'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx index 1c75778455384..8ef74e38eb690 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/helpers.tsx @@ -14,7 +14,7 @@ import { handleSkipFocus, stopPropagationAndPreventDefault, } from '@kbn/timelines-plugin/public'; -import { BrowserField, BrowserFields } from '../../containers/source'; +import type { BrowserField, BrowserFields } from '../../containers/source'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH, DEFAULT_COLUMN_MIN_WIDTH, @@ -23,7 +23,7 @@ import type { TimelineEventsDetailsItem } from '../../../../common/search_strate import type { EnrichedFieldInfo, EventSummaryField } from './types'; import * as i18n from './translations'; -import { ColumnHeaderOptions } from '../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../common/types'; import { AGENT_STATUS_FIELD_NAME } from '../../../timelines/components/timeline/body/renderers/constants'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx index dfec4ab07db16..5148dde4d6b59 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/investigation_guide_view.tsx @@ -15,7 +15,7 @@ import * as i18n from './translations'; import { useRuleWithFallback } from '../../../detections/containers/detection_engine/rules/use_rule_with_fallback'; import { MarkdownRenderer } from '../markdown_editor'; import { LineClamp } from '../line_clamp'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; export const Indent = styled.div` padding: 0 8px; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.tsx index 6b46d6985202e..3df57015e702c 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/overview_card.tsx @@ -10,7 +10,7 @@ import React, { useState } from 'react'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { ActionCell } from '../table/action_cell'; -import { EnrichedFieldInfo } from '../types'; +import type { EnrichedFieldInfo } from '../types'; const ActionWrapper = euiStyled.div` width: 0; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx index 00c0940d12b1f..70b3b0f16463e 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/overview/status_popover_button.tsx @@ -9,7 +9,7 @@ import { EuiContextMenuPanel, EuiPopover, EuiPopoverTitle } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import { useAlertsActions } from '../../../../detections/components/alerts_table/timeline_actions/use_alerts_actions'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import { CHANGE_ALERT_STATUS, CLICK_TO_CHANGE_ALERT_STATUS, diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx index 88208dd1b9780..2cb5751f4f82c 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/reason.tsx @@ -10,7 +10,7 @@ import { ALERT_REASON } from '@kbn/rule-data-utils'; import React, { useMemo } from 'react'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { EVENT_DETAILS_PLACEHOLDER } from '../../../timelines/components/side_panel/event_details/translations'; import { getFieldValue } from '../../../detections/components/host_isolation/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.test.tsx index bf863576341c4..46f20edbeb629 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.test.tsx @@ -8,12 +8,12 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BrowserField } from '../../containers/source'; +import type { BrowserField } from '../../containers/source'; import { TestProviders } from '../../mock'; -import { EventFieldsData } from './types'; +import type { EventFieldsData } from './types'; import { SummaryView } from './summary_view'; import { TimelineId } from '../../../../common/types'; -import { AlertSummaryRow } from './helpers'; +import type { AlertSummaryRow } from './helpers'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.tsx index 7946143f1d156..188047e2d8ce0 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/summary_view.tsx @@ -5,8 +5,8 @@ * 2.0. */ +import type { EuiBasicTableColumn } from '@elastic/eui'; import { - EuiBasicTableColumn, EuiLink, EuiTitle, EuiFlexGroup, diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/action_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/action_cell.tsx index 7e46948cef190..748e613182d24 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/action_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/action_cell.tsx @@ -9,8 +9,8 @@ import React, { useCallback, useState, useContext } from 'react'; import { TimelineContext } from '@kbn/timelines-plugin/public'; import { HoverActions } from '../../hover_actions'; import { useActionCellDataProvider } from './use_action_cell_data_provider'; -import { EnrichedFieldInfo } from '../types'; -import { ColumnHeaderOptions } from '../../../../../common/types/timeline'; +import type { EnrichedFieldInfo } from '../types'; +import type { ColumnHeaderOptions } from '../../../../../common/types/timeline'; interface Props extends EnrichedFieldInfo { contextId: string; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx index 396ecbc5484ed..415f538422d8f 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_name_cell.tsx @@ -12,8 +12,8 @@ import { FieldIcon } from '@kbn/react-field'; import type { DataViewField } from '@kbn/data-views-plugin/common'; import * as i18n from '../translations'; import { getExampleText } from '../helpers'; -import { BrowserField } from '../../../containers/source'; -import { EventFieldsData } from '../types'; +import type { BrowserField } from '../../../containers/source'; +import type { EventFieldsData } from '../types'; import { getFieldTypeName } from './get_field_type_name'; export interface FieldNameCellProps { diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx index 710cf5fceeb21..bbadaba78a092 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.test.tsx @@ -8,10 +8,10 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BrowserField } from '../../../containers/source'; +import type { BrowserField } from '../../../containers/source'; import { FieldValueCell } from './field_value_cell'; import { TestProviders } from '../../../mock'; -import { EventFieldsData } from '../types'; +import type { EventFieldsData } from '../types'; const contextId = 'test'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx index 8c9bc4830b6d8..bd4a59414e114 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import { BrowserField } from '../../../containers/source'; +import type { BrowserField } from '../../../containers/source'; import { OverflowField } from '../../tables/helpers'; import { FormattedFieldValue } from '../../../../timelines/components/timeline/body/renderers/formatted_field'; import { MESSAGE_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; -import { EventFieldsData, FieldsData } from '../types'; +import type { EventFieldsData, FieldsData } from '../types'; export interface FieldValueCellProps { contextId: string; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.test.tsx index 32382c7dfa51d..3f2c363660d60 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.test.tsx @@ -8,10 +8,10 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BrowserField } from '../../../containers/source'; +import type { BrowserField } from '../../../containers/source'; import { InvestigateInTimelineButton } from './investigate_in_timeline_button'; import { TestProviders } from '../../../mock'; -import { EventFieldsData } from '../types'; +import type { EventFieldsData } from '../types'; import { TimelineId } from '../../../../../common/types'; import { ACTION_INVESTIGATE_IN_TIMELINE } from '../../../../detections/components/alerts_table/translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx index 49967c130f3ae..49228be748504 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/investigate_in_timeline_button.tsx @@ -10,7 +10,7 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { isEmpty } from 'lodash'; import { useDispatch } from 'react-redux'; -import { AlertSummaryRow } from '../helpers'; +import type { AlertSummaryRow } from '../helpers'; import { inputsActions } from '../../../store/inputs'; import { updateProviders } from '../../../../timelines/store/timeline/actions'; import { sourcererActions } from '../../../store/actions'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx index e7a24fd7c7a31..f87a08fdf6c5e 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.test.tsx @@ -8,12 +8,12 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BrowserField } from '../../../containers/source'; +import type { BrowserField } from '../../../containers/source'; import { PrevalenceCellRenderer } from './prevalence_cell'; import { TestProviders } from '../../../mock'; -import { EventFieldsData } from '../types'; +import type { EventFieldsData } from '../types'; import { TimelineId } from '../../../../../common/types'; -import { AlertSummaryRow } from '../helpers'; +import type { AlertSummaryRow } from '../helpers'; import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; import { getEmptyValue } from '../../empty_value'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx index fee1f4bbe2dd7..5fb127ccadb93 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/prevalence_cell.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; -import { AlertSummaryRow } from '../helpers'; +import type { AlertSummaryRow } from '../helpers'; import { getEmptyTagValue } from '../../empty_value'; import { InvestigateInTimelineButton } from './investigate_in_timeline_button'; import { useAlertPrevalence } from '../../../containers/alerts/use_alert_prevalence'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_table.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_table.tsx index 089d9607c261d..dc170e831350c 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_table.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import styled, { AnyStyledComponent } from 'styled-components'; +import type { AnyStyledComponent } from 'styled-components'; +import styled from 'styled-components'; import { EuiInMemoryTable } from '@elastic/eui'; export const SummaryTable = styled(EuiInMemoryTable as unknown as AnyStyledComponent)` diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx index 10c4c839ee2e6..3dc940695b625 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.test.tsx @@ -8,11 +8,11 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BrowserField } from '../../../containers/source'; +import type { BrowserField } from '../../../containers/source'; import { SummaryValueCell } from './summary_value_cell'; import { TestProviders } from '../../../mock'; -import { EventFieldsData } from '../types'; -import { AlertSummaryRow } from '../helpers'; +import type { EventFieldsData } from '../types'; +import type { AlertSummaryRow } from '../helpers'; import { TimelineId } from '../../../../../common/types'; import { AGENT_STATUS_FIELD_NAME } from '../../../../timelines/components/timeline/body/renderers/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx index 60f6271605c1b..34af84807feed 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/summary_value_cell.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { ActionCell } from './action_cell'; import { FieldValueCell } from './field_value_cell'; -import { AlertSummaryRow, hasHoverOrRowActions } from '../helpers'; +import type { AlertSummaryRow } from '../helpers'; +import { hasHoverOrRowActions } from '../helpers'; import { TimelineId } from '../../../../../common/types'; const style = { flexGrow: 0 }; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts b/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts index 1dded682f54ba..ad2290015554d 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts @@ -27,8 +27,9 @@ import { BYTES_FORMAT } from '../../../../timelines/components/timeline/body/ren import { EVENT_DURATION_FIELD_NAME } from '../../../../timelines/components/duration'; import { PORT_NAMES } from '../../../../network/components/port/helpers'; import { INDICATOR_REFERENCE } from '../../../../../common/cti/constants'; -import { BrowserField } from '../../../containers/source'; -import { DataProvider, IS_OPERATOR } from '../../../../../common/types'; +import type { BrowserField } from '../../../containers/source'; +import type { DataProvider } from '../../../../../common/types'; +import { IS_OPERATOR } from '../../../../../common/types'; export interface UseActionCellDataProvider { contextId?: string; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/types.ts b/x-pack/plugins/security_solution/public/common/components/event_details/types.ts index 9b64ddd4db5d0..c59a39b31dbce 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/event_details/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { BrowserField } from '../../containers/source'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { BrowserField } from '../../containers/source'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; export type EventFieldsData = BrowserField & TimelineEventsDetailsItem; diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx index 956a4f9da3c99..5f7d6c226c76f 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.test.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { TimelineId } from '../../../../common/types'; import { HostsType } from '../../../hosts/store/model'; import { TestProviders } from '../../mock'; -import { EventsQueryTabBody, EventsQueryTabBodyComponentProps } from './events_query_tab_body'; +import type { EventsQueryTabBodyComponentProps } from './events_query_tab_body'; +import { EventsQueryTabBody } from './events_query_tab_body'; import { useGlobalFullScreen } from '../../containers/use_full_screen'; import * as tGridActions from '@kbn/timelines-plugin/public/store/t_grid/actions'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx index e98c397d41991..9227bc1849859 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx @@ -8,8 +8,8 @@ import React, { useEffect, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { Filter } from '@kbn/es-query'; -import { TimelineId } from '../../../../common/types/timeline'; +import type { Filter } from '@kbn/es-query'; +import type { TimelineId } from '../../../../common/types/timeline'; import { StatefulEventsViewer } from '../events_viewer'; import { timelineActions } from '../../../timelines/store/timeline'; import { eventsDefaultModel } from '../events_viewer/default_model'; @@ -26,10 +26,10 @@ import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_fe import { DEFAULT_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; import { getEventsHistogramLensAttributes } from '../visualization_actions/lens_attributes/hosts/events'; import { defaultCellActions } from '../../lib/cell_actions/default_cell_actions'; -import { GlobalTimeArgs } from '../../containers/use_global_time'; -import { MatrixHistogramConfigs, MatrixHistogramOption } from '../matrix_histogram/types'; -import { QueryTabBodyProps as UserQueryTabBodyProps } from '../../../users/pages/navigation/types'; -import { QueryTabBodyProps as HostQueryTabBodyProps } from '../../../hosts/pages/navigation/types'; +import type { GlobalTimeArgs } from '../../containers/use_global_time'; +import type { MatrixHistogramConfigs, MatrixHistogramOption } from '../matrix_histogram/types'; +import type { QueryTabBodyProps as UserQueryTabBodyProps } from '../../../users/pages/navigation/types'; +import type { QueryTabBodyProps as HostQueryTabBodyProps } from '../../../hosts/pages/navigation/types'; const EVENTS_HISTOGRAM_ID = 'eventsHistogramQuery'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx index b7de934cfaa0a..0a36d3a8215bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_headers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ColumnHeaderOptions } from '../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../common/types'; import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx index 079cfd0b807f8..385fd43daae8f 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/default_model.tsx @@ -6,7 +6,7 @@ */ import { defaultHeaders } from './default_headers'; -import { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; +import type { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; export const eventsDefaultModel: SubsetTimelineModel = { diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx index a3d4bf6f42557..c96fa89380e8c 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.test.tsx @@ -23,7 +23,7 @@ import { useTimelineEvents } from '../../../timelines/containers'; import { getDefaultControlColumn } from '../../../timelines/components/timeline/body/control_columns'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; import { defaultCellActions } from '../../lib/cell_actions/default_cell_actions'; -import { UseFieldBrowserOptionsProps } from '../../../timelines/components/fields_browser'; +import type { UseFieldBrowserOptionsProps } from '../../../timelines/components/fields_browser'; import { useGetUserCasesPermissions } from '../../lib/kibana'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx index e4542a6ef7e6c..05718787d45ab 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx @@ -10,29 +10,28 @@ import { useDispatch, useSelector } from 'react-redux'; import styled from 'styled-components'; import type { Filter } from '@kbn/es-query'; import type { EntityType } from '@kbn/timelines-plugin/common'; -import { TGridCellAction } from '@kbn/timelines-plugin/common/types'; +import type { TGridCellAction } from '@kbn/timelines-plugin/common/types'; import { useBulkAddToCaseActions } from '../../../detections/components/alerts_table/timeline_actions/use_bulk_add_to_case_actions'; -import { inputsModel, State } from '../../store'; +import type { inputsModel, State } from '../../store'; import { inputsActions } from '../../store/actions'; -import { ControlColumnProps, RowRenderer, TimelineId } from '../../../../common/types/timeline'; +import type { ControlColumnProps, RowRenderer } from '../../../../common/types/timeline'; +import { TimelineId } from '../../../../common/types/timeline'; import { APP_UI_ID } from '../../../../common/constants'; import { timelineActions } from '../../../timelines/store/timeline'; import type { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; import { InspectButtonContainer } from '../inspect'; import { useGlobalFullScreen } from '../../containers/use_full_screen'; import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; import { eventsViewerSelector } from './selectors'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import type { SourcererScopeName } from '../../store/sourcerer/model'; import { useSourcererDataView } from '../../containers/sourcerer'; -import { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; +import type { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; import { FIELDS_WITHOUT_CELL_ACTIONS } from '../../lib/cell_actions/constants'; import { useKibana } from '../../lib/kibana'; import { GraphOverlay } from '../../../timelines/components/graph_overlay'; -import { - useFieldBrowserOptions, - FieldEditorActions, -} from '../../../timelines/components/fields_browser'; +import type { FieldEditorActions } from '../../../timelines/components/fields_browser'; +import { useFieldBrowserOptions } from '../../../timelines/components/fields_browser'; import { useSessionViewNavigation, useSessionView, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx index 4687aa1a67807..aa927eef34d76 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_comments.tsx @@ -7,6 +7,7 @@ import React, { memo, useState, useCallback, useMemo } from 'react'; import styled, { css } from 'styled-components'; +import type { EuiCommentProps } from '@elastic/eui'; import { EuiTextArea, EuiFlexGroup, @@ -14,7 +15,6 @@ import { EuiAvatar, EuiAccordion, EuiCommentList, - EuiCommentProps, EuiText, } from '@elastic/eui'; import type { Comment } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.test.tsx index fe41893e25c3d..2a57dc953ef71 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.test.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { act, waitFor } from '@testing-library/react'; import { AddExceptionFlyout } from '.'; @@ -29,7 +30,7 @@ import { getRulesSchemaMock, } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async'; -import { AlertData } from '../types'; +import type { AlertData } from '../types'; jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index'); jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.tsx index ceaebb04e7be0..6810ea5d4263a 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_flyout/index.tsx @@ -9,6 +9,7 @@ import React, { memo, useEffect, useState, useCallback, useMemo } from 'react'; import styled, { css } from 'styled-components'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiFlyout, EuiFlyoutHeader, @@ -24,7 +25,6 @@ import { EuiText, EuiCallOut, EuiComboBox, - EuiComboBoxOptionOption, EuiFlexGroup, } from '@elastic/eui'; import type { @@ -33,15 +33,15 @@ import type { ExceptionListItemSchema, CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { ExceptionsBuilderExceptionItem } from '@kbn/securitysolution-list-utils'; +import type { ExceptionsBuilderExceptionItem } from '@kbn/securitysolution-list-utils'; import { getExceptionBuilderComponentLazy } from '@kbn/lists-plugin/public'; -import { DataViewBase } from '@kbn/es-query'; +import type { DataViewBase } from '@kbn/es-query'; import { hasEqlSequenceQuery, isEqlRule, isThresholdRule, } from '../../../../../common/detection_engine/utils'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import * as i18nCommon from '../../../translations'; import * as i18n from './translations'; import * as sharedI18n from '../translations'; @@ -63,8 +63,9 @@ import { retrieveAlertOsTypes, filterIndexPatterns, } from '../helpers'; -import { ErrorInfo, ErrorCallout } from '../error_callout'; -import { AlertData } from '../types'; +import type { ErrorInfo } from '../error_callout'; +import { ErrorCallout } from '../error_callout'; +import type { AlertData } from '../types'; import { useFetchIndex } from '../../../containers/source'; import { useGetInstalledJob } from '../../ml/hooks/use_get_jobs'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.test.tsx index b7e8de53761aa..2885920222b5d 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.test.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { waitFor } from '@testing-library/react'; import { ThemeProvider } from 'styled-components'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { EditExceptionFlyout } from '.'; import { useCurrentUser } from '../../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.tsx index 78803b787f142..60c7af78bd4b7 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_flyout/index.tsx @@ -32,7 +32,7 @@ import type { CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { getExceptionBuilderComponentLazy } from '@kbn/lists-plugin/public'; -import { DataViewBase } from '@kbn/es-query'; +import type { DataViewBase } from '@kbn/es-query'; import { hasEqlSequenceQuery, @@ -58,7 +58,8 @@ import { filterIndexPatterns, } from '../helpers'; import { Loader } from '../../loader'; -import { ErrorInfo, ErrorCallout } from '../error_callout'; +import type { ErrorInfo } from '../error_callout'; +import { ErrorCallout } from '../error_callout'; import { useGetInstalledJob } from '../../ml/hooks/use_get_jobs'; interface EditExceptionFlyoutProps { diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/error_callout.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/error_callout.tsx index 1964e5238371e..8b59dfb46a02d 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/error_callout.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/error_callout.tsx @@ -17,8 +17,8 @@ import { } from '@elastic/eui'; import type { List } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpSetup } from '@kbn/core/public'; -import { Rule } from '../../../detections/containers/detection_engine/rules/types'; +import type { HttpSetup } from '@kbn/core/public'; +import type { Rule } from '../../../detections/containers/detection_engine/rules/types'; import * as i18n from './translations'; import { useDissasociateExceptionList } from '../../../detections/containers/detection_engine/rules/use_dissasociate_exception_list'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/exceptions.mock.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/exceptions.mock.ts index bd01afa993214..69d7f0de94d25 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/exceptions.mock.ts +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/exceptions.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FormattedEntry } from './types'; +import type { FormattedEntry } from './types'; export const getFormattedEntryMock = (isNested = false): FormattedEntry => ({ fieldName: 'host.name', diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx index 855d855852ddd..399ad2e9e8348 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React from 'react'; +import type React from 'react'; import { mount } from 'enzyme'; import moment from 'moment-timezone'; @@ -28,21 +28,21 @@ import { filterIndexPatterns, getCodeSignatureValue, } from './helpers'; -import { AlertData, Flattened } from './types'; -import { - ListOperatorTypeEnum as OperatorTypeEnum, +import type { AlertData, Flattened } from './types'; +import type { EntriesArray, OsTypeArray, ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { DataViewBase } from '@kbn/es-query'; +import { ListOperatorTypeEnum as OperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; +import type { DataViewBase } from '@kbn/es-query'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { getEntryMatchMock } from '@kbn/lists-plugin/common/schemas/types/entry_match.mock'; import { getCommentsArrayMock } from '@kbn/lists-plugin/common/schemas/types/comment.mock'; import { fields } from '@kbn/data-plugin/common/mocks'; import { ENTRIES, OLD_DATE_RELATIVE_TO_DATE_NOW } from '@kbn/lists-plugin/common/constants.mock'; -import { CodeSignature } from '../../../../common/ecs/file'; +import type { CodeSignature } from '../../../../common/ecs/file'; import { ALERT_ORIGINAL_EVENT_KIND, ALERT_ORIGINAL_EVENT_MODULE, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx index 551d8b7a78f2b..5dd2f4b2b7363 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/helpers.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import { EuiText, EuiCommentProps, EuiAvatar } from '@elastic/eui'; +import type { EuiCommentProps } from '@elastic/eui'; +import { EuiText, EuiAvatar } from '@elastic/eui'; import { capitalize } from 'lodash'; import moment from 'moment'; -import { - comment, - osType, +import type { CommentsArray, Comment, CreateComment, @@ -21,24 +20,28 @@ import { EntryNested, OsTypeArray, ExceptionListType, - ListOperatorTypeEnum as OperatorTypeEnum, ExceptionListItemSchema, CreateExceptionListItemSchema, UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; +import { + comment, + osType, + ListOperatorTypeEnum as OperatorTypeEnum, +} from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionsBuilderExceptionItem } from '@kbn/securitysolution-list-utils'; import { getOperatorType, getNewExceptionItem, addIdToEntries, - ExceptionsBuilderExceptionItem, } from '@kbn/securitysolution-list-utils'; import type { DataViewBase } from '@kbn/es-query'; import * as i18n from './translations'; -import { AlertData, Flattened } from './types'; +import type { AlertData, Flattened } from './types'; -import { Ecs } from '../../../../common/ecs'; -import { CodeSignature } from '../../../../common/ecs/file'; +import type { Ecs } from '../../../../common/ecs'; +import type { CodeSignature } from '../../../../common/ecs/file'; import { WithCopyToClipboard } from '../../lib/clipboard/with_copy_to_clipboard'; import exceptionableLinuxFields from './exceptionable_linux_fields.json'; import exceptionableWindowsMacFields from './exceptionable_windows_mac_fields.json'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts b/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts index 798a212978208..605dc3a79a9d8 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; import type { Ecs } from '../../../../common/ecs'; import type { CodeSignature } from '../../../../common/ecs/file'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.test.tsx index f547089077f31..a451ee9e4963f 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { act, renderHook, RenderHookResult } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { act, renderHook } from '@testing-library/react-hooks'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { coreMock } from '@kbn/core/public/mocks'; import { KibanaServices } from '../../lib/kibana'; @@ -23,12 +24,12 @@ import type { UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { TestProviders } from '../../mock'; -import { - useAddOrUpdateException, +import type { UseAddOrUpdateExceptionProps, ReturnUseAddOrUpdateException, AddOrUpdateExceptionItemsFunc, } from './use_add_exception'; +import { useAddOrUpdateException } from './use_add_exception'; const mockKibanaHttpService = coreMock.createStart().http; const mockKibanaServices = KibanaServices.get as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.tsx index c740957ab8d77..c06f4928ad894 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/use_add_exception.tsx @@ -12,7 +12,7 @@ import type { CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { useApi } from '@kbn/securitysolution-list-hooks'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { updateAlertStatus } from '../../../detections/containers/detection_engine/alerts/api'; import { getUpdateAlertsQuery } from '../../../detections/components/alerts_table/actions'; @@ -21,7 +21,7 @@ import { buildAlertStatusesFilter, } from '../../../detections/components/alerts_table/default_config'; import { getQueryFilter } from '../../../../common/detection_engine/get_query_filter'; -import { Index } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { Index } from '../../../../common/detection_engine/schemas/common/schemas'; import { formatExceptionItemForUpdate, prepareExceptionItemsForBulkClose } from './helpers'; import { useKibana } from '../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.test.tsx index 9ddc6dbae31de..d3bc6214b28ac 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { act, renderHook, RenderHookResult } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { act, renderHook } from '@testing-library/react-hooks'; import { coreMock } from '@kbn/core/public/mocks'; import * as rulesApi from '../../../detections/containers/detection_engine/rules/api'; @@ -18,11 +19,11 @@ import type { ExceptionListSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { getListArrayMock } from '../../../../common/detection_engine/schemas/types/lists.mock'; -import { - useFetchOrCreateRuleExceptionList, +import type { UseFetchOrCreateRuleExceptionListProps, ReturnUseFetchOrCreateRuleExceptionList, } from './use_fetch_or_create_rule_exception_list'; +import { useFetchOrCreateRuleExceptionList } from './use_fetch_or_create_rule_exception_list'; const mockKibanaHttpService = coreMock.createStart().http; jest.mock('../../../detections/containers/detection_engine/rules/api'); diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.tsx index 24d647bdae10b..ff7883ba910cb 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/use_fetch_or_create_rule_exception_list.tsx @@ -18,9 +18,9 @@ import { addEndpointExceptionList, } from '@kbn/securitysolution-list-api'; import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; -import { Rule } from '../../../detections/containers/detection_engine/rules/types'; +import type { Rule } from '../../../detections/containers/detection_engine/rules/types'; import { fetchRuleById, patchRule, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx index 24cbdd5061943..b64dc2f81bd07 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_conditions.tsx @@ -8,11 +8,11 @@ import React, { memo, useMemo, useCallback } from 'react'; import { EuiExpression, EuiToken, EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; import styled from 'styled-components'; -import { +import type { ExceptionListItemSchema, - ListOperatorTypeEnum, NonEmptyNestedEntriesArray, } from '@kbn/securitysolution-io-ts-list-types'; +import { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_header.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_header.tsx index 3389bd0cb29b9..bcac69ca26abf 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_header.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_header.tsx @@ -6,9 +6,9 @@ */ import React, { memo, useMemo, useState } from 'react'; +import type { EuiContextMenuPanelProps } from '@elastic/eui'; import { EuiButtonIcon, - EuiContextMenuPanelProps, EuiContextMenuPanel, EuiFlexGroup, EuiFlexItem, @@ -16,7 +16,7 @@ import { EuiTitle, EuiContextMenuItem, } from '@elastic/eui'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export interface ExceptionItemCardHeaderProps { item: ExceptionListItemSchema; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_meta.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_meta.tsx index 4e3ae24900246..3e9cf5e68d95e 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_meta.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/exception_item_card_meta.tsx @@ -7,7 +7,7 @@ import React, { memo } from 'react'; import { EuiAvatar, EuiBadge, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import styled from 'styled-components'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/index.tsx index 13e1d679a44f9..322050e27e4b8 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exception_item_card/index.tsx @@ -5,10 +5,10 @@ * 2.0. */ +import type { EuiCommentProps } from '@elastic/eui'; import { EuiPanel, EuiFlexGroup, - EuiCommentProps, EuiCommentList, EuiAccordion, EuiFlexItem, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_pagination.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_pagination.tsx index a3f682473eba1..c64130e7eb56d 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_pagination.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_pagination.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactElement, useCallback, useState, useMemo } from 'react'; +import type { ReactElement } from 'react'; +import React, { useCallback, useState, useMemo } from 'react'; import { EuiContextMenuItem, EuiButtonEmpty, @@ -17,7 +18,7 @@ import { } from '@elastic/eui'; import * as i18n from '../translations'; -import { ExceptionsPagination, Filter } from '../types'; +import type { ExceptionsPagination, Filter } from '../types'; interface ExceptionsViewerPaginationProps { pagination: ExceptionsPagination; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.tsx index ce9f5231ab177..fd720377a1b1e 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_utility.tsx @@ -11,7 +11,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; import * as i18n from '../translations'; -import { ExceptionsPagination } from '../types'; +import type { ExceptionsPagination } from '../types'; import { UtilityBar, UtilityBarSection, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_header.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_header.tsx index 330d6e2db56c7..dc234dc0a7ef4 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_header.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/exceptions_viewer_header.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiFieldSearch, EuiFlexGroup, @@ -14,13 +15,12 @@ import { EuiButton, EuiFilterGroup, EuiFilterButton, - EuiContextMenuPanelDescriptor, } from '@elastic/eui'; import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import * as i18n from '../translations'; -import { Filter } from '../types'; +import type { Filter } from '../types'; interface ExceptionsViewerHeaderProps { isInitLoading: boolean; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx index 6e5d6a1c21fbd..e724a546f8054 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/viewer/index.tsx @@ -23,8 +23,9 @@ import { useKibana } from '../../../lib/kibana'; import { Panel } from '../../panel'; import { Loader } from '../../loader'; import { ExceptionsViewerHeader } from './exceptions_viewer_header'; -import { ExceptionListItemIdentifiers, Filter } from '../types'; -import { allExceptionItemsReducer, State, ViewerFlyoutName } from './reducer'; +import type { ExceptionListItemIdentifiers, Filter } from '../types'; +import type { State, ViewerFlyoutName } from './reducer'; +import { allExceptionItemsReducer } from './reducer'; import { ExceptionsViewerPagination } from './exceptions_pagination'; import { ExceptionsViewerUtility } from './exceptions_utility'; diff --git a/x-pack/plugins/security_solution/public/common/components/filter_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/filter_bar/index.tsx index f8f89afca854c..9150882a9b37d 100644 --- a/x-pack/plugins/security_solution/public/common/components/filter_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/filter_bar/index.tsx @@ -8,9 +8,10 @@ import React, { memo, useMemo, useCallback } from 'react'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; -import { FilterManager } from '@kbn/data-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { SearchBar, SearchBarProps } from '@kbn/unified-search-plugin/public'; +import type { FilterManager } from '@kbn/data-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; +import type { SearchBarProps } from '@kbn/unified-search-plugin/public'; +import { SearchBar } from '@kbn/unified-search-plugin/public'; export interface FilterBarComponentProps { dataTestSubj?: string; diff --git a/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx b/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx index 82df61beb9b2d..f903e7e492f07 100644 --- a/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/filters_global/filters_global.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper, shallow } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import React from 'react'; import '../../mock/match_media'; diff --git a/x-pack/plugins/security_solution/public/common/components/first_last_seen/first_last_seen.test.tsx b/x-pack/plugins/security_solution/public/common/components/first_last_seen/first_last_seen.test.tsx index 32c356ae96fe8..0f6fb497fbea4 100644 --- a/x-pack/plugins/security_solution/public/common/components/first_last_seen/first_last_seen.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/first_last_seen/first_last_seen.test.tsx @@ -11,7 +11,8 @@ import { render, waitFor } from '@testing-library/react'; import { useFirstLastSeen } from '../../containers/use_first_last_seen'; import { TestProviders } from '../../mock'; -import { FirstLastSeen, FirstLastSeenProps, FirstLastSeenType } from './first_last_seen'; +import type { FirstLastSeenProps } from './first_last_seen'; +import { FirstLastSeen, FirstLastSeenType } from './first_last_seen'; const MOCKED_RESPONSE = { firstSeen: '2019-04-08T16:09:40.692Z', diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx index 3744297ded56a..01873bf0e7108 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_page/editable_title.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { useState, useCallback, ChangeEvent } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { useState, useCallback } from 'react'; import styled, { css } from 'styled-components'; import { diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/index.tsx index 4a1cab1ca1752..0e6a51fdb268e 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_page/index.tsx @@ -9,12 +9,14 @@ import { EuiProgress, EuiPageHeader, EuiPageHeaderSection, EuiSpacer } from '@el import React from 'react'; import styled, { css } from 'styled-components'; -import { LinkIcon, LinkIconProps } from '../link_icon'; -import { Subtitle, SubtitleProps } from '../subtitle'; +import type { LinkIconProps } from '../link_icon'; +import { LinkIcon } from '../link_icon'; +import type { SubtitleProps } from '../subtitle'; +import { Subtitle } from '../subtitle'; import { Title } from './title'; -import { DraggableArguments, BadgeOptions, TitleProp } from './types'; +import type { DraggableArguments, BadgeOptions, TitleProp } from './types'; import { useFormatUrl } from '../link_to'; -import { SecurityPageName } from '../../../app/types'; +import type { SecurityPageName } from '../../../app/types'; import { useKibana } from '../../lib/kibana'; interface HeaderProps { border?: boolean; diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/title.tsx b/x-pack/plugins/security_solution/public/common/components/header_page/title.tsx index c2823a4574427..0353d4f76c1c9 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/title.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_page/title.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiBetaBadge, EuiBadge, EuiTitle } from '@elastic/eui'; import styled from 'styled-components'; -import { DraggableArguments, BadgeOptions, TitleProp } from './types'; +import type { DraggableArguments, BadgeOptions, TitleProp } from './types'; import { DefaultDraggable } from '../draggables'; import { TruncatableText } from '../truncatable_text'; diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/types.ts b/x-pack/plugins/security_solution/public/common/components/header_page/types.ts index 230f9bb9d86a0..358a8118e5cc3 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/header_page/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiBadgeProps } from '@elastic/eui'; +import type { EuiBadgeProps } from '@elastic/eui'; import type React from 'react'; export type TitleProp = string | React.ReactNode; diff --git a/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx index 8fe8439804e26..cadd0ec41b429 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx @@ -5,14 +5,8 @@ * 2.0. */ -import { - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiIconTip, - EuiTitle, - EuiTitleSize, -} from '@elastic/eui'; +import type { EuiTitleSize } from '@elastic/eui'; +import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiTitle } from '@elastic/eui'; import React, { useCallback } from 'react'; import styled, { css } from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/common/components/health_truncate_text/index.tsx b/x-pack/plugins/security_solution/public/common/components/health_truncate_text/index.tsx index 0344104889832..830b1776d8fee 100644 --- a/x-pack/plugins/security_solution/public/common/components/health_truncate_text/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/health_truncate_text/index.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { EuiHealth, EuiToolTip, EuiHealthProps } from '@elastic/eui'; +import type { EuiHealthProps } from '@elastic/eui'; +import { EuiHealth, EuiToolTip } from '@elastic/eui'; import styled from 'styled-components'; const StatusTextWrapper = styled.div` diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx index 3e49ef7632731..d067160498850 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/actions/show_top_n.tsx @@ -6,13 +6,8 @@ */ import React, { useMemo } from 'react'; -import { - EuiButtonEmpty, - EuiPopover, - EuiButtonIcon, - EuiContextMenuItem, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiButtonEmpty, EuiContextMenuItem } from '@elastic/eui'; +import { EuiPopover, EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { Filter } from '@kbn/es-query'; import { StatefulTopN } from '../../top_n'; diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/index.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/index.tsx index d61418c95b1ed..178a759e8b8ab 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/index.tsx @@ -7,12 +7,13 @@ import { EuiFocusTrap, EuiScreenReaderOnly } from '@elastic/eui'; import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { DraggableId } from 'react-beautiful-dnd'; +import type { DraggableId } from 'react-beautiful-dnd'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; import { stopPropagationAndPreventDefault } from '@kbn/timelines-plugin/public'; -import { ColumnHeaderOptions, DataProvider, TimelineId } from '../../../../common/types/timeline'; +import type { ColumnHeaderOptions, DataProvider } from '../../../../common/types/timeline'; +import { TimelineId } from '../../../../common/types/timeline'; import { SHOW_TOP_N_KEYBOARD_SHORTCUT } from './keyboard_shortcut_constants'; import { useHoverActionItems } from './use_hover_action_items'; diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx index 7bf63479b65ea..f1042d805b286 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.test.tsx @@ -6,9 +6,10 @@ */ import { useRef } from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; -import { useHoverActionItems, UseHoverActionItemsProps } from './use_hover_action_items'; +import type { UseHoverActionItemsProps } from './use_hover_action_items'; +import { useHoverActionItems } from './use_hover_action_items'; import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { DataProvider } from '../../../../common/types/timeline'; +import type { DataProvider } from '../../../../common/types/timeline'; jest.mock('../../lib/kibana'); jest.mock('../../hooks/use_selector'); diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx index e62f605afca2c..f000e5f3157da 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx @@ -7,7 +7,7 @@ import { EuiContextMenuItem } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { DraggableId } from 'react-beautiful-dnd'; +import type { DraggableId } from 'react-beautiful-dnd'; import { isEmpty } from 'lodash'; @@ -15,7 +15,8 @@ import { FilterManager } from '@kbn/data-plugin/public'; import { useKibana } from '../../lib/kibana'; import { allowTopN } from '../drag_and_drop/helpers'; import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { ColumnHeaderOptions, DataProvider, TimelineId } from '../../../../common/types/timeline'; +import type { ColumnHeaderOptions, DataProvider } from '../../../../common/types/timeline'; +import { TimelineId } from '../../../../common/types/timeline'; import { timelineSelectors } from '../../../timelines/store/timeline'; import { ShowTopNButton } from './actions/show_top_n'; diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_actions.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_actions.tsx index c5198621541a2..f78d7761383ee 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_actions.tsx @@ -6,11 +6,11 @@ */ import React, { useCallback, useMemo, useState, useRef, useContext } from 'react'; -import { DraggableProvided, DraggableStateSnapshot } from 'react-beautiful-dnd'; +import type { DraggableProvided, DraggableStateSnapshot } from 'react-beautiful-dnd'; import { TimelineContext } from '@kbn/timelines-plugin/public'; import { HoverActions } from '.'; -import { DataProvider } from '../../../../common/types'; +import type { DataProvider } from '../../../../common/types'; import { ProviderContentWrapper } from '../drag_and_drop/draggable_wrapper'; import { getDraggableId } from '../drag_and_drop/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx index 171c18f87a4af..bccf6604dc5f6 100644 --- a/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/import_data_modal/index.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import React, { useCallback, useState } from 'react'; -import { +import type { ImportDataResponse, ImportDataProps, } from '../../../detections/containers/detection_engine/rules'; diff --git a/x-pack/plugins/security_solution/public/common/components/import_data_modal/utils.ts b/x-pack/plugins/security_solution/public/common/components/import_data_modal/utils.ts index 497d637d735da..d6158dfe97ff6 100644 --- a/x-pack/plugins/security_solution/public/common/components/import_data_modal/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/import_data_modal/utils.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ErrorToastOptions, Toast, ToastInput, ToastOptions } from '@kbn/core/public'; +import type { ErrorToastOptions, Toast, ToastInput, ToastOptions } from '@kbn/core/public'; import * as i18n from './translations'; -import { +import type { ImportDataResponse, ImportResponseError, ImportRulesResponseError, diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx index b3dbbb86ace68..7e92f8e9d3931 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/index.test.tsx @@ -15,8 +15,10 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../mock'; -import { createStore, State } from '../../store'; -import { UpdateQueryParams, upsertQuery } from '../../store/inputs/helpers'; +import type { State } from '../../store'; +import { createStore } from '../../store'; +import type { UpdateQueryParams } from '../../store/inputs/helpers'; +import { upsertQuery } from '../../store/inputs/helpers'; import { InspectButton } from '.'; import { cloneDeep } from 'lodash/fp'; diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/index.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/index.tsx index 134faa0928b93..fb827fd222731 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/index.tsx @@ -8,7 +8,7 @@ import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import React from 'react'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; import { HoverVisibilityContainer } from '../hover_visibility_container'; diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx index 822e7766c2b5b..aa3ed9535a2cc 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.test.tsx @@ -11,7 +11,7 @@ import { TestProviders } from '../../mock'; import { NO_ALERT_INDEX } from '../../../../common/constants'; import { ModalInspectQuery, formatIndexPatternRequested } from './modal'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx index 3c809fd15e38f..456a91a017b74 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/modal.tsx @@ -19,14 +19,15 @@ import { EuiTabbedContent, } from '@elastic/eui'; import numeral from '@elastic/numeral'; -import React, { useMemo, Fragment, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { useMemo, Fragment } from 'react'; import styled from 'styled-components'; import { useLocation } from 'react-router-dom'; import { NO_ALERT_INDEX } from '../../../../common/constants'; import * as i18n from './translations'; import { getScopeFromPath, useSourcererDataView } from '../../containers/sourcerer'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; import { SourcererScopeName } from '../../store/sourcerer/model'; const DescriptionListStyled = styled(EuiDescriptionList)` diff --git a/x-pack/plugins/security_solution/public/common/components/inspect/use_inspect.tsx b/x-pack/plugins/security_solution/public/common/components/inspect/use_inspect.tsx index d9f633c7d01e3..ce74212c258c1 100644 --- a/x-pack/plugins/security_solution/public/common/components/inspect/use_inspect.tsx +++ b/x-pack/plugins/security_solution/public/common/components/inspect/use_inspect.tsx @@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { inputsSelectors } from '../../store'; import { inputsActions } from '../../store/actions'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; interface UseInspectModalProps { inputId?: InputsModelId; diff --git a/x-pack/plugins/security_solution/public/common/components/item_details_card/index.tsx b/x-pack/plugins/security_solution/public/common/components/item_details_card/index.tsx index 536d3572319e2..846c12963162e 100644 --- a/x-pack/plugins/security_solution/public/common/components/item_details_card/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/item_details_card/index.tsx @@ -5,16 +5,10 @@ * 2.0. */ -import React, { - FC, - isValidElement, - memo, - PropsWithChildren, - ReactElement, - ReactNode, - useMemo, -} from 'react'; +import type { FC, PropsWithChildren, ReactElement, ReactNode } from 'react'; +import React, { isValidElement, memo, useMemo } from 'react'; import styled from 'styled-components'; +import type { EuiButtonProps, PropsForButton } from '@elastic/eui'; import { EuiPanel, EuiFlexGroup, @@ -23,8 +17,6 @@ import { EuiDescriptionList, EuiDescriptionListTitle, EuiDescriptionListDescription, - EuiButtonProps, - PropsForButton, } from '@elastic/eui'; const OTHER_NODES = {}; diff --git a/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx b/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx index f1dace2b4f3b1..f5e24ddc072cf 100644 --- a/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/last_event_time/index.tsx @@ -9,7 +9,7 @@ import { EuiIcon, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { memo } from 'react'; -import { DocValueFields, LastEventIndexKey } from '../../../../common/search_strategy'; +import type { DocValueFields, LastEventIndexKey } from '../../../../common/search_strategy'; import { useTimelineLastEventTime } from '../../containers/events/last_event_time'; import { getEmptyTagValue } from '../empty_value'; import { FormattedRelativePreferenceDate } from '../formatted_date'; diff --git a/x-pack/plugins/security_solution/public/common/components/line_clamp/index.tsx b/x-pack/plugins/security_solution/public/common/components/line_clamp/index.tsx index 17e0262a2cffa..69e26715206e6 100644 --- a/x-pack/plugins/security_solution/public/common/components/line_clamp/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/line_clamp/index.tsx @@ -6,7 +6,8 @@ */ import { EuiButtonEmpty } from '@elastic/eui'; -import React, { useState, useCallback, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { useState, useCallback } from 'react'; import styled from 'styled-components'; import { useIsOverflow } from '../../hooks/use_is_overflow'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx b/x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx index 16cc0cc6255a1..3a8b49dfa4d68 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_icon/index.tsx @@ -5,9 +5,11 @@ * 2.0. */ -import { EuiIcon, EuiLink, IconSize, IconType } from '@elastic/eui'; -import { LinkAnchorProps } from '@elastic/eui/src/components/link/link'; -import React, { ReactNode, useCallback, useMemo } from 'react'; +import type { IconSize, IconType } from '@elastic/eui'; +import { EuiIcon, EuiLink } from '@elastic/eui'; +import type { LinkAnchorProps } from '@elastic/eui/src/components/link/link'; +import type { ReactNode } from 'react'; +import React, { useCallback, useMemo } from 'react'; import styled, { css } from 'styled-components'; interface LinkProps { diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts index dc169c870488a..087aec917766b 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/link_to/__mocks__/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPageName } from '../../../../app/types'; +import type { SecurityPageName } from '../../../../app/types'; export { getDetectionEngineUrl } from '../redirect_to_detection_engine'; export { getAppLandingUrl } from '../redirect_to_landing'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/index.ts b/x-pack/plugins/security_solution/public/common/components/link_to/index.ts index bac47b1dd5d62..a85d42e3f3d1e 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/link_to/index.ts @@ -10,7 +10,7 @@ import { useCallback } from 'react'; import { useGetUrlSearch, useGetUrlStateQueryString } from '../navigation/use_get_url_search'; import { navTabs } from '../../../app/home/home_navigations'; import { useAppUrl } from '../../lib/kibana/hooks'; -import { SecurityNavKey } from '../navigation/types'; +import type { SecurityNavKey } from '../navigation/types'; import { SecurityPageName } from '../../../app/types'; export { getDetectionEngineUrl, getRuleDetailsUrl } from './redirect_to_detection_engine'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx index 62057260b6383..831ac9bb4f4c0 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_hosts.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsTableType } from '../../../hosts/store/model'; +import type { HostsTableType } from '../../../hosts/store/model'; import { HOSTS_PATH } from '../../../../common/constants'; import { appendSearch } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx index 79d7497fbb567..42a04a8685e3b 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_network.tsx @@ -5,10 +5,8 @@ * 2.0. */ -import { - FlowTarget, - FlowTargetSourceDest, -} from '../../../../common/search_strategy/security_solution/network'; +import type { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import { FlowTarget } from '../../../../common/search_strategy/security_solution/network'; import { appendSearch } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx index ecc14781f7005..cc9202e65276f 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_timelines.tsx @@ -6,7 +6,7 @@ */ import { isEmpty } from 'lodash/fp'; -import { TimelineTypeLiteral } from '../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../common/types/timeline'; import { appendSearch } from './helpers'; export const getTimelineTabsUrl = (tabName: TimelineTypeLiteral, search?: string) => diff --git a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx index 2aba6015ae890..2a587ec8cce05 100644 --- a/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx +++ b/x-pack/plugins/security_solution/public/common/components/link_to/redirect_to_users.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { UsersTableType } from '../../../users/store/model'; +import type { UsersTableType } from '../../../users/store/model'; import { USERS_PATH } from '../../../../common/constants'; import { appendSearch } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/links/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/links/helpers.test.tsx index 926fea0d46417..3855d795dc0be 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/helpers.test.tsx @@ -9,11 +9,8 @@ import { render, fireEvent, screen } from '@testing-library/react'; import React from 'react'; import { DEFAULT_MORE_MAX_HEIGHT } from '.'; import { TestProviders } from '../../mock'; -import { - MoreReputationLinksContainer, - ReputationLinkSetting, - ReputationLinksOverflow, -} from './helpers'; +import type { ReputationLinkSetting } from './helpers'; +import { MoreReputationLinksContainer, ReputationLinksOverflow } from './helpers'; const rowItems = [ { name: 'item1', url_template: 'https://www.virustotal.com/gui/search/{{ip}' }, diff --git a/x-pack/plugins/security_solution/public/common/components/links/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/links/helpers.tsx index 3f7011f080374..aedfa151c362c 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/helpers.tsx @@ -4,19 +4,22 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { SyntheticEvent, useCallback, useMemo, useState } from 'react'; +import type { SyntheticEvent } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; +import type { + EuiButtonIcon, + EuiButtonProps, + EuiLinkProps, + PropsForAnchor, + PropsForButton, +} from '@elastic/eui'; import { EuiButton, EuiButtonEmpty, - EuiButtonIcon, - EuiButtonProps, EuiFlexGroup, EuiFlexItem, EuiLink, - EuiLinkProps, EuiPopover, - PropsForAnchor, - PropsForButton, } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.test.tsx index 77d473564f6b1..f511d72bf49b2 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, shallow, ReactWrapper, ShallowWrapper } from 'enzyme'; +import type { ReactWrapper, ShallowWrapper } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; import { mountWithIntl } from '@kbn/test-jest-helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/links/index.tsx b/x-pack/plugins/security_solution/public/common/components/links/index.tsx index 48f0210e54d01..016243b370126 100644 --- a/x-pack/plugins/security_solution/public/common/components/links/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links/index.tsx @@ -5,15 +5,10 @@ * 2.0. */ -import { - EuiButtonEmpty, - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiLink, - EuiToolTip, -} from '@elastic/eui'; -import React, { useMemo, useCallback, SyntheticEvent, MouseEventHandler, MouseEvent } from 'react'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiToolTip } from '@elastic/eui'; +import type { SyntheticEvent, MouseEventHandler, MouseEvent } from 'react'; +import React, { useMemo, useCallback } from 'react'; import { isArray, isNil } from 'lodash/fp'; import { IP_REPUTATION_LINKS_SETTING, APP_UI_ID } from '../../../../common/constants'; import { encodeIpv6 } from '../../lib/helpers'; @@ -26,27 +21,25 @@ import { useFormatUrl, useGetSecuritySolutionUrl, } from '../link_to'; -import { - FlowTarget, - FlowTargetSourceDest, -} from '../../../../common/search_strategy/security_solution/network'; +import type { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import { FlowTarget } from '../../../../common/search_strategy/security_solution/network'; import { useUiSetting$, useKibana, useNavigateTo } from '../../lib/kibana'; import { isUrlInvalid } from '../../utils/validators'; import * as i18n from './translations'; import { SecurityPageName } from '../../../app/types'; import { getTabsOnUsersDetailsUrl, getUsersDetailsUrl } from '../link_to/redirect_to_users'; +import type { ReputationLinkSetting } from './helpers'; import { LinkAnchor, GenericLinkButton, PortContainer, Comma, LinkButton, - ReputationLinkSetting, ReputationLinksOverflow, } from './helpers'; -import { HostsTableType } from '../../../hosts/store/model'; -import { UsersTableType } from '../../../users/store/model'; +import type { HostsTableType } from '../../../hosts/store/model'; +import type { UsersTableType } from '../../../users/store/model'; export { LinkButton, LinkAnchor } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/links_to_docs/doc_link.tsx b/x-pack/plugins/security_solution/public/common/components/links_to_docs/doc_link.tsx index 5208e559637b8..a08a6a61246f3 100644 --- a/x-pack/plugins/security_solution/public/common/components/links_to_docs/doc_link.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links_to_docs/doc_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; import { useKibana } from '../../lib/kibana'; import { ExternalLink } from './external_link'; import { COMMON_ARIA_LABEL_ENDING } from './links_translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/links_to_docs/external_link.tsx b/x-pack/plugins/security_solution/public/common/components/links_to_docs/external_link.tsx index f62fd3098ca66..a5b44a897865c 100644 --- a/x-pack/plugins/security_solution/public/common/components/links_to_docs/external_link.tsx +++ b/x-pack/plugins/security_solution/public/common/components/links_to_docs/external_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC } from 'react'; +import type { FC } from 'react'; +import React from 'react'; import { EuiLink, EuiToolTip } from '@elastic/eui'; interface ExternalLinkProps { diff --git a/x-pack/plugins/security_solution/public/common/components/loader/index.tsx b/x-pack/plugins/security_solution/public/common/components/loader/index.tsx index 1e2ebcacff862..d5572b8572f40 100644 --- a/x-pack/plugins/security_solution/public/common/components/loader/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/loader/index.tsx @@ -5,14 +5,11 @@ * 2.0. */ -import { - EuiFlexGroup, - EuiFlexItem, - EuiLoadingSpinner, +import type { // @ts-expect-error EuiLoadingSpinnerSize, - EuiText, } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import { rgba } from 'polished'; import React from 'react'; import styled, { css } from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx index c35d613203f76..fd560e9990e39 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/editor.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { ElementRef } from 'react'; import React, { forwardRef, memo, @@ -13,10 +14,9 @@ import React, { useRef, useState, useCallback, - ElementRef, } from 'react'; import { EuiMarkdownEditor } from '@elastic/eui'; -import { ContextShape } from '@elastic/eui/src/components/markdown_editor/markdown_context'; +import type { ContextShape } from '@elastic/eui/src/components/markdown_editor/markdown_context'; import { uiPlugins, parsingPlugins, processingPlugins } from './plugins'; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx index d41299bfb3e7f..9554b5bba4e5b 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/eui_form.tsx @@ -7,10 +7,13 @@ import React, { forwardRef } from 'react'; import styled from 'styled-components'; -import { EuiMarkdownEditorProps, EuiFormRow, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../shared_imports'; +import type { EuiMarkdownEditorProps } from '@elastic/eui'; +import { EuiFormRow, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; +import type { FieldHook } from '../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../shared_imports'; -import { MarkdownEditor, MarkdownEditorRef } from './editor'; +import type { MarkdownEditorRef } from './editor'; +import { MarkdownEditor } from './editor'; type MarkdownEditorFormProps = EuiMarkdownEditorProps & { id: string; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/markdown_link.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/markdown_link.tsx index 7cc8a07c8c04e..b70708aac117a 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/markdown_link.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/markdown_link.tsx @@ -6,7 +6,8 @@ */ import React, { memo } from 'react'; -import { EuiLink, EuiLinkAnchorProps, EuiToolTip } from '@elastic/eui'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink, EuiToolTip } from '@elastic/eui'; type MarkdownLinkProps = { disableLinks?: boolean } & EuiLinkAnchorProps; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts index d5846a9f9ea50..c7f8481c36247 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/index.ts @@ -5,18 +5,17 @@ * 2.0. */ +import type { EuiLinkAnchorProps } from '@elastic/eui'; import { - EuiLinkAnchorProps, getDefaultEuiMarkdownParsingPlugins, getDefaultEuiMarkdownProcessingPlugins, getDefaultEuiMarkdownUiPlugins, } from '@elastic/eui'; // Remove after this issue is resolved: https://github.com/elastic/eui/issues/4688 -import { Options as Remark2RehypeOptions } from 'mdast-util-to-hast'; -import { FunctionComponent } from 'react'; -// eslint-disable-next-line import/no-extraneous-dependencies -import rehype2react from 'rehype-react'; -import { Plugin, PluggableList } from 'unified'; +import type { Options as Remark2RehypeOptions } from 'mdast-util-to-hast'; +import type { FunctionComponent } from 'react'; +import type rehype2react from 'rehype-react'; +import type { Plugin, PluggableList } from 'unified'; import * as timelineMarkdownPlugin from './timeline'; export const { uiPlugins, parsingPlugins, processingPlugins } = { diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts index 358c5171f67b6..b8c2825ea1c36 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Plugin } from 'unified'; -import { RemarkTokenizer } from '@elastic/eui'; +import type { Plugin } from 'unified'; +import type { RemarkTokenizer } from '@elastic/eui'; import { parse } from 'query-string'; import { decodeRisonUrlState } from '../../../url_state/helpers'; import { ID, PREFIX } from './constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx index 0c9270f4a8d30..ecf7a248787a9 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/plugin.tsx @@ -6,17 +6,12 @@ */ import React, { useCallback, memo } from 'react'; -import { - EuiSelectableOption, - EuiModalBody, - EuiModalHeader, - EuiMarkdownEditorUiPlugin, - EuiCodeBlock, -} from '@elastic/eui'; +import type { EuiSelectableOption, EuiMarkdownEditorUiPlugin } from '@elastic/eui'; +import { EuiModalBody, EuiModalHeader, EuiCodeBlock } from '@elastic/eui'; import { TimelineType } from '../../../../../../common/types/timeline'; import { SelectableTimeline } from '../../../../../timelines/components/timeline/selectable_timeline'; -import { OpenTimelineResult } from '../../../../../timelines/components/open_timeline/types'; +import type { OpenTimelineResult } from '../../../../../timelines/components/open_timeline/types'; import { getTimelineUrl, useFormatUrl } from '../../../link_to'; import { ID } from './constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx index 9d0f68a9bb483..307378b2076bf 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/processor.tsx @@ -9,7 +9,7 @@ import React, { useCallback, memo } from 'react'; import { EuiToolTip, EuiLink } from '@elastic/eui'; import { useTimelineClick } from '../../../../utils/timeline/use_timeline_click'; -import { TimelineProps } from './types'; +import type { TimelineProps } from './types'; import * as i18n from './translations'; import { useAppToasts } from '../../../../hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/types.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/types.ts index e233a41160006..1816de6e93350 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ID } from './constants'; +import type { ID } from './constants'; export interface TimelineConfiguration { id: string | null; diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.tsx index 6c8f77a279a4a..6dcb93321056e 100644 --- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.tsx +++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/renderer.tsx @@ -7,7 +7,8 @@ import React, { memo, useMemo } from 'react'; import { cloneDeep } from 'lodash/fp'; -import { EuiMarkdownFormat, EuiLinkAnchorProps } from '@elastic/eui'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiMarkdownFormat } from '@elastic/eui'; import { parsingPlugins, processingPlugins } from './plugins'; import { MarkdownLink } from './markdown_link'; diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx index a80ad6aa3f0be..14593d10f1f89 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { MatrixHistogram } from '.'; diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx index 83fbf6e61b08e..fb48682f3370c 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/index.tsx @@ -6,7 +6,7 @@ */ import React, { useState, useEffect, useCallback, useMemo } from 'react'; -import { Position } from '@elastic/charts'; +import type { Position } from '@elastic/charts'; import styled from 'styled-components'; import { EuiFlexGroup, EuiFlexItem, EuiProgress, EuiSelect, EuiSpacer } from '@elastic/eui'; @@ -18,7 +18,7 @@ import { MatrixLoader } from './matrix_loader'; import { Panel } from '../panel'; import { getBarchartConfigs, getCustomChartData } from './utils'; import { useMatrixHistogramCombined } from '../../containers/matrix_histogram'; -import { +import type { MatrixHistogramProps, MatrixHistogramOption, MatrixHistogramQueryProps, @@ -26,13 +26,13 @@ import { GetTitle, GetSubTitle, } from './types'; -import { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; -import { GlobalTimeArgs } from '../../containers/use_global_time'; +import type { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; +import type { GlobalTimeArgs } from '../../containers/use_global_time'; import { setAbsoluteRangeDatePicker } from '../../store/inputs/actions'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; import { HoverVisibilityContainer } from '../hover_visibility_container'; import { HISTOGRAM_ACTIONS_BUTTON_CLASS, VisualizationActions } from '../visualization_actions'; -import { GetLensAttributes, LensAttributes } from '../visualization_actions/types'; +import type { GetLensAttributes, LensAttributes } from '../visualization_actions/types'; import { SecurityPageName } from '../../../../common/constants'; import { useRouteSpy } from '../../utils/route/use_route_spy'; import { useQueryToggle } from '../../containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts index d73a543de50fd..0f3e38b32c9ba 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts @@ -6,18 +6,18 @@ */ import type React from 'react'; -import { EuiTitleSize } from '@elastic/eui'; -import { ScaleType, Position, TickFormatter } from '@elastic/charts'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ActionCreator } from 'redux'; -import { ESQuery } from '../../../../common/typed_json'; -import { InputsModelId } from '../../store/inputs/constants'; -import { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; -import { UpdateDateRange } from '../charts/common'; -import { GlobalTimeArgs } from '../../containers/use_global_time'; -import { DocValueFields } from '../../../../common/search_strategy'; -import { FieldValueThreshold } from '../../../detections/components/rules/threshold_input'; -import { GetLensAttributes, LensAttributes } from '../visualization_actions/types'; +import type { EuiTitleSize } from '@elastic/eui'; +import type { ScaleType, Position, TickFormatter } from '@elastic/charts'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ActionCreator } from 'redux'; +import type { ESQuery } from '../../../../common/typed_json'; +import type { InputsModelId } from '../../store/inputs/constants'; +import type { MatrixHistogramType } from '../../../../common/search_strategy/security_solution'; +import type { UpdateDateRange } from '../charts/common'; +import type { GlobalTimeArgs } from '../../containers/use_global_time'; +import type { DocValueFields } from '../../../../common/search_strategy'; +import type { FieldValueThreshold } from '../../../detections/components/rules/threshold_input'; +import type { GetLensAttributes, LensAttributes } from '../visualization_actions/types'; export type MatrixHistogramMappingTypes = Record< string, diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts index 633f6ea3ebeb6..860ec4239073e 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.test.ts @@ -12,10 +12,10 @@ import { formatToChartDataItem, getCustomChartData, } from './utils'; -import { UpdateDateRange } from '../charts/common'; +import type { UpdateDateRange } from '../charts/common'; import { Position } from '@elastic/charts'; -import { MatrixHistogramData } from '../../../../common/search_strategy'; -import { BarchartConfigs } from './types'; +import type { MatrixHistogramData } from '../../../../common/search_strategy'; +import type { BarchartConfigs } from './types'; describe('utils', () => { describe('getBarchartConfigs', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts index 6594dc30d5ce8..98b90e52a79c8 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/utils.ts @@ -8,9 +8,9 @@ import { ScaleType, Position } from '@elastic/charts'; import { get, groupBy, map, toPairs } from 'lodash/fp'; -import { UpdateDateRange, ChartSeriesData } from '../charts/common'; -import { MatrixHistogramMappingTypes, BarchartConfigs } from './types'; -import { MatrixHistogramData } from '../../../../common/search_strategy'; +import type { UpdateDateRange, ChartSeriesData } from '../charts/common'; +import type { MatrixHistogramMappingTypes, BarchartConfigs } from './types'; +import type { MatrixHistogramData } from '../../../../common/search_strategy'; import { histogramDateTimeFormatter } from '../utils'; interface GetBarchartConfigsProps { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx index 920e788754f37..f8d6a1e4ca983 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/anomaly_table_provider.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { InfluencerInput, Anomalies, CriteriaFields } from '../types'; +import type { InfluencerInput, Anomalies, CriteriaFields } from '../types'; import { useAnomaliesTableData } from './use_anomalies_table_data'; interface ChildrenArgs { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts index 4eb03d35713fb..dde8ffc8769d7 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/get_interval_from_anomalies.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomalies } from '../types'; +import type { Anomalies } from '../types'; export const getIntervalFromAnomalies = (anomalies: Anomalies | null) => { if (anomalies == null) { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts index fc0945e0d74b0..feb4be15a9fe4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfluencerInput } from '../types'; +import type { InfluencerInput } from '../types'; import { influencersOrCriteriaToString, getThreshold } from './use_anomalies_table_data'; describe('use_anomalies_table_data', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts index 58610298d4395..9cc55b449bc9f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/anomaly/use_anomalies_table_data.ts @@ -9,7 +9,7 @@ import { useState, useEffect, useMemo } from 'react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { DEFAULT_ANOMALY_SCORE } from '../../../../../common/constants'; import { anomaliesTableData } from '../api/anomalies_table_data'; -import { InfluencerInput, Anomalies, CriteriaFields } from '../types'; +import type { InfluencerInput, Anomalies, CriteriaFields } from '../types'; import * as i18n from './translations'; import { useTimeZone, useUiSetting$ } from '../../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts index 01ed306d08318..f22820ab4e220 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/anomalies_table_data.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Anomalies, InfluencerInput, CriteriaFields } from '../types'; +import type { Anomalies, InfluencerInput, CriteriaFields } from '../types'; import { KibanaServices } from '../../../lib/kibana'; export interface Body { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts index 96479167183ac..b289890bb4335 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/errors.ts @@ -7,7 +7,7 @@ import { has } from 'lodash/fp'; -import { MlError } from '../types'; +import type { MlError } from '../types'; export interface MlStartJobError { error: MlError; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs.ts index e35d4cc8293d2..286ae6b8e5ce4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CombinedJobWithStats } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; -import { HttpSetup } from '@kbn/core/public'; +import type { CombinedJobWithStats } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; +import type { HttpSetup } from '@kbn/core/public'; export interface GetJobsArgs { http: HttpSetup; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs_summary.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs_summary.ts index 41d2248f261f5..2327ded166110 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs_summary.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/get_jobs_summary.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HttpSetup } from '@kbn/core/public'; -import { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { HttpSetup } from '@kbn/core/public'; +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; export interface GetJobsSummaryArgs { http: HttpSetup; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts index f0a45d1cd6840..28d5a8c35e2f0 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/get_ml_capabilities.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { HttpSetup } from '@kbn/core/public'; -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/public'; -import { InfluencerInput } from '../types'; +import type { HttpSetup } from '@kbn/core/public'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/public'; +import type { InfluencerInput } from '../types'; export interface Body { jobIds: string[]; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts index f4805e8a2126a..a2de2c97cf523 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.test.ts @@ -8,7 +8,7 @@ import fetchMock from 'fetch-mock'; import { ToasterError } from '../../toasters'; -import { SetupMlResponse } from '../../ml_popover/types'; +import type { SetupMlResponse } from '../../ml_popover/types'; import { isMlStartJobError } from './errors'; import { throwIfErrorAttached, diff --git a/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts index 607cd3560b463..c4bd1888627f3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/api/throw_if_not_ok.ts @@ -7,7 +7,7 @@ import * as i18n from './translations'; import { ToasterError } from '../../toasters'; -import { SetupMlResponse } from '../../ml_popover/types'; +import type { SetupMlResponse } from '../../ml_popover/types'; import { isMlStartJobError } from './errors'; export const tryParseResponse = (response: string): string => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts index cd48be8c93adc..1d01e7c282a01 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/add_entities_to_kql.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { RisonValue, encode } from 'rison-node'; +import type { RisonValue } from 'rison-node'; +import { encode } from 'rison-node'; import { decodeRison, isRisonObject, isRegularString } from './rison_helpers'; export const entityToKql = (entityNames: string[], entity: string): string => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts index c46d425a3eda9..1bba71ab604ce 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/remove_kql_variables.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { RisonValue, encode } from 'rison-node'; +import type { RisonValue } from 'rison-node'; +import { encode } from 'rison-node'; import { decodeRison, isRisonObject, isRegularString } from './rison_helpers'; export const operators = ['and', 'or', 'not']; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts index 5bc7acf0066d2..be565d7609f22 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/replace_kql_commas_with_or.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { RisonValue, encode } from 'rison-node'; +import type { RisonValue } from 'rison-node'; +import { encode } from 'rison-node'; import { decodeRison, isRisonObject, isRegularString } from './rison_helpers'; export const replacement = (match: string, p1: string, p2: string) => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts index 6f62ec5473ff2..120fedf133b8f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/conditional_links/rison_helpers.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { RisonValue, RisonObject, decode } from 'rison-node'; +import type { RisonValue, RisonObject } from 'rison-node'; +import { decode } from 'rison-node'; import { isObject, isString } from 'lodash/fp'; export const decodeRison = (value: string): RisonValue => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts index 21a329a680209..14dfefb557f49 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_host_type.ts @@ -6,7 +6,7 @@ */ import { HostsType } from '../../../../hosts/store/model'; -import { CriteriaFields } from '../types'; +import type { CriteriaFields } from '../types'; export const getCriteriaFromHostType = ( type: HostsType, diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts index 84fd7bd9d42d8..52fbc60d58a2c 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_network_type.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CriteriaFields } from '../types'; +import type { CriteriaFields } from '../types'; import { NetworkType } from '../../../../network/store/model'; import { FlowTarget } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts index 4f3fa93c8fe2f..aa3e9829c7d0e 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/get_criteria_from_users_type.ts @@ -6,7 +6,7 @@ */ import { UsersType } from '../../../../users/store/model'; -import { CriteriaFields } from '../types'; +import type { CriteriaFields } from '../types'; export const getCriteriaFromUsersType = ( type: UsersType, diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts index a89d34e2fa43d..54fee52a30867 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; -import { CriteriaFields } from '../types'; +import type { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { CriteriaFields } from '../types'; import { hostToCriteria } from './host_to_criteria'; describe('host_to_criteria', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts index ff454da7b1fcd..895f2521b244f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/host_to_criteria.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; -import { CriteriaFields } from '../types'; +import type { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { CriteriaFields } from '../types'; export const hostToCriteria = (hostItem: HostItem): CriteriaFields[] => { if (hostItem == null) { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts index 489be9e36b834..416f52ad16772 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.test.ts @@ -6,7 +6,7 @@ */ import { FlowTarget, FlowTargetSourceDest } from '../../../../../common/search_strategy'; -import { CriteriaFields } from '../types'; +import type { CriteriaFields } from '../types'; import { networkToCriteria } from './network_to_criteria'; describe('network_to_criteria', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts index 11bc2f76d4c2d..f64f42315db22 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/criteria/network_to_criteria.ts @@ -6,7 +6,7 @@ */ import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -import { CriteriaFields } from '../types'; +import type { CriteriaFields } from '../types'; export const networkToCriteria = ( ip: string, diff --git a/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx index 6d3302d06ade3..1b1c03d66f6c3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/entity_draggable.tsx @@ -7,10 +7,8 @@ import React, { useCallback, useMemo } from 'react'; import { DraggableWrapper, DragEffects } from '../drag_and_drop/draggable_wrapper'; -import { - IS_OPERATOR, - QueryOperator, -} from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { QueryOperator } from '../../../timelines/components/timeline/data_providers/data_provider'; +import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; import { escapeDataProviderId } from '../drag_and_drop/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_get_jobs.ts b/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_get_jobs.ts index 4f7c48b101725..ec87d2e2c22a5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_get_jobs.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_get_jobs.ts @@ -7,7 +7,7 @@ import { useEffect, useState } from 'react'; import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; -import { CombinedJobWithStats } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; +import type { CombinedJobWithStats } from '@kbn/ml-plugin/common/types/anomaly_detection_jobs'; import { getJobs } from '../api/get_jobs'; import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_installed_security_jobs.ts b/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_installed_security_jobs.ts index 5bec2ce09e22a..a536b0a9252cc 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_installed_security_jobs.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/hooks/use_installed_security_jobs.ts @@ -7,7 +7,7 @@ import { useEffect, useState } from 'react'; -import { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; import { hasMlUserPermissions } from '../../../../../common/machine_learning/has_ml_user_permissions'; import { hasMlLicense } from '../../../../../common/machine_learning/has_ml_license'; import { isSecurityJob } from '../../../../../common/machine_learning/is_security_job'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts index 9160377b27e63..a0c847b9f4058 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.test.ts @@ -6,7 +6,7 @@ */ import { getNetworkFromInfluencers } from './get_network_from_influencers'; -import { DestinationOrSource } from '../types'; +import type { DestinationOrSource } from '../types'; describe('get_network_from_influencers', () => { test('returns null if there are no influencers', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts index 353648ab24c87..cc6edddd0dca3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/get_network_from_influencers.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { DestinationOrSource, isDestinationOrSource } from '../types'; +import type { DestinationOrSource } from '../types'; +import { isDestinationOrSource } from '../types'; import { getEntries } from '../get_entries'; export const getNetworkFromInfluencers = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts index 310502c04c1b4..0a3b1db6bfae5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; -import { InfluencerInput } from '../types'; +import type { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { InfluencerInput } from '../types'; import { hostToInfluencers } from './host_to_influencers'; describe('host_to_influencer', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts index 3a63958e2de12..4ed0f400622d5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/host_to_influencers.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; -import { InfluencerInput } from '../types'; +import type { HostItem } from '../../../../../common/search_strategy/security_solution/hosts'; +import type { InfluencerInput } from '../types'; export const hostToInfluencers = (hostItem: HostItem): InfluencerInput[] | null => { if (hostItem.host != null && hostItem.host.name != null) { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts index 5338b3b3184df..f91f1e2c0007a 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfluencerInput } from '../types'; +import type { InfluencerInput } from '../types'; import { networkToInfluencers } from './network_to_influencers'; describe('network_to_influencers', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts index a8de49437fd20..d282876715b10 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/influencers/network_to_influencers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfluencerInput } from '../types'; +import type { InfluencerInput } from '../types'; export const networkToInfluencers = (ip: string): InfluencerInput[] => { const influencers: InfluencerInput[] = [ diff --git a/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.tsx b/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.tsx index 4d5845845596b..25f5f61b68ba8 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/links/create_explorer_link.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; import { useMlHref } from '@kbn/ml-plugin/public'; -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; import { useKibana } from '../../../lib/kibana'; interface ExplorerLinkProps { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts b/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts index 83018b37825bd..686d51f589da5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/links/create_series_link.ts @@ -6,7 +6,7 @@ */ import { createEntitiesFromScore } from '../score/create_entities_from_score'; -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; export const createSeriesLink = (score: Anomaly, startDate: number, endDate: number): string => { const startDateIso = new Date(startDate).toISOString(); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/mock.ts b/x-pack/plugins/security_solution/public/common/components/ml/mock.ts index 6961d2200dffb..e16a1445837a5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/mock.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomalies } from './types'; +import type { Anomalies } from './types'; export const mockAnomalies: Anomalies = { anomalies: [ diff --git a/x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx b/x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx index a1e27cbb14414..0bd25283451a4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/permissions/ml_capabilities_provider.tsx @@ -7,7 +7,7 @@ import React, { useState, useEffect } from 'react'; -import { MlCapabilitiesResponse } from '@kbn/ml-plugin/public'; +import type { MlCapabilitiesResponse } from '@kbn/ml-plugin/public'; import { emptyMlCapabilities } from '../../../../../common/machine_learning/empty_ml_capabilities'; import { useAppToasts } from '../../../hooks/use_app_toasts'; import { useHttp } from '../../../lib/kibana'; 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 0d9b4001c17aa..0039c7ecad203 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 @@ -14,7 +14,7 @@ import { AnomalyScoreComponent } from './anomaly_score'; import { mockAnomalies } from '../mock'; import { TestProviders } from '../../../mock/test_providers'; import { useMountAppended } from '../../../utils/use_mount_appended'; -import { Anomalies } from '../types'; +import type { Anomalies } from '../types'; import { waitFor } from '@testing-library/dom'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx index 034da8fc59b5e..5b2a5929c5782 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { EuiPopover, EuiDescriptionList, EuiFlexItem, EuiIcon } from '@elastic/eui'; import styled from 'styled-components'; -import { NarrowDateRange, Anomaly } from '../types'; +import type { NarrowDateRange, Anomaly } from '../types'; import { DraggableScore } from './draggable_score'; import { escapeDataProviderId } from '../../drag_and_drop/helpers'; import { createDescriptionList } from './create_description_list'; 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 5eb0751404872..7131c47529636 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 @@ -14,7 +14,7 @@ import { AnomalyScoresComponent, createJobKey } from './anomaly_scores'; import { mockAnomalies } from '../mock'; import { TestProviders } from '../../../mock/test_providers'; import { getEmptyValue } from '../../empty_value'; -import { Anomalies } from '../types'; +import type { Anomalies } from '../types'; import { useMountAppended } from '../../../utils/use_mount_appended'; import { waitFor } from '@testing-library/dom'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx index df234a625b50f..6f6367fbe8ca8 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLoadingSpinner, EuiFlexGroup } from '@elastic/eui'; import { getEmptyTagValue } from '../../empty_value'; -import { Anomalies, Anomaly, NarrowDateRange } from '../types'; +import type { Anomalies, Anomaly, NarrowDateRange } from '../types'; import { getTopSeverityJobs } from './get_top_severity'; import { AnomalyScore } from './anomaly_score'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx index 045f96cfe8963..57434275afa3d 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/create_description_list.tsx @@ -9,8 +9,8 @@ import { EuiText, EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic import React from 'react'; import styled from 'styled-components'; -import { DescriptionList } from '../../../../../common/utility_types'; -import { Anomaly, NarrowDateRange } from '../types'; +import type { DescriptionList } from '../../../../../common/utility_types'; +import type { Anomaly, NarrowDateRange } from '../types'; import { getScoreString } from './score_health'; import { PreferenceFormattedDate } from '../../formatted_date'; import { createInfluencers } from '../influencers/create_influencers'; 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 794a3a60f80a4..ed3db1d4c14e1 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 @@ -10,7 +10,7 @@ import React from 'react'; import { mockAnomalies } from '../mock'; import { createDescriptionList } from './create_description_list'; import { EuiDescriptionList } from '@elastic/eui'; -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; import { waitFor } from '@testing-library/dom'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts index 9bb205d92fe0b..e547990887d16 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/create_entities_from_score.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; export const createEntityFromRecord = (entity: Record): string => createEntity(Object.keys(entity)[0], Object.values(entity)[0]); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx index 2f18d3a7c76c5..59baeae534682 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/draggable_score.tsx @@ -7,11 +7,9 @@ import React, { useCallback, useMemo } from 'react'; import { DraggableWrapper, DragEffects } from '../../drag_and_drop/draggable_wrapper'; -import { Anomaly } from '../types'; -import { - IS_OPERATOR, - QueryOperator, -} from '../../../../timelines/components/timeline/data_providers/data_provider'; +import type { Anomaly } from '../types'; +import type { QueryOperator } from '../../../../timelines/components/timeline/data_providers/data_provider'; +import { IS_OPERATOR } from '../../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../../timelines/components/timeline/data_providers/provider'; import { Spacer } from '../../page'; import { getScoreString } from './score_health'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts index 13a1607ec8eec..d82fc9a00a6dc 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/get_top_severity.ts @@ -6,7 +6,7 @@ */ import { toArray } from 'lodash/fp'; -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; export const getTopSeverityJobs = (anomalies: Anomaly[], limit?: number): Anomaly[] => { const reduced = anomalies.reduce>((accum, item) => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts index ef7c1d12f35dd..9f93e9a72fa05 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.test.ts @@ -7,7 +7,8 @@ import { cloneDeep } from 'lodash/fp'; import { mockAnomalies } from '../mock'; -import { scoreIntervalToDateTime, FromTo } from './score_interval_to_datetime'; +import type { FromTo } from './score_interval_to_datetime'; +import { scoreIntervalToDateTime } from './score_interval_to_datetime'; describe('score_interval_to_datetime', () => { let anomalies = cloneDeep(mockAnomalies); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts index f1c344d5ee021..c4f6662539e76 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/score_interval_to_datetime.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; export interface FromTo { from: string; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx index b42239c15ef48..bb896a4623040 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_host_table.tsx @@ -15,7 +15,7 @@ import * as i18n from './translations'; import { getAnomaliesHostTableColumnsCurated } from './get_anomalies_host_table_columns'; import { convertAnomaliesToHosts } from './convert_anomalies_to_hosts'; import { Loader } from '../../loader'; -import { AnomaliesHostTableProps } from '../types'; +import type { AnomaliesHostTableProps } from '../types'; import { useMlCapabilities } from '../hooks/use_ml_capabilities'; import { BasicTable } from './basic_table'; import { getCriteriaFromHostType } from '../criteria/get_criteria_from_host_type'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx index a3f9a651f9d59..377649f64c339 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_network_table.tsx @@ -13,7 +13,7 @@ import { hasMlUserPermissions } from '../../../../../common/machine_learning/has import * as i18n from './translations'; import { convertAnomaliesToNetwork } from './convert_anomalies_to_network'; import { Loader } from '../../loader'; -import { AnomaliesNetworkTableProps } from '../types'; +import type { AnomaliesNetworkTableProps } from '../types'; import { getAnomaliesNetworkTableColumnsCurated } from './get_anomalies_network_table_columns'; import { useMlCapabilities } from '../hooks/use_ml_capabilities'; import { BasicTable } from './basic_table'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx index 62071d126b4e2..d6e355d359a4b 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/anomalies_user_table.tsx @@ -14,7 +14,7 @@ import { hasMlUserPermissions } from '../../../../../common/machine_learning/has import * as i18n from './translations'; import { Loader } from '../../loader'; -import { AnomaliesUserTableProps } from '../types'; +import type { AnomaliesUserTableProps } from '../types'; import { useMlCapabilities } from '../hooks/use_ml_capabilities'; import { BasicTable } from './basic_table'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx index 68772d12effa6..e03ebae502ccd 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/basic_table.tsx @@ -6,7 +6,8 @@ */ import styled from 'styled-components'; -import { EuiInMemoryTable, EuiInMemoryTableProps } from '@elastic/eui'; +import type { EuiInMemoryTableProps } from '@elastic/eui'; +import { EuiInMemoryTable } from '@elastic/eui'; type BasicTableType = React.ComponentType>; export const BasicTable: typeof EuiInMemoryTable & { displayName: string } = styled( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts index 56fc786f20416..c7e8f8d792340 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.test.ts @@ -8,7 +8,7 @@ import { mockAnomalies } from '../mock'; import { cloneDeep } from 'lodash/fp'; import { convertAnomaliesToHosts, getHostNameFromEntity } from './convert_anomalies_to_hosts'; -import { AnomaliesByHost } from '../types'; +import type { AnomaliesByHost } from '../types'; describe('convert_anomalies_to_hosts', () => { let anomalies = cloneDeep(mockAnomalies); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts index e575b93a583b9..00beb18418a7c 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_hosts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomalies, AnomaliesByHost, Anomaly } from '../types'; +import type { Anomalies, AnomaliesByHost, Anomaly } from '../types'; import { getHostNameFromInfluencers } from '../influencers/get_host_name_from_influencers'; export const convertAnomaliesToHosts = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts index 294a336efd8ba..7137c9762fbfa 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.test.ts @@ -8,7 +8,7 @@ import { mockAnomalies } from '../mock'; import { cloneDeep } from 'lodash/fp'; import { convertAnomaliesToNetwork, getNetworkFromEntity } from './convert_anomalies_to_network'; -import { AnomaliesByNetwork } from '../types'; +import type { AnomaliesByNetwork } from '../types'; describe('convert_anomalies_to_hosts', () => { let anomalies = cloneDeep(mockAnomalies); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts index a05529e46aed0..8230b0e3ebc01 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_network.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { Anomalies, AnomaliesByNetwork, Anomaly, isDestinationOrSource } from '../types'; +import type { Anomalies, AnomaliesByNetwork, Anomaly } from '../types'; +import { isDestinationOrSource } from '../types'; import { getNetworkFromInfluencers } from '../influencers/get_network_from_influencers'; export const convertAnomaliesToNetwork = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.test.ts index b3c3aa64c9214..71d2459210ae1 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.test.ts @@ -7,7 +7,7 @@ import { mockAnomalies } from '../mock'; import { convertAnomaliesToUsers, getUserNameFromEntity } from './convert_anomalies_to_users'; -import { AnomaliesByUser } from '../types'; +import type { AnomaliesByUser } from '../types'; describe('convert_anomalies_to_users', () => { test('it returns expected anomalies from a user', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.ts index 8f69604fc5510..6d485ba1a01ea 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/convert_anomalies_to_users.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomalies, AnomaliesByUser, Anomaly } from '../types'; +import type { Anomalies, AnomaliesByUser, Anomaly } from '../types'; import { getUserNameFromInfluencers } from '../influencers/get_user_name_from_influencers'; export const convertAnomaliesToUsers = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts index f9ef0ff9285fe..eafbcd978964d 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/create_compound_key.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Anomaly } from '../types'; +import type { Anomaly } from '../types'; export const createCompoundAnomalyKey = (anomaly: Anomaly): string => `${anomaly.entityName}-${anomaly.entityValue}-${anomaly.severity}-${anomaly.jobId}`; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.test.ts index bbc2a9251c41d..ef644f621c1e1 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.test.ts @@ -6,7 +6,7 @@ */ import { anomaliesTableDefaultEquality } from './default_equality'; -import { AnomaliesHostTableProps } from '../types'; +import type { AnomaliesHostTableProps } from '../types'; import { HostsType } from '../../../../hosts/store/model'; describe('host_equality', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.ts index 213bd922b51f3..6285a7dbe6744 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/default_equality.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AnomaliesTableCommonProps } from '../types'; +import type { AnomaliesTableCommonProps } from '../types'; export const anomaliesTableDefaultEquality = ( prevProps: AnomaliesTableCommonProps, diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx index a207e30d562e9..16855824e907e 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_host_table_columns.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import { Columns } from '../../paginated_table'; -import { AnomaliesByHost, Anomaly } from '../types'; +import type { Columns } from '../../paginated_table'; +import type { AnomaliesByHost, Anomaly } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { HostDetailsLink } from '../../links'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx index 0a1e257aa87de..2ab7c2e8a66b9 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_network_table_columns.tsx @@ -7,15 +7,15 @@ import React from 'react'; -import { Columns } from '../../paginated_table'; -import { Anomaly, AnomaliesByNetwork } from '../types'; +import type { Columns } from '../../paginated_table'; +import type { Anomaly, AnomaliesByNetwork } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { NetworkDetailsLink } from '../../links'; import * as i18n from './translations'; import { NetworkType } from '../../../../network/store/model'; -import { FlowTarget } from '../../../../../common/search_strategy'; +import type { FlowTarget } from '../../../../../common/search_strategy'; import { getAnomaliesDefaultTableColumns } from './get_anomalies_table_columns'; export const getAnomaliesNetworkTableColumns = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx index 068128544f7e6..c1d9b6e1f5725 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.test.tsx @@ -7,8 +7,8 @@ import '../../../mock/match_media'; import * as i18n from './translations'; -import { AnomaliesBy, Anomaly } from '../types'; -import { Columns } from '../../paginated_table'; +import type { AnomaliesBy, Anomaly } from '../types'; +import type { Columns } from '../../paginated_table'; import React from 'react'; import { TestProviders } from '../../../mock'; import { useMountAppended } from '../../../utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx index eb3d7aac2ae2f..d204aaceba4ab 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_table_columns.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { Columns } from '../../paginated_table'; -import { AnomaliesBy, Anomaly } from '../types'; +import type { Columns } from '../../paginated_table'; +import type { AnomaliesBy, Anomaly } from '../types'; import { EntityDraggable } from '../entity_draggable'; import { createCompoundAnomalyKey } from './create_compound_key'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx index ff0d023eaf03a..f1c8b5808c055 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/get_anomalies_user_table_columns.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import { Columns } from '../../paginated_table'; -import { AnomaliesByUser, Anomaly } from '../types'; +import type { Columns } from '../../paginated_table'; +import type { AnomaliesByUser, Anomaly } from '../types'; import { getRowItemDraggable } from '../../tables/helpers'; import { createCompoundAnomalyKey } from './create_compound_key'; import { UserDetailsLink } from '../../links'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts index dd85d9fedab01..e2b9ba44d0e13 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.test.ts @@ -6,7 +6,7 @@ */ import { networkEquality } from './network_equality'; -import { AnomaliesNetworkTableProps } from '../types'; +import type { AnomaliesNetworkTableProps } from '../types'; import { NetworkType } from '../../../../network/store/model'; import { FlowTarget } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts index 4354fa75f5f91..a62a41cb95c36 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/tables/network_equality.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AnomaliesNetworkTableProps } from '../types'; +import type { AnomaliesNetworkTableProps } from '../types'; import { anomaliesTableDefaultEquality } from './default_equality'; export const networkEquality = ( diff --git a/x-pack/plugins/security_solution/public/common/components/ml/types.ts b/x-pack/plugins/security_solution/public/common/components/ml/types.ts index 01889e6bb5bd8..edfa14b8340dc 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml/types.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Influencer } from '@kbn/ml-plugin/public'; -import { FlowTarget } from '../../../../common/search_strategy'; +import type { Influencer } from '@kbn/ml-plugin/public'; +import type { FlowTarget } from '../../../../common/search_strategy'; -import { HostsType } from '../../../hosts/store/model'; -import { NetworkType } from '../../../network/store/model'; -import { UsersType } from '../../../users/store/model'; +import type { HostsType } from '../../../hosts/store/model'; +import type { NetworkType } from '../../../network/store/model'; +import type { UsersType } from '../../../users/store/model'; export interface Source { job_id: string; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts index d4e48a99c68b0..a81a4c2878c5f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { MlSummaryJob } from '@kbn/ml-plugin/public'; -import { +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { Group, Module, RecognizerModule, diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.ts index f9e096c39a576..9da104b362361 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/api.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/api.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CheckRecognizerProps, CloseJobsResponse, ErrorResponse, diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx index fe92c78d2833e..45c421eac468f 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/helpers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityJob } from './types'; +import type { SecurityJob } from './types'; /** * Returns a filtered array of Jobs according to JobsTableFilters selections diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.test.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.test.ts index 3fcdd4366da7d..db564d13456a0 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.test.ts @@ -13,7 +13,7 @@ import { useAppToasts } from '../../../hooks/use_app_toasts'; import { useAppToastsMock } from '../../../hooks/use_app_toasts.mock'; import { getJobsSummary } from '../../ml/api/get_jobs_summary'; import { checkRecognizer, getModules } from '../api'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; import { mockJobsSummaryResponse, mockGetModuleResponse, diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.ts index 0b73db0d40e22..c7d2c07eec2dd 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs.ts @@ -13,7 +13,7 @@ import { hasMlLicense } from '../../../../../common/machine_learning/has_ml_lice import { useAppToasts } from '../../../hooks/use_app_toasts'; import { useUiSetting$, useHttp } from '../../../lib/kibana'; import { checkRecognizer, getModules } from '../api'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; import { createSecurityJobs } from './use_security_jobs_helpers'; import { useMlCapabilities } from '../../ml/hooks/use_ml_capabilities'; import * as i18n from '../../ml/translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs_helpers.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs_helpers.tsx index 3150c8aedd292..d41a7a8db92f5 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs_helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/hooks/use_security_jobs_helpers.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import { MlSummaryJob } from '@kbn/ml-plugin/public'; -import { +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { AugmentedSecurityJobFields, Module, ModuleJob, diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx index 59056bdba681b..403d48c38850e 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.test.tsx @@ -9,7 +9,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; import { GroupsFilterPopoverComponent } from './groups_filter_popover'; import { mockSecurityJobs } from '../../api.mock'; -import { SecurityJob } from '../../types'; +import type { SecurityJob } from '../../types'; import { cloneDeep } from 'lodash/fp'; describe('GroupsFilterPopover', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx index 249dc0dfccdbb..71d81f45eeae7 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/groups_filter_popover.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { Dispatch, SetStateAction, useEffect, useState } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; +import React, { useEffect, useState } from 'react'; import { EuiFilterButton, EuiFilterSelectItem, @@ -16,7 +17,7 @@ import { EuiSpacer, } from '@elastic/eui'; import * as i18n from './translations'; -import { SecurityJob } from '../../types'; +import type { SecurityJob } from '../../types'; import { toggleSelectedGroup } from './toggle_selected_group'; interface GroupsFilterPopoverProps { diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx index 641a13f07ee9d..16879a0c22cc3 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.test.tsx @@ -8,7 +8,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; import { JobsTableFiltersComponent } from './jobs_table_filters'; -import { SecurityJob } from '../../types'; +import type { SecurityJob } from '../../types'; import { cloneDeep } from 'lodash/fp'; import { mockSecurityJobs } from '../../api.mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx index 1abeb376988c4..26e404c2886bb 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/filters/jobs_table_filters.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { Dispatch, SetStateAction, useEffect, useState, useCallback } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; +import React, { useEffect, useState, useCallback } from 'react'; import { EuiFilterButton, @@ -14,9 +15,9 @@ import { EuiFlexItem, EuiSearchBar, } from '@elastic/eui'; -import { EuiSearchBarQuery } from '../../../../../timelines/components/open_timeline/types'; +import type { EuiSearchBarQuery } from '../../../../../timelines/components/open_timeline/types'; import * as i18n from './translations'; -import { JobsFilters, SecurityJob } from '../../types'; +import type { JobsFilters, SecurityJob } from '../../types'; import { GroupsFilterPopover } from './groups_filter_popover'; interface JobsTableFiltersProps { diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.test.tsx index 660d3b960b5fc..9657b8e5acda7 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.test.tsx @@ -12,7 +12,7 @@ import { waitFor } from '@testing-library/react'; import { JobSwitchComponent } from './job_switch'; import { cloneDeep } from 'lodash/fp'; import { mockSecurityJobs } from '../api.mock'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; describe('JobSwitch', () => { let securityJobs: SecurityJob[]; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.tsx index e0c1a3edbf54e..45fb359c0e121 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/job_switch.tsx @@ -13,7 +13,7 @@ import { isJobFailed, isJobStarted, } from '../../../../../common/machine_learning/helpers'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; const StaticSwitch = styled(EuiSwitch)` .euiSwitch__thumb, diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx index 2cb8db9252a1a..308d010ea1273 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.test.tsx @@ -11,7 +11,7 @@ import { render, waitFor } from '@testing-library/react'; import { JobsTableComponent } from './jobs_table'; import { mockSecurityJobs } from '../api.mock'; import { cloneDeep } from 'lodash/fp'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.tsx index ab86093243d5c..482d334bb8c54 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/jobs_table/jobs_table.tsx @@ -24,7 +24,7 @@ import { PopoverItems } from '../../popover_items'; import { useBasePath, useKibana } from '../../../lib/kibana'; import * as i18n from './translations'; import { JobSwitch } from './job_switch'; -import { SecurityJob } from '../types'; +import type { SecurityJob } from '../types'; const JobNameWrapper = styled.div` margin: 5px 0; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx index 4d7ec7b484818..accb9eb6d7387 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/ml_popover.tsx @@ -14,13 +14,15 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; -import React, { Dispatch, useCallback, useReducer, useState, useMemo } from 'react'; +import type { Dispatch } from 'react'; +import React, { useCallback, useReducer, useState, useMemo } from 'react'; import styled from 'styled-components'; import { MLJobsAwaitingNodeWarning } from '@kbn/ml-plugin/public'; import { useKibana } from '../../lib/kibana'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../lib/telemetry'; -import { errorToToaster, useStateToaster, ActionToaster } from '../toasters'; +import type { ActionToaster } from '../toasters'; +import { errorToToaster, useStateToaster } from '../toasters'; import { setupMlJob, startDatafeeds, stopDatafeeds } from './api'; import { filterJobs } from './helpers'; import { JobsTableFilters } from './jobs_table/filters/jobs_table_filters'; @@ -28,7 +30,7 @@ import { JobsTable } from './jobs_table/jobs_table'; import { ShowingCount } from './jobs_table/showing_count'; import { PopoverDescription } from './popover_description'; import * as i18n from './translations'; -import { JobsFilters, SecurityJob } from './types'; +import type { JobsFilters, SecurityJob } from './types'; import { UpgradeContents } from './upgrade_contents'; import { useSecurityJobs } from './hooks/use_security_jobs'; diff --git a/x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts b/x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts index 64fe2b7e1fe81..65e01e440e6aa 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/ml_popover/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { MlSummaryJob } from '@kbn/ml-plugin/public'; -import { MlError } from '../ml/types'; +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { MlError } from '../ml/types'; export interface Group { id: string; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/__mocks__/use_get_url_search.ts b/x-pack/plugins/security_solution/public/common/components/navigation/__mocks__/use_get_url_search.ts index 8eb1198f77a16..63a9648da35c6 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/__mocks__/use_get_url_search.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/__mocks__/use_get_url_search.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { SearchNavTab } from '../types'; +import type { SearchNavTab } from '../types'; export const useGetUrlSearch = (tab: SearchNavTab) => ''; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/get_breadcrumbs_for_page.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/get_breadcrumbs_for_page.ts index c70d7d24fcb94..f6873cfec71ad 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/get_breadcrumbs_for_page.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/get_breadcrumbs_for_page.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { SecurityPageName } from '../../../../app/types'; import { APP_NAME } from '../../../../../common/constants'; import { getAppLandingUrl } from '../../link_to/redirect_to_landing'; -import { GetSecuritySolutionUrl } from '../../link_to'; +import type { GetSecuritySolutionUrl } from '../../link_to'; import { getAncestorLinksInfo } from '../../../links'; -import { GenericNavRecord } from '../types'; +import type { GenericNavRecord } from '../types'; export const getLeadingBreadcrumbsForSecurityPage = ( pageName: SecurityPageName, diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts index f35f8be0006c9..c67bcc4ab1051 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.test.ts @@ -7,15 +7,16 @@ import '../../../mock/match_media'; import { encodeIpv6 } from '../../../lib/helpers'; -import { getBreadcrumbsForRoute, ObjectWithNavTabs, useSetBreadcrumbs } from '.'; +import type { ObjectWithNavTabs } from '.'; +import { getBreadcrumbsForRoute, useSetBreadcrumbs } from '.'; import { HostsTableType } from '../../../../hosts/store/model'; -import { RouteSpyState, SiemRouteType } from '../../../utils/route/types'; +import type { RouteSpyState, SiemRouteType } from '../../../utils/route/types'; import { NetworkRouteType } from '../../../../network/pages/navigation/types'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { AdministrationSubTab } from '../../../../management/types'; import { renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../mock'; -import { GetSecuritySolutionUrl } from '../../link_to'; +import type { GetSecuritySolutionUrl } from '../../link_to'; import { APP_UI_ID, SecurityPageName } from '../../../../../common/constants'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; import { useIsGroupedNavigationEnabled } from '../helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts index 7ca61bf9a8e83..aec9f2b12caaf 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/index.ts @@ -8,8 +8,8 @@ import { last, omit } from 'lodash/fp'; import { useDispatch } from 'react-redux'; -import { ChromeBreadcrumb } from '@kbn/core/public'; -import { StartServices } from '../../../../types'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; +import type { StartServices } from '../../../../types'; import { getTrailingBreadcrumbs as getHostDetailsBreadcrumbs } from '../../../../hosts/pages/details/utils'; import { getTrailingBreadcrumbs as getIPDetailsBreadcrumbs } from '../../../../network/pages/details'; import { getTrailingBreadcrumbs as getDetectionRulesBreadcrumbs } from '../../../../detections/pages/detection_engine/rules/utils'; @@ -17,7 +17,7 @@ import { getTrailingBreadcrumbs as getUsersBreadcrumbs } from '../../../../users import { getTrailingBreadcrumbs as getKubernetesBreadcrumbs } from '../../../../kubernetes/pages/utils/breadcrumbs'; import { getTrailingBreadcrumbs as getAdminBreadcrumbs } from '../../../../management/common/breadcrumbs'; import { SecurityPageName } from '../../../../app/types'; -import { +import type { RouteSpyState, HostRouteSpyState, NetworkRouteSpyState, @@ -26,9 +26,10 @@ import { } from '../../../utils/route/types'; import { timelineActions } from '../../../../timelines/store/timeline'; import { TimelineId } from '../../../../../common/types/timeline'; -import { GenericNavRecord, NavigateToUrl } from '../types'; +import type { GenericNavRecord, NavigateToUrl } from '../types'; import { getLeadingBreadcrumbsForSecurityPage } from './get_breadcrumbs_for_page'; -import { GetSecuritySolutionUrl, useGetSecuritySolutionUrl } from '../../link_to'; +import type { GetSecuritySolutionUrl } from '../../link_to'; +import { useGetSecuritySolutionUrl } from '../../link_to'; import { useIsGroupedNavigationEnabled } from '../helpers'; export interface ObjectWithNavTabs { diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts b/x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts index 16bf3a074d884..62a08ec3d43fc 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/helpers.ts @@ -6,20 +6,21 @@ */ import { isEmpty } from 'lodash/fp'; -import { Location } from 'history'; +import type { Location } from 'history'; import type { Filter, Query } from '@kbn/es-query'; -import { UrlInputsModel } from '../../store/inputs/model'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { UrlInputsModel } from '../../store/inputs/model'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; import { CONSTANTS } from '../url_state/constants'; -import { KeyUrlState, UrlState, isAdministration, ALL_URL_STATE_KEYS } from '../url_state/types'; +import type { KeyUrlState, UrlState } from '../url_state/types'; +import { isAdministration, ALL_URL_STATE_KEYS } from '../url_state/types'; import { replaceQueryStringInLocation, replaceStateKeyInQueryString, getQueryStringFromLocation, } from '../url_state/helpers'; -import { SearchNavTab } from './types'; +import type { SearchNavTab } from './types'; import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features'; import { useUiSetting$ } from '../../lib/kibana'; import { ENABLE_GROUPED_NAVIGATION } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx index ef2c0a36437b5..23f1e419a82d0 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/index.test.tsx @@ -12,8 +12,8 @@ import { CONSTANTS } from '../url_state/constants'; import { TabNavigationComponent } from '.'; import { navTabs } from '../../../app/home/home_navigations'; import { HostsTableType } from '../../../hosts/store/model'; -import { RouteSpyState } from '../../utils/route/types'; -import { TabNavigationComponentProps, SecuritySolutionTabNavigationProps } from './types'; +import type { RouteSpyState } from '../../utils/route/types'; +import type { TabNavigationComponentProps, SecuritySolutionTabNavigationProps } from './types'; import { TimelineTabs } from '../../../../common/types/timeline'; import { SecurityPageName } from '../../../app/types'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/index.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/index.tsx index ed296b70b31b0..6b6ebf287647d 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/index.tsx @@ -11,12 +11,12 @@ import { compose } from 'redux'; import deepEqual from 'fast-deep-equal'; import { useKibana } from '../../lib/kibana'; -import { RouteSpyState } from '../../utils/route/types'; +import type { RouteSpyState } from '../../utils/route/types'; import { useRouteSpy } from '../../utils/route/use_route_spy'; import { makeMapStateToProps } from '../url_state/helpers'; import { useSetBreadcrumbs } from './breadcrumbs'; import { TabNavigation } from './tab_navigation'; -import { TabNavigationComponentProps, SecuritySolutionTabNavigationProps } from './types'; +import type { TabNavigationComponentProps, SecuritySolutionTabNavigationProps } from './types'; /** * @description - This component handels all of the tab navigation seen within a Security Soluton application page, not the Security Solution primary side navigation diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.test.ts index 41b62e8589854..c44873414ca11 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.test.ts @@ -7,10 +7,10 @@ import { renderHook } from '@testing-library/react-hooks'; import { SecurityPageName } from '../../../app/types'; -import { AppLinkItems } from '../../links'; +import type { AppLinkItems } from '../../links'; import { TestProviders } from '../../mock'; import { useAppNavLinks, useAppRootNavLink } from './nav_links'; -import { NavLinkItem } from './types'; +import type { NavLinkItem } from './types'; const mockNavLinks: AppLinkItems = [ { diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.ts b/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.ts index db8b5788b04d6..1fd51b61497df 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/nav_links.ts @@ -8,8 +8,8 @@ import { useMemo } from 'react'; import { useAppLinks } from '../../links'; import type { SecurityPageName } from '../../../app/types'; -import { NavLinkItem } from './types'; -import { AppLinkItems } from '../../links/types'; +import type { NavLinkItem } from './types'; +import type { AppLinkItems } from '../../links/types'; export const useAppNavLinks = (): NavLinkItem[] => { const appLinks = useAppLinks(); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/icons/launch.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/icons/launch.tsx index de96338ef98e6..739cbe5d46658 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/icons/launch.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/security_side_nav/icons/launch.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { SVGProps } from 'react'; +import type { SVGProps } from 'react'; +import React from 'react'; export const EuiIconLaunch: React.FC> = ({ ...props }) => ( > = ({ ...props }) => ( true); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/types.ts index a16bad9126d09..797196364cc46 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/solution_grouped_nav/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import React from 'react'; +import type React from 'react'; import type { SecurityPageName } from '../../../../app/types'; import type { LinkCategories } from '../../../links/types'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx index f5a05cb20925c..85ec8d5b445d5 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.test.tsx @@ -11,10 +11,10 @@ import { TimelineTabs } from '../../../../../common/types/timeline'; import { navTabsHostDetails } from '../../../../hosts/pages/details/nav_tabs'; import { HostsTableType } from '../../../../hosts/store/model'; -import { RouteSpyState } from '../../../utils/route/types'; +import type { RouteSpyState } from '../../../utils/route/types'; import { CONSTANTS } from '../../url_state/constants'; import { TabNavigationComponent } from '.'; -import { TabNavigationProps } from './types'; +import type { TabNavigationProps } from './types'; import { SecurityPageName } from '../../../../app/types'; jest.mock('../../link_to'); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx index ca6ca9b83d533..d364a5526a226 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/index.tsx @@ -13,7 +13,7 @@ import deepEqual from 'fast-deep-equal'; import { useNavigation } from '../../../lib/kibana'; import { track, METRIC_TYPE, TELEMETRY_EVENT } from '../../../lib/telemetry'; -import { TabNavigationProps, TabNavigationItemProps } from './types'; +import type { TabNavigationProps, TabNavigationItemProps } from './types'; import { BETA } from '../../../translations'; const TabNavigationItemComponent = ({ diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts index b1bf150f9e1c8..3a62feacba15c 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/tab_navigation/types.ts @@ -6,12 +6,12 @@ */ import type { Filter, Query } from '@kbn/es-query'; -import { UrlInputsModel } from '../../../store/inputs/model'; -import { CONSTANTS } from '../../url_state/constants'; -import { TimelineUrl } from '../../../../timelines/store/timeline/model'; +import type { UrlInputsModel } from '../../../store/inputs/model'; +import type { CONSTANTS } from '../../url_state/constants'; +import type { TimelineUrl } from '../../../../timelines/store/timeline/model'; -import { SecuritySolutionTabNavigationProps } from '../types'; -import { SiemRouteType } from '../../../utils/route/types'; +import type { SecuritySolutionTabNavigationProps } from '../types'; +import type { SiemRouteType } from '../../../utils/route/types'; export interface TabNavigationProps extends SecuritySolutionTabNavigationProps { pathName: string; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts index abfe87ea1d880..f810f08328164 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/types.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { IconType } from '@elastic/eui'; -import { UrlStateType } from '../url_state/constants'; +import type { IconType } from '@elastic/eui'; +import type { UrlStateType } from '../url_state/constants'; import { SecurityPageName } from '../../../app/types'; -import { UrlState } from '../url_state/types'; -import { SiemRouteType } from '../../utils/route/types'; -import { LinkCategories } from '../../links'; +import type { UrlState } from '../url_state/types'; +import type { SiemRouteType } from '../../utils/route/types'; +import type { LinkCategories } from '../../links'; export interface TabNavigationComponentProps { pageName: string; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx index 4de646f860498..9e4b1612eebd0 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_get_url_search.tsx @@ -11,7 +11,7 @@ import { useDeepEqualSelector } from '../../hooks/use_selector'; import { useGlobalQueryString } from '../../utils/global_query_string'; import { makeMapStateToProps } from '../url_state/helpers'; import { getSearch, getUrlStateSearch } from './helpers'; -import { SearchNavTab } from './types'; +import type { SearchNavTab } from './types'; export const useGetUrlSearch = (tab?: SearchNavTab) => { const mapState = makeMapStateToProps(); diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx index 4c0861e7a3328..4a39651a19bd6 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.test.tsx @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; +import type { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; import { useKibana } from '../../../lib/kibana/kibana_react'; import { useGetUserCasesPermissions } from '../../../lib/kibana'; import { SecurityPageName } from '../../../../app/types'; @@ -14,7 +14,7 @@ import { useSecuritySolutionNavigation } from '.'; import { CONSTANTS } from '../../url_state/constants'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; -import { UrlInputsModel } from '../../../store/inputs/model'; +import type { UrlInputsModel } from '../../../store/inputs/model'; import { useRouteSpy } from '../../../utils/route/use_route_spy'; import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental_features'; import { TestProviders } from '../../../mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.tsx index f0a51e0b8a39a..6c66f5a489234 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/index.tsx @@ -15,7 +15,7 @@ import { useRouteSpy } from '../../../utils/route/use_route_spy'; import { navTabs } from '../../../../app/home/home_navigations'; import { useDeepEqualSelector } from '../../../hooks/use_selector'; import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental_features'; -import { GenericNavRecord } from '../types'; +import type { GenericNavRecord } from '../types'; /** * @description - This hook provides the structure necessary by the KibanaPageTemplate for rendering the primary security_solution side navigation. diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/types.ts b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/types.ts index f2c68f881528d..b7b4208ed1057 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TabNavigationProps } from '../tab_navigation/types'; +import type { TabNavigationProps } from '../tab_navigation/types'; export type PrimaryNavigationItemsProps = Omit< TabNavigationProps, diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx index 090061398ae89..12223d9042980 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_navigation_items.tsx @@ -5,16 +5,18 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; -import { EuiSideNavItemType } from '@elastic/eui/src/components/side_nav/side_nav_types'; +import type React from 'react'; +import { useCallback, useMemo } from 'react'; +import type { EuiSideNavItemType } from '@elastic/eui/src/components/side_nav/side_nav_types'; import { securityNavGroup } from '../../../../app/home/home_navigations'; import { getSearch } from '../helpers'; -import { PrimaryNavigationItemsProps } from './types'; +import type { PrimaryNavigationItemsProps } from './types'; import { useKibana } from '../../../lib/kibana/kibana_react'; import { useGetUserCasesPermissions } from '../../../lib/kibana'; import { useNavigation } from '../../../lib/kibana/hooks'; -import { NavTab, SecurityNavGroupKey } from '../types'; +import type { NavTab } from '../types'; +import { SecurityNavGroupKey } from '../types'; import { SecurityPageName } from '../../../../../common/constants'; import { useCanSeeHostIsolationExceptionsMenu } from '../../../../management/pages/host_isolation_exceptions/view/hooks'; import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental_features'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_primary_navigation.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_primary_navigation.tsx index 888d9f2d8ee6b..5033dc7aabeb2 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_primary_navigation.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_primary_navigation.tsx @@ -8,8 +8,8 @@ import React, { useEffect, useState, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; -import { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; -import { PrimaryNavigationProps } from './types'; +import type { KibanaPageTemplateProps } from '@kbn/shared-ux-components'; +import type { PrimaryNavigationProps } from './types'; import { usePrimaryNavigationItems } from './use_navigation_items'; import { useIsGroupedNavigationEnabled } from '../helpers'; import { SecuritySideNav } from '../security_side_nav'; diff --git a/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts index a5f04fe32f0a4..c0676af8fd9b3 100644 --- a/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.test.ts @@ -18,7 +18,7 @@ import { removeSuffixFromVersion, showNewsItem, } from './helpers'; -import { NewsItem, RawNewsApiResponse } from './types'; +import type { NewsItem, RawNewsApiResponse } from './types'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts index 0b6411f836213..02af551b46d0b 100644 --- a/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/helpers.ts @@ -9,7 +9,7 @@ import { get } from 'lodash/fp'; import moment from 'moment'; import uuid from 'uuid'; import semverCoerce from 'semver/functions/coerce'; -import { NewsItem, RawNewsApiItem, RawNewsApiResponse } from './types'; +import type { NewsItem, RawNewsApiItem, RawNewsApiResponse } from './types'; import { KibanaServices } from '../../lib/kibana'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx index cb85aeda488e8..f8eec46b981a2 100644 --- a/x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/index.tsx @@ -10,7 +10,7 @@ import React, { useEffect, useState } from 'react'; import { fetchNews, getNewsFeedUrl, getNewsItemsFromApiResponse } from './helpers'; import { useKibana, useUiSetting$, KibanaServices } from '../../lib/kibana'; import { NewsFeed } from './news_feed'; -import { NewsItem } from './types'; +import type { NewsItem } from './types'; export const StatefulNewsFeed = React.memo<{ enableNewsFeedSetting: string; diff --git a/x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx index 940263bd43b15..f9ec136b94d3b 100644 --- a/x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/news_feed.tsx @@ -13,7 +13,7 @@ import { SidebarHeader } from '../sidebar_header'; import { NoNews } from './no_news'; import { Post } from './post'; -import { NewsItem } from './types'; +import type { NewsItem } from './types'; interface Props { news: NewsItem[] | null | undefined; diff --git a/x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx b/x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx index 2c4042d57561f..cc9332cb1c2a0 100644 --- a/x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/news_feed/post/index.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { PreferenceFormattedP1DTDate } from '../../formatted_date'; import { showNewsItem } from '../helpers'; import { NewsLink } from '../news_link'; -import { NewsItem } from '../types'; +import type { NewsItem } from '../types'; const NewsItemPreviewImage = styled.img` height: 56px; diff --git a/x-pack/plugins/security_solution/public/common/components/overview_description_list/index.tsx b/x-pack/plugins/security_solution/public/common/components/overview_description_list/index.tsx index b2d442b963cb0..8ea114af9acf4 100644 --- a/x-pack/plugins/security_solution/public/common/components/overview_description_list/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/overview_description_list/index.tsx @@ -8,7 +8,7 @@ import { EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import { DescriptionList } from '../../../../common/utility_types'; +import type { DescriptionList } from '../../../../common/utility_types'; import { DescriptionListStyled } from '../page'; export const OverviewDescriptionList = ({ diff --git a/x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx b/x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx index 26b5f44afae56..545130f0940e3 100644 --- a/x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page/manage_query.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { Position } from '@elastic/charts'; +import type { Position } from '@elastic/charts'; import { omit } from 'lodash/fp'; import React, { useEffect } from 'react'; -import { inputsModel } from '../../store'; -import { GlobalTimeArgs } from '../../containers/use_global_time'; +import type { inputsModel } from '../../store'; +import type { GlobalTimeArgs } from '../../containers/use_global_time'; export interface OwnProps extends Pick { headerChildren?: React.ReactNode; diff --git a/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx b/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx index acbb5d7e35499..3621907ea9ef3 100644 --- a/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page_route/pageroute.test.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { PageRoute } from './pageroute'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; describe('pageroute', () => { const documentTitle = 'Kibana'; diff --git a/x-pack/plugins/security_solution/public/common/components/page_wrapper/index.tsx b/x-pack/plugins/security_solution/public/common/components/page_wrapper/index.tsx index 94ac38d312d21..5a1d3d44bd8b2 100644 --- a/x-pack/plugins/security_solution/public/common/components/page_wrapper/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page_wrapper/index.tsx @@ -8,7 +8,7 @@ import classNames from 'classnames'; import React, { useEffect } from 'react'; import styled from 'styled-components'; -import { CommonProps } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; import { useGlobalFullScreen } from '../../containers/use_full_screen'; import { gutterTimeline } from '../../lib/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts b/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts index 1e7b1c749c004..2623079ba0046 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PaginationInputPaginated } from '../../../../common/search_strategy'; +import type { PaginationInputPaginated } from '../../../../common/search_strategy'; export const generateTablePaginationOptions = ( activePage: number, diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx index 5a247fa30d92f..40fa401694a2f 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.mock.tsx @@ -7,7 +7,7 @@ import { getOrEmptyTagFromValue } from '../empty_value'; -import { Columns, ItemsPerRow } from '.'; +import type { Columns, ItemsPerRow } from '.'; export const mockData = { Hosts: { diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx index 0ba5e1569993a..53c61bdace999 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.test.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../common/constants'; -import { BasicTableProps, PaginatedTable } from '.'; +import type { BasicTableProps } from '.'; +import { PaginatedTable } from '.'; import { getHostsColumns, mockData, rowItems, sortedHosts } from './index.mock'; import { ThemeProvider } from 'styled-components'; import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx index 0c11338f53841..59bb9c060da96 100644 --- a/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/paginated_table/index.tsx @@ -5,42 +5,45 @@ * 2.0. */ +import type { + EuiBasicTableProps, + EuiGlobalToastListToast as Toast, + EuiTableRowCellProps, +} from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableProps, EuiButtonEmpty, EuiContextMenuItem, EuiContextMenuPanel, EuiFlexGroup, EuiFlexItem, - EuiGlobalToastListToast as Toast, EuiLoadingContent, EuiPagination, EuiPopover, - EuiTableRowCellProps, } from '@elastic/eui'; import { noop } from 'lodash/fp'; -import React, { FC, memo, useState, useMemo, useEffect, ComponentType, useCallback } from 'react'; +import type { FC, ComponentType } from 'react'; +import React, { memo, useState, useMemo, useEffect, useCallback } from 'react'; import styled from 'styled-components'; -import { Direction } from '../../../../common/search_strategy'; +import type { Direction } from '../../../../common/search_strategy'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../common/constants'; -import { HostsTableColumns } from '../../../hosts/components/hosts_table'; -import { NetworkDnsColumns } from '../../../network/components/network_dns_table/columns'; -import { NetworkHttpColumns } from '../../../network/components/network_http_table/columns'; -import { +import type { HostsTableColumns } from '../../../hosts/components/hosts_table'; +import type { NetworkDnsColumns } from '../../../network/components/network_dns_table/columns'; +import type { NetworkHttpColumns } from '../../../network/components/network_http_table/columns'; +import type { NetworkTopNFlowColumns, NetworkTopNFlowColumnsNetworkDetails, } from '../../../network/components/network_top_n_flow_table/columns'; -import { +import type { NetworkTopCountriesColumns, NetworkTopCountriesColumnsNetworkDetails, } from '../../../network/components/network_top_countries_table/columns'; -import { TlsColumns } from '../../../network/components/tls_table/columns'; -import { UncommonProcessTableColumns } from '../../../hosts/components/uncommon_process_table'; -import { HostRiskScoreColumns } from '../../../hosts/components/host_risk_score_table'; +import type { TlsColumns } from '../../../network/components/tls_table/columns'; +import type { UncommonProcessTableColumns } from '../../../hosts/components/uncommon_process_table'; +import type { HostRiskScoreColumns } from '../../../hosts/components/host_risk_score_table'; -import { UsersColumns } from '../../../network/components/users_table/columns'; +import type { UsersColumns } from '../../../network/components/users_table/columns'; import { HeaderSection } from '../header_section'; import { Loader } from '../loader'; import { useStateToaster } from '../toasters'; @@ -49,8 +52,8 @@ import * as i18n from './translations'; import { Panel } from '../panel'; import { InspectButtonContainer } from '../inspect'; import { useQueryToggle } from '../../containers/query_toggle'; -import { UsersTableColumns } from '../../../users/components/all_users'; -import { AuthTableColumns } from '../authentication/types'; +import type { UsersTableColumns } from '../../../users/components/all_users'; +import type { AuthTableColumns } from '../authentication/types'; const DEFAULT_DATA_TEST_SUBJ = 'paginated-table'; 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 5ffbbfc0ac08c..f164e539b3b1c 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 @@ -7,7 +7,8 @@ import React from 'react'; -import { PopoverItems, PopoverItemsProps } from '.'; +import type { PopoverItemsProps } from '.'; +import { PopoverItems } from '.'; import { TestProviders } from '../../mock'; import { render, screen } from '@testing-library/react'; import { within } from '@testing-library/dom'; diff --git a/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx index da0c12f876860..fadf1767b1db6 100644 --- a/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/query_bar/index.test.tsx @@ -13,7 +13,8 @@ import { DEFAULT_FROM, DEFAULT_TO } from '../../../../common/constants'; import { TestProviders, mockIndexPattern } from '../../mock'; import { FilterManager } from '@kbn/data-plugin/public'; import { SearchBar } from '@kbn/unified-search-plugin/public'; -import { QueryBar, QueryBarComponentProps } from '.'; +import type { QueryBarComponentProps } from '.'; +import { QueryBar } from '.'; import { setAutocomplete } from '@kbn/unified-search-plugin/public/services'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx index feb9cf30afc4f..e487277ff9a7a 100644 --- a/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx @@ -9,14 +9,11 @@ import React, { memo, useMemo, useCallback } from 'react'; import deepEqual from 'fast-deep-equal'; import type { DataViewBase, Filter, Query, TimeRange } from '@kbn/es-query'; -import { - FilterManager, - TimeHistory, - SavedQuery, - SavedQueryTimeFilter, -} from '@kbn/data-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { SearchBar, SearchBarProps } from '@kbn/unified-search-plugin/public'; +import type { FilterManager, SavedQuery, SavedQueryTimeFilter } from '@kbn/data-plugin/public'; +import { TimeHistory } from '@kbn/data-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; +import type { SearchBarProps } from '@kbn/unified-search-plugin/public'; +import { SearchBar } from '@kbn/unified-search-plugin/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; export interface QueryBarComponentProps { diff --git a/x-pack/plugins/security_solution/public/common/components/risk_score_over_time/index.tsx b/x-pack/plugins/security_solution/public/common/components/risk_score_over_time/index.tsx index 460da806f5433..5c6979fbd4a03 100644 --- a/x-pack/plugins/security_solution/public/common/components/risk_score_over_time/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/risk_score_over_time/index.tsx @@ -6,6 +6,7 @@ */ import React, { useMemo, useCallback } from 'react'; +import type { TooltipValue } from '@elastic/charts'; import { Chart, LineSeries, @@ -15,7 +16,6 @@ import { Position, AnnotationDomainType, LineAnnotation, - TooltipValue, } from '@elastic/charts'; import { euiThemeVars } from '@kbn/ui-theme'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingChart, EuiText, EuiPanel } from '@elastic/eui'; @@ -27,7 +27,7 @@ import { HeaderSection } from '../header_section'; import { InspectButton, InspectButtonContainer } from '../inspect'; import * as i18n from './translations'; import { PreferenceFormattedDate } from '../formatted_date'; -import { RiskScore } from '../../../../common/search_strategy'; +import type { RiskScore } from '../../../../common/search_strategy'; export interface RiskScoreOverTimeProps { from: string; diff --git a/x-pack/plugins/security_solution/public/common/components/search_bar/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/search_bar/index.test.tsx index bcf340427620a..430fe89ab7b6e 100644 --- a/x-pack/plugins/security_solution/public/common/components/search_bar/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/search_bar/index.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render, fireEvent } from '@testing-library/react'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; import { SearchBarComponent } from '.'; import { TestProviders } from '../../mock'; import { FilterManager } from '@kbn/data-plugin/public'; diff --git a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx index 2c2e1c5cfcc19..3853bffbd5de6 100644 --- a/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/search_bar/index.tsx @@ -8,8 +8,9 @@ import { set } from '@elastic/safer-lodash-set/fp'; import { getOr } from 'lodash/fp'; import React, { memo, useEffect, useCallback, useMemo } from 'react'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; +import type { Dispatch } from 'redux'; import { Subscription } from 'rxjs'; import deepEqual from 'fast-deep-equal'; @@ -17,12 +18,12 @@ import type { DataViewBase, Filter, Query, TimeRange } from '@kbn/es-query'; import type { FilterManager, SavedQuery } from '@kbn/data-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; -import { OnTimeChangeProps } from '@elastic/eui'; +import type { OnTimeChangeProps } from '@elastic/eui'; import { inputsActions } from '../../store/inputs'; -import { InputsRange } from '../../store/inputs/model'; -import { InputsModelId } from '../../store/inputs/constants'; -import { State, inputsModel } from '../../store'; +import type { InputsRange } from '../../store/inputs/model'; +import type { InputsModelId } from '../../store/inputs/constants'; +import type { State, inputsModel } from '../../store'; import { formatDate } from '../super_date_picker'; import { endSelector, diff --git a/x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts b/x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts index c84b319d5609b..c80a36f56a42f 100644 --- a/x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/components/search_bar/selectors.ts @@ -8,7 +8,7 @@ import { createSelector } from 'reselect'; import type { Query } from '@kbn/es-query'; import type { SavedQuery } from '@kbn/data-plugin/public'; -import { InputsRange } from '../../store/inputs/model'; +import type { InputsRange } from '../../store/inputs/model'; export { endSelector, diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/default_headers.ts b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/default_headers.ts index 0e7bdd7d1f540..46ae9ffe8154f 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/default_headers.ts +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/default_headers.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { ColumnHeaderOptions, RowRendererId } from '../../../../common/types/timeline'; +import type { ColumnHeaderOptions } from '../../../../common/types/timeline'; +import { RowRendererId } from '../../../../common/types/timeline'; import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; -import { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; +import type { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; import { COLUMN_SESSION_START, diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.test.tsx index cad74583d7596..beacde94317cb 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.test.tsx @@ -9,9 +9,10 @@ import React, { useEffect } from 'react'; import { waitFor, render } from '@testing-library/react'; import { TestProviders } from '../../mock'; import { TEST_ID, SessionsView, defaultSessionsFilter } from '.'; -import { EntityType, TimelineId } from '@kbn/timelines-plugin/common'; -import { SessionsComponentsProps } from './types'; -import { TimelineModel } from '../../../timelines/store/timeline/model'; +import type { EntityType } from '@kbn/timelines-plugin/common'; +import { TimelineId } from '@kbn/timelines-plugin/common'; +import type { SessionsComponentsProps } from './types'; +import type { TimelineModel } from '../../../timelines/store/timeline/model'; import { useGetUserCasesPermissions } from '../../lib/kibana'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx index 6d3038e4554ed..9512fa9a6f336 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/index.tsx @@ -7,8 +7,8 @@ import React, { useMemo } from 'react'; import type { Filter } from '@kbn/es-query'; -import { SessionsComponentsProps } from './types'; -import { ESBoolQuery } from '../../../../common/typed_json'; +import type { SessionsComponentsProps } from './types'; +import type { ESBoolQuery } from '../../../../common/typed_json'; import { StatefulEventsViewer } from '../events_viewer'; import { getSessionsDefaultModel, sessionsHeaders } from './default_headers'; import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers'; diff --git a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts index 69bdcf18ffc24..06531aa5253c6 100644 --- a/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/sessions_viewer/types.ts @@ -6,8 +6,8 @@ */ import type { Filter } from '@kbn/es-query'; import type { EntityType } from '@kbn/timelines-plugin/common'; -import { QueryTabBodyProps } from '../../../hosts/pages/navigation/types'; -import { TimelineIdLiteral, ColumnHeaderOptions } from '../../../../common/types/timeline'; +import type { QueryTabBodyProps } from '../../../hosts/pages/navigation/types'; +import type { TimelineIdLiteral, ColumnHeaderOptions } from '../../../../common/types/timeline'; export interface SessionsComponentsProps extends Pick { timelineId: TimelineIdLiteral; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx index 4bfb0eccdf6b1..6ecd7f218ad14 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/severity/common/index.test.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { TestProviders } from '../../../mock'; -import { EuiHealth, EuiHealthProps } from '@elastic/eui'; +import type { EuiHealthProps } from '@elastic/eui'; +import { EuiHealth } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; import { RiskSeverity } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx b/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx index 4a95303a14924..edd1a1cc540bc 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx +++ b/x-pack/plugins/security_solution/public/common/components/severity/severity_badges.tsx @@ -7,9 +7,9 @@ import { EuiFlexGroup, EuiNotificationBadge, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; import { RiskScore, RISK_SEVERITY_COLOUR } from './common'; -import { SeverityCount } from './types'; +import type { SeverityCount } from './types'; export const SeverityBadges: React.FC<{ severityCount: SeverityCount; diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx b/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx index 69e0863ea8e0a..671461771d0af 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx +++ b/x-pack/plugins/security_solution/public/common/components/severity/severity_bar.tsx @@ -9,9 +9,9 @@ import styled from 'styled-components'; import { EuiColorPaletteDisplay } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; import { RISK_SEVERITY_COLOUR } from './common'; -import { SeverityCount } from './types'; +import type { SeverityCount } from './types'; const StyledEuiColorPaletteDisplay = styled(EuiColorPaletteDisplay)` &.risk-score-severity-bar { diff --git a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx b/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx index 7922aebe07c8f..126f3e3870ab1 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx +++ b/x-pack/plugins/security_solution/public/common/components/severity/severity_filter_group.tsx @@ -6,17 +6,17 @@ */ import React, { useCallback, useMemo, useState } from 'react'; +import type { FilterChecked } from '@elastic/eui'; import { EuiFilterButton, EuiFilterGroup, EuiFilterSelectItem, EuiPopover, - FilterChecked, useGeneratedHtmlId, } from '@elastic/eui'; -import { RiskSeverity } from '../../../../common/search_strategy'; -import { SeverityCount } from './types'; +import type { RiskSeverity } from '../../../../common/search_strategy'; +import type { SeverityCount } from './types'; import { RiskScore } from './common'; interface SeverityItems { diff --git a/x-pack/plugins/security_solution/public/common/components/severity/types.ts b/x-pack/plugins/security_solution/public/common/components/severity/types.ts index 94911ec749a57..0c161ddd81470 100644 --- a/x-pack/plugins/security_solution/public/common/components/severity/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/severity/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; export type SeverityCount = { [k in RiskSeverity]: number; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx index 32e5c1e1b165d..87874da00ced9 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/helpers.tsx @@ -6,17 +6,11 @@ */ import React from 'react'; -import { - EuiSuperSelectOption, - EuiIcon, - EuiBadge, - EuiButtonEmpty, - EuiFormRow, - EuiFormRowProps, -} from '@elastic/eui'; +import type { EuiSuperSelectOption, EuiFormRowProps } from '@elastic/eui'; +import { EuiIcon, EuiBadge, EuiButtonEmpty, EuiFormRow } from '@elastic/eui'; import styled, { css } from 'styled-components'; -import { sourcererModel } from '../../store/sourcerer'; +import type { sourcererModel } from '../../store/sourcerer'; import * as i18n from './translations'; 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 0220963110ce6..19363d0a8bc94 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 @@ -6,7 +6,8 @@ */ import React from 'react'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { cloneDeep } from 'lodash'; import { initialSourcererState, SourcererScopeName } from '../../store/sourcerer/model'; @@ -21,7 +22,7 @@ import { TestProviders, } from '../../mock'; import { createStore } from '../../store'; -import { EuiSuperSelectOption } from '@elastic/eui/src/components/form/super_select/super_select_control'; +import type { EuiSuperSelectOption } from '@elastic/eui/src/components/form/super_select/super_select_control'; import { waitFor } from '@testing-library/dom'; import { useSourcererDataView } from '../../containers/sourcerer'; import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx index 0255bb6b58065..39ff50d361c9d 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.tsx @@ -14,13 +14,16 @@ import { EuiSpacer, EuiSuperSelect, } from '@elastic/eui'; -import React, { ChangeEventHandler, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ChangeEventHandler } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; import * as i18n from './translations'; -import { sourcererActions, sourcererModel, sourcererSelectors } from '../../store/sourcerer'; +import type { sourcererModel } from '../../store/sourcerer'; +import { sourcererActions, sourcererSelectors } from '../../store/sourcerer'; import { useDeepEqualSelector } from '../../hooks/use_selector'; -import { SourcererScopeName, SourcererUrlState } from '../../store/sourcerer/model'; +import type { SourcererUrlState } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../store/sourcerer/model'; import { usePickIndexPatterns } from './use_pick_index_patterns'; import { FormRow, PopoverContent, StyledButton, StyledFormRow } from './helpers'; import { TemporarySourcerer } from './temporary'; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx index 4d10a880648f6..c5faac3f6e559 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/sub_components.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ChangeEventHandler } from 'react'; +import type { ChangeEventHandler } from 'react'; +import React from 'react'; import { EuiButton, EuiCallOut, EuiCheckbox, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { ResetButton, StyledFormRow } from './helpers'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx index 42bd71b849728..e1c1e405bd52b 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/trigger.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import React, { FC, memo, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { memo, useMemo } from 'react'; import { EuiToolTip } from '@elastic/eui'; import * as i18n from './translations'; import { getTooltipContent, StyledBadge, StyledButton } from './helpers'; -import { ModifiedTypes } from './use_pick_index_patterns'; +import type { ModifiedTypes } from './use_pick_index_patterns'; interface Props { activePatterns?: string[]; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx index 703168bc0929d..00f65211f1a01 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_pick_index_patterns.tsx @@ -6,7 +6,7 @@ */ import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react'; -import { EuiComboBoxOptionOption, EuiSuperSelectOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption, EuiSuperSelectOption } from '@elastic/eui'; import { useDispatch } from 'react-redux'; import { getSourcererDataView } from '../../containers/sourcerer/api'; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx index 84e0d03688154..f5746b2cae4d0 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/stat_items/index.test.tsx @@ -5,18 +5,18 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { ThemeProvider } from 'styled-components'; +import type { StatItemsProps, StatItems } from '.'; import { StatItemsComponent, - StatItemsProps, addValueToFields, addValueToAreaChart, addValueToBarChart, useKpiMatrixStatus, - StatItems, } from '.'; import { BarChart } from '../charts/barchart'; import { AreaChart } from '../charts/areachart'; @@ -34,9 +34,10 @@ import { mockGlobalState, SUB_PLUGINS_REDUCER, } from '../../mock'; -import { State, createStore } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { +import type { HostsKpiStrategyResponse, NetworkKpiStrategyResponse, } from '../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx b/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx index ba7bc57d854b8..429a86dd8a8a9 100644 --- a/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/stat_items/index.tsx @@ -5,7 +5,9 @@ * 2.0. */ -import { ScaleType, Rotation, BrushEndListener, ElementClickListener } from '@elastic/charts'; +import type { Rotation, BrushEndListener, ElementClickListener } from '@elastic/charts'; +import { ScaleType } from '@elastic/charts'; +import type { IconType } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, @@ -15,7 +17,6 @@ import { EuiButtonIcon, EuiLoadingSpinner, EuiTitle, - IconType, } from '@elastic/eui'; import { get, getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; @@ -23,22 +24,27 @@ import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; import { useQueryToggle } from '../../containers/query_toggle'; -import { +import type { HostsKpiStrategyResponse, NetworkKpiStrategyResponse, } from '../../../../common/search_strategy'; import { AreaChart } from '../charts/areachart'; import { BarChart } from '../charts/barchart'; -import { ChartSeriesData, ChartData, ChartSeriesConfigs, UpdateDateRange } from '../charts/common'; +import type { + ChartSeriesData, + ChartData, + ChartSeriesConfigs, + UpdateDateRange, +} from '../charts/common'; import { histogramDateTimeFormatter } from '../utils'; import { getEmptyTagValue } from '../empty_value'; import { InspectButton } from '../inspect'; import { VisualizationActions, HISTOGRAM_ACTIONS_BUTTON_CLASS } from '../visualization_actions'; import { HoverVisibilityContainer } from '../hover_visibility_container'; -import { LensAttributes } from '../visualization_actions/types'; +import type { LensAttributes } from '../visualization_actions/types'; import * as i18n from '../../containers/query_toggle/translations'; -import { UserskKpiStrategyResponse } from '../../../../common/search_strategy/security_solution/users'; +import type { UserskKpiStrategyResponse } from '../../../../common/search_strategy/security_solution/users'; const FlexGroup = styled(EuiFlexGroup)` .no-margin { margin-top: 0 !important; diff --git a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx index 743370fa0ad33..ad0410e62e00d 100644 --- a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.test.tsx @@ -18,7 +18,8 @@ import { createSecuritySolutionStorageMock, } from '../../mock'; import { createUseUiSetting$Mock } from '../../lib/kibana/kibana_react.mock'; -import { createStore, State } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; import { SuperDatePicker, makeMapStateToProps } from '.'; import { cloneDeep } from 'lodash/fp'; diff --git a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx index 879a735b33004..d37ddd8cdb918 100644 --- a/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/super_date_picker/index.tsx @@ -6,25 +6,26 @@ */ import dateMath from '@kbn/datemath'; -import { - EuiSuperDatePicker, +import type { OnRefreshChangeProps, EuiSuperDatePickerRecentRange, OnRefreshProps, OnTimeChangeProps, } from '@elastic/eui'; +import { EuiSuperDatePicker } from '@elastic/eui'; import { getOr, take, isEmpty } from 'lodash/fp'; import React, { useState, useCallback } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; +import type { Dispatch } from 'redux'; import deepEqual from 'fast-deep-equal'; import { DEFAULT_TIMEPICKER_QUICK_RANGES } from '../../../../common/constants'; import { timelineActions } from '../../../timelines/store/timeline'; import { useUiSetting$ } from '../../lib/kibana'; -import { inputsModel, State } from '../../store'; +import type { inputsModel, State } from '../../store'; import { inputsActions } from '../../store/actions'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { InputsModelId } from '../../store/inputs/constants'; import { policySelector, durationSelector, @@ -37,7 +38,7 @@ import { queriesSelector, kqlQuerySelector, } from './selectors'; -import { InputsRange } from '../../store/inputs/model'; +import type { InputsRange } from '../../store/inputs/model'; const MAX_RECENTLY_USED_RANGES = 9; diff --git a/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts index 78986942c83b8..c215adf5d2a62 100644 --- a/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.test.ts @@ -16,10 +16,10 @@ import { isLoadingSelector, queriesSelector, } from './selectors'; -import { InputsRange, AbsoluteTimeRange, RelativeTimeRange } from '../../store/inputs/model'; +import type { InputsRange, AbsoluteTimeRange, RelativeTimeRange } from '../../store/inputs/model'; import { cloneDeep } from 'lodash/fp'; import { mockGlobalState } from '../../mock'; -import { State } from '../../store'; +import type { State } from '../../store'; describe('selectors', () => { let absoluteTime: AbsoluteTimeRange = { diff --git a/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts index 1d85fff85e5d0..22fb1f9f3d023 100644 --- a/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/components/super_date_picker/selectors.ts @@ -7,9 +7,9 @@ import { isEmpty } from 'lodash'; import { createSelector } from 'reselect'; -import { State } from '../../store'; -import { InputsModelId } from '../../store/inputs/constants'; -import { Policy, InputsRange, TimeRange, GlobalQuery } from '../../store/inputs/model'; +import type { State } from '../../store'; +import type { InputsModelId } from '../../store/inputs/constants'; +import type { Policy, InputsRange, TimeRange, GlobalQuery } from '../../store/inputs/model'; export const getPolicy = (inputState: InputsRange): Policy => inputState.policy; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.test.tsx index 0e8edbf047528..106c274fc2442 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.test.tsx @@ -7,7 +7,7 @@ import { mount } from 'enzyme'; import React from 'react'; -import { ThreatMappingEntries } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMappingEntries } from '@kbn/securitysolution-io-ts-alerting-types'; import { EntryDeleteButtonComponent } from './entry_delete_button'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.tsx index af8306de53124..3a8b5f645de47 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_delete_button.tsx @@ -9,7 +9,7 @@ import React, { useCallback } from 'react'; import { EuiButtonIcon, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; -import { Entry } from './types'; +import type { Entry } from './types'; const MyFirstRowContainer = styled(EuiFlexItem)` padding-top: 20px; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.test.tsx index 658f430f219fb..25841b85005d4 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.test.tsx @@ -7,7 +7,8 @@ import { mount } from 'enzyme'; import React from 'react'; -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox } from '@elastic/eui'; import { EntryItem } from './entry_item'; import { fields, getField } from '@kbn/data-plugin/common/mocks'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx index 3087a92aba72c..f1f86c77202cb 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/entry_item.tsx @@ -11,7 +11,7 @@ import styled from 'styled-components'; import { FieldComponent } from '@kbn/securitysolution-autocomplete'; import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; -import { FormattedEntry, Entry } from './types'; +import type { FormattedEntry, Entry } from './types'; import * as i18n from './translations'; import { getEntryOnFieldChange, getEntryOnThreatFieldChange } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.test.tsx index 3767f2bac18af..b1925136e0f99 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.test.tsx @@ -6,7 +6,7 @@ */ import { fields, getField } from '@kbn/data-plugin/common/mocks'; -import { Entry, EmptyEntry, ThreatMapEntries, FormattedEntry } from './types'; +import type { Entry, EmptyEntry, ThreatMapEntries, FormattedEntry } from './types'; import type { FieldSpec } from '@kbn/data-plugin/common'; import type { DataViewBase } from '@kbn/es-query'; import moment from 'moment-timezone'; @@ -19,7 +19,7 @@ import { getUpdatedEntriesOnDelete, customValidators, } from './helpers'; -import { ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('123'), diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx index db6c7a4261c5e..25e4d98761888 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/helpers.tsx @@ -8,12 +8,13 @@ import uuid from 'uuid'; import { i18n } from '@kbn/i18n'; import { addIdToItem } from '@kbn/securitysolution-utils'; -import { ThreatMap, threatMap, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMap, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import { threatMap } from '@kbn/securitysolution-io-ts-alerting-types'; import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; -import { ValidationFunc } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; -import { ERROR_CODE } from '@kbn/es-ui-shared-plugin/static/forms/helpers/field_validators/types'; -import { Entry, FormattedEntry, ThreatMapEntries, EmptyEntry } from './types'; +import type { ValidationFunc } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import type { ERROR_CODE } from '@kbn/es-ui-shared-plugin/static/forms/helpers/field_validators/types'; +import type { Entry, FormattedEntry, ThreatMapEntries, EmptyEntry } from './types'; /** * Formats the entry into one that is easily usable for the UI. diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx index 6b186d3d11dfa..e8acf6b6374c0 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/index.test.tsx @@ -15,7 +15,7 @@ import { fields } from '@kbn/data-plugin/common/mocks'; import { useKibana } from '../../lib/kibana'; import { ThreatMatchComponent } from '.'; -import { ThreatMapEntries } from './types'; +import type { ThreatMapEntries } from './types'; import type { DataViewBase } from '@kbn/es-query'; import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/index.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/index.tsx index 1f3268b84bdba..425977aa175c6 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/index.tsx @@ -9,12 +9,13 @@ import React, { useCallback, useEffect, useReducer } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import type { DataViewBase } from '@kbn/es-query'; -import { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; import { ListItemComponent } from './list_item'; import { AndOrBadge } from '../and_or_badge'; import { LogicButtons } from './logic_buttons'; -import { ThreatMapEntries } from './types'; -import { State, reducer } from './reducer'; +import type { ThreatMapEntries } from './types'; +import type { State } from './reducer'; +import { reducer } from './reducer'; import { getDefaultEmptyEntry, getNewItem, filterItems } from './helpers'; const MyInvisibleAndBadge = styled(EuiFlexItem)` diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx index 571207918c44c..f65a297b5ab7d 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.test.tsx @@ -13,7 +13,7 @@ import { useKibana } from '../../lib/kibana'; import { fields } from '@kbn/data-plugin/common/mocks'; import { ListItemComponent } from './list_item'; -import { ThreatMapEntries } from './types'; +import type { ThreatMapEntries } from './types'; import type { DataViewBase } from '@kbn/es-query'; import { getMockTheme } from '../../lib/kibana/kibana_react.mock'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx index 47d367e6c04ad..44947c4897601 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/list_item.tsx @@ -11,7 +11,7 @@ import styled from 'styled-components'; import type { DataViewBase } from '@kbn/es-query'; import { getFormattedEntries, getUpdatedEntriesOnDelete } from './helpers'; -import { FormattedEntry, ThreatMapEntries, Entry } from './types'; +import type { FormattedEntry, ThreatMapEntries, Entry } from './types'; import { EntryItem } from './entry_item'; import { EntryDeleteButtonComponent } from './entry_delete_button'; import { AndBadgeComponent } from './and_badge'; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.test.ts b/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.test.ts index 7c19b61efff02..3cd980bd9ae95 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { ThreatMapEntries } from './types'; -import { State, reducer } from './reducer'; +import type { ThreatMapEntries } from './types'; +import type { State } from './reducer'; +import { reducer } from './reducer'; import { getDefaultEmptyEntry } from './helpers'; -import { ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('123'), diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.ts b/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.ts index 37637b2fb2baa..42a4d8fd63fa6 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/reducer.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ThreatMapEntries } from './types'; +import type { ThreatMapEntries } from './types'; import { getDefaultEmptyEntry } from './helpers'; export type ViewerModalName = 'addModal' | 'editModal' | null; diff --git a/x-pack/plugins/security_solution/public/common/components/threat_match/types.ts b/x-pack/plugins/security_solution/public/common/components/threat_match/types.ts index 852e68aa259c8..3c46d96c19778 100644 --- a/x-pack/plugins/security_solution/public/common/components/threat_match/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/threat_match/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { DataViewFieldBase } from '@kbn/es-query'; -import { ThreatMap, ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { DataViewFieldBase } from '@kbn/es-query'; +import type { ThreatMap, ThreatMapEntry } from '@kbn/securitysolution-io-ts-alerting-types'; export interface FormattedEntry { id: string; diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx index e52139b0f5eff..bb42e99d50518 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/toasters/index.test.tsx @@ -10,13 +10,8 @@ import { cloneDeep } from 'lodash/fp'; import { mount } from 'enzyme'; import React, { useEffect } from 'react'; -import { - AppToast, - useStateToaster, - ManageGlobalToaster, - GlobalToaster, - displayErrorToast, -} from '.'; +import type { AppToast } from '.'; +import { useStateToaster, ManageGlobalToaster, GlobalToaster, displayErrorToast } from '.'; jest.mock('uuid', () => { return { diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/index.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/index.tsx index ff3d575df5686..cc02c6a5eb745 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/toasters/index.tsx @@ -5,9 +5,11 @@ * 2.0. */ -import { EuiButton, EuiGlobalToastList, EuiGlobalToastListToast as Toast } from '@elastic/eui'; +import type { EuiGlobalToastListToast as Toast } from '@elastic/eui'; +import { EuiButton, EuiGlobalToastList } from '@elastic/eui'; import { noop } from 'lodash/fp'; -import React, { createContext, Dispatch, useContext, useReducer, useState } from 'react'; +import type { Dispatch } from 'react'; +import React, { createContext, useContext, useReducer, useState } from 'react'; import styled from 'styled-components'; import { ModalAllErrors } from './modal_all_errors'; diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx index e68f3ee0a9bbf..9e4963814c988 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.test.tsx @@ -10,7 +10,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import { ModalAllErrors } from './modal_all_errors'; -import { AppToast } from '.'; +import type { AppToast } from '.'; import { cloneDeep } from 'lodash/fp'; const mockToast: AppToast = { diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx index 29058a87a96b5..936f3a4f84535 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx +++ b/x-pack/plugins/security_solution/public/common/components/toasters/modal_all_errors.tsx @@ -20,7 +20,7 @@ import { import React, { useCallback } from 'react'; import styled from 'styled-components'; -import { AppToast } from '.'; +import type { AppToast } from '.'; import * as i18n from './translations'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts b/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts index aa548c5cc5836..6063db96de8ed 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts @@ -10,7 +10,7 @@ import uuid from 'uuid'; import { isError } from 'lodash/fp'; import { isAppError } from '@kbn/securitysolution-t-grid'; -import { AppToast, ActionToaster } from '.'; +import type { AppToast, ActionToaster } from '.'; import { isToasterError } from './errors'; /** diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts index 78a380bafe82c..77afe34c4a55f 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/top_n/helpers.ts @@ -53,7 +53,8 @@ import { ALERT_WORKFLOW_USER, } from '@kbn/rule-data-utils'; -import { TimelineEventsType, TimelineId } from '../../../../common/types/timeline'; +import type { TimelineEventsType } from '../../../../common/types/timeline'; +import { TimelineId } from '../../../../common/types/timeline'; import { SourcererScopeName } from '../../store/sourcerer/model'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx index ee84a49dc8230..c68fe932fdd62 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/index.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { waitFor } from '@testing-library/react'; import '../../mock/match_media'; @@ -18,9 +19,10 @@ import { createSecuritySolutionStorageMock, mockIndexPattern, } from '../../mock'; -import { createStore, State } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; -import { Props } from './top_n'; +import type { Props } from './top_n'; import { StatefulTopN } from '.'; import { TimelineId } from '../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx index 9277d3b296874..a7cfb7e2f3b7b 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/index.tsx @@ -6,23 +6,25 @@ */ import React, { useMemo } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { useGlobalTime } from '../../containers/use_global_time'; -import { BrowserFields } from '../../containers/source'; +import type { BrowserFields } from '../../containers/source'; import { useKibana } from '../../lib/kibana'; -import { inputsModel, inputsSelectors, State } from '../../store'; +import type { inputsModel, State } from '../../store'; +import { inputsSelectors } from '../../store'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; import { timelineSelectors } from '../../../timelines/store/timeline'; -import { TimelineModel } from '../../../timelines/store/timeline/model'; +import type { TimelineModel } from '../../../timelines/store/timeline/model'; import { combineQueries } from '../../../timelines/components/timeline/helpers'; import { getOptions } from './helpers'; import { TopN } from './top_n'; import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; -import { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; +import type { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; const EMPTY_FILTERS: Filter[] = []; const EMPTY_QUERY: Query = { query: '', language: 'kuery' }; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/selectors.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/selectors.tsx index de3472b7c455f..4bbcd689d47cd 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/selectors.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/selectors.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { State } from '../../store'; +import type { State } from '../../store'; import { sourcererSelectors } from '../../store/selectors'; -import { SourcererScopeName } from '../../store/sourcerer/model'; +import type { SourcererScopeName } from '../../store/sourcerer/model'; export interface IndicesSelector { all: string[]; diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx index 0a4ec835fb249..82247f1c97025 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { waitFor } from '@testing-library/react'; @@ -14,7 +15,8 @@ import '../../mock/match_media'; import { TestProviders, mockIndexPattern } from '../../mock'; import { allEvents, defaultOptions } from './helpers'; -import { TopN, Props as TopNProps } from './top_n'; +import type { Props as TopNProps } from './top_n'; +import { TopN } from './top_n'; jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); diff --git a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx index c0361ca140071..9adcba8d2fd4f 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_n/top_n.tsx @@ -10,20 +10,20 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; -import { GlobalTimeArgs } from '../../containers/use_global_time'; +import type { GlobalTimeArgs } from '../../containers/use_global_time'; import { EventsByDataset } from '../../../overview/components/events_by_dataset'; import { SignalsByCategory } from '../../../overview/components/signals_by_category'; -import { InputsModelId } from '../../store/inputs/constants'; -import { TimelineEventsType } from '../../../../common/types/timeline'; +import type { InputsModelId } from '../../store/inputs/constants'; +import type { TimelineEventsType } from '../../../../common/types/timeline'; import { useSourcererDataView } from '../../containers/sourcerer'; +import type { TopNOption } from './helpers'; import { isDetectionsAlertsTable, getSourcererScopeName, removeIgnoredAlertFilters, - TopNOption, } from './helpers'; import * as i18n from './translations'; -import { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; +import type { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; const TopNContainer = styled.div` min-width: 600px; diff --git a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx index 4cc6812772b81..95712ee698a0d 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.test.tsx @@ -9,7 +9,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { TopRiskScoreContributors } from '.'; import { TestProviders } from '../../mock'; -import { RuleRisk } from '../../../../common/search_strategy'; +import type { RuleRisk } from '../../../../common/search_strategy'; jest.mock('../../containers/query_toggle'); jest.mock('../../../risk_score/containers'); diff --git a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx b/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx index f09de83521e93..7f59912829438 100644 --- a/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/top_risk_score_contributors/index.tsx @@ -7,19 +7,14 @@ import React, { useMemo } from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiPanel, - EuiInMemoryTable, - EuiTableFieldDataColumnType, -} from '@elastic/eui'; +import type { EuiTableFieldDataColumnType } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiInMemoryTable } from '@elastic/eui'; import { HeaderSection } from '../header_section'; import { InspectButton, InspectButtonContainer } from '../inspect'; import * as i18n from './translations'; -import { RuleRisk } from '../../../../common/search_strategy'; +import type { RuleRisk } from '../../../../common/search_strategy'; import { RuleLink } from '../../../detections/pages/detection_engine/rules/all/use_columns'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts index f8df77e8ff624..f9570b40e6fa5 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.test.ts @@ -8,7 +8,7 @@ import { navTabs } from '../../../app/home/home_navigations'; import { getTitle, isQueryStateEmpty } from './helpers'; import { CONSTANTS } from './constants'; -import { ValueUrlState } from './types'; +import type { ValueUrlState } from './types'; describe('Helpers Url_State', () => { describe('getTitle', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts index 681045be404e0..7fff6b4ded708 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/helpers.ts @@ -8,7 +8,7 @@ import { isEmpty } from 'lodash/fp'; import { parse, stringify } from 'query-string'; import { decode, encode } from 'rison-node'; -import * as H from 'history'; +import type * as H from 'history'; import type { Filter, Query } from '@kbn/es-query'; @@ -16,14 +16,16 @@ import { url } from '@kbn/kibana-utils-plugin/public'; import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; import { SecurityPageName } from '../../../app/types'; -import { inputsSelectors, State } from '../../store'; -import { UrlInputsModel } from '../../store/inputs/model'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { State } from '../../store'; +import { inputsSelectors } from '../../store'; +import type { UrlInputsModel } from '../../store/inputs/model'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; import { timelineSelectors } from '../../../timelines/store/timeline'; import { formatDate } from '../super_date_picker'; -import { NavTab } from '../navigation/types'; -import { CONSTANTS, UrlStateType } from './constants'; -import { ReplaceStateInLocation, KeyUrlState, ValueUrlState } from './types'; +import type { NavTab } from '../navigation/types'; +import type { UrlStateType } from './constants'; +import { CONSTANTS } from './constants'; +import type { ReplaceStateInLocation, KeyUrlState, ValueUrlState } from './types'; export const isDetectionsPages = (pageName: string) => pageName === SecurityPageName.alerts || diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx index 50072d96fe96f..78447e34feafa 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/url_state/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { HookWrapper } from '../../mock'; import { SecurityPageName } from '../../../app/types'; -import { RouteSpyState } from '../../utils/route/types'; +import type { RouteSpyState } from '../../utils/route/types'; import { CONSTANTS } from './constants'; import { getMockPropsObj, @@ -21,7 +21,7 @@ import { testCases, getMockProps, } from './test_dependencies'; -import { UrlStateContainerPropTypes } from './types'; +import type { UrlStateContainerPropTypes } from './types'; import { useUrlStateHooks } from './use_url_state'; import { waitFor } from '@testing-library/react'; import { useLocation } from 'react-router-dom'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/index.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index.tsx index 2e04bbc5f1daf..af98433ed157a 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/url_state/index.tsx @@ -12,7 +12,7 @@ import deepEqual from 'fast-deep-equal'; import { useRouteSpy } from '../../utils/route/use_route_spy'; -import { UrlStateContainerPropTypes, UrlStateProps, UrlStateStateToPropsType } from './types'; +import type { UrlStateContainerPropTypes, UrlStateProps, UrlStateStateToPropsType } from './types'; import { useUrlStateHooks } from './use_url_state'; import { makeMapStateToProps } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx index 1162a449acdc6..514b41fb4b3d7 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/url_state/index_mocked.test.tsx @@ -13,7 +13,7 @@ import { SecurityPageName } from '../../../app/types'; import { CONSTANTS } from './constants'; import { getFilterQuery, getMockPropsObj, mockHistory, testCases } from './test_dependencies'; -import { UrlStateContainerPropTypes } from './types'; +import type { UrlStateContainerPropTypes } from './types'; import { useUrlStateHooks } from './use_url_state'; import { useLocation } from 'react-router-dom'; import { DASHBOARDS_PATH, MANAGEMENT_PATH } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx index a417ad7c5950f..04752dfb3f92e 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx +++ b/x-pack/plugins/security_solution/public/common/components/url_state/initialize_redux_by_url.tsx @@ -6,24 +6,24 @@ */ import { get, isEmpty } from 'lodash/fp'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import type { Filter, Query } from '@kbn/es-query'; import { inputsActions } from '../../store/actions'; -import { InputsModelId, TimeRangeKinds } from '../../store/inputs/constants'; -import { +import type { InputsModelId, TimeRangeKinds } from '../../store/inputs/constants'; +import type { UrlInputsModel, LinkTo, AbsoluteTimeRange, RelativeTimeRange, } from '../../store/inputs/model'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; import { CONSTANTS } from './constants'; import { decodeRisonUrlState } from './helpers'; import { normalizeTimeRange } from './normalize_time_range'; -import { SetInitialStateFromUrl } from './types'; +import type { SetInitialStateFromUrl } from './types'; import { queryTimelineById, dispatchUpdateTimeline, diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts index c5c18a10922a1..7154c69c425e4 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.test.ts @@ -6,13 +6,8 @@ */ import { normalizeTimeRange } from './normalize_time_range'; -import { - URLTimeRange, - AbsoluteTimeRange, - isAbsoluteTimeRange, - RelativeTimeRange, - isRelativeTimeRange, -} from '../../store/inputs/model'; +import type { URLTimeRange, AbsoluteTimeRange, RelativeTimeRange } from '../../store/inputs/model'; +import { isAbsoluteTimeRange, isRelativeTimeRange } from '../../store/inputs/model'; import DateMath from '@kbn/datemath'; import { getTimeRangeSettings } from '../../utils/default_date_settings'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts index 09df0e4376ac5..17f49a8622c37 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/normalize_time_range.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { URLTimeRange } from '../../store/inputs/model'; +import type { URLTimeRange } from '../../store/inputs/model'; import { getTimeRangeSettings } from '../../utils/default_date_settings'; import { getMaybeDate } from '../formatted_date/maybe_date'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/query_timeline_by_id_on_url_change.ts b/x-pack/plugins/security_solution/public/common/components/url_state/query_timeline_by_id_on_url_change.ts index 2778cefdc7953..13a2678a2f570 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/query_timeline_by_id_on_url_change.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/query_timeline_by_id_on_url_change.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Action } from 'typescript-fsa'; -import { DispatchUpdateTimeline } from '../../../timelines/components/open_timeline/types'; +import type { Action } from 'typescript-fsa'; +import type { DispatchUpdateTimeline } from '../../../timelines/components/open_timeline/types'; import { queryTimelineById } from '../../../timelines/components/open_timeline/helpers'; import { TimelineTabs } from '../../../../common/types/timeline'; import { @@ -14,7 +14,7 @@ import { getQueryStringFromLocation, getParamFromQueryString, } from './helpers'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; import { CONSTANTS } from './constants'; const getQueryStringKeyValue = ({ search, urlKey }: { search: string; urlKey: string }) => diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts b/x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts index 6b8c3e3fe252b..8f88730a5376e 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/test_dependencies.ts @@ -11,7 +11,7 @@ import { SecurityPageName } from '../../../app/types'; import { inputsActions } from '../../store/actions'; import { CONSTANTS } from './constants'; -import { UrlStateContainerPropTypes, LocationTypes } from './types'; +import type { UrlStateContainerPropTypes, LocationTypes } from './types'; import { networkModel } from '../../../network/store'; import { hostsModel } from '../../../hosts/store'; import { HostsTableType } from '../../../hosts/store/model'; diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/types.ts b/x-pack/plugins/security_solution/public/common/components/url_state/types.ts index caf2ad77a7245..bc6479bfe6f1f 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/url_state/types.ts @@ -7,12 +7,13 @@ import type { DataViewBase, Filter, Query } from '@kbn/es-query'; import type { FilterManager, SavedQueryService } from '@kbn/data-plugin/public'; -import { UrlInputsModel } from '../../store/inputs/model'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; -import { RouteSpyState } from '../../utils/route/types'; -import { SecurityNav } from '../navigation/types'; +import type { UrlInputsModel } from '../../store/inputs/model'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { RouteSpyState } from '../../utils/route/types'; +import type { SecurityNav } from '../navigation/types'; -import { CONSTANTS, UrlStateType } from './constants'; +import type { UrlStateType } from './constants'; +import { CONSTANTS } from './constants'; export const ALL_URL_STATE_KEYS: KeyUrlState[] = [ CONSTANTS.appQuery, diff --git a/x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx b/x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx index 7a5706aec578f..2cb24c4430427 100644 --- a/x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx +++ b/x-pack/plugins/security_solution/public/common/components/url_state/use_url_state.tsx @@ -13,7 +13,8 @@ import { useLocation } from 'react-router-dom'; import { useSetInitialStateFromUrl } from './initialize_redux_by_url'; import { useKibana } from '../../lib/kibana'; -import { CONSTANTS, UrlStateType } from './constants'; +import type { UrlStateType } from './constants'; +import { CONSTANTS } from './constants'; import { getQueryStringFromLocation, getParamFromQueryString, @@ -26,19 +27,18 @@ import { isQueryStateEmpty, updateTimerangeUrl, } from './helpers'; -import { +import type { UrlStateContainerPropTypes, ReplaceStateInLocation, PreviousLocationUrlState, KeyUrlState, - ALL_URL_STATE_KEYS, UrlStateToRedux, UrlState, - isAdministration, ValueUrlState, } from './types'; -import { TimelineUrl } from '../../../timelines/store/timeline/model'; -import { UrlInputsModel } from '../../store/inputs/model'; +import { ALL_URL_STATE_KEYS, isAdministration } from './types'; +import type { TimelineUrl } from '../../../timelines/store/timeline/model'; +import type { UrlInputsModel } from '../../store/inputs/model'; import { queryTimelineByIdOnUrlChange } from './query_timeline_by_id_on_url_change'; import { getLinkInfo } from '../../links'; import { useIsGroupedNavigationEnabled } from '../navigation/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/index.ts index 9170d2c3f0aa4..a5238afacf13d 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/__mocks__/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { initialUserPrivilegesState, UserPrivilegesState } from '../user_privileges_context'; +import type { UserPrivilegesState } from '../user_privileges_context'; +import { initialUserPrivilegesState } from '../user_privileges_context'; import { getEndpointPrivilegesInitialStateMock } from '../endpoint/mocks'; export const getUserPrivilegesMockDefaultValue = () => { diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/mocks.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/mocks.ts index 2348fdf017c86..08fa5bbfbefe8 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EndpointPrivileges } from '../../../../../common/endpoint/types'; +import type { EndpointPrivileges } from '../../../../../common/endpoint/types'; import { getEndpointAuthzInitialStateMock } from '../../../../../common/endpoint/service/authz/mocks'; export const getEndpointPrivilegesInitialStateMock = ({ diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/security_solution_start_dependencies.tsx b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/security_solution_start_dependencies.tsx index 26298b0e13c58..7e0b28242ee3e 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/security_solution_start_dependencies.tsx +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/security_solution_start_dependencies.tsx @@ -6,7 +6,7 @@ */ import React, { useContext } from 'react'; -import { StartPlugins } from '../../../../types'; +import type { StartPlugins } from '../../../../types'; /** * For use with the Fleet UI extensions, where `useKibana().services.**` does not return the services diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts index 75f3175744429..1e45c7d3e9908 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.test.ts @@ -5,14 +5,15 @@ * 2.0. */ -import { act, renderHook, RenderHookResult, RenderResult } from '@testing-library/react-hooks'; +import type { RenderHookResult, RenderResult } from '@testing-library/react-hooks'; +import { act, renderHook } from '@testing-library/react-hooks'; import { useCurrentUser, useKibana } from '../../../lib/kibana'; import { useEndpointPrivileges } from './use_endpoint_privileges'; import { securityMock } from '@kbn/security-plugin/public/mocks'; -import { AuthenticatedUser } from '@kbn/security-plugin/common'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common'; import { licenseService } from '../../../hooks/use_license'; import { getEndpointPrivilegesInitialStateMock } from './mocks'; -import { EndpointPrivileges } from '../../../../../common/endpoint/types'; +import type { EndpointPrivileges } from '../../../../../common/endpoint/types'; import { getEndpointPrivilegesInitialState } from './utils'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts index 25cfdb11e732b..d0a1057d9f00e 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts @@ -6,10 +6,10 @@ */ import { useEffect, useMemo, useRef, useState } from 'react'; -import { FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { FleetAuthz } from '@kbn/fleet-plugin/common'; import { useCurrentUser, useKibana } from '../../../lib/kibana'; import { useLicense } from '../../../hooks/use_license'; -import { +import type { EndpointPrivileges, Immutable, MaybeImmutable, diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/utils.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/utils.ts index 0c314ba5573c8..f929601a6d508 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EndpointPrivileges } from '../../../../../common/endpoint/types'; +import type { EndpointPrivileges } from '../../../../../common/endpoint/types'; import { getEndpointAuthzInitialState } from '../../../../../common/endpoint/service/authz'; export const getEndpointPrivilegesInitialState = (): EndpointPrivileges => { diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/index.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/index.ts index 3a5d942d3b532..d5efccceefb72 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/index.ts +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/index.ts @@ -6,8 +6,9 @@ */ import { useContext } from 'react'; -import { DeepReadonly } from 'utility-types'; -import { UserPrivilegesContext, UserPrivilegesState } from './user_privileges_context'; +import type { DeepReadonly } from 'utility-types'; +import type { UserPrivilegesState } from './user_privileges_context'; +import { UserPrivilegesContext } from './user_privileges_context'; export const useUserPrivileges = (): DeepReadonly => useContext(UserPrivilegesContext); diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/user_privileges_context.tsx b/x-pack/plugins/security_solution/public/common/components/user_privileges/user_privileges_context.tsx index 5a3ec5affe4c7..b17a043170e80 100644 --- a/x-pack/plugins/security_solution/public/common/components/user_privileges/user_privileges_context.tsx +++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/user_privileges_context.tsx @@ -6,12 +6,12 @@ */ import React, { createContext, useEffect, useState } from 'react'; -import { Capabilities } from '@kbn/core/types'; +import type { Capabilities } from '@kbn/core/types'; import { SERVER_APP_ID } from '../../../../common/constants'; import { useFetchListPrivileges } from '../../../detections/components/user_privileges/use_fetch_list_privileges'; import { useFetchDetectionEnginePrivileges } from '../../../detections/components/user_privileges/use_fetch_detection_engine_privileges'; import { getEndpointPrivilegesInitialState, useEndpointPrivileges } from './endpoint'; -import { EndpointPrivileges } from '../../../../common/endpoint/types'; +import type { EndpointPrivileges } from '../../../../common/endpoint/types'; export interface UserPrivilegesState { listPrivileges: ReturnType; diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx index ff47459d437be..baefbcdf6b3b6 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar.tsx @@ -7,7 +7,8 @@ import React from 'react'; -import { Bar, BarProps } from './styles'; +import type { BarProps } from './styles'; +import { Bar } from './styles'; interface UtilityBarProps extends BarProps { children: React.ReactNode; diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx index 60d895e417ce7..138456a670c11 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_action.tsx @@ -5,11 +5,13 @@ * 2.0. */ -import { EuiPopover, PanelPaddingSize, EuiButtonEmpty } from '@elastic/eui'; +import type { PanelPaddingSize } from '@elastic/eui'; +import { EuiPopover, EuiButtonEmpty } from '@elastic/eui'; import React, { useCallback, useState } from 'react'; import styled, { css } from 'styled-components'; -import { LinkIcon, LinkIconProps } from '../link_icon'; +import type { LinkIconProps } from '../link_icon'; +import { LinkIcon } from '../link_icon'; import { BarAction } from './styles'; const LoadingButtonEmpty = styled(EuiButtonEmpty)` diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx index ef83d6effc8a3..dcc78efb4281e 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_group.tsx @@ -7,7 +7,8 @@ import React from 'react'; -import { BarGroup, BarGroupProps } from './styles'; +import type { BarGroupProps } from './styles'; +import { BarGroup } from './styles'; export interface UtilityBarGroupProps extends BarGroupProps { children: React.ReactNode; diff --git a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx index dc966516c8373..f0ad80a7ac2ec 100644 --- a/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx +++ b/x-pack/plugins/security_solution/public/common/components/utility_bar/utility_bar_section.tsx @@ -7,7 +7,8 @@ import React from 'react'; -import { BarSection, BarSectionProps } from './styles'; +import type { BarSectionProps } from './styles'; +import { BarSection } from './styles'; export interface UtilityBarSectionProps extends BarSectionProps { children: React.ReactNode; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx index 162f321b33f6c..7a42615a0d771 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.test.tsx @@ -15,8 +15,10 @@ import { SUB_PLUGINS_REDUCER, TestProviders, } from '../../mock'; -import { createStore, State } from '../../store'; -import { UpdateQueryParams, upsertQuery } from '../../store/inputs/helpers'; +import type { State } from '../../store'; +import { createStore } from '../../store'; +import type { UpdateQueryParams } from '../../store/inputs/helpers'; +import { upsertQuery } from '../../store/inputs/helpers'; import { cloneDeep } from 'lodash'; import { useKibana } from '../../lib/kibana/kibana_react'; import { CASES_FEATURE_ID } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.tsx index ebb46a6484d0f..3d31543a78de1 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/index.tsx @@ -15,7 +15,7 @@ import { useInspect } from '../inspect/use_inspect'; import { useLensAttributes } from './use_lens_attributes'; import { useAddToExistingCase } from './use_add_to_existing_case'; import { useAddToNewCase } from './use_add_to_new_case'; -import { VisualizationActionsProps } from './types'; +import type { VisualizationActionsProps } from './types'; import { ADD_TO_EXISTING_CASE, ADD_TO_NEW_CASE, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts index 3610dcb4c94ae..199f78d372cd8 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/authentication.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const authenticationLensAttributes: LensAttributes = { title: 'Authentication', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts index 551ce37be924e..e24db03b3302f 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/external_alert.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GetLensAttributes, LensAttributes } from '../../types'; +import type { GetLensAttributes, LensAttributes } from '../../types'; export const getExternalAlertLensAttributes: GetLensAttributes = ( stackByField = 'event.module' diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts index 0e5284f84bf1f..da244d40565fb 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/events.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GetLensAttributes, LensAttributes } from '../../types'; +import type { GetLensAttributes, LensAttributes } from '../../types'; export const getEventsHistogramLensAttributes: GetLensAttributes = ( stackByField = 'event.action' diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts index 369bbf3da2ab1..f4486b77390b2 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_area.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiHostAreaLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts index 9ce303b70df0a..c5fcae45df0f0 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiHostMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts index 577a20cfdc245..ac0d102a5f03c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area.ts @@ -6,7 +6,7 @@ */ import { DESTINATION_CHART_LABEL, SOURCE_CHART_LABEL } from '../../translations'; -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniqueIpsAreaLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts index b55f71abb7544..b55fcb64ba49c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; import { SOURCE_CHART_LABEL, DESTINATION_CHART_LABEL } from '../../translations'; export const kpiUniqueIpsBarLensAttributes: LensAttributes = { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts index c70efd904cfb3..ae18c08be800c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniqueIpsDestinationMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts index a1325e0d94e0c..8a0b778975ab9 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniqueIpsSourceMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts index 579d6f0b3ab7e..07a3badc3b96e 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/dns_top_domains.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; /* Exported from Kibana Saved Object */ export const dnsTopDomainsLensAttributes: LensAttributes = { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts index 515ed379d8e4d..1d6cddb7f1b61 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_dns_queries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiDnsQueriesLensAttributes: LensAttributes = { title: '[Network] DNS metric', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts index a51b8ee0ac66d..013ad35b31ecc 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_network_events.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiNetworkEventsLensAttributes: LensAttributes = { title: '[Network] Network events', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts index 2e250f6fe3e5b..343c61dbd2be1 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiTlsHandshakesLensAttributes: LensAttributes = { title: '[Network] TLS handshakes', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts index cb75ddef54bae..3646e3c0a70bd 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniqueFlowIdsLensAttributes: LensAttributes = { title: '[Network] Unique flow IDs', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts index 89104df5d72be..2d3792e399372 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniquePrivateIpsAreaLensAttributes: LensAttributes = { title: '[Network] Unique private IPs - area chart', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts index 4bbc1e1510dbe..bf4ad0e704081 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar.ts @@ -6,7 +6,7 @@ */ import { SOURCE_CHART_LABEL, DESTINATION_CHART_LABEL } from '../../translations'; -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniquePrivateIpsBarLensAttributes: LensAttributes = { title: '[Network] Unique private IPs - bar chart', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts index 20c509d376396..a2bccef3b624b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniquePrivateIpsDestinationMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts index 18fb960a0eb30..a95745c7b96ed 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUniquePrivateIpsSourceMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts index 482086289e14d..d958f9304b8ab 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_area.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiTotalUsersAreaLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts index 7f1d2253eb3be..08e5756337dce 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiTotalUsersMetricLensAttributes: LensAttributes = { description: '', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts index 459ad6693ae41..e4690f66998c8 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentication_metric_failure.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUserAuthenticationsMetricFailureLensAttributes: LensAttributes = { title: '[Host] User authentications - metric failure ', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts index ec0770795f5a8..cf9902bb2413a 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUserAuthenticationsAreaLensAttributes: LensAttributes = { title: '[Host] User authentications - area ', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts index 02468984144bc..4727c6010b751 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; import { FAIL_CHART_LABEL, SUCCESS_CHART_LABEL } from '../../translations'; export const kpiUserAuthenticationsBarLensAttributes: LensAttributes = { diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts index ae0ac6e3e2e4d..66f30bf2378a8 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensAttributes } from '../../types'; +import type { LensAttributes } from '../../types'; export const kpiUserAuthenticationsMetricSuccessLensAttributes: LensAttributes = { title: '[Host] User authentications - metric success ', diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts index 6bc0a63c57df5..17bc82799e63f 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import { InputsModelId } from '../../store/inputs/constants'; +import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { InputsModelId } from '../../store/inputs/constants'; export type LensAttributes = TypedLensByValueInput['attributes']; export type GetLensAttributes = (stackByField?: string) => LensAttributes; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx index ed8da682bbfd7..30626215cfd45 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_existing_case.tsx @@ -11,7 +11,7 @@ import { APP_ID } from '../../../../common/constants'; import { useKibana, useGetUserCasesPermissions } from '../../lib/kibana'; import { ADD_TO_CASE_SUCCESS } from './translations'; -import { LensAttributes } from './types'; +import type { LensAttributes } from './types'; const owner = APP_ID; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx index 42d25036afbeb..ac090bfde168c 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_add_to_new_case.tsx @@ -12,7 +12,7 @@ import { APP_ID } from '../../../../common/constants'; import { useKibana, useGetUserCasesPermissions } from '../../lib/kibana'; import { ADD_TO_CASE_SUCCESS } from './translations'; -import { LensAttributes } from './types'; +import type { LensAttributes } from './types'; export interface UseAddToNewCaseProps { onClick?: () => void; diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx index 426afa6233d49..f5baf9f13b519 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.test.tsx @@ -19,7 +19,8 @@ import { import { getExternalAlertLensAttributes } from './lens_attributes/common/external_alert'; import { useLensAttributes } from './use_lens_attributes'; import { hostNameExistsFilter, getHostDetailsPageFilter, getIndexFilters } from './utils'; -import { createStore, State } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; jest.mock('../../containers/sourcerer', () => ({ useSourcererDataView: jest.fn().mockReturnValue({ diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx index 042a606a6571c..8424127bb238b 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/use_lens_attributes.tsx @@ -13,7 +13,7 @@ import { useSourcererDataView } from '../../containers/sourcerer'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { inputsSelectors } from '../../store'; import { useRouteSpy } from '../../utils/route/use_route_spy'; -import { LensAttributes, GetLensAttributes } from './types'; +import type { LensAttributes, GetLensAttributes } from './types'; import { getHostDetailsPageFilter, filterNetworkExternalAlertData, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/utils.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/utils.ts index 94e09f0d95c83..81fe999961ee1 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; export const getHostDetailsPageFilter = (hostName?: string): Filter[] => hostName diff --git a/x-pack/plugins/security_solution/public/common/containers/alerts/use_alert_prevalence.ts b/x-pack/plugins/security_solution/public/common/containers/alerts/use_alert_prevalence.ts index 478eef0ebfbe1..1a750a371245b 100644 --- a/x-pack/plugins/security_solution/public/common/containers/alerts/use_alert_prevalence.ts +++ b/x-pack/plugins/security_solution/public/common/containers/alerts/use_alert_prevalence.ts @@ -9,7 +9,7 @@ import { useEffect, useState } from 'react'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../common/constants'; import { useGlobalTime } from '../use_global_time'; -import { GenericBuckets } from '../../../../common/search_strategy'; +import type { GenericBuckets } from '../../../../common/search_strategy'; import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query'; import { TimelineId } from '../../../../common/types'; import { useDeepEqualSelector } from '../../hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts index 497c3c67bfdd8..a8f7c55fe5ad0 100644 --- a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/histogram_configs.ts @@ -6,7 +6,7 @@ */ import * as i18n from './translations'; -import { +import type { MatrixHistogramOption, MatrixHistogramConfigs, } from '../../../components/matrix_histogram/types'; diff --git a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx index 73fba86da653c..f47aa6150967f 100644 --- a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/index.tsx @@ -8,7 +8,7 @@ import React, { useEffect } from 'react'; import { DEFAULT_ANOMALY_SCORE } from '../../../../../common/constants'; -import { AnomaliesQueryTabBodyProps } from './types'; +import type { AnomaliesQueryTabBodyProps } from './types'; import { getAnomaliesFilterQuery } from './utils'; import { useInstalledSecurityJobs } from '../../../components/ml/hooks/use_installed_security_jobs'; import { useUiSetting$ } from '../../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts index cb7dc3ff2542a..797927f6621c2 100644 --- a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/types.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { ESTermQuery } from '../../../../../common/typed_json'; -import { NarrowDateRange } from '../../../components/ml/types'; -import { UpdateDateRange } from '../../../components/charts/common'; -import { GlobalTimeArgs } from '../../use_global_time'; -import { HostsType } from '../../../../hosts/store/model'; -import { NetworkType } from '../../../../network/store/model'; -import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -import { UsersType } from '../../../../users/store/model'; +import type { ESTermQuery } from '../../../../../common/typed_json'; +import type { NarrowDateRange } from '../../../components/ml/types'; +import type { UpdateDateRange } from '../../../components/charts/common'; +import type { GlobalTimeArgs } from '../../use_global_time'; +import type { HostsType } from '../../../../hosts/store/model'; +import type { NetworkType } from '../../../../network/store/model'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import type { UsersType } from '../../../../users/store/model'; interface QueryTabBodyProps { type: HostsType | NetworkType | UsersType; diff --git a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts index fc35cfdac82eb..d36e872a12860 100644 --- a/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts +++ b/x-pack/plugins/security_solution/public/common/containers/anomalies/anomalies_query_tab_body/utils.ts @@ -7,9 +7,9 @@ import deepmerge from 'deepmerge'; -import { MlSummaryJob } from '@kbn/ml-plugin/public'; -import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import { createFilter } from '../../helpers'; export const getAnomaliesFilterQuery = ( diff --git a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx b/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx index 499a0cd78e6d1..80621b65c99c7 100644 --- a/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/authentications/index.tsx @@ -11,22 +11,22 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { +import type { AuthenticationsEdges, AuthStackByField, UserAuthenticationsRequestOptions, UserAuthenticationsStrategyResponse, - UsersQueries, } from '../../../../common/search_strategy/security_solution'; -import { PageInfoPaginated, SortField } from '../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../common/typed_json'; +import { UsersQueries } from '../../../../common/search_strategy/security_solution'; +import type { PageInfoPaginated, SortField } from '../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../store'; +import type { inputsModel } from '../../store'; import { createFilter } from '../helpers'; import { generateTablePaginationOptions } from '../../components/paginated_table/helpers'; import { useKibana } from '../../lib/kibana'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts b/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts index f4d3cde6e811d..bf595de39ee5e 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts +++ b/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/api.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import { filter } from 'rxjs/operators'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { isErrorResponse, isCompleteResponse } from '@kbn/data-plugin/common'; -import { +import type { CtiEventEnrichmentRequestOptions, CtiEventEnrichmentStrategyResponse, - CtiQueries, } from '../../../../../common/search_strategy/security_solution/cti'; +import { CtiQueries } from '../../../../../common/search_strategy/security_solution/cti'; type GetEventEnrichmentProps = CtiEventEnrichmentRequestOptions & { data: DataPublicPluginStart; diff --git a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts b/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts index dca5f45466795..97d8118c6739d 100644 --- a/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts +++ b/x-pack/plugins/security_solution/public/common/containers/cti/event_enrichment/use_investigation_enrichment.ts @@ -10,7 +10,7 @@ import { useDispatch } from 'react-redux'; import { isEmpty, isEqual } from 'lodash'; import usePrevious from 'react-use/lib/usePrevious'; -import { EventFields } from '../../../../../common/search_strategy/security_solution/cti'; +import type { EventFields } from '../../../../../common/search_strategy/security_solution/cti'; import { DEFAULT_EVENT_ENRICHMENT_FROM, DEFAULT_EVENT_ENRICHMENT_TO, diff --git a/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.test.ts b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.test.ts index ce03d159df5a9..3f81a24b619f3 100644 --- a/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.test.ts @@ -7,7 +7,8 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { noop } from 'lodash/fp'; -import { useTimelineLastEventTime, UseTimelineLastEventTimeArgs } from '.'; +import type { UseTimelineLastEventTimeArgs } from '.'; +import { useTimelineLastEventTime } from '.'; import { LastEventIndexKey } from '../../../../../common/search_strategy'; import { useKibana } from '../../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts index 953812687b68e..6b5d064e9f4fa 100644 --- a/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts +++ b/x-pack/plugins/security_solution/public/common/containers/events/last_event_time/index.ts @@ -11,17 +11,17 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { inputsModel } from '../../../store'; +import type { inputsModel } from '../../../store'; import { useKibana } from '../../../lib/kibana'; -import { - TimelineEventsQueries, +import type { TimelineEventsLastEventTimeRequestOptions, TimelineEventsLastEventTimeStrategyResponse, LastTimeDetails, LastEventIndexKey, } from '../../../../../common/search_strategy/timeline'; +import { TimelineEventsQueries } from '../../../../../common/search_strategy/timeline'; import * as i18n from './translations'; -import { DocValueFields } from '../../../../../common/search_strategy'; +import type { DocValueFields } from '../../../../../common/search_strategy'; import { useAppToasts } from '../../../hooks/use_app_toasts'; export interface UseTimelineLastEventTimeArgs { diff --git a/x-pack/plugins/security_solution/public/common/containers/helpers.test.ts b/x-pack/plugins/security_solution/public/common/containers/helpers.test.ts index 5b7d1fa5cd21e..ce00b0fb59038 100644 --- a/x-pack/plugins/security_solution/public/common/containers/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/containers/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ESQuery } from '../../../common/typed_json'; +import type { ESQuery } from '../../../common/typed_json'; import { createFilter } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/containers/helpers.ts b/x-pack/plugins/security_solution/public/common/containers/helpers.ts index f46147ceabf7c..3233c54dc9939 100644 --- a/x-pack/plugins/security_solution/public/common/containers/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/containers/helpers.ts @@ -7,7 +7,7 @@ import { isString } from 'lodash/fp'; -import { ESQuery } from '../../../common/typed_json'; +import type { ESQuery } from '../../../common/typed_json'; export const createFilter = (filterQuery: ESQuery | string | undefined) => isString(filterQuery) ? filterQuery : JSON.stringify(filterQuery); diff --git a/x-pack/plugins/security_solution/public/common/containers/local_storage/use_messages_storage.test.tsx b/x-pack/plugins/security_solution/public/common/containers/local_storage/use_messages_storage.test.tsx index 516aec148eab7..b80356b65cb5c 100644 --- a/x-pack/plugins/security_solution/public/common/containers/local_storage/use_messages_storage.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/local_storage/use_messages_storage.test.tsx @@ -7,7 +7,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { useKibana } from '../../lib/kibana'; -import { useMessagesStorage, UseMessagesStorage } from './use_messages_storage'; +import type { UseMessagesStorage } from './use_messages_storage'; +import { useMessagesStorage } from './use_messages_storage'; jest.mock('../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts b/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts index a423de8f4436d..8fef932c991a4 100644 --- a/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts +++ b/x-pack/plugins/security_solution/public/common/containers/matrix_histogram/index.ts @@ -11,19 +11,21 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { isErrorResponse, isCompleteResponse } from '@kbn/data-plugin/common'; -import { MatrixHistogramQueryProps } from '../../components/matrix_histogram/types'; -import { inputsModel } from '../../store'; +import type { MatrixHistogramQueryProps } from '../../components/matrix_histogram/types'; +import type { inputsModel } from '../../store'; import { createFilter } from '../helpers'; import { useKibana } from '../../lib/kibana'; -import { - MatrixHistogramQuery, +import type { MatrixHistogramRequestOptions, MatrixHistogramStrategyResponse, MatrixHistogramData, +} from '../../../../common/search_strategy/security_solution'; +import { + MatrixHistogramQuery, MatrixHistogramTypeToAggName, } from '../../../../common/search_strategy/security_solution'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/containers/query_client/query_client_provider.tsx b/x-pack/plugins/security_solution/public/common/containers/query_client/query_client_provider.tsx index 2f67dc2734fed..20fd3d09ad593 100644 --- a/x-pack/plugins/security_solution/public/common/containers/query_client/query_client_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/query_client/query_client_provider.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, PropsWithChildren, useMemo } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { memo, useMemo } from 'react'; import { QueryClient, QueryClientProvider } from 'react-query'; type QueryClientOptionsProp = ConstructorParameters[0]; diff --git a/x-pack/plugins/security_solution/public/common/containers/query_toggle/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/query_toggle/index.test.tsx index 76f1c02dcb43c..d9cd0c181ba47 100644 --- a/x-pack/plugins/security_solution/public/common/containers/query_toggle/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/query_toggle/index.test.tsx @@ -5,15 +5,11 @@ * 2.0. */ -import { - renderHook, - act, - RenderResult, - WaitForNextUpdate, - cleanup, -} from '@testing-library/react-hooks'; -import { QueryToggle, useQueryToggle } from '.'; -import { RouteSpyState } from '../../utils/route/types'; +import type { RenderResult, WaitForNextUpdate } from '@testing-library/react-hooks'; +import { renderHook, act, cleanup } from '@testing-library/react-hooks'; +import type { QueryToggle } from '.'; +import { useQueryToggle } from '.'; +import type { RouteSpyState } from '../../utils/route/types'; import { SecurityPageName } from '../../../../common/constants'; import { useKibana } from '../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx index 8b1902cbc5e6b..24d58a665177b 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { IndexField } from '../../../../common/search_strategy/index_fields'; +import type { IndexField } from '../../../../common/search_strategy/index_fields'; import { getBrowserFields, getAllBrowserFields } from '.'; -import { IndexFieldSearch, useDataView } from './use_data_view'; +import type { IndexFieldSearch } from './use_data_view'; +import { useDataView } from './use_data_view'; import { mockBrowserFields, mocksSource } from './mock'; import { mockGlobalState, TestProviders } from '../../mock'; import { act, renderHook } from '@testing-library/react-hooks'; diff --git a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx index 4112aaa72d0a0..5233a38cdde36 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx @@ -12,7 +12,7 @@ import ReactDOM from 'react-dom'; import type { DataViewBase } from '@kbn/es-query'; import { Subscription } from 'rxjs'; -import { +import type { BrowserField, BrowserFields, DocValueFields, diff --git a/x-pack/plugins/security_solution/public/common/containers/source/mock.ts b/x-pack/plugins/security_solution/public/common/containers/source/mock.ts index 17f216baed3b7..607225ff62e57 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/mock.ts +++ b/x-pack/plugins/security_solution/public/common/containers/source/mock.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; -import { DocValueFields } from '../../../../common/search_strategy'; -import { BrowserFields } from '../../../../common/search_strategy/index_fields'; +import type { DocValueFields } from '../../../../common/search_strategy'; +import type { BrowserFields } from '../../../../common/search_strategy/index_fields'; export const mocksSource = { indexFields: [ diff --git a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx index d578340c7c691..49cf89e0de1b0 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx @@ -6,19 +6,20 @@ */ import { useCallback, useEffect, useRef } from 'react'; -import { Subscription } from 'rxjs'; +import type { Subscription } from 'rxjs'; import { useDispatch } from 'react-redux'; import memoizeOne from 'memoize-one'; import { omit, pick } from 'lodash/fp'; -import { +import type { BrowserField, - DELETED_SECURITY_SOLUTION_DATA_VIEW, DocValueFields, IndexField, IndexFieldsStrategyRequest, IndexFieldsStrategyResponse, } from '@kbn/timelines-plugin/common'; -import { FieldSpec, isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; +import { DELETED_SECURITY_SOLUTION_DATA_VIEW } from '@kbn/timelines-plugin/common'; +import type { FieldSpec } from '@kbn/data-plugin/common'; +import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useKibana } from '../../lib/kibana'; import { useAppToasts } from '../../hooks/use_app_toasts'; import { sourcererActions } from '../../store/sourcerer'; diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/api.ts b/x-pack/plugins/security_solution/public/common/containers/sourcerer/api.ts index 014b21d3b2c25..cfa2f890b9044 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/api.ts +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/api.ts @@ -7,7 +7,7 @@ import { KibanaServices } from '../../lib/kibana'; import { SOURCERER_API_URL } from '../../../../common/constants'; -import { KibanaDataView } from '../../store/sourcerer/model'; +import type { KibanaDataView } from '../../store/sourcerer/model'; export interface GetSourcererDataView { signal: AbortSignal; diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx index 737f4cf628765..b99547db88ba4 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx @@ -12,7 +12,7 @@ import { Provider } from 'react-redux'; import { getScopeFromPath, useInitSourcerer, useSourcererDataView } from '.'; import { mockPatterns } from './mocks'; -import { RouteSpyState } from '../../utils/route/types'; +import type { RouteSpyState } from '../../utils/route/types'; import { DEFAULT_DATA_VIEW_ID, DEFAULT_INDEX_PATTERN, @@ -31,7 +31,8 @@ import { mockSourcererState, TestProviders, } from '../../mock'; -import { SelectedDataView, SourcererScopeName } from '../../store/sourcerer/model'; +import type { SelectedDataView } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../store/sourcerer/model'; import { postSourcererDataView } from './api'; import { sourcererActions } from '../../store/sourcerer'; import { useInitializeUrlParam, useUpdateUrlParam } from '../../utils/global_query_string'; diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx index b29379790dd5b..ceb9c209f30a1 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx @@ -10,12 +10,12 @@ import { useDispatch } from 'react-redux'; import { i18n } from '@kbn/i18n'; import { matchPath } from 'react-router-dom'; import { sourcererActions, sourcererSelectors } from '../../store/sourcerer'; -import { +import type { SelectedDataView, SourcererDataView, - SourcererScopeName, SourcererUrlState, } from '../../store/sourcerer/model'; +import { SourcererScopeName } from '../../store/sourcerer/model'; import { useUserInfo } from '../../../detections/components/user_info'; import { timelineSelectors } from '../../../timelines/store/timeline'; import { diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx index a387bd2211a66..87b3d29310cab 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/use_signal_helpers.test.tsx @@ -15,7 +15,8 @@ import { } from '../../mock'; import { act, renderHook } from '@testing-library/react-hooks'; import { useSignalHelpers } from './use_signal_helpers'; -import { createStore, State } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; describe('useSignalHelpers', () => { const wrapperContainer: React.FC<{ children?: React.ReactNode }> = ({ children }) => ( diff --git a/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.test.ts b/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.test.ts index bbbe7cb3902e7..a211fc87fafbd 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.test.ts +++ b/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.test.ts @@ -8,11 +8,12 @@ import { renderHook } from '@testing-library/react-hooks'; import { Direction } from '../../../../common/search_strategy'; -import { FirstLastSeenProps } from '../../components/first_last_seen/first_last_seen'; +import type { FirstLastSeenProps } from '../../components/first_last_seen/first_last_seen'; import { useKibana } from '../../lib/kibana'; import { useAppToasts } from '../../hooks/use_app_toasts'; import * as i18n from './translations'; -import { UseFirstLastSeen, useFirstLastSeen } from './use_first_last_seen'; +import type { UseFirstLastSeen } from './use_first_last_seen'; +import { useFirstLastSeen } from './use_first_last_seen'; jest.mock('../../lib/kibana'); jest.mock('../../hooks/use_app_toasts'); diff --git a/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.tsx b/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.tsx index 674e681a4dd3a..bc562edc71a34 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/use_first_last_seen/use_first_last_seen.tsx @@ -11,12 +11,12 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { +import type { Direction, - FirstLastSeenQuery, FirstLastSeenRequestOptions, FirstLastSeenStrategyResponse, } from '../../../../common/search_strategy'; +import { FirstLastSeenQuery } from '../../../../common/search_strategy'; import { useAppToasts } from '../../hooks/use_app_toasts'; import { useKibana } from '../../lib/kibana'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/common/containers/use_full_screen/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/use_full_screen/index.test.tsx index 5e3c3e0350dc5..b4de304a0d9a7 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_full_screen/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/use_full_screen/index.test.tsx @@ -7,14 +7,10 @@ import React, { useEffect } from 'react'; import { TestProviders } from '../../mock'; -import { - renderHook, - act, - RenderResult, - WaitForNextUpdate, - cleanup, -} from '@testing-library/react-hooks'; -import { useGlobalFullScreen, GlobalFullScreen } from '.'; +import type { RenderResult, WaitForNextUpdate } from '@testing-library/react-hooks'; +import { renderHook, act, cleanup } from '@testing-library/react-hooks'; +import type { GlobalFullScreen } from '.'; +import { useGlobalFullScreen } from '.'; describe('useFullScreen', () => { describe('with no data-grid present in the dom', () => { diff --git a/x-pack/plugins/security_solution/public/common/containers/use_global_time/index.tsx b/x-pack/plugins/security_solution/public/common/containers/use_global_time/index.tsx index 960a23e7898f6..de520d1269112 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_global_time/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/use_global_time/index.tsx @@ -12,7 +12,7 @@ import { useDispatch } from 'react-redux'; import { useDeepEqualSelector } from '../../hooks/use_selector'; import { inputsSelectors } from '../../store'; import { inputsActions } from '../../store/actions'; -import { SetQuery, DeleteQuery } from './types'; +import type { SetQuery, DeleteQuery } from './types'; export const useGlobalTime = (clearAllQuery: boolean = true) => { const dispatch = useDispatch(); diff --git a/x-pack/plugins/security_solution/public/common/containers/use_global_time/types.ts b/x-pack/plugins/security_solution/public/common/containers/use_global_time/types.ts index b27b4408e1576..9d48d64a1fdeb 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_global_time/types.ts +++ b/x-pack/plugins/security_solution/public/common/containers/use_global_time/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { inputsActions } from '../../store/actions'; +import type { inputsActions } from '../../store/actions'; export type SetQuery = Pick< Parameters[0], diff --git a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.test.ts b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.test.ts index fc0455348c4e6..7524622803c7d 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.test.ts +++ b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.test.ts @@ -9,7 +9,7 @@ import { useSearchStrategy } from '.'; import { act, renderHook } from '@testing-library/react-hooks'; import { useObservable } from '@kbn/securitysolution-hook-utils'; -import { FactoryQueryTypes } from '../../../../common/search_strategy'; +import type { FactoryQueryTypes } from '../../../../common/search_strategy'; const mockAddToastError = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.tsx b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.tsx index 2ffbf706ec1a2..0b7f0dfa7e75d 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/index.tsx @@ -7,27 +7,25 @@ import { filter } from 'rxjs/operators'; import { noop, omit } from 'lodash/fp'; import { useCallback, useEffect, useRef, useMemo } from 'react'; -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; -import { OptionalSignalArgs, useObservable } from '@kbn/securitysolution-hook-utils'; +import type { OptionalSignalArgs } from '@kbn/securitysolution-hook-utils'; +import { useObservable } from '@kbn/securitysolution-hook-utils'; -import { IKibanaSearchResponse } from '@kbn/data-plugin/common'; -import { - DataPublicPluginStart, - isCompleteResponse, - isErrorResponse, -} from '@kbn/data-plugin/public'; +import type { IKibanaSearchResponse } from '@kbn/data-plugin/common'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/public'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; import * as i18n from './translations'; -import { +import type { FactoryQueryTypes, RequestBasicOptions, StrategyRequestType, StrategyResponseType, } from '../../../../common/search_strategy/security_solution'; import { getInspectResponse } from '../../../helpers'; -import { inputsModel } from '../../store'; +import type { inputsModel } from '../../store'; import { useKibana } from '../../lib/kibana'; import { useAppToasts } from '../../hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/translations.ts b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/translations.ts index 0e8166d9eb4be..3b069036e6e9d 100644 --- a/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/translations.ts +++ b/x-pack/plugins/security_solution/public/common/containers/use_search_strategy/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { FactoryQueryTypes } from '../../../../common/search_strategy'; +import type { FactoryQueryTypes } from '../../../../common/search_strategy'; export const DEFAULT_ERROR_SEARCH_STRATEGY = (factoryQueryType: FactoryQueryTypes) => i18n.translate('xpack.securitySolution.searchStrategy.error', { diff --git a/x-pack/plugins/security_solution/public/common/experimental_features_service.ts b/x-pack/plugins/security_solution/public/common/experimental_features_service.ts index bb03fb59bf7a5..3112f7ab78b67 100644 --- a/x-pack/plugins/security_solution/public/common/experimental_features_service.ts +++ b/x-pack/plugins/security_solution/public/common/experimental_features_service.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExperimentalFeatures } from '../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../common/experimental_features'; export class ExperimentalFeaturesService { private static experimentalFeatures?: ExperimentalFeatures; diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx index 046b4a9d5d9df..14e9a972eefbe 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/api/__mock__/api.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { IndexPatternSavedObject } from '../../types'; +import type { IndexPatternSavedObject } from '../../types'; export const mockIndexPatternSavedObjects: IndexPatternSavedObject[] = [ { diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx index e5a73a6b73ef4..e459874c27392 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/api/api.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import { StartServices } from '../../../types'; -import { IndexPatternSavedObject, IndexPatternSavedObjectAttributes } from '../types'; +import type { StartServices } from '../../../types'; +import type { IndexPatternSavedObject, IndexPatternSavedObjectAttributes } from '../types'; /** * Fetches Configured Index Patterns from the Kibana saved objects API diff --git a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx index ce524cf0e4dbb..cc0f943f0aee3 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/api/helpers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { IndexPatternSavedObject } from '../types'; +import type { IndexPatternSavedObject } from '../types'; /** * Returns a string array of Index Pattern Titles diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx index 2ddd83fe4b2ce..d244ad4ab7d82 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.test.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../mock/endpoint'; +import type { AppContextTestRender } from '../../mock/endpoint'; +import { createAppRootMockRenderer } from '../../mock/endpoint'; import { useNavigateByRouterEventHandler } from './use_navigate_by_router_event_handler'; import { act, fireEvent, cleanup } from '@testing-library/react'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts index 0b7872304c89a..b140252e13a68 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_by_router_event_handler.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { MouseEventHandler, useCallback } from 'react'; +import type { MouseEventHandler } from 'react'; +import { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import { LocationDescriptorObject } from 'history'; +import type { LocationDescriptorObject } from 'history'; type EventHandlerCallback = MouseEventHandler; diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts index 3a1dff65943d7..a4b998d3bca98 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { MouseEventHandler, useCallback } from 'react'; -import { ApplicationStart, NavigateToAppOptions } from '@kbn/core/public'; +import type { MouseEventHandler } from 'react'; +import { useCallback } from 'react'; +import type { ApplicationStart, NavigateToAppOptions } from '@kbn/core/public'; import { useKibana } from '../../lib/kibana'; type NavigateToAppHandlerOptions = NavigateToAppOptions & { diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts index 68a20d82e95ab..d12491699bf8b 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts @@ -7,11 +7,8 @@ import { firstValueFrom } from 'rxjs'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { - EqlSearchStrategyRequest, - EqlSearchStrategyResponse, - EQL_SEARCH_STRATEGY, -} from '@kbn/data-plugin/common'; +import type { EqlSearchStrategyRequest, EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; +import { EQL_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/eql_search_response.mock.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/eql_search_response.mock.ts index f17c1f84de000..833fbf22a7259 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/eql_search_response.mock.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/eql_search_response.mock.ts @@ -6,8 +6,8 @@ */ import type { EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; -import { Source } from './types'; -import { EqlSearchResponse } from '../../../../common/detection_engine/types'; +import type { Source } from './types'; +import type { EqlSearchResponse } from '../../../../common/detection_engine/types'; import type { Connection } from '@elastic/elasticsearch'; export const getMockEqlResponse = (): EqlSearchStrategyResponse> => ({ diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts index 5eb3e042cbf2b..a93a71f8382a1 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.test.ts @@ -8,9 +8,9 @@ import moment from 'moment'; import type { EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; -import { Source } from './types'; -import { EqlSearchResponse } from '../../../../common/detection_engine/types'; -import { inputsModel } from '../../store'; +import type { Source } from './types'; +import type { EqlSearchResponse } from '../../../../common/detection_engine/types'; +import type { inputsModel } from '../../store'; import { calculateBucketForHour, diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.ts index a70617447e4f9..52d8ec4f70123 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/helpers.ts @@ -6,13 +6,13 @@ */ import moment from 'moment'; -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; import type { EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; -import { inputsModel } from '../../store'; +import type { inputsModel } from '../../store'; -import { InspectResponse } from '../../../types'; -import { EqlPreviewResponse, Source } from './types'; -import { BaseHit, EqlSearchResponse } from '../../../../common/detection_engine/types'; +import type { InspectResponse } from '../../../types'; +import type { EqlPreviewResponse, Source } from './types'; +import type { BaseHit, EqlSearchResponse } from '../../../../common/detection_engine/types'; type EqlAggBuckets = Record; diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/types.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/types.ts index 0e329a47012ac..d46f79c286a74 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/types.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/types.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; -import { InspectResponse } from '../../../types'; -import { ChartData } from '../../components/charts/common'; -import { inputsModel } from '../../store'; +import type { InspectResponse } from '../../../types'; +import type { ChartData } from '../../components/charts/common'; +import type { inputsModel } from '../../store'; export interface EqlPreviewRequest { to: string; diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.test.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.test.ts index 47c084661a5fc..166d89560e4d0 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.test.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; import { renderHook, act } from '@testing-library/react-hooks'; import { of, throwError } from 'rxjs'; import { delay } from 'rxjs/operators'; import * as i18n from '../translations'; import type { EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; -import { Source } from './types'; -import { EqlSearchResponse } from '../../../../common/detection_engine/types'; +import type { Source } from './types'; +import type { EqlSearchResponse } from '../../../../common/detection_engine/types'; import { useKibana } from '../../lib/kibana'; import { useEqlPreview } from '.'; import { getMockEqlResponse } from './eql_search_response.mock'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.ts index 20a9ccbefa900..bd04056509b8d 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/use_eql_preview.ts @@ -11,22 +11,21 @@ import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { parseScheduleDates } from '@kbn/securitysolution-io-ts-utils'; +import type { EqlSearchStrategyRequest, EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; import { isCompleteResponse, isErrorResponse, isPartialResponse, - EqlSearchStrategyRequest, - EqlSearchStrategyResponse, EQL_SEARCH_STRATEGY, } from '@kbn/data-plugin/common'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; import * as i18n from '../translations'; import { useKibana } from '../../lib/kibana'; import { formatInspect, getEqlAggsData } from './helpers'; -import { EqlPreviewResponse, EqlPreviewRequest, Source } from './types'; +import type { EqlPreviewResponse, EqlPreviewRequest, Source } from './types'; import { hasEqlSequenceQuery } from '../../../../common/detection_engine/utils'; -import { EqlSearchResponse } from '../../../../common/detection_engine/types'; -import { inputsModel } from '../../store'; +import type { EqlSearchResponse } from '../../../../common/detection_engine/types'; +import type { inputsModel } from '../../store'; import { useAppToasts } from '../use_app_toasts'; export const useEqlPreview = (): [ diff --git a/x-pack/plugins/security_solution/public/common/hooks/types.ts b/x-pack/plugins/security_solution/public/common/hooks/types.ts index d24f4a95f4041..2fc2fe7b1e4cd 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/types.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SimpleSavedObject } from '@kbn/core/public'; +import type { SimpleSavedObject } from '@kbn/core/public'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type IndexPatternSavedObjectAttributes = { title: string }; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.mock.ts b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.mock.ts index ae3783e82cdbf..fcb7eda7545ba 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.mock.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UseAppToasts } from './use_app_toasts'; +import type { UseAppToasts } from './use_app_toasts'; const createAppToastsMock = (): jest.Mocked => ({ addError: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.test.ts index 359d29be7cd08..250c000575d07 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.test.ts @@ -7,10 +7,11 @@ import { renderHook } from '@testing-library/react-hooks'; import type { IEsError } from '@kbn/data-plugin/public'; -import { KibanaError, SecurityAppError } from '@kbn/securitysolution-t-grid'; +import type { KibanaError, SecurityAppError } from '@kbn/securitysolution-t-grid'; import { useToasts } from '../lib/kibana'; +import type { MaybeESError } from './use_app_toasts'; import { appErrorToErrorStack, convertErrorToEnumerable, @@ -19,7 +20,6 @@ import { esErrorToErrorStack, getStringifiedStack, isEmptyObjectWhenStringified, - MaybeESError, unknownToErrorStack, useAppToasts, } from './use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.ts b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.ts index d9c3713f3a4ba..3c4ad68b221ea 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_app_toasts.ts @@ -7,16 +7,13 @@ import { useCallback, useRef, useMemo } from 'react'; import { isString } from 'lodash/fp'; -import { - AppError, - isAppError, - isKibanaError, - isSecurityAppError, -} from '@kbn/securitysolution-t-grid'; +import type { AppError } from '@kbn/securitysolution-t-grid'; +import { isAppError, isKibanaError, isSecurityAppError } from '@kbn/securitysolution-t-grid'; -import { IEsError, isEsError } from '@kbn/data-plugin/public'; +import type { IEsError } from '@kbn/data-plugin/public'; +import { isEsError } from '@kbn/data-plugin/public'; -import { ErrorToastOptions, ToastsStart, Toast } from '@kbn/core/public'; +import type { ErrorToastOptions, ToastsStart, Toast } from '@kbn/core/public'; import { useToasts } from '../lib/kibana'; export type UseAppToasts = Pick & { diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx index 953f39fcf2372..a64ac91f09cd7 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_control.test.tsx @@ -6,7 +6,8 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useControl, UseControlsReturn } from './use_control'; +import type { UseControlsReturn } from './use_control'; +import { useControl } from './use_control'; describe('useControl', () => { it('init', async () => { diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_dashboard_button_href.ts b/x-pack/plugins/security_solution/public/common/hooks/use_dashboard_button_href.ts index 39e10a88087c7..57d565ded1f8d 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_dashboard_button_href.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_dashboard_button_href.ts @@ -5,7 +5,7 @@ * 2.0. */ import { useState, useEffect } from 'react'; -import { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; import { useKibana } from '../lib/kibana'; export const dashboardRequestBody = (title: string) => ({ diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.test.ts index 2ac5948641d7d..12c5b2a450b9e 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.test.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.test.ts @@ -6,7 +6,7 @@ */ import { useSelector } from 'react-redux'; -import { ExperimentalFeatures } from '../../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../../common/experimental_features'; import { useIsExperimentalFeatureEnabled } from './use_experimental_features'; jest.mock('react-redux'); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.ts b/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.ts index 1cc2506ec3996..f38ae61c0575b 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_experimental_features.ts @@ -6,11 +6,9 @@ */ import { useSelector } from 'react-redux'; -import { State } from '../store'; -import { - ExperimentalFeatures, - getExperimentalAllowedValues, -} from '../../../common/experimental_features'; +import type { State } from '../store'; +import type { ExperimentalFeatures } from '../../../common/experimental_features'; +import { getExperimentalAllowedValues } from '../../../common/experimental_features'; const allowedExperimentalValues = getExperimentalAllowedValues(); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx index d97bb5df4152d..1f33d340eca0f 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_index_patterns.tsx @@ -11,7 +11,7 @@ import { useKibana } from '../lib/kibana'; import { errorToToaster, useStateToaster } from '../components/toasters'; import * as i18n from './translations'; -import { IndexPatternSavedObject } from './types'; +import type { IndexPatternSavedObject } from './types'; import { getIndexPatterns } from './api/api'; type Return = [boolean, IndexPatternSavedObject[]]; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx index 6a493d944ecda..757492677266e 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx @@ -11,7 +11,7 @@ import { EuiSpacer } from '@elastic/eui'; import { useDeepEqualSelector } from './use_selector'; import { TimelineId } from '../../../common/types/timeline'; import { timelineSelectors } from '../../timelines/store/timeline'; -import { TimelineUrl } from '../../timelines/store/timeline/model'; +import type { TimelineUrl } from '../../timelines/store/timeline/model'; import { timelineDefaults } from '../../timelines/store/timeline/defaults'; import { decodeRisonUrlState, encodeRisonUrlState } from '../components/url_state/helpers'; import { useKibana } from '../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts index 93f74db0d3c8f..7166b755a1ab3 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts @@ -13,7 +13,7 @@ import { timelineSelectors } from '../../timelines/store/timeline'; import { timelineDefaults } from '../../timelines/store/timeline/defaults'; import { decodeRisonUrlState, encodeRisonUrlState } from '../components/url_state/helpers'; import { useKibana } from '../lib/kibana'; -import { TimelineUrl } from '../../timelines/store/timeline/model'; +import type { TimelineUrl } from '../../timelines/store/timeline/model'; import { CONSTANTS } from '../components/url_state/constants'; /** diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_selector.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_selector.tsx index 93d941f042fa5..dc3e2029b9ecf 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_selector.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_selector.tsx @@ -7,7 +7,7 @@ import { shallowEqual, useSelector } from 'react-redux'; import deepEqual from 'fast-deep-equal'; -import { State } from '../store'; +import type { State } from '../store'; export type TypedUseSelectorHook = ( selector: (state: TState) => TSelected, diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_secuirty_packages.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_secuirty_packages.test.tsx index 4131f2345b454..f40f1dd0fecc0 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_secuirty_packages.test.tsx +++ b/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_secuirty_packages.test.tsx @@ -7,7 +7,8 @@ import React, { memo } from 'react'; import { useKibana } from '../lib/kibana'; -import { renderHook as _renderHook, RenderHookResult } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook as _renderHook } from '@testing-library/react-hooks'; import { useUpgradeSecurityPackages } from './use_upgrade_security_packages'; import { epmRouteService } from '@kbn/fleet-plugin/common'; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_security_packages.ts b/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_security_packages.ts index fd5183bc79fb8..848f1458502ca 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_security_packages.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/use_upgrade_security_packages.ts @@ -6,8 +6,9 @@ */ import { useEffect } from 'react'; -import { HttpFetchOptions, HttpStart } from '@kbn/core/public'; -import { epmRouteService, BulkInstallPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { HttpFetchOptions, HttpStart } from '@kbn/core/public'; +import type { BulkInstallPackagesResponse } from '@kbn/fleet-plugin/common'; +import { epmRouteService } from '@kbn/fleet-plugin/common'; import { useKibana } from '../lib/kibana'; import { useUserPrivileges } from '../components/user_privileges'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx index ff1ddbe03cc3e..8f770dfd21bf5 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; +import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import { getAddToTimelineCellAction } from './add_to_timeline'; jest.mock('../kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx index f8941b15ab796..4e944072fefef 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/add_to_timeline.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import React, { useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; -import { DataProvider } from '@kbn/timelines-plugin/common/types'; +import type { DataProvider } from '@kbn/timelines-plugin/common/types'; import { getPageRowIndex } from '@kbn/timelines-plugin/public'; import { useGetMappedNonEcsValue } from '../../../timelines/components/timeline/body/data_driven_columns'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.test.tsx index d7946fb397c62..eb1d3c0a7f27b 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; +import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import { getCopyCellAction } from './copy'; jest.mock('../kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.tsx index 753eefc15393a..f4fdb22aff136 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/copy.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import React, { useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx index ff1fb993effdc..c588420afa38c 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.test.tsx @@ -4,14 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiDataGridColumn } from '@elastic/eui'; +import type { EuiDataGridColumn } from '@elastic/eui'; import type { BrowserFields, TimelineNonEcsData, } from '@kbn/timelines-plugin/common/search_strategy'; -import { TGridCellAction } from '@kbn/timelines-plugin/common/types'; -import { Ecs } from '../../../../common/ecs'; -import { ColumnHeaderType } from '../../../timelines/store/timeline/model'; +import type { TGridCellAction } from '@kbn/timelines-plugin/common/types'; +import type { Ecs } from '../../../../common/ecs'; +import type { ColumnHeaderType } from '../../../timelines/store/timeline/model'; import { defaultCellActions } from './default_cell_actions'; import { COLUMNS_WITH_LINKS, EmptyComponent } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.ts b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.ts index 3992023346cda..0ad0968063c93 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.ts +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/default_cell_actions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TGridCellAction } from '@kbn/timelines-plugin/common/types'; +import type { TGridCellAction } from '@kbn/timelines-plugin/common/types'; import { getFilterForCellAction } from './filter_for'; import { getFilterOutCellAction } from './filter_out'; import { getAddToTimelineCellAction } from './add_to_timeline'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx index 15776fd165e93..44d577a587770 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.test.tsx @@ -8,7 +8,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import { ExpandedCellValueActions } from './expanded_cell_value_actions'; -import { ColumnHeaderType } from '@kbn/timelines-plugin/common/types'; +import type { ColumnHeaderType } from '@kbn/timelines-plugin/common/types'; jest.mock('../kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx index 4062f314d8658..14951f532bd1a 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/expanded_cell_value_actions.tsx @@ -10,7 +10,7 @@ import { noop } from 'lodash/fp'; import React, { useMemo, useState, useCallback } from 'react'; import styled from 'styled-components'; import type { Filter } from '@kbn/es-query'; -import { ColumnHeaderOptions } from '@kbn/timelines-plugin/common/types'; +import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common/types'; import { allowTopN } from '../../components/drag_and_drop/helpers'; import { ShowTopNButton } from '../../components/hover_actions/actions/show_top_n'; import { useKibana } from '../kibana'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/field_value.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/field_value.tsx index c4801f1caf955..ae876d655074e 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/field_value.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/field_value.tsx @@ -5,14 +5,14 @@ * 2.0. */ -import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import { head, getOr, get, isEmpty } from 'lodash/fp'; import React, { useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; -import { ColumnHeaderOptions } from '@kbn/timelines-plugin/common/types'; +import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common/types'; import { getPageRowIndex } from '@kbn/timelines-plugin/public'; -import { Ecs } from '../../../../common/ecs'; +import type { Ecs } from '../../../../common/ecs'; import { useGetMappedNonEcsValue } from '../../../timelines/components/timeline/body/data_driven_columns'; import { FormattedFieldValue } from '../../../timelines/components/timeline/body/renderers/formatted_field'; import { parseValue } from '../../../timelines/components/timeline/body/renderers/parse_value'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.test.tsx index d88f5f855bac6..35669d12ae6be 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; +import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import { getFilterForCellAction } from './filter_for'; jest.mock('../kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.tsx index 39e1c98375c6d..cc721b4944244 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_for.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import React, { useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.test.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.test.tsx index f8f66f1f38137..f6c794da8a000 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.test.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; +import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import { getFilterOutCellAction } from './filter_out'; jest.mock('../kibana'); diff --git a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.tsx b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.tsx index edb21075ea6ee..10f36a14e2c5e 100644 --- a/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/cell_actions/filter_out.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import type { EuiDataGridColumnCellActionProps } from '@elastic/eui'; import React, { useMemo } from 'react'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/index.ts b/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/index.ts index c3836629bcf08..d1075c5765073 100644 --- a/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/index.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { HostIsolationRequestBody, HostIsolationResponse } from '../../../../common/endpoint/types'; +import type { + HostIsolationRequestBody, + HostIsolationResponse, +} from '../../../../common/endpoint/types'; import { KibanaServices } from '../kibana'; import { ISOLATE_HOST_ROUTE, UNISOLATE_HOST_ROUTE } from '../../../../common/endpoint/constants'; diff --git a/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/mocks.ts b/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/mocks.ts index 256359e40b6e2..b0bbc70393092 100644 --- a/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/mocks.ts +++ b/x-pack/plugins/security_solution/public/common/lib/endpoint_isolation/mocks.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { HostIsolationRequestBody, HostIsolationResponse } from '../../../../common/endpoint/types'; -import { - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../mock/endpoint/http_handler_mock_factory'; +import type { + HostIsolationRequestBody, + HostIsolationResponse, +} from '../../../../common/endpoint/types'; +import type { ResponseProvidersInterface } from '../../mock/endpoint/http_handler_mock_factory'; +import { httpHandlerMockFactory } from '../../mock/endpoint/http_handler_mock_factory'; import { ISOLATE_HOST_ROUTE, UNISOLATE_HOST_ROUTE } from '../../../../common/endpoint/constants'; export const hostIsolationRequestBodyMock = (): HostIsolationRequestBody => { diff --git a/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/endpoint_pending_actions.ts b/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/endpoint_pending_actions.ts index e1feb8a14ab0b..9bb6603c90a1c 100644 --- a/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/endpoint_pending_actions.ts +++ b/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/endpoint_pending_actions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { PendingActionsRequestQuery, PendingActionsResponse, } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/mocks.ts b/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/mocks.ts index 4c3822b07d88c..1ce00bb86ab85 100644 --- a/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/mocks.ts +++ b/x-pack/plugins/security_solution/public/common/lib/endpoint_pending_actions/mocks.ts @@ -5,14 +5,12 @@ * 2.0. */ -import { +import type { PendingActionsRequestQuery, PendingActionsResponse, } from '../../../../common/endpoint/types'; -import { - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../mock/endpoint/http_handler_mock_factory'; +import type { ResponseProvidersInterface } from '../../mock/endpoint/http_handler_mock_factory'; +import { httpHandlerMockFactory } from '../../mock/endpoint/http_handler_mock_factory'; import { ACTION_STATUS_ROUTE } from '../../../../common/endpoint/constants'; export const pendingActionsResponseMock = (): PendingActionsResponse => ({ diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts index 8a35034646e43..98f53b004c0f6 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts @@ -12,8 +12,8 @@ import { i18n } from '@kbn/i18n'; import { camelCase, isArray, isObject } from 'lodash'; import { set } from '@elastic/safer-lodash-set'; -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; -import { NavigateToAppOptions } from '@kbn/core/public'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { NavigateToAppOptions } from '@kbn/core/public'; import { APP_UI_ID, CASES_FEATURE_ID, @@ -21,7 +21,7 @@ import { DEFAULT_DATE_FORMAT_TZ, } from '../../../../common/constants'; import { errorToToaster, useStateToaster } from '../../components/toasters'; -import { StartServices } from '../../../types'; +import type { StartServices } from '../../../types'; import { useUiSetting, useKibana } from './kibana_react'; export const useDateFormat = (): string => useUiSetting(DEFAULT_DATE_FORMAT); diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts index 7948556b60c5d..349889899c1a0 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts @@ -9,7 +9,7 @@ import React from 'react'; -import { RecursivePartial } from '@elastic/eui/src/components/common'; +import type { RecursivePartial } from '@elastic/eui/src/components/common'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; @@ -34,10 +34,10 @@ import { DEFAULT_RULE_REFRESH_INTERVAL_ON, DEFAULT_RULE_REFRESH_INTERVAL_VALUE, } from '../../../../common/constants'; -import { StartServices } from '../../../types'; +import type { StartServices } from '../../../types'; import { createSecuritySolutionStorageMock } from '../../mock/mock_local_storage'; import { MlLocatorDefinition } from '@kbn/ml-plugin/public'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; +import type { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { MockUrlService } from '@kbn/share-plugin/common/mocks'; import { fleetMock } from '@kbn/fleet-plugin/public/mocks'; import { triggersActionsUiMock } from '@kbn/triggers-actions-ui-plugin/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts index 61f6997c2b08d..42d8e9e0f1d0d 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.ts @@ -5,16 +5,16 @@ * 2.0. */ +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; import { KibanaContextProvider, - KibanaReactContextValue, useKibana, useUiSetting, useUiSetting$, withKibana, } from '@kbn/kibana-react-plugin/public'; import type { ApmBase } from '@elastic/apm-rum'; -import { StartServices } from '../../../types'; +import type { StartServices } from '../../../types'; export type KibanaContext = KibanaReactContextValue; export interface WithKibanaProps { diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts index a4ec5a081304b..48ed3d8889fca 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/services.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { StartPlugins } from '../../../types'; +import type { CoreStart } from '@kbn/core/public'; +import type { StartPlugins } from '../../../types'; type GlobalServices = Pick & Pick; diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts index 5d6744de9dbe3..45107a06122db 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/index.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { METRIC_TYPE, UiCounterMetricType } from '@kbn/analytics'; +import type { UiCounterMetricType } from '@kbn/analytics'; +import { METRIC_TYPE } from '@kbn/analytics'; -import { SetupPlugins } from '../../../types'; +import type { SetupPlugins } from '../../../types'; export { telemetryMiddleware } from './middleware'; export { METRIC_TYPE }; diff --git a/x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts b/x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts index 006e7f840329a..0085cdc999ac7 100644 --- a/x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts +++ b/x-pack/plugins/security_solution/public/common/lib/telemetry/middleware.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Action, Dispatch, MiddlewareAPI } from 'redux'; +import type { Action, Dispatch, MiddlewareAPI } from 'redux'; import { track, METRIC_TYPE, TELEMETRY_EVENT } from '.'; import * as timelineActions from '../../../timelines/store/timeline/actions'; diff --git a/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx b/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx index 3117090a2fe6c..03e5f96b58707 100644 --- a/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx +++ b/x-pack/plugins/security_solution/public/common/lib/triggers_actions_ui/register_alerts_table_configuration.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; import type { AlertsTableConfigurationRegistryContract, GetRenderCellValue, diff --git a/x-pack/plugins/security_solution/public/common/links/app_links.ts b/x-pack/plugins/security_solution/public/common/links/app_links.ts index cd57f94c0407d..02ee79306e764 100644 --- a/x-pack/plugins/security_solution/public/common/links/app_links.ts +++ b/x-pack/plugins/security_solution/public/common/links/app_links.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { AppLinkItems } from './types'; +import type { CoreStart } from '@kbn/core/public'; +import type { AppLinkItems } from './types'; import { links as detectionLinks } from '../../detections/links'; import { links as timelinesLinks } from '../../timelines/links'; import { getCasesLinkItems } from '../../cases/links'; @@ -13,7 +13,7 @@ import { links as managementLinks, getManagementFilteredLinks } from '../../mana import { dashboardsLandingLinks, threatHuntingLandingLinks } from '../../landing_pages/links'; import { gettingStartedLinks } from '../../overview/links'; import { rootLinks as cloudSecurityPostureRootLinks } from '../../cloud_security_posture/links'; -import { StartPlugins } from '../../types'; +import type { StartPlugins } from '../../types'; const casesLinks = getCasesLinkItems(); diff --git a/x-pack/plugins/security_solution/public/common/links/links.test.ts b/x-pack/plugins/security_solution/public/common/links/links.test.ts index 8d9ebda596fba..408078dc12d78 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.test.ts +++ b/x-pack/plugins/security_solution/public/common/links/links.test.ts @@ -6,10 +6,10 @@ */ import { CASES_FEATURE_ID, SecurityPageName, SERVER_APP_ID } from '../../../common/constants'; -import { Capabilities } from '@kbn/core/types'; +import type { Capabilities } from '@kbn/core/types'; import { mockGlobalState, TestProviders } from '../mock'; -import { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; -import { AppLinkItems } from './types'; +import type { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { AppLinkItems } from './types'; import { act, renderHook } from '@testing-library/react-hooks'; import { useAppLinks, diff --git a/x-pack/plugins/security_solution/public/common/links/links.ts b/x-pack/plugins/security_solution/public/common/links/links.ts index de0c5713bf6bf..2aa2a672fc54a 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.ts +++ b/x-pack/plugins/security_solution/public/common/links/links.ts @@ -9,7 +9,7 @@ import type { Capabilities } from '@kbn/core/public'; import { get } from 'lodash'; import { useEffect, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; -import { SecurityPageName } from '../../../common/constants'; +import type { SecurityPageName } from '../../../common/constants'; import type { AppLinkItems, LinkInfo, diff --git a/x-pack/plugins/security_solution/public/common/links/types.ts b/x-pack/plugins/security_solution/public/common/links/types.ts index 323873cafc23c..eae1c700721bc 100644 --- a/x-pack/plugins/security_solution/public/common/links/types.ts +++ b/x-pack/plugins/security_solution/public/common/links/types.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Capabilities } from '@kbn/core/types'; -import { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; -import { IconType } from '@elastic/eui'; -import { ExperimentalFeatures } from '../../../common/experimental_features'; -import { SecurityPageName } from '../../../common/constants'; +import type { Capabilities } from '@kbn/core/types'; +import type { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { IconType } from '@elastic/eui'; +import type { ExperimentalFeatures } from '../../../common/experimental_features'; +import type { SecurityPageName } from '../../../common/constants'; /** * Permissions related parameters needed for the links to be filtered diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx index afa98ef9c7de3..b4987a6080342 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx @@ -5,33 +5,38 @@ * 2.0. */ -import React, { ReactPortal } from 'react'; -import { createMemoryHistory, MemoryHistory } from 'history'; -import { render as reactRender, RenderOptions, RenderResult } from '@testing-library/react'; -import { Action, Reducer, Store } from 'redux'; -import { AppDeepLink } from '@kbn/core/public'; +import type { ReactPortal } from 'react'; +import React from 'react'; +import type { MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; +import type { RenderOptions, RenderResult } from '@testing-library/react'; +import { render as reactRender } from '@testing-library/react'; +import type { Action, Reducer, Store } from 'redux'; +import type { AppDeepLink } from '@kbn/core/public'; import { QueryClient, QueryClientProvider, setLogger } from 'react-query'; import { coreMock } from '@kbn/core/public/mocks'; import { PLUGIN_ID } from '@kbn/fleet-plugin/common'; -import { - renderHook as reactRenderHoook, - RenderHookOptions, - RenderHookResult, -} from '@testing-library/react-hooks'; -import { ReactHooksRenderer, WrapperComponent } from '@testing-library/react-hooks/src/types/react'; +import type { RenderHookOptions, RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook as reactRenderHoook } from '@testing-library/react-hooks'; +import type { + ReactHooksRenderer, + WrapperComponent, +} from '@testing-library/react-hooks/src/types/react'; import type { UseBaseQueryResult } from 'react-query/types/react/types'; import ReactDOM from 'react-dom'; import { ConsoleManager } from '../../../management/components/console'; import type { StartPlugins, StartServices } from '../../../types'; import { depsStartMock } from './dependencies_start_mock'; -import { MiddlewareActionSpyHelper, createSpyMiddleware } from '../../store/test_utils'; +import type { MiddlewareActionSpyHelper } from '../../store/test_utils'; +import { createSpyMiddleware } from '../../store/test_utils'; import { kibanaObservable } from '../test_providers'; -import { createStore, State } from '../../store'; +import type { State } from '../../store'; +import { createStore } from '../../store'; import { AppRootProvider } from './app_root_provider'; import { managementMiddlewareFactory } from '../../../management/store/middleware'; import { createStartServicesMock } from '../../lib/kibana/kibana_react.mock'; import { SUB_PLUGINS_REDUCER, mockGlobalState, createSecuritySolutionStorageMock } from '..'; -import { ExperimentalFeatures } from '../../../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../../../common/experimental_features'; import { APP_UI_ID, APP_PATH } from '../../../../common/constants'; import { KibanaContextProvider, KibanaServices } from '../../lib/kibana'; import { getDeepLinks } from '../../../app/deep_links'; diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx index 83dee8742bef0..f2127e89429b3 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx @@ -5,18 +5,19 @@ * 2.0. */ -import React, { memo, ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo, useMemo } from 'react'; import { Provider } from 'react-redux'; import { I18nProvider } from '@kbn/i18n-react'; import { Router } from 'react-router-dom'; -import { History } from 'history'; +import type { History } from 'history'; import useObservable from 'react-use/lib/useObservable'; -import { Store } from 'redux'; +import type { Store } from 'redux'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { RouteCapture } from '../../components/endpoint/route_capture'; -import { StartPlugins } from '../../../types'; +import type { StartPlugins } from '../../../types'; /** * Provides the context for rendering the endpoint app diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts b/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts index bdc3afbf7a99a..f40bd33f1b3f3 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { FleetStart } from '@kbn/fleet-plugin/public'; -import { dataPluginMock, Start as DataPublicStartMock } from '@kbn/data-plugin/public/mocks'; +import type { FleetStart } from '@kbn/fleet-plugin/public'; +import type { Start as DataPublicStartMock } from '@kbn/data-plugin/public/mocks'; +import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import { fleetMock } from '@kbn/fleet-plugin/public/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index 89f4dab31c750..8c0ffeab6fb78 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -15,7 +15,7 @@ import { NetworkUsersFields, RiskScoreFields, } from '../../../common/search_strategy'; -import { State } from '../store'; +import type { State } from '../store'; import { defaultHeaders } from './header'; import { @@ -30,7 +30,7 @@ import { import { networkModel } from '../../network/store'; import { TimelineType, TimelineStatus, TimelineTabs } from '../../../common/types/timeline'; import { mockManagementState } from '../../management/store/reducer'; -import { ManagementState } from '../../management/types'; +import type { ManagementState } from '../../management/types'; import { initialSourcererState, SourcererScopeName } from '../store/sourcerer/model'; import { allowedExperimentalValues } from '../../../common/experimental_features'; import { getScopePatternListSelection } from '../store/sourcerer/helpers'; diff --git a/x-pack/plugins/security_solution/public/common/mock/header.ts b/x-pack/plugins/security_solution/public/common/mock/header.ts index c9e56d1c6b032..03edc6dd44d4c 100644 --- a/x-pack/plugins/security_solution/public/common/mock/header.ts +++ b/x-pack/plugins/security_solution/public/common/mock/header.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ColumnHeaderOptions } from '../../../common/types'; +import type { ColumnHeaderOptions } from '../../../common/types'; import { defaultColumnHeaderType } from '../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_COLUMN_MIN_WIDTH, diff --git a/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts b/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts index a03976f0f7e76..cc04177139a89 100644 --- a/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts +++ b/x-pack/plugins/security_solution/public/common/mock/index_pattern.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecuritySolutionDataViewBase } from '../types'; +import type { SecuritySolutionDataViewBase } from '../types'; export const mockIndexPattern: SecuritySolutionDataViewBase = { fields: [ diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts b/x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts index 035bdbbceff88..02554cfa83400 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_detail_item.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TimelineEventsDetailsItem } from '../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../common/search_strategy'; export const mockDetailItemDataId = 'Y-6TfmcB0WOhS6qyMv3s'; diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts.ts b/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts.ts index a0bacb94fb19a..7aba743b2e057 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Ecs } from '../../../common/ecs'; -import { TimelineNonEcsData } from '../../../common/search_strategy'; +import type { Ecs } from '../../../common/ecs'; +import type { TimelineNonEcsData } from '../../../common/search_strategy'; export const getDetectionAlertMock = (overrides: Partial = {}): Ecs => ({ ...{ diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts_aad.ts b/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts_aad.ts index 598091da7efbd..d5c18472043b0 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts_aad.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_detection_alerts_aad.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Ecs } from '../../../common/ecs'; +import type { Ecs } from '../../../common/ecs'; export const mockAADEcsDataWithAlert: Ecs = { _id: '1', diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts b/x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts index f44c5c335cd21..547dea1601006 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_ecs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Ecs } from '../../../common/ecs'; +import type { Ecs } from '../../../common/ecs'; export const mockEcsData: Ecs[] = [ { diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts b/x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts index 3400844e671b3..28be68fb6af63 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_endgame_ecs_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Ecs } from '../../../common/ecs'; +import type { Ecs } from '../../../common/ecs'; export const mockEndgameDnsRequest: Ecs = { _id: 'S8jPcG0BOpWiDweSou3g', diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts b/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts index d76140f60fca8..36466231b64a4 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_local_storage.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { IStorage, Storage } from '@kbn/kibana-utils-plugin/public'; +import type { IStorage } from '@kbn/kibana-utils-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; export const localStorageMock = (): IStorage => { let store: Record = {}; diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_timeline_control_columns.tsx b/x-pack/plugins/security_solution/public/common/mock/mock_timeline_control_columns.tsx index 7dae3e671d271..9301f8245b721 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_timeline_control_columns.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/mock_timeline_control_columns.tsx @@ -15,7 +15,7 @@ import { EuiPopoverTitle, EuiSpacer, } from '@elastic/eui'; -import { ControlColumnProps } from '../../../common/types/timeline'; +import type { ControlColumnProps } from '../../../common/types/timeline'; const SelectionHeaderCell = () => { return ( diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts b/x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts index 1cb456a09c634..bcc024ad057fd 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts +++ b/x-pack/plugins/security_solution/public/common/mock/mock_timeline_data.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Ecs } from '../../../common/ecs'; -import { TimelineItem } from '../../../common/search_strategy/timeline'; +import type { Ecs } from '../../../common/ecs'; +import type { TimelineItem } from '../../../common/search_strategy/timeline'; export const mockTimelineData: TimelineItem[] = [ { diff --git a/x-pack/plugins/security_solution/public/common/mock/netflow.ts b/x-pack/plugins/security_solution/public/common/mock/netflow.ts index d9e1ba886cd68..bc7d1c8a0dbd3 100644 --- a/x-pack/plugins/security_solution/public/common/mock/netflow.ts +++ b/x-pack/plugins/security_solution/public/common/mock/netflow.ts @@ -6,7 +6,7 @@ */ import { ONE_MILLISECOND_AS_NANOSECONDS } from '../../timelines/components/formatted_duration/helpers'; -import { Ecs } from '../../../common/ecs'; +import type { Ecs } from '../../../common/ecs'; /** Returns mock data for testing the Netflow component */ export const getMockNetflowData = (): Ecs => ({ diff --git a/x-pack/plugins/security_solution/public/common/mock/news.ts b/x-pack/plugins/security_solution/public/common/mock/news.ts index 50f50531c72a4..a1a9edfe58ed1 100644 --- a/x-pack/plugins/security_solution/public/common/mock/news.ts +++ b/x-pack/plugins/security_solution/public/common/mock/news.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RawNewsApiResponse } from '../components/news_feed/types'; +import type { RawNewsApiResponse } from '../components/news_feed/types'; /** A (typed) sample raw API response from a news feed */ export const rawNewsApiResponse: RawNewsApiResponse = { diff --git a/x-pack/plugins/security_solution/public/common/mock/react_beautiful_dnd.ts b/x-pack/plugins/security_solution/public/common/mock/react_beautiful_dnd.ts index 0ffb9de5bb3e4..7c85a433e1ecf 100644 --- a/x-pack/plugins/security_solution/public/common/mock/react_beautiful_dnd.ts +++ b/x-pack/plugins/security_solution/public/common/mock/react_beautiful_dnd.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { DraggableProvided, DraggableStateSnapshot, DroppableProvided, DroppableStateSnapshot, } from 'react-beautiful-dnd'; -import React from 'react'; +import type React from 'react'; jest.mock('react-beautiful-dnd', () => ({ Droppable: ({ diff --git a/x-pack/plugins/security_solution/public/common/mock/test_providers.tsx b/x-pack/plugins/security_solution/public/common/mock/test_providers.tsx index 255652924d817..41d68949daccb 100644 --- a/x-pack/plugins/security_solution/public/common/mock/test_providers.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/test_providers.tsx @@ -9,22 +9,24 @@ import { euiDarkVars } from '@kbn/ui-theme'; import { I18nProvider } from '@kbn/i18n-react'; import React from 'react'; -import { DragDropContext, DropResult, ResponderProvided } from 'react-beautiful-dnd'; +import type { DropResult, ResponderProvided } from 'react-beautiful-dnd'; +import { DragDropContext } from 'react-beautiful-dnd'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { Store } from 'redux'; +import type { Store } from 'redux'; import { BehaviorSubject } from 'rxjs'; import { ThemeProvider } from 'styled-components'; -import { Capabilities } from '@kbn/core/public'; +import type { Capabilities } from '@kbn/core/public'; import { QueryClient, QueryClientProvider } from 'react-query'; import { ConsoleManager } from '../../management/components/console'; -import { createStore, State } from '../store'; +import type { State } from '../store'; +import { createStore } from '../store'; import { mockGlobalState } from './global_state'; import { createKibanaContextProviderMock, createStartServicesMock, } from '../lib/kibana/kibana_react.mock'; -import { FieldHook } from '../../shared_imports'; +import type { FieldHook } from '../../shared_imports'; import { SUB_PLUGINS_REDUCER } from './utils'; import { createSecuritySolutionStorageMock, localStorageMock } from './mock_local_storage'; import { CASES_FEATURE_ID } from '../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts index ec539d1f1fd0b..93058c3acf2b5 100644 --- a/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts +++ b/x-pack/plugins/security_solution/public/common/mock/timeline_results.ts @@ -7,18 +7,19 @@ import { FilterStateStore } from '@kbn/es-query'; +import type { TimelineResult } from '../../../common/types/timeline'; import { TimelineId, TimelineType, TimelineStatus, TimelineTabs, - TimelineResult, } from '../../../common/types/timeline'; -import { OpenTimelineResult } from '../../timelines/components/open_timeline/types'; -import { Direction, TimelineEventsDetailsItem } from '../../../common/search_strategy'; -import { CreateTimelineProps } from '../../detections/components/alerts_table/types'; -import { TimelineModel } from '../../timelines/store/timeline/model'; +import type { OpenTimelineResult } from '../../timelines/components/open_timeline/types'; +import type { TimelineEventsDetailsItem } from '../../../common/search_strategy'; +import { Direction } from '../../../common/search_strategy'; +import type { CreateTimelineProps } from '../../detections/components/alerts_table/types'; +import type { TimelineModel } from '../../timelines/store/timeline/model'; import { timelineDefaults } from '../../timelines/store/timeline/defaults'; export const mockOpenTimelineQueryResults = { diff --git a/x-pack/plugins/security_solution/public/common/mock/utils.ts b/x-pack/plugins/security_solution/public/common/mock/utils.ts index f405ebd59de9d..aeaf48395dee4 100644 --- a/x-pack/plugins/security_solution/public/common/mock/utils.ts +++ b/x-pack/plugins/security_solution/public/common/mock/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AnyAction, Reducer } from 'redux'; +import type { AnyAction, Reducer } from 'redux'; import reduceReducers from 'reduce-reducers'; import { tGridReducer } from '@kbn/timelines-plugin/public'; @@ -15,10 +15,10 @@ import { networkReducer } from '../../network/store'; import { usersReducer } from '../../users/store'; import { timelineReducer } from '../../timelines/store/timeline/reducer'; import { managementReducer } from '../../management/store/reducer'; -import { ManagementPluginReducer } from '../../management'; -import { SubPluginsInitReducer } from '../store'; +import type { ManagementPluginReducer } from '../../management'; +import type { SubPluginsInitReducer } from '../store'; import { mockGlobalState } from './global_state'; -import { TimelineState } from '../../timelines/store/timeline/types'; +import type { TimelineState } from '../../timelines/store/timeline/types'; import { defaultHeaders } from '../../timelines/components/timeline/body/column_headers/default_headers'; type GlobalThis = typeof globalThis; diff --git a/x-pack/plugins/security_solution/public/common/store/actions.ts b/x-pack/plugins/security_solution/public/common/store/actions.ts index f1d5e51e172ba..2f8d9e9736da5 100644 --- a/x-pack/plugins/security_solution/public/common/store/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/actions.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { EndpointAction } from '../../management/pages/endpoint_hosts/store/action'; -import { PolicyDetailsAction } from '../../management/pages/policy/store/policy_details'; +import type { EndpointAction } from '../../management/pages/endpoint_hosts/store/action'; +import type { PolicyDetailsAction } from '../../management/pages/policy/store/policy_details'; export { appActions } from './app'; export { dragAndDropActions } from './drag_and_drop'; export { inputsActions } from './inputs'; export { sourcererActions } from './sourcerer'; -import { RoutingAction } from './routing'; +import type { RoutingAction } from './routing'; export type AppAction = EndpointAction | RoutingAction | PolicyDetailsAction; diff --git a/x-pack/plugins/security_solution/public/common/store/app/actions.ts b/x-pack/plugins/security_solution/public/common/store/app/actions.ts index a262b053d706c..f37bb264050ef 100644 --- a/x-pack/plugins/security_solution/public/common/store/app/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/app/actions.ts @@ -7,7 +7,7 @@ import actionCreatorFactory from 'typescript-fsa'; -import { Note } from '../../lib/note'; +import type { Note } from '../../lib/note'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/app'); diff --git a/x-pack/plugins/security_solution/public/common/store/app/model.ts b/x-pack/plugins/security_solution/public/common/store/app/model.ts index 2c4ddb703f6a0..69a20da4598b1 100644 --- a/x-pack/plugins/security_solution/public/common/store/app/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/app/model.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExperimentalFeatures } from '../../../../common/experimental_features'; -import { Note } from '../../lib/note'; +import type { ExperimentalFeatures } from '../../../../common/experimental_features'; +import type { Note } from '../../lib/note'; export type ErrorState = ErrorModel; diff --git a/x-pack/plugins/security_solution/public/common/store/app/reducer.ts b/x-pack/plugins/security_solution/public/common/store/app/reducer.ts index df07920526a9f..4ce65c31e090f 100644 --- a/x-pack/plugins/security_solution/public/common/store/app/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/app/reducer.ts @@ -7,10 +7,10 @@ import { reducerWithInitialState } from 'typescript-fsa-reducers'; -import { Note } from '../../lib/note'; +import type { Note } from '../../lib/note'; import { addError, addErrorHash, addNotes, removeError, updateNote } from './actions'; -import { AppModel, NotesById } from './model'; +import type { AppModel, NotesById } from './model'; import { allowedExperimentalValues } from '../../../../common/experimental_features'; export type AppState = AppModel; diff --git a/x-pack/plugins/security_solution/public/common/store/app/selectors.ts b/x-pack/plugins/security_solution/public/common/store/app/selectors.ts index ca0ac060f924f..47df2527f9edd 100644 --- a/x-pack/plugins/security_solution/public/common/store/app/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/app/selectors.ts @@ -8,10 +8,10 @@ import { keys, values } from 'lodash/fp'; import memoizeOne from 'memoize-one'; import { createSelector } from 'reselect'; -import { Note } from '../../lib/note'; -import { ErrorModel, NotesById } from './model'; -import { State } from '../types'; -import { TimelineResultNote } from '../../../timelines/components/open_timeline/types'; +import type { Note } from '../../lib/note'; +import type { ErrorModel, NotesById } from './model'; +import type { State } from '../types'; +import type { TimelineResultNote } from '../../../timelines/components/open_timeline/types'; export const selectNotesById = (state: State): NotesById => state.app.notesById; diff --git a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts index a12ebb5e7bf5b..7fa50acb82bee 100644 --- a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/actions.ts @@ -7,7 +7,7 @@ import actionCreatorFactory from 'typescript-fsa'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/drag_and_drop'); diff --git a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts index 20b06edef68fa..05ea11044fa7d 100644 --- a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/model.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; export interface IdToDataProvider { [id: string]: DataProvider; diff --git a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts index 252a5f6a1c30f..98fb2982416b8 100644 --- a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; import { mockDataProviders } from '../../../timelines/components/timeline/data_providers/mock/mock_data_providers'; -import { IdToDataProvider } from './model'; +import type { IdToDataProvider } from './model'; import { registerProviderHandler, unRegisterProviderHandler } from './reducer'; const dataProviders: IdToDataProvider = mockDataProviders.reduce( diff --git a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts index 03c985ee898d1..e1af99dc02d9c 100644 --- a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/reducer.ts @@ -8,10 +8,10 @@ import { omit } from 'lodash/fp'; import { reducerWithInitialState } from 'typescript-fsa-reducers'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; import { registerProvider, unRegisterProvider } from './actions'; -import { DragAndDropModel, IdToDataProvider } from './model'; +import type { DragAndDropModel, IdToDataProvider } from './model'; export type DragAndDropState = DragAndDropModel; diff --git a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts index a7dbad9ac8aa2..9d53f3caf228a 100644 --- a/x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/drag_and_drop/selectors.ts @@ -6,8 +6,8 @@ */ import { createSelector } from 'reselect'; -import { IdToDataProvider } from './model'; -import { State } from '../types'; +import type { IdToDataProvider } from './model'; +import type { State } from '../types'; const selectDataProviders = (state: State): IdToDataProvider => state.dragAndDrop.dataProviders; diff --git a/x-pack/plugins/security_solution/public/common/store/epic.ts b/x-pack/plugins/security_solution/public/common/store/epic.ts index 7fed6762de377..aa46d31dcf2ec 100644 --- a/x-pack/plugins/security_solution/public/common/store/epic.ts +++ b/x-pack/plugins/security_solution/public/common/store/epic.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { combineEpics, Epic } from 'redux-observable'; -import { Action } from 'redux'; +import type { Epic } from 'redux-observable'; +import { combineEpics } from 'redux-observable'; +import type { Action } from 'redux'; import { createTimelineEpic } from '../../timelines/store/timeline/epic'; import { createTimelineFavoriteEpic } from '../../timelines/store/timeline/epic_favorite'; import { createTimelineNoteEpic } from '../../timelines/store/timeline/epic_note'; import { createTimelinePinnedEventEpic } from '../../timelines/store/timeline/epic_pinned_event'; import { createTimelineLocalStorageEpic } from '../../timelines/store/timeline/epic_local_storage'; -import { TimelineEpicDependencies } from '../../timelines/store/timeline/types'; +import type { TimelineEpicDependencies } from '../../timelines/store/timeline/types'; export const createRootEpic = (): Epic< Action, diff --git a/x-pack/plugins/security_solution/public/common/store/global_url_param/selectors.ts b/x-pack/plugins/security_solution/public/common/store/global_url_param/selectors.ts index 0bff4f0b12d88..8703c43ee0716 100644 --- a/x-pack/plugins/security_solution/public/common/store/global_url_param/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/global_url_param/selectors.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GlobalUrlParam } from '.'; -import { State } from '../types'; +import type { GlobalUrlParam } from '.'; +import type { State } from '../types'; export const selectGlobalUrlParam = (state: State): GlobalUrlParam => state.globalUrlParam; diff --git a/x-pack/plugins/security_solution/public/common/store/index.ts b/x-pack/plugins/security_solution/public/common/store/index.ts index c06002cb8fe2a..c200b9f72c975 100644 --- a/x-pack/plugins/security_solution/public/common/store/index.ts +++ b/x-pack/plugins/security_solution/public/common/store/index.ts @@ -9,11 +9,11 @@ export * from './model'; export * from './reducer'; export * from './selectors'; -import { Middleware, Dispatch } from 'redux'; +import type { Middleware, Dispatch } from 'redux'; import { createStore, getStore } from './store'; -import { ImmutableMiddleware, State } from './types'; -import { AppAction } from './actions'; -import { Immutable } from '../../../common/endpoint/types'; +import type { ImmutableMiddleware, State } from './types'; +import type { AppAction } from './actions'; +import type { Immutable } from '../../../common/endpoint/types'; export { createStore, getStore }; diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts b/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts index ede7e2af44025..c7da78e7ee669 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/actions.ts @@ -9,8 +9,8 @@ import actionCreatorFactory from 'typescript-fsa'; import type { Filter } from '@kbn/es-query'; import type { SavedQuery } from '@kbn/data-plugin/public'; -import { InspectQuery, Refetch, RefetchKql } from './model'; -import { InputsModelId } from './constants'; +import type { InspectQuery, Refetch, RefetchKql } from './model'; +import type { InputsModelId } from './constants'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/inputs'); diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts index c8848e6f7ffc7..0bbf07dc1cf7f 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.test.ts @@ -9,12 +9,11 @@ import { cloneDeep } from 'lodash/fp'; import { mockGlobalState } from '../../mock'; +import type { UpdateQueryParams, SetIsInspectedParams } from './helpers'; import { toggleLockTimeline, updateInputTimerange, upsertQuery, - UpdateQueryParams, - SetIsInspectedParams, setIsInspected, removeGlobalLink, addGlobalLink, @@ -22,7 +21,7 @@ import { addTimelineLink, deleteOneQuery, } from './helpers'; -import { InputsModel, TimeRange } from './model'; +import type { InputsModel, TimeRange } from './model'; describe('Inputs', () => { let state = mockGlobalState.inputs; diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts index d2e350027f905..31706b340e98a 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/helpers.ts @@ -7,8 +7,8 @@ import { get } from 'lodash/fp'; -import { InputsModel, TimeRange, Refetch, RefetchKql, InspectQuery } from './model'; -import { InputsModelId } from './constants'; +import type { InputsModel, TimeRange, Refetch, RefetchKql, InspectQuery } from './model'; +import type { InputsModelId } from './constants'; export const updateInputFullScreen = ( inputId: InputsModelId, diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/model.ts b/x-pack/plugins/security_solution/public/common/store/inputs/model.ts index 66ab38cf77a95..6d4e0d51df556 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/model.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import type { Filter, Query } from '@kbn/es-query'; import type { SavedQuery } from '@kbn/data-plugin/public'; -import { InputsModelId } from './constants'; -import { CONSTANTS } from '../../components/url_state/constants'; +import type { InputsModelId } from './constants'; +import type { CONSTANTS } from '../../components/url_state/constants'; export interface AbsoluteTimeRange { kind: 'absolute'; diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts b/x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts index 848d5adbffc9a..751cd74220cf2 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/reducer.ts @@ -42,7 +42,7 @@ import { deleteOneQuery as helperDeleteOneQuery, updateInputFullScreen, } from './helpers'; -import { InputsModel, TimeRange } from './model'; +import type { InputsModel, TimeRange } from './model'; export type InputsState = InputsModel; diff --git a/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts b/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts index 864a473a82099..cc4e90cf18317 100644 --- a/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/inputs/selectors.ts @@ -8,9 +8,9 @@ import { createSelector } from 'reselect'; import type { Filter, Query } from '@kbn/es-query'; -import { State } from '../types'; +import type { State } from '../types'; -import { InputsModel, InputsRange, GlobalQuery } from './model'; +import type { InputsModel, InputsRange, GlobalQuery } from './model'; const selectInputs = (state: State): InputsModel => state.inputs; diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.test.ts b/x-pack/plugins/security_solution/public/common/store/reducer.test.ts index e46a4a532d701..78745966ed6fb 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.test.ts @@ -6,7 +6,7 @@ */ import { parseExperimentalConfigValue } from '../../../common/experimental_features'; -import { SecuritySubPlugins } from '../../app/types'; +import type { SecuritySubPlugins } from '../../app/types'; import { createInitialState } from './reducer'; import { mockIndexPattern, mockSourcererState } from '../mock'; import { useSourcererDataView } from '../containers/sourcerer'; diff --git a/x-pack/plugins/security_solution/public/common/store/reducer.ts b/x-pack/plugins/security_solution/public/common/store/reducer.ts index 23da338112fc1..66f8a7c453efe 100644 --- a/x-pack/plugins/security_solution/public/common/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/reducer.ts @@ -5,24 +5,26 @@ * 2.0. */ -import { combineReducers, AnyAction, Reducer } from 'redux'; +import type { AnyAction, Reducer } from 'redux'; +import { combineReducers } from 'redux'; import { appReducer, initialAppState } from './app'; import { dragAndDropReducer, initialDragAndDropState } from './drag_and_drop'; import { createInitialInputsState, inputsReducer } from './inputs'; import { sourcererReducer, sourcererModel } from './sourcerer'; -import { HostsPluginReducer } from '../../hosts/store'; -import { NetworkPluginReducer } from '../../network/store'; -import { UsersPluginReducer } from '../../users/store'; -import { TimelinePluginReducer } from '../../timelines/store/timeline'; +import type { HostsPluginReducer } from '../../hosts/store'; +import type { NetworkPluginReducer } from '../../network/store'; +import type { UsersPluginReducer } from '../../users/store'; +import type { TimelinePluginReducer } from '../../timelines/store/timeline'; -import { SecuritySubPlugins } from '../../app/types'; -import { ManagementPluginReducer } from '../../management'; -import { State } from './types'; -import { AppAction } from './actions'; -import { initDataView, SourcererModel, SourcererScopeName } from './sourcerer/model'; -import { ExperimentalFeatures } from '../../../common/experimental_features'; +import type { SecuritySubPlugins } from '../../app/types'; +import type { ManagementPluginReducer } from '../../management'; +import type { State } from './types'; +import type { AppAction } from './actions'; +import type { SourcererModel } from './sourcerer/model'; +import { initDataView, SourcererScopeName } from './sourcerer/model'; +import type { ExperimentalFeatures } from '../../../common/experimental_features'; import { getScopePatternListSelection } from './sourcerer/helpers'; import { globalUrlParamReducer, initialGlobalUrlParam } from './global_url_param'; diff --git a/x-pack/plugins/security_solution/public/common/store/routing/action.ts b/x-pack/plugins/security_solution/public/common/store/routing/action.ts index 87f62935e938a..2f83ccddc058a 100644 --- a/x-pack/plugins/security_solution/public/common/store/routing/action.ts +++ b/x-pack/plugins/security_solution/public/common/store/routing/action.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AppLocation, Immutable } from '../../../../common/endpoint/types'; +import type { AppLocation, Immutable } from '../../../../common/endpoint/types'; export interface UserChangedUrl { readonly type: 'userChangedUrl'; diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts index 7517e345c0c9a..2abd8a7a50919 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/actions.ts @@ -7,8 +7,13 @@ import actionCreatorFactory from 'typescript-fsa'; -import { KibanaDataView, SelectedDataView, SourcererDataView, SourcererScopeName } from './model'; -import { SecurityDataView } from '../../containers/sourcerer/api'; +import type { + KibanaDataView, + SelectedDataView, + SourcererDataView, + SourcererScopeName, +} from './model'; +import type { SecurityDataView } from '../../containers/sourcerer/api'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/sourcerer'); diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts index b8e5ebbdc9ab0..db766c7e6b65d 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/helpers.ts @@ -6,9 +6,10 @@ */ import { isEmpty } from 'lodash'; -import { SourcererDataView, SourcererModel, SourcererScopeById, SourcererScopeName } from './model'; -import { SelectedDataViewPayload } from './actions'; -import { sourcererModel } from '../model'; +import type { SourcererDataView, SourcererModel, SourcererScopeById } from './model'; +import { SourcererScopeName } from './model'; +import type { SelectedDataViewPayload } from './actions'; +import type { sourcererModel } from '../model'; export const sortWithExcludesAtEnd = (indices: string[]) => { const allSorted = indices.reduce( diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts index efc848d3e76f1..3b35db56f4d0b 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts @@ -5,15 +5,14 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { BrowserFields, DocValueFields } from '@kbn/timelines-plugin/common'; import { - BrowserFields, - DocValueFields, EMPTY_BROWSER_FIELDS, EMPTY_DOCVALUE_FIELD, EMPTY_INDEX_FIELDS, } from '@kbn/timelines-plugin/common'; -import { SecuritySolutionDataViewBase } from '../../types'; +import type { SecuritySolutionDataViewBase } from '../../types'; /** Uniquely identifies a Sourcerer Scope */ export enum SourcererScopeName { default = 'default', diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts index d7a402849212b..dc084956bcad8 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/reducer.ts @@ -16,7 +16,8 @@ import { setDataViewLoading, updateSourcererDataViews, } from './actions'; -import { initDataView, initialSourcererState, SourcererModel, SourcererScopeName } from './model'; +import type { SourcererModel } from './model'; +import { initDataView, initialSourcererState, SourcererScopeName } from './model'; import { validateSelectedPatterns } from './helpers'; export type SourcererState = SourcererModel; diff --git a/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts b/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts index 8c0b1ecf6f627..29ab145597ee9 100644 --- a/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts +++ b/x-pack/plugins/security_solution/public/common/store/sourcerer/selectors.ts @@ -6,8 +6,8 @@ */ import { createSelector } from 'reselect'; -import { State } from '../types'; -import { +import type { State } from '../types'; +import type { SourcererDataView, SourcererModel, SourcererScope, diff --git a/x-pack/plugins/security_solution/public/common/store/store.ts b/x-pack/plugins/security_solution/public/common/store/store.ts index 02bee6595b1e1..aa6afe88e0fe0 100644 --- a/x-pack/plugins/security_solution/public/common/store/store.ts +++ b/x-pack/plugins/security_solution/public/common/store/store.ts @@ -5,33 +5,25 @@ * 2.0. */ -import { - Action, - applyMiddleware, - compose, - createStore as createReduxStore, - Store, - Middleware, - Dispatch, - PreloadedState, - CombinedState, -} from 'redux'; +import type { Action, Store, Middleware, Dispatch, PreloadedState, CombinedState } from 'redux'; +import { applyMiddleware, compose, createStore as createReduxStore } from 'redux'; import { createEpicMiddleware } from 'redux-observable'; -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { CoreStart } from '@kbn/core/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; import { telemetryMiddleware } from '../lib/telemetry'; import { appSelectors } from './app'; import { timelineSelectors } from '../../timelines/store/timeline'; import { inputsSelectors } from './inputs'; -import { SubPluginsInitReducer, createReducer } from './reducer'; +import type { SubPluginsInitReducer } from './reducer'; +import { createReducer } from './reducer'; import { createRootEpic } from './epic'; -import { AppAction } from './actions'; -import { Immutable } from '../../../common/endpoint/types'; -import { State } from './types'; -import { TimelineEpicDependencies } from '../../timelines/store/timeline/types'; +import type { AppAction } from './actions'; +import type { Immutable } from '../../../common/endpoint/types'; +import type { State } from './types'; +import type { TimelineEpicDependencies } from '../../timelines/store/timeline/types'; type ComposeType = typeof compose; declare global { diff --git a/x-pack/plugins/security_solution/public/common/store/test_utils.ts b/x-pack/plugins/security_solution/public/common/store/test_utils.ts index 21c8e6c15f826..92b9cce2a4e1f 100644 --- a/x-pack/plugins/security_solution/public/common/store/test_utils.ts +++ b/x-pack/plugins/security_solution/public/common/store/test_utils.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Dispatch } from 'redux'; -import { State, ImmutableMiddlewareFactory } from './types'; -import { AppAction } from './actions'; +import type { Dispatch } from 'redux'; +import type { State, ImmutableMiddlewareFactory } from './types'; +import type { AppAction } from './actions'; interface WaitForActionOptions { validate?: (action: A extends { type: T } ? A : never) => boolean; diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index 491877830034e..544bdb765e090 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -5,22 +5,22 @@ * 2.0. */ -import { Dispatch, Action, Middleware, CombinedState } from 'redux'; +import type { Dispatch, Action, Middleware, CombinedState } from 'redux'; -import { CoreStart } from '@kbn/core/public'; -import { StartPlugins } from '../../types'; -import { AppAction } from './actions'; -import { Immutable } from '../../../common/endpoint/types'; -import { AppState } from './app/reducer'; -import { InputsState } from './inputs/reducer'; -import { SourcererState } from './sourcerer/reducer'; -import { HostsPluginState } from '../../hosts/store'; -import { DragAndDropState } from './drag_and_drop/reducer'; -import { TimelinePluginState } from '../../timelines/store/timeline'; -import { NetworkPluginState } from '../../network/store'; -import { ManagementPluginState } from '../../management'; -import { UsersPluginState } from '../../users/store'; -import { GlobalUrlParam } from './global_url_param'; +import type { CoreStart } from '@kbn/core/public'; +import type { StartPlugins } from '../../types'; +import type { AppAction } from './actions'; +import type { Immutable } from '../../../common/endpoint/types'; +import type { AppState } from './app/reducer'; +import type { InputsState } from './inputs/reducer'; +import type { SourcererState } from './sourcerer/reducer'; +import type { HostsPluginState } from '../../hosts/store'; +import type { DragAndDropState } from './drag_and_drop/reducer'; +import type { TimelinePluginState } from '../../timelines/store/timeline'; +import type { NetworkPluginState } from '../../network/store'; +import type { ManagementPluginState } from '../../management'; +import type { UsersPluginState } from '../../users/store'; +import type { GlobalUrlParam } from './global_url_param'; export type StoreState = HostsPluginState & UsersPluginState & diff --git a/x-pack/plugins/security_solution/public/common/types.ts b/x-pack/plugins/security_solution/public/common/types.ts index 1e0391b99c5be..0cf2b989f2006 100644 --- a/x-pack/plugins/security_solution/public/common/types.ts +++ b/x-pack/plugins/security_solution/public/common/types.ts @@ -6,9 +6,9 @@ */ // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ResponseErrorAttributes } from '@kbn/core/server'; +import type { ResponseErrorAttributes } from '@kbn/core/server'; import type { DataViewBase } from '@kbn/es-query'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; export interface ServerApiError { statusCode: number; diff --git a/x-pack/plugins/security_solution/public/common/utils/alerts.ts b/x-pack/plugins/security_solution/public/common/utils/alerts.ts index b8843f447627d..9c56725369ce0 100644 --- a/x-pack/plugins/security_solution/public/common/utils/alerts.ts +++ b/x-pack/plugins/security_solution/public/common/utils/alerts.ts @@ -7,7 +7,7 @@ import { merge } from '@kbn/std'; import { isPlainObject } from 'lodash'; -import { Ecs } from '@kbn/cases-plugin/common'; +import type { Ecs } from '@kbn/cases-plugin/common'; // TODO we need to allow -> docValueFields: [{ field: "@timestamp" }], export const buildAlertsQuery = (alertIds: string[]) => { diff --git a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts index d24de08051115..c6158a9c72fd7 100644 --- a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts @@ -6,8 +6,8 @@ */ import { cloneHttpFetchQuery } from './clone_http_fetch_query'; -import { HttpFetchQuery } from '@kbn/core/public'; -import { Immutable } from '../../../common/endpoint/types'; +import type { HttpFetchQuery } from '@kbn/core/public'; +import type { Immutable } from '../../../common/endpoint/types'; describe('cloneHttpFetchQuery', () => { it('can clone complex queries', () => { diff --git a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts index 0f230e3b72f95..8e827fa6157b9 100644 --- a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts +++ b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HttpFetchQuery } from '@kbn/core/public'; -import { Immutable } from '../../../common/endpoint/types'; +import type { HttpFetchQuery } from '@kbn/core/public'; +import type { Immutable } from '../../../common/endpoint/types'; export function cloneHttpFetchQuery(query: Immutable): HttpFetchQuery { const clone: HttpFetchQuery = {}; diff --git a/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts index 2963594791304..5e60408216028 100644 --- a/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.test.ts @@ -7,11 +7,10 @@ import moment from 'moment'; +import type { DefaultTimeRangeSetting, DefaultIntervalSetting } from './default_date_settings'; import { getTimeRangeSettings, getIntervalSettings, - DefaultTimeRangeSetting, - DefaultIntervalSetting, parseDateWithDefault, } from './default_date_settings'; import { @@ -24,7 +23,7 @@ import { DEFAULT_INTERVAL_TYPE, } from '../../../common/constants'; import { KibanaServices } from '../lib/kibana'; -import { Policy } from '../store/inputs/model'; +import type { Policy } from '../store/inputs/model'; // Change the constants to be static values so we can test against those instead of // relative sliding date times. Jest cannot access these outer scoped variables so diff --git a/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts index 3743560698378..b762cabd3467f 100644 --- a/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts +++ b/x-pack/plugins/security_solution/public/common/utils/default_date_settings.ts @@ -18,7 +18,7 @@ import { DEFAULT_INTERVAL_VALUE, } from '../../../common/constants'; import { KibanaServices } from '../lib/kibana'; -import { Policy } from '../store/inputs/model'; +import type { Policy } from '../store/inputs/model'; interface DefaultTimeRange { from?: string | null; diff --git a/x-pack/plugins/security_solution/public/common/utils/endpoint_alert_check.test.ts b/x-pack/plugins/security_solution/public/common/utils/endpoint_alert_check.test.ts index 728fe41f0ba7b..c6e29cca6a24c 100644 --- a/x-pack/plugins/security_solution/public/common/utils/endpoint_alert_check.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/endpoint_alert_check.test.ts @@ -6,7 +6,7 @@ */ import _ from 'lodash'; -import { Ecs } from '../../../common/ecs'; +import type { Ecs } from '../../../common/ecs'; import { generateMockDetailItemData } from '../mock'; import { isAlertFromEndpointAlert, isAlertFromEndpointEvent } from './endpoint_alert_check'; diff --git a/x-pack/plugins/security_solution/public/common/utils/exception_list_items/mappers.ts b/x-pack/plugins/security_solution/public/common/utils/exception_list_items/mappers.ts index bfd844caad1b4..fa2af605eabfa 100644 --- a/x-pack/plugins/security_solution/public/common/utils/exception_list_items/mappers.ts +++ b/x-pack/plugins/security_solution/public/common/utils/exception_list_items/mappers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { EntriesArray, EntryMatch, EntryMatchAny, @@ -13,9 +13,10 @@ import { EntryNested, NestedEntriesArray, } from '@kbn/securitysolution-io-ts-list-types'; -import { AllConditionEntryFields, EntryFieldType, EntryTypes } from '@kbn/securitysolution-utils'; +import type { AllConditionEntryFields, EntryTypes } from '@kbn/securitysolution-utils'; +import { EntryFieldType } from '@kbn/securitysolution-utils'; -import { ConditionEntriesMap, ConditionEntry } from '../../../../common/endpoint/types'; +import type { ConditionEntriesMap, ConditionEntry } from '../../../../common/endpoint/types'; const OPERATOR_VALUE = 'included'; diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx index 8ba1a78d98fcf..891f3445739a8 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx @@ -13,7 +13,8 @@ import { useSyncGlobalQueryString, useUpdateUrlParam, } from '.'; -import { GlobalUrlParam, globalUrlParamActions } from '../../store/global_url_param'; +import type { GlobalUrlParam } from '../../store/global_url_param'; +import { globalUrlParamActions } from '../../store/global_url_param'; import { mockHistory } from '../route/mocks'; import { createSecuritySolutionStorageMock, @@ -23,7 +24,7 @@ import { TestProviders, } from '../../mock'; import { createStore } from '../../store'; -import { LinkInfo } from '../../links'; +import type { LinkInfo } from '../../links'; import { SecurityPageName } from '../../../app/types'; const mockDispatch = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts index 4d2b266f9622a..cdaffb00af9e2 100644 --- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts +++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import * as H from 'history'; -import { parse, ParsedQuery, stringify } from 'query-string'; +import type * as H from 'history'; +import type { ParsedQuery } from 'query-string'; +import { parse, stringify } from 'query-string'; import { useCallback, useEffect, useMemo } from 'react'; import { url } from '@kbn/kibana-utils-plugin/public'; diff --git a/x-pack/plugins/security_solution/public/common/utils/privileges/index.ts b/x-pack/plugins/security_solution/public/common/utils/privileges/index.ts index 13d288a639695..de8ad087f27e6 100644 --- a/x-pack/plugins/security_solution/public/common/utils/privileges/index.ts +++ b/x-pack/plugins/security_solution/public/common/utils/privileges/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Rule } from '../../../detections/containers/detection_engine/rules'; +import type { Rule } from '../../../detections/containers/detection_engine/rules'; import * as i18n from '../../../detections/pages/detection_engine/rules/translations'; import { isMlRule } from '../../../../common/machine_learning/helpers'; import * as detectionI18n from '../../../detections/pages/detection_engine/translations'; diff --git a/x-pack/plugins/security_solution/public/common/utils/route/helpers.ts b/x-pack/plugins/security_solution/public/common/utils/route/helpers.ts index 9e4740b6f4adf..9d676ff47734d 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/helpers.ts +++ b/x-pack/plugins/security_solution/public/common/utils/route/helpers.ts @@ -6,10 +6,11 @@ */ import { noop } from 'lodash/fp'; -import { createContext, Dispatch } from 'react'; +import type { Dispatch } from 'react'; +import { createContext } from 'react'; import { SecurityPageName } from '../../../app/types'; -import { RouteSpyState, RouteSpyAction } from './types'; +import type { RouteSpyState, RouteSpyAction } from './types'; export const initRouteSpy: RouteSpyState = { pageName: SecurityPageName.noPage, diff --git a/x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx b/x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx index 866cf002f63bb..34a95b7ac05d9 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/route/manage_spy_routes.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { FC, memo, useReducer } from 'react'; +import type { FC } from 'react'; +import React, { memo, useReducer } from 'react'; -import { ManageRoutesSpyProps, RouteSpyState, RouteSpyAction } from './types'; +import type { ManageRoutesSpyProps, RouteSpyState, RouteSpyAction } from './types'; import { RouterSpyStateContext, initRouteSpy } from './helpers'; const ManageRoutesSpyComponent: FC = ({ children }) => { diff --git a/x-pack/plugins/security_solution/public/common/utils/route/mocks.ts b/x-pack/plugins/security_solution/public/common/utils/route/mocks.ts index a904c4485aaa3..1a6d4149ddfdf 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/mocks.ts +++ b/x-pack/plugins/security_solution/public/common/utils/route/mocks.ts @@ -6,7 +6,7 @@ */ import { SecurityPageName } from '../../../app/types'; -import { RouteSpyState } from './types'; +import type { RouteSpyState } from './types'; type Action = 'PUSH' | 'POP' | 'REPLACE'; diff --git a/x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx b/x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx index 12ae848a59efa..21436ea9e6120 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/route/spy_routes.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import * as H from 'history'; +import type * as H from 'history'; import { memo, useEffect, useState } from 'react'; import { withRouter } from 'react-router-dom'; import deepEqual from 'fast-deep-equal'; -import { SpyRouteProps } from './types'; +import type { SpyRouteProps } from './types'; import { useRouteSpy } from './use_route_spy'; import { SecurityPageName } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/utils/route/types.ts b/x-pack/plugins/security_solution/public/common/utils/route/types.ts index 7cab113eadf0b..ca7c809a63a60 100644 --- a/x-pack/plugins/security_solution/public/common/utils/route/types.ts +++ b/x-pack/plugins/security_solution/public/common/utils/route/types.ts @@ -5,18 +5,18 @@ * 2.0. */ -import * as H from 'history'; -import React from 'react'; -import { RouteComponentProps } from 'react-router-dom'; +import type * as H from 'history'; +import type React from 'react'; +import type { RouteComponentProps } from 'react-router-dom'; -import { TimelineType } from '../../../../common/types/timeline'; +import type { TimelineType } from '../../../../common/types/timeline'; -import { HostsTableType } from '../../../hosts/store/model'; -import { NetworkRouteType } from '../../../network/pages/navigation/types'; -import { AdministrationSubTab as AdministrationType } from '../../../management/types'; -import { FlowTarget } from '../../../../common/search_strategy'; -import { UsersTableType } from '../../../users/store/model'; -import { SecurityPageName } from '../../../app/types'; +import type { HostsTableType } from '../../../hosts/store/model'; +import type { NetworkRouteType } from '../../../network/pages/navigation/types'; +import type { AdministrationSubTab as AdministrationType } from '../../../management/types'; +import type { FlowTarget } from '../../../../common/search_strategy'; +import type { UsersTableType } from '../../../users/store/model'; +import type { SecurityPageName } from '../../../app/types'; export type SiemRouteType = | HostsTableType diff --git a/x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx b/x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx index 46a3a86a47924..61dbe5fafac9d 100644 --- a/x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/saved_query_services/index.tsx @@ -6,7 +6,8 @@ */ import { useState, useEffect } from 'react'; -import { SavedQueryService, createSavedQueryService } from '@kbn/data-plugin/public'; +import type { SavedQueryService } from '@kbn/data-plugin/public'; +import { createSavedQueryService } from '@kbn/data-plugin/public'; import { useKibana } from '../../lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/common/utils/timeline/use_timeline_click.tsx b/x-pack/plugins/security_solution/public/common/utils/timeline/use_timeline_click.tsx index 826ac7c32b7b0..2b0bb060d7d9b 100644 --- a/x-pack/plugins/security_solution/public/common/utils/timeline/use_timeline_click.tsx +++ b/x-pack/plugins/security_solution/public/common/utils/timeline/use_timeline_click.tsx @@ -11,7 +11,7 @@ import { dispatchUpdateTimeline, queryTimelineById, } from '../../../timelines/components/open_timeline/helpers'; -import { TimelineErrorCallback } from '../../../timelines/components/open_timeline/types'; +import type { TimelineErrorCallback } from '../../../timelines/components/open_timeline/types'; import { updateIsLoading as dispatchUpdateIsLoading } from '../../../timelines/store/timeline/actions'; export const useTimelineClick = () => { diff --git a/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.test.ts b/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.test.ts index 2e96d56c3625f..35b5bbf6d96c0 100644 --- a/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.test.ts @@ -6,7 +6,7 @@ */ import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { HostMetadata } from '../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../common/endpoint/types'; import { isEndpointHostIsolated } from './is_endpoint_host_isolated'; describe('When using isEndpointHostIsolated()', () => { diff --git a/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.ts b/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.ts index c22f33d524029..bcf9d8759a1c6 100644 --- a/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.ts +++ b/x-pack/plugins/security_solution/public/common/utils/validators/is_endpoint_host_isolated.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostMetadata } from '../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../common/endpoint/types'; /** * Given an endpoint host metadata record (`HostMetadata`), this utility will validate if diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_info/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_info/index.tsx index c4f50325a3421..e4da679fed8f1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_info/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_info/index.tsx @@ -11,7 +11,7 @@ import React, { useState, useEffect } from 'react'; import { useQueryAlerts } from '../../containers/detection_engine/alerts/use_query'; import { buildLastAlertsQuery } from './query.dsl'; -import { Aggs } from './types'; +import type { Aggs } from './types'; interface AlertInfo { ruleId?: string | null; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.test.tsx index 4fce0361d5d13..3fae45e1e0086 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.test.tsx @@ -9,11 +9,11 @@ import React from 'react'; import { shallow, mount } from 'enzyme'; import { AlertsCount } from './alerts_count'; -import { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; +import type { AlertSearchResponse } from '../../../containers/detection_engine/alerts/types'; import { TestProviders } from '../../../../common/mock'; import { DragDropContextWrapper } from '../../../../common/components/drag_and_drop/drag_drop_context_wrapper'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; -import { AlertsCountAggregation } from './types'; +import type { AlertsCountAggregation } from './types'; jest.mock('../../../../common/lib/kibana'); const mockDispatch = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx index 764a13c17ce84..730ae0405c722 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiProgress, EuiBasicTableColumn, EuiInMemoryTable } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiProgress, EuiInMemoryTable } from '@elastic/eui'; import React, { memo, useMemo } from 'react'; import styled from 'styled-components'; import numeral from '@elastic/numeral'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx index 141df7a154c94..509053e8244fe 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../common/constants'; export const getAlertsCountQuery = ( diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx index 482c05b327f54..d70b77a16521a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; import React, { memo, useMemo, useState, useEffect, useCallback } from 'react'; import uuid from 'uuid'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx index 222a0da18c3f7..c2c712c718762 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/alerts_histogram.tsx @@ -5,23 +5,17 @@ * 2.0. */ -import { - Axis, - Chart, - HistogramBarSeries, - Position, - Settings, - ChartSizeArray, - ScaleType, -} from '@elastic/charts'; +import type { ChartSizeArray } from '@elastic/charts'; +import { Axis, Chart, HistogramBarSeries, Position, Settings, ScaleType } from '@elastic/charts'; import { EuiFlexGroup, EuiFlexItem, EuiProgress } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { useTheme, UpdateDateRange, ChartData } from '../../../../common/components/charts/common'; +import type { UpdateDateRange, ChartData } from '../../../../common/components/charts/common'; +import { useTheme } from '../../../../common/components/charts/common'; import { histogramDateTimeFormatter } from '../../../../common/components/utils'; import { hasValueToDisplay } from '../../../../common/utils/validators'; import { DraggableLegend } from '../../../../common/components/charts/draggable_legend'; -import { LegendItem } from '../../../../common/components/charts/draggable_legend_item'; +import type { LegendItem } from '../../../../common/components/charts/draggable_legend_item'; import { EMPTY_VALUE_LABEL } from '../../../../common/components/charts/translation'; import type { HistogramData } from './types'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/helpers.tsx index a20a3e1c37e83..8c0cc73bac5a4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/helpers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isEmpty } from 'lodash/fp'; import moment from 'moment'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx index e83a0f0da5bcc..c8ab450bb6f04 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_histogram_panel/index.tsx @@ -5,16 +5,18 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/types'; import type { Position } from '@elastic/charts'; -import { EuiFlexGroup, EuiFlexItem, EuiTitleSize } from '@elastic/eui'; +import type { EuiTitleSize } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import numeral from '@elastic/numeral'; import React, { memo, useCallback, useMemo, useState, useEffect } from 'react'; import styled from 'styled-components'; import { isEmpty } from 'lodash/fp'; import uuid from 'uuid'; -import { Filter, buildEsQuery, Query } from '@kbn/es-query'; +import type { Filter, Query } from '@kbn/es-query'; +import { buildEsQuery } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { DEFAULT_NUMBER_FORMAT, APP_UI_ID } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx index 064798040fb8b..24ba801ed0338 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.test.tsx @@ -7,12 +7,8 @@ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; -import { - getAggregatableFields, - useInspectButton, - UseInspectButtonParams, - useStackByFields, -} from './hooks'; +import type { UseInspectButtonParams } from './hooks'; +import { getAggregatableFields, useInspectButton, useStackByFields } from './hooks'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { TestProviders } from '../../../../common/mock'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx index 387e464310ca8..4d60d3968577c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.test.tsx @@ -8,7 +8,7 @@ import sinon from 'sinon'; import moment from 'moment'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { sendAlertToTimelineAction, determineToAndFrom } from './actions'; import { @@ -19,8 +19,8 @@ import { mockTimelineResult, mockAADEcsDataWithAlert, } from '../../../common/mock'; -import { CreateTimeline, UpdateTimelineLoading } from './types'; -import { Ecs } from '../../../../common/ecs'; +import type { CreateTimeline, UpdateTimelineLoading } from './types'; +import type { Ecs } from '../../../../common/ecs'; import { TimelineId, TimelineType, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx index 36c31d01c8256..e45232ef56791 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx @@ -13,7 +13,8 @@ import moment from 'moment'; import dateMath from '@kbn/datemath'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { FilterStateStore, Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { @@ -23,7 +24,7 @@ import { ALERT_RULE_PARAMETERS, } from '@kbn/rule-data-utils'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { buildExceptionFilter } from '@kbn/securitysolution-list-utils'; import { lastValueFrom } from 'rxjs'; @@ -33,26 +34,22 @@ import { ALERT_RULE_TIMELINE_ID, ALERT_THRESHOLD_RESULT, } from '../../../../common/field_maps/field_names'; -import { - TimelineId, - TimelineResult, - TimelineStatus, - TimelineType, -} from '../../../../common/types/timeline'; +import type { TimelineResult } from '../../../../common/types/timeline'; +import { TimelineId, TimelineStatus, TimelineType } from '../../../../common/types/timeline'; import { updateAlertStatus } from '../../containers/detection_engine/alerts/api'; -import { +import type { SendAlertToTimelineActionProps, ThresholdAggregationData, UpdateAlertStatusActionProps, CreateTimelineProps, } from './types'; -import { Ecs } from '../../../../common/ecs'; -import { +import type { Ecs } from '../../../../common/ecs'; +import type { TimelineEventsDetailsItem, TimelineEventsDetailsRequestOptions, TimelineEventsDetailsStrategyResponse, - TimelineEventsQueries, } from '../../../../common/search_strategy/timeline'; +import { TimelineEventsQueries } from '../../../../common/search_strategy/timeline'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; import { omitTypenameInTimeline, @@ -65,7 +62,7 @@ import { replaceTemplateFieldFromMatchFilters, replaceTemplateFieldFromDataProviders, } from './helpers'; -import { +import type { DataProvider, QueryOperator, } from '../../../timelines/components/timeline/data_providers/data_provider'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_filter_group/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_filter_group/index.tsx index 8304bffefb8d0..1444e419f1ffa 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_filter_group/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_filter_group/index.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; +import { EuiButtonGroup } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import * as i18n from '../translations'; export const FILTER_OPEN: Status = 'open'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.test.tsx index a9a0875a6f29a..f4372631cf0f4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.test.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { shallow, mount } from 'enzyme'; -import { AlertsUtilityBar, AlertsUtilityBarProps } from '.'; +import type { AlertsUtilityBarProps } from '.'; +import { AlertsUtilityBar } from '.'; import { TestProviders } from '../../../../common/mock/test_providers'; jest.useFakeTimers(); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.tsx index a2c9ddc27fbb6..91425ab90e60b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/alerts_utility_bar/index.tsx @@ -12,7 +12,7 @@ import numeral from '@elastic/numeral'; import { EuiFlexGroup, EuiFlexItem, EuiCheckbox } from '@elastic/eui'; import styled from 'styled-components'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import { Link } from '../../../../common/components/link_icon'; import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; import { @@ -25,8 +25,8 @@ import { } from '../../../../common/components/utility_bar'; import * as i18n from './translations'; import { useUiSetting$ } from '../../../../common/lib/kibana'; -import { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; -import { UpdateAlertsStatus } from '../types'; +import type { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; +import type { UpdateAlertsStatus } from '../types'; import { FILTER_CLOSED, FILTER_ACKNOWLEDGED, FILTER_OPEN } from '../alerts_filter_group'; export interface AlertsUtilityBarProps { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.test.tsx index 73d12f461f351..8807ccf0388d2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ExistsFilter, Filter } from '@kbn/es-query'; +import type { ExistsFilter, Filter } from '@kbn/es-query'; import { buildAlertsFilter, buildAlertStatusesFilter, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx index 34e189884c191..f1a52ac7b6997 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/default_config.tsx @@ -13,8 +13,8 @@ import { import type { Filter } from '@kbn/es-query'; import { RowRendererId } from '../../../../common/types/timeline'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; -import { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { SubsetTimelineModel } from '../../../timelines/store/timeline/model'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; import { columns, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.test.ts index 11c25e4d3c9ea..9e2d2eb959194 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.test.ts @@ -6,11 +6,10 @@ */ import { TimelineType } from '../../../../common/types/timeline'; -import { Filter, FilterStateStore } from '@kbn/es-query'; -import { - DataProvider, - DataProviderType, -} from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import { DataProviderType } from '../../../timelines/components/timeline/data_providers/data_provider'; import { mockDataProviders } from '../../../timelines/components/timeline/data_providers/mock/mock_data_providers'; import { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.ts index 37edd3ecab3e5..9448ed6c0f99b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/helpers.ts @@ -7,15 +7,16 @@ import { isEmpty } from 'lodash/fp'; -import { Filter, FilterStateStore, KueryNode, fromKueryExpression } from '@kbn/es-query'; +import type { Filter, KueryNode } from '@kbn/es-query'; +import { FilterStateStore, fromKueryExpression } from '@kbn/es-query'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { TimelineType } from '../../../../common/types/timeline'; -import { +import type { DataProvider, - DataProviderType, DataProvidersAnd, } from '../../../timelines/components/timeline/data_providers/data_provider'; +import { DataProviderType } from '../../../timelines/components/timeline/data_providers/data_provider'; interface FindValueToChangeInQuery { field: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index 61199141c5ece..9c11f4499db95 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -7,12 +7,13 @@ import { isEmpty } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; +import type { Dispatch } from 'redux'; import type { Filter } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; -import { RowRendererId, TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { RowRendererId, TimelineIdLiteral } from '../../../../common/types/timeline'; import { StatefulEventsViewer } from '../../../common/components/events_viewer'; import { displayErrorToast, @@ -25,7 +26,8 @@ import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_exper import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { defaultCellActions } from '../../../common/lib/cell_actions/default_cell_actions'; import { useKibana } from '../../../common/lib/kibana'; -import { inputsModel, inputsSelectors, State } from '../../../common/store'; +import type { inputsModel, State } from '../../../common/store'; +import { inputsSelectors } from '../../../common/store'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; import * as i18nCommon from '../../../common/translations'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../../../timelines/components/timeline/body/constants'; @@ -34,7 +36,7 @@ import { defaultRowRenderers } from '../../../timelines/components/timeline/body import { combineQueries } from '../../../timelines/components/timeline/helpers'; import { timelineActions, timelineSelectors } from '../../../timelines/store/timeline'; import { timelineDefaults } from '../../../timelines/store/timeline/defaults'; -import { TimelineModel } from '../../../timelines/store/timeline/model'; +import type { TimelineModel } from '../../../timelines/store/timeline/model'; import { columns, RenderCellValue } from '../../configurations/security_solution_detections'; import { updateAlertStatusAction } from './actions'; import { AditionalFiltersAction, AlertsUtilityBar } from './alerts_utility_bar'; @@ -45,7 +47,7 @@ import { } from './default_config'; import { buildTimeRangeFilter } from './helpers'; import * as i18n from './translations'; -import { +import type { SetEventsDeletedProps, SetEventsLoadingProps, UpdateAlertsStatusCallback, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx index 3f6668b6e1e23..919c9a3a58892 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.test.tsx @@ -10,7 +10,7 @@ import { AlertContextMenu } from './alert_context_menu'; import { TimelineId } from '../../../../../common/types'; import { TestProviders } from '../../../../common/mock'; import React from 'react'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { mockTimelines } from '../../../../common/mock/mock_timelines_plugin'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { initialUserPrivilegesState as mockInitialUserPrivilegesState } from '../../../../common/components/user_privileges/user_privileges_context'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx index efc4666b7bd61..6982f75d6d6a7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx @@ -9,8 +9,9 @@ import React, { useCallback, useMemo, useState } from 'react'; import { EuiButtonIcon, EuiContextMenuPanel, EuiPopover, EuiToolTip } from '@elastic/eui'; import { indexOf } from 'lodash'; -import { connect, ConnectedProps } from 'react-redux'; -import { ExceptionListType } from '@kbn/securitysolution-io-ts-list-types'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; +import type { ExceptionListType } from '@kbn/securitysolution-io-ts-list-types'; import { get } from 'lodash/fp'; import { DEFAULT_ACTION_BUTTON_WIDTH } from '@kbn/timelines-plugin/public'; import { useOsqueryContextActionItem } from '../../osquery/use_osquery_context_action_item'; @@ -19,15 +20,14 @@ import { useRouteSpy } from '../../../../common/utils/route/use_route_spy'; import { buildGetAlertByIdQuery } from '../../../../common/components/exceptions/helpers'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; import { EventsTdContent } from '../../../../timelines/components/timeline/styles'; -import { Ecs } from '../../../../../common/ecs'; -import { - AddExceptionFlyout, - AddExceptionFlyoutProps, -} from '../../../../common/components/exceptions/add_exception_flyout'; +import type { Ecs } from '../../../../../common/ecs'; +import type { AddExceptionFlyoutProps } from '../../../../common/components/exceptions/add_exception_flyout'; +import { AddExceptionFlyout } from '../../../../common/components/exceptions/add_exception_flyout'; import * as i18n from '../translations'; -import { inputsModel, inputsSelectors, State } from '../../../../common/store'; +import type { inputsModel, State } from '../../../../common/store'; +import { inputsSelectors } from '../../../../common/store'; import { TimelineId } from '../../../../../common/types'; -import { AlertData, EcsHit } from '../../../../common/components/exceptions/types'; +import type { AlertData, EcsHit } from '../../../../common/components/exceptions/types'; import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query'; import { useSignalIndex } from '../../../containers/detection_engine/alerts/use_signal_index'; import { EventFiltersFlyout } from '../../../../management/pages/event_filters/view/components/event_filters_flyout'; @@ -35,7 +35,7 @@ import { useAlertsActions } from './use_alerts_actions'; import { useExceptionFlyout } from './use_add_exception_flyout'; import { useExceptionActions } from './use_add_exception_actions'; import { useEventFilterModal } from './use_event_filter_modal'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import { ATTACH_ALERT_TO_CASE_FOR_ROW } from '../../../../timelines/components/timeline/body/translations'; import { useEventFilterAction } from './use_event_filter_action'; import { useAddToCaseActions } from './use_add_to_case_actions'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.test.tsx index f88dd37cb8edd..365831133e2a8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { isInvestigateInResolverActionEnabled } from './investigate_in_resolver'; describe('InvestigateInResolverAction', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx index db7ba367d0ace..d6876468e4652 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx @@ -19,7 +19,7 @@ import { } from '../../../../common/containers/use_full_screen'; import { TimelineId, TimelineTabs } from '../../../../../common/types'; import { ACTION_INVESTIGATE_IN_RESOLVER } from '../../../../timelines/components/timeline/body/translations'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; export const isInvestigateInResolverActionEnabled = (ecsData?: Ecs) => (get(['agent', 'type', 0], ecsData) === 'endpoint' || diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.test.tsx index 151c390fda5ee..5eebdd18acfd4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { fireEvent, render, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { KibanaServices, useKibana } from '../../../../common/lib/kibana'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import * as actions from '../actions'; import { coreMock } from '@kbn/core/public/mocks'; import type { SendAlertToTimelineActionProps } from '../types'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx index b8d8232cb613c..e563e7c27fd7f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_timeline_action.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { ActionIconItem } from '../../../../timelines/components/timeline/body/actions/action_icon_item'; import { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_exception_flyout.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_exception_flyout.tsx index 2c8371465eef9..910089a17382f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_exception_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_exception_flyout.tsx @@ -10,7 +10,7 @@ import type { ExceptionListType } from '@kbn/securitysolution-io-ts-list-types'; import { DEFAULT_INDEX_PATTERN } from '../../../../../common/constants'; import { TimelineId } from '../../../../../common/types/timeline'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; interface UseExceptionFlyoutProps { ruleIndex: string[] | null | undefined; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx index 4746c759b0a2d..f1e337ac592c0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_to_case_actions.tsx @@ -8,12 +8,12 @@ import React, { useCallback, useMemo } from 'react'; import { EuiContextMenuItem } from '@elastic/eui'; import { CommentType } from '@kbn/cases-plugin/common'; -import { CaseAttachments } from '@kbn/cases-plugin/public'; +import type { CaseAttachments } from '@kbn/cases-plugin/public'; import { useGetUserCasesPermissions, useKibana } from '../../../../common/lib/kibana'; import type { TimelineNonEcsData } from '../../../../../common/search_strategy'; import { TimelineId } from '../../../../../common/types'; import { APP_ID } from '../../../../../common/constants'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { ADD_TO_EXISTING_CASE, ADD_TO_NEW_CASE } from '../translations'; export interface UseAddToCaseActions { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx index bd629f7019043..19f843d89ed96 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_alerts_actions.tsx @@ -9,10 +9,10 @@ import { useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { useBulkActionItems } from '@kbn/timelines-plugin/public'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; import { timelineActions } from '../../../../timelines/store/timeline'; import { useAlertsPrivileges } from '../../../containers/detection_engine/alerts/use_alerts_privileges'; -import { SetEventsDeletedProps, SetEventsLoadingProps } from '../types'; +import type { SetEventsDeletedProps, SetEventsLoadingProps } from '../types'; interface Props { alertStatus?: Status; closePopover: () => void; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx index dad495cdc507d..4fd5ebc48e49b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx @@ -8,7 +8,7 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { fireEvent, render } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { KibanaServices, useKibana } from '../../../../common/lib/kibana'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { useInvestigateInTimeline } from './use_investigate_in_timeline'; import * as actions from '../actions'; import { coreMock } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx index 53a2dece1bd5c..577ecca52c59e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx @@ -11,21 +11,21 @@ import { EuiContextMenuItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ALERT_RULE_EXCEPTIONS_LIST } from '@kbn/rule-data-utils'; -import { +import type { ExceptionListIdentifiers, ExceptionListItemSchema, - ExceptionListTypeEnum, } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { useApi } from '@kbn/securitysolution-list-hooks'; import { useKibana } from '../../../../common/lib/kibana'; import { TimelineId, TimelineType } from '../../../../../common/types/timeline'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { timelineActions, timelineSelectors } from '../../../../timelines/store/timeline'; import { sendAlertToTimelineAction } from '../actions'; import { dispatchUpdateTimeline } from '../../../../timelines/components/open_timeline/helpers'; import { useCreateTimeline } from '../../../../timelines/components/timeline/properties/use_create_timeline'; -import { CreateTimelineProps } from '../types'; +import type { CreateTimelineProps } from '../types'; import { ACTION_INVESTIGATE_IN_TIMELINE } from '../translations'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { getField } from '../../../../helpers'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts index e564bc221e275..da7ad90c7609e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/types.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import type { ISearchStart } from '@kbn/data-plugin/public'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; -import { Ecs } from '../../../../common/ecs'; -import { NoteResult } from '../../../../common/types/timeline/note'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; -import { TimelineModel } from '../../../timelines/store/timeline/model'; -import { inputsModel } from '../../../common/store'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { Ecs } from '../../../../common/ecs'; +import type { NoteResult } from '../../../../common/types/timeline/note'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { TimelineModel } from '../../../timelines/store/timeline/model'; +import type { inputsModel } from '../../../common/store'; export interface SetEventsLoadingProps { eventIds: string[]; diff --git a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/index.tsx b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/index.tsx index 05c655753acb9..90bd53f0b4fe6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/index.tsx @@ -7,7 +7,8 @@ import React, { memo, useMemo } from 'react'; import hash from 'object-hash'; -import { CallOutMessage, CallOutSwitcher } from '../../../../common/components/callouts'; +import type { CallOutMessage } from '../../../../common/components/callouts'; +import { CallOutSwitcher } from '../../../../common/components/callouts'; import * as i18n from './translations'; import { useMissingPrivileges } from './use_missing_privileges'; diff --git a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/translations.tsx b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/translations.tsx index a4857f03e35c8..b3aa96cfc66fd 100644 --- a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/translations.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/translations.tsx @@ -16,7 +16,7 @@ import { SECURITY_FEATURE_ID, } from '../../../../../common/constants'; import { CommaSeparatedValues } from './comma_separated_values'; -import { MissingPrivileges } from './use_missing_privileges'; +import type { MissingPrivileges } from './use_missing_privileges'; import { DetectionsRequirementsLink, SecuritySolutionRequirementsLink, diff --git a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/use_missing_privileges.ts b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/use_missing_privileges.ts index eec9bd1f09053..cc5376c29d892 100644 --- a/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/use_missing_privileges.ts +++ b/x-pack/plugins/security_solution/public/detections/components/callouts/missing_privileges_callout/use_missing_privileges.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { SECURITY_FEATURE_ID } from '../../../../../common/constants'; -import { Privilege } from '../../../containers/detection_engine/alerts/types'; +import type { Privilege } from '../../../containers/detection_engine/alerts/types'; import { useUserData } from '../../user_info'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; diff --git a/x-pack/plugins/security_solution/public/detections/components/callouts/ml_job_compatibility_callout/index.tsx b/x-pack/plugins/security_solution/public/detections/components/callouts/ml_job_compatibility_callout/index.tsx index ff266cfd859bf..df4eb0a24968a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/callouts/ml_job_compatibility_callout/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/callouts/ml_job_compatibility_callout/index.tsx @@ -7,7 +7,8 @@ import React, { memo } from 'react'; -import { CallOutMessage, CallOutSwitcher } from '../../../../common/components/callouts'; +import type { CallOutMessage } from '../../../../common/components/callouts'; +import { CallOutSwitcher } from '../../../../common/components/callouts'; import { useInstalledSecurityJobs } from '../../../../common/components/ml/hooks/use_installed_security_jobs'; import { affectedJobIds } from './affected_job_ids'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/callouts/need_admin_for_update_callout/index.tsx b/x-pack/plugins/security_solution/public/detections/components/callouts/need_admin_for_update_callout/index.tsx index 3b41c9280998b..a92571b80375c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/callouts/need_admin_for_update_callout/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/callouts/need_admin_for_update_callout/index.tsx @@ -7,7 +7,8 @@ import React, { memo } from 'react'; import { EuiSpacer } from '@elastic/eui'; -import { CallOutMessage, CallOutPersistentSwitcher } from '../../../../common/components/callouts'; +import type { CallOutMessage } from '../../../../common/components/callouts'; +import { CallOutPersistentSwitcher } from '../../../../common/components/callouts'; import { useUserData } from '../../user_info'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/responder_context_menu_item.tsx b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/responder_context_menu_item.tsx index 72891bcea532e..74bd42ff97111 100644 --- a/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/responder_context_menu_item.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/endpoint_responder/responder_context_menu_item.tsx @@ -6,7 +6,8 @@ */ import { EuiContextMenuItem } from '@elastic/eui'; -import React, { memo, ReactNode, useCallback, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo, useCallback, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useGetEndpointDetails, useWithShowEndpointResponder } from '../../../management/hooks'; diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx index 929b7c4109787..0f643fffa738b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/index.tsx @@ -7,9 +7,9 @@ import React, { useMemo } from 'react'; import { find } from 'lodash/fp'; -import { Maybe } from '@kbn/observability-plugin/common/typings'; +import type { Maybe } from '@kbn/observability-plugin/common/typings'; import { useCasesFromAlerts } from '../../containers/detection_engine/alerts/use_cases_from_alerts'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { IsolateHost } from './isolate'; import { UnisolateHost } from './unisolate'; diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/isolate.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/isolate.tsx index 5ecf8134f260c..1b47ec16714f8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/isolate.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/isolate.tsx @@ -10,12 +10,12 @@ import { EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { useHostIsolation } from '../../containers/detection_engine/alerts/use_host_isolation'; import { CASES_ASSOCIATED_WITH_ALERT, RETURN_TO_ALERT_DETAILS } from './translations'; +import type { EndpointIsolatedFormProps } from '../../../common/components/endpoint/host_isolation'; import { - EndpointIsolatedFormProps, EndpointIsolateForm, ActionCompletionReturnButton, } from '../../../common/components/endpoint/host_isolation'; -import { CasesFromAlertsResponse } from '../../containers/detection_engine/alerts/types'; +import type { CasesFromAlertsResponse } from '../../containers/detection_engine/alerts/types'; export const IsolateHost = React.memo( ({ diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/unisolate.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/unisolate.tsx index cb2660acf3a65..214e288bc727b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/unisolate.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/unisolate.tsx @@ -9,13 +9,13 @@ import React, { useMemo, useState, useCallback } from 'react'; import { EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { CASES_ASSOCIATED_WITH_ALERT, RETURN_TO_ALERT_DETAILS } from './translations'; +import type { EndpointIsolatedFormProps } from '../../../common/components/endpoint/host_isolation'; import { - EndpointIsolatedFormProps, EndpointUnisolateForm, ActionCompletionReturnButton, } from '../../../common/components/endpoint/host_isolation'; import { useHostUnisolation } from '../../containers/detection_engine/alerts/use_host_unisolation'; -import { CasesFromAlertsResponse } from '../../containers/detection_engine/alerts/types'; +import type { CasesFromAlertsResponse } from '../../containers/detection_engine/alerts/types'; export const UnisolateHost = React.memo( ({ diff --git a/x-pack/plugins/security_solution/public/detections/components/modals/ml_job_upgrade_modal/index.tsx b/x-pack/plugins/security_solution/public/detections/components/modals/ml_job_upgrade_modal/index.tsx index 6506080a3da15..84c0a5a579ba6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/modals/ml_job_upgrade_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/modals/ml_job_upgrade_modal/index.tsx @@ -6,7 +6,7 @@ */ import { EuiConfirmModal } from '@elastic/eui'; -import { MlSummaryJob } from '@kbn/ml-plugin/common'; +import type { MlSummaryJob } from '@kbn/ml-plugin/common'; import React, { memo } from 'react'; import styled from 'styled-components'; import { rgba } from 'polished'; diff --git a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx index f19601649a2f3..126f057742901 100644 --- a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx @@ -18,7 +18,7 @@ import { import { useKibana } from '../../../common/lib/kibana'; import { OsqueryEventDetailsFooter } from './osquery_flyout_footer'; import { ACTION_OSQUERY } from './translations'; -import { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; +import type { DataProvider } from '../../../timelines/components/timeline/data_providers/data_provider'; const OsqueryActionWrapper = styled.div` padding: 8px; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx index 44d3dbe8199f8..8e25d444ebd2b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/accordion_title/index.tsx @@ -8,7 +8,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import React from 'react'; -import { RuleStatusIcon, RuleStatusIconProps } from '../status_icon'; +import type { RuleStatusIconProps } from '../status_icon'; +import { RuleStatusIcon } from '../status_icon'; interface AccordionTitleProps extends RuleStatusIconProps { title: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx index 8bbb595c5612b..68ba032175e3a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/add_item_form/index.tsx @@ -15,11 +15,13 @@ import { EuiSpacer, } from '@elastic/eui'; import { isEmpty } from 'lodash/fp'; -import React, { ChangeEvent, useCallback, useEffect, useState, useRef } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useState, useRef } from 'react'; import styled from 'styled-components'; import * as RuleI18n from '../../../pages/detection_engine/rules/translations'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; interface AddItemProps { addText: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx index f4acd4f1122aa..6997777fdc34c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/anomaly_threshold_slider/index.tsx @@ -8,7 +8,7 @@ import React, { useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiRange, EuiFormRow } from '@elastic/eui'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; interface AnomalyThresholdSliderProps { describedByIds: string[]; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx index 41db125b70a16..37c19f5724ec8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx @@ -9,7 +9,7 @@ import React, { useCallback, useMemo } from 'react'; import { EuiFormRow } from '@elastic/eui'; import { FieldComponent } from '@kbn/securitysolution-autocomplete'; import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; -import { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import type { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; interface AutocompleteFieldProps { dataTestSubj: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx index c4c11d1d549ed..ec19332ee3d37 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/data_view_selector/index.tsx @@ -7,20 +7,16 @@ import React, { useMemo, useState, useEffect } from 'react'; -import { - EuiCallOut, - EuiComboBox, - EuiComboBoxOptionOption, - EuiFormRow, - EuiSpacer, -} from '@elastic/eui'; - -import { DataViewListItem } from '@kbn/data-views-plugin/common'; -import { DataViewBase } from '@kbn/es-query'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiCallOut, EuiComboBox, EuiFormRow, EuiSpacer } from '@elastic/eui'; + +import type { DataViewListItem } from '@kbn/data-views-plugin/common'; +import type { DataViewBase } from '@kbn/es-query'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import * as i18n from './translations'; import { useKibana } from '../../../../common/lib/kibana'; -import { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; interface DataViewSelectorProps { kibanaDataViews: { [x: string]: DataViewListItem }; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx index 066a29b4c05b7..201484dbf3764 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/actions_description.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { startCase } from 'lodash/fp'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; const ActionsDescription = ({ actions }: { actions: RuleAction[] }) => { if (!actions.length) return null; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx index 2cefb21e81294..0a1a4203bad57 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.test.tsx @@ -12,7 +12,8 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { coreMock } from '@kbn/core/public/mocks'; import { FilterManager, UI_SETTINGS } from '@kbn/data-plugin/public'; import { FilterLabel } from '@kbn/unified-search-plugin/public'; -import { DataViewBase, FilterStateStore } from '@kbn/es-query'; +import type { DataViewBase } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import { SeverityBadge } from '../severity_badge'; import * as i18n from './translations'; @@ -27,7 +28,7 @@ import { buildNoteDescription, buildRuleTypeDescription, } from './helpers'; -import { ListItems } from './types'; +import type { ListItems } from './types'; const setupMock = coreMock.createSetup(); const uiSettingsMock = (pinnedByDefault: boolean) => (key: string) => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx index 610bfd475c2b0..4682e2be0db3a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/helpers.tsx @@ -27,11 +27,11 @@ import React from 'react'; import styled from 'styled-components'; import { FieldIcon } from '@kbn/react-field'; -import { ThreatMapping, Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapping, Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { getDisplayValueFromFilter } from '@kbn/data-plugin/public'; import { FilterLabel } from '@kbn/unified-search-plugin/public'; import { MATCHES, AND, OR } from '../../../../common/components/threat_match/translations'; -import { EqlOptionsSelected } from '../../../../../common/search_strategy'; +import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; import { assertUnreachable } from '../../../../../common/utility_types'; import * as i18nSeverity from '../severity_mapping/translations'; import * as i18nRiskScore from '../risk_score_mapping/translations'; @@ -46,10 +46,13 @@ import { } from '../../../mitre/mitre_tactics_techniques'; import * as i18n from './translations'; -import { BuildQueryBarDescription, BuildThreatDescription, ListItems } from './types'; +import type { BuildQueryBarDescription, BuildThreatDescription, ListItems } from './types'; import { SeverityBadge } from '../severity_badge'; import ListTreeIcon from './assets/list_tree_icon.svg'; -import { AboutStepRiskScore, AboutStepSeverity } from '../../../pages/detection_engine/rules/types'; +import type { + AboutStepRiskScore, + AboutStepSeverity, +} from '../../../pages/detection_engine/rules/types'; import { defaultToEmptyTag } from '../../../../common/components/empty_value'; const NoteDescriptionContainer = styled(EuiFlexItem)` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx index 109b59b89ea16..63d2c52323583 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.test.tsx @@ -16,7 +16,8 @@ import { } from '.'; import { FilterManager, UI_SETTINGS } from '@kbn/data-plugin/public'; -import { Filter, FilterStateStore } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import { mockAboutStepRule, mockDefineStepRule, @@ -26,8 +27,8 @@ import { DEFAULT_TIMELINE_TITLE } from '../../../../timelines/components/timelin import * as i18n from './translations'; import { schema } from '../step_about_rule/schema'; -import { ListItems } from './types'; -import { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ListItems } from './types'; +import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx index ba112a596b653..43c8937f9231d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx @@ -10,8 +10,9 @@ import { isEmpty, chunk, get, pick, isNumber } from 'lodash/fp'; import React, { memo, useState } from 'react'; import styled from 'styled-components'; -import { ThreatMapping, Threats, Type } from '@kbn/securitysolution-io-ts-alerting-types'; -import { DataViewBase, Filter, FilterStateStore } from '@kbn/es-query'; +import type { ThreatMapping, Threats, Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { DataViewBase, Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import { FilterManager } from '@kbn/data-plugin/public'; import { buildRelatedIntegrationsDescription } from '../related_integrations/integrations_description'; import type { @@ -19,12 +20,15 @@ import type { RequiredFieldArray, } from '../../../../../common/detection_engine/schemas/common'; import { DEFAULT_TIMELINE_TITLE } from '../../../../timelines/components/timeline/translations'; -import { EqlOptionsSelected } from '../../../../../common/search_strategy'; +import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; import { useKibana } from '../../../../common/lib/kibana'; -import { AboutStepRiskScore, AboutStepSeverity } from '../../../pages/detection_engine/rules/types'; -import { FieldValueTimeline } from '../pick_timeline'; -import { FormSchema } from '../../../../shared_imports'; -import { ListItems } from './types'; +import type { + AboutStepRiskScore, + AboutStepSeverity, +} from '../../../pages/detection_engine/rules/types'; +import type { FieldValueTimeline } from '../pick_timeline'; +import type { FormSchema } from '../../../../shared_imports'; +import type { ListItems } from './types'; import { buildQueryBarDescription, buildSeverityDescription, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/ml_job_description.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/ml_job_description.tsx index 9aff7d8effd30..c9dcb19c64e81 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/ml_job_description.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/ml_job_description.tsx @@ -9,11 +9,12 @@ import React from 'react'; import styled from 'styled-components'; import { EuiBadge, EuiIcon, EuiLink, EuiToolTip } from '@elastic/eui'; -import { ML_PAGES, MlSummaryJob, useMlHref } from '@kbn/ml-plugin/public'; +import type { MlSummaryJob } from '@kbn/ml-plugin/public'; +import { ML_PAGES, useMlHref } from '@kbn/ml-plugin/public'; import { isJobStarted } from '../../../../../common/machine_learning/helpers'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; import { useKibana } from '../../../../common/lib/kibana'; -import { ListItems } from './types'; +import type { ListItems } from './types'; import { ML_JOB_STARTED, ML_JOB_STOPPED } from './translations'; enum MessageLevels { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts index 7820cc5a09c87..70baf0f4f4b3b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ReactNode } from 'react'; -import { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ReactNode } from 'react'; +import type { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; import type { DataViewBase, Filter } from '@kbn/es-query'; import type { FilterManager } from '@kbn/data-plugin/public'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx index 4b5d11b2853f2..f30fd074f0d45 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.test.tsx @@ -10,7 +10,8 @@ import { shallow, mount } from 'enzyme'; import { mockIndexPattern, TestProviders, useFormFieldMock } from '../../../../common/mock'; import { mockQueryBar } from '../../../pages/detection_engine/rules/all/__mocks__/mock'; -import { EqlQueryBar, EqlQueryBarProps } from './eql_query_bar'; +import type { EqlQueryBarProps } from './eql_query_bar'; +import { EqlQueryBar } from './eql_query_bar'; import { getEqlValidationError } from './validators.mock'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx index 6dd0238aa4327..a60c24378902f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/eql_query_bar.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, useCallback, ChangeEvent, useEffect, useState, useRef } from 'react'; +import type { FC, ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useState, useRef } from 'react'; import { Subscription } from 'rxjs'; import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; @@ -13,14 +14,14 @@ import { EuiFormRow, EuiSpacer, EuiTextArea } from '@elastic/eui'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; import { FilterManager } from '@kbn/data-plugin/public'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; import { FilterBar } from '../../../../common/components/filter_bar'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; import * as i18n from './translations'; import { EqlQueryBarFooter } from './footer'; import { getValidationResults } from './validators'; -import { +import type { EqlOptionsData, EqlOptionsSelected, FieldsEqlOptions, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx index 952ce8656a95b..b2e1a0a59d090 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/errors_popover.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, useCallback, useState } from 'react'; +import type { FC } from 'react'; +import React, { useCallback, useState } from 'react'; import { EuiButtonEmpty, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eui'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx index 00d315f6af197..3670a78bdb766 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/footer.tsx @@ -5,9 +5,9 @@ * 2.0. */ +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiButtonIcon, - EuiComboBoxOptionOption, EuiComboBox, EuiFieldNumber, EuiFlexGroup, @@ -18,11 +18,13 @@ import { EuiPopover, EuiPopoverTitle, } from '@elastic/eui'; -import React, { FC, useCallback, useMemo, useRef, useState } from 'react'; +import type { FC } from 'react'; +import React, { useCallback, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; -import { Cancelable, debounce } from 'lodash'; -import { +import type { Cancelable } from 'lodash'; +import { debounce } from 'lodash'; +import type { EqlOptionsData, EqlOptionsSelected, FieldsEqlOptions, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts index 2609f607a226c..d65d54ebb669e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ValidationError } from '../../../../shared_imports'; +import type { ValidationError } from '../../../../shared_imports'; import { ERROR_CODES } from './validators'; export const getEqlResponseError = (): ValidationError => ({ diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts index 6de4a8ced764f..8ca8355bc6502 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/eql_query_bar/validators.ts @@ -7,12 +7,12 @@ import { isEmpty } from 'lodash'; -import { FieldHook, ValidationError, ValidationFunc } from '../../../../shared_imports'; +import type { FieldHook, ValidationError, ValidationFunc } from '../../../../shared_imports'; import { isEqlRule } from '../../../../../common/detection_engine/utils'; import { KibanaServices } from '../../../../common/lib/kibana'; -import { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; import { validateEql } from '../../../../common/hooks/eql/api'; -import { FieldValueQueryBar } from '../query_bar'; +import type { FieldValueQueryBar } from '../query_bar'; import * as i18n from './translations'; export enum ERROR_CODES { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts index 6f5cb37d9f91f..a0ac479c93d67 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ThreatTechnique } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatTechnique } from '@kbn/securitysolution-io-ts-alerting-types'; import { subtechniquesOptions } from '../../../mitre/mitre_tactics_techniques'; /** diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx index 25eb7a65e0d1b..90357e2485644 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/index.tsx @@ -11,10 +11,10 @@ import React, { memo, useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { isEqual } from 'lodash'; -import { Threat, Threats } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threat, Threats } from '@kbn/securitysolution-io-ts-alerting-types'; import { tacticsOptions } from '../../../mitre/mitre_tactics_techniques'; import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; import { threatDefault } from '../step_about_rule/default_value'; import { MyAddItemButton } from '../add_item_form'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx index 7504a5d706f18..8c9db6ae894f1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/subtechnique_fields.tsx @@ -17,10 +17,10 @@ import { camelCase } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { Threats, ThreatSubtechnique } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threats, ThreatSubtechnique } from '@kbn/securitysolution-io-ts-alerting-types'; import { subtechniquesOptions } from '../../../mitre/mitre_tactics_techniques'; import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; import { MyAddItemButton } from '../add_item_form'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx index 5a0fde1a739a3..ac8e2dbcf615f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/mitre/technique_fields.tsx @@ -17,10 +17,10 @@ import { kebabCase, camelCase } from 'lodash/fp'; import React, { useCallback } from 'react'; import styled, { css } from 'styled-components'; -import { Threats, ThreatTechnique } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threats, ThreatTechnique } from '@kbn/securitysolution-io-ts-alerting-types'; import { techniquesOptions } from '../../../mitre/mitre_tactics_techniques'; import * as Rulei18n from '../../../pages/detection_engine/rules/translations'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; import { MyAddItemButton } from '../add_item_form'; import { hasSubtechniqueOptions } from './helpers'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx index f785ec43a8b31..d77b52a227cdf 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/ml_job_select/index.tsx @@ -6,9 +6,9 @@ */ import React, { useCallback, useMemo } from 'react'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiComboBox, - EuiComboBoxOptionOption, EuiFlexGroup, EuiFlexItem, EuiFormRow, @@ -18,7 +18,8 @@ import { import styled from 'styled-components'; import { isJobStarted } from '../../../../../common/machine_learning/helpers'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; import { useKibana } from '../../../../common/lib/kibana'; import { ML_JOB_SELECT_PLACEHOLDER_TEXT } from '../step_define_rule/translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx index b1d1df13e4a74..ffff647a01a69 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pick_timeline/index.tsx @@ -9,7 +9,8 @@ import { EuiFormRow } from '@elastic/eui'; import React, { useCallback, useEffect, useState } from 'react'; import { SearchTimelineSuperSelect } from '../../../../timelines/components/timeline/search_super_select'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; export interface FieldValueTimeline { id: string | null; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx index 8228dc4e22274..1e02fcfc3ac6f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/load_empty_prompt.test.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { waitFor } from '@testing-library/react'; -import { shallow, mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { shallow, mount } from 'enzyme'; import '../../../../common/mock/match_media'; import { PrePackagedRulesPrompt } from './load_empty_prompt'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx index 63e9cb27fc082..97d7ee804293f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/query_bar/index.tsx @@ -11,19 +11,21 @@ import { Subscription } from 'rxjs'; import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; -import { FilterManager, SavedQuery } from '@kbn/data-plugin/public'; +import type { SavedQuery } from '@kbn/data-plugin/public'; +import { FilterManager } from '@kbn/data-plugin/public'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; import { OpenTimelineModal } from '../../../../timelines/components/open_timeline/open_timeline_modal'; -import { ActionTimelineToShow } from '../../../../timelines/components/open_timeline/types'; +import type { ActionTimelineToShow } from '../../../../timelines/components/open_timeline/types'; import { QueryBar } from '../../../../common/components/query_bar'; import { buildGlobalQuery } from '../../../../timelines/components/timeline/helpers'; import { getDataProviderFilter } from '../../../../timelines/components/timeline/query_bar'; import { convertKueryToElasticSearchQuery } from '../../../../common/lib/keury'; import { useKibana } from '../../../../common/lib/kibana'; -import { TimelineModel } from '../../../../timelines/store/timeline/model'; +import type { TimelineModel } from '../../../../timelines/store/timeline/model'; import { useSavedQueryServices } from '../../../../common/utils/saved_query_services'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import * as i18n from './translations'; export interface FieldValueQueryBar { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integration_details.ts b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integration_details.ts index a4e2dc83084ab..b8475f7a0e9af 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integration_details.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integration_details.ts @@ -7,7 +7,7 @@ import { capitalize } from 'lodash'; import semver from 'semver'; -import { +import type { InstalledIntegration, InstalledIntegrationArray, RelatedIntegration, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx index 79c8105b39135..5932faf1de6f0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/index.tsx @@ -8,9 +8,9 @@ import React from 'react'; import styled from 'styled-components'; -import { RelatedIntegrationArray } from '../../../../../../common/detection_engine/schemas/common'; -import { ListItems } from '../../description_step/types'; -import { IntegrationDetails } from '../integration_details'; +import type { RelatedIntegrationArray } from '../../../../../../common/detection_engine/schemas/common'; +import type { ListItems } from '../../description_step/types'; +import type { IntegrationDetails } from '../integration_details'; import { useRelatedIntegrations } from '../use_related_integrations'; import { IntegrationLink } from './integration_link'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_link.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_link.tsx index c79435f49e212..9e56b0484baf1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_link.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_link.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; import { useBasePath } from '../../../../../common/lib/kibana'; -import { IntegrationDetails } from '../integration_details'; +import type { IntegrationDetails } from '../integration_details'; interface IntegrationLinkProps { integration: IntegrationDetails; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_status_badge.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_status_badge.tsx index 422282e942ddb..30463c744073e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_status_badge.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_status_badge.tsx @@ -9,7 +9,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiBadge, EuiToolTip } from '@elastic/eui'; -import { IntegrationDetails } from '../integration_details'; +import type { IntegrationDetails } from '../integration_details'; import * as i18n from '../translations'; const PaddedBadge = styled(EuiBadge)` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_version_mismatch_icon.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_version_mismatch_icon.tsx index 0a933f7bc9417..7bbc04d64785d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_version_mismatch_icon.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/integrations_description/integration_version_mismatch_icon.tsx @@ -8,7 +8,7 @@ import React from 'react'; import styled from 'styled-components'; import { EuiIconTip } from '@elastic/eui'; -import { IntegrationDetails } from '../integration_details'; +import type { IntegrationDetails } from '../integration_details'; import * as i18n from '../translations'; const VersionWarningIconContainer = styled.span` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/mock.ts b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/mock.ts index 2f7abdad4bb46..fafa581d6ff11 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { InstalledIntegrationArray, RelatedIntegrationArray, } from '../../../../../common/detection_engine/schemas/common'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_installed_integrations.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_installed_integrations.tsx index ec046c9fa662c..45ac9dbf4bc82 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_installed_integrations.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_installed_integrations.tsx @@ -6,7 +6,7 @@ */ import { useQuery } from 'react-query'; -import { InstalledIntegrationArray } from '../../../../../common/detection_engine/schemas/common'; +import type { InstalledIntegrationArray } from '../../../../../common/detection_engine/schemas/common'; import { fetchInstalledIntegrations } from '../../../containers/detection_engine/rules/api'; // import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; // import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_integration_privileges.ts b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_integration_privileges.ts index ffd7bb0782dba..ad8fe48cfa638 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_integration_privileges.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_integration_privileges.ts @@ -6,7 +6,7 @@ */ import { useKibana } from '../../../../common/lib/kibana'; -import { IntegrationPrivileges } from './integration_privileges'; +import type { IntegrationPrivileges } from './integration_privileges'; /** * Hook for determining if user has fleet/integrations/SOM privileges for fetching diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_related_integrations.ts b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_related_integrations.ts index 294a084aaeb80..3363abf2fe3c7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_related_integrations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/related_integrations/use_related_integrations.ts @@ -7,8 +7,9 @@ import { useMemo } from 'react'; -import { RelatedIntegrationArray } from '../../../../../common/detection_engine/schemas/common'; -import { calculateIntegrationDetails, IntegrationDetails } from './integration_details'; +import type { RelatedIntegrationArray } from '../../../../../common/detection_engine/schemas/common'; +import type { IntegrationDetails } from './integration_details'; +import { calculateIntegrationDetails } from './integration_details'; import { useInstalledIntegrations } from './use_installed_integrations'; export interface UseRelatedIntegrationsResult { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx index bad1c644ccdbe..ea5aac0bcae26 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx @@ -19,12 +19,12 @@ import { import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { noop } from 'lodash/fp'; -import { RiskScoreMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { RiskScoreMapping } from '@kbn/securitysolution-io-ts-alerting-types'; import { FieldComponent } from '@kbn/securitysolution-autocomplete'; import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; -import { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import type { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import * as i18n from './translations'; -import { AboutStepRiskScore } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRiskScore } from '../../../pages/detection_engine/rules/types'; const NestedContent = styled.div` margin-left: 24px; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx index a438af12f8d71..d886b46462441 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.test.tsx @@ -12,7 +12,7 @@ import { getSupportedActions, RuleActionsField } from '.'; import { useForm, Form } from '../../../../shared_imports'; import { useKibana } from '../../../../common/lib/kibana'; import { useFormFieldMock } from '../../../../common/mock'; -import { ActionType } from '@kbn/actions-plugin/common'; +import type { ActionType } from '@kbn/actions-plugin/common'; jest.mock('../../../../common/lib/kibana'); describe('RuleActionsField', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx index 5798081833887..7c309033d58df 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_field/index.tsx @@ -12,14 +12,12 @@ import deepMerge from 'deepmerge'; import ReactMarkdown from 'react-markdown'; import styled from 'styled-components'; -import { - ActionType, - loadActionTypes, - ActionVariables, -} from '@kbn/triggers-actions-ui-plugin/public'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { ActionType, ActionVariables } from '@kbn/triggers-actions-ui-plugin/public'; +import { loadActionTypes } from '@kbn/triggers-actions-ui-plugin/public'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; import { NOTIFICATION_SUPPORTED_ACTION_TYPES_IDS } from '../../../../../common/constants'; -import { FieldHook, useFormContext } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { useFormContext } from '../../../../shared_imports'; import { convertArrayToCamelCase, useKibana } from '../../../../common/lib/kibana'; import { FORM_ERRORS_TITLE } from './translations'; 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 c59f6ec0bab12..554f9a61ece7e 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 @@ -24,7 +24,7 @@ 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'; import { getToolTipContent } from '../../../../common/utils/privileges'; -import { Rule } from '../../../containers/detection_engine/rules'; +import type { Rule } from '../../../containers/detection_engine/rules'; import { executeRulesBulkAction, goToRuleEditPage, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx index fd60bc28873cf..3c61a6a944137 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiFlexItem, EuiHealth, EuiText } from '@elastic/eui'; -import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; +import type { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; import { FormattedDate } from '../../../../common/components/formatted_date'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts index 090674d88bf56..dc074b157e3d2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IconColor } from '@elastic/eui'; +import type { IconColor } from '@elastic/eui'; import { capitalize } from 'lodash'; import { assertUnreachable } from '../../../../../common/utility_types'; import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts index 29587298b454e..222886fe734c7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/helpers.ts @@ -6,16 +6,16 @@ */ import { Position, ScaleType } from '@elastic/charts'; -import { EuiSelectOption } from '@elastic/eui'; -import { Type, Language, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; -import { Unit } from '@kbn/datemath'; +import type { EuiSelectOption } from '@elastic/eui'; +import type { Type, Language, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Unit } from '@kbn/datemath'; import type { Filter } from '@kbn/es-query'; import * as i18n from './translations'; import { histogramDateTimeFormatter } from '../../../../common/components/utils'; -import { ChartSeriesConfigs } from '../../../../common/components/charts/common'; +import type { ChartSeriesConfigs } from '../../../../common/components/charts/common'; import { getQueryFilter } from '../../../../../common/detection_engine/get_query_filter'; -import { FieldValueQueryBar } from '../query_bar'; -import { ESQuery } from '../../../../../common/typed_json'; +import type { FieldValueQueryBar } from '../query_bar'; +import type { ESQuery } from '../../../../../common/typed_json'; /** * Determines whether or not to display noise warning. * Is considered noisy if alerts/hour rate > 1 diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx index 29cb0974006aa..e47bcc7c6c1b4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.test.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { render } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; -import { RulePreview, RulePreviewProps } from '.'; +import type { RulePreviewProps } from '.'; +import { RulePreview } from '.'; import { usePreviewRoute } from './use_preview_route'; import { usePreviewHistogram } from './use_preview_histogram'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx index 8a4bd38fea039..d9cc431a878f2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/index.tsx @@ -6,8 +6,8 @@ */ import React, { useState, useEffect, useMemo, useCallback } from 'react'; -import { Unit } from '@kbn/datemath'; -import { ThreatMapping, Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Unit } from '@kbn/datemath'; +import type { ThreatMapping, Type } from '@kbn/securitysolution-io-ts-alerting-types'; import styled from 'styled-components'; import { EuiFlexGroup, @@ -18,7 +18,7 @@ import { EuiSpacer, } from '@elastic/eui'; import { useSecurityJobs } from '../../../../common/components/ml_popover/hooks/use_security_jobs'; -import { FieldValueQueryBar } from '../query_bar'; +import type { FieldValueQueryBar } from '../query_bar'; import * as i18n from './translations'; import { usePreviewRoute } from './use_preview_route'; import { PreviewHistogram } from './preview_histogram'; @@ -26,9 +26,9 @@ import { getTimeframeOptions } from './helpers'; import { PreviewLogsComponent } from './preview_logs'; import { useKibana } from '../../../../common/lib/kibana'; import { LoadingHistogram } from './loading_histogram'; -import { FieldValueThreshold } from '../threshold_input'; +import type { FieldValueThreshold } from '../threshold_input'; import { isJobStarted } from '../../../../../common/machine_learning/helpers'; -import { EqlOptionsSelected } from '../../../../../common/search_strategy'; +import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx index c311736107194..57ce7b1d305a7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_histogram.tsx @@ -7,10 +7,10 @@ import React, { useEffect, useMemo } from 'react'; import usePrevious from 'react-use/lib/usePrevious'; -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; import { EuiFlexGroup, EuiFlexItem, EuiText, EuiSpacer, EuiLoadingChart } from '@elastic/eui'; import styled from 'styled-components'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { useDispatch, useSelector } from 'react-redux'; import { eventsViewerSelector } from '../../../../common/components/events_viewer/selectors'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; @@ -18,7 +18,10 @@ import { useKibana } from '../../../../common/lib/kibana'; import * as i18n from './translations'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { getHistogramConfig, isNoisy } from './helpers'; -import { ChartSeriesConfigs, ChartSeriesData } from '../../../../common/components/charts/common'; +import type { + ChartSeriesConfigs, + ChartSeriesData, +} from '../../../../common/components/charts/common'; import { Panel } from '../../../../common/components/panel'; import { HeaderSection } from '../../../../common/components/header_section'; import { BarChart } from '../../../../common/components/charts/barchart'; @@ -37,7 +40,7 @@ import { getPreviewTableControlColumn } from './preview_table_control_columns'; import { useGlobalFullScreen } from '../../../../common/containers/use_full_screen'; import { InspectButtonContainer } from '../../../../common/components/inspect'; import { timelineActions } from '../../../../timelines/store/timeline'; -import { State } from '../../../../common/store'; +import type { State } from '../../../../common/store'; const LoadingChart = styled(EuiLoadingChart)` display: block; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx index ced6f1e69155d..8249f60f20869 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_logs.tsx @@ -7,7 +7,7 @@ import React, { Fragment, useMemo } from 'react'; import { EuiCallOut, EuiText, EuiSpacer, EuiAccordion } from '@elastic/eui'; -import { RulePreviewLogs } from '../../../../../common/detection_engine/schemas/request'; +import type { RulePreviewLogs } from '../../../../../common/detection_engine/schemas/request'; import * as i18n from './translations'; interface PreviewLogsComponentProps { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.test.tsx index d4c57910a9269..1075014bc1b36 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.test.tsx @@ -15,8 +15,8 @@ import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../com import { PreviewTableCellRenderer } from './preview_table_cell_renderer'; import { getColumnRenderer } from '../../../../timelines/components/timeline/body/renderers/get_column_renderer'; import { DroppableWrapper } from '../../../../common/components/drag_and_drop/droppable_wrapper'; -import { BrowserFields } from '@kbn/timelines-plugin/common/search_strategy'; -import { Ecs } from '../../../../../common/ecs'; +import type { BrowserFields } from '@kbn/timelines-plugin/common/search_strategy'; +import type { Ecs } from '../../../../../common/ecs'; import { columnRenderers } from '../../../../timelines/components/timeline/body/renderers'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx index 0497b6fa21a2b..380419217ef9b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_cell_renderer.tsx @@ -6,8 +6,8 @@ */ import React, { useMemo } from 'react'; -import { EuiDataGridCellValueElementProps } from '@elastic/eui'; -import { CellValueElementProps } from '@kbn/timelines-plugin/common'; +import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; +import type { CellValueElementProps } from '@kbn/timelines-plugin/common'; import { StyledContent } from '../../../../common/lib/cell_actions/expanded_cell_value_actions'; import { getLinkColumnDefinition } from '../../../../common/lib/cell_actions/helpers'; import { useGetMappedNonEcsValue } from '../../../../timelines/components/timeline/body/data_driven_columns'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx index 2efc3256e9ce9..368599eb7c8ba 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/preview_table_control_columns.tsx @@ -8,7 +8,7 @@ import { EuiToolTip, EuiButtonIcon } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { ControlColumnProps, ActionProps } from '@kbn/timelines-plugin/common'; +import type { ControlColumnProps, ActionProps } from '@kbn/timelines-plugin/common'; import { getActionsColumnWidth, DEFAULT_ACTION_BUTTON_WIDTH } from '@kbn/timelines-plugin/public'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx index 881e86d27923b..facd9a4258e1d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_histogram.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { useMemo } from 'react'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { useMatrixHistogramCombined } from '../../../../common/containers/matrix_histogram'; import { MatrixHistogramType } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx index b055597cacffe..b6717effe1708 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_preview/use_preview_route.tsx @@ -6,14 +6,14 @@ */ import { useEffect, useState, useCallback } from 'react'; -import { Unit } from '@kbn/datemath'; -import { Type, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; -import { FieldValueQueryBar } from '../query_bar'; +import type { Unit } from '@kbn/datemath'; +import type { Type, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { FieldValueQueryBar } from '../query_bar'; import { usePreviewRule } from '../../../containers/detection_engine/rules/use_preview_rule'; import { formatPreviewRule } from '../../../pages/detection_engine/rules/create/helpers'; -import { FieldValueThreshold } from '../threshold_input'; -import { RulePreviewLogs } from '../../../../../common/detection_engine/schemas/request'; -import { EqlOptionsSelected } from '../../../../../common/search_strategy'; +import type { FieldValueThreshold } from '../threshold_input'; +import type { RulePreviewLogs } from '../../../../../common/detection_engine/schemas/request'; +import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; interface PreviewRouteParams { isDisabled: boolean; 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 f26b2f356e3db..574f4ec166193 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 @@ -5,13 +5,8 @@ * 2.0. */ -import { - EuiFlexGroup, - EuiFlexItem, - EuiLoadingSpinner, - EuiSwitch, - EuiSwitchEvent, -} from '@elastic/eui'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSwitch } from '@elastic/eui'; import { noop } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx index bd5cbcf299c83..5f86d0cccc1e6 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/schedule_item_form/index.tsx @@ -17,7 +17,8 @@ import { isEmpty } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { FieldHook, getFieldValidityAndErrorMessage } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; +import { getFieldValidityAndErrorMessage } from '../../../../shared_imports'; import * as I18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx index 712166df2b539..745d2b31995cc 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useMemo } from 'react'; import { EuiCard, EuiFlexGrid, EuiFlexItem, EuiFormRow, EuiIcon } from '@elastic/eui'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; import { isThresholdRule, @@ -16,7 +16,7 @@ import { isQueryRule, isThreatMatchRule, } from '../../../../../common/detection_engine/utils'; -import { FieldHook } from '../../../../shared_imports'; +import type { FieldHook } from '../../../../shared_imports'; import { useKibana } from '../../../../common/lib/kibana'; import * as i18n from './translations'; import { MlCardDescription } from './ml_card_description'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx index bcb368ba288ac..961620d1521c4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx @@ -19,7 +19,7 @@ import { import { noop } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { +import type { Severity, SeverityMapping, SeverityMappingItem, @@ -30,10 +30,10 @@ import { } from '@kbn/securitysolution-autocomplete'; import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; -import { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import type { FieldHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import * as i18n from './translations'; -import { SeverityOptionItem } from '../step_about_rule/data'; -import { AboutStepSeverity } from '../../../pages/detection_engine/rules/types'; +import type { SeverityOptionItem } from '../step_about_rule/data'; +import type { AboutStepSeverity } from '../../../pages/detection_engine/rules/types'; import { useKibana } from '../../../../common/lib/kibana'; const NestedContent = styled.div` diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx index 03f898ac4ad19..b52d317a6ce82 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/status_icon/index.tsx @@ -10,7 +10,7 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { useEuiTheme } from '../../../../common/lib/theme/use_eui_theme'; -import { RuleStatusType } from '../../../pages/detection_engine/rules/types'; +import type { RuleStatusType } from '../../../pages/detection_engine/rules/types'; export interface RuleStatusIconProps { name: string; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx index b31af0ab269ed..936776588ce42 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/data.tsx @@ -10,7 +10,7 @@ import { EuiHealth } from '@elastic/eui'; import { euiLightVars } from '@kbn/ui-theme'; import React from 'react'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import * as I18n from './translations'; export interface SeverityOptionItem { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts index 08feb5f2e5166..3ae5441d060d0 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/default_value.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; import { fillEmptySeverityMappings } from '../../../pages/detection_engine/rules/helpers'; export const threatDefault = [ diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx index cbd5c070198ec..d8d9de4cf85c2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.test.tsx @@ -16,7 +16,7 @@ import { useFetchIndex } from '../../../../common/containers/source'; import { mockAboutStepRule } from '../../../pages/detection_engine/rules/all/__mocks__/mock'; import { StepRuleDescription } from '../description_step'; import { stepAboutDefaultValue } from './default_value'; -import { +import type { AboutStepRule, RuleStepsFormHooks, RuleStep, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx index b8cc1077001a2..d37adc147e6cf 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/index.tsx @@ -6,19 +6,21 @@ */ import { EuiAccordion, EuiFlexItem, EuiSpacer, EuiFormRow } from '@elastic/eui'; -import React, { FC, memo, useCallback, useEffect, useState, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { memo, useCallback, useEffect, useState, useMemo } from 'react'; import styled from 'styled-components'; -import { DataViewBase } from '@kbn/es-query'; -import { +import type { DataViewBase } from '@kbn/es-query'; +import type { RuleStepProps, - RuleStep, AboutStepRule, DefineStepRule, } from '../../../pages/detection_engine/rules/types'; +import { RuleStep } from '../../../pages/detection_engine/rules/types'; import { AddItem } from '../add_item_form'; import { StepRuleDescription } from '../description_step'; import { AddMitreAttackThreat } from '../mitre'; +import type { FieldHook } from '../../../../shared_imports'; import { Field, Form, @@ -26,7 +28,6 @@ import { UseField, useForm, useFormData, - FieldHook, } from '../../../../shared_imports'; import { defaultRiskScoreBySeverity, severityOptions } from './data'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx index 9ee594ba7d3cf..6039e5e3e272d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule/schema.tsx @@ -7,15 +7,9 @@ import { i18n } from '@kbn/i18n'; -import { - FIELD_TYPES, - fieldValidators, - FormSchema, - ValidationFunc, - ERROR_CODE, - VALIDATION_TYPES, -} from '../../../../shared_imports'; -import { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { FormSchema, ValidationFunc, ERROR_CODE } from '../../../../shared_imports'; +import { FIELD_TYPES, fieldValidators, VALIDATION_TYPES } from '../../../../shared_imports'; +import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; import { OptionalFieldLabel } from '../optional_field_label'; import { isUrlInvalid } from '../../../../common/utils/validators'; import * as I18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx index 04111924c6e4e..cafbc1f173f0b 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.test.tsx @@ -14,7 +14,7 @@ import { StepAboutRuleToggleDetails } from '.'; import { mockAboutStepRule } from '../../../pages/detection_engine/rules/all/__mocks__/mock'; import { HeaderSection } from '../../../../common/components/header_section'; import { StepAboutRule } from '../step_about_rule'; -import { AboutStepRule } from '../../../pages/detection_engine/rules/types'; +import type { AboutStepRule } from '../../../pages/detection_engine/rules/types'; import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx index 439e981059a6b..ac5e6c559d0d9 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_about_rule_details/index.tsx @@ -5,11 +5,11 @@ * 2.0. */ +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; import { EuiPanel, EuiProgress, EuiButtonGroup, - EuiButtonGroupOptionProps, EuiSpacer, EuiFlexItem, EuiText, @@ -22,7 +22,10 @@ import styled from 'styled-components'; import { HeaderSection } from '../../../../common/components/header_section'; import { MarkdownRenderer } from '../../../../common/components/markdown_editor'; -import { AboutStepRule, AboutStepRuleDetails } from '../../../pages/detection_engine/rules/types'; +import type { + AboutStepRule, + AboutStepRuleDetails, +} from '../../../pages/detection_engine/rules/types'; import * as i18n from './translations'; import { StepAboutRule } from '../step_about_rule'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx index 746550fe204cd..4ddd12a734d7a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; import { EuiButtonEmpty, EuiFlexGroup, @@ -12,18 +13,18 @@ import { EuiFormRow, EuiSpacer, EuiButtonGroup, - EuiButtonGroupOptionProps, EuiText, } from '@elastic/eui'; -import React, { FC, memo, useCallback, useState, useEffect, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { memo, useCallback, useState, useEffect, useMemo } from 'react'; import styled from 'styled-components'; import { i18n as i18nCore } from '@kbn/i18n'; import { isEqual, isEmpty } from 'lodash'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; import usePrevious from 'react-use/lib/usePrevious'; -import { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; +import type { DataViewBase, DataViewFieldBase } from '@kbn/es-query'; import { FormattedMessage } from '@kbn/i18n-react'; import { DEFAULT_INDEX_KEY, @@ -36,13 +37,10 @@ import { hasMlAdminPermissions } from '../../../../../common/machine_learning/ha import { hasMlLicense } from '../../../../../common/machine_learning/has_ml_license'; import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; import { useUiSetting$ } from '../../../../common/lib/kibana'; -import { EqlOptionsSelected, FieldsEqlOptions } from '../../../../../common/search_strategy'; +import type { EqlOptionsSelected, FieldsEqlOptions } from '../../../../../common/search_strategy'; import { filterRuleFieldsForType } from '../../../pages/detection_engine/rules/create/helpers'; -import { - DefineStepRule, - RuleStep, - RuleStepProps, -} from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule, RuleStepProps } from '../../../pages/detection_engine/rules/types'; +import { RuleStep } from '../../../pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; import { QueryBarDefineRule } from '../query_bar'; import { SelectRuleType } from '../select_rule_type'; @@ -71,7 +69,8 @@ import { import { EqlQueryBar } from '../eql_query_bar'; import { DataViewSelector } from '../data_view_selector'; import { ThreatMatchInput } from '../threatmatch_input'; -import { BrowserField, BrowserFields, useFetchIndex } from '../../../../common/containers/source'; +import type { BrowserField, BrowserFields } from '../../../../common/containers/source'; +import { useFetchIndex } from '../../../../common/containers/source'; import { RulePreview } from '../rule_preview'; import { getIsRulePreviewDisabled } from '../rule_preview/helpers'; import { DocLink } from '../../../../common/components/links_to_docs/doc_link'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx index c863eb8cf1eab..8f3fd2e90bbae 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx @@ -22,15 +22,10 @@ import { isThresholdRule, } from '../../../../../common/detection_engine/utils'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; -import { FieldValueQueryBar } from '../query_bar'; -import { - ERROR_CODE, - FIELD_TYPES, - fieldValidators, - FormSchema, - ValidationFunc, -} from '../../../../shared_imports'; -import { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { FieldValueQueryBar } from '../query_bar'; +import type { ERROR_CODE, FormSchema, ValidationFunc } from '../../../../shared_imports'; +import { FIELD_TYPES, fieldValidators } from '../../../../shared_imports'; +import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; import { debounceAsync, eqlValidator } from '../eql_query_bar/validators'; import { CUSTOM_QUERY_REQUIRED, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/types.ts b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/types.ts index 9c435dced1107..50918886e3202 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FieldValueQueryBar } from '../query_bar'; +import type { FieldValueQueryBar } from '../query_bar'; export interface QueryBarStepDefineRule { queryBar: FieldValueQueryBar; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx index 2fa0919a072ef..43b3f49c325e2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/index.tsx @@ -15,14 +15,12 @@ import { EuiText, } from '@elastic/eui'; import { findIndex } from 'lodash/fp'; -import React, { FC, memo, useCallback, useEffect, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { memo, useCallback, useEffect, useMemo } from 'react'; -import { ActionVariables } from '@kbn/triggers-actions-ui-plugin/public'; -import { - RuleStep, - RuleStepProps, - ActionsStepRule, -} from '../../../pages/detection_engine/rules/types'; +import type { ActionVariables } from '@kbn/triggers-actions-ui-plugin/public'; +import type { RuleStepProps, ActionsStepRule } from '../../../pages/detection_engine/rules/types'; +import { RuleStep } from '../../../pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; import { Form, UseField, useForm, useFormData } from '../../../../shared_imports'; import { StepContentWrapper } from '../step_content_wrapper'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.test.tsx index 016100c762eb7..58acba634311a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.test.tsx @@ -8,7 +8,7 @@ import { validateSingleAction, validateRuleActionsField } from './schema'; import { getActionTypeName, validateMustache, validateActionParams } from './utils'; import { actionTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/application/action_type_registry.mock'; -import { FormHook } from '../../../../shared_imports'; +import type { FormHook } from '../../../../shared_imports'; jest.mock('./utils'); describe('stepRuleActions schema', () => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.tsx index ceaa3365e2785..efc34c7b4d13d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/schema.tsx @@ -9,14 +9,17 @@ import { i18n } from '@kbn/i18n'; -import { RuleAction, ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; -import { +import type { + RuleAction, + ActionTypeRegistryContract, +} from '@kbn/triggers-actions-ui-plugin/public'; +import type { FormSchema, ValidationFunc, ERROR_CODE, ValidationError, } from '../../../../shared_imports'; -import { ActionsStepRule } from '../../../pages/detection_engine/rules/types'; +import type { ActionsStepRule } from '../../../pages/detection_engine/rules/types'; import { getActionTypeName, validateMustache, validateActionParams } from './utils'; export const validateSingleAction = async ( diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/utils.ts b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/utils.ts index b16ea4e3a667b..8584bb254094a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_rule_actions/utils.ts @@ -8,7 +8,10 @@ import mustache from 'mustache'; import { uniq, startCase, flattenDeep, isArray, isString } from 'lodash/fp'; -import { RuleAction, ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; +import type { + RuleAction, + ActionTypeRegistryContract, +} from '@kbn/triggers-actions-ui-plugin/public'; import * as I18n from './translations'; export const getActionTypeName = (actionTypeId: RuleAction['actionTypeId']) => { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx index 9d7c2b76b385f..4695a665f72af 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/index.tsx @@ -5,14 +5,12 @@ * 2.0. */ -import React, { FC, memo, useCallback, useEffect } from 'react'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { FC } from 'react'; +import React, { memo, useCallback, useEffect } from 'react'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; -import { - RuleStep, - RuleStepProps, - ScheduleStepRule, -} from '../../../pages/detection_engine/rules/types'; +import type { RuleStepProps, ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; +import { RuleStep } from '../../../pages/detection_engine/rules/types'; import { StepRuleDescription } from '../description_step'; import { ScheduleItem } from '../schedule_item_form'; import { Form, UseField, useForm } from '../../../../shared_imports'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx index 5541f69d317df..c31da01b46e7f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/step_schedule_rule/schema.tsx @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { OptionalFieldLabel } from '../optional_field_label'; -import { ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; -import { FormSchema } from '../../../../shared_imports'; +import type { ScheduleStepRule } from '../../../pages/detection_engine/rules/types'; +import type { FormSchema } from '../../../../shared_imports'; export const schema: FormSchema = { interval: { diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx index 961007f2dac4d..7ee8d014f2ab4 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/threatmatch_input/index.tsx @@ -8,17 +8,17 @@ import React, { useCallback, useEffect, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiFormRow } from '@elastic/eui'; import type { DataViewBase } from '@kbn/es-query'; -import { ThreatMapEntries } from '../../../../common/components/threat_match/types'; +import type { ThreatMapEntries } from '../../../../common/components/threat_match/types'; import { ThreatMatchComponent } from '../../../../common/components/threat_match'; -import { BrowserField } from '../../../../common/containers/source'; +import type { BrowserField } from '../../../../common/containers/source'; +import type { FieldHook } from '../../../../shared_imports'; import { - FieldHook, Field, getUseField, UseField, getFieldValidityAndErrorMessage, } from '../../../../shared_imports'; -import { DefineStepRule } from '../../../pages/detection_engine/rules/types'; +import type { DefineStepRule } from '../../../pages/detection_engine/rules/types'; import { schema } from '../step_define_rule/schema'; import { QueryBarDefineRule } from '../query_bar'; import * as i18n from '../step_define_rule/translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx index 91efeff024831..3875aa853256c 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/threshold_input/index.tsx @@ -9,8 +9,9 @@ import React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; -import { DataViewFieldBase } from '@kbn/es-query'; -import { FieldHook, Field } from '../../../../shared_imports'; +import type { DataViewFieldBase } from '@kbn/es-query'; +import type { FieldHook } from '../../../../shared_imports'; +import { Field } from '../../../../shared_imports'; import { THRESHOLD_FIELD_PLACEHOLDER } from './translations'; const FIELD_COMBO_BOX_WIDTH = 410; diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx index 32c8c7e4d4805..93e268947462e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx @@ -5,10 +5,12 @@ * 2.0. */ import React from 'react'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; -import { TakeActionDropdown, TakeActionDropdownProps } from '.'; +import type { TakeActionDropdownProps } from '.'; +import { TakeActionDropdown } from '.'; import { generateAlertDetailsDataMock } from '../../../common/components/event_details/__mocks__'; import { getDetectionAlertMock } from '../../../common/mock/mock_detection_alerts'; import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; @@ -26,7 +28,7 @@ import { NOT_FROM_ENDPOINT_HOST_TOOLTIP, } from '../endpoint_responder/responder_context_menu_item'; import { endpointMetadataHttpMocks } from '../../../management/pages/endpoint_hosts/mocks'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { isAlertFromEndpointEvent, isAlertFromEndpointAlert, diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx index 0a67d43ac735c..ea66ebb132d8a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.tsx @@ -9,7 +9,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { EuiButton, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; import type { ExceptionListType } from '@kbn/securitysolution-io-ts-list-types'; import { useResponderActionItem } from '../endpoint_responder'; -import { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy'; import { TAKE_ACTION } from '../alerts_table/alerts_utility_bar/translations'; import { useExceptionActions } from '../alerts_table/timeline_actions/use_add_exception_actions'; import { useAlertsActions } from '../alerts_table/timeline_actions/use_alerts_actions'; @@ -19,7 +19,7 @@ import { useEventFilterAction } from '../alerts_table/timeline_actions/use_event import { useHostIsolationAction } from '../host_isolation/use_host_isolation_action'; import { getFieldValue } from '../host_isolation/helpers'; import type { Ecs } from '../../../../common/ecs'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; import { isAlertFromEndpointAlert } from '../../../common/utils/endpoint_alert_check'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; import { useUserPrivileges } from '../../../common/components/user_privileges'; diff --git a/x-pack/plugins/security_solution/public/detections/components/user_info/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/user_info/index.test.tsx index bb49f47596fc8..d727efb23ff5d 100644 --- a/x-pack/plugins/security_solution/public/detections/components/user_info/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/user_info/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; import { useUserInfo, ManageUserInfo } from '.'; -import { Capabilities } from '@kbn/core/public'; +import type { Capabilities } from '@kbn/core/public'; import { useKibana } from '../../../common/lib/kibana'; import * as api from '../../containers/detection_engine/alerts/api'; diff --git a/x-pack/plugins/security_solution/public/detections/components/user_info/index.tsx b/x-pack/plugins/security_solution/public/detections/components/user_info/index.tsx index 1699d452be1f4..7696977bde3d1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/user_info/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/user_info/index.tsx @@ -6,7 +6,8 @@ */ import { noop } from 'lodash/fp'; -import React, { useEffect, useReducer, Dispatch, createContext, useContext } from 'react'; +import type { Dispatch } from 'react'; +import React, { useEffect, useReducer, createContext, useContext } from 'react'; import { useAlertsPrivileges } from '../../containers/detection_engine/alerts/use_alerts_privileges'; import { useSignalIndex } from '../../containers/detection_engine/alerts/use_signal_index'; diff --git a/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_detection_engine_privileges.mock.ts b/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_detection_engine_privileges.mock.ts index 8be752f3a4f4d..dfcbc5eeda496 100644 --- a/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_detection_engine_privileges.mock.ts +++ b/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_detection_engine_privileges.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { useFetchDetectionEnginePrivileges } from './use_fetch_detection_engine_privileges'; +import type { useFetchDetectionEnginePrivileges } from './use_fetch_detection_engine_privileges'; export const useFetchDetectionEnginePrivilegesMock: () => jest.Mocked< ReturnType diff --git a/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_list_privileges.ts b/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_list_privileges.ts index e1d6a90da1b0a..1968f6912a283 100644 --- a/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_list_privileges.ts +++ b/x-pack/plugins/security_solution/public/detections/components/user_privileges/use_fetch_list_privileges.ts @@ -9,7 +9,7 @@ import { useEffect, useRef } from 'react'; import { useReadListPrivileges } from '@kbn/securitysolution-list-hooks'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; import { useHttp, useKibana } from '../../../common/lib/kibana'; -import { Privilege } from '../../containers/detection_engine/alerts/types'; +import type { Privilege } from '../../containers/detection_engine/alerts/types'; import * as i18n from './translations'; interface ListPrivileges { diff --git a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.test.tsx b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.test.tsx index f77f6b1ea23fb..e3fe9d39d6601 100644 --- a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.test.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { FormEvent } from 'react'; -import { mount, ReactWrapper } from 'enzyme'; +import type { FormEvent } from 'react'; +import React from 'react'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; import { TestProviders } from '../../../common/mock'; diff --git a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.tsx b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.tsx index ac16a10bfa14a..b95ec41048f89 100644 --- a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/form.tsx @@ -6,6 +6,7 @@ */ import React, { useCallback, useState, useEffect, useRef } from 'react'; +import type { EuiSelectOption } from '@elastic/eui'; import { EuiButton, EuiButtonEmpty, @@ -15,7 +16,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiSelect, - EuiSelectOption, } from '@elastic/eui'; import type { Type, ListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/table_helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/table_helpers.tsx index 223701a2f7f12..5174e2fa6bccb 100644 --- a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/table_helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/table_helpers.tsx @@ -12,7 +12,7 @@ import { EuiButtonIcon, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui'; import type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { FormattedDate } from '../../../common/components/formatted_date'; import * as i18n from './translations'; -import { TableItemCallback, TableProps } from './types'; +import type { TableItemCallback, TableProps } from './types'; import { listFormOptions } from './form'; const AlignedSpinner = styled(EuiLoadingSpinner)` diff --git a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/types.ts b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/types.ts index 92fb105a3617e..3250a11a54b49 100644 --- a/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiBasicTableProps } from '@elastic/eui'; +import type { EuiBasicTableProps } from '@elastic/eui'; import type { ListSchema } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts index 04b60495485ca..3d2b735a1f5e2 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/columns.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { EuiDataGridColumn } from '@elastic/eui'; +import type { EuiDataGridColumn } from '@elastic/eui'; import { ALERT_DURATION, ALERT_REASON, ALERT_STATUS } from '@kbn/rule-data-utils'; -import { ColumnHeaderOptions } from '../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../common/types'; import { defaultColumnHeaderType } from '../../../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../../timelines/components/timeline/body/constants'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx index fb39e60bbad16..054cca412403a 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.test.tsx @@ -14,10 +14,10 @@ import { ALERT_DURATION, ALERT_STATUS } from '@kbn/rule-data-utils'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { DragDropContextWrapper } from '../../../../common/components/drag_and_drop/drag_drop_context_wrapper'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../common/mock'; -import { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; -import { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; +import type { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; +import type { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; -import { ColumnHeaderOptions } from '../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../common/types'; import { RenderCellValue } from '.'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx index 39ca4c207b230..9083bcf46697f 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx @@ -8,13 +8,14 @@ import { random } from 'lodash/fp'; import moment from 'moment'; import React from 'react'; -import { EuiDataGridCellValueElementProps, EuiLink } from '@elastic/eui'; +import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; +import { EuiLink } from '@elastic/eui'; import { ALERT_DURATION, ALERT_REASON, ALERT_SEVERITY, ALERT_STATUS } from '@kbn/rule-data-utils'; import { TruncatableText } from '../../../../common/components/truncatable_text'; import { Severity } from '../../../components/severity'; import { useGetMappedNonEcsValue } from '../../../../timelines/components/timeline/body/data_driven_columns'; -import { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; +import type { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { Status } from '../../../components/status'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts index d60a82441697b..4ff885d729322 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/columns.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { EuiDataGridColumn } from '@elastic/eui'; -import { ColumnHeaderOptions } from '../../../../../common/types'; +import type { EuiDataGridColumn } from '@elastic/eui'; +import type { ColumnHeaderOptions } from '../../../../../common/types'; import { defaultColumnHeaderType } from '../../../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../../../timelines/components/timeline/body/constants'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx index 728f9eaaee0d0..7d715e7250d7b 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.test.tsx @@ -12,12 +12,12 @@ import React from 'react'; import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { DragDropContextWrapper } from '../../../../common/components/drag_and_drop/drag_drop_context_wrapper'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../common/mock'; -import { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; -import { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; +import type { TimelineNonEcsData } from '../../../../../common/search_strategy/timeline'; +import type { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { RenderCellValue } from '.'; -import { ColumnHeaderOptions } from '../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../common/types'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx index 7e8cd20724c0e..d4796c6d1b655 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiDataGridCellValueElementProps } from '@elastic/eui'; +import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; import { ALERT_SEVERITY, ALERT_REASON } from '@kbn/rule-data-utils'; import React from 'react'; @@ -13,7 +13,7 @@ import { DefaultDraggable } from '../../../../common/components/draggables'; import { TruncatableText } from '../../../../common/components/truncatable_text'; import { Severity } from '../../../components/severity'; import { useGetMappedNonEcsValue } from '../../../../timelines/components/timeline/body/data_driven_columns'; -import { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; +import type { CellValueElementProps } from '../../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; const reason = diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts index b542fa7d40c4a..229694a4d3b43 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/columns.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { EuiDataGridColumn } from '@elastic/eui'; -import { ColumnHeaderOptions } from '../../../../common/types'; +import type { EuiDataGridColumn } from '@elastic/eui'; +import type { ColumnHeaderOptions } from '../../../../common/types'; import { defaultColumnHeaderType } from '../../../timelines/components/timeline/body/column_headers/default_headers'; import { diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx index f2e4ea342d0e5..657ede8fd1c98 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.test.tsx @@ -9,12 +9,12 @@ import { mount } from 'enzyme'; import { cloneDeep } from 'lodash/fp'; import React from 'react'; -import { ColumnHeaderOptions } from '../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../common/types'; import { mockBrowserFields } from '../../../common/containers/source/mock'; import { DragDropContextWrapper } from '../../../common/components/drag_and_drop/drag_drop_context_wrapper'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../common/mock'; -import { TimelineNonEcsData } from '../../../../common/search_strategy/timeline'; -import { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; +import type { TimelineNonEcsData } from '../../../../common/search_strategy/timeline'; +import type { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; import { RenderCellValue } from '.'; diff --git a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx index 09dcc9970ac20..7d90d82218fdd 100644 --- a/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx +++ b/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections/render_cell_value.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { EuiDataGridCellValueElementProps } from '@elastic/eui'; +import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; import React from 'react'; import { TimelineId } from '../../../../common/types'; import { useSourcererDataView } from '../../../common/containers/sourcerer'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; -import { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; +import type { CellValueElementProps } from '../../../timelines/components/timeline/cell_rendering'; import { DefaultCellRenderer } from '../../../timelines/components/timeline/cell_rendering/default_cell_renderer'; /** diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts index ea64f39226cd2..e08f3c2287304 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/__mocks__/api.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { QueryAlerts, AlertSearchResponse, BasicSignals, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/api.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/api.ts index fd7d364239226..55dac273595f7 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/api.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/api.ts @@ -7,7 +7,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getCasesFromAlertsUrl } from '@kbn/cases-plugin/common'; -import { HostIsolationResponse, HostInfo } from '../../../../../common/endpoint/types'; +import type { HostIsolationResponse, HostInfo } from '../../../../../common/endpoint/types'; import { DETECTION_ENGINE_QUERY_SIGNALS_URL, DETECTION_ENGINE_SIGNALS_STATUS_URL, @@ -18,7 +18,7 @@ import { } from '../../../../../common/constants'; import { HOST_METADATA_GET_ROUTE } from '../../../../../common/endpoint/constants'; import { KibanaServices } from '../../../../common/lib/kibana'; -import { +import type { BasicSignals, Privilege, QueryAlerts, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts index 451674fabe143..8782f9ecad631 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HostIsolationResponse } from '../../../../../common/endpoint/types/actions'; -import { AlertSearchResponse, AlertsIndex, Privilege, CasesFromAlertsResponse } from './types'; +import type { HostIsolationResponse } from '../../../../../common/endpoint/types/actions'; +import type { AlertSearchResponse, AlertsIndex, Privilege, CasesFromAlertsResponse } from './types'; export const alertsMock: AlertSearchResponse = { took: 7, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts index 54d4b6fdcbafd..ffc46610ae06d 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; export interface BasicSignals { signal: AbortSignal; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx index 1dc1423606097..ac2917e580e44 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_alerts_privileges.test.tsx @@ -10,8 +10,9 @@ import produce from 'immer'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; -import { Privilege } from './types'; -import { UseAlertsPrivelegesReturn, useAlertsPrivileges } from './use_alerts_privileges'; +import type { Privilege } from './types'; +import type { UseAlertsPrivelegesReturn } from './use_alerts_privileges'; +import { useAlertsPrivileges } from './use_alerts_privileges'; import { getEndpointPrivilegesInitialStateMock } from '../../../../common/components/user_privileges/endpoint/mocks'; jest.mock('./api'); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_cases_from_alerts.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_cases_from_alerts.tsx index eeb7968d6b2f2..f1d094c7ca72f 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_cases_from_alerts.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_cases_from_alerts.tsx @@ -11,7 +11,7 @@ import { APP_ID } from '../../../../../common/constants'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { getCaseIdsFromAlertId } from './api'; import { CASES_FROM_ALERTS_FAILURE } from './translations'; -import { CasesFromAlertsResponse } from './types'; +import type { CasesFromAlertsResponse } from './types'; interface CasesFromAlertsStatus { loading: boolean; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.test.tsx index 5ed7a219e5068..1f346fc7071b0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.test.tsx @@ -6,7 +6,8 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useQueryAlerts, ReturnQueryAlerts } from './use_query'; +import type { ReturnQueryAlerts } from './use_query'; +import { useQueryAlerts } from './use_query'; import * as api from './api'; import { mockAlertsQuery, alertsMock } from './mock'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.tsx index 2b98987e52675..b958db878e248 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_query.tsx @@ -6,10 +6,13 @@ */ import { isEmpty } from 'lodash'; -import React, { SetStateAction, useEffect, useState } from 'react'; +import type { SetStateAction } from 'react'; +import type React from 'react'; +import { useEffect, useState } from 'react'; -import { fetchQueryAlerts, fetchQueryRuleRegistryAlerts } from './api'; -import { AlertSearchResponse } from './types'; +import type { fetchQueryRuleRegistryAlerts } from './api'; +import { fetchQueryAlerts } from './api'; +import type { AlertSearchResponse } from './types'; type Func = () => Promise; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx index ad4ad5062c9d5..4e2110c1b0013 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx @@ -6,7 +6,8 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; import { TestProvidersWithPrivileges } from '../../../../common/mock'; -import { useSignalIndex, ReturnSignalIndex } from './use_signal_index'; +import type { ReturnSignalIndex } from './use_signal_index'; +import { useSignalIndex } from './use_signal_index'; import * as api from './api'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_config.mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_config.mock.ts index b2bbe7f4af2e1..94d506b1e7af7 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_config.mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_config.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UseListsConfigReturn } from './use_lists_config'; +import type { UseListsConfigReturn } from './use_lists_config'; export const getUseListsConfigMock: () => jest.Mocked = () => ({ canManageIndex: null, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_index.mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_index.mock.ts index 8574614d771ce..b7999d14abfca 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_index.mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_index.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UseListsIndexReturn } from './use_lists_index'; +import type { UseListsIndexReturn } from './use_lists_index'; export const getUseListsIndexMock: () => jest.Mocked = () => ({ createIndex: jest.fn(), diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.mock.ts index a7dd1f343f0a1..07cd2ad3ba795 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UseListsPrivilegesReturn } from './use_lists_privileges'; +import type { UseListsPrivilegesReturn } from './use_lists_privileges'; export const getUseListsPrivilegesMock: () => jest.Mocked = () => ({ isAuthenticated: null, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.tsx index 5f21f0287d7ea..10d8428f4a1b8 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists/use_lists_privileges.tsx @@ -7,7 +7,7 @@ import { useEffect, useState } from 'react'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; -import { Privilege } from '../alerts/types'; +import type { Privilege } from '../alerts/types'; export interface UseListsPrivilegesState { isAuthenticated: boolean | null; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/__mocks__/api.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/__mocks__/api.ts index 4a31022a3b9ca..04df981c197f0 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/__mocks__/api.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/__mocks__/api.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { GetAggregateRuleExecutionEventsResponse, GetInstalledIntegrationsResponse, RulesSchema, @@ -14,7 +14,7 @@ import { import { getRulesSchemaMock } from '../../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { savedRuleMock, rulesMock } from '../mock'; -import { +import type { PatchRuleProps, CreateRulesProps, UpdateRulesProps, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts index 5194cd3514542..4a0f531f386ce 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { camelCase } from 'lodash'; import dateMath from '@kbn/datemath'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { DETECTION_ENGINE_RULES_URL, @@ -20,22 +20,22 @@ import { detectionEngineRuleExecutionEventsUrl, DETECTION_ENGINE_INSTALLED_INTEGRATIONS_URL, } from '../../../../../common/constants'; -import { +import type { AggregateRuleExecutionEvent, BulkAction, RuleExecutionStatus, } from '../../../../../common/detection_engine/schemas/common'; -import { +import type { FullResponseSchema, PreviewResponse, } from '../../../../../common/detection_engine/schemas/request'; -import { +import type { RulesSchema, GetAggregateRuleExecutionEventsResponse, } from '../../../../../common/detection_engine/schemas/response'; -import { GetInstalledIntegrationsResponse } from '../../../../../common/detection_engine/schemas/response/get_installed_integrations_response_schema'; +import type { GetInstalledIntegrationsResponse } from '../../../../../common/detection_engine/schemas/response/get_installed_integrations_response_schema'; -import { +import type { UpdateRulesProps, CreateRulesProps, FetchRulesProps, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/mock.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/mock.ts index 8a23cbf9e4318..99c38b6a62a1d 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; -import { FetchRulesResponse, Rule } from './types'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { FetchRulesResponse, Rule } from './types'; export const savedRuleMock: Rule = { author: [], diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/transforms.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/transforms.ts index 891e7f47c1b7e..ab4d1eedbd2ae 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/transforms.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/transforms.ts @@ -7,11 +7,11 @@ import { flow } from 'fp-ts/lib/function'; import { addIdToItem, removeIdFromItem } from '@kbn/securitysolution-utils'; -import { +import type { CreateRulesSchema, UpdateRulesSchema, } from '../../../../../common/detection_engine/schemas/request'; -import { Rule } from './types'; +import type { Rule } from './types'; // These are a collection of transforms that are UI specific and useful for UI concerns // that are inserted between the API and the actual user interface. In some ways these diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts index 630e8804d31e5..cab5f995027fb 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/types.ts @@ -21,10 +21,14 @@ import { severity_mapping, severity, } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + SortOrder, + BulkAction, + BulkActionEditPayload, +} from '../../../../../common/detection_engine/schemas/common'; import { alias_purpose as savedObjectResolveAliasPurpose, outcome as savedObjectResolveOutcome, - SortOrder, author, building_block_type, license, @@ -35,15 +39,13 @@ import { event_category_override, tiebreaker_field, threshold, - BulkAction, - BulkActionEditPayload, ruleExecutionSummary, RelatedIntegrationArray, RequiredFieldArray, SetupGuide, } from '../../../../../common/detection_engine/schemas/common'; -import { +import type { CreateRulesSchema, PatchRulesSchema, UpdateRulesSchema, diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx index f890b5708148f..71d8aacff4280 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.test.tsx @@ -7,7 +7,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { useCreateRule, ReturnCreateRule } from './use_create_rule'; +import type { ReturnCreateRule } from './use_create_rule'; +import { useCreateRule } from './use_create_rule'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx index f71f20cb6c189..fc64a20aa0e5a 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_create_rule.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { useEffect, useState, Dispatch } from 'react'; +import type { Dispatch } from 'react'; +import { useEffect, useState } from 'react'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { CreateRulesSchema } from '../../../../../common/detection_engine/schemas/request'; +import type { CreateRulesSchema } from '../../../../../common/detection_engine/schemas/request'; import { createRule } from './api'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.test.tsx index 65bb1b5e06820..1a40d260b476c 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.test.tsx @@ -11,11 +11,11 @@ import { coreMock } from '@kbn/core/public/mocks'; import * as api from './api'; import { getRulesSchemaMock } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; -import { +import type { ReturnUseDissasociateExceptionList, UseDissasociateExceptionListProps, - useDissasociateExceptionList, } from './use_dissasociate_exception_list'; +import { useDissasociateExceptionList } from './use_dissasociate_exception_list'; const mockKibanaHttpService = coreMock.createStart().http; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.tsx index 1c9dd79d36031..ecb9b7c095786 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_dissasociate_exception_list.tsx @@ -8,7 +8,7 @@ import { useEffect, useState, useRef } from 'react'; import type { List } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { patchRule } from './api'; type Func = (lists: List[]) => void; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_find_rules_query.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_find_rules_query.ts index 6e212cebc85d1..e78be9ca1c753 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_find_rules_query.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_find_rules_query.ts @@ -6,11 +6,12 @@ */ import { useCallback } from 'react'; -import { useQuery, useQueryClient, UseQueryOptions } from 'react-query'; +import type { UseQueryOptions } from 'react-query'; +import { useQuery, useQueryClient } from 'react-query'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { fetchRules } from './api'; import * as i18n from './translations'; -import { FilterOptions, PaginationOptions, Rule, SortingOptions } from './types'; +import type { FilterOptions, PaginationOptions, Rule, SortingOptions } from './types'; export interface FindRulesQueryArgs { filterOptions?: FilterOptions; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx index dfeaca617ed24..dda2c1d198583 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_pre_packaged_rules.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; import { renderHook, act } from '@testing-library/react-hooks'; -import { ReturnPrePackagedRulesAndTimelines, usePrePackagedRules } from './use_pre_packaged_rules'; +import type { ReturnPrePackagedRulesAndTimelines } from './use_pre_packaged_rules'; +import { usePrePackagedRules } from './use_pre_packaged_rules'; import * as api from './api'; import { shallow } from 'enzyme'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_preview_rule.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_preview_rule.ts index 3d813c8d10a68..a31cee9309d6a 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_preview_rule.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_preview_rule.ts @@ -7,14 +7,14 @@ import { useEffect, useState } from 'react'; -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; import { RULE_PREVIEW_FROM, RULE_PREVIEW_INTERVAL, RULE_PREVIEW_INVOCATION_COUNT, } from '../../../../../common/detection_engine/constants'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { +import type { PreviewResponse, CreateRulesSchema, } from '../../../../../common/detection_engine/schemas/request'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.test.tsx index 3ca18552a85ef..89e32793b9e9a 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.test.tsx @@ -6,7 +6,8 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useRule, ReturnRule } from './use_rule'; +import type { ReturnRule } from './use_rule'; +import { useRule } from './use_rule'; import * as api from './api'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.tsx index 4e5480a921493..bef089555128d 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule.tsx @@ -11,7 +11,7 @@ import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { fetchRuleById } from './api'; import { transformInput } from './transforms'; import * as i18n from './translations'; -import { Rule } from './types'; +import type { Rule } from './types'; export type ReturnRule = [boolean, Rule | null]; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_async.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_async.tsx index 8edf2bbd7a685..ab93a50f12829 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_async.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_async.tsx @@ -12,7 +12,7 @@ import { useAsync, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; import { useHttp } from '../../../../common/lib/kibana'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { pureFetchRuleById } from './api'; -import { Rule } from './types'; +import type { Rule } from './types'; import * as i18n from './translations'; import { transformInput } from './transforms'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx index e18d1f6c2ce5c..2aa378379fc14 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_execution_events.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useQuery } from 'react-query'; -import { +import type { AggregateRuleExecutionEvent, RuleExecutionStatus, } from '../../../../../common/detection_engine/schemas/common'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { fetchRuleExecutionEvents } from './api'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.test.tsx index c181aeccf7bf2..5f43d123afcd4 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.test.tsx @@ -6,9 +6,9 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { SecurityAppError } from '@kbn/securitysolution-t-grid'; +import type { SecurityAppError } from '@kbn/securitysolution-t-grid'; import { alertsMock8x, alertMockEmptyResults } from '../alerts/mock'; -import { AlertSearchResponse } from '../alerts/types'; +import type { AlertSearchResponse } from '../alerts/types'; import { useRuleWithFallback } from './use_rule_with_fallback'; import * as api from './api'; import * as alertsAPI from '../alerts/api'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.tsx index 3b2f7d8381b59..f7c24edbbd13d 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_with_fallback.tsx @@ -12,12 +12,12 @@ import { isNotFoundError } from '@kbn/securitysolution-t-grid'; import { expandDottedObject } from '../../../../../common/utils/expand_dotted'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { AlertSearchResponse } from '../alerts/types'; +import type { AlertSearchResponse } from '../alerts/types'; import { useQueryAlerts } from '../alerts/use_query'; import { fetchRuleById } from './api'; import { transformInput } from './transforms'; import * as i18n from './translations'; -import { Rule } from './types'; +import type { Rule } from './types'; interface UseRuleWithFallback { error: unknown; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_tags.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_tags.test.tsx index 5499185f61d2e..52b37d6c3d4bf 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_tags.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_tags.test.tsx @@ -8,7 +8,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; -import { useTags, ReturnTags } from './use_tags'; +import type { ReturnTags } from './use_tags'; +import { useTags } from './use_tags'; jest.mock('./api'); jest.mock('../../../../common/hooks/use_app_toasts'); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx index c2841c64ba4a3..c25242e03126e 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.test.tsx @@ -7,7 +7,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; -import { useUpdateRule, ReturnUpdateRule } from './use_update_rule'; +import type { ReturnUpdateRule } from './use_update_rule'; +import { useUpdateRule } from './use_update_rule'; import { getUpdateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx index 3f48f55cad4a4..e0144ff8e88eb 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_update_rule.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { useEffect, useState, Dispatch } from 'react'; +import type { Dispatch } from 'react'; +import { useEffect, useState } from 'react'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { UpdateRulesSchema } from '../../../../../common/detection_engine/schemas/request'; +import type { UpdateRulesSchema } from '../../../../../common/detection_engine/schemas/request'; import { transformOutput } from './transforms'; diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts index dff02aa3d3a75..6e773e3307e4b 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FilterOptions } from './types'; +import type { FilterOptions } from './types'; import { convertRulesFilterToKQL } from './utils'; describe('convertRulesFilterToKQL', () => { diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts index 8c576979a15c0..07c2210a329bb 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/utils.ts @@ -6,7 +6,7 @@ */ import { escapeKuery } from '../../../../common/lib/keury'; -import { FilterOptions } from './types'; +import type { FilterOptions } from './types'; const SEARCHABLE_RULE_PARAMS = [ 'alert.attributes.name', diff --git a/x-pack/plugins/security_solution/public/detections/index.ts b/x-pack/plugins/security_solution/public/detections/index.ts index 9b7345fe1ac15..2a215a635457d 100644 --- a/x-pack/plugins/security_solution/public/detections/index.ts +++ b/x-pack/plugins/security_solution/public/detections/index.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; import { getTimelinesInStorageByIds } from '../timelines/containers/local_storage'; -import { TimelineIdLiteral, TimelineId } from '../../common/types/timeline'; +import type { TimelineIdLiteral } from '../../common/types/timeline'; +import { TimelineId } from '../../common/types/timeline'; import { routes } from './routes'; -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; export const DETECTIONS_TIMELINE_IDS: TimelineIdLiteral[] = [ TimelineId.detectionsRulesDetailsPage, diff --git a/x-pack/plugins/security_solution/public/detections/links.ts b/x-pack/plugins/security_solution/public/detections/links.ts index 7a8047b2ddbb4..ddc6fb944e15c 100644 --- a/x-pack/plugins/security_solution/public/detections/links.ts +++ b/x-pack/plugins/security_solution/public/detections/links.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { ALERTS_PATH, SecurityPageName, SERVER_APP_ID } from '../../common/constants'; import { ALERTS } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; export const links: LinkItem = { id: SecurityPageName.alerts, diff --git a/x-pack/plugins/security_solution/public/detections/mitre/mitre_tactics_techniques.ts b/x-pack/plugins/security_solution/public/detections/mitre/mitre_tactics_techniques.ts index c6cad1e5b75a6..440ea07e373b9 100644 --- a/x-pack/plugins/security_solution/public/detections/mitre/mitre_tactics_techniques.ts +++ b/x-pack/plugins/security_solution/public/detections/mitre/mitre_tactics_techniques.ts @@ -11,7 +11,11 @@ import { i18n } from '@kbn/i18n'; -import { MitreTacticsOptions, MitreTechniquesOptions, MitreSubtechniquesOptions } from './types'; +import type { + MitreTacticsOptions, + MitreTechniquesOptions, + MitreSubtechniquesOptions, +} from './types'; export const tactics = [ { diff --git a/x-pack/plugins/security_solution/public/detections/mitre/valid_threat_mock.ts b/x-pack/plugins/security_solution/public/detections/mitre/valid_threat_mock.ts index 743b143213c22..c084a8a01d58e 100644 --- a/x-pack/plugins/security_solution/public/detections/mitre/valid_threat_mock.ts +++ b/x-pack/plugins/security_solution/public/detections/mitre/valid_threat_mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threats } from '@kbn/securitysolution-io-ts-alerting-types'; import { getMockThreatData } from './mitre_tactics_techniques'; const { tactic, technique, subtechnique } = getMockThreatData(); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx index 1f066751c2b92..9680692b9da53 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.test.tsx @@ -20,7 +20,8 @@ import { import { DetectionEnginePage } from './detection_engine'; import { useUserData } from '../../components/user_info'; import { useSourcererDataView } from '../../../common/containers/sourcerer'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { mockHistory, Router } from '../../../common/mock/router'; import { mockTimelines } from '../../../common/mock/mock_timelines_plugin'; import { mockBrowserFields } from '../../../common/containers/source/mock'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx index 2b1607550a8ff..58984e2703521 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @@ -20,16 +20,17 @@ import { import styled from 'styled-components'; import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef, useState } from 'react'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; +import type { Dispatch } from 'redux'; import { isTab } from '@kbn/timelines-plugin/public'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { SecurityPageName } from '../../../app/types'; import { TimelineId } from '../../../../common/types/timeline'; import { useGlobalTime } from '../../../common/containers/use_global_time'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import { FiltersGlobal } from '../../../common/components/filters_global'; import { getRulesUrl } from '../../../common/components/link_to/redirect_to_detection_engine'; import { SiemSearchBar } from '../../../common/components/search_bar'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/__mocks__/mock.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/__mocks__/mock.ts index f67b34a7149d4..8c0520b11ffea 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/__mocks__/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/__mocks__/mock.ts @@ -6,9 +6,9 @@ */ import { FilterStateStore } from '@kbn/es-query'; -import { Rule, RuleError } from '../../../../../containers/detection_engine/rules'; -import { AboutStepRule, ActionsStepRule, DefineStepRule, ScheduleStepRule } from '../../types'; -import { FieldValueQueryBar } from '../../../../../components/rules/query_bar'; +import type { Rule, RuleError } from '../../../../../containers/detection_engine/rules'; +import type { AboutStepRule, ActionsStepRule, DefineStepRule, ScheduleStepRule } from '../../types'; +import type { FieldValueQueryBar } from '../../../../../components/rules/query_bar'; import { fillEmptySeverityMappings } from '../../helpers'; import { getThreatMock } from '../../../../../../../common/detection_engine/schemas/types/threat.mock'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts index 2f03b1ebc6b90..94f5d8b2bd9c6 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/actions.ts @@ -7,24 +7,22 @@ import type { NavigateToAppOptions } from '@kbn/core/public'; import { APP_UI_ID } from '../../../../../../common/constants'; -import { - BulkAction, - BulkActionEditPayload, -} from '../../../../../../common/detection_engine/schemas/common/schemas'; -import { HTTPError } from '../../../../../../common/detection_engine/types'; +import type { BulkActionEditPayload } from '../../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkAction } from '../../../../../../common/detection_engine/schemas/common/schemas'; +import type { HTTPError } from '../../../../../../common/detection_engine/types'; import { SecurityPageName } from '../../../../../app/types'; import { getEditRuleUrl } from '../../../../../common/components/link_to/redirect_to_detection_engine'; import type { UseAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../../common/lib/telemetry'; import { downloadBlob } from '../../../../../common/utils/download_blob'; -import { +import type { BulkActionResponse, BulkActionSummary, - performBulkAction, } from '../../../../containers/detection_engine/rules'; +import { performBulkAction } from '../../../../containers/detection_engine/rules'; import * as i18n from '../translations'; import { getExportedRulesCounts } from './helpers'; -import { RulesTableActions } from './rules_table/rules_table_context'; +import type { RulesTableActions } from './rules_table/rules_table_context'; export const goToRuleEditPage = ( ruleId: string, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_flyout.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_flyout.tsx index 07967ae53a041..4a4d33c358b0e 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_flyout.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/bulk_edit_flyout.tsx @@ -7,10 +7,8 @@ import React from 'react'; -import { - BulkActionEditType, - BulkActionEditPayload, -} from '../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../../../common/detection_engine/schemas/common/schemas'; import { IndexPatternsForm } from './forms/index_patterns_form'; import { TagsForm } from './forms/tags_form'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/bulk_edit_form_wrapper.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/bulk_edit_form_wrapper.tsx index 5eae640f2aaf0..26a555b7de335 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/bulk_edit_form_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/bulk_edit_form_wrapper.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC } from 'react'; +import type { FC } from 'react'; +import React from 'react'; import { useGeneratedHtmlId, EuiFlyout, @@ -19,7 +20,8 @@ import { EuiFlyoutBody, } from '@elastic/eui'; -import { Form, FormHook } from '../../../../../../../shared_imports'; +import type { FormHook } from '../../../../../../../shared_imports'; +import { Form } from '../../../../../../../shared_imports'; import * as i18n from '../../../translations'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx index fa027cb2e4f75..b966150b06f4d 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/index_patterns_form.tsx @@ -14,11 +14,10 @@ import * as i18n from '../../../translations'; import { DEFAULT_INDEX_KEY } from '../../../../../../../../common/constants'; import { useKibana } from '../../../../../../../common/lib/kibana'; -import { - BulkActionEditType, - BulkActionEditPayload, -} from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { FormSchema } from '../../../../../../../shared_imports'; import { Field, getUseField, @@ -26,7 +25,6 @@ import { useForm, FIELD_TYPES, fieldValidators, - FormSchema, } from '../../../../../../../shared_imports'; import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/tags_form.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/tags_form.tsx index f04d1ea3cf164..366115623d041 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/tags_form.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/tags_form.tsx @@ -11,11 +11,10 @@ import { FormattedMessage } from '@kbn/i18n-react'; import * as i18n from '../../../translations'; import { caseInsensitiveSort } from '../../helpers'; -import { - BulkActionEditType, - BulkActionEditPayload, -} from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { FormSchema } from '../../../../../../../shared_imports'; import { useForm, Field, @@ -23,7 +22,6 @@ import { useFormData, FIELD_TYPES, fieldValidators, - FormSchema, } from '../../../../../../../shared_imports'; import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/timeline_template_form.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/timeline_template_form.tsx index 8e67b2711a278..703e1b7b51fda 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/timeline_template_form.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/forms/timeline_template_form.tsx @@ -8,12 +8,11 @@ import React, { useCallback } from 'react'; import { EuiCallOut } from '@elastic/eui'; -import { useForm, UseField, FormSchema } from '../../../../../../../shared_imports'; +import type { FormSchema } from '../../../../../../../shared_imports'; +import { useForm, UseField } from '../../../../../../../shared_imports'; import { PickTimeline } from '../../../../../../components/rules/pick_timeline'; -import { - BulkActionEditType, - BulkActionEditPayload, -} from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../../../../common/detection_engine/schemas/common/schemas'; import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; import { bulkApplyTimelineTemplate as i18n } from '../translations'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx index a9da49b6a9316..e4aecd76bb1b3 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_actions.tsx @@ -8,22 +8,17 @@ import React, { useCallback } from 'react'; import { useQueryClient } from 'react-query'; -import { - EuiTextColor, - EuiContextMenuPanelDescriptor, - EuiFlexGroup, - EuiButton, - EuiFlexItem, -} from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiTextColor, EuiFlexGroup, EuiButton, EuiFlexItem } from '@elastic/eui'; import { euiThemeVars } from '@kbn/ui-theme'; import { useIsMounted } from '@kbn/securitysolution-hook-utils'; import type { Toast } from '@kbn/core/public'; import { mountReactNode } from '@kbn/core/public/utils'; +import type { BulkActionEditPayload } from '../../../../../../../common/detection_engine/schemas/common/schemas'; import { BulkAction, BulkActionEditType, - BulkActionEditPayload, } from '../../../../../../../common/detection_engine/schemas/common/schemas'; import { isMlRule } from '../../../../../../../common/machine_learning/helpers'; import { canEditRuleWithActions } from '../../../../../../common/utils/privileges'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_edit_form_flyout.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_edit_form_flyout.ts index 6888d86345b70..babdd1bfa536e 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_edit_form_flyout.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_bulk_edit_form_flyout.ts @@ -7,7 +7,7 @@ import { useState, useCallback, useRef } from 'react'; import { useAsyncConfirmation } from '../rules_table/use_async_confirmation'; -import { +import type { BulkActionEditType, BulkActionEditPayload, } from '../../../../../../../common/detection_engine/schemas/common/schemas'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts index 761d7a2a917ea..11218a6a9bd1f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/bulk_actions/use_custom_rules_count.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { useQuery, QueryClient } from 'react-query'; +import type { QueryClient } from 'react-query'; +import { useQuery } from 'react-query'; import { fetchRules } from '../../../../../containers/detection_engine/rules/api'; import type { FilterOptions } from '../../../../../containers/detection_engine/rules/types'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/columns.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/columns.tsx index 85612c124f24c..2257d9b79905c 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/columns.tsx @@ -6,18 +6,19 @@ */ import React from 'react'; -import { EuiButtonIcon, EuiBasicTableColumn, EuiToolTip } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; import { DEFAULT_RELATIVE_DATE_THRESHOLD } from '../../../../../../../common/constants'; -import { FormatUrl } from '../../../../../../common/components/link_to'; +import type { FormatUrl } from '../../../../../../common/components/link_to'; import { PopoverItems } from '../../../../../../common/components/popover_items'; import { FormattedRelativePreferenceDate } from '../../../../../../common/components/formatted_date'; import { getRuleDetailsUrl } from '../../../../../../common/components/link_to/redirect_to_detection_engine'; import { LinkAnchor } from '../../../../../../common/components/links'; import * as i18n from './translations'; -import { ExceptionListInfo } from './use_all_exception_lists'; -import { ExceptionsTableItem } from './types'; +import type { ExceptionListInfo } from './use_all_exception_lists'; +import type { ExceptionsTableItem } from './types'; export type AllExceptionListsColumns = EuiBasicTableColumn; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_search_bar.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_search_bar.tsx index d86e7b1b7259c..0a348a28a0a38 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_search_bar.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_search_bar.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { EuiSearchBar, EuiSearchBarProps } from '@elastic/eui'; +import type { EuiSearchBarProps } from '@elastic/eui'; +import { EuiSearchBar } from '@elastic/eui'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx index 8521358dac1f1..415bbfd1498c7 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/exceptions_table.tsx @@ -6,13 +6,12 @@ */ import React, { useMemo, useEffect, useCallback, useState } from 'react'; +import type { CriteriaWithPagination, EuiSearchBarProps } from '@elastic/eui'; import { - CriteriaWithPagination, EuiBasicTable, EuiEmptyPrompt, EuiLoadingContent, EuiProgress, - EuiSearchBarProps, EuiSpacer, EuiPageHeader, EuiHorizontalRule, @@ -28,7 +27,8 @@ import { Loader } from '../../../../../../common/components/loader'; import * as i18n from './translations'; import { AllRulesUtilityBar } from '../utility_bar'; -import { AllExceptionListsColumns, getAllExceptionListsColumns } from './columns'; +import type { AllExceptionListsColumns } from './columns'; +import { getAllExceptionListsColumns } from './columns'; import { useAllExceptionLists } from './use_all_exception_lists'; import { ReferenceErrorModal } from '../../../../../components/value_lists_management_flyout/reference_error_modal'; import { patchRule } from '../../../../../containers/detection_engine/rules/api'; @@ -38,7 +38,7 @@ import { SecurityPageName } from '../../../../../../../common/constants'; import { useUserData } from '../../../../../components/user_info'; import { userHasPermissions } from '../../helpers'; import { useListsConfig } from '../../../../../containers/detection_engine/lists/use_lists_config'; -import { ExceptionsTableItem } from './types'; +import type { ExceptionsTableItem } from './types'; import { MissingPrivilegesCallOut } from '../../../../../components/callouts/missing_privileges_callout'; import { ALL_ENDPOINT_ARTIFACT_LIST_IDS } from '../../../../../../../common/endpoint/service/artifacts/constants'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/types.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/types.ts index d7cbb924071f2..316ad93ad8183 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/types.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExceptionListInfo } from './use_all_exception_lists'; +import type { ExceptionListInfo } from './use_all_exception_lists'; export interface ExceptionsTableItem extends ExceptionListInfo { isDeleting: boolean; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/use_all_exception_lists.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/use_all_exception_lists.tsx index 4c65be03b24dd..f48de2459fea7 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/use_all_exception_lists.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/exceptions/use_all_exception_lists.tsx @@ -8,7 +8,7 @@ import { useCallback, useEffect, useState } from 'react'; import type { ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { Rule } from '../../../../../containers/detection_engine/rules'; +import type { Rule } from '../../../../../containers/detection_engine/rules'; import { fetchRules } from '../../../../../containers/detection_engine/rules/api'; export interface ExceptionListInfo extends ExceptionListSchema { rules: Rule[]; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/feature_tour/rules_feature_tour.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/feature_tour/rules_feature_tour.tsx index 59a26a2289190..5f906c2cc8a8a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/feature_tour/rules_feature_tour.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/feature_tour/rules_feature_tour.tsx @@ -5,21 +5,24 @@ * 2.0. */ +import type { + EuiStatelessTourStep, + EuiTourActions, + EuiTourState, + EuiTourStepProps, +} from '@elastic/eui'; import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiSpacer, - EuiStatelessTourStep, EuiText, - EuiTourActions, - EuiTourState, EuiTourStep, - EuiTourStepProps, useEuiTour, } from '@elastic/eui'; import { noop } from 'lodash'; -import React, { FC, useEffect, useMemo, useState } from 'react'; +import type { FC } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { RULES_MANAGEMENT_FEATURE_TOUR_STORAGE_KEY } from '../../../../../../../common/constants'; import { useKibana } from '../../../../../../common/lib/kibana'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.ts index 301e5cbe99b50..b265930d9d5b2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/helpers.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Query } from '@elastic/eui'; -import { ExportRulesDetails } from '../../../../../../common/detection_engine/schemas/response/export_rules_details_schema'; -import { BulkActionSummary } from '../../../../containers/detection_engine/rules'; +import type { Query } from '@elastic/eui'; +import type { ExportRulesDetails } from '../../../../../../common/detection_engine/schemas/response/export_rules_details_schema'; +import type { BulkActionSummary } from '../../../../containers/detection_engine/rules'; export const showRulesTable = ({ rulesCustomInstalled, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx index 88de5252eafaa..8307942471f12 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/index.tsx @@ -7,7 +7,7 @@ import { EuiSpacer } from '@elastic/eui'; import React, { useState } from 'react'; -import { CreatePreBuiltRules } from '../../../../containers/detection_engine/rules'; +import type { CreatePreBuiltRules } from '../../../../containers/detection_engine/rules'; import { RulesTables } from './rules_tables'; import { AllRulesTabs, RulesTableToolbar } from './rules_table_toolbar'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/__mocks__/rules_table_context.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/__mocks__/rules_table_context.tsx index 86fcdcfe8b3f7..c7715ccffa135 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/__mocks__/rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/__mocks__/rules_table_context.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { RulesTableContextType } from '../rules_table_context'; +import type { RulesTableContextType } from '../rules_table_context'; export const useRulesTableContextMock = { create: (): jest.Mocked => ({ diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/rules_table_context.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/rules_table_context.tsx index 243e70683875f..72cba6dd95f56 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/rules_table_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/rules_table_context.tsx @@ -17,7 +17,7 @@ import React, { import { DEFAULT_RULES_TABLE_REFRESH_SETTING } from '../../../../../../../common/constants'; import { invariant } from '../../../../../../../common/utils/invariant'; import { useKibana, useUiSetting$ } from '../../../../../../common/lib/kibana'; -import { +import type { FilterOptions, PaginationOptions, Rule, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/use_find_rules.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/use_find_rules.ts index 6544df7e7ed2a..2cdd3ab4b8e46 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/use_find_rules.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/use_find_rules.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - useFindRulesQuery, - FindRulesQueryArgs, -} from '../../../../../containers/detection_engine/rules/use_find_rules_query'; +import type { FindRulesQueryArgs } from '../../../../../containers/detection_engine/rules/use_find_rules_query'; +import { useFindRulesQuery } from '../../../../../containers/detection_engine/rules/use_find_rules_query'; interface UseFindRulesArgs extends FindRulesQueryArgs { isInMemorySorting: boolean; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/utils.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/utils.ts index 12d114cb3c990..13fe9230d2114 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table/utils.ts @@ -6,7 +6,7 @@ */ import { get } from 'lodash'; -import { Rule, SortingOptions } from '../../../../../containers/detection_engine/rules/types'; +import type { Rule, SortingOptions } from '../../../../../containers/detection_engine/rules/types'; /** * Returns a comparator function to be used with .sort() diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx index 9bbbcb7d55cab..0a0ca10d4016d 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_actions.tsx @@ -5,22 +5,22 @@ * 2.0. */ -import { +import type { DefaultItemAction, EuiBasicTableColumn, EuiTableActionsColumnType, - EuiToolTip, } from '@elastic/eui'; +import { EuiToolTip } from '@elastic/eui'; import React from 'react'; -import { NavigateToAppOptions } from '@kbn/core/public'; +import type { NavigateToAppOptions } from '@kbn/core/public'; import { BulkAction } from '../../../../../../common/detection_engine/schemas/common/schemas'; -import { UseAppToasts } from '../../../../../common/hooks/use_app_toasts'; +import type { UseAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { canEditRuleWithActions } from '../../../../../common/utils/privileges'; -import { Rule } from '../../../../containers/detection_engine/rules'; +import type { Rule } from '../../../../containers/detection_engine/rules'; import * as i18n from '../translations'; import { executeRulesBulkAction, goToRuleEditPage } from './actions'; -import { RulesTableActions } from './rules_table/rules_table_context'; -import { useStartTransaction } from '../../../../../common/lib/apm/use_start_transaction'; +import type { RulesTableActions } from './rules_table/rules_table_context'; +import type { useStartTransaction } from '../../../../../common/lib/apm/use_start_transaction'; import { SINGLE_RULE_ACTIONS } from '../../../../../common/lib/apm/user_actions'; type NavigateToApp = (appId: string, options?: NavigateToAppOptions | undefined) => Promise; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx index ca2c2b4d00d30..683e36c391614 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_filters/tags_filter_popover.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { EuiFilterButton, EuiFilterSelectItem, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx index 37ee0e5a27fb9..cf8d253dbcc89 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_table_toolbar.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiSwitch, EuiSwitchEvent, EuiTab, EuiTabs, EuiToolTip } from '@elastic/eui'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import { EuiSwitch, EuiTab, EuiTabs, EuiToolTip } from '@elastic/eui'; import React, { useCallback } from 'react'; import styled from 'styled-components'; import { useRulesTableContext } from './rules_table/rules_table_context'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx index 0693da95ace82..059084e0ed7bc 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/rules_tables.tsx @@ -22,7 +22,7 @@ import { Loader } from '../../../../../common/components/loader'; import { useBoolState } from '../../../../../common/hooks/use_bool_state'; import { useValueChanged } from '../../../../../common/hooks/use_value_changed'; import { PrePackagedRulesPrompt } from '../../../../components/rules/pre_packaged_rules/load_empty_prompt'; -import { +import type { CreatePreBuiltRules, Rule, RulesSortingFields, @@ -31,7 +31,7 @@ import { useRulesTableContext } from './rules_table/rules_table_context'; import { useAsyncConfirmation } from './rules_table/use_async_confirmation'; import { getPrePackagedRuleStatus } from '../helpers'; import * as i18n from '../translations'; -import { EuiBasicTableOnChange } from '../types'; +import type { EuiBasicTableOnChange } from '../types'; import { useMonitoringColumns, useRulesColumns } from './use_columns'; import { showRulesTable } from './helpers'; import { RulesTableFilters } from './rules_table_filters/rules_table_filters'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx index bb3f3dc8cb481..73e3475410031 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/use_columns.tsx @@ -5,14 +5,8 @@ * 2.0. */ -import { - EuiBadge, - EuiBasicTableColumn, - EuiLink, - EuiTableActionsColumnType, - EuiText, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiBasicTableColumn, EuiTableActionsColumnType } from '@elastic/eui'; +import { EuiBadge, EuiLink, EuiText, EuiToolTip } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo } from 'react'; import { IntegrationsPopover } from '../../../../components/rules/related_integrations/integrations_popover'; @@ -33,7 +27,7 @@ import { useKibana, useUiSetting$ } from '../../../../../common/lib/kibana'; import { canEditRuleWithActions, getToolTipContent } from '../../../../../common/utils/privileges'; import { RuleSwitch } from '../../../../components/rules/rule_switch'; import { SeverityBadge } from '../../../../components/rules/severity_badge'; -import { Rule } from '../../../../containers/detection_engine/rules'; +import type { Rule } from '../../../../containers/detection_engine/rules'; import { useRulesTableContext } from './rules_table/rules_table_context'; import * as i18n from '../translations'; import { PopoverTooltip } from './popover_tooltip'; @@ -42,7 +36,7 @@ import { useHasActionsPrivileges } from './use_has_actions_privileges'; import { useHasMlPermissions } from './use_has_ml_permissions'; import { getRulesTableActions } from './rules_table_actions'; import { RuleStatusBadge } from '../../../../components/rules/rule_execution_status'; -import { +import type { DurationMetric, RuleExecutionSummary, } from '../../../../../../common/detection_engine/schemas/common'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.tsx index 4e2f18ea7832d..4809a44528e2a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/utility_bar.tsx @@ -5,12 +5,11 @@ * 2.0. */ +import type { EuiSwitchEvent, EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiContextMenu, EuiContextMenuPanel, EuiSwitch, - EuiSwitchEvent, - EuiContextMenuPanelDescriptor, EuiTextColor, EuiSpacer, } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.test.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.test.ts index 4cca73b4ffcc2..f56f0e8630f94 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.test.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { List } from '@kbn/securitysolution-io-ts-list-types'; -import { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; -import { Rule } from '../../../../containers/detection_engine/rules'; +import type { List } from '@kbn/securitysolution-io-ts-list-types'; +import type { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; +import type { Rule } from '../../../../containers/detection_engine/rules'; import { getListMock, getEndpointListMock, } from '../../../../../../common/detection_engine/schemas/types/lists.mock'; -import { +import type { DefineStepRuleJson, ScheduleStepRuleJson, AboutStepRuleJson, @@ -40,7 +40,7 @@ import { mockActionsStepRule, } from '../all/__mocks__/mock'; import { getThreatMock } from '../../../../../../common/detection_engine/schemas/types/threat.mock'; -import { Threat, Threats } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Threat, Threats } from '@kbn/securitysolution-io-ts-alerting-types'; describe('helpers', () => { describe('getTimeTypeValue', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.ts index 13d3af58d1e99..67d56f9d6025a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.ts @@ -6,7 +6,7 @@ */ import { has, isEmpty } from 'lodash/fp'; -import { Unit } from '@kbn/datemath'; +import type { Unit } from '@kbn/datemath'; import moment from 'moment'; import deepmerge from 'deepmerge'; @@ -15,7 +15,7 @@ import type { NamespaceType, List, } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { ThreatMapping, Threats, ThreatSubtechnique, @@ -26,8 +26,8 @@ import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../../../common/constants'; import { assertUnreachable } from '../../../../../../common/utility_types'; import { transformAlertToRuleAction } from '../../../../../../common/detection_engine/transform_actions'; -import { Rule } from '../../../../containers/detection_engine/rules'; -import { +import type { Rule } from '../../../../containers/detection_engine/rules'; +import type { AboutStepRule, DefineStepRule, ScheduleStepRule, @@ -39,13 +39,13 @@ import { RuleStepsFormData, RuleStep, } from '../types'; -import { FieldValueQueryBar } from '../../../../components/rules/query_bar'; -import { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; +import type { FieldValueQueryBar } from '../../../../components/rules/query_bar'; +import type { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; import { stepDefineDefaultValue } from '../../../../components/rules/step_define_rule'; import { stepAboutDefaultValue } from '../../../../components/rules/step_about_rule/default_value'; import { stepActionsDefaultValue } from '../../../../components/rules/step_rule_actions'; -import { FieldValueThreshold } from '../../../../components/rules/threshold_input'; -import { EqlOptionsSelected } from '../../../../../../common/search_strategy'; +import type { FieldValueThreshold } from '../../../../components/rules/threshold_input'; +import type { EqlOptionsSelected } from '../../../../../../common/search_strategy'; export const getTimeTypeValue = (time: string): { unit: string; value: number } => { const timeObj = { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx index ccf536bcf6ae1..84debb9f9fcc9 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/index.tsx @@ -16,9 +16,9 @@ import { import React, { useCallback, useRef, useState, useMemo, useEffect } from 'react'; import styled from 'styled-components'; -import { DataViewListItem } from '@kbn/data-views-plugin/common'; +import type { DataViewListItem } from '@kbn/data-views-plugin/common'; import { useCreateRule } from '../../../../containers/detection_engine/rules'; -import { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; +import type { CreateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; import { useListsConfig } from '../../../../containers/detection_engine/lists/use_lists_config'; import { @@ -42,7 +42,8 @@ import { userHasPermissions, MaxWidthEuiFlexItem, } from '../helpers'; -import { RuleStep, RuleStepsFormData, RuleStepsFormHooks } from '../types'; +import type { RuleStepsFormData, RuleStepsFormHooks } from '../types'; +import { RuleStep } from '../types'; import { formatRule, stepIsValid } from './helpers'; import * as i18n from './translations'; import { SecurityPageName } from '../../../../../app/types'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/__mocks__/rule_details_context.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/__mocks__/rule_details_context.tsx index 257dc8ec512a8..2995e39ba942f 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/__mocks__/rule_details_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/__mocks__/rule_details_context.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleDetailsContextType } from '../rule_details_context'; +import type { RuleDetailsContextType } from '../rule_details_context'; import React from 'react'; export const useRuleDetailsContextMock = { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_columns.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_columns.tsx index 98569b701d93c..8bf9c4895e07a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_columns.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import { EuiBasicTableColumn, EuiHealth, EuiLink, EuiText } from '@elastic/eui'; -import { DocLinksStart } from '@kbn/core/public'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiHealth, EuiLink, EuiText } from '@elastic/eui'; +import type { DocLinksStart } from '@kbn/core/public'; import { FormattedMessage } from '@kbn/i18n-react'; import { capitalize } from 'lodash'; import React from 'react'; -import { +import type { AggregateRuleExecutionEvent, RuleExecutionStatus, } from '../../../../../../../common/detection_engine/schemas/common'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_table.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_table.tsx index b471493a9ecd2..fe0ff1b7b555a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_table.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/execution_log_table/execution_log_table.tsx @@ -9,25 +9,24 @@ import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import moment from 'moment'; import React, { useCallback, useMemo, useRef } from 'react'; +import type { OnTimeChangeProps, OnRefreshProps, OnRefreshChangeProps } from '@elastic/eui'; import { EuiTextColor, EuiFlexGroup, EuiFlexItem, EuiSuperDatePicker, - OnTimeChangeProps, - OnRefreshProps, - OnRefreshChangeProps, EuiSpacer, EuiSwitch, EuiBasicTable, EuiButton, } from '@elastic/eui'; -import { buildFilter, Filter, FILTERS, Query } from '@kbn/es-query'; +import type { Filter, Query } from '@kbn/es-query'; +import { buildFilter, FILTERS } from '@kbn/es-query'; import { MAX_EXECUTION_EVENTS_DISPLAYED } from '@kbn/securitysolution-rules'; import { mountReactNode } from '@kbn/core/public/utils'; import { RuleDetailTabs } from '..'; import { RULE_DETAILS_EXECUTION_LOG_TABLE_SHOW_METRIC_COLUMNS_STORAGE_KEY } from '../../../../../../../common/constants'; -import { +import type { AggregateRuleExecutionEvent, RuleExecutionStatus, } from '../../../../../../../common/detection_engine/schemas/common'; @@ -48,11 +47,13 @@ import { setFilterQuery, setRelativeRangeDatePicker, } from '../../../../../../common/store/inputs/actions'; -import { +import type { AbsoluteTimeRange, + RelativeTimeRange, +} from '../../../../../../common/store/inputs/model'; +import { isAbsoluteTimeRange, isRelativeTimeRange, - RelativeTimeRange, } from '../../../../../../common/store/inputs/model'; import { SourcererScopeName } from '../../../../../../common/store/sourcerer/model'; import { useRuleExecutionEvents } from '../../../../../containers/detection_engine/rules'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.test.tsx index 5f110a43eb8b1..66892235a0f91 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.test.tsx @@ -18,7 +18,8 @@ import { SUB_PLUGINS_REDUCER, } from '../../../../../common/mock'; import { RuleDetailsPage } from '.'; -import { createStore, State } from '../../../../../common/store'; +import type { State } from '../../../../../common/store'; +import { createStore } from '../../../../../common/store'; import { useUserData } from '../../../../components/user_info'; import { useRuleWithFallback } from '../../../../containers/detection_engine/rules/use_rule_with_fallback'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx index 9ac9442ec170f..2c9fc4c2f74d0 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx @@ -25,23 +25,22 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { noop } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useParams } from 'react-router-dom'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; import styled from 'styled-components'; -import { - ExceptionListTypeEnum, - ExceptionListIdentifiers, -} from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListIdentifiers } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import { isTab } from '@kbn/timelines-plugin/public'; -import { DataViewListItem } from '@kbn/data-views-plugin/common'; +import type { DataViewListItem } from '@kbn/data-views-plugin/common'; import { useDeepEqualSelector, useShallowEqualSelector, } from '../../../../../common/hooks/use_selector'; import { useKibana } from '../../../../../common/lib/kibana'; import { TimelineId } from '../../../../../../common/types/timeline'; -import { UpdateDateRange } from '../../../../../common/components/charts/common'; +import type { UpdateDateRange } from '../../../../../common/components/charts/common'; import { FiltersGlobal } from '../../../../../common/components/filters_global'; import { FormattedDate } from '../../../../../common/components/formatted_date'; import { @@ -51,7 +50,7 @@ import { } from '../../../../../common/components/link_to/redirect_to_detection_engine'; import { SiemSearchBar } from '../../../../../common/components/search_bar'; import { SecuritySolutionPageWrapper } from '../../../../../common/components/page_wrapper'; -import { Rule } from '../../../../containers/detection_engine/rules'; +import type { Rule } from '../../../../containers/detection_engine/rules'; import { useListsConfig } from '../../../../containers/detection_engine/lists/use_lists_config'; import { SpyRoute } from '../../../../../common/utils/route/spy_routes'; import { StepAboutRuleToggleDetails } from '../../../../components/rules/step_about_rule_details'; @@ -114,9 +113,9 @@ import * as i18n from './translations'; import { NeedAdminForUpdateRulesCallOut } from '../../../../components/callouts/need_admin_for_update_callout'; import { MissingPrivilegesCallOut } from '../../../../components/callouts/missing_privileges_callout'; import { useRuleWithFallback } from '../../../../containers/detection_engine/rules/use_rule_with_fallback'; -import { BadgeOptions } from '../../../../../common/components/header_page/types'; -import { AlertsStackByField } from '../../../../components/alerts_kpis/common/types'; -import { Status } from '../../../../../../common/detection_engine/schemas/common/schemas'; +import type { BadgeOptions } from '../../../../../common/components/header_page/types'; +import type { AlertsStackByField } from '../../../../components/alerts_kpis/common/types'; +import type { Status } from '../../../../../../common/detection_engine/schemas/common/schemas'; import { AlertsTableFilterGroup, FILTER_OPEN, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/rule_details_context.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/rule_details_context.tsx index 13b17d0493d43..f0238d54f5796 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/rule_details_context.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/rule_details_context.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import type { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { DurationRange } from '@elastic/eui/src/components/date_picker/types'; import React, { createContext, useContext, useMemo, useState } from 'react'; import { RULE_DETAILS_EXECUTION_LOG_TABLE_SHOW_METRIC_COLUMNS_STORAGE_KEY } from '../../../../../../common/constants'; -import { +import type { AggregateRuleExecutionEvent, RuleExecutionStatus, } from '../../../../../../common/detection_engine/schemas/common'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx index a563ab85be336..d28a15ac43b39 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/edit/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiTabbedContentTab } from '@elastic/eui'; import { EuiButton, EuiCallOut, @@ -12,14 +13,14 @@ import { EuiFlexItem, EuiSpacer, EuiTabbedContent, - EuiTabbedContentTab, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { FC, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import type { FC } from 'react'; +import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useParams } from 'react-router-dom'; -import { DataViewListItem } from '@kbn/data-views-plugin/common'; -import { UpdateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; +import type { DataViewListItem } from '@kbn/data-views-plugin/common'; +import type { UpdateRulesSchema } from '../../../../../../common/detection_engine/schemas/request'; import { useRule, useUpdateRule } from '../../../../containers/detection_engine/rules'; import { useListsConfig } from '../../../../containers/detection_engine/lists/use_lists_config'; import { SecuritySolutionPageWrapper } from '../../../../../common/components/page_wrapper'; @@ -51,7 +52,8 @@ import { MaxWidthEuiFlexItem, } from '../helpers'; import * as ruleI18n from '../translations'; -import { RuleStep, RuleStepsFormHooks, RuleStepsFormData, RuleStepsData } from '../types'; +import type { RuleStepsFormHooks, RuleStepsFormData, RuleStepsData } from '../types'; +import { RuleStep } from '../types'; import * as i18n from './translations'; import { SecurityPageName } from '../../../../../app/types'; import { ruleStepsOrder } from '../utils'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx index 8ec3ec057ebee..862c991b02381 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx @@ -6,8 +6,8 @@ */ import moment from 'moment'; +import type { GetStepsData } from './helpers'; import { - GetStepsData, getDefineStepsData, getScheduleStepsData, getStepsData, @@ -24,8 +24,8 @@ import { import { mockRuleWithEverything, mockRule } from './all/__mocks__/mock'; import { FilterStateStore } from '@kbn/es-query'; -import { Rule } from '../../../containers/detection_engine/rules'; -import { +import type { Rule } from '../../../containers/detection_engine/rules'; +import type { AboutStepRule, AboutStepRuleDetails, DefineStepRule, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx index c568d49fe7867..54228d672531d 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.tsx @@ -12,7 +12,7 @@ import { useLocation } from 'react-router-dom'; import styled from 'styled-components'; import { EuiFlexItem } from '@elastic/eui'; -import { +import type { Threats, Type, SeverityMapping, @@ -20,13 +20,13 @@ import { } from '@kbn/securitysolution-io-ts-alerting-types'; import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; import type { Filter } from '@kbn/es-query'; -import { ActionVariables } from '@kbn/triggers-actions-ui-plugin/public'; +import type { ActionVariables } from '@kbn/triggers-actions-ui-plugin/public'; import { normalizeThresholdField } from '../../../../../common/detection_engine/utils'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import type { RuleAlertAction } from '../../../../../common/detection_engine/types'; import { assertUnreachable } from '../../../../../common/utility_types'; import { transformRuleToAlertAction } from '../../../../../common/detection_engine/transform_actions'; -import { Rule } from '../../../containers/detection_engine/rules'; -import { +import type { Rule } from '../../../containers/detection_engine/rules'; +import type { AboutStepRule, AboutStepRuleDetails, DefineStepRule, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.test.tsx index 226134bc237b0..cc37ea7542bf2 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/index.test.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { shallow, mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { shallow, mount } from 'enzyme'; import '../../../../common/mock/match_media'; import { RulesPage } from '.'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts index 119a43efab894..f7338d874c19a 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/types.ts @@ -7,7 +7,7 @@ import type { List } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { RiskScoreMapping, ThreatIndex, ThreatMapping, @@ -17,13 +17,13 @@ import { Severity, } from '@kbn/securitysolution-io-ts-alerting-types'; import type { Filter } from '@kbn/es-query'; -import { RuleAction } from '@kbn/alerting-plugin/common'; -import { DataViewListItem } from '@kbn/data-views-plugin/common'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; +import type { DataViewListItem } from '@kbn/data-views-plugin/common'; -import { RuleAlertAction } from '../../../../../common/detection_engine/types'; -import { FieldValueQueryBar } from '../../../components/rules/query_bar'; -import { FieldValueTimeline } from '../../../components/rules/pick_timeline'; -import { FieldValueThreshold } from '../../../components/rules/threshold_input'; +import type { RuleAlertAction } from '../../../../../common/detection_engine/types'; +import type { FieldValueQueryBar } from '../../../components/rules/query_bar'; +import type { FieldValueTimeline } from '../../../components/rules/pick_timeline'; +import type { FieldValueThreshold } from '../../../components/rules/threshold_input'; import type { Author, BuildingBlockType, @@ -35,7 +35,7 @@ import type { SetupGuide, TimestampOverride, } from '../../../../../common/detection_engine/schemas/common'; -import { EqlOptionsSelected } from '../../../../../common/search_strategy'; +import type { EqlOptionsSelected } from '../../../../../common/search_strategy'; export interface EuiBasicTableSortTypes { field: string; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts index 21737d307f3fd..68a56efc1879b 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/utils.ts @@ -5,14 +5,15 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { getRuleDetailsUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import * as i18nRules from './translations'; -import { RouteSpyState } from '../../../../common/utils/route/types'; +import type { RouteSpyState } from '../../../../common/utils/route/types'; import { SecurityPageName } from '../../../../app/types'; import { RULES_PATH } from '../../../../../common/constants'; -import { RuleStep, RuleStepsOrder } from './types'; -import { GetSecuritySolutionUrl } from '../../../../common/components/link_to'; +import type { RuleStepsOrder } from './types'; +import { RuleStep } from './types'; +import type { GetSecuritySolutionUrl } from '../../../../common/components/link_to'; export const ruleStepsOrder: RuleStepsOrder = [ RuleStep.defineRule, diff --git a/x-pack/plugins/security_solution/public/detections/routes.tsx b/x-pack/plugins/security_solution/public/detections/routes.tsx index 5b7b85c0183aa..b77f61085212c 100644 --- a/x-pack/plugins/security_solution/public/detections/routes.tsx +++ b/x-pack/plugins/security_solution/public/detections/routes.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { Redirect, RouteProps, RouteComponentProps } from 'react-router-dom'; +import type { RouteProps, RouteComponentProps } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import { ALERTS_PATH, DETECTIONS_PATH } from '../../common/constants'; import { Alerts } from './pages/alerts'; diff --git a/x-pack/plugins/security_solution/public/exceptions/index.ts b/x-pack/plugins/security_solution/public/exceptions/index.ts index 6854612c7db92..938e85a99c1b6 100644 --- a/x-pack/plugins/security_solution/public/exceptions/index.ts +++ b/x-pack/plugins/security_solution/public/exceptions/index.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { DETECTIONS_TIMELINE_IDS } from '../detections'; import { getTimelinesInStorageByIds } from '../timelines/containers/local_storage'; import { routes } from './routes'; diff --git a/x-pack/plugins/security_solution/public/helpers.test.tsx b/x-pack/plugins/security_solution/public/helpers.test.tsx index 63d7bc4b1699f..c9895da6753d9 100644 --- a/x-pack/plugins/security_solution/public/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/helpers.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import { Capabilities } from '@kbn/core/public'; +import type { Capabilities } from '@kbn/core/public'; import { CASES_FEATURE_ID, SERVER_APP_ID } from '../common/constants'; import { mockEcsDataWithAlert } from './common/mock'; import { ALERT_RULE_UUID, ALERT_RULE_NAME, ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; @@ -17,7 +17,7 @@ import { RedirectRoute, getField, } from './helpers'; -import { StartedSubPlugins } from './types'; +import type { StartedSubPlugins } from './types'; describe('public helpers parseRoute', () => { it('should properly parse hash route', () => { diff --git a/x-pack/plugins/security_solution/public/helpers.tsx b/x-pack/plugins/security_solution/public/helpers.tsx index ce4e2a448763c..4520f70e3ab76 100644 --- a/x-pack/plugins/security_solution/public/helpers.tsx +++ b/x-pack/plugins/security_solution/public/helpers.tsx @@ -8,9 +8,10 @@ import { ALERT_RULE_UUID, ALERT_RULE_NAME, ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; import { has, get, isEmpty } from 'lodash/fp'; import React from 'react'; -import { matchPath, RouteProps, Redirect } from 'react-router-dom'; +import type { RouteProps } from 'react-router-dom'; +import { matchPath, Redirect } from 'react-router-dom'; -import { Capabilities, CoreStart } from '@kbn/core/public'; +import type { Capabilities, CoreStart } from '@kbn/core/public'; import { ALERTS_PATH, APP_UI_ID, @@ -21,15 +22,16 @@ import { LANDING_PATH, CASES_PATH, } from '../common/constants'; -import { Ecs } from '../common/ecs'; -import { +import type { Ecs } from '../common/ecs'; +import type { FactoryQueryTypes, StrategyResponseType, } from '../common/search_strategy/security_solution'; -import { TimelineEqlResponse } from '../common/search_strategy/timeline'; +import type { TimelineEqlResponse } from '../common/search_strategy/timeline'; import { NoPrivilegesPage } from './app/no_privileges'; import { SecurityPageName } from './app/types'; -import { CASES_SUB_PLUGIN_KEY, InspectResponse, StartedSubPlugins } from './types'; +import type { InspectResponse, StartedSubPlugins } from './types'; +import { CASES_SUB_PLUGIN_KEY } from './types'; export const parseRoute = (location: Pick) => { if (!isEmpty(location.hash)) { diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx index e6008028094ad..5d95d6e7f9446 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_information/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiBasicTableColumn } from '@elastic/eui'; import { useGeneratedHtmlId, EuiFlyout, @@ -20,7 +21,6 @@ import { EuiFlyoutFooter, EuiButton, EuiSpacer, - EuiBasicTableColumn, EuiButtonEmpty, } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx index 316fadc8bd197..16d0a0d848acb 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/columns.tsx @@ -16,11 +16,11 @@ import { getEmptyTagValue } from '../../../common/components/empty_value'; import { HostDetailsLink } from '../../../common/components/links'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; -import { HostRiskScoreColumns } from '.'; +import type { HostRiskScoreColumns } from '.'; import * as i18n from './translations'; import { HostsTableType } from '../../store/model'; -import { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; import { RiskScore } from '../../../common/components/severity/common'; export const getHostRiskScoreColumns = ({ diff --git a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx index 59f58d4318482..38daf27402c54 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/host_risk_score_table/index.tsx @@ -10,12 +10,8 @@ import { useDispatch } from 'react-redux'; import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; import styled from 'styled-components'; -import { - Columns, - Criteria, - ItemsPerRow, - PaginatedTable, -} from '../../../common/components/paginated_table'; +import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; import { getHostRiskScoreColumns } from './columns'; @@ -24,9 +20,9 @@ import type { RiskScoreItem, RiskScoreSortField, RiskSeverity, + RiskScoreFields, } from '../../../../common/search_strategy'; -import { RiskScoreFields } from '../../../../common/search_strategy'; -import { State } from '../../../common/store'; +import type { State } from '../../../common/store'; import * as i18n from '../hosts_table/translations'; import * as i18nHosts from './translations'; @@ -34,7 +30,7 @@ import { SeverityBadges } from '../../../common/components/severity/severity_bad import { SeverityBar } from '../../../common/components/severity/severity_bar'; import { SeverityFilterGroup } from '../../../common/components/severity/severity_filter_group'; -import { SeverityCount } from '../../../common/components/severity/types'; +import type { SeverityCount } from '../../../common/components/severity/types'; export const rowItems: ItemsPerRow[] = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx index 6053deb1ad59c..9512feeced415 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/columns.tsx @@ -18,10 +18,10 @@ import { FormattedRelativePreferenceDate } from '../../../common/components/form import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; import { DefaultDraggable } from '../../../common/components/draggables'; -import { HostsTableColumns } from '.'; +import type { HostsTableColumns } from '.'; import * as i18n from './translations'; -import { Maybe, RiskSeverity } from '../../../../common/search_strategy'; +import type { Maybe, RiskSeverity } from '../../../../common/search_strategy'; import { VIEW_HOSTS_BY_SEVERITY } from '../host_risk_score_table/translations'; import { RiskScore } from '../../../common/components/severity/common'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx index f606b1ff67dee..a5ebfadd071eb 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.test.tsx @@ -17,7 +17,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { hostsModel } from '../../store'; import { HostsTableType } from '../../store/model'; import { HostsTable } from '.'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx index 1326f24b5335f..6b701b7f7a8ef 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/index.tsx @@ -8,25 +8,25 @@ import React, { useMemo, useCallback } from 'react'; import { useDispatch } from 'react-redux'; -import { +import type { Columns, Criteria, ItemsPerRow, - PaginatedTable, SortingBasicTable, } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; import { getHostsColumns } from './columns'; import * as i18n from './translations'; -import { +import type { HostsEdges, HostItem, HostsSortField, - HostsFields, } from '../../../../common/search_strategy/security_solution/hosts'; -import { Direction, RiskSeverity } from '../../../../common/search_strategy'; -import { HostEcs, OsEcs } from '../../../../common/ecs/host'; +import { HostsFields } from '../../../../common/search_strategy/security_solution/hosts'; +import type { Direction, RiskSeverity } from '../../../../common/search_strategy'; +import type { HostEcs, OsEcs } from '../../../../common/ecs/host'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; import { SecurityPageName } from '../../../../common/constants'; import { HostsTableType } from '../../store/model'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts index 525d5ce368147..2eb5bc6f58766 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/hosts_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsEdges } from '../../../../common/search_strategy/security_solution/hosts'; +import type { HostsEdges } from '../../../../common/search_strategy/security_solution/hosts'; export const mockData: HostsEdges[] = [ { diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx index 77098daa4747f..8144bd7dde458 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/common/index.tsx @@ -11,18 +11,14 @@ import styled from 'styled-components'; import deepEqual from 'fast-deep-equal'; import { manageQuery } from '../../../../common/components/page/manage_query'; -import { +import type { HostsKpiStrategyResponse, NetworkKpiStrategyResponse, } from '../../../../../common/search_strategy'; -import { - StatItemsComponent, - StatItemsProps, - useKpiMatrixStatus, - StatItems, -} from '../../../../common/components/stat_items'; -import { UpdateDateRange } from '../../../../common/components/charts/common'; -import { UserskKpiStrategyResponse } from '../../../../../common/search_strategy/security_solution/users'; +import type { StatItemsProps, StatItems } from '../../../../common/components/stat_items'; +import { StatItemsComponent, useKpiMatrixStatus } from '../../../../common/components/stat_items'; +import type { UpdateDateRange } from '../../../../common/components/charts/common'; +import type { UserskKpiStrategyResponse } from '../../../../../common/search_strategy/security_solution/users'; const kpiWidgetHeight = 247; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx index b29bdddd44e35..390faf57eeb72 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/hosts/index.tsx @@ -7,12 +7,13 @@ import React, { useEffect, useState } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiHostAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_area'; import { kpiHostMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_host_metric'; import { useHostsKpiHosts, ID } from '../../../containers/kpi_hosts/hosts'; import { KpiBaseComponentManage } from '../common'; -import { HostsKpiProps, HostsKpiChartColors } from '../types'; +import type { HostsKpiProps } from '../types'; +import { HostsKpiChartColors } from '../types'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx index 4e7cfe622e43d..833562dfa7f1f 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/index.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem, EuiFlexGroup, EuiSpacer, EuiLink } from '@elastic/eui'; import { HostsKpiHosts } from './hosts'; import { HostsKpiUniqueIps } from './unique_ips'; -import { HostsKpiProps } from './types'; +import type { HostsKpiProps } from './types'; import { CallOutSwitcher } from '../../../common/components/callouts'; import { RISKY_HOSTS_DOC_LINK } from '../../../overview/components/overview_risky_host_links/risky_hosts_disabled_module'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx index 2ca32c6063ea6..14c747aed04c7 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.test.tsx @@ -11,7 +11,7 @@ import { render } from '@testing-library/react'; import { RiskyHosts } from '.'; import { TestProviders } from '../../../../common/mock'; -import { KpiRiskScoreStrategyResponse } from '../../../../../common/search_strategy'; +import type { KpiRiskScoreStrategyResponse } from '../../../../../common/search_strategy'; describe('RiskyHosts', () => { const defaultProps = { diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx index 0a86a9006b637..e34526bf52ca9 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/risky_hosts/index.tsx @@ -33,7 +33,8 @@ import { HOST_RISK_INFO_BUTTON_CLASS, } from '../../host_risk_information'; import { HoverVisibilityContainer } from '../../../../common/components/hover_visibility_container'; -import { KpiRiskScoreStrategyResponse, RiskSeverity } from '../../../../../common/search_strategy'; +import type { KpiRiskScoreStrategyResponse } from '../../../../../common/search_strategy'; +import { RiskSeverity } from '../../../../../common/search_strategy'; import { RiskScore } from '../../../../common/components/severity/common'; const KpiBaseComponentLoader: React.FC = () => ( diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts index d08d8dcdd30a9..394b965e543fc 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { UpdateDateRange } from '../../../common/components/charts/common'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; export interface HostsKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx index ef032d041db7d..8ffd5d90dc633 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/kpi_hosts/unique_ips/index.tsx @@ -7,14 +7,15 @@ import React, { useEffect, useState } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiUniqueIpsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_area'; import { kpiUniqueIpsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_bar'; import { kpiUniqueIpsDestinationMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_destination_metric'; import { kpiUniqueIpsSourceMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/hosts/kpi_unique_ips_source_metric'; import { useHostsKpiUniqueIps, ID } from '../../../containers/kpi_hosts/unique_ips'; import { KpiBaseComponentManage } from '../common'; -import { HostsKpiProps, HostsKpiChartColors } from '../types'; +import type { HostsKpiProps } from '../types'; +import { HostsKpiChartColors } from '../types'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx index b64271de69ace..972b97ca1265d 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/index.tsx @@ -8,17 +8,18 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { HostsUncommonProcessesEdges } from '../../../../common/search_strategy'; +import type { HostsUncommonProcessesEdges } from '../../../../common/search_strategy'; import { hostsActions, hostsModel, hostsSelectors } from '../../store'; import { defaultToEmptyTag, getEmptyValue } from '../../../common/components/empty_value'; import { HostDetailsLink } from '../../../common/components/links'; -import { Columns, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table'; +import type { Columns, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import * as i18n from './translations'; import { getRowItemDraggables } from '../../../common/components/tables/helpers'; import { HostsType } from '../../store/model'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { HostEcs } from '../../../../common/ecs/host'; +import type { HostEcs } from '../../../../common/ecs/host'; const tableType = hostsModel.HostsTableType.uncommonProcesses; interface UncommonProcessTableProps { diff --git a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts index c7764517bf80e..e303f6a756350 100644 --- a/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts +++ b/x-pack/plugins/security_solution/public/hosts/components/uncommon_process_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsUncommonProcessesStrategyResponse } from '../../../../common/search_strategy'; +import type { HostsUncommonProcessesStrategyResponse } from '../../../../common/search_strategy'; export const mockData: HostsUncommonProcessesStrategyResponse = { totalCount: 5, diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx index f78307d7a61a7..0c7f371361634 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/hosts/details/index.tsx @@ -12,18 +12,18 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { useKibana } from '../../../../common/lib/kibana'; -import { +import type { HostItem, - HostsQueries, HostDetailsRequestOptions, HostDetailsStrategyResponse, } from '../../../../../common/search_strategy/security_solution/hosts'; +import { HostsQueries } from '../../../../../common/search_strategy/security_solution/hosts'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'hostsDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx index de7f1d3e788a7..e6e02c335180c 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/hosts/index.tsx @@ -8,22 +8,23 @@ import deepEqual from 'fast-deep-equal'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { inputsModel, State } from '../../../common/store'; +import type { inputsModel, State } from '../../../common/store'; import { createFilter } from '../../../common/containers/helpers'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { hostsModel, hostsSelectors } from '../../store'; +import type { hostsModel } from '../../store'; +import { hostsSelectors } from '../../store'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { +import type { HostsEdges, PageInfoPaginated, DocValueFields, - HostsQueries, HostsRequestOptions, } from '../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../common/typed_json'; +import { HostsQueries } from '../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../common/typed_json'; import * as i18n from './translations'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; export const ID = 'hostsAllQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx index a2644277246de..1bc08cee95553 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/hosts/index.tsx @@ -11,19 +11,19 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - HostsKpiQueries, +import type { HostsKpiHostsRequestOptions, HostsKpiHostsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { HostsKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'hostsKpiHostsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx index 24ef95a324b2f..7bcb0cc98dce0 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/kpi_hosts/unique_ips/index.tsx @@ -11,19 +11,19 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - HostsKpiQueries, +import type { HostsKpiUniqueIpsRequestOptions, HostsKpiUniqueIpsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { HostsKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'hostsKpiUniqueIpsQuery'; diff --git a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx b/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx index fdd0dc10601d8..cce87f912a0b0 100644 --- a/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/containers/uncommon_processes/index.tsx @@ -12,24 +12,25 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { inputsModel, State } from '../../../common/store'; +import type { inputsModel, State } from '../../../common/store'; import { useKibana } from '../../../common/lib/kibana'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; import { createFilter } from '../../../common/containers/helpers'; -import { hostsModel, hostsSelectors } from '../../store'; -import { +import type { hostsModel } from '../../store'; +import { hostsSelectors } from '../../store'; +import type { SortField, PageInfoPaginated, HostsUncommonProcessesEdges, - HostsQueries, HostsUncommonProcessesRequestOptions, HostsUncommonProcessesStrategyResponse, } from '../../../../common/search_strategy'; +import { HostsQueries } from '../../../../common/search_strategy'; import * as i18n from './translations'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../common/typed_json'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/hosts/index.ts b/x-pack/plugins/security_solution/public/hosts/index.ts index 9820f76762b93..d5f1aa0e895ae 100644 --- a/x-pack/plugins/security_solution/public/hosts/index.ts +++ b/x-pack/plugins/security_solution/public/hosts/index.ts @@ -5,12 +5,14 @@ * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { TimelineIdLiteral, TimelineId } from '../../common/types/timeline'; -import { SecuritySubPluginWithStore } from '../app/types'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { TimelineIdLiteral } from '../../common/types/timeline'; +import { TimelineId } from '../../common/types/timeline'; +import type { SecuritySubPluginWithStore } from '../app/types'; import { getTimelinesInStorageByIds } from '../timelines/containers/local_storage'; import { routes } from './routes'; -import { initialHostsState, hostsReducer, HostsState } from './store'; +import type { HostsState } from './store'; +import { initialHostsState, hostsReducer } from './store'; const HOST_TIMELINE_IDS: TimelineIdLiteral[] = [ TimelineId.hostsPageEvents, diff --git a/x-pack/plugins/security_solution/public/hosts/links.ts b/x-pack/plugins/security_solution/public/hosts/links.ts index 92f76ab81a486..2bf430d0c4def 100644 --- a/x-pack/plugins/security_solution/public/hosts/links.ts +++ b/x-pack/plugins/security_solution/public/hosts/links.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { HOSTS_PATH, SecurityPageName } from '../../common/constants'; import { HOSTS } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import hostsPageImg from '../common/images/hosts_page.png'; export const links: LinkItem = { diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx index 90fd6ab1e77b6..4c68761dbe1b6 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.test.tsx @@ -12,7 +12,7 @@ import useResizeObserver from 'use-resize-observer/polyfilled'; import '../../../common/mock/match_media'; import { mockIndexPattern, TestProviders } from '../../../common/mock'; import { HostDetailsTabs } from './details_tabs'; -import { HostDetailsTabsProps, SetAbsoluteRangeDatePicker } from './types'; +import type { HostDetailsTabsProps, SetAbsoluteRangeDatePicker } from './types'; import { hostDetailsPagePath } from '../types'; import { type } from './utils'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx index 33b98fe193f30..543ecc174fe1b 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/details_tabs.tsx @@ -9,16 +9,16 @@ import React, { useCallback } from 'react'; import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import { scoreIntervalToDateTime } from '../../../common/components/ml/score/score_interval_to_datetime'; -import { Anomaly } from '../../../common/components/ml/types'; +import type { Anomaly } from '../../../common/components/ml/types'; import { HostsTableType } from '../../store/model'; import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; import { useGlobalTime } from '../../../common/containers/use_global_time'; import { AnomaliesHostTable } from '../../../common/components/ml/tables/anomalies_host_table'; import { EventsQueryTabBody } from '../../../common/components/events_tab/events_query_tab_body'; -import { HostDetailsTabsProps } from './types'; +import type { HostDetailsTabsProps } from './types'; import { type } from './utils'; import { diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx index 50683955fc5bc..1352c5d6ca504 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/index.tsx @@ -12,9 +12,10 @@ import { useDispatch } from 'react-redux'; import type { Filter } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; -import { HostItem, LastEventIndexKey } from '../../../../common/search_strategy'; +import type { HostItem } from '../../../../common/search_strategy'; +import { LastEventIndexKey } from '../../../../common/search_strategy'; import { SecurityPageName } from '../../../app/types'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import { FiltersGlobal } from '../../../common/components/filters_global'; import { HeaderPage } from '../../../common/components/header_page'; import { LastEventTime } from '../../../common/components/last_event_time'; @@ -38,7 +39,7 @@ import { SpyRoute } from '../../../common/utils/route/spy_routes'; import { HostDetailsTabs } from './details_tabs'; import { navTabsHostDetails } from './nav_tabs'; -import { HostDetailsProps } from './types'; +import type { HostDetailsProps } from './types'; import { type } from './utils'; import { getHostDetailsPageFilters } from './helpers'; import { showGlobalFilters } from '../../../timelines/components/timeline/helpers'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx index 351b43b8e54fc..442f16dc444fe 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { TabNavigationItemProps } from '../../../common/components/navigation/tab_navigation/types'; +import type { TabNavigationItemProps } from '../../../common/components/navigation/tab_navigation/types'; import { HostsTableType } from '../../store/model'; import { navTabsHostDetails } from './nav_tabs'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx index 474bbbac7271e..1ad3bc5dad232 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/nav_tabs.tsx @@ -7,7 +7,7 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; -import { HostDetailsNavTab } from './types'; +import type { HostDetailsNavTab } from './types'; import { HostsTableType } from '../../store/model'; import { HOSTS_PATH } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts index 2e5ef2dfdd53f..b0664c4e91762 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/types.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { ActionCreator } from 'typescript-fsa'; +import type { ActionCreator } from 'typescript-fsa'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { HostsTableType } from '../../store/model'; -import { HostsQueryProps } from '../types'; -import { NavTab } from '../../../common/components/navigation/types'; -import { KeyHostsNavTabWithoutMlPermission } from '../navigation/types'; -import { hostsModel } from '../../store'; +import type { InputsModelId } from '../../../common/store/inputs/constants'; +import type { HostsTableType } from '../../store/model'; +import type { HostsQueryProps } from '../types'; +import type { NavTab } from '../../../common/components/navigation/types'; +import type { KeyHostsNavTabWithoutMlPermission } from '../navigation/types'; +import type { hostsModel } from '../../store'; interface HostDetailsComponentReduxProps { query: Query; filters: Filter[]; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts b/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts index 061dba0c37358..5e9614bc05d74 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/details/utils.ts @@ -7,15 +7,15 @@ import { get } from 'lodash/fp'; -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { hostsModel } from '../../store'; import { HostsTableType } from '../../store/model'; import { getHostDetailsUrl } from '../../../common/components/link_to/redirect_to_hosts'; import * as i18n from '../translations'; -import { HostRouteSpyState } from '../../../common/utils/route/types'; +import type { HostRouteSpyState } from '../../../common/utils/route/types'; import { SecurityPageName } from '../../../app/types'; -import { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; export const type = hostsModel.HostsType.details; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx index 565ab35ca4c6d..6d1cb5ea5bbba 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts.test.tsx @@ -20,7 +20,8 @@ import { } from '../../common/mock'; import { SecuritySolutionTabNavigation } from '../../common/components/navigation'; import { inputsActions } from '../../common/store/inputs'; -import { State, createStore } from '../../common/store'; +import type { State } from '../../common/store'; +import { createStore } from '../../common/store'; import { Hosts } from './hosts'; import { HostsTabs } from './hosts_tabs'; import { useSourcererDataView } from '../../common/containers/sourcerer'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx index 35dbb6fa8b4b0..6a01e9b8fcc9f 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts.tsx @@ -11,11 +11,11 @@ import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef } from 'react'; import { useDispatch } from 'react-redux'; import { useParams } from 'react-router-dom'; -import { Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { SecurityPageName } from '../../app/types'; -import { UpdateDateRange } from '../../common/components/charts/common'; +import type { UpdateDateRange } from '../../common/components/charts/common'; import { FiltersGlobal } from '../../common/components/filters_global'; import { HeaderPage } from '../../common/components/header_page'; import { LastEventTime } from '../../common/components/last_event_time'; @@ -30,7 +30,8 @@ import { TimelineId } from '../../../common/types/timeline'; import { LastEventIndexKey } from '../../../common/search_strategy'; import { useKibana } from '../../common/lib/kibana'; import { convertToBuildEsQuery } from '../../common/lib/keury'; -import { inputsSelectors, State } from '../../common/store'; +import type { State } from '../../common/store'; +import { inputsSelectors } from '../../common/store'; import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; import { SpyRoute } from '../../common/utils/route/spy_routes'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx index 038300453101c..7dc106fa80586 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/hosts_tabs.tsx @@ -9,13 +9,13 @@ import React, { memo, useCallback } from 'react'; import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { HostsTabsProps } from './types'; +import type { HostsTabsProps } from './types'; import { scoreIntervalToDateTime } from '../../common/components/ml/score/score_interval_to_datetime'; -import { Anomaly } from '../../common/components/ml/types'; +import type { Anomaly } from '../../common/components/ml/types'; import { HostsTableType } from '../store/model'; import { AnomaliesQueryTabBody } from '../../common/containers/anomalies/anomalies_query_tab_body'; import { AnomaliesHostTable } from '../../common/components/ml/tables/anomalies_host_table'; -import { UpdateDateRange } from '../../common/components/charts/common'; +import type { UpdateDateRange } from '../../common/components/charts/common'; import { EventsQueryTabBody } from '../../common/components/events_tab/events_query_tab_body'; import { HOSTS_PATH } from '../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx index d0fda7fc4559b..74b2a5bd0b442 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/nav_tabs.tsx @@ -8,7 +8,7 @@ import { omit } from 'lodash/fp'; import * as i18n from './translations'; import { HostsTableType } from '../store/model'; -import { HostsNavTab } from './navigation/types'; +import type { HostsNavTab } from './navigation/types'; import { HOSTS_PATH } from '../../../common/constants'; const getTabsOnHostsUrl = (tabName: HostsTableType) => `${HOSTS_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/alerts_query_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/alerts_query_tab_body.tsx index d19e22b4406ba..5a6e6e647ce0e 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/alerts_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/alerts_query_tab_body.tsx @@ -10,7 +10,7 @@ import React, { useMemo } from 'react'; import { TimelineId } from '../../../../common/types/timeline'; import { AlertsView } from '../../../common/components/alerts_viewer'; import { hostNameExistsFilter } from '../../../common/components/visualization_actions/utils'; -import { AlertsComponentQueryProps } from './types'; +import type { AlertsComponentQueryProps } from './types'; export const HostAlertsQueryTabBody = React.memo((alertsProps: AlertsComponentQueryProps) => { const { pageFilters, ...rest } = alertsProps; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx index 26f8d53f1fec2..32875830909d9 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/authentications_query_tab_body.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { HostsComponentsQueryProps } from './types'; +import type { HostsComponentsQueryProps } from './types'; import { MatrixHistogram } from '../../../common/components/matrix_histogram'; import { AuthenticationsHostTable } from '../../../common/components/authentication/authentications_host_table'; import { histogramConfigs } from '../../../common/components/authentication/helpers'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx index 11ba8d154cd81..c790b3c7df186 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_score_tab_body.tsx @@ -7,12 +7,12 @@ import React, { useEffect, useMemo, useState } from 'react'; import { noop } from 'lodash/fp'; -import { HostsComponentsQueryProps } from './types'; +import type { HostsComponentsQueryProps } from './types'; import { manageQuery } from '../../../common/components/page/manage_query'; import { HostRiskScoreTable } from '../../components/host_risk_score_table'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { hostsModel, hostsSelectors } from '../../store'; -import { State } from '../../../common/store'; +import type { State } from '../../../common/store'; import { HostRiskScoreQueryId, useHostRiskScore, diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx index b1a341ed1db96..af0824501c032 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/host_risk_tab_body.tsx @@ -9,7 +9,7 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { HostsComponentsQueryProps } from './types'; +import type { HostsComponentsQueryProps } from './types'; import * as i18n from '../translations'; import { HostRiskInformationButtonEmpty } from '../../components/host_risk_information'; import { HostRiskScoreQueryId, useHostRiskScore } from '../../../risk_score/containers'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx index 8e41cad3d5852..4af707a96f008 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/hosts_query_tab_body.tsx @@ -8,7 +8,7 @@ import { getOr } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; import { useAllHost, ID } from '../../containers/hosts'; -import { HostsComponentsQueryProps } from './types'; +import type { HostsComponentsQueryProps } from './types'; import { HostsTable } from '../../components/hosts_table'; import { manageQuery } from '../../../common/components/page/manage_query'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx index 4ad98f84eb854..dfc10c5fe7597 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/sessions_tab_body.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { TimelineId } from '../../../../common/types/timeline'; import { SessionsView } from '../../../common/components/sessions_viewer'; import { hostNameExistsFilter } from '../../../common/components/visualization_actions/utils'; -import { AlertsComponentQueryProps } from './types'; +import type { AlertsComponentQueryProps } from './types'; export const SessionsTabBody = React.memo((alertsProps: AlertsComponentQueryProps) => { const { pageFilters, filterQuery, ...rest } = alertsProps; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts index 41e0317676cc8..bbbcdb9e63d0f 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/types.ts @@ -6,13 +6,13 @@ */ import type { Filter } from '@kbn/es-query'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../common/typed_json'; -import { NarrowDateRange } from '../../../common/components/ml/types'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; -import { HostsTableType, HostsType } from '../../store/model'; -import { NavTab } from '../../../common/components/navigation/types'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { NarrowDateRange } from '../../../common/components/ml/types'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { HostsTableType, HostsType } from '../../store/model'; +import type { NavTab } from '../../../common/components/navigation/types'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; export type KeyHostsNavTabWithoutMlPermission = HostsTableType.hosts & HostsTableType.authentications & diff --git a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx b/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx index a24806d02d900..5ede0f08383ec 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/hosts/pages/navigation/uncommon_process_query_tab_body.tsx @@ -8,7 +8,7 @@ import { getOr } from 'lodash/fp'; import React, { useEffect, useState } from 'react'; import { useUncommonProcesses, ID } from '../../containers/uncommon_processes'; -import { HostsComponentsQueryProps } from './types'; +import type { HostsComponentsQueryProps } from './types'; import { UncommonProcessTable } from '../../components/uncommon_process_table'; import { manageQuery } from '../../../common/components/page/manage_query'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/hosts/pages/types.ts b/x-pack/plugins/security_solution/public/hosts/pages/types.ts index 9af7f5b4a20b2..a102d9b06072c 100644 --- a/x-pack/plugins/security_solution/public/hosts/pages/types.ts +++ b/x-pack/plugins/security_solution/public/hosts/pages/types.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ActionCreator } from 'typescript-fsa'; +import type { ActionCreator } from 'typescript-fsa'; -import { Filter } from '@kbn/es-query'; -import { hostsModel } from '../store'; -import { GlobalTimeArgs } from '../../common/containers/use_global_time'; -import { InputsModelId } from '../../common/store/inputs/constants'; +import type { Filter } from '@kbn/es-query'; +import type { hostsModel } from '../store'; +import type { GlobalTimeArgs } from '../../common/containers/use_global_time'; +import type { InputsModelId } from '../../common/store/inputs/constants'; import { HOSTS_PATH } from '../../../common/constants'; export const hostDetailsPagePath = `${HOSTS_PATH}/:detailName`; diff --git a/x-pack/plugins/security_solution/public/hosts/routes.tsx b/x-pack/plugins/security_solution/public/hosts/routes.tsx index 683a4a66ab383..0f6e371a6fdb5 100644 --- a/x-pack/plugins/security_solution/public/hosts/routes.tsx +++ b/x-pack/plugins/security_solution/public/hosts/routes.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { HostsContainer } from './pages'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; import { HOSTS_PATH } from '../../common/constants'; export const HostsRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/hosts/store/actions.ts b/x-pack/plugins/security_solution/public/hosts/store/actions.ts index c9e6360dc8b45..f8d657b9afd0b 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/actions.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/actions.ts @@ -6,10 +6,10 @@ */ import actionCreatorFactory from 'typescript-fsa'; -import { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import { HostsSortField } from '../../../common/search_strategy/security_solution/hosts'; +import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; +import type { HostsSortField } from '../../../common/search_strategy/security_solution/hosts'; -import { HostsTableType, HostsType } from './model'; +import type { HostsTableType, HostsType } from './model'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/hosts'); export const updateTableActivePage = actionCreator<{ diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts b/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts index 111b7f0e79737..bf2887267623d 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/helpers.test.ts @@ -6,7 +6,8 @@ */ import { DEFAULT_TABLE_ACTIVE_PAGE, DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; -import { HostsModel, HostsTableType, HostsType } from './model'; +import type { HostsModel } from './model'; +import { HostsTableType, HostsType } from './model'; import { setHostsQueriesActivePageToZero } from './helpers'; import { Direction, HostsFields, RiskScoreFields } from '../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts b/x-pack/plugins/security_solution/public/hosts/store/helpers.ts index 4f09cea7c4f74..7133414ff8f31 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/helpers.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { RiskSeverity } from '../../../common/search_strategy'; +import type { RiskSeverity } from '../../../common/search_strategy'; import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; -import { HostsModel, HostsTableType, Queries, HostsType } from './model'; +import type { HostsModel, Queries } from './model'; +import { HostsTableType, HostsType } from './model'; export const setHostPageQueriesActivePageToZero = (state: HostsModel): Queries => ({ ...state.page.queries, diff --git a/x-pack/plugins/security_solution/public/hosts/store/index.ts b/x-pack/plugins/security_solution/public/hosts/store/index.ts index 0340a040419dd..7aba51837e029 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/index.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Reducer, AnyAction } from 'redux'; +import type { Reducer, AnyAction } from 'redux'; import * as hostsActions from './actions'; import * as hostsModel from './model'; import * as hostsSelectors from './selectors'; diff --git a/x-pack/plugins/security_solution/public/hosts/store/model.ts b/x-pack/plugins/security_solution/public/hosts/store/model.ts index 09bec3643c4d4..381c25c79ae1b 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/model.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/model.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Direction } from '../../../common/search_strategy'; -import { +import type { Direction } from '../../../common/search_strategy'; +import type { HostsFields, RiskScoreSortField, RiskSeverity, diff --git a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/hosts/store/reducer.ts index dcbde903aaaa2..7d7e8b445b3e6 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/reducer.ts @@ -23,7 +23,8 @@ import { setHostPageQueriesActivePageToZero, setHostDetailsQueriesActivePageToZero, } from './helpers'; -import { HostsModel, HostsTableType } from './model'; +import type { HostsModel } from './model'; +import { HostsTableType } from './model'; export type HostsState = HostsModel; diff --git a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/hosts/store/selectors.ts index 92247a9fea2e6..859819a045dff 100644 --- a/x-pack/plugins/security_solution/public/hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/hosts/store/selectors.ts @@ -8,9 +8,10 @@ import { get } from 'lodash/fp'; import { createSelector } from 'reselect'; -import { State } from '../../common/store/types'; +import type { State } from '../../common/store/types'; -import { GenericHostsModel, HostsType, HostsTableType } from './model'; +import type { GenericHostsModel, HostsType } from './model'; +import { HostsTableType } from './model'; const selectHosts = (state: State, hostsType: HostsType): GenericHostsModel => get(hostsType, state.hosts); diff --git a/x-pack/plugins/security_solution/public/index.ts b/x-pack/plugins/security_solution/public/index.ts index ab20271b4bda3..1f6f121e04209 100644 --- a/x-pack/plugins/security_solution/public/index.ts +++ b/x-pack/plugins/security_solution/public/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { PluginInitializerContext } from '@kbn/core/public'; +import type { PluginInitializerContext } from '@kbn/core/public'; import { Plugin } from './plugin'; -import { PluginSetup } from './types'; +import type { PluginSetup } from './types'; export type { TimelineModel } from './timelines/store/timeline/model'; export const plugin = (context: PluginInitializerContext): Plugin => new Plugin(context); diff --git a/x-pack/plugins/security_solution/public/kubernetes/index.ts b/x-pack/plugins/security_solution/public/kubernetes/index.ts index 683e30a720f1a..4956a01d06974 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/index.ts +++ b/x-pack/plugins/security_solution/public/kubernetes/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { routes } from './routes'; export class Kubernetes { diff --git a/x-pack/plugins/security_solution/public/kubernetes/links.ts b/x-pack/plugins/security_solution/public/kubernetes/links.ts index 1902babdd4eee..9c7c4d04329d4 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/links.ts +++ b/x-pack/plugins/security_solution/public/kubernetes/links.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { KUBERNETES_PATH, SecurityPageName } from '../../common/constants'; import { KUBERNETES } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import kubernetesPageImg from '../common/images/kubernetes_page.png'; export const links: LinkItem = { diff --git a/x-pack/plugins/security_solution/public/kubernetes/pages/constants.ts b/x-pack/plugins/security_solution/public/kubernetes/pages/constants.ts index c7120947a9182..2435d97c148bc 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/pages/constants.ts +++ b/x-pack/plugins/security_solution/public/kubernetes/pages/constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ColumnHeaderOptions } from '../../../common/types/timeline'; +import type { ColumnHeaderOptions } from '../../../common/types/timeline'; import { defaultColumnHeaderType } from '../../timelines/components/timeline/body/column_headers/default_headers'; import { DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../../timelines/components/timeline/body/constants'; import { diff --git a/x-pack/plugins/security_solution/public/kubernetes/pages/utils/breadcrumbs.ts b/x-pack/plugins/security_solution/public/kubernetes/pages/utils/breadcrumbs.ts index cc512732fe416..111a0dc3be554 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/pages/utils/breadcrumbs.ts +++ b/x-pack/plugins/security_solution/public/kubernetes/pages/utils/breadcrumbs.ts @@ -5,13 +5,11 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; -import { RouteSpyState } from '../../../common/utils/route/types'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; +import type { RouteSpyState } from '../../../common/utils/route/types'; import { SecurityPageName } from '../../../app/types'; -import { - getKubernetesDetailsUrl, - GetSecuritySolutionUrl, -} from '../../../common/components/link_to'; +import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import { getKubernetesDetailsUrl } from '../../../common/components/link_to'; export const getTrailingBreadcrumbs = ( params: RouteSpyState, diff --git a/x-pack/plugins/security_solution/public/kubernetes/routes.tsx b/x-pack/plugins/security_solution/public/kubernetes/routes.tsx index b3116d408b3a6..4164849e67a24 100644 --- a/x-pack/plugins/security_solution/public/kubernetes/routes.tsx +++ b/x-pack/plugins/security_solution/public/kubernetes/routes.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { KubernetesContainer } from './pages'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; import { KUBERNETES_PATH } from '../../common/constants'; export const KubernetesRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.test.tsx b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.test.tsx index 57aee98af4e9d..b340eb0fe741b 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.test.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.test.tsx @@ -8,7 +8,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { SecurityPageName } from '../../app/types'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; import { TestProviders } from '../../common/mock'; import { LandingLinksIcons } from './landing_links_icons'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.tsx b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.tsx index 1326c071bd791..cfdc9e20d7c13 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_icons.tsx @@ -12,7 +12,7 @@ import { SecuritySolutionLinkAnchor, withSecuritySolutionLink, } from '../../common/components/links'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; interface LandingLinksImagesProps { items: NavLinkItem[]; diff --git a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.test.tsx b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.test.tsx index 81881a3796f0b..377c7efe0e3fe 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.test.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.test.tsx @@ -8,7 +8,7 @@ import { render } from '@testing-library/react'; import React from 'react'; import { SecurityPageName } from '../../app/types'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; import { TestProviders } from '../../common/mock'; import { LandingLinksImages } from './landing_links_images'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.tsx b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.tsx index cf6fd8dc481a4..9a6787083f848 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/components/landing_links_images.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiImage, EuiPanel, EuiText, EuiTitle } from import React from 'react'; import styled from 'styled-components'; import { withSecuritySolutionLink } from '../../common/components/links'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; interface LandingLinksImagesProps { items: NavLinkItem[]; diff --git a/x-pack/plugins/security_solution/public/landing_pages/index.ts b/x-pack/plugins/security_solution/public/landing_pages/index.ts index cac375cce6b2e..7e0b98571873f 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/index.ts +++ b/x-pack/plugins/security_solution/public/landing_pages/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { routes } from './routes'; export class LandingPages { diff --git a/x-pack/plugins/security_solution/public/landing_pages/links.ts b/x-pack/plugins/security_solution/public/landing_pages/links.ts index 0a53aa88208b5..5a9735480bc14 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/links.ts +++ b/x-pack/plugins/security_solution/public/landing_pages/links.ts @@ -13,7 +13,7 @@ import { SERVER_APP_ID, } from '../../common/constants'; import { DASHBOARDS, EXPLORE } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import { overviewLinks, detectionResponseLinks } from '../overview/links'; import { links as hostsLinks } from '../hosts/links'; import { links as networkLinks } from '../network/links'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/pages/manage.test.tsx b/x-pack/plugins/security_solution/public/landing_pages/pages/manage.test.tsx index 06389105cec2b..67eb06b60cca6 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/pages/manage.test.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/pages/manage.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { SecurityPageName } from '../../app/types'; import { TestProviders } from '../../common/mock'; import { ManagementCategories } from './manage'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; const RULES_ITEM_LABEL = 'elastic rules!'; const EXCEPTIONS_ITEM_LABEL = 'exceptional!'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/pages/manage.tsx b/x-pack/plugins/security_solution/public/landing_pages/pages/manage.tsx index 33526e0122fc3..cb77921a0b673 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/pages/manage.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/pages/manage.tsx @@ -11,7 +11,7 @@ import styled from 'styled-components'; import { SecurityPageName } from '../../app/types'; import { HeaderPage } from '../../common/components/header_page'; import { useAppRootNavLink } from '../../common/components/navigation/nav_links'; -import { NavLinkItem } from '../../common/components/navigation/types'; +import type { NavLinkItem } from '../../common/components/navigation/types'; import { SecuritySolutionPageWrapper } from '../../common/components/page_wrapper'; import { SpyRoute } from '../../common/utils/route/spy_routes'; import { LandingLinksIcons } from '../components/landing_links_icons'; diff --git a/x-pack/plugins/security_solution/public/landing_pages/routes.tsx b/x-pack/plugins/security_solution/public/landing_pages/routes.tsx index 038100cda463f..590c411e128c9 100644 --- a/x-pack/plugins/security_solution/public/landing_pages/routes.tsx +++ b/x-pack/plugins/security_solution/public/landing_pages/routes.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; import { DASHBOARDS_PATH, MANAGE_PATH, EXPLORE_PATH } from '../../common/constants'; import { ExploreLandingPage } from './pages/explore'; import { DashboardsLandingPage } from './pages/dashboards'; diff --git a/x-pack/plugins/security_solution/public/management/common/breadcrumbs.ts b/x-pack/plugins/security_solution/public/management/common/breadcrumbs.ts index faae01f59941f..bfeccafd2e977 100644 --- a/x-pack/plugins/security_solution/public/management/common/breadcrumbs.ts +++ b/x-pack/plugins/security_solution/public/management/common/breadcrumbs.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { AdministrationSubTab } from '../types'; import { ENDPOINTS_TAB, EVENT_FILTERS_TAB, POLICIES_TAB, TRUSTED_APPS_TAB } from './translations'; -import { AdministrationRouteSpyState } from '../../common/utils/route/types'; +import type { AdministrationRouteSpyState } from '../../common/utils/route/types'; import { HOST_ISOLATION_EXCEPTIONS, BLOCKLIST, RESPONSE_ACTIONS } from '../../app/translations'; const TabNameMappedToI18nKey: Record = { diff --git a/x-pack/plugins/security_solution/public/management/common/constants.ts b/x-pack/plugins/security_solution/public/management/common/constants.ts index abbd6e522a12c..e19bfd01da4ca 100644 --- a/x-pack/plugins/security_solution/public/management/common/constants.ts +++ b/x-pack/plugins/security_solution/public/management/common/constants.ts @@ -6,7 +6,8 @@ */ import { MANAGEMENT_PATH } from '../../../common/constants'; -import { ManagementStoreGlobalNamespace, AdministrationSubTab } from '../types'; +import type { ManagementStoreGlobalNamespace } from '../types'; +import { AdministrationSubTab } from '../types'; // --[ ROUTING ]--------------------------------------------------------------------------- export const MANAGEMENT_ROUTING_ENDPOINTS_PATH = `${MANAGEMENT_PATH}/:tabName(${AdministrationSubTab.endpoints})`; diff --git a/x-pack/plugins/security_solution/public/management/common/hooks.ts b/x-pack/plugins/security_solution/public/management/common/hooks.ts index 4eadfa315248d..0580561f22f4f 100644 --- a/x-pack/plugins/security_solution/public/management/common/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/common/hooks.ts @@ -6,7 +6,7 @@ */ import { useState, useEffect } from 'react'; -import { ListPageRouteState } from '../../../common/endpoint/types'; +import type { ListPageRouteState } from '../../../common/endpoint/types'; export function useMemoizedRouteState(routeState: ListPageRouteState | undefined) { const [memoizedRouteState, setMemoizedRouteState] = useState(); diff --git a/x-pack/plugins/security_solution/public/management/common/routing.ts b/x-pack/plugins/security_solution/public/management/common/routing.ts index 6506620e7e125..bb65a7dffe3e5 100644 --- a/x-pack/plugins/security_solution/public/management/common/routing.ts +++ b/x-pack/plugins/security_solution/public/management/common/routing.ts @@ -11,11 +11,11 @@ import { isEmpty } from 'lodash/fp'; import querystring from 'querystring'; import { generatePath } from 'react-router-dom'; import { appendSearch } from '../../common/components/link_to/helpers'; -import { ArtifactListPageUrlParams } from '../components/artifact_list_page'; +import type { ArtifactListPageUrlParams } from '../components/artifact_list_page'; import { paginationFromUrlParams } from '../hooks/use_url_pagination'; -import { EndpointIndexUIQueryParams } from '../pages/endpoint_hosts/types'; -import { EventFiltersPageLocation } from '../pages/event_filters/types'; -import { PolicyDetailsArtifactsPageLocation } from '../pages/policy/types'; +import type { EndpointIndexUIQueryParams } from '../pages/endpoint_hosts/types'; +import type { EventFiltersPageLocation } from '../pages/event_filters/types'; +import type { PolicyDetailsArtifactsPageLocation } from '../pages/policy/types'; import { AdministrationSubTab } from '../types'; import { MANAGEMENT_DEFAULT_PAGE, diff --git a/x-pack/plugins/security_solution/public/management/common/translations.ts b/x-pack/plugins/security_solution/public/management/common/translations.ts index e79c1c0b34496..c144aae80ddfe 100644 --- a/x-pack/plugins/security_solution/public/management/common/translations.ts +++ b/x-pack/plugins/security_solution/public/management/common/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { ServerApiError } from '../../common/types'; +import type { ServerApiError } from '../../common/types'; export const ENDPOINTS_TAB = i18n.translate('xpack.securitySolution.endpointsTab', { defaultMessage: 'Endpoints', diff --git a/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.test.ts b/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.test.ts index efbed1e2e14fc..40aad03a2cad5 100644 --- a/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.test.ts +++ b/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ArtifactListPageUrlParams } from '../../components/artifact_list_page'; +import type { ArtifactListPageUrlParams } from '../../components/artifact_list_page'; import { MANAGEMENT_DEFAULT_PAGE, MANAGEMENT_DEFAULT_PAGE_SIZE } from '../constants'; import { getArtifactListPageUrlPath, diff --git a/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.ts b/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.ts index 88127323301bb..d0a23859e2b0e 100644 --- a/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.ts +++ b/x-pack/plugins/security_solution/public/management/common/url_routing/artifact_list_page_routing.ts @@ -8,7 +8,7 @@ // FIXME: Remove references to `querystring` // eslint-disable-next-line import/no-nodejs-modules import querystring from 'querystring'; -import { ArtifactListPageUrlParams } from '../../components/artifact_list_page'; +import type { ArtifactListPageUrlParams } from '../../components/artifact_list_page'; import { isDefaultOrMissing, extractFirstParamValue, diff --git a/x-pack/plugins/security_solution/public/management/common/url_routing/utils.ts b/x-pack/plugins/security_solution/public/management/common/url_routing/utils.ts index afff61e94b06d..f00fdf23db45c 100644 --- a/x-pack/plugins/security_solution/public/management/common/url_routing/utils.ts +++ b/x-pack/plugins/security_solution/public/management/common/url_routing/utils.ts @@ -6,7 +6,7 @@ */ // eslint-disable-next-line import/no-nodejs-modules -import querystring from 'querystring'; +import type querystring from 'querystring'; import { MANAGEMENT_DEFAULT_PAGE_SIZE, MANAGEMENT_PAGE_SIZE_OPTIONS } from '../constants'; /** diff --git a/x-pack/plugins/security_solution/public/management/components/actions_context_menu/actions_context_menu.tsx b/x-pack/plugins/security_solution/public/management/components/actions_context_menu/actions_context_menu.tsx index 0194dbf3c683a..a21fccea5eade 100644 --- a/x-pack/plugins/security_solution/public/management/components/actions_context_menu/actions_context_menu.tsx +++ b/x-pack/plugins/security_solution/public/management/components/actions_context_menu/actions_context_menu.tsx @@ -6,20 +6,12 @@ */ import React, { memo, useCallback, useMemo, useState } from 'react'; -import { - EuiButtonIcon, - EuiContextMenuPanel, - EuiPopover, - EuiPopoverProps, - EuiContextMenuPanelProps, - EuiIconProps, -} from '@elastic/eui'; +import type { EuiPopoverProps, EuiContextMenuPanelProps, EuiIconProps } from '@elastic/eui'; +import { EuiButtonIcon, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import uuid from 'uuid'; -import { - ContextMenuItemNavByRouter, - ContextMenuItemNavByRouterProps, -} from '../context_menu_with_router_support'; +import type { ContextMenuItemNavByRouterProps } from '../context_menu_with_router_support'; +import { ContextMenuItemNavByRouter } from '../context_menu_with_router_support'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; export interface ActionsContextMenuProps { diff --git a/x-pack/plugins/security_solution/public/management/components/administration_list_page.tsx b/x-pack/plugins/security_solution/public/management/components/administration_list_page.tsx index 5ec54438342df..d824a89e7b129 100644 --- a/x-pack/plugins/security_solution/public/management/components/administration_list_page.tsx +++ b/x-pack/plugins/security_solution/public/management/components/administration_list_page.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { FC, memo, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { CommonProps } from '@elastic/eui'; import { - CommonProps, EuiPageHeader, EuiPageContent, EuiPageContentBody, diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.test.tsx index 802bfbf7a9efb..cb6fcf255126b 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.test.tsx @@ -5,15 +5,17 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import React from 'react'; -import { ArtifactCardGrid, ArtifactCardGridProps } from './artifact_card_grid'; +import type { ArtifactCardGridProps } from './artifact_card_grid'; +import { ArtifactCardGrid } from './artifact_card_grid'; import { fireEvent, act } from '@testing-library/react'; import { getExceptionProviderMock, getTrustedAppProviderMock, } from '../artifact_entry_card/test_utils'; -import { AnyArtifact } from '../artifact_entry_card'; +import type { AnyArtifact } from '../artifact_entry_card'; describe.each([ ['trusted apps', getTrustedAppProviderMock], diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx index 1119678a8fd8b..b250c2099b3c4 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/artifact_card_grid.tsx @@ -5,15 +5,14 @@ * 2.0. */ -import React, { ComponentType, memo, useCallback, useMemo } from 'react'; -import { - AnyArtifact, - ArtifactEntryCollapsibleCard, - ArtifactEntryCollapsibleCardProps, -} from '../artifact_entry_card'; -import { PaginatedContent as _PaginatedContent, PaginatedContentProps } from '../paginated_content'; +import type { ComponentType } from 'react'; +import React, { memo, useCallback, useMemo } from 'react'; +import type { AnyArtifact, ArtifactEntryCollapsibleCardProps } from '../artifact_entry_card'; +import { ArtifactEntryCollapsibleCard } from '../artifact_entry_card'; +import type { PaginatedContentProps } from '../paginated_content'; +import { PaginatedContent as _PaginatedContent } from '../paginated_content'; import { GridHeader } from './components/grid_header'; -import { MaybeImmutable } from '../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../common/endpoint/types'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; const PaginatedContent: ArtifactsPaginatedComponent = _PaginatedContent; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/components/grid_header.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/components/grid_header.tsx index a87a76e725a9f..7de671614adc5 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/components/grid_header.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_card_grid/components/grid_header.tsx @@ -7,7 +7,8 @@ import React, { memo, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { CommonProps, EuiText, EuiButtonIcon } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiText, EuiButtonIcon } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; import { CardCompressedHeaderLayout, CardSectionPanel } from '../../artifact_entry_card'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.test.tsx index fb2d9ba1ef00a..0da06b555a384 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.test.tsx @@ -6,14 +6,16 @@ */ import React from 'react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { ArtifactEntryCard, ArtifactEntryCardProps } from './artifact_entry_card'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { ArtifactEntryCardProps } from './artifact_entry_card'; +import { ArtifactEntryCard } from './artifact_entry_card'; import { act, fireEvent, getByTestId } from '@testing-library/react'; -import { AnyArtifact } from './types'; +import type { AnyArtifact } from './types'; import { isTrustedApp } from './utils'; import { getTrustedAppProviderMock, getExceptionProviderMock } from './test_utils'; import { OS_LINUX, OS_MAC, OS_WINDOWS } from './components/translations'; -import { TrustedApp } from '../../../../common/endpoint/types'; +import type { TrustedApp } from '../../../../common/endpoint/types'; describe.each([ ['trusted apps', getTrustedAppProviderMock], diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.tsx index 65468d026be91..f0037b691ceab 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card.tsx @@ -6,18 +6,21 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; -import { CardHeader, CardHeaderProps } from './components/card_header'; +import type { CommonProps } from '@elastic/eui'; +import { EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; +import type { CardHeaderProps } from './components/card_header'; +import { CardHeader } from './components/card_header'; import { CardSubHeader } from './components/card_sub_header'; -import { CriteriaConditions, CriteriaConditionsProps } from './components/criteria_conditions'; -import { AnyArtifact, MenuItemPropsByPolicyId } from './types'; +import type { CriteriaConditionsProps } from './components/criteria_conditions'; +import { CriteriaConditions } from './components/criteria_conditions'; +import type { AnyArtifact, MenuItemPropsByPolicyId } from './types'; import { useNormalizedArtifact } from './hooks/use_normalized_artifact'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; import { CardContainerPanel } from './components/card_container_panel'; import { CardSectionPanel } from './components/card_section_panel'; import { CardComments } from './components/card_comments'; import { usePolicyNavLinks } from './hooks/use_policy_nav_links'; -import { MaybeImmutable } from '../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../common/endpoint/types'; import { DescriptionField } from './components/description_field'; export interface CommonArtifactEntryCardProps extends CommonProps { diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.test.tsx index 17e9f83465274..05b157b6f8711 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.test.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { - ArtifactEntryCardMinified, - ArtifactEntryCardMinifiedProps, -} from './artifact_entry_card_minified'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { ArtifactEntryCardMinifiedProps } from './artifact_entry_card_minified'; +import { ArtifactEntryCardMinified } from './artifact_entry_card_minified'; import { act, fireEvent } from '@testing-library/react'; -import { AnyArtifact } from './types'; +import type { AnyArtifact } from './types'; import { getTrustedAppProviderMock, getExceptionProviderMock } from './test_utils'; describe.each([ diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.tsx index 9a8c9fd02a470..0d17cfaf7e45a 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_card_minified.tsx @@ -6,8 +6,8 @@ */ import React, { memo, useCallback, useState, useMemo } from 'react'; +import type { CommonProps } from '@elastic/eui'; import { - CommonProps, EuiPanel, EuiAccordion, EuiTitle, @@ -18,8 +18,9 @@ import { EuiButtonEmpty, } from '@elastic/eui'; import styled from 'styled-components'; -import { CriteriaConditions, CriteriaConditionsProps } from './components/criteria_conditions'; -import { AnyArtifact } from './types'; +import type { CriteriaConditionsProps } from './components/criteria_conditions'; +import { CriteriaConditions } from './components/criteria_conditions'; +import type { AnyArtifact } from './types'; import { useNormalizedArtifact } from './hooks/use_normalized_artifact'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; import { DESCRIPTION_LABEL } from './components/translations'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.test.tsx index 89d972c47ffeb..8fd87ad9cc261 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.test.tsx @@ -6,14 +6,13 @@ */ import React from 'react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { act, fireEvent } from '@testing-library/react'; -import { AnyArtifact } from './types'; +import type { AnyArtifact } from './types'; import { getTrustedAppProviderMock, getExceptionProviderMock } from './test_utils'; -import { - ArtifactEntryCollapsibleCard, - ArtifactEntryCollapsibleCardProps, -} from './artifact_entry_collapsible_card'; +import type { ArtifactEntryCollapsibleCardProps } from './artifact_entry_collapsible_card'; +import { ArtifactEntryCollapsibleCard } from './artifact_entry_collapsible_card'; describe.each([ ['trusted apps', getTrustedAppProviderMock], diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.tsx index 4989cb15b275d..29d336d45aefe 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/artifact_entry_collapsible_card.tsx @@ -7,12 +7,13 @@ import React, { memo } from 'react'; import { EuiHorizontalRule } from '@elastic/eui'; -import { CommonArtifactEntryCardProps } from './artifact_entry_card'; +import type { CommonArtifactEntryCardProps } from './artifact_entry_card'; import { CardContainerPanel } from './components/card_container_panel'; import { useNormalizedArtifact } from './hooks/use_normalized_artifact'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; import { CardSectionPanel } from './components/card_section_panel'; -import { CriteriaConditions, CriteriaConditionsProps } from './components/criteria_conditions'; +import type { CriteriaConditionsProps } from './components/criteria_conditions'; +import { CriteriaConditions } from './components/criteria_conditions'; import { CardCompressedHeader } from './components/card_compressed_header'; export interface ArtifactEntryCollapsibleCardProps extends CommonArtifactEntryCardProps { diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_actions_flex_item.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_actions_flex_item.tsx index 4758eaec4e923..f101c4b1e05b9 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_actions_flex_item.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_actions_flex_item.tsx @@ -6,8 +6,10 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiFlexItem } from '@elastic/eui'; -import { ActionsContextMenu, ActionsContextMenuProps } from '../../actions_context_menu'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexItem } from '@elastic/eui'; +import type { ActionsContextMenuProps } from '../../actions_context_menu'; +import { ActionsContextMenu } from '../../actions_context_menu'; export interface CardActionsFlexItemProps extends Pick { /** If defined, then an overflow menu will be shown with the actions provided */ diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_comments.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_comments.tsx index c3a9f0d8af008..211a1951caf19 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_comments.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_comments.tsx @@ -6,18 +6,12 @@ */ import React, { memo, useMemo, useCallback, useState } from 'react'; -import { - CommonProps, - EuiAccordion, - EuiCommentList, - EuiCommentProps, - EuiButtonEmpty, - EuiSpacer, -} from '@elastic/eui'; +import type { CommonProps, EuiCommentProps } from '@elastic/eui'; +import { EuiAccordion, EuiCommentList, EuiButtonEmpty, EuiSpacer } from '@elastic/eui'; import { isEmpty } from 'lodash/fp'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; -import { CardActionsFlexItemProps } from './card_actions_flex_item'; -import { ArtifactInfo } from '../types'; +import type { CardActionsFlexItemProps } from './card_actions_flex_item'; +import type { ArtifactInfo } from '../types'; import { getFormattedComments } from '../utils/get_formatted_comments'; import { SHOW_COMMENTS_LABEL, HIDE_COMMENTS_LABEL } from './translations'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_compressed_header.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_compressed_header.tsx index 82d5d775765db..2bb71a6f2e329 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_compressed_header.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_compressed_header.tsx @@ -5,15 +5,17 @@ * 2.0. */ -import React, { memo, ReactNode, useCallback } from 'react'; -import { CommonProps, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { ReactNode } from 'react'; +import React, { memo, useCallback } from 'react'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { CardExpandButton } from './card_expand_button'; import { TextValueDisplay } from './text_value_display'; import { EffectScope } from './effect_scope'; import { CardActionsFlexItem } from './card_actions_flex_item'; -import { ArtifactInfo } from '../types'; -import { ArtifactEntryCollapsibleCardProps } from '../artifact_entry_collapsible_card'; +import type { ArtifactInfo } from '../types'; +import type { ArtifactEntryCollapsibleCardProps } from '../artifact_entry_collapsible_card'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useCollapsedCssClassNames } from '../hooks/use_collapsed_css_class_names'; import { usePolicyNavLinks } from '../hooks/use_policy_nav_links'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_container_panel.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_container_panel.tsx index 15de2f5aa0ba2..0bba651253c82 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_container_panel.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_container_panel.tsx @@ -7,7 +7,7 @@ import styled from 'styled-components'; import { EuiPanel } from '@elastic/eui'; -import { EuiPanelProps } from '@elastic/eui/src/components/panel/panel'; +import type { EuiPanelProps } from '@elastic/eui/src/components/panel/panel'; import React, { memo } from 'react'; export const EuiPanelStyled = styled(EuiPanel)` diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_expand_button.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_expand_button.tsx index a7c0c39321660..cde949090dd15 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_expand_button.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_expand_button.tsx @@ -6,7 +6,8 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiButtonIcon, EuiButtonIconPropsForButton } from '@elastic/eui'; +import type { CommonProps, EuiButtonIconPropsForButton } from '@elastic/eui'; +import { EuiButtonIcon } from '@elastic/eui'; import { COLLAPSE_ACTION, EXPAND_ACTION } from './translations'; export interface CardExpandButtonProps extends Pick { diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_header.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_header.tsx index 8f0584d945f66..630cd5f4a18ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_header.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_header.tsx @@ -6,11 +6,13 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import styled from 'styled-components'; import { DateFieldValue } from './date_field_value'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; -import { CardActionsFlexItem, CardActionsFlexItemProps } from './card_actions_flex_item'; +import type { CardActionsFlexItemProps } from './card_actions_flex_item'; +import { CardActionsFlexItem } from './card_actions_flex_item'; export interface CardHeaderProps extends CardActionsFlexItemProps, diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_section_panel.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_section_panel.tsx index 8838d5a799d3b..32de8e0e582bb 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_section_panel.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_section_panel.tsx @@ -7,7 +7,8 @@ import React, { memo } from 'react'; import styled from 'styled-components'; -import { EuiPanel, EuiPanelProps } from '@elastic/eui'; +import type { EuiPanelProps } from '@elastic/eui'; +import { EuiPanel } from '@elastic/eui'; export type CardSectionPanelProps = Exclude< EuiPanelProps, diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_sub_header.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_sub_header.tsx index dc5cac4cd5b52..95043072fd3cb 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_sub_header.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/card_sub_header.tsx @@ -6,9 +6,12 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { TouchedByUsers, TouchedByUsersProps } from './touched_by_users'; -import { EffectScope, EffectScopeProps } from './effect_scope'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { TouchedByUsersProps } from './touched_by_users'; +import { TouchedByUsers } from './touched_by_users'; +import type { EffectScopeProps } from './effect_scope'; +import { EffectScope } from './effect_scope'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; export type SubHeaderProps = TouchedByUsersProps & diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/criteria_conditions.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/criteria_conditions.tsx index 773ed3f31907d..ac7422619ee07 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/criteria_conditions.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/criteria_conditions.tsx @@ -6,14 +6,8 @@ */ import React, { memo, useCallback, useMemo } from 'react'; -import { - CommonProps, - EuiExpression, - EuiToken, - EuiFlexGroup, - EuiFlexItem, - EuiBadge, -} from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiExpression, EuiToken, EuiFlexGroup, EuiFlexItem, EuiBadge } from '@elastic/eui'; import styled from 'styled-components'; import { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { @@ -31,7 +25,7 @@ import { CONDITION_OPERATOR_TYPE_NOT_MATCH_ANY, CONDITION_OPERATOR_TYPE_NOT_MATCH, } from './translations'; -import { ArtifactInfo, ArtifactInfoEntry } from '../types'; +import type { ArtifactInfo, ArtifactInfoEntry } from '../types'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; const OS_LABELS = Object.freeze({ diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/date_field_value.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/date_field_value.tsx index 1b5aa3c5ce843..95cfb19ae35c4 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/date_field_value.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/date_field_value.tsx @@ -6,13 +6,12 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import styled from 'styled-components'; import { CREATED, LAST_UPDATED } from './translations'; -import { - FormattedRelativePreferenceDate, - FormattedRelativePreferenceDateProps, -} from '../../../../common/components/formatted_date'; +import type { FormattedRelativePreferenceDateProps } from '../../../../common/components/formatted_date'; +import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; import { TextValueDisplay } from './text_value_display'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/description_field.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/description_field.tsx index 220fac4a717de..fe77de1394a28 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/description_field.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/description_field.tsx @@ -5,10 +5,12 @@ * 2.0. */ -import React, { memo, PropsWithChildren } from 'react'; -import { CommonProps } from '@elastic/eui'; +import type { PropsWithChildren } from 'react'; +import React, { memo } from 'react'; +import type { CommonProps } from '@elastic/eui'; import { getEmptyValue } from '../../../../common/components/empty_value'; -import { TextValueDisplay, TextValueDisplayProps } from './text_value_display'; +import type { TextValueDisplayProps } from './text_value_display'; +import { TextValueDisplay } from './text_value_display'; export type DescriptionFieldProps = PropsWithChildren<{}> & Pick & diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/effect_scope.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/effect_scope.tsx index 9999ae7bba96d..f9fad1c4aacc4 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/effect_scope.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/effect_scope.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { memo, PropsWithChildren, useMemo } from 'react'; -import { CommonProps, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; +import type { PropsWithChildren } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { CommonProps } from '@elastic/eui'; +import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { @@ -16,7 +18,7 @@ import { } from './translations'; import { TextValueDisplay } from './text_value_display'; import { ContextMenuWithRouterSupport } from '../../context_menu_with_router_support'; -import { ContextMenuItemNavByRouterProps } from '../../context_menu_with_router_support/context_menu_item_nav_by_router'; +import type { ContextMenuItemNavByRouterProps } from '../../context_menu_with_router_support/context_menu_item_nav_by_router'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; // FIXME:PT support being able to show per policy label for Artifacst that have >0 policies, but no menu diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/text_value_display.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/text_value_display.tsx index 327eb963bbb7d..776cc7d37acac 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/text_value_display.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/text_value_display.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { memo, PropsWithChildren, useMemo } from 'react'; -import { CommonProps, EuiText, EuiToolTip } from '@elastic/eui'; +import type { PropsWithChildren } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { CommonProps } from '@elastic/eui'; +import { EuiText, EuiToolTip } from '@elastic/eui'; import classNames from 'classnames'; import { getEmptyValue } from '../../../../common/components/empty_value'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/touched_by_users.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/touched_by_users.tsx index 90bd40edc8115..35402554df7bd 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/touched_by_users.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/components/touched_by_users.tsx @@ -6,7 +6,8 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiAvatar, EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiAvatar, EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { CREATED_BY, LAST_UPDATED_BY } from './translations'; import { TextValueDisplay } from './text_value_display'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_endpoint_policies_to_artifact_policies.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_endpoint_policies_to_artifact_policies.ts index d28c6cbe3b107..1fe34129e4f83 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_endpoint_policies_to_artifact_policies.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_endpoint_policies_to_artifact_policies.ts @@ -6,8 +6,8 @@ */ import { useMemo } from 'react'; -import { MenuItemPropsByPolicyId } from '..'; -import { PolicyData } from '../../../../../common/endpoint/types'; +import type { MenuItemPropsByPolicyId } from '..'; +import type { PolicyData } from '../../../../../common/endpoint/types'; import { useAppUrl } from '../../../../common/lib/kibana'; import { getPolicyDetailPath } from '../../../common/routing'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_normalized_artifact.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_normalized_artifact.ts index 4ea8d4aa6ee7c..735d57128908b 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_normalized_artifact.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_normalized_artifact.ts @@ -6,9 +6,9 @@ */ import { useMemo } from 'react'; -import { AnyArtifact, ArtifactInfo } from '../types'; +import type { AnyArtifact, ArtifactInfo } from '../types'; import { mapToArtifactInfo } from '../utils'; -import { MaybeImmutable } from '../../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../../common/endpoint/types'; /** * Takes in any artifact and return back a new data structure used internally with by the card's components diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_policy_nav_links.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_policy_nav_links.ts index dd403ebaf448c..630bf398a8293 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_policy_nav_links.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/hooks/use_policy_nav_links.ts @@ -6,9 +6,9 @@ */ import { useMemo } from 'react'; -import { EffectScopeProps } from '../components/effect_scope'; -import { ArtifactInfo, MenuItemPropsByPolicyId } from '../types'; -import { ContextMenuItemNavByRouterProps } from '../../context_menu_with_router_support/context_menu_item_nav_by_router'; +import type { EffectScopeProps } from '../components/effect_scope'; +import type { ArtifactInfo, MenuItemPropsByPolicyId } from '../types'; +import type { ContextMenuItemNavByRouterProps } from '../../context_menu_with_router_support/context_menu_item_nav_by_router'; /** * creates the policy links for each policy listed in the artifact record by grabbing the diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/test_utils.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/test_utils.ts index fb0f55f9e5f72..24dc06d197274 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/test_utils.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/test_utils.ts @@ -7,10 +7,10 @@ import { cloneDeep } from 'lodash'; import uuid from 'uuid'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { TrustedAppGenerator } from '../../../../common/endpoint/data_generators/trusted_app_generator'; -import { TrustedApp } from '../../../../common/endpoint/types'; +import type { TrustedApp } from '../../../../common/endpoint/types'; const getCommonItemDataOverrides = () => { return { diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/types.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/types.ts index 0fd3269500f34..151ad461e5b12 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { EffectScope, TrustedApp } from '../../../../common/endpoint/types'; -import { ContextMenuItemNavByRouterProps } from '../context_menu_with_router_support/context_menu_item_nav_by_router'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { EffectScope, TrustedApp } from '../../../../common/endpoint/types'; +import type { ContextMenuItemNavByRouterProps } from '../context_menu_with_router_support/context_menu_item_nav_by_router'; export type AnyArtifact = ExceptionListItemSchema | TrustedApp; export interface ArtifactInfoEntry { diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/get_formatted_comments.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/get_formatted_comments.tsx index c9e96c5ce9ec1..80fb71e2fcc1b 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/get_formatted_comments.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/get_formatted_comments.tsx @@ -6,9 +6,10 @@ */ import React from 'react'; -import { EuiAvatar, EuiText, EuiCommentProps } from '@elastic/eui'; +import type { EuiCommentProps } from '@elastic/eui'; +import { EuiAvatar, EuiText } from '@elastic/eui'; import styled from 'styled-components'; -import { CommentsArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { CommentsArray } from '@kbn/securitysolution-io-ts-list-types'; import { COMMENT_EVENT } from '../../../../common/components/exceptions/translations'; import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/is_trusted_app.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/is_trusted_app.ts index a14ff293d05e8..a2397d4d9ae1b 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/is_trusted_app.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/is_trusted_app.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AnyArtifact } from '../types'; -import { TrustedApp } from '../../../../../common/endpoint/types'; +import type { AnyArtifact } from '../types'; +import type { TrustedApp } from '../../../../../common/endpoint/types'; /** * Type guard for `AnyArtifact` to check if it is a trusted app entry diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/map_to_artifact_info.ts b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/map_to_artifact_info.ts index 60224b63f426f..edfcafa9428ff 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/map_to_artifact_info.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_entry_card/utils/map_to_artifact_info.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { AnyArtifact, ArtifactInfo } from '../types'; -import { EffectScope, MaybeImmutable } from '../../../../../common/endpoint/types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { AnyArtifact, ArtifactInfo } from '../types'; +import type { EffectScope, MaybeImmutable } from '../../../../../common/endpoint/types'; import { tagsToEffectScope } from '../../../../../common/endpoint/service/trusted_apps/mapping'; import { isTrustedApp } from './is_trusted_app'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.test.tsx index edc7734269a17..944f7af4e5955 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.test.tsx @@ -5,16 +5,13 @@ * 2.0. */ -import { AppContextTestRender } from '../../../common/mock/endpoint'; -import { trustedAppsAllHttpMocks } from '../../mocks'; -import { ArtifactListPageProps } from './artifact_list_page'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import type { trustedAppsAllHttpMocks } from '../../mocks'; +import type { ArtifactListPageProps } from './artifact_list_page'; import { act, fireEvent, waitFor, waitForElementToBeRemoved } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { - getArtifactListPageRenderingSetup, - getDeferred, - ArtifactListPageRenderingSetup, -} from './mocks'; +import type { ArtifactListPageRenderingSetup } from './mocks'; +import { getArtifactListPageRenderingSetup, getDeferred } from './mocks'; jest.mock('../../../common/components/user_privileges'); diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx index 618021a6ffce4..c2b744ee57a5f 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/artifact_list_page.tsx @@ -9,31 +9,33 @@ import React, { memo, useCallback, useMemo, useState } from 'react'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { EuiButton, EuiSpacer, EuiText } from '@elastic/eui'; -import { EuiFlyoutSize } from '@elastic/eui/src/components/flyout/flyout'; +import type { EuiFlyoutSize } from '@elastic/eui/src/components/flyout/flyout'; import { useLocation } from 'react-router-dom'; import { AdministrationListPage } from '../administration_list_page'; -import { PaginatedContent, PaginatedContentProps } from '../paginated_content'; +import type { PaginatedContentProps } from '../paginated_content'; +import { PaginatedContent } from '../paginated_content'; import { ArtifactEntryCard } from '../artifact_entry_card'; -import { ArtifactListPageLabels, artifactListPageLabels } from './translations'; +import type { ArtifactListPageLabels } from './translations'; +import { artifactListPageLabels } from './translations'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; import { ManagementPageLoader } from '../management_page_loader'; -import { SearchExceptions, SearchExceptionsProps } from '../search_exceptions'; -import { - useArtifactCardPropsProvider, - UseArtifactCardPropsProviderProps, -} from './hooks/use_artifact_card_props_provider'; +import type { SearchExceptionsProps } from '../search_exceptions'; +import { SearchExceptions } from '../search_exceptions'; +import type { UseArtifactCardPropsProviderProps } from './hooks/use_artifact_card_props_provider'; +import { useArtifactCardPropsProvider } from './hooks/use_artifact_card_props_provider'; import { NoDataEmptyState } from './components/no_data_empty_state'; -import { ArtifactFlyoutProps, ArtifactFlyout } from './components/artifact_flyout'; +import type { ArtifactFlyoutProps } from './components/artifact_flyout'; +import { ArtifactFlyout } from './components/artifact_flyout'; import { useIsFlyoutOpened } from './hooks/use_is_flyout_opened'; import { useSetUrlParams } from './hooks/use_set_url_params'; import { useWithArtifactListData } from './hooks/use_with_artifact_list_data'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; -import { ArtifactListPageUrlParams } from './types'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { ArtifactListPageUrlParams } from './types'; import { useUrlParams } from '../../hooks/use_url_params'; -import { ListPageRouteState, MaybeImmutable } from '../../../../common/endpoint/types'; +import type { ListPageRouteState, MaybeImmutable } from '../../../../common/endpoint/types'; import { DEFAULT_EXCEPTION_LIST_ITEM_SEARCHABLE_FIELDS } from '../../../../common/endpoint/service/artifacts/constants'; import { ArtifactDeleteModal } from './components/artifact_delete_modal'; import { useGetEndpointSpecificPolicies } from '../../services/policies/hooks'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.test.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.test.ts index f0f4ab8e13782..c2e995260786e 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.test.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.test.ts @@ -5,13 +5,10 @@ * 2.0. */ -import { AppContextTestRender } from '../../../../common/mock/endpoint'; -import { trustedAppsAllHttpMocks } from '../../../mocks'; -import { - ArtifactListPageRenderingSetup, - getArtifactListPageRenderingSetup, - getDeferred, -} from '../mocks'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { trustedAppsAllHttpMocks } from '../../../mocks'; +import type { ArtifactListPageRenderingSetup } from '../mocks'; +import { getArtifactListPageRenderingSetup, getDeferred } from '../mocks'; import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.tsx index 011e90ff23af5..11ea7331b8fbe 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_delete_modal.tsx @@ -6,7 +6,7 @@ */ import React, { memo, useCallback } from 'react'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { i18n } from '@kbn/i18n'; import { EuiButtonEmpty, @@ -25,11 +25,9 @@ import { getPolicyIdsFromArtifact, isArtifactGlobal, } from '../../../../../common/endpoint/service/artifacts'; -import { - ARTIFACT_DELETE_ACTION_LABELS, - useWithArtifactDeleteItem, -} from '../hooks/use_with_artifact_delete_item'; -import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; +import type { ARTIFACT_DELETE_ACTION_LABELS } from '../hooks/use_with_artifact_delete_item'; +import { useWithArtifactDeleteItem } from '../hooks/use_with_artifact_delete_item'; +import type { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; export const ARTIFACT_DELETE_LABELS = Object.freeze({ deleteModalTitle: (itemName: string): string => diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.test.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.test.tsx index 2ad46612dcac5..fbe3d83668d88 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.test.tsx @@ -5,19 +5,20 @@ * 2.0. */ -import { ArtifactListPageProps } from '../artifact_list_page'; +import type { ArtifactListPageProps } from '../artifact_list_page'; import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { getArtifactListPageRenderingSetup, getDeferred, getFormComponentMock } from '../mocks'; +import type { getFormComponentMock } from '../mocks'; +import { getArtifactListPageRenderingSetup, getDeferred } from '../mocks'; import { ExceptionsListItemGenerator } from '../../../../../common/endpoint/data_generators/exceptions_list_item_generator'; -import { HttpFetchOptionsWithPath } from '@kbn/core/public'; +import type { HttpFetchOptionsWithPath } from '@kbn/core/public'; import { BY_POLICY_ARTIFACT_TAG_PREFIX } from '../../../../../common/endpoint/service/artifacts'; import { getEndpointPrivilegesInitialStateMock } from '../../../../common/components/user_privileges/endpoint/mocks'; -import { AppContextTestRender } from '../../../../common/mock/endpoint'; -import { trustedAppsAllHttpMocks } from '../../../mocks'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { trustedAppsAllHttpMocks } from '../../../mocks'; import { useUserPrivileges as _useUserPrivileges } from '../../../../common/components/user_privileges'; import { entriesToConditionEntries } from '../../../../common/utils/exception_list_items/mappers'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; jest.mock('../../../../common/components/user_privileges'); const useUserPrivileges = _useUserPrivileges as jest.Mock; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.tsx index bb8ae88f5155c..671b2926e9f10 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/artifact_flyout.tsx @@ -7,8 +7,8 @@ import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { DocLinks } from '@kbn/doc-links'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { DocLinks } from '@kbn/doc-links'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { EuiButton, EuiButtonEmpty, @@ -22,19 +22,19 @@ import { EuiTitle, } from '@elastic/eui'; -import { EuiFlyoutSize } from '@elastic/eui/src/components/flyout/flyout'; -import { HttpFetchError } from '@kbn/core/public'; +import type { EuiFlyoutSize } from '@elastic/eui/src/components/flyout/flyout'; +import type { HttpFetchError } from '@kbn/core/public'; import { useUrlParams } from '../../../hooks/use_url_params'; import { useIsFlyoutOpened } from '../hooks/use_is_flyout_opened'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useSetUrlParams } from '../hooks/use_set_url_params'; -import { +import type { ArtifactFormComponentOnChangeCallbackProps, ArtifactFormComponentProps, ArtifactListPageUrlParams, } from '../types'; import { ManagementPageLoader } from '../../management_page_loader'; -import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; import { useKibana, useToasts } from '../../../../common/lib/kibana'; import { createExceptionListItemForCreate } from '../../../../../common/endpoint/service/artifacts/utils'; import { useWithArtifactSubmitData } from '../hooks/use_with_artifact_submit_data'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.test.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.test.ts index cd396609fe7da..c9314440996e1 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.test.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/components/no_data_empty_state.test.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { trustedAppsAllHttpMocks, TrustedAppsGetListHttpMocksInterface } from '../../../mocks'; +import type { trustedAppsAllHttpMocks, TrustedAppsGetListHttpMocksInterface } from '../../../mocks'; import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { ArtifactListPageProps } from '../artifact_list_page'; -import { AppContextTestRender } from '../../../../common/mock/endpoint'; -import { getArtifactListPageRenderingSetup, getFormComponentMock } from '../mocks'; +import type { ArtifactListPageProps } from '../artifact_list_page'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { getFormComponentMock } from '../mocks'; +import { getArtifactListPageRenderingSetup } from '../mocks'; describe('When showing the Empty State in ArtifactListPage', () => { let render: ( diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_artifact_card_props_provider.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_artifact_card_props_provider.ts index e6fc740b932ba..beab437b4d7f1 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_artifact_card_props_provider.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_artifact_card_props_provider.ts @@ -5,13 +5,10 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { useCallback, useMemo } from 'react'; -import { - AnyArtifact, - ArtifactEntryCardProps, - useEndpointPoliciesToArtifactPolicies, -} from '../../artifact_entry_card'; +import type { AnyArtifact, ArtifactEntryCardProps } from '../../artifact_entry_card'; +import { useEndpointPoliciesToArtifactPolicies } from '../../artifact_entry_card'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useGetEndpointSpecificPolicies } from '../../../services/policies/hooks'; import { getLoadPoliciesError } from '../../../common/translations'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_artifact_allowed_per_policy_usage.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_artifact_allowed_per_policy_usage.ts index 08a51ca061fe0..d84d1028878c2 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_artifact_allowed_per_policy_usage.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_artifact_allowed_per_policy_usage.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { ArtifactFormComponentProps } from '../types'; +import type { ArtifactFormComponentProps } from '../types'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; import { isArtifactByPolicy } from '../../../../../common/endpoint/service/artifacts'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_flyout_opened.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_flyout_opened.ts index 59424aa8baa3d..a9461451872bd 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_flyout_opened.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_is_flyout_opened.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { useUrlParams } from '../../../hooks/use_url_params'; -import { ArtifactListPageUrlParams } from '../types'; +import type { ArtifactListPageUrlParams } from '../types'; const SHOW_VALUES: readonly string[] = ['create', 'edit']; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_kuery_from_exceptions_search_filter.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_kuery_from_exceptions_search_filter.ts index 60923a26c694f..d4d9a5cb30fa9 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_kuery_from_exceptions_search_filter.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_kuery_from_exceptions_search_filter.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { parsePoliciesAndFilterToKql, parseQueryFilterToKQL } from '../../../common/utils'; -import { MaybeImmutable } from '../../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../../common/endpoint/types'; export const useKueryFromExceptionsSearchFilter = ( filter: string | undefined, diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_delete_item.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_delete_item.ts index 73e5a9d66a15d..4f388954d2a3a 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_delete_item.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_delete_item.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { i18n } from '@kbn/i18n'; import { useMemo } from 'react'; import type { HttpFetchError } from '@kbn/core/public'; import { useToasts } from '../../../../common/lib/kibana'; -import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; import { useDeleteArtifact } from '../../../hooks/artifacts'; export const ARTIFACT_DELETE_ACTION_LABELS = Object.freeze({ diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_list_data.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_list_data.ts index d10d1b5d50b5f..1f343142ee18e 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_list_data.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_list_data.ts @@ -6,15 +6,15 @@ */ import { useEffect, useMemo, useState } from 'react'; -import { Pagination } from '@elastic/eui'; +import type { Pagination } from '@elastic/eui'; import { useQuery } from 'react-query'; import type { ServerApiError } from '../../../../common/types'; import { useIsMounted } from '../../../hooks/use_is_mounted'; import { MANAGEMENT_PAGE_SIZE_OPTIONS } from '../../../common/constants'; import { useUrlParams } from '../../../hooks/use_url_params'; -import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; -import { ArtifactListPageUrlParams } from '../types'; -import { MaybeImmutable } from '../../../../../common/endpoint/types'; +import type { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; +import type { ArtifactListPageUrlParams } from '../types'; +import type { MaybeImmutable } from '../../../../../common/endpoint/types'; import { useKueryFromExceptionsSearchFilter } from './use_kuery_from_exceptions_search_filter'; import { useListArtifact } from '../../../hooks/artifacts'; import { useUrlPagination } from '../../../hooks/use_url_pagination'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_submit_data.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_submit_data.ts index 89812e9b53ba5..505a5d8c327f5 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_submit_data.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/hooks/use_with_artifact_submit_data.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; -import { ArtifactFormComponentProps } from '../types'; +import type { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; +import type { ArtifactFormComponentProps } from '../types'; import { useCreateArtifact, useUpdateArtifact } from '../../../hooks/artifacts'; export const useWithArtifactSubmitData = ( diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/mocks.tsx b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/mocks.tsx index eab93a3e2116c..a9775c22e81ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/mocks.tsx @@ -10,9 +10,11 @@ import React from 'react'; import { act, waitFor, within } from '@testing-library/react'; // eslint-disable-next-line import/no-extraneous-dependencies import userEvent from '@testing-library/user-event'; -import { ArtifactFormComponentProps } from './types'; -import { ArtifactListPage, ArtifactListPageProps } from './artifact_list_page'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { ArtifactFormComponentProps } from './types'; +import type { ArtifactListPageProps } from './artifact_list_page'; +import { ArtifactListPage } from './artifact_list_page'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { trustedAppsAllHttpMocks } from '../../mocks'; import { TrustedAppsApiClient } from '../../pages/trusted_apps/service/api_client'; import { artifactListPageLabels } from './translations'; diff --git a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/types.ts b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/types.ts index ae0007f1aa86b..18379403167c5 100644 --- a/x-pack/plugins/security_solution/public/management/components/artifact_list_page/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/artifact_list_page/types.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { HttpFetchError } from '@kbn/core/public'; +import type { HttpFetchError } from '@kbn/core/public'; import type { ExceptionListItemSchema, CreateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { PolicyData } from '../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../common/endpoint/types'; export interface ArtifactListPageUrlParams { /** The page number for the list. Must be 1 based. */ diff --git a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx index 7023aef10c670..28f14934bc7c6 100644 --- a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx +++ b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_button/back_to_external_app_button.tsx @@ -7,10 +7,11 @@ import React, { memo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { CommonProps, EuiButtonEmpty } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiButtonEmpty } from '@elastic/eui'; import styled from 'styled-components'; -import { ListPageRouteState } from '../../../../common/endpoint/types'; +import type { ListPageRouteState } from '../../../../common/endpoint/types'; import { useNavigateToAppEventHandler } from '../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; diff --git a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_secondary_button/back_to_external_app_secondary_button.tsx b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_secondary_button/back_to_external_app_secondary_button.tsx index 2dc68b27f2c42..d85be64b56525 100644 --- a/x-pack/plugins/security_solution/public/management/components/back_to_external_app_secondary_button/back_to_external_app_secondary_button.tsx +++ b/x-pack/plugins/security_solution/public/management/components/back_to_external_app_secondary_button/back_to_external_app_secondary_button.tsx @@ -7,9 +7,10 @@ import React, { memo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { CommonProps, EuiButtonEmpty } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiButtonEmpty } from '@elastic/eui'; -import { ListPageRouteState } from '../../../../common/endpoint/types'; +import type { ListPageRouteState } from '../../../../common/endpoint/types'; import { useNavigateToAppEventHandler } from '../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx index fb9afb3754f09..be9600da0b706 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import React, { memo, PropsWithChildren, ReactNode, useEffect } from 'react'; +import type { PropsWithChildren, ReactNode } from 'react'; +import React, { memo, useEffect } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiSpacer } from '@elastic/eui'; import { UnsupportedMessageCallout } from './unsupported_message_callout'; -import { ParsedCommandInterface } from '../service/parsed_command_input'; -import { CommandDefinition, CommandExecutionComponentProps } from '../types'; +import type { ParsedCommandInterface } from '../service/parsed_command_input'; +import type { CommandDefinition, CommandExecutionComponentProps } from '../types'; import { CommandInputUsage } from './command_usage'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/clear_command.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/clear_command.tsx index bfa06f55d2665..e5afca5a626b9 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/clear_command.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/clear_command.tsx @@ -7,7 +7,7 @@ import { memo, useEffect } from 'react'; import { useConsoleStateDispatch } from '../../hooks/state_selectors/use_console_state_dispatch'; -import { CommandExecutionComponentProps } from '../../types'; +import type { CommandExecutionComponentProps } from '../../types'; export const ClearCommand = memo(({ status, setStatus }) => { const dispatch = useConsoleStateDispatch(); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/help_command_argument.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/help_command_argument.tsx index f67c44013d059..1c74ee178bfcc 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/help_command_argument.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/builtin_commands/help_command_argument.tsx @@ -10,7 +10,7 @@ import React, { memo, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { CommandUsage } from '../command_usage'; import { HelpOutput } from '../help_output'; -import { CommandExecutionComponentProps } from '../../types'; +import type { CommandExecutionComponentProps } from '../../types'; /** * Builtin component that handles the output of command's `--help` argument diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.test.tsx index e39a36de0ddfa..55ab4a17ec5a5 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_output.test.tsx @@ -6,11 +6,11 @@ */ import React from 'react'; -import { ConsoleProps } from '..'; -import { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { ConsoleProps } from '..'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; import { getConsoleTestSetup } from '../mocks'; import { act } from '@testing-library/react'; -import { CommandExecutionComponentProps } from '../types'; +import type { CommandExecutionComponentProps } from '../types'; describe('When using CommandExecutionOutput component', () => { let render: (props?: Partial) => ReturnType; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx index 1fb0b2ebe26d6..90172fdd29c32 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_execution_result.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { memo, PropsWithChildren, ComponentType, useMemo } from 'react'; -import type { ReactNode } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { ReactNode, PropsWithChildren, ComponentType } from 'react'; import { i18n } from '@kbn/i18n'; -import { CommonProps, EuiPanel, EuiSpacer } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiPanel, EuiSpacer } from '@elastic/eui'; import classNames from 'classnames'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx index a689433baf4da..42990db6e48ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { AppContextTestRender } from '../../../../../common/mock/endpoint'; -import { ConsoleTestSetup, getConsoleTestSetup } from '../../mocks'; -import { ConsoleProps } from '../../types'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import type { ConsoleTestSetup } from '../../mocks'; +import { getConsoleTestSetup } from '../../mocks'; +import type { ConsoleProps } from '../../types'; import { INPUT_DEFAULT_PLACEHOLDER_TEXT } from '../console_state/state_update_handlers/handle_input_area_state'; import { waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx index 289d15d118acc..9c5d528c46659 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/command_input.tsx @@ -5,24 +5,19 @@ * 2.0. */ -import React, { - memo, - MouseEventHandler, - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from 'react'; -import { CommonProps, EuiFlexGroup, EuiFlexItem, useResizeObserver } from '@elastic/eui'; +import type { MouseEventHandler } from 'react'; +import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, useResizeObserver } from '@elastic/eui'; import styled from 'styled-components'; import classNames from 'classnames'; -import { ConsoleDataState } from '../console_state/types'; +import type { ConsoleDataState } from '../console_state/types'; import { useInputHints } from './hooks/use_input_hints'; import { InputPlaceholder } from './components/input_placeholder'; import { useWithInputTextEntered } from '../../hooks/state_selectors/use_with_input_text_entered'; import { InputAreaPopover } from './components/input_area_popover'; -import { KeyCapture, KeyCaptureProps } from './key_capture'; +import type { KeyCaptureProps } from './key_capture'; +import { KeyCapture } from './key_capture'; import { useConsoleStateDispatch } from '../../hooks/state_selectors/use_console_state_dispatch'; import { useTestIdGenerator } from '../../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../../hooks/state_selectors/use_data_test_subj'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/command_input_history.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/command_input_history.tsx index 53b05d1f69ffd..ba1e4eb610ea5 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/command_input_history.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/command_input_history.tsx @@ -6,9 +6,10 @@ */ import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { EuiSelectable, EuiSelectableOption, EuiSelectableProps } from '@elastic/eui'; +import type { EuiSelectableOption, EuiSelectableProps } from '@elastic/eui'; +import { EuiSelectable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { InputHistoryItem } from '../../console_state/types'; +import type { InputHistoryItem } from '../../console_state/types'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; import { useWithInputTextEntered } from '../../../hooks/state_selectors/use_with_input_text_entered'; import { UserCommandInput } from '../../user_command_input'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/input_area_popover.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/input_area_popover.tsx index b6d8a516e5fd2..38043eeff2399 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/input_area_popover.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/components/input_area_popover.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { CSSProperties, memo, ReactElement, useCallback, useEffect, useMemo } from 'react'; +import type { CSSProperties, ReactElement } from 'react'; +import React, { memo, useCallback, useEffect, useMemo } from 'react'; import { EuiFocusTrap, EuiPopover } from '@elastic/eui'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; import { CommandInputHistory } from './command_input_history'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts index 8084fb9803bc1..63238a49f48bd 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/hooks/use_input_hints.ts @@ -8,7 +8,7 @@ import { useEffect, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { getArgumentsForCommand } from '../../../service/parsed_command_input'; -import { CommandDefinition } from '../../..'; +import type { CommandDefinition } from '../../..'; import { useConsoleStateDispatch } from '../../../hooks/state_selectors/use_console_state_dispatch'; import { useWithInputShowPopover } from '../../../hooks/state_selectors/use_with_input_show_popover'; import { useWithInputCommandEntered } from '../../../hooks/state_selectors/use_with_input_command_entered'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/key_capture.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/key_capture.tsx index 074d24aca9648..a88cffed733a6 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_input/key_capture.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_input/key_capture.tsx @@ -5,16 +5,8 @@ * 2.0. */ -import React, { - FormEventHandler, - KeyboardEventHandler, - memo, - MutableRefObject, - useCallback, - useMemo, - useRef, - useState, -} from 'react'; +import type { FormEventHandler, KeyboardEventHandler, MutableRefObject } from 'react'; +import React, { memo, useCallback, useMemo, useRef, useState } from 'react'; import { pick } from 'lodash'; import styled from 'styled-components'; import { useTestIdGenerator } from '../../../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx index 1cb3f32496ef4..9b3052336b790 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_list.tsx @@ -17,7 +17,7 @@ import { EuiTextColor, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { CommandDefinition } from '../types'; +import type { CommandDefinition } from '../types'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/command_usage.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/command_usage.tsx index 3eb32e665bd97..d6ef9317a83be 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/command_usage.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/command_usage.tsx @@ -10,7 +10,7 @@ import { EuiDescriptionList, EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ConsoleCodeBlock } from './console_code_block'; import { getArgumentsForCommand } from '../service/parsed_command_input'; -import { CommandDefinition } from '../types'; +import type { CommandDefinition } from '../types'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_code_block.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_code_block.tsx index 0bf12b1a5e905..5c908bca95357 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_code_block.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_code_block.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo } from 'react'; import { EuiText, EuiTextColor } from '@elastic/eui'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_header.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_header.tsx index 035ae57fa6d91..058486e13f0ab 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_header.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_header.tsx @@ -10,7 +10,7 @@ import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useConsoleStateDispatch } from '../hooks/state_selectors/use_console_state_dispatch'; import { useWithSidePanel } from '../hooks/state_selectors/use_with_side_panel'; -import { ConsoleProps } from '..'; +import type { ConsoleProps } from '..'; const HELP_LABEL = i18n.translate('xpack.securitySolution.console.layoutHeader.helpButtonLabel', { defaultMessage: 'Show help', diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx index 918709924ca10..f51c62bd38849 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/console_page_overlay.tsx @@ -5,11 +5,13 @@ * 2.0. */ -import React, { memo, ReactNode, useCallback, MouseEventHandler, useMemo } from 'react'; +import type { ReactNode, MouseEventHandler } from 'react'; +import React, { memo, useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { PageLayout, PageLayoutProps } from './page_layout'; +import type { PageLayoutProps } from './page_layout'; +import { PageLayout } from './page_layout'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; import { PageOverlay } from '../../../../page_overlay/page_overlay'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx index 05111ce20ee09..e0c385803773e 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/components/page_layout.tsx @@ -5,19 +5,20 @@ * 2.0. */ -import React, { memo, PropsWithChildren, ReactNode, useMemo } from 'react'; +import type { PropsWithChildren, ReactNode } from 'react'; +import React, { memo, useMemo } from 'react'; +import type { EuiPanelProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiPageHeader, EuiPanel, - EuiPanelProps, EuiSpacer, EuiTitle, } from '@elastic/eui'; import styled from 'styled-components'; import classnames from 'classnames'; -import { EuiPageHeaderProps } from '@elastic/eui/src/components/page/page_header/page_header'; +import type { EuiPageHeaderProps } from '@elastic/eui/src/components/page/page_header/page_header'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; const EuiPanelStyled = styled(EuiPanel)` diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.test.tsx index 9330111913ba4..9732082797ae0 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { renderHook as _renderHook, RenderHookResult, act } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook as _renderHook, act } from '@testing-library/react-hooks'; import { useConsoleManager } from './console_manager'; import React from 'react'; import type { @@ -13,10 +14,8 @@ import type { ConsoleRegistrationInterface, RegisteredConsoleClient, } from './types'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { ConsoleManagerTestComponent, getConsoleManagerMockRenderResultQueriesAndActions, diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx index e3b85d89f4f7a..932ffb1e4b477 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/console_manager.tsx @@ -5,18 +5,11 @@ * 2.0. */ -import React, { - memo, - PropsWithChildren, - useCallback, - useContext, - useMemo, - useRef, - useState, -} from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { memo, useCallback, useContext, useMemo, useRef, useState } from 'react'; import type { ConsoleDataState } from '../console_state/types'; import { ConsolePageOverlay } from './components/console_page_overlay'; -import { +import type { ConsoleManagerClient, ConsoleRegistrationInterface, RegisteredConsoleClient, diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx index 7e9eae66bf606..1a33514bb47c2 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/mocks.tsx @@ -11,10 +11,10 @@ import React, { memo, useCallback } from 'react'; import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import userEvent from '@testing-library/user-event'; import { waitFor } from '@testing-library/react'; -import { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; import { getCommandListMock } from '../../mocks'; import { useConsoleManager } from './console_manager'; -import { ConsoleRegistrationInterface, RegisteredConsoleClient } from './types'; +import type { ConsoleRegistrationInterface, RegisteredConsoleClient } from './types'; export const getNewConsoleRegistrationMock = ( overrides: Partial = {} diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts index 3595c565bc5b2..5fa4fee704036 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_manager/types.ts @@ -8,7 +8,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { ComponentType } from 'react'; -import { ConsoleProps } from '../../types'; +import type { ConsoleProps } from '../../types'; export interface ConsoleRegistrationInterface { id: string; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/console_state.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/console_state.tsx index 79d4edba30996..c533e754a112a 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/console_state.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/console_state.tsx @@ -5,17 +5,11 @@ * 2.0. */ -import React, { - useReducer, - memo, - createContext, - PropsWithChildren, - useContext, - useEffect, - useCallback, -} from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { useReducer, memo, createContext, useContext, useEffect, useCallback } from 'react'; import { useWithManagedConsoleState } from '../console_manager/console_manager'; -import { InitialStateInterface, initiateState, stateDataReducer } from './state_reducer'; +import type { InitialStateInterface } from './state_reducer'; +import { initiateState, stateDataReducer } from './state_reducer'; import type { ConsoleDataState, ConsoleStore } from './types'; const ConsoleStateContext = createContext(null); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx index cb5e2a387711b..2c7f30a83cd5c 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.test.tsx @@ -6,11 +6,11 @@ */ import React from 'react'; -import { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { getConsoleTestSetup } from '../../../mocks'; import type { ConsoleTestSetup } from '../../../mocks'; import { waitFor } from '@testing-library/react'; -import { ConsoleProps } from '../../../types'; +import type { ConsoleProps } from '../../../types'; describe('When a Console command is entered by the user', () => { let render: (props?: Partial) => ReturnType; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx index 1c2d15f8f693d..c569cb104cbdc 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx @@ -15,16 +15,17 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { ConsoleCodeBlock } from '../../console_code_block'; import { handleInputAreaState } from './handle_input_area_state'; import { HelpCommandArgument } from '../../builtin_commands/help_command_argument'; -import { +import type { CommandHistoryItem, ConsoleDataAction, ConsoleDataState, ConsoleStoreReducer, } from '../types'; -import { parseCommandInput, ParsedCommandInterface } from '../../../service/parsed_command_input'; +import type { ParsedCommandInterface } from '../../../service/parsed_command_input'; +import { parseCommandInput } from '../../../service/parsed_command_input'; import { UnknownCommand } from '../../unknown_comand'; import { BadArgument } from '../../bad_argument'; -import { Command, CommandDefinition, CommandExecutionComponentProps } from '../../../types'; +import type { Command, CommandDefinition, CommandExecutionComponentProps } from '../../../types'; const toCliArgumentOption = (argName: string) => `--${argName}`; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts index 5890f0d59a8e8..763ee487438de 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_input_area_state.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { v4 as uuidV4 } from 'uuid'; import { getCommandNameFromTextInput } from '../../../service/parsed_command_input'; -import { ConsoleDataAction, ConsoleStoreReducer } from '../types'; +import type { ConsoleDataAction, ConsoleStoreReducer } from '../types'; export const INPUT_DEFAULT_PLACEHOLDER_TEXT = i18n.translate( 'xpack.securitySolution.handleInputAreaState.inputPlaceholderText', diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_side_panel.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_side_panel.ts index 051bb58ccd015..06e82beb46589 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_side_panel.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_side_panel.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConsoleDataAction, ConsoleStoreReducer } from '../types'; +import type { ConsoleDataAction, ConsoleStoreReducer } from '../types'; type SidePanelAction = ConsoleDataAction & { type: 'showSidePanel'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts index 1d1de9702f40b..62782da7156ba 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/types.ts @@ -6,7 +6,7 @@ */ import type { Dispatch, Reducer } from 'react'; -import { CommandInputProps } from '../command_input'; +import type { CommandInputProps } from '../command_input'; import type { Command, CommandDefinition, CommandExecutionComponent } from '../../types'; export interface ConsoleDataState { diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_text.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_text.tsx index e89d9b9c3bbb8..22b0139af8920 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_text.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_text.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import React, { memo, PropsWithChildren } from 'react'; -import { EuiText, EuiTextColor, EuiTextColorProps, EuiTextProps, useEuiTheme } from '@elastic/eui'; +import type { PropsWithChildren } from 'react'; +import React, { memo } from 'react'; +import type { EuiTextColorProps, EuiTextProps } from '@elastic/eui'; +import { EuiText, EuiTextColor, useEuiTheme } from '@elastic/eui'; type ConsoleTextProps = PropsWithChildren<{ size?: EuiTextProps['size']; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/help_output.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/help_output.tsx index 36f62a48f9e1a..f1606dc224332 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/help_output.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/help_output.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { memo, PropsWithChildren, ReactNode } from 'react'; +import type { PropsWithChildren, ReactNode } from 'react'; +import React, { memo } from 'react'; import { EuiPanel } from '@elastic/eui'; -import { MaybeImmutable } from '../../../../../common/endpoint/types'; -import { Command } from '..'; +import type { MaybeImmutable } from '../../../../../common/endpoint/types'; +import type { Command } from '..'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/history_item.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/history_item.tsx index f4708e6ee7bc1..72419c1cb56da 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/history_item.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/history_item.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { memo } from 'react'; import { EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { css } from '@kbn/kibana-react-plugin/common'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/history_output.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/history_output.tsx index 4935476059e65..e5ea5933aa6fc 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/history_output.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/history_output.tsx @@ -6,7 +6,8 @@ */ import React, { memo, useEffect, useMemo } from 'react'; -import { CommonProps, EuiFlexGroup } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiFlexGroup } from '@elastic/eui'; import { CommandExecutionOutput } from './command_execution_output'; import { useCommandHistory } from '../hooks/state_selectors/use_command_history'; import { useConsoleStateDispatch } from '../hooks/state_selectors/use_console_state_dispatch'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_layout.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_layout.tsx index dfc4775f3d843..fc086ce22be0e 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_layout.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui'; export interface SidePanelContentLayoutProps { diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_manager.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_manager.tsx index fdae17a5d1086..376564ab896a7 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_manager.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/side_panel/side_panel_content_manager.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo, useMemo } from 'react'; import { EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { CommandList } from '../command_list'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx index 0cda295d3a244..1ca6bf3f64053 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/unknown_comand.tsx @@ -9,7 +9,7 @@ import React, { memo, useEffect, useMemo } from 'react'; import { EuiIcon } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { UnsupportedMessageCallout } from './unsupported_message_callout'; -import { CommandExecutionComponentProps } from '../types'; +import type { CommandExecutionComponentProps } from '../types'; import { useDataTestSubj } from '../hooks/state_selectors/use_data_test_subj'; import { useTestIdGenerator } from '../../../hooks/use_test_id_generator'; import { ConsoleCodeBlock } from './console_code_block'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/unsupported_message_callout.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/unsupported_message_callout.tsx index 0cc78b21a3b38..efa1723222dad 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/unsupported_message_callout.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/unsupported_message_callout.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { memo, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { memo } from 'react'; import { EuiText, EuiTextColor } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx index e0722c5cf68ce..5510c180feb4c 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/console.test.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import { AppContextTestRender } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; import { getConsoleTestSetup } from './mocks'; import userEvent from '@testing-library/user-event'; -import { ConsoleProps } from './types'; +import type { ConsoleProps } from './types'; describe('When using Console component', () => { let render: (props?: Partial) => ReturnType; diff --git a/x-pack/plugins/security_solution/public/management/components/console/console.tsx b/x-pack/plugins/security_solution/public/management/components/console/console.tsx index c2b4f7df7aca6..9c2c4eb70c4ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/console.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/console.tsx @@ -10,8 +10,9 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { ConsoleFooter } from './components/console_footer'; import { ConsoleHeader } from './components/console_header'; -import { CommandInput, CommandInputProps } from './components/command_input'; -import { ConsoleProps } from './types'; +import type { CommandInputProps } from './components/command_input'; +import { CommandInput } from './components/command_input'; +import type { ConsoleProps } from './types'; import { ConsoleStateProvider } from './components/console_state'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; import { useWithManagedConsole } from './components/console_manager/console_manager'; diff --git a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_console_state_dispatch.ts b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_console_state_dispatch.ts index 90e5fe094f9c7..d10a9313d901e 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_console_state_dispatch.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_console_state_dispatch.ts @@ -6,7 +6,7 @@ */ import { useConsoleStore } from '../../components/console_state/console_state'; -import { ConsoleStore } from '../../components/console_state/types'; +import type { ConsoleStore } from '../../components/console_state/types'; export const useConsoleStateDispatch = (): ConsoleStore['dispatch'] => { return useConsoleStore().dispatch; diff --git a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_custom_help_component.ts b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_custom_help_component.ts index b90e5166c81d7..8091f18024d1b 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_custom_help_component.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_custom_help_component.ts @@ -6,7 +6,7 @@ */ import { useConsoleStore } from '../../components/console_state/console_state'; -import { ConsoleDataState } from '../../components/console_state/types'; +import type { ConsoleDataState } from '../../components/console_state/types'; export const useWithCustomHelpComponent = (): ConsoleDataState['HelpComponent'] => { return useConsoleStore().state.HelpComponent; diff --git a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_side_panel.ts b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_side_panel.ts index 28bf127a9c066..d8bf095bea155 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_side_panel.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/hooks/state_selectors/use_with_side_panel.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConsoleDataState } from '../../components/console_state/types'; +import type { ConsoleDataState } from '../../components/console_state/types'; import { useConsoleStore } from '../../components/console_state/console_state'; export const useWithSidePanel = (): ConsoleDataState['sidePanel'] => { diff --git a/x-pack/plugins/security_solution/public/management/components/console/service/builtin_commands.tsx b/x-pack/plugins/security_solution/public/management/components/console/service/builtin_commands.tsx index f0b2c58647805..485b43115e19b 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/service/builtin_commands.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/service/builtin_commands.tsx @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { ClearCommand } from '../components/builtin_commands/clear_command'; import { HelpCommand } from '../components/builtin_commands/help_command'; -import { CommandDefinition } from '../types'; +import type { CommandDefinition } from '../types'; export const getBuiltinCommands = (): CommandDefinition[] => { return [ diff --git a/x-pack/plugins/security_solution/public/management/components/console/service/parse_command_input.test.ts b/x-pack/plugins/security_solution/public/management/components/console/service/parse_command_input.test.ts index 1fad4b578d308..aac0bdd7c55dc 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/service/parse_command_input.test.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/service/parse_command_input.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - parseCommandInput, - ParsedCommandInterface, - parsedPidOrEntityIdParameter, -} from './parsed_command_input'; +import type { ParsedCommandInterface } from './parsed_command_input'; +import { parseCommandInput, parsedPidOrEntityIdParameter } from './parsed_command_input'; describe('when using parsed command input utils', () => { describe('when using parseCommandInput()', () => { diff --git a/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts b/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts index 0507337230765..420d95517a4b7 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/service/parsed_command_input.ts @@ -7,7 +7,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { CommandDefinition } from '..'; +import type { CommandDefinition } from '..'; import type { EndpointActionDataParameterTypes } from '../../../../../common/endpoint/types'; export type ParsedArgData = string[]; diff --git a/x-pack/plugins/security_solution/public/management/components/console/types.ts b/x-pack/plugins/security_solution/public/management/components/console/types.ts index 4ef15b8a2a888..dc3ff45f161e3 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/console/types.ts @@ -9,7 +9,7 @@ import type { ComponentType } from 'react'; import type { CommonProps } from '@elastic/eui'; -import { CommandExecutionResultComponent } from './components/command_execution_result'; +import type { CommandExecutionResultComponent } from './components/command_execution_result'; import type { CommandExecutionState } from './components/console_state/types'; import type { Immutable, MaybeImmutable } from '../../../../common/endpoint/types'; import type { ParsedArgData, ParsedCommandInterface } from './service/parsed_command_input'; diff --git a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_item_nav_by_router.tsx b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_item_nav_by_router.tsx index 4f5052b5732f0..b1dc632707ed3 100644 --- a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_item_nav_by_router.tsx +++ b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_item_nav_by_router.tsx @@ -6,14 +6,10 @@ */ import React, { memo, useMemo } from 'react'; -import { - EuiContextMenuItem, - EuiContextMenuItemProps, - EuiFlexGroup, - EuiFlexItem, -} from '@elastic/eui'; +import type { EuiContextMenuItemProps } from '@elastic/eui'; +import { EuiContextMenuItem, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; -import { NavigateToAppOptions } from '@kbn/core/public'; +import type { NavigateToAppOptions } from '@kbn/core/public'; import { useNavigateToAppEventHandler } from '../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.test.tsx b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.test.tsx index 40ced60ea1e02..04fe54b89a539 100644 --- a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.test.tsx @@ -7,11 +7,10 @@ import React from 'react'; import { EuiButtonEmpty } from '@elastic/eui'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { - ContextMenuWithRouterSupport, - ContextMenuWithRouterSupportProps, -} from './context_menu_with_router_support'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { ContextMenuWithRouterSupportProps } from './context_menu_with_router_support'; +import { ContextMenuWithRouterSupport } from './context_menu_with_router_support'; import { act, fireEvent, waitForElementToBeRemoved } from '@testing-library/react'; import { APP_UI_ID } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx index 92fabcd2b6ca2..558e80fd68a6f 100644 --- a/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx +++ b/x-pack/plugins/security_solution/public/management/components/context_menu_with_router_support/context_menu_with_router_support.tsx @@ -5,21 +5,13 @@ * 2.0. */ -import React, { CSSProperties, HTMLAttributes, memo, useCallback, useMemo, useState } from 'react'; -import { - CommonProps, - EuiContextMenuPanel, - EuiContextMenuPanelProps, - EuiPopover, - EuiPopoverProps, - EuiPopoverTitle, - EuiLoadingContent, -} from '@elastic/eui'; +import type { CSSProperties, HTMLAttributes } from 'react'; +import React, { memo, useCallback, useMemo, useState } from 'react'; +import type { CommonProps, EuiContextMenuPanelProps, EuiPopoverProps } from '@elastic/eui'; +import { EuiContextMenuPanel, EuiPopover, EuiPopoverTitle, EuiLoadingContent } from '@elastic/eui'; import uuid from 'uuid'; -import { - ContextMenuItemNavByRouter, - ContextMenuItemNavByRouterProps, -} from './context_menu_item_nav_by_router'; +import type { ContextMenuItemNavByRouterProps } from './context_menu_item_nav_by_router'; +import { ContextMenuItemNavByRouter } from './context_menu_item_nav_by_router'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; export interface ContextMenuWithRouterSupportProps diff --git a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.test.tsx b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.test.tsx index 4b684bc083d04..41eb4c3be7912 100644 --- a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.test.tsx @@ -5,12 +5,14 @@ * 2.0. */ -import { EffectedPolicySelect, EffectedPolicySelectProps } from './effected_policy_select'; +import type { EffectedPolicySelectProps } from './effected_policy_select'; +import { EffectedPolicySelect } from './effected_policy_select'; import React from 'react'; import { forceHTMLElementOffsetWidth } from './test_utils'; import { fireEvent, act } from '@testing-library/react'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; describe('when using EffectedPolicySelect component', () => { const generator = new EndpointDocGenerator('effected-policy-select'); diff --git a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx index 72ed2449b87e1..da5c1c1f68535 100644 --- a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx +++ b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/effected_policy_select.tsx @@ -6,24 +6,23 @@ */ import React, { memo, useCallback, useMemo } from 'react'; +import type { EuiButtonGroupOptionProps, EuiSelectableProps } from '@elastic/eui'; import { EuiButtonGroup, - EuiButtonGroupOptionProps, EuiCheckbox, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelectable, - EuiSelectableProps, EuiSpacer, EuiText, htmlIdGenerator, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { EuiSelectableOption } from '@elastic/eui/src/components/selectable/selectable_option'; +import type { EuiSelectableOption } from '@elastic/eui/src/components/selectable/selectable_option'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; -import { PolicyData } from '../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../common/endpoint/types'; import { LinkToApp } from '../../../common/components/endpoint/link_to_app'; import { getPolicyDetailPath } from '../../common/routing'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; diff --git a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/test_utils.ts b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/test_utils.ts index 5fec52f0c90c4..ddc9d73c1fd67 100644 --- a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/test_utils.ts +++ b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/test_utils.ts @@ -6,7 +6,7 @@ */ import userEvent from '@testing-library/user-event'; -import { AppContextTestRender } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; /** * Forces the `offsetWidth` of `HTMLElement` to a given value. Needed due to the use of diff --git a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/utils.ts b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/utils.ts index 3f90df40391bc..3d51955f65dc6 100644 --- a/x-pack/plugins/security_solution/public/management/components/effected_policy_select/utils.ts +++ b/x-pack/plugins/security_solution/public/management/components/effected_policy_select/utils.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { PolicyData } from '../../../../common/endpoint/types'; -import { EffectedPolicySelection } from './effected_policy_select'; +import type { PolicyData } from '../../../../common/endpoint/types'; +import type { EffectedPolicySelection } from './effected_policy_select'; import { GLOBAL_ARTIFACT_TAG } from '../../../../common/endpoint/service/artifacts/constants'; /** diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.test.tsx index 340075322a8f9..2b0acb407be04 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.test.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { - EndpointAgentAndIsolationStatus, - EndpointAgentAndIsolationStatusProps, -} from './endpoint_agent_and_isolation_status'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { EndpointAgentAndIsolationStatusProps } from './endpoint_agent_and_isolation_status'; +import { EndpointAgentAndIsolationStatus } from './endpoint_agent_and_isolation_status'; import { HostStatus } from '../../../../common/endpoint/types'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.tsx index 2170456ee57de..b0daa7a411728 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_agent_and_isolation_status/endpoint_agent_and_isolation_status.tsx @@ -9,12 +9,10 @@ import React, { memo } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; -import { HostStatus } from '../../../../common/endpoint/types'; +import type { HostStatus } from '../../../../common/endpoint/types'; import { AgentStatus } from '../../../common/components/endpoint/agent_status'; -import { - EndpointHostIsolationStatus, - EndpointHostIsolationStatusProps, -} from '../../../common/components/endpoint/host_isolation'; +import type { EndpointHostIsolationStatusProps } from '../../../common/components/endpoint/host_isolation'; +import { EndpointHostIsolationStatus } from '../../../common/components/endpoint/host_isolation'; const EuiFlexGroupStyled = styled(EuiFlexGroup)` .isolation-status { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.test.tsx index c35fecaa647cd..3b98fb46ecd28 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.test.tsx @@ -5,11 +5,10 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { - EndpointAppliedPolicyStatus, - EndpointAppliedPolicyStatusProps, -} from './endpoint_applied_policy_status'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { EndpointAppliedPolicyStatusProps } from './endpoint_applied_policy_status'; +import { EndpointAppliedPolicyStatus } from './endpoint_applied_policy_status'; import React from 'react'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { POLICY_STATUS_TO_TEXT } from '../../pages/endpoint_hosts/view/host_constants'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.tsx index a7d18ced6047e..22574fd2d8d10 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_applied_policy_status/endpoint_applied_policy_status.tsx @@ -5,14 +5,15 @@ * 2.0. */ -import React, { memo, PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { memo } from 'react'; import { EuiHealth, EuiToolTip, EuiText, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { POLICY_STATUS_TO_HEALTH_COLOR, POLICY_STATUS_TO_TEXT, } from '../../pages/endpoint_hosts/view/host_constants'; -import { HostMetadata } from '../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../common/endpoint/types'; /** * Displays the status of an applied policy on the Endpoint (using the information provided diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_policy_link.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_policy_link.tsx index c284d2b1ce3db..97b51cf604260 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_policy_link.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_policy_link.tsx @@ -6,11 +6,12 @@ */ import React, { memo, useMemo } from 'react'; -import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink } from '@elastic/eui'; import { getPolicyDetailPath } from '../common/routing'; import { useNavigateByRouterEventHandler } from '../../common/hooks/endpoint/use_navigate_by_router_event_handler'; import { useAppUrl } from '../../common/lib/kibana/hooks'; -import { PolicyDetailsRouteState } from '../../../common/endpoint/types'; +import type { PolicyDetailsRouteState } from '../../../common/endpoint/types'; /** * A policy link (to details) that first checks to see if the policy id exists against diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx index 69e14ed169b71..2e9ad0bd42959 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_error.tsx @@ -8,8 +8,8 @@ import React, { memo } from 'react'; import { EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { CommandExecutionResultComponent } from '../console/components/command_execution_result'; -import { ImmutableArray } from '../../../../common/endpoint/types'; +import type { CommandExecutionResultComponent } from '../console/components/command_execution_result'; +import type { ImmutableArray } from '../../../../common/endpoint/types'; export const ActionError = memo<{ title: string; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_log_button.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_log_button.tsx index 28a0ebc553960..10c8dab53fbf4 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_log_button.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/action_log_button.tsx @@ -8,7 +8,7 @@ import React, { memo, useCallback, useState } from 'react'; import { EuiButton, EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EndpointResponderExtensionComponentProps } from './types'; +import type { EndpointResponderExtensionComponentProps } from './types'; import { ResponseActionsList } from '../endpoint_response_actions_list/response_actions_list'; import { UX_MESSAGES } from '../endpoint_response_actions_list/translations'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts index e5c0af1f72e3c..5b0d1bd0de349 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/endpoint_response_actions_console_commands.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { CommandDefinition } from '../console'; +import type { CommandDefinition } from '../console'; import { IsolateActionResult } from './isolate_action'; import { ReleaseActionResult } from './release_action'; import { KillProcessActionResult } from './kill_process_action'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx index 962a70d99d299..8977b1fb425a4 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { ConsoleManagerTestComponent, getConsoleManagerMockRenderResultQueriesAndActions, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.tsx index c19e2995ebeb0..72964dbdf05d1 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/get_processes_action.tsx @@ -9,12 +9,12 @@ import React, { memo, useEffect, useMemo } from 'react'; import styled from 'styled-components'; import { EuiBasicTable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { HttpFetchError } from '@kbn/core/public'; +import type { HttpFetchError } from '@kbn/core/public'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ActionDetails, ProcessesEntry } from '../../../../common/endpoint/types'; +import type { ActionDetails, ProcessesEntry } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; -import { EndpointCommandDefinitionMeta } from './types'; -import { CommandExecutionComponentProps } from '../console/types'; +import type { EndpointCommandDefinitionMeta } from './types'; +import type { CommandExecutionComponentProps } from '../console/types'; import { useSendGetEndpointProcessesRequest } from '../../hooks/endpoint/use_send_get_endpoint_processes_request'; import { ActionError } from './action_error'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx index f4ff750284e48..215e7554cc5bf 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.test.tsx @@ -7,8 +7,9 @@ import React from 'react'; import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; -import { HostInfo } from '../../../../common/endpoint/types'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { HostInfo } from '../../../../common/endpoint/types'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useGetEndpointDetails } from '../../hooks/endpoint/use_get_endpoint_details'; import { useGetEndpointPendingActionsSummary } from '../../hooks/endpoint/use_get_endpoint_pending_actions_summary'; import { mockEndpointDetailsApiResult } from '../../pages/endpoint_hosts/store/mock_endpoint_result_list'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx index 3ff55f9893e14..c9c6ab9e1097c 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/header_endpoint_info.tsx @@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingContent, EuiToolTip } fro import { FormattedMessage, FormattedRelative } from '@kbn/i18n-react'; import { useGetEndpointDetails } from '../../hooks/endpoint/use_get_endpoint_details'; import { useGetEndpointPendingActionsSummary } from '../../hooks/endpoint/use_get_endpoint_pending_actions_summary'; -import { EndpointHostIsolationStatusProps } from '../../../common/components/endpoint/host_isolation'; +import type { EndpointHostIsolationStatusProps } from '../../../common/components/endpoint/host_isolation'; import { EndpointAgentAndIsolationStatus } from '../endpoint_agent_and_isolation_status'; interface HeaderEndpointInfoProps { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx index b3fc1b7335012..7694606490f37 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { ConsoleManagerTestComponent, getConsoleManagerMockRenderResultQueriesAndActions, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx index 312ca69bc5b29..c719dfb7787bd 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/isolate_action.tsx @@ -7,11 +7,11 @@ import React, { memo, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { ActionDetails } from '../../../../common/endpoint/types'; +import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; -import { EndpointCommandDefinitionMeta } from './types'; +import type { EndpointCommandDefinitionMeta } from './types'; import { useSendIsolateEndpointRequest } from '../../hooks/endpoint/use_send_isolate_endpoint_request'; -import { CommandExecutionComponentProps } from '../console/types'; +import type { CommandExecutionComponentProps } from '../console/types'; import { ActionError } from './action_error'; export const IsolateActionResult = memo< diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx index caf582f6eb81a..ff027aa7c788e 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/kill_process_action.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { ConsoleManagerTestComponent, getConsoleManagerMockRenderResultQueriesAndActions, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx index 336ee9d5bd8f8..a132fe11f254b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { ConsoleManagerTestComponent, getConsoleManagerMockRenderResultQueriesAndActions, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx index c65bbb2beffee..c4cacd6d03b78 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/release_action.tsx @@ -7,11 +7,11 @@ import React, { memo, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { ActionDetails } from '../../../../common/endpoint/types'; +import type { ActionDetails } from '../../../../common/endpoint/types'; import { useGetActionDetails } from '../../hooks/endpoint/use_get_action_details'; -import { EndpointCommandDefinitionMeta } from './types'; +import type { EndpointCommandDefinitionMeta } from './types'; import { useSendReleaseEndpointRequest } from '../../hooks/endpoint/use_send_release_endpoint_request'; -import { CommandExecutionComponentProps } from '../console/types'; +import type { CommandExecutionComponentProps } from '../console/types'; import { ActionError } from './action_error'; export const ReleaseActionResult = memo< diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/status_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/status_action.tsx index 9941b57253776..efc1785daf128 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/status_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/status_action.tsx @@ -13,7 +13,7 @@ import type { HttpFetchError } from '@kbn/core/public'; import { v4 as uuidV4 } from 'uuid'; import type { HostInfo, PendingActionsResponse } from '../../../../common/endpoint/types'; import type { EndpointCommandDefinitionMeta } from './types'; -import { EndpointHostIsolationStatusProps } from '../../../common/components/endpoint/host_isolation'; +import type { EndpointHostIsolationStatusProps } from '../../../common/components/endpoint/host_isolation'; import { useGetEndpointPendingActionsSummary } from '../../hooks/endpoint/use_get_endpoint_pending_actions_summary'; import { FormattedDate } from '../../../common/components/formatted_date'; import { EndpointAppliedPolicyStatus } from '../endpoint_applied_policy_status'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/types.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/types.ts index 0f8a555964acf..7b5f1919f701f 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/types.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ManagedConsoleExtensionComponentProps } from '../console'; -import { HostMetadata } from '../../../../common/endpoint/types'; +import type { ManagedConsoleExtensionComponentProps } from '../console'; +import type { HostMetadata } from '../../../../common/endpoint/types'; export interface EndpointCommandDefinitionMeta { endpointId: string; diff --git a/x-pack/plugins/security_solution/public/management/components/formatted_error/formatted_error.test.tsx b/x-pack/plugins/security_solution/public/management/components/formatted_error/formatted_error.test.tsx index bea883a9762e1..821a16e808c06 100644 --- a/x-pack/plugins/security_solution/public/management/components/formatted_error/formatted_error.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/formatted_error/formatted_error.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { FormattedError } from './formatted_error'; import React from 'react'; import type { HttpFetchError } from '@kbn/core/public'; diff --git a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx index d1833c2df0ba2..c27c599e8544c 100644 --- a/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx +++ b/x-pack/plugins/security_solution/public/management/components/management_empty_state.tsx @@ -5,7 +5,9 @@ * 2.0. */ -import React, { useMemo, MouseEvent, CSSProperties } from 'react'; +import type { MouseEvent, CSSProperties } from 'react'; +import React, { useMemo } from 'react'; +import type { EuiSelectableProps } from '@elastic/eui'; import { EuiText, EuiFlexGroup, @@ -16,7 +18,6 @@ import { EuiTitle, EuiSelectable, EuiSelectableMessage, - EuiSelectableProps, EuiIcon, EuiLoadingSpinner, EuiLink, diff --git a/x-pack/plugins/security_solution/public/management/components/page_overlay/page_overlay.tsx b/x-pack/plugins/security_solution/public/management/components/page_overlay/page_overlay.tsx index b765bd2630125..ce2ef375b45c3 100644 --- a/x-pack/plugins/security_solution/public/management/components/page_overlay/page_overlay.tsx +++ b/x-pack/plugins/security_solution/public/management/components/page_overlay/page_overlay.tsx @@ -5,22 +5,14 @@ * 2.0. */ -import React, { - memo, - ReactNode, - useCallback, - useEffect, - useMemo, - useRef, - useState, - CSSProperties, -} from 'react'; +import type { ReactNode, CSSProperties } from 'react'; +import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled, { createGlobalStyle } from 'styled-components'; import { EuiFocusTrap, EuiPortal } from '@elastic/eui'; import classnames from 'classnames'; import { useLocation } from 'react-router-dom'; -import { EuiPortalProps } from '@elastic/eui/src/components/portal/portal'; -import { EuiTheme } from '@kbn/kibana-react-plugin/common'; +import type { EuiPortalProps } from '@elastic/eui/src/components/portal/portal'; +import type { EuiTheme } from '@kbn/kibana-react-plugin/common'; import { TIMELINE_OVERRIDES_CSS_STYLESHEET } from '../../../common/components/page'; import { SELECTOR_TIMELINE_IS_VISIBLE_CSS_CLASS_NAME, diff --git a/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.test.tsx b/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.test.tsx index d677a4a9fd662..78f7580a7b168 100644 --- a/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.test.tsx @@ -5,9 +5,12 @@ * 2.0. */ -import React, { FC } from 'react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { PaginatedContentProps, PaginatedContent } from './paginated_content'; +import type { FC } from 'react'; +import React from 'react'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { PaginatedContentProps } from './paginated_content'; +import { PaginatedContent } from './paginated_content'; import { act, fireEvent } from '@testing-library/react'; describe('when using PaginatedContent', () => { diff --git a/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.tsx b/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.tsx index b194a29c4292f..17fb0c1cfd1bb 100644 --- a/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.tsx +++ b/x-pack/plugins/security_solution/public/management/components/paginated_content/paginated_content.tsx @@ -5,35 +5,29 @@ * 2.0. */ -import React, { +import type { ComponentProps, ComponentType, FunctionComponent, Key, - memo, ReactElement, ReactNode, - useCallback, - useMemo, - useState, - useEffect, } from 'react'; +import React, { memo, useCallback, useMemo, useState, useEffect } from 'react'; +import type { CommonProps, EuiTablePaginationProps, Pagination } from '@elastic/eui'; import { - CommonProps, EuiEmptyPrompt, EuiIcon, EuiProgress, EuiSpacer, EuiTablePagination, - EuiTablePaginationProps, EuiText, - Pagination, } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { v4 as generateUUI } from 'uuid'; import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; -import { MaybeImmutable } from '../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../common/endpoint/types'; import { MANAGEMENT_DEFAULT_PAGE, MANAGEMENT_DEFAULT_PAGE_SIZE } from '../../common/constants'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.test.tsx b/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.test.tsx index ceaf591ead993..a93d9409858fd 100644 --- a/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.test.tsx @@ -6,13 +6,15 @@ */ import { I18nProvider } from '@kbn/i18n-react'; -import { render, RenderResult } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; +import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { PoliciesSelector, PoliciesSelectorProps } from '.'; +import type { PoliciesSelectorProps } from '.'; +import { PoliciesSelector } from '.'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; // TODO: remove this mock when feature flag is removed diff --git a/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.tsx b/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.tsx index e74bc58dd3f2a..25251c04a2b86 100644 --- a/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policies_selector/policies_selector.tsx @@ -5,9 +5,11 @@ * 2.0. */ -import React, { memo, useCallback, useMemo, useState, useEffect, ChangeEvent } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { memo, useCallback, useMemo, useState, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; +import type { FilterChecked } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, @@ -17,11 +19,10 @@ import { EuiFieldSearch, EuiFilterButton, EuiFilterSelectItem, - FilterChecked, EuiText, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ImmutableArray, PolicyData } from '../../../../common/endpoint/types'; +import type { ImmutableArray, PolicyData } from '../../../../common/endpoint/types'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; export interface PoliciesSelectorProps { diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx index 03b6fd36b318f..4e5ecebd2c0db 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response.tsx @@ -8,17 +8,17 @@ import React, { memo, useCallback } from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocLinksStart } from '@kbn/core/public'; +import type { DocLinksStart } from '@kbn/core/public'; import { EuiHealth, EuiText, EuiTreeView, EuiNotificationBadge } from '@elastic/eui'; import { useKibana } from '../../../common/lib/kibana'; -import { - HostPolicyResponseActionStatus, +import type { HostPolicyResponseAppliedAction, HostPolicyResponseConfiguration, Immutable, ImmutableArray, ImmutableObject, } from '../../../../common/endpoint/types'; +import { HostPolicyResponseActionStatus } from '../../../../common/endpoint/types'; import { formatResponse, PolicyResponseActionFormatter } from './policy_response_friendly_names'; import { PolicyResponseActionItem } from './policy_response_action_item'; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_action_item.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_action_item.tsx index 9be8a080df731..35007e338b78c 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_action_item.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_action_item.tsx @@ -8,7 +8,7 @@ import React, { memo } from 'react'; import styled from 'styled-components'; import { EuiLink, EuiCallOut, EuiText } from '@elastic/eui'; -import { PolicyResponseActionFormatter } from './policy_response_friendly_names'; +import type { PolicyResponseActionFormatter } from './policy_response_friendly_names'; const StyledEuiCallout = styled(EuiCallOut)` padding: ${({ theme }) => theme.eui.euiSizeS}; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_friendly_names.ts b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_friendly_names.ts index 2abc1efd406ec..4c82964853868 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_friendly_names.ts +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_friendly_names.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { +import type { HostPolicyResponseActionStatus, HostPolicyResponseAppliedAction, ImmutableObject, diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx index aa1b33e24d8fe..127216bf81ef1 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.test.tsx @@ -7,11 +7,13 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; -import { PolicyResponseWrapper, PolicyResponseWrapperProps } from './policy_response_wrapper'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { PolicyResponseWrapperProps } from './policy_response_wrapper'; +import { PolicyResponseWrapper } from './policy_response_wrapper'; import { HostPolicyResponseActionStatus } from '../../../../common/search_strategy'; import { useGetEndpointPolicyResponse } from '../../hooks/endpoint/use_get_endpoint_policy_response'; -import { +import type { HostPolicyResponse, HostPolicyResponseAppliedAction, } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx index d9538e96fc099..fc8fd56184f78 100644 --- a/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx +++ b/x-pack/plugins/security_solution/public/management/components/policy_response/policy_response_wrapper.tsx @@ -7,7 +7,7 @@ import React, { memo, useEffect, useState, useMemo } from 'react'; import { EuiEmptyPrompt, EuiLoadingSpinner, EuiSpacer, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocLinksStart } from '@kbn/core/public'; +import type { DocLinksStart } from '@kbn/core/public'; import { useKibana } from '../../../common/lib/kibana'; import type { HostPolicyResponse } from '../../../../common/endpoint/types'; import { PreferenceFormattedDateFromPrimitive } from '../../../common/components/formatted_date'; diff --git a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.test.tsx b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.test.tsx index 6e86c69c49750..8a242e132343b 100644 --- a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.test.tsx @@ -7,17 +7,17 @@ import React from 'react'; import { act, fireEvent } from '@testing-library/react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { useUserPrivileges } from '../../../common/components/user_privileges'; -import { SearchExceptions, SearchExceptionsProps } from '.'; +import type { SearchExceptionsProps } from '.'; +import { SearchExceptions } from '.'; import { getEndpointPrivilegesInitialStateMock } from '../../../common/components/user_privileges/endpoint/mocks'; -import { - initialUserPrivilegesState, - UserPrivilegesState, -} from '../../../common/components/user_privileges/user_privileges_context'; -import { EndpointPrivileges } from '../../../../common/endpoint/types'; +import type { UserPrivilegesState } from '../../../common/components/user_privileges/user_privileges_context'; +import { initialUserPrivilegesState } from '../../../common/components/user_privileges/user_privileges_context'; +import type { EndpointPrivileges } from '../../../../common/endpoint/types'; jest.mock('../../../common/components/user_privileges'); diff --git a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx index 695b1f18ef317..dbcdb011d28f3 100644 --- a/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx +++ b/x-pack/plugins/security_solution/public/management/components/search_exceptions/search_exceptions.tsx @@ -8,8 +8,9 @@ import React, { memo, useCallback, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiFieldSearch, EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { PolicySelectionItem, PoliciesSelector } from '../policies_selector'; -import { ImmutableArray, PolicyData } from '../../../../common/endpoint/types'; +import type { PolicySelectionItem } from '../policies_selector'; +import { PoliciesSelector } from '../policies_selector'; +import type { ImmutableArray, PolicyData } from '../../../../common/endpoint/types'; import { useUserPrivileges } from '../../../common/components/user_privileges'; export interface SearchExceptionsProps { diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.test.tsx index 63e5871f67f7f..b4f4e3ffc67d3 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useBulkDeleteArtifact } from './use_bulk_delete_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.tsx index f534cc01e62ee..750b6c5735cd3 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_delete_artifact.tsx @@ -5,10 +5,11 @@ * 2.0. */ import pMap from 'p-map'; -import { HttpFetchError } from '@kbn/core/public'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.test.tsx index 973955135c0f6..57a1f77243b5d 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useBulkUpdateArtifact } from './use_bulk_update_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.tsx index 68090e2aabc90..532d47c0b4e5b 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_bulk_update_artifact.tsx @@ -5,13 +5,14 @@ * 2.0. */ import pMap from 'p-map'; -import { HttpFetchError } from '@kbn/core/public'; -import { +import type { HttpFetchError } from '@kbn/core/public'; +import type { UpdateExceptionListItemSchema, ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.test.tsx index 9ea5f6aca0201..a40ad85dff53c 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useCreateArtifact } from './use_create_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.tsx index 79dd59d744e7f..363deeb5628a4 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_create_artifact.tsx @@ -4,13 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { +import type { CreateExceptionListItemSchema, ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.test.tsx index 89c04f5e1bb93..f717546be7ead 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useDeleteArtifact } from './use_delete_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.tsx index a12b3aaa9ba40..496095f335d08 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_delete_artifact.tsx @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.test.tsx index 88992960421a9..dc444e75816c0 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useGetArtifact } from './use_get_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.tsx index 36ae203707c28..a0a50846960aa 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_get_artifact.tsx @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { QueryObserverResult, useQuery, UseQueryOptions } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { QueryObserverResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; export function useGetArtifact( exceptionListApiClient: ExceptionsListApiClient, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.test.tsx index 300910e5c7afd..d7d68e82c9d3e 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useListArtifact } from './use_list_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; import { diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.tsx index 64a5b908e2d9e..8df9b890d98f0 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.tsx @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { FoundExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { QueryObserverResult, useQuery, UseQueryOptions } from 'react-query'; +import type { FoundExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { QueryObserverResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; import { useMemo } from 'react'; import { MANAGEMENT_DEFAULT_PAGE, @@ -15,9 +16,9 @@ import { MANAGEMENT_DEFAULT_SORT_ORDER, } from '../../common/constants'; import { parsePoliciesAndFilterToKql, parseQueryFilterToKQL } from '../../common/utils'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { DEFAULT_EXCEPTION_LIST_ITEM_SEARCHABLE_FIELDS } from '../../../../common/endpoint/service/artifacts/constants'; -import { MaybeImmutable } from '../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../common/endpoint/types'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.test.tsx index 666587ace1dd0..f0e8abd533fce 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useSummaryArtifact } from './use_summary_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; import { diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.tsx index 111fdb4565785..a50910f8bfaa6 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_summary_artifact.tsx @@ -4,13 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ExceptionListSummarySchema } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { QueryObserverResult, useQuery, UseQueryOptions } from 'react-query'; +import type { ExceptionListSummarySchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { QueryObserverResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; import { parsePoliciesAndFilterToKql, parseQueryFilterToKQL } from '../../common/utils'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { DEFAULT_EXCEPTION_LIST_ITEM_SEARCHABLE_FIELDS } from '../../../../common/endpoint/service/artifacts/constants'; -import { MaybeImmutable } from '../../../../common/endpoint/types'; +import type { MaybeImmutable } from '../../../../common/endpoint/types'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.test.tsx index d545216354b4e..8a718ec6a292e 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.test.tsx @@ -6,7 +6,7 @@ */ import { useUpdateArtifact } from './use_update_artifact'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { getFakeListId, diff --git a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.tsx b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.tsx index e3a7e37eebf56..23a6266c7a4b9 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/artifacts/use_update_artifact.tsx @@ -4,13 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { +import type { UpdateExceptionListItemSchema, ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpFetchError } from '@kbn/core/public'; -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; const DEFAULT_OPTIONS = Object.freeze({}); diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_action_details.test.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_action_details.test.ts index dfcf4a0425ced..b04e0428037cf 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_action_details.test.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_action_details.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - AppContextTestRender, - createAppRootMockRenderer, - ReactQueryHookRenderer, -} from '../../../common/mock/endpoint'; +import type { AppContextTestRender, ReactQueryHookRenderer } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useGetActionDetails } from './use_get_action_details'; import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; import { resolvePathVariables } from '../../../common/utils/resolve_path_variables'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.test.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.test.ts index d1f491f5b2f11..8ff8a6f43d11e 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.test.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - AppContextTestRender, - createAppRootMockRenderer, - ReactQueryHookRenderer, -} from '../../../common/mock/endpoint'; +import type { AppContextTestRender, ReactQueryHookRenderer } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useGetEndpointActionList } from './use_get_endpoint_action_list'; import { ENDPOINTS_ACTION_LIST_ROUTE } from '../../../../common/endpoint/constants'; import { useQuery as _useQuery } from 'react-query'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.ts index e8d61c590dbcb..1460ff6e7f280 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_action_list.ts @@ -8,7 +8,7 @@ import type { UseQueryOptions, UseQueryResult } from 'react-query'; import type { HttpFetchError } from '@kbn/core/public'; import { useQuery } from 'react-query'; -import { EndpointActionListRequestQuery } from '../../../../common/endpoint/schema/actions'; +import type { EndpointActionListRequestQuery } from '../../../../common/endpoint/schema/actions'; import { useHttp } from '../../../common/lib/kibana'; import { ENDPOINTS_ACTION_LIST_ROUTE } from '../../../../common/endpoint/constants'; import type { ActionListApiResponse } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.test.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.test.ts index 6246dbea78532..b9771f7dee3dd 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.test.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - AppContextTestRender, - createAppRootMockRenderer, - ReactQueryHookRenderer, -} from '../../../common/mock/endpoint'; +import type { AppContextTestRender, ReactQueryHookRenderer } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useGetEndpointDetails } from './use_get_endpoint_details'; import { resolvePathVariables } from '../../../common/utils/resolve_path_variables'; import { HOST_METADATA_GET_ROUTE } from '../../../../common/endpoint/constants'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.ts index bc5ed1e057c67..5566cc38c1358 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { useQuery, UseQueryOptions, UseQueryResult } from 'react-query'; +import type { UseQueryOptions, UseQueryResult } from 'react-query'; +import { useQuery } from 'react-query'; import type { HttpFetchError } from '@kbn/core/public'; import { resolvePathVariables } from '../../../common/utils/resolve_path_variables'; import { useHttp } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.test.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.test.ts index 4f8195a9d26a6..b36cf686d67f5 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.test.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - AppContextTestRender, - createAppRootMockRenderer, - ReactQueryHookRenderer, -} from '../../../common/mock/endpoint'; +import type { AppContextTestRender, ReactQueryHookRenderer } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; import { useGetEndpointPendingActionsSummary } from './use_get_endpoint_pending_actions_summary'; import { ACTION_STATUS_ROUTE } from '../../../../common/endpoint/constants'; import { useQuery as _useQuery } from 'react-query'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.ts index cbea6b926d07e..6a02ac7638e16 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_pending_actions_summary.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { QueryObserverResult, UseQueryOptions, useQuery } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; -import { PendingActionsResponse } from '../../../../common/endpoint/types'; +import type { QueryObserverResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { PendingActionsResponse } from '../../../../common/endpoint/types'; import { fetchPendingActionsByAgentId } from '../../../common/lib/endpoint_pending_actions'; /** diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.test.tsx b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.test.tsx index c966d4113b668..e3d26c911e54c 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.test.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.test.tsx @@ -6,7 +6,7 @@ */ import { useGetEndpointPolicyResponse } from './use_get_endpoint_policy_response'; -import { HttpSetup } from '@kbn/core/public'; +import type { HttpSetup } from '@kbn/core/public'; import { useHttp } from '../../../common/lib/kibana'; import { getFakeHttpService, renderQuery } from '../test_utils'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.tsx b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.tsx index 8f501c1dc22ee..4a6d835f7b09d 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_policy_response.tsx @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { HttpFetchError } from '@kbn/core/public'; -import { UseQueryResult, useQuery, UseQueryOptions } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { UseQueryResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; import { useHttp } from '../../../common/lib/kibana'; import { BASE_POLICY_RESPONSE_ROUTE } from '../../../../common/endpoint/constants'; -import { GetHostPolicyResponse } from '../../../../common/endpoint/types'; +import type { GetHostPolicyResponse } from '../../../../common/endpoint/types'; export function useGetEndpointPolicyResponse( selectedEndpoint: string, diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_get_endpoint_processes_request.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_get_endpoint_processes_request.ts index 4f71ba142b5d8..a3b51de283486 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_get_endpoint_processes_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_get_endpoint_processes_request.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; -import { +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { ProcessesRequestBody, ResponseActionApiResponse, ProcessesEntry, diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_isolate_endpoint_request.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_isolate_endpoint_request.ts index 76c6664afa364..4764fc1e36122 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_isolate_endpoint_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_isolate_endpoint_request.ts @@ -5,10 +5,14 @@ * 2.0. */ -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; import { isolateHost } from '../../../common/lib/endpoint_isolation'; -import { HostIsolationRequestBody, HostIsolationResponse } from '../../../../common/endpoint/types'; +import type { + HostIsolationRequestBody, + HostIsolationResponse, +} from '../../../../common/endpoint/types'; /** * Create host isolation requests diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_kill_process_endpoint_request.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_kill_process_endpoint_request.ts index d194dd50724bb..23150092ad09a 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_kill_process_endpoint_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_kill_process_endpoint_request.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; import type { KillOrSuspendProcessRequestBody, ResponseActionApiResponse, diff --git a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_release_endpoint_request.ts b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_release_endpoint_request.ts index 297265953bfed..326c25eb7de88 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_release_endpoint_request.ts +++ b/x-pack/plugins/security_solution/public/management/hooks/endpoint/use_send_release_endpoint_request.ts @@ -5,9 +5,13 @@ * 2.0. */ -import { useMutation, UseMutationOptions, UseMutationResult } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; -import { HostIsolationRequestBody, HostIsolationResponse } from '../../../../common/endpoint/types'; +import type { UseMutationOptions, UseMutationResult } from 'react-query'; +import { useMutation } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { + HostIsolationRequestBody, + HostIsolationResponse, +} from '../../../../common/endpoint/types'; import { unIsolateHost } from '../../../common/lib/endpoint_isolation'; /** diff --git a/x-pack/plugins/security_solution/public/management/hooks/test_utils.tsx b/x-pack/plugins/security_solution/public/management/hooks/test_utils.tsx index f1818babd8b30..149eee55872aa 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/test_utils.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/test_utils.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; import { renderHook } from '@testing-library/react-hooks'; -import { HttpSetup } from '@kbn/core/public'; -import { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpSetup } from '@kbn/core/public'; +import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { coreMock } from '@kbn/core/public/mocks'; import { ReactQueryClientProvider } from '../../common/containers/query_client/query_client_provider'; diff --git a/x-pack/plugins/security_solution/public/management/icons/blocklist.tsx b/x-pack/plugins/security_solution/public/management/icons/blocklist.tsx index 75d272034d668..45a5f5035911d 100644 --- a/x-pack/plugins/security_solution/public/management/icons/blocklist.tsx +++ b/x-pack/plugins/security_solution/public/management/icons/blocklist.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { SVGProps } from 'react'; +import type { SVGProps } from 'react'; +import React from 'react'; export const IconBlocklist: React.FC> = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( > = ({ ...props }) => ( { diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index cf7e30793ba7f..73eb5179c3141 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { calculateEndpointAuthz } from '../../common/endpoint/service/authz'; import { @@ -35,8 +35,8 @@ import { TRUSTED_APPLICATIONS, } from '../app/translations'; import { licenseService } from '../common/hooks/use_license'; -import { LinkItem } from '../common/links/types'; -import { StartPlugins } from '../types'; +import type { LinkItem } from '../common/links/types'; +import type { StartPlugins } from '../types'; import { manageCategories as cloudSecurityPostureCategories, manageLinks as cloudSecurityPostureLinks, diff --git a/x-pack/plugins/security_solution/public/management/mocks/exceptions_list_http_mocks.ts b/x-pack/plugins/security_solution/public/management/mocks/exceptions_list_http_mocks.ts index 4b0312979ea23..5629052137753 100644 --- a/x-pack/plugins/security_solution/public/management/mocks/exceptions_list_http_mocks.ts +++ b/x-pack/plugins/security_solution/public/management/mocks/exceptions_list_http_mocks.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { HttpFetchOptionsWithPath } from '@kbn/core/public'; +import type { HttpFetchOptionsWithPath } from '@kbn/core/public'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; -import { +import type { ExceptionListItemSchema, FoundExceptionListItemSchema, FindExceptionListItemSchema, @@ -19,10 +19,10 @@ import { ExceptionListSummarySchema, } from '@kbn/securitysolution-io-ts-list-types'; import { getExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; +import type { ResponseProvidersInterface } from '../../common/mock/endpoint/http_handler_mock_factory'; import { composeHttpHandlerMocks, httpHandlerMockFactory, - ResponseProvidersInterface, } from '../../common/mock/endpoint/http_handler_mock_factory'; import { ExceptionsListItemGenerator } from '../../../common/endpoint/data_generators/exceptions_list_item_generator'; import { diff --git a/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts b/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts index c40639ef95e76..4370bd9e24215 100644 --- a/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts +++ b/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts @@ -6,24 +6,24 @@ */ import { fromKueryExpression } from '@kbn/es-query'; +import type { + CheckPermissionsResponse, + GetAgentPoliciesResponse, + GetAgentStatusResponse, + GetPackagesResponse, +} from '@kbn/fleet-plugin/common'; import { AGENT_API_ROUTES, AGENT_POLICY_API_ROUTES, AGENT_POLICY_SAVED_OBJECT_TYPE, appRoutesService, - CheckPermissionsResponse, EPM_API_ROUTES, - GetAgentPoliciesResponse, - GetAgentStatusResponse, - GetPackagesResponse, PACKAGE_POLICY_API_ROUTES, } from '@kbn/fleet-plugin/common'; -import { - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../common/mock/endpoint/http_handler_mock_factory'; +import type { ResponseProvidersInterface } from '../../common/mock/endpoint/http_handler_mock_factory'; +import { httpHandlerMockFactory } from '../../common/mock/endpoint/http_handler_mock_factory'; import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; -import { GetPolicyListResponse, GetPolicyResponse } from '../pages/policy/types'; +import type { GetPolicyListResponse, GetPolicyResponse } from '../pages/policy/types'; import { FleetAgentPolicyGenerator } from '../../../common/endpoint/data_generators/fleet_agent_policy_generator'; interface KqlArgumentType { diff --git a/x-pack/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts b/x-pack/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts index 8f1751009041a..d88d0c44646fe 100644 --- a/x-pack/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts +++ b/x-pack/plugins/security_solution/public/management/mocks/response_actions_http_mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpFetchOptionsWithPath } from '@kbn/core/public'; +import type { HttpFetchOptionsWithPath } from '@kbn/core/public'; import { EndpointActionGenerator } from '../../../common/endpoint/data_generators/endpoint_action_generator'; import { ACTION_DETAILS_ROUTE, @@ -17,11 +17,9 @@ import { KILL_PROCESS_ROUTE, SUSPEND_PROCESS_ROUTE, } from '../../../common/endpoint/constants'; -import { - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../common/mock/endpoint/http_handler_mock_factory'; -import { +import type { ResponseProvidersInterface } from '../../common/mock/endpoint/http_handler_mock_factory'; +import { httpHandlerMockFactory } from '../../common/mock/endpoint/http_handler_mock_factory'; +import type { ActionDetailsApiResponse, ActionListApiResponse, HostIsolationResponse, diff --git a/x-pack/plugins/security_solution/public/management/mocks/trusted_apps_http_mocks.ts b/x-pack/plugins/security_solution/public/management/mocks/trusted_apps_http_mocks.ts index 115834e001333..f092bd3dcbd4d 100644 --- a/x-pack/plugins/security_solution/public/management/mocks/trusted_apps_http_mocks.ts +++ b/x-pack/plugins/security_solution/public/management/mocks/trusted_apps_http_mocks.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { HttpFetchOptionsWithPath } from '@kbn/core/public'; +import type { HttpFetchOptionsWithPath } from '@kbn/core/public'; import { ENDPOINT_TRUSTED_APPS_LIST_ID, EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL, } from '@kbn/securitysolution-list-constants'; -import { +import type { ExceptionListItemSchema, FoundExceptionListItemSchema, FindExceptionListItemSchema, @@ -22,17 +22,19 @@ import { ExceptionListSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { getTrustedAppsListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; +import type { ResponseProvidersInterface } from '../../common/mock/endpoint/http_handler_mock_factory'; import { composeHttpHandlerMocks, httpHandlerMockFactory, - ResponseProvidersInterface, } from '../../common/mock/endpoint/http_handler_mock_factory'; import { ExceptionsListItemGenerator } from '../../../common/endpoint/data_generators/exceptions_list_item_generator'; +import type { + FleetGetAgentPolicyListHttpMockInterface, + FleetGetEndpointPackagePolicyListHttpMockInterface, +} from './fleet_mocks'; import { fleetGetAgentPolicyListHttpMock, - FleetGetAgentPolicyListHttpMockInterface, fleetGetEndpointPackagePolicyListHttpMock, - FleetGetEndpointPackagePolicyListHttpMockInterface, } from './fleet_mocks'; import { BY_POLICY_ARTIFACT_TAG_PREFIX, diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/constants.ts b/x-pack/plugins/security_solution/public/management/pages/blocklist/constants.ts index 0ecdeae1fe6e2..7a412929dd9e2 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/constants.ts @@ -4,11 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { +import type { ExceptionListType, - ExceptionListTypeEnum, CreateExceptionListSchema, } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_BLOCKLISTS_LIST_DESCRIPTION, ENDPOINT_BLOCKLISTS_LIST_ID, diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/services/blocklists_api_client.ts b/x-pack/plugins/security_solution/public/management/pages/blocklist/services/blocklists_api_client.ts index b8e3078533b7c..017301c55a018 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/services/blocklists_api_client.ts +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/services/blocklists_api_client.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { +import type { CreateExceptionListItemSchema, ExceptionListItemSchema, UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_BLOCKLISTS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; -import { ConditionEntry } from '../../../../../common/endpoint/types'; +import type { HttpStart } from '@kbn/core/public'; +import type { ConditionEntry } from '../../../../../common/endpoint/types'; import { conditionEntriesToEntries, entriesToConditionEntries, diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts b/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts index 1ce96f5267916..c084c9443ba5d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { BlocklistConditionEntryField } from '@kbn/securitysolution-utils'; +import type { BlocklistConditionEntryField } from '@kbn/securitysolution-utils'; export const DETAILS_HEADER = i18n.translate('xpack.securitySolution.blocklist.details.header', { defaultMessage: 'Details', diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.test.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.test.tsx index 2dab6a8fd497a..cb82e14331598 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.test.tsx @@ -8,7 +8,8 @@ import { act, waitFor } from '@testing-library/react'; import React from 'react'; import { BLOCKLIST_PATH } from '../../../../../common/constants'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { Blocklist } from './blocklist'; describe('When on the blocklist page', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx index 759cc37ed902b..4f33873b71c07 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/blocklist.tsx @@ -8,11 +8,12 @@ import React, { memo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocLinks } from '@kbn/doc-links'; +import type { DocLinks } from '@kbn/doc-links'; import { EuiLink } from '@elastic/eui'; import { useHttp } from '../../../../common/lib/kibana'; -import { ArtifactListPage, ArtifactListPageProps } from '../../../components/artifact_list_page'; +import type { ArtifactListPageProps } from '../../../components/artifact_list_page'; +import { ArtifactListPage } from '../../../components/artifact_list_page'; import { BlocklistsApiClient } from '../services'; import { BlockListForm } from './components/blocklist_form'; diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx index 39d289fe66bdb..fc93aca3816b7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx @@ -8,18 +8,18 @@ import React from 'react'; import { screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { BlocklistConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; +import type { BlocklistConditionEntryField } from '@kbn/securitysolution-utils'; +import { OperatingSystem } from '@kbn/securitysolution-utils'; import { ENDPOINT_BLOCKLISTS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { BlocklistEntry, BlockListForm } from './blocklist_form'; -import { +import type { BlocklistEntry } from './blocklist_form'; +import { BlockListForm } from './blocklist_form'; +import type { ArtifactFormComponentOnChangeCallbackProps, ArtifactFormComponentProps, } from '../../../../components/artifact_list_page'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { ERRORS } from '../../translations'; import { licenseService } from '../../../../../common/hooks/use_license'; import type { PolicyData } from '../../../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx index 0e11907e0eba6..8b1ab7dee0854 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.tsx @@ -6,6 +6,7 @@ */ import React, { useMemo, useState, useCallback, memo, useEffect, useRef } from 'react'; +import type { EuiSuperSelectOption, EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiForm, EuiFormRow, @@ -15,26 +16,21 @@ import { EuiText, EuiSpacer, EuiSuperSelect, - EuiSuperSelectOption, EuiComboBox, - EuiComboBoxOptionOption, EuiTitle, EuiFlexGroup, EuiFlexItem, EuiToolTip, EuiIcon, } from '@elastic/eui'; -import { - OperatingSystem, - BlocklistConditionEntryField, - isPathValid, -} from '@kbn/securitysolution-utils'; +import type { BlocklistConditionEntryField } from '@kbn/securitysolution-utils'; +import { OperatingSystem, isPathValid } from '@kbn/securitysolution-utils'; import { isOneOfOperator } from '@kbn/securitysolution-list-utils'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { uniq } from 'lodash'; import { OS_TITLES } from '../../../../common/translations'; -import { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; +import type { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; import { CONDITIONS_HEADER, CONDITIONS_HEADER_DESCRIPTION, @@ -52,10 +48,8 @@ import { ERRORS, VALUE_LABEL_HELPER, } from '../../translations'; -import { - EffectedPolicySelect, - EffectedPolicySelection, -} from '../../../../components/effected_policy_select'; +import type { EffectedPolicySelection } from '../../../../components/effected_policy_select'; +import { EffectedPolicySelect } from '../../../../components/effected_policy_select'; import { GLOBAL_ARTIFACT_TAG, BY_POLICY_ARTIFACT_TAG_PREFIX, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts index ca3582a9d33e8..4cc923cf8d86b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts @@ -5,17 +5,17 @@ * 2.0. */ +import type { ResponseProvidersInterface } from '../../../common/mock/endpoint/http_handler_mock_factory'; import { composeHttpHandlerMocks, httpHandlerMockFactory, - ResponseProvidersInterface, } from '../../../common/mock/endpoint/http_handler_mock_factory'; -import { +import type { HostInfo, HostPolicyResponse, - HostStatus, MetadataListResponse, } from '../../../../common/endpoint/types'; +import { HostStatus } from '../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { BASE_POLICY_RESPONSE_ROUTE, @@ -23,22 +23,22 @@ import { HOST_METADATA_LIST_ROUTE, METADATA_TRANSFORMS_STATUS_ROUTE, } from '../../../../common/endpoint/constants'; -import { - pendingActionsHttpMock, - PendingActionsHttpMockInterface, -} from '../../../common/lib/endpoint_pending_actions/mocks'; +import type { PendingActionsHttpMockInterface } from '../../../common/lib/endpoint_pending_actions/mocks'; +import { pendingActionsHttpMock } from '../../../common/lib/endpoint_pending_actions/mocks'; import { TRANSFORM_STATES } from '../../../../common/constants'; -import { TransformStatsResponse } from './types'; -import { - fleetGetAgentPolicyListHttpMock, +import type { TransformStatsResponse } from './types'; +import type { FleetGetAgentPolicyListHttpMockInterface, FleetGetAgentStatusHttpMockInterface, - fleetGetCheckPermissionsHttpMock, FleetGetCheckPermissionsInterface, FleetGetEndpointPackagePolicyHttpMockInterface, - fleetGetPackageListHttpMock, FleetGetPackageListHttpMockInterface, } from '../../mocks'; +import { + fleetGetAgentPolicyListHttpMock, + fleetGetCheckPermissionsHttpMock, + fleetGetPackageListHttpMock, +} from '../../mocks'; type EndpointMetadataHttpMocksInterface = ResponseProvidersInterface<{ metadataList: () => MetadataListResponse; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/models/index_pattern.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/models/index_pattern.ts index 65aa832226d54..1b69bbad85d44 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/models/index_pattern.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/models/index_pattern.ts @@ -7,7 +7,7 @@ import { all } from 'deepmerge'; import type { DataViewBase } from '@kbn/es-query'; -import { Immutable } from '../../../../../common/endpoint/types'; +import type { Immutable } from '../../../../../common/endpoint/types'; export function clone(value: DataViewBase | Immutable): DataViewBase { return all([value]) as DataViewBase; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts index 7a340421dbf09..a8182ae2f4919 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { Action } from 'redux'; +import type { Action } from 'redux'; import type { DataViewBase } from '@kbn/es-query'; -import { +import type { HostInfo, GetHostPolicyResponse, HostIsolationRequestBody, ISOLATION_ACTIONS, MetadataListResponse, } from '../../../../../common/endpoint/types'; -import { ServerApiError } from '../../../../common/types'; -import { GetPolicyListResponse } from '../../policy/types'; -import { EndpointState } from '../types'; +import type { ServerApiError } from '../../../../common/types'; +import type { GetPolicyListResponse } from '../../policy/types'; +import type { EndpointState } from '../types'; export interface ServerReturnedEndpointList { type: 'serverReturnedEndpointList'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/builders.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/builders.ts index 2135569744432..e3b7bb29ba2b3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/builders.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/builders.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Immutable } from '../../../../../common/endpoint/types'; +import type { Immutable } from '../../../../../common/endpoint/types'; import { DEFAULT_POLL_INTERVAL } from '../../../common/constants'; import { createLoadedResourceState, createUninitialisedResourceState } from '../../../state'; -import { EndpointState } from '../types'; +import type { EndpointState } from '../types'; export const initialEndpointPageState = (): Immutable => { return { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/endpoint_pagination.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/endpoint_pagination.test.ts index 83f643ec6a437..a62d41a8f7757 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/endpoint_pagination.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/endpoint_pagination.test.ts @@ -5,14 +5,17 @@ * 2.0. */ -import { CoreStart, HttpSetup } from '@kbn/core/public'; -import { History, createBrowserHistory } from 'history'; -import { applyMiddleware, Store, createStore } from 'redux'; +import type { CoreStart, HttpSetup } from '@kbn/core/public'; +import type { History } from 'history'; +import { createBrowserHistory } from 'history'; +import type { Store } from 'redux'; +import { applyMiddleware, createStore } from 'redux'; import { coreMock } from '@kbn/core/public/mocks'; -import { AppLocation, MetadataListResponse } from '../../../../../common/endpoint/types'; -import { DepsStartMock, depsStartMock } from '../../../../common/mock/endpoint'; +import type { AppLocation, MetadataListResponse } from '../../../../../common/endpoint/types'; +import type { DepsStartMock } from '../../../../common/mock/endpoint'; +import { depsStartMock } from '../../../../common/mock/endpoint'; import { endpointMiddlewareFactory } from './middleware'; @@ -23,11 +26,9 @@ import { mockEndpointResultList, setEndpointListApiMockImplementation, } from './mock_endpoint_result_list'; -import { EndpointState, EndpointIndexUIQueryParams } from '../types'; -import { - MiddlewareActionSpyHelper, - createSpyMiddleware, -} from '../../../../common/store/test_utils'; +import type { EndpointState, EndpointIndexUIQueryParams } from '../types'; +import type { MiddlewareActionSpyHelper } from '../../../../common/store/test_utils'; +import { createSpyMiddleware } from '../../../../common/store/test_utils'; import { getEndpointListPath } from '../../../common/routing'; import { HOST_METADATA_LIST_ROUTE } from '../../../../../common/endpoint/constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts index 7ac4b13a2606e..f83b58f57fb12 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/index.test.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { createStore, Dispatch, Store } from 'redux'; -import { EndpointState } from '../types'; +import type { Dispatch, Store } from 'redux'; +import { createStore } from 'redux'; +import type { EndpointState } from '../types'; import { listData } from './selectors'; import { mockEndpointResultList } from './mock_endpoint_result_list'; -import { EndpointAction } from './action'; +import type { EndpointAction } from './action'; import { endpointListReducer } from './reducer'; import { DEFAULT_POLL_INTERVAL } from '../../../common/constants'; import { createUninitialisedResourceState } from '../../../state'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts index 08bb7b0e48dc3..70b31f88b2f76 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.test.ts @@ -5,35 +5,35 @@ * 2.0. */ -import { CoreStart, HttpSetup } from '@kbn/core/public'; -import { applyMiddleware, createStore, Store } from 'redux'; +import type { CoreStart, HttpSetup } from '@kbn/core/public'; +import type { Store } from 'redux'; +import { applyMiddleware, createStore } from 'redux'; import { coreMock } from '@kbn/core/public/mocks'; -import { History, createBrowserHistory } from 'history'; -import { DepsStartMock, depsStartMock } from '../../../../common/mock/endpoint'; -import { - createSpyMiddleware, - MiddlewareActionSpyHelper, -} from '../../../../common/store/test_utils'; -import { +import type { History } from 'history'; +import { createBrowserHistory } from 'history'; +import type { DepsStartMock } from '../../../../common/mock/endpoint'; +import { depsStartMock } from '../../../../common/mock/endpoint'; +import type { MiddlewareActionSpyHelper } from '../../../../common/store/test_utils'; +import { createSpyMiddleware } from '../../../../common/store/test_utils'; +import type { Immutable, HostIsolationResponse, ISOLATION_ACTIONS, MetadataListResponse, } from '../../../../../common/endpoint/types'; -import { AppAction } from '../../../../common/store/actions'; +import type { AppAction } from '../../../../common/store/actions'; import { mockEndpointResultList } from './mock_endpoint_result_list'; import { listData } from './selectors'; -import { EndpointState, TransformStats } from '../types'; +import type { EndpointState, TransformStats } from '../types'; import { endpointListReducer } from './reducer'; import { endpointMiddlewareFactory } from './middleware'; import { getEndpointListPath, getEndpointDetailsPath } from '../../../common/routing'; import { resolvePathVariables } from '../../../../common/utils/resolve_path_variables'; +import type { FailedResourceState, LoadedResourceState } from '../../../state'; import { - FailedResourceState, isFailedResourceState, isLoadedResourceState, isLoadingResourceState, - LoadedResourceState, } from '../../../state'; import { KibanaServices } from '../../../../common/lib/kibana'; import { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts index d98de05e703ba..15fbc0c391cad 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts @@ -6,8 +6,8 @@ */ import type { DataViewBase, Query } from '@kbn/es-query'; -import { CoreStart, HttpStart } from '@kbn/core/public'; -import { Dispatch } from 'redux'; +import type { CoreStart, HttpStart } from '@kbn/core/public'; +import type { Dispatch } from 'redux'; import semverGte from 'semver/functions/gte'; import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { @@ -18,7 +18,7 @@ import { METADATA_UNITED_INDEX, METADATA_TRANSFORMS_STATUS_ROUTE, } from '../../../../../common/endpoint/constants'; -import { +import type { GetHostPolicyResponse, HostInfo, HostIsolationRequestBody, @@ -30,8 +30,8 @@ import { } from '../../../../../common/endpoint/types'; import { isolateHost, unIsolateHost } from '../../../../common/lib/endpoint_isolation'; import { fetchPendingActionsByAgentId } from '../../../../common/lib/endpoint_pending_actions'; -import { ImmutableMiddlewareAPI, ImmutableMiddlewareFactory } from '../../../../common/store'; -import { AppAction } from '../../../../common/store/actions'; +import type { ImmutableMiddlewareAPI, ImmutableMiddlewareFactory } from '../../../../common/store'; +import type { AppAction } from '../../../../common/store/actions'; import { resolvePathVariables } from '../../../../common/utils/resolve_path_variables'; import { sendGetEndpointSpecificPackagePolicies } from '../../../services/policies/policies'; import { @@ -45,15 +45,15 @@ import { sendGetEndpointSecurityPackage, sendGetFleetAgentsWithEndpoint, } from '../../../services/policies/ingest'; -import { GetPolicyListResponse } from '../../policy/types'; -import { +import type { GetPolicyListResponse } from '../../policy/types'; +import type { AgentIdsPendingActions, EndpointState, PolicyIds, TransformStats, TransformStatsResponse, } from '../types'; -import { EndpointPackageInfoStateChanged } from './action'; +import type { EndpointPackageInfoStateChanged } from './action'; import { detailsData, endpointPackageInfo, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts index c3975f63aac1e..03a0fdda89797 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/mock_endpoint_result_list.ts @@ -5,21 +5,21 @@ * 2.0. */ -import { HttpStart } from '@kbn/core/public'; -import { +import type { HttpStart } from '@kbn/core/public'; +import type { GetAgentPoliciesResponse, GetAgentPoliciesResponseItem, GetPackagesResponse, GetAgentsResponse, } from '@kbn/fleet-plugin/common/types/rest_spec'; -import { +import type { GetHostPolicyResponse, HostInfo, HostPolicyResponse, - HostStatus, MetadataListResponse, PendingActionsResponse, } from '../../../../../common/endpoint/types'; +import { HostStatus } from '../../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; import { INGEST_API_AGENT_POLICIES, @@ -27,14 +27,14 @@ import { INGEST_API_PACKAGE_POLICIES, INGEST_API_FLEET_AGENTS, } from '../../../services/policies/ingest'; -import { GetPolicyListResponse } from '../../policy/types'; +import type { GetPolicyListResponse } from '../../policy/types'; import { pendingActionsResponseMock } from '../../../../common/lib/endpoint_pending_actions/mocks'; import { ACTION_STATUS_ROUTE, HOST_METADATA_LIST_ROUTE, METADATA_TRANSFORMS_STATUS_ROUTE, } from '../../../../../common/endpoint/constants'; -import { TransformStats, TransformStatsResponse } from '../types'; +import type { TransformStats, TransformStatsResponse } from '../types'; const generator = new EndpointDocGenerator('seed'); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts index d5719967e12fa..29f0d81b96a97 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/reducer.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { EndpointPackageInfoStateChanged, EndpointPendingActionsStateChanged, MetadataTransformStatsChanged, @@ -17,11 +17,11 @@ import { getIsOnEndpointDetailsActivityLog, getCurrentIsolationRequestState, } from './selectors'; -import { EndpointState } from '../types'; +import type { EndpointState } from '../types'; import { initialEndpointPageState } from './builders'; -import { AppAction } from '../../../../common/store/actions'; -import { ImmutableReducer } from '../../../../common/store'; -import { Immutable } from '../../../../../common/endpoint/types'; +import type { AppAction } from '../../../../common/store/actions'; +import type { ImmutableReducer } from '../../../../common/store'; +import type { Immutable } from '../../../../../common/endpoint/types'; import { createUninitialisedResourceState, isUninitialisedResourceState } from '../../../state'; type StateReducer = ImmutableReducer; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts index 71f49a280761f..eee3a153952cd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/selectors.ts @@ -10,9 +10,10 @@ import querystring from 'querystring'; import { createSelector } from 'reselect'; import { matchPath } from 'react-router-dom'; import { decode } from 'rison-node'; -import { Query } from '@kbn/es-query'; -import { Immutable, HostStatus, HostMetadata } from '../../../../../common/endpoint/types'; -import { EndpointState, EndpointIndexUIQueryParams } from '../types'; +import type { Query } from '@kbn/es-query'; +import type { Immutable, HostMetadata } from '../../../../../common/endpoint/types'; +import { HostStatus } from '../../../../../common/endpoint/types'; +import type { EndpointState, EndpointIndexUIQueryParams } from '../types'; import { extractListPaginationParams } from '../../../common/routing'; import { MANAGEMENT_DEFAULT_PAGE, @@ -26,9 +27,9 @@ import { isUninitialisedResourceState, } from '../../../state'; -import { ServerApiError } from '../../../../common/types'; +import type { ServerApiError } from '../../../../common/types'; import { isEndpointHostIsolated } from '../../../../common/utils/validators'; -import { EndpointHostIsolationStatusProps } from '../../../../common/components/endpoint/host_isolation'; +import type { EndpointHostIsolationStatusProps } from '../../../../common/components/endpoint/host_isolation'; import { EndpointDetailsTabsTypes } from '../view/details/components/endpoint_details_tabs'; export const listData = (state: Immutable) => state.hosts; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/utils.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/utils.ts index 34cb5605021cd..4bf45886f8240 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/utils.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/utils.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - HostPolicyResponse, - HostPolicyResponseActionStatus, - ImmutableObject, -} from '../../../../../common/endpoint/types'; +import type { HostPolicyResponse, ImmutableObject } from '../../../../../common/endpoint/types'; +import { HostPolicyResponseActionStatus } from '../../../../../common/endpoint/types'; export const getFailedOrWarningActionCountFromPolicyResponse = ( applied: ImmutableObject | undefined diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts index d1999f2694202..d5ad058cea8c4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts @@ -6,8 +6,8 @@ */ import type { DataViewBase } from '@kbn/es-query'; -import { GetPackagesResponse } from '@kbn/fleet-plugin/common'; -import { +import type { GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { HostInfo, Immutable, HostMetadata, @@ -18,8 +18,8 @@ import { HostIsolationResponse, EndpointPendingActions, } from '../../../../common/endpoint/types'; -import { ServerApiError } from '../../../common/types'; -import { AsyncResourceState } from '../../state'; +import type { ServerApiError } from '../../../common/types'; +import type { AsyncResourceState } from '../../state'; import { TRANSFORM_STATES } from '../../../../common/constants'; export interface EndpointState { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/utils.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/utils.ts index 96687895b99c6..7f8ceb7ccea49 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/utils.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/utils.ts @@ -7,7 +7,7 @@ import dateMath from '@kbn/datemath'; import moment from 'moment'; -import { HostInfo, HostMetadata } from '../../../../common/endpoint/types'; +import type { HostInfo, HostMetadata } from '../../../../common/endpoint/types'; export const isPolicyOutOfDate = ( reported: HostMetadata['Endpoint']['policy']['applied'], diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.test.tsx index 6b2bfc25d5c8a..c4270e8736e83 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.test.tsx @@ -6,14 +6,14 @@ */ import React from 'react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { endpointPageHttpMock } from '../../mocks'; import { act } from '@testing-library/react'; -import { EndpointAgentStatus, EndpointAgentStatusProps } from './endpoint_agent_status'; -import { HostMetadata, HostStatus } from '../../../../../../common/endpoint/types'; +import type { EndpointAgentStatusProps } from './endpoint_agent_status'; +import { EndpointAgentStatus } from './endpoint_agent_status'; +import type { HostMetadata } from '../../../../../../common/endpoint/types'; +import { HostStatus } from '../../../../../../common/endpoint/types'; import { isLoadedResourceState } from '../../../../state'; import { KibanaServices } from '../../../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.tsx index 095382ace780e..494545b237052 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/endpoint_agent_status.tsx @@ -8,7 +8,7 @@ import React, { memo } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; -import { HostInfo, HostMetadata } from '../../../../../../common/endpoint/types'; +import type { HostInfo, HostMetadata } from '../../../../../../common/endpoint/types'; import { EndpointHostIsolationStatus } from '../../../../../common/components/endpoint/host_isolation'; import { useEndpointSelector } from '../hooks'; import { getEndpointHostIsolationStatusPropsCallback } from '../../store/selectors'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx index 31247bce600b9..a2b7a8ad2ce2f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.test.tsx @@ -6,17 +6,15 @@ */ import React from 'react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +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 { getEndpointListPath } from '../../../../common/routing'; import { AdminSearchBar } from './search_bar'; import { fireEvent } from '@testing-library/dom'; import { uiQueryParams } from '../../store/selectors'; -import { EndpointIndexUIQueryParams } from '../../types'; +import type { EndpointIndexUIQueryParams } from '../../types'; // FLAKY: https://github.com/elastic/kibana/issues/132398 describe.skip('when rendering the endpoint list `AdminSearchBar`', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx index 24da8b3b86a35..c2fef59ebd460 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/search_bar.tsx @@ -7,10 +7,11 @@ import React, { memo, useCallback, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; -import { encode, RisonValue } from 'rison-node'; +import type { RisonValue } from 'rison-node'; +import { encode } from 'rison-node'; import type { Query } from '@kbn/es-query'; import { TimeHistory } from '@kbn/data-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; import { SearchBar } from '@kbn/unified-search-plugin/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { urlFromQueryParams } from '../url_from_query_params'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx index df619c55d768a..ddb6a246d78d9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/table_row_actions.tsx @@ -6,16 +6,11 @@ */ import React, { memo, useCallback, useMemo, useState } from 'react'; -import { - EuiButtonIcon, - EuiContextMenuPanel, - EuiContextMenuPanelProps, - EuiPopover, - EuiPopoverProps, -} from '@elastic/eui'; +import type { EuiContextMenuPanelProps, EuiPopoverProps } from '@elastic/eui'; +import { EuiButtonIcon, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ContextMenuItemNavByRouter } from '../../../../components/context_menu_with_router_support/context_menu_item_nav_by_router'; -import { HostMetadata } from '../../../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../../../common/endpoint/types'; import { useEndpointActionItems } from '../hooks'; export interface TableRowActionProps { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx index fad042919bd83..0f08122f506c6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/actions_menu.test.tsx @@ -5,10 +5,8 @@ * 2.0. */ -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { useKibana } from '../../../../../../common/lib/kibana'; import { ActionsMenu } from './actions_menu'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/back_to_endpoint_details_flyout_subheader.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/back_to_endpoint_details_flyout_subheader.tsx index bb60214d138b5..874ac2169e70d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/back_to_endpoint_details_flyout_subheader.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/back_to_endpoint_details_flyout_subheader.tsx @@ -5,9 +5,11 @@ * 2.0. */ -import React, { memo, useMemo, MouseEventHandler } from 'react'; +import type { MouseEventHandler } from 'react'; +import React, { memo, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiButtonEmpty, CommonProps } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiButtonEmpty } from '@elastic/eui'; import { getEndpointDetailsPath } from '../../../../../common/routing'; import { useNavigateByRouterEventHandler } from '../../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; import { useEndpointSelector } from '../../hooks'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_details_tabs.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_details_tabs.tsx index dfe1594391100..1fb83a2a552b9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_details_tabs.tsx @@ -7,7 +7,7 @@ import React, { memo, useMemo } from 'react'; import { EuiTab, EuiTabs, EuiFlyoutBody } from '@elastic/eui'; -import { EndpointIndexUIQueryParams } from '../../../types'; +import type { EndpointIndexUIQueryParams } from '../../../types'; import { EndpointDetailsFlyoutHeader } from './flyout_header'; import { useNavigateByRouterEventHandler } from '../../../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_isolate_flyout_panel.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_isolate_flyout_panel.tsx index d4c082b2d7b71..6f98f04ee6f26 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_isolate_flyout_panel.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/components/endpoint_isolate_flyout_panel.tsx @@ -8,12 +8,12 @@ import React, { memo, useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import { EuiForm, EuiFlyoutBody } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { HostMetadata } from '../../../../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../../../../common/endpoint/types'; +import type { EndpointIsolatedFormProps } from '../../../../../../common/components/endpoint/host_isolation'; import { - EndpointIsolatedFormProps, EndpointIsolateForm, EndpointIsolateSuccess, EndpointUnisolateForm, @@ -28,7 +28,7 @@ import { uiQueryParams, getIsEndpointHostIsolated, } from '../../../store/selectors'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { AppAction } from '../../../../../../common/store/actions'; /** * Component handles both isolate and un-isolate for a given endpoint diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx index c4a0662c2e1ff..a8f343290677e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import React, { memo, useCallback, useEffect, useMemo } from 'react'; import { ResponseActionsList } from '../../../../components/endpoint_response_actions_list/response_actions_list'; import { PolicyResponseWrapper } from '../../../../components/policy_response'; -import { HostMetadata } from '../../../../../../common/endpoint/types'; +import type { HostMetadata } from '../../../../../../common/endpoint/types'; import { useToasts } from '../../../../../common/lib/kibana'; import { getEndpointDetailsPath } from '../../../../common/routing'; import { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details_content.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details_content.tsx index 6dcedd8f905a9..d142e1385e80d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details_content.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/details/endpoint_details_content.tsx @@ -18,7 +18,7 @@ import { import React, { memo, useMemo } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { isPolicyOutOfDate } from '../../utils'; -import { HostInfo, HostMetadata, HostStatus } from '../../../../../../common/endpoint/types'; +import type { HostInfo, HostMetadata, HostStatus } from '../../../../../../common/endpoint/types'; import { useEndpointSelector } from '../hooks'; import { nonExistingPolicies, policyResponseStatus, uiQueryParams } from '../../store/selectors'; import { POLICY_STATUS_TO_BADGE_COLOR } from '../host_constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/hooks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/hooks.ts index 5ad2c15366eb0..c9a0eec58a94d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/hooks.ts @@ -8,8 +8,8 @@ import { useSelector } from 'react-redux'; import { useMemo } from 'react'; import { pagePathGetters } from '@kbn/fleet-plugin/public'; -import { EndpointState } from '../../types'; -import { State } from '../../../../../common/store'; +import type { EndpointState } from '../../types'; +import type { State } from '../../../../../common/store'; import { MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, MANAGEMENT_STORE_GLOBAL_NAMESPACE, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index e336ff0b52862..5cbbb682d5045 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -13,11 +13,11 @@ import { useWithShowEndpointResponder } from '../../../../hooks'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; import { APP_UI_ID } from '../../../../../../common/constants'; import { getEndpointDetailsPath } from '../../../../common/routing'; -import { HostMetadata, MaybeImmutable } from '../../../../../../common/endpoint/types'; +import type { HostMetadata, MaybeImmutable } from '../../../../../../common/endpoint/types'; import { useEndpointSelector } from './hooks'; import { agentPolicies, uiQueryParams } from '../../store/selectors'; import { useAppUrl } from '../../../../../common/lib/kibana/hooks'; -import { ContextMenuItemNavByRouterProps } from '../../../../components/context_menu_with_router_support/context_menu_item_nav_by_router'; +import type { ContextMenuItemNavByRouterProps } from '../../../../components/context_menu_with_router_support/context_menu_item_nav_by_router'; import { isEndpointHostIsolated } from '../../../../../common/utils/validators'; import { useLicense } from '../../../../../common/hooks/use_license'; import { isIsolationSupported } from '../../../../../../common/endpoint/service/host_isolation/utils'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts index 8fa4a9388e08e..a60a555625edb 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/host_constants.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { HostStatus, HostPolicyResponseActionStatus } from '../../../../../common/endpoint/types'; +import type { HostPolicyResponseActionStatus } from '../../../../../common/endpoint/types'; +import { HostStatus } from '../../../../../common/endpoint/types'; export const HOST_STATUS_TO_BADGE_COLOR = Object.freeze<{ [key in HostStatus]: string; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index dcf13813ea87f..62d01b2da3bff 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -17,14 +17,14 @@ import { mockEndpointResultList, setEndpointListApiMockImplementation, } from '../store/mock_endpoint_result_list'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; -import { +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { HostInfo, HostPolicyResponse, - HostPolicyResponseActionStatus, HostPolicyResponseAppliedAction, - HostStatus, } from '../../../../../common/endpoint/types'; +import { HostPolicyResponseActionStatus, HostStatus } from '../../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; import { POLICY_STATUS_TO_HEALTH_COLOR, POLICY_STATUS_TO_TEXT } from './host_constants'; import { mockPolicyResultList } from '../../policy/store/test_mock_utils'; @@ -45,7 +45,7 @@ import { MANAGEMENT_PATH, TRANSFORM_STATES, } from '../../../../../common/constants'; -import { TransformStats } from '../types'; +import type { TransformStats } from '../types'; import { HOST_METADATA_LIST_ROUTE, metadataTransformPrefix, diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 670364d7304e7..0ab1baf136c66 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -7,15 +7,14 @@ import React, { useMemo, useCallback, memo, useEffect, useState } from 'react'; import styled from 'styled-components'; +import type { EuiBasicTableColumn, EuiSelectableProps } from '@elastic/eui'; import { EuiHorizontalRule, EuiBasicTable, - EuiBasicTableColumn, EuiText, EuiLink, EuiHealth, EuiToolTip, - EuiSelectableProps, EuiSuperDatePicker, EuiSpacer, EuiFlexGroup, @@ -27,11 +26,11 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { createStructuredSelector } from 'reselect'; import { useDispatch } from 'react-redux'; -import { +import type { CreatePackagePolicyRouteState, AgentPolicyDetailsDeployAgentAction, - pagePathGetters, } from '@kbn/fleet-plugin/public'; +import { pagePathGetters } from '@kbn/fleet-plugin/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { EndpointDetailsFlyout } from './details'; import * as selectors from '../store/selectors'; @@ -39,8 +38,12 @@ import { useEndpointSelector } from './hooks'; import { isPolicyOutOfDate } from '../utils'; import { POLICY_STATUS_TO_HEALTH_COLOR, POLICY_STATUS_TO_TEXT } from './host_constants'; import { useNavigateByRouterEventHandler } from '../../../../common/hooks/endpoint/use_navigate_by_router_event_handler'; -import { CreateStructuredSelector } from '../../../../common/store'; -import { Immutable, HostInfo, PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; +import type { CreateStructuredSelector } from '../../../../common/store'; +import type { + Immutable, + HostInfo, + PolicyDetailsRouteState, +} from '../../../../../common/endpoint/types'; import { DEFAULT_POLL_INTERVAL, MANAGEMENT_PAGE_SIZE_OPTIONS } from '../../../common/constants'; import { PolicyEmptyState, HostsEmptyState } from '../../../components/management_empty_state'; import { FormattedDate } from '../../../../common/components/formatted_date'; @@ -54,7 +57,7 @@ import { } from '../../../common/routing'; import { useFormatUrl } from '../../../../common/components/link_to'; import { useAppUrl } from '../../../../common/lib/kibana/hooks'; -import { EndpointAction } from '../store/action'; +import type { EndpointAction } from '../store/action'; import { OutOfDate } from './components/out_of_date'; import { AdminSearchBar } from './components/search_bar'; import { AdministrationListPage } from '../../../components/administration_list_page'; @@ -64,10 +67,8 @@ import { EndpointAgentStatus } from './components/endpoint_agent_status'; import { CallOut } from '../../../../common/components/callouts'; import { metadataTransformPrefix } from '../../../../../common/endpoint/constants'; import { WARNING_TRANSFORM_STATES, APP_UI_ID } from '../../../../../common/constants'; -import { - BackToExternalAppButton, - BackToExternalAppButtonProps, -} from '../../../components/back_to_external_app_button/back_to_external_app_button'; +import type { BackToExternalAppButtonProps } from '../../../components/back_to_external_app_button/back_to_external_app_button'; +import { BackToExternalAppButton } from '../../../components/back_to_external_app_button/back_to_external_app_button'; import { ManagementEmptyStateWrapper } from '../../../components/management_empty_state_wrapper'; const MAX_PAGINATED_ITEM = 9999; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts index 8831b51344777..a790062a135b3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts @@ -8,8 +8,8 @@ // eslint-disable-next-line import/no-nodejs-modules import querystring from 'querystring'; -import { EndpointIndexUIQueryParams } from '../types'; -import { AppLocation } from '../../../../../common/endpoint/types'; +import type { EndpointIndexUIQueryParams } from '../types'; +import type { AppLocation } from '../../../../../common/endpoint/types'; export function urlFromQueryParams(queryParams: EndpointIndexUIQueryParams): Partial { const search = querystring.stringify(queryParams as Record); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts index e58b489cdd2c6..33f527fd5628e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/constants.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { +import type { CreateExceptionListSchema, ExceptionListType, - ExceptionListTypeEnum, } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { EXCEPTION_LIST_URL, EXCEPTION_LIST_ITEM_URL, diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/api_client.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/api_client.ts index cccb37ebf0af3..477b7361d54aa 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/api_client.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/api_client.ts @@ -6,7 +6,7 @@ */ import { ENDPOINT_EVENT_FILTERS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../../services/exceptions_list/exceptions_list_api_client'; import { EVENT_FILTER_LIST_DEFINITION } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/index.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/index.ts index a1259647ddbe8..e5f5cc7e9cbfa 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import type { FoundExceptionListItemSchema, ExceptionListItemSchema, @@ -14,9 +14,9 @@ import type { ExceptionListSummarySchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { Immutable } from '../../../../../common/endpoint/types'; +import type { Immutable } from '../../../../../common/endpoint/types'; -import { EventFiltersService } from '../types'; +import type { EventFiltersService } from '../types'; import { addEventFilters, getList, diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts index 05c00a291c510..9b4e05bfd14fd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/service/service_actions.ts @@ -5,21 +5,21 @@ * 2.0. */ -import { +import type { CreateExceptionListItemSchema, ExceptionListItemSchema, ExceptionListSummarySchema, FoundExceptionListItemSchema, UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL, EVENT_FILTER_LIST_DEFINITION, ENDPOINT_EVENT_FILTERS_LIST_ID, } from '../constants'; -import { Immutable } from '../../../../../common/endpoint/types'; +import type { Immutable } from '../../../../../common/endpoint/types'; async function createEventFilterList(http: HttpStart): Promise { try { diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/test_utils/index.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/test_utils/index.ts index 6edff2d89c416..2f35e82959e61 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/test_utils/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/test_utils/index.ts @@ -14,12 +14,10 @@ import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysoluti import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { getSummaryExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_summary_schema.mock'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; -import { - httpHandlerMockFactory, - ResponseProvidersInterface, -} from '../../../../common/mock/endpoint/http_handler_mock_factory'; +import type { ResponseProvidersInterface } from '../../../../common/mock/endpoint/http_handler_mock_factory'; +import { httpHandlerMockFactory } from '../../../../common/mock/endpoint/http_handler_mock_factory'; export const ecsEventMock = (): Ecs => ({ _id: 'unLfz3gB2mJZsMY3ytx3', diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/types.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/types.ts index b6a7c3b555daa..b14d22952758b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/types.ts @@ -12,7 +12,7 @@ import type { UpdateExceptionListItemSchema, ExceptionListSummarySchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { Immutable } from '../../../../common/endpoint/types'; +import type { Immutable } from '../../../../common/endpoint/types'; export interface EventFiltersPageLocation { page_index: number; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx index 21bd1fa655c2e..37bffbcaa2bce 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx @@ -6,14 +6,13 @@ */ import React from 'react'; -import { EventFiltersFlyout, EventFiltersFlyoutProps } from './event_filters_flyout'; +import type { EventFiltersFlyoutProps } from './event_filters_flyout'; +import { EventFiltersFlyout } from './event_filters_flyout'; import { act, cleanup } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { getInitialExceptionFromEvent } from '../utils'; import { useCreateArtifact } from '../../../../hooks/artifacts/use_create_artifact'; @@ -23,7 +22,7 @@ import { ecsEventMock, esResponseData } from '../../test_utils'; import { useKibana, useToasts } from '../../../../../common/lib/kibana'; import { of } from 'rxjs'; import { ExceptionsListItemGenerator } from '../../../../../../common/endpoint/data_generators/exceptions_list_item_generator'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; // mocked modules jest.mock('../../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.tsx index c370f548e6812..48936a872b817 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.tsx @@ -23,14 +23,14 @@ import { import { lastValueFrom } from 'rxjs'; import { useWithArtifactSubmitData } from '../../../../components/artifact_list_page/hooks/use_with_artifact_submit_data'; -import { +import type { ArtifactFormComponentOnChangeCallbackProps, ArtifactFormComponentProps, } from '../../../../components/artifact_list_page/types'; import { EventFiltersForm } from './form'; import { getInitialExceptionFromEvent } from '../utils'; -import { Ecs } from '../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../common/ecs'; import { useHttp, useKibana, useToasts } from '../../../../../common/lib/kibana'; import { useGetEndpointSpecificPolicies } from '../../../../services/policies/hooks'; import { getLoadPoliciesError } from '../../../../common/translations'; 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 e20abb2f93264..bc8ce0c6a3216 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 @@ -12,22 +12,20 @@ import { useFetchIndex } from '../../../../../common/containers/source'; import { NAME_ERROR } from '../event_filters_list'; import { useCurrentUser, useKibana } from '../../../../../common/lib/kibana'; import { licenseService } from '../../../../../common/hooks/use_license'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import userEvent from '@testing-library/user-event'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_EVENT_FILTERS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { +import type { ArtifactFormComponentOnChangeCallbackProps, ArtifactFormComponentProps, } from '../../../../components/artifact_list_page'; import { OperatingSystem } from '@kbn/securitysolution-utils'; import { EventFiltersForm } from './form'; import { EndpointDocGenerator } from '../../../../../../common/endpoint/generate_data'; -import { PolicyData } from '../../../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../../../common/endpoint/types'; jest.mock('../../../../../common/lib/kibana'); jest.mock('../../../../../common/containers/source'); 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 fbc650767dd49..f157a7e4d804e 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 @@ -8,13 +8,13 @@ import React, { memo, useMemo, useCallback, useState, useEffect } from 'react'; import { isEqual } from 'lodash'; +import type { EuiSuperSelectOption } from '@elastic/eui'; import { EuiFieldText, EuiSpacer, EuiForm, EuiFormRow, EuiSuperSelect, - EuiSuperSelectOption, EuiText, EuiHorizontalRule, EuiTextArea, @@ -28,13 +28,13 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { getExceptionBuilderComponentLazy } from '@kbn/lists-plugin/public'; import type { OnChangeProps } from '@kbn/lists-plugin/public'; import { useTestIdGenerator } from '../../../../hooks/use_test_id_generator'; -import { PolicyData } from '../../../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../../../common/endpoint/types'; import { AddExceptionComments } from '../../../../../common/components/exceptions/add_exception_comments'; import { useFetchIndex } from '../../../../../common/containers/source'; import { Loader } from '../../../../../common/components/loader'; import { useLicense } from '../../../../../common/hooks/use_license'; import { useKibana } from '../../../../../common/lib/kibana'; -import { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; +import type { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; import { filterIndexPatterns } from '../../../../../common/components/exceptions/helpers'; import { isArtifactGlobal, @@ -54,10 +54,8 @@ import { import { OS_TITLES } from '../../../../common/translations'; import { ENDPOINT_EVENT_FILTERS_LIST_ID, EVENT_FILTER_LIST_TYPE } from '../../constants'; -import { - EffectedPolicySelect, - EffectedPolicySelection, -} from '../../../../components/effected_policy_select'; +import type { EffectedPolicySelection } from '../../../../components/effected_policy_select'; +import { EffectedPolicySelect } from '../../../../components/effected_policy_select'; import { isGlobalPolicyEffected } from '../../../../components/effected_policy_select/utils'; const OPERATING_SYSTEMS: readonly OperatingSystem[] = [ diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx index 3355ee8c3072e..0ef525418f385 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.test.tsx @@ -9,7 +9,8 @@ import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { EVENT_FILTERS_PATH } from '../../../../../common/constants'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { EventFiltersList } from './event_filters_list'; import { exceptionsListAllHttpMocks } from '../../../mocks/exceptions_list_http_mocks'; import { SEARCHABLE_FIELDS } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx index f303987e1acab..0e8391cf2cee0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/event_filters_list.tsx @@ -8,11 +8,12 @@ import React, { memo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocLinks } from '@kbn/doc-links'; +import type { DocLinks } from '@kbn/doc-links'; import { EuiLink } from '@elastic/eui'; import { useHttp } from '../../../../common/lib/kibana'; -import { ArtifactListPage, ArtifactListPageProps } from '../../../components/artifact_list_page'; +import type { ArtifactListPageProps } from '../../../components/artifact_list_page'; +import { ArtifactListPage } from '../../../components/artifact_list_page'; import { EventFiltersApiClient } from '../service/api_client'; import { EventFiltersForm } from './components/form'; import { SEARCHABLE_FIELDS } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/translations.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/translations.ts index db6908f2baa8d..4bcc3b3d8ad8c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/translations.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { HttpFetchError } from '@kbn/core/public'; +import type { HttpFetchError } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { ArtifactFormComponentProps } from '../../../components/artifact_list_page'; +import type { ArtifactFormComponentProps } from '../../../components/artifact_list_page'; export const getCreationSuccessMessage = (item: ArtifactFormComponentProps['item']) => { return i18n.translate('xpack.securitySolution.eventFilter.flyoutForm.creationSuccessToastTitle', { diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts index e0f9a6bcc965c..23eb18768390c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/utils.ts @@ -7,7 +7,7 @@ import uuid from 'uuid'; import type { CreateExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { ENDPOINT_EVENT_FILTERS_LIST_ID } from '../constants'; const osTypeBasedOnAgentType = (data?: Ecs) => { diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts index 9425a6c8f7aea..1eeda5c60ebf4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/constants.ts @@ -4,10 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - ExceptionListTypeEnum, - CreateExceptionListSchema, -} from '@kbn/securitysolution-io-ts-list-types'; +import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_DESCRIPTION, ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts index cdb5b35be03fd..eea09ceaf91ca 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/host_isolation_exceptions_api_client.ts @@ -6,7 +6,7 @@ */ import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { ExceptionsListApiClient } from '../../services/exceptions_list/exceptions_list_api_client'; import { HOST_ISOLATION_EXCEPTIONS_LIST_DEFINITION } from './constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx index c3563a2462838..90cb1b6adac81 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.test.tsx @@ -5,16 +5,14 @@ * 2.0. */ -import { +import type { ExceptionListItemSchema, FoundExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import userEvent from '@testing-library/user-event'; import React from 'react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { HostIsolationExceptionsList } from '../host_isolation_exceptions_list'; import { act, waitFor } from '@testing-library/react'; import { HOST_ISOLATION_EXCEPTIONS_PATH } from '../../../../../../common/constants'; @@ -27,7 +25,7 @@ import { isEffectedPolicySelected, } from '../../../../components/effected_policy_select/test_utils'; import { BY_POLICY_ARTIFACT_TAG_PREFIX } from '../../../../../../common/endpoint/service/artifacts'; -import { HttpFetchOptionsWithPath } from '@kbn/core/public'; +import type { HttpFetchOptionsWithPath } from '@kbn/core/public'; jest.mock('../../../../../common/components/user_privileges'); diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx index 3834da243ab75..6601a443805fa 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/form.tsx @@ -18,11 +18,11 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { isValidIPv4OrCIDR } from '../../../../../../common/endpoint/utils/is_valid_ip'; -import { - EffectedPolicySelect, +import type { EffectedPolicySelection, EffectedPolicySelectProps, } from '../../../../components/effected_policy_select'; +import { EffectedPolicySelect } from '../../../../components/effected_policy_select'; import { getArtifactTagsByEffectedPolicySelection, getArtifactTagsWithoutPolicies, @@ -39,7 +39,7 @@ import { NAME_LABEL, NAME_PLACEHOLDER, } from './translations'; -import { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; +import type { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; import { FormattedError } from '../../../../components/formatted_error'; interface ExceptionIpEntry { diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts index 2690a0e68d78d..75b9235c23aed 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/components/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ServerApiError } from '../../../../../common/types'; +import type { ServerApiError } from '../../../../../common/types'; export const NAME_PLACEHOLDER = i18n.translate( 'xpack.securitySolution.hostIsolationExceptions.form.name.placeholder', diff --git a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx index d097e6a771835..ba830b859d004 100644 --- a/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/host_isolation_exceptions/view/host_isolation_exceptions_list.test.tsx @@ -9,7 +9,8 @@ import { act, fireEvent, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { HOST_ISOLATION_EXCEPTIONS_PATH } from '../../../../../common/constants'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { HostIsolationExceptionsList } from './host_isolation_exceptions_list'; import { exceptionsListAllHttpMocks } from '../../../mocks/exceptions_list_http_mocks'; import { SEARCHABLE_FIELDS } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/index.test.tsx index 9eda30d386f67..7d2778d602c79 100644 --- a/x-pack/plugins/security_solution/public/management/pages/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/index.test.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { ManagementContainer } from '.'; import '../../common/mock/match_media'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../common/mock/endpoint'; import { useUserPrivileges } from '../../common/components/user_privileges'; import { endpointPageHttpMock } from './endpoint_hosts/mocks'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts index be552252e6fcf..724ade095694f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/policy_details_config.ts @@ -6,7 +6,7 @@ */ import { cloneDeep } from 'lodash'; -import { UIPolicyConfig } from '../../../../../common/endpoint/types'; +import type { UIPolicyConfig } from '../../../../../common/endpoint/types'; /** * Returns value from `configuration` diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/index.ts index 2be4735685454..ca29fa230e1e8 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { PolicySettingsAction } from './policy_settings_action'; +import type { PolicySettingsAction } from './policy_settings_action'; export type PolicyDetailsAction = PolicySettingsAction; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_settings_action.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_settings_action.ts index 3b578f85364c3..1df0ff8383a72 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_settings_action.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/action/policy_settings_action.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ILicense } from '@kbn/licensing-plugin/common/types'; -import { GetAgentStatusResponse } from '@kbn/fleet-plugin/common/types/rest_spec'; -import { PolicyData, UIPolicyConfig } from '../../../../../../../common/endpoint/types'; -import { ServerApiError } from '../../../../../../common/types'; -import { PolicyDetailsState } from '../../../types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { GetAgentStatusResponse } from '@kbn/fleet-plugin/common/types/rest_spec'; +import type { PolicyData, UIPolicyConfig } from '../../../../../../../common/endpoint/types'; +import type { ServerApiError } from '../../../../../../common/types'; +import type { PolicyDetailsState } from '../../../types'; export interface ServerReturnedPolicyDetailsData { type: 'serverReturnedPolicyDetailsData'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts index 96375cae68be9..dcdf197b21d27 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.test.ts @@ -5,21 +5,19 @@ * 2.0. */ -import { PolicyDetailsState } from '../../types'; -import { applyMiddleware, createStore, Dispatch, Store } from 'redux'; -import { policyDetailsReducer, PolicyDetailsAction, policyDetailsMiddlewareFactory } from '.'; +import type { PolicyDetailsState } from '../../types'; +import type { Dispatch, Store } from 'redux'; +import { applyMiddleware, createStore } from 'redux'; +import type { PolicyDetailsAction } from '.'; +import { policyDetailsReducer, policyDetailsMiddlewareFactory } from '.'; import { policyConfig } from './selectors'; import { policyFactory } from '../../../../../../common/endpoint/models/policy_config'; -import { PolicyData } from '../../../../../../common/endpoint/types'; -import { - createSpyMiddleware, - MiddlewareActionSpyHelper, -} from '../../../../../common/store/test_utils'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; -import { HttpFetchOptions } from '@kbn/core/public'; +import type { PolicyData } from '../../../../../../common/endpoint/types'; +import type { MiddlewareActionSpyHelper } from '../../../../../common/store/test_utils'; +import { createSpyMiddleware } from '../../../../../common/store/test_utils'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; +import type { HttpFetchOptions } from '@kbn/core/public'; import { cloneDeep } from 'lodash'; import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts index c771cef28e73d..5109d1aedf458 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { PolicyDetailsState } from '../../types'; -import { ImmutableReducer } from '../../../../../common/store'; -import { AppAction } from '../../../../../common/store/actions'; -import { Immutable } from '../../../../../../common/endpoint/types'; +import type { PolicyDetailsState } from '../../types'; +import type { ImmutableReducer } from '../../../../../common/store'; +import type { AppAction } from '../../../../../common/store/actions'; +import type { Immutable } from '../../../../../../common/endpoint/types'; export { policyDetailsMiddlewareFactory } from './middleware'; export { policyDetailsReducer, initialPolicyDetailsState } from './reducer'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/index.ts index 2409193d63819..54a235229a717 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ImmutableMiddlewareFactory } from '../../../../../../common/store'; -import { MiddlewareRunnerContext, PolicyDetailsState } from '../../../types'; +import type { ImmutableMiddlewareFactory } from '../../../../../../common/store'; +import type { MiddlewareRunnerContext, PolicyDetailsState } from '../../../types'; import { policySettingsMiddlewareRunner } from './policy_settings_middleware'; export const policyDetailsMiddlewareFactory: ImmutableMiddlewareFactory = ( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_settings_middleware.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_settings_middleware.ts index 32f8bf44a4831..79bec920ad9d7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_settings_middleware.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/middleware/policy_settings_middleware.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { IHttpFetchError } from '@kbn/core/public'; +import type { IHttpFetchError } from '@kbn/core/public'; import { DefaultPolicyNotificationMessage, DefaultPolicyRuleNotificationMessage, } from '../../../../../../../common/endpoint/models/policy_config'; -import { MiddlewareRunner, UpdatePolicyResponse } from '../../../types'; +import type { MiddlewareRunner, UpdatePolicyResponse } from '../../../types'; import { policyIdFromParams, isOnPolicyDetailsPage, @@ -23,7 +23,7 @@ import { sendGetFleetAgentStatusForPolicy, sendPutPackagePolicy, } from '../../../../../services/policies/ingest'; -import { NewPolicyData, PolicyData } from '../../../../../../../common/endpoint/types'; +import type { NewPolicyData, PolicyData } from '../../../../../../../common/endpoint/types'; import { getPolicyDataForUpdate } from '../../../../../../../common/endpoint/service/policy'; export const policySettingsMiddlewareRunner: MiddlewareRunner = async ( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/index.ts index 264f315be1898..51ca963f07d7e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ImmutableReducer } from '../../../../../../common/store'; -import { PolicyDetailsState } from '../../../types'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { ImmutableReducer } from '../../../../../../common/store'; +import type { PolicyDetailsState } from '../../../types'; +import type { AppAction } from '../../../../../../common/store/actions'; import { policySettingsReducer } from './policy_settings_reducer'; import { initialPolicyDetailsState } from './initial_policy_details_state'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts index a38598bf9d241..20b8b46538f53 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/initial_policy_details_state.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Immutable } from '../../../../../../../common/endpoint/types'; -import { PolicyDetailsState } from '../../../types'; +import type { Immutable } from '../../../../../../../common/endpoint/types'; +import type { PolicyDetailsState } from '../../../types'; import { MANAGEMENT_DEFAULT_PAGE, MANAGEMENT_DEFAULT_PAGE_SIZE, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/policy_settings_reducer.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/policy_settings_reducer.ts index 9997e547e8148..f87a8f4c55ea5 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/policy_settings_reducer.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/reducer/policy_settings_reducer.ts @@ -8,15 +8,15 @@ // eslint-disable-next-line import/no-nodejs-modules import { parse } from 'querystring'; import { fullPolicy, isOnPolicyDetailsPage, license } from '../selectors/policy_settings_selectors'; -import { +import type { Immutable, PolicyConfig, PolicyData, UIPolicyConfig, } from '../../../../../../../common/endpoint/types'; -import { ImmutableReducer } from '../../../../../../common/store'; -import { AppAction } from '../../../../../../common/store/actions'; -import { PolicyDetailsState } from '../../../types'; +import type { ImmutableReducer } from '../../../../../../common/store'; +import type { AppAction } from '../../../../../../common/store/actions'; +import type { PolicyDetailsState } from '../../../types'; import { extractPolicyDetailsArtifactsListPageLocation } from '../../../../../common/routing'; import { initialPolicyDetailsState } from './initial_policy_details_state'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_common_selectors.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_common_selectors.ts index ef753e75a8391..e8f9a95d8a470 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_common_selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_common_selectors.ts @@ -14,7 +14,7 @@ import { MANAGEMENT_ROUTING_POLICY_DETAILS_EVENT_FILTERS_PATH, MANAGEMENT_ROUTING_POLICY_DETAILS_BLOCKLISTS_PATH, } from '../../../../../common/constants'; -import { PolicyDetailsSelector, PolicyDetailsState } from '../../../types'; +import type { PolicyDetailsSelector, PolicyDetailsState } from '../../../types'; /** * Returns current artifacts location diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_settings_selectors.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_settings_selectors.ts index fc2a6f160fce9..394f34860857b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_settings_selectors.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/selectors/policy_settings_selectors.ts @@ -7,10 +7,10 @@ import { matchPath } from 'react-router-dom'; import { createSelector } from 'reselect'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { unsetPolicyFeaturesAccordingToLicenseLevel } from '../../../../../../../common/license/policy_config'; -import { PolicyDetailsState } from '../../../types'; -import { +import type { PolicyDetailsState } from '../../../types'; +import type { Immutable, NewPolicyData, PolicyConfig, @@ -25,7 +25,7 @@ import { MANAGEMENT_ROUTING_POLICY_DETAILS_EVENT_FILTERS_PATH, MANAGEMENT_ROUTING_POLICY_DETAILS_BLOCKLISTS_PATH, } from '../../../../../common/constants'; -import { ManagementRoutePolicyDetailsParams } from '../../../../../types'; +import type { ManagementRoutePolicyDetailsParams } from '../../../../../types'; import { getPolicyDataForUpdate } from '../../../../../../../common/endpoint/service/policy'; import { isOnPolicyTrustedAppsView, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts index 129f904b39b51..880afeb347361 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { GetPackagesResponse } from '@kbn/fleet-plugin/common'; import { INGEST_API_EPM_PACKAGES, INGEST_API_PACKAGE_POLICIES, } from '../../../services/policies/ingest'; import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; -import { GetPolicyListResponse } from '../types'; +import type { GetPolicyListResponse } from '../types'; const generator = new EndpointDocGenerator('policy-list'); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts b/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts index e3641ba66e15b..abe9d4d474985 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/test_utils/mocks.ts @@ -6,7 +6,7 @@ */ import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { GetTrustedAppsListResponse, TrustedApp } from '../../../../../common/endpoint/types'; +import type { GetTrustedAppsListResponse, TrustedApp } from '../../../../../common/endpoint/types'; import { MANAGEMENT_DEFAULT_PAGE, MANAGEMENT_DEFAULT_PAGE_SIZE, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts index bba1d87f307f7..bd23160b2f15a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/types.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/types.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; -import { +import type { CoreStart } from '@kbn/core/public'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { GetAgentStatusResponse, GetOnePackagePolicyResponse, GetPackagePoliciesResponse, UpdatePackagePolicyResponse, } from '@kbn/fleet-plugin/common'; -import { +import type { AppLocation, Immutable, ProtectionFields, @@ -24,9 +24,9 @@ import { TrustedApp, PutTrustedAppUpdateResponse, } from '../../../../common/endpoint/types'; -import { ServerApiError } from '../../../common/types'; -import { ImmutableMiddlewareAPI } from '../../../common/store'; -import { AppAction } from '../../../common/store/actions'; +import type { ServerApiError } from '../../../common/types'; +import type { ImmutableMiddlewareAPI } from '../../../common/store'; +import type { AppAction } from '../../../common/store/actions'; export type PolicyDetailsStore = ImmutableMiddlewareAPI; 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 d10b44e5b2640..aa57df82276c6 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 @@ -5,15 +5,11 @@ * 2.0. */ import React from 'react'; -import { - PolicyArtifactsAssignableList, - PolicyArtifactsAssignableListProps, -} from './policy_artifacts_assignable_list'; +import type { PolicyArtifactsAssignableListProps } from './policy_artifacts_assignable_list'; +import { PolicyArtifactsAssignableList } from './policy_artifacts_assignable_list'; import * as reactTestingLibrary from '@testing-library/react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { fireEvent } from '@testing-library/dom'; import { getMockListResponse } from '../../../test_utils'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.tsx index ec2ec70b81dab..4be70c364e0d8 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.tsx @@ -6,13 +6,14 @@ */ import { EuiProgress } from '@elastic/eui'; -import { FoundExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { FoundExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import React, { useMemo } from 'react'; -import { GetTrustedAppsListResponse, Immutable } from '../../../../../../../common/endpoint/types'; -import { - AnyArtifact, - ArtifactEntryCardMinified, -} from '../../../../../components/artifact_entry_card'; +import type { + GetTrustedAppsListResponse, + Immutable, +} from '../../../../../../../common/endpoint/types'; +import type { AnyArtifact } from '../../../../../components/artifact_entry_card'; +import { ArtifactEntryCardMinified } from '../../../../../components/artifact_entry_card'; export interface PolicyArtifactsAssignableListProps { // TrustedApps is still migrating to use FoundExceptionListItemSchema and the compatibility is diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.test.tsx index 88c20e3783641..6bb63fb96c62a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CreateExceptionListSchema, ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; @@ -14,10 +14,8 @@ import userEvent from '@testing-library/user-event'; import React from 'react'; import uuid from 'uuid'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { PolicyArtifactsDeleteModal } from './policy_artifacts_delete_modal'; import { exceptionsListAllHttpMocks } from '../../../../../mocks/exceptions_list_http_mocks'; import { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.tsx index 172a8e671d2ad..5bab2b165cb3d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/policy_artifacts_delete_modal.tsx @@ -7,14 +7,14 @@ import { EuiCallOut, EuiConfirmModal, EuiSpacer, EuiText } from '@elastic/eui'; import { useQueryClient } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import React, { useCallback } from 'react'; import { useBulkUpdateArtifact } from '../../../../../hooks/artifacts'; import { useToasts } from '../../../../../../common/lib/kibana'; -import { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; import { BY_POLICY_ARTIFACT_TAG_PREFIX } from '../../../../../../../common/endpoint/service/artifacts'; -import { POLICY_ARTIFACT_DELETE_MODAL_LABELS } from './translations'; +import type { POLICY_ARTIFACT_DELETE_MODAL_LABELS } from './translations'; interface PolicyArtifactsDeleteModalProps { policyId: string; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/translations.ts index bbbe4ed73c295..ce3442e69c4c0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/delete_modal/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_DELETE_MODAL_LABELS = Object.freeze({ deleteModalTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unassigned.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unassigned.tsx index 2bee159dc6e4d..d3cc233316258 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unassigned.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unassigned.tsx @@ -10,9 +10,9 @@ import { EuiButton, EuiEmptyPrompt, EuiPageTemplate, EuiLink } from '@elastic/eu import { usePolicyDetailsArtifactsNavigateCallback } from '../../policy_hooks'; import { useGetLinkTo } from './use_policy_artifacts_empty_hooks'; import { useUserPrivileges } from '../../../../../../common/components/user_privileges'; -import { POLICY_ARTIFACT_EMPTY_UNASSIGNED_LABELS } from './translations'; -import { EventFiltersPageLocation } from '../../../../event_filters/types'; -import { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; +import type { POLICY_ARTIFACT_EMPTY_UNASSIGNED_LABELS } from './translations'; +import type { EventFiltersPageLocation } from '../../../../event_filters/types'; +import type { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; interface CommonProps { policyId: string; policyName: string; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unexisting.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unexisting.tsx index 7d12389048753..4de11e47d8ca9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unexisting.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/policy_artifacts_empty_unexisting.tsx @@ -8,9 +8,9 @@ import React, { memo } from 'react'; import { EuiEmptyPrompt, EuiButton, EuiPageTemplate } from '@elastic/eui'; import { useGetLinkTo } from './use_policy_artifacts_empty_hooks'; -import { POLICY_ARTIFACT_EMPTY_UNEXISTING_LABELS } from './translations'; -import { EventFiltersPageLocation } from '../../../../event_filters/types'; -import { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; +import type { POLICY_ARTIFACT_EMPTY_UNEXISTING_LABELS } from './translations'; +import type { EventFiltersPageLocation } from '../../../../event_filters/types'; +import type { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; interface CommonProps { policyId: string; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/use_policy_artifacts_empty_hooks.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/use_policy_artifacts_empty_hooks.ts index b2ee8e7dd17ba..b14e5918b2407 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/use_policy_artifacts_empty_hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/empty/use_policy_artifacts_empty_hooks.ts @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { useNavigateToAppEventHandler } from '../../../../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { useAppUrl } from '../../../../../../common/lib/kibana/hooks'; import { APP_UI_ID } from '../../../../../../../common/constants'; -import { EventFiltersPageLocation } from '../../../../event_filters/types'; -import { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; +import type { EventFiltersPageLocation } from '../../../../event_filters/types'; +import type { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; export const useGetLinkTo = ( policyId: string, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.test.tsx index 056a8daa92d3a..11cfd4b6aa792 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.test.tsx @@ -11,18 +11,16 @@ import React from 'react'; import uuid from 'uuid'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { EndpointDocGenerator } from '../../../../../../../common/endpoint/generate_data'; -import { PolicyData } from '../../../../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../../../../common/endpoint/types'; import { MANAGEMENT_DEFAULT_PAGE } from '../../../../../common/constants'; import { eventFiltersListQueryHttpMock } from '../../../../event_filters/test_utils'; import { MAX_ALLOWED_RESULTS, PolicyArtifactsFlyout } from './policy_artifacts_flyout'; import { parseQueryFilterToKQL, parsePoliciesAndFilterToKql } from '../../../../../common/utils'; import { SEARCHABLE_FIELDS } from '../../../../event_filters/constants'; -import { +import type { FoundExceptionListItemSchema, UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.tsx index 3ee0159e959cc..c13c351f935ac 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/policy_artifacts_flyout.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { useQueryClient } from 'react-query'; import { isEmpty, without } from 'lodash/fp'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { EuiTitle, EuiFlyout, @@ -24,12 +24,12 @@ import { EuiEmptyPrompt, } from '@elastic/eui'; import { SearchExceptions } from '../../../../../components/search_exceptions'; -import { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; +import type { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; import { useToasts } from '../../../../../../common/lib/kibana'; import { PolicyArtifactsAssignableList } from '../assignable'; -import { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; import { useListArtifact, useBulkUpdateArtifact } from '../../../../../hooks/artifacts'; -import { POLICY_ARTIFACT_FLYOUT_LABELS } from './translations'; +import type { POLICY_ARTIFACT_FLYOUT_LABELS } from './translations'; interface PolicyArtifactsFlyoutProps { policyItem: ImmutableObject; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/translations.ts index 071a6f7334fb7..af2e583514e2a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/flyout/translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_FLYOUT_LABELS = Object.freeze({ flyoutWarningCalloutTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.test.tsx index 67452fd11df53..958e2aa5f75ed 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.test.tsx @@ -6,10 +6,8 @@ */ import React from 'react'; import { act, waitFor } from '@testing-library/react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { getEventFiltersListPath, getPolicyDetailsArtifactsListPath, @@ -18,7 +16,7 @@ import { import { EndpointDocGenerator } from '../../../../../../../common/endpoint/generate_data'; import { PolicyArtifactsLayout } from './policy_artifacts_layout'; -import { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; +import type { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; import { parsePoliciesAndFilterToKql } from '../../../../../common/utils'; import { eventFiltersListQueryHttpMock } from '../../../../event_filters/test_utils'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.tsx index 07ef9abaeeab4..512c7f0920b9f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/policy_artifacts_layout.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo, useCallback, useState } from 'react'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { EuiTitle, EuiPageHeader, @@ -19,20 +19,21 @@ import { } from '@elastic/eui'; import { useAppUrl } from '../../../../../../common/lib/kibana'; import { APP_UI_ID } from '../../../../../../../common/constants'; -import { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; +import type { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; import { ManagementPageLoader } from '../../../../../components/management_page_loader'; import { useUrlParams } from '../../../../../hooks/use_url_params'; import { useUserPrivileges } from '../../../../../../common/components/user_privileges'; import { usePolicyDetailsArtifactsNavigateCallback } from '../../policy_hooks'; -import { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; import { useListArtifact } from '../../../../../hooks/artifacts'; import { PolicyArtifactsEmptyUnassigned, PolicyArtifactsEmptyUnexisting } from '../empty'; import { PolicyArtifactsList } from '../list'; import { PolicyArtifactsFlyout } from '../flyout'; -import { PolicyArtifactsPageLabels, policyArtifactsPageLabels } from '../translations'; +import type { PolicyArtifactsPageLabels } from '../translations'; +import { policyArtifactsPageLabels } from '../translations'; import { PolicyArtifactsDeleteModal } from '../delete_modal'; -import { EventFiltersPageLocation } from '../../../../event_filters/types'; -import { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; +import type { EventFiltersPageLocation } from '../../../../event_filters/types'; +import type { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; interface PolicyArtifactsLayoutProps { policyItem?: ImmutableObject | undefined; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/translations.ts index 82ffb8b16ca7a..30fcb474ae5af 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/layout/translations.ts @@ -5,7 +5,7 @@ * 2.0. */ -import React from 'react'; +import type React from 'react'; import { i18n } from '@kbn/i18n'; export const POLICY_ARTIFACT_LAYOUT_LABELS = Object.freeze({ diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.test.tsx index b3c104b27977f..2ccfaff3c8b2b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.test.tsx @@ -9,12 +9,10 @@ import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { EndpointDocGenerator } from '../../../../../../../common/endpoint/generate_data'; -import { PolicyData } from '../../../../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../../../../common/endpoint/types'; import { getEventFiltersListPath, getPolicyEventFiltersPath } from '../../../../../common/routing'; import { eventFiltersListQueryHttpMock } from '../../../../event_filters/test_utils'; import { PolicyArtifactsList } from './policy_artifacts_list'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx index 2b4ac313facc8..e34d8184bb206 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/list/policy_artifacts_list.tsx @@ -6,8 +6,9 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { EuiSpacer, EuiText, Pagination } from '@elastic/eui'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { Pagination } from '@elastic/eui'; +import { EuiSpacer, EuiText } from '@elastic/eui'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { useAppUrl } from '../../../../../../common/lib/kibana'; import { APP_UI_ID } from '../../../../../../../common/constants'; import { SearchExceptions } from '../../../../../components/search_exceptions'; @@ -16,20 +17,18 @@ import { useUrlParams } from '../../../../../hooks/use_url_params'; import { useUrlPagination } from '../../../../../hooks/use_url_pagination'; import { useGetEndpointSpecificPolicies } from '../../../../../services/policies/hooks'; import { useOldUrlSearchPaginationReplace } from '../../../../../hooks/use_old_url_search_pagination_replace'; -import { - ArtifactCardGrid, - ArtifactCardGridProps, -} from '../../../../../components/artifact_card_grid'; +import type { ArtifactCardGridProps } from '../../../../../components/artifact_card_grid'; +import { ArtifactCardGrid } from '../../../../../components/artifact_card_grid'; import { usePolicyDetailsArtifactsNavigateCallback } from '../../policy_hooks'; -import { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; +import type { ImmutableObject, PolicyData } from '../../../../../../../common/endpoint/types'; import { isGlobalPolicyEffected } from '../../../../../components/effected_policy_select/utils'; import { useUserPrivileges } from '../../../../../../common/components/user_privileges'; import { useGetLinkTo } from '../empty/use_policy_artifacts_empty_hooks'; -import { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../services/exceptions_list/exceptions_list_api_client'; import { useListArtifact } from '../../../../../hooks/artifacts'; -import { POLICY_ARTIFACT_LIST_LABELS } from './translations'; -import { EventFiltersPageLocation } from '../../../../event_filters/types'; -import { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; +import type { POLICY_ARTIFACT_LIST_LABELS } from './translations'; +import type { EventFiltersPageLocation } from '../../../../event_filters/types'; +import type { ArtifactListPageUrlParams } from '../../../../../components/artifact_list_page'; interface PolicyArtifactsListProps { policy: ImmutableObject; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/config_form/index.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/config_form/index.tsx index 6a5f7d187478d..23db0cd14bf07 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/config_form/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/config_form/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, ReactNode, memo, useContext } from 'react'; +import type { FC, ReactNode } from 'react'; +import React, { memo, useContext } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { @@ -21,7 +22,7 @@ import { } from '@elastic/eui'; import { ThemeContext } from 'styled-components'; -import { OperatingSystem } from '@kbn/securitysolution-utils'; +import type { OperatingSystem } from '@kbn/securitysolution-utils'; import { OS_TITLES } from '../../../../../common/translations'; const TITLES = { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/events_form/index.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/events_form/index.tsx index e64f480fd175d..a9300e749ec98 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/events_form/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/events_form/index.tsx @@ -20,7 +20,10 @@ import { } from '@elastic/eui'; import { OperatingSystem } from '@kbn/securitysolution-utils'; import { ThemeContext } from 'styled-components'; -import { PolicyOperatingSystem, UIPolicyConfig } from '../../../../../../../common/endpoint/types'; +import type { + PolicyOperatingSystem, + UIPolicyConfig, +} from '../../../../../../../common/endpoint/types'; import { ConfigForm, ConfigFormHeading } from '../config_form'; const OPERATING_SYSTEM_TO_TEST_SUBJ: { [K in OperatingSystem]: string } = { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/policy_endpoint_count.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/policy_endpoint_count.tsx index b8b2f98173f21..7c0e3d470ec10 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/components/policy_endpoint_count.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/components/policy_endpoint_count.tsx @@ -6,7 +6,8 @@ */ import React, { memo, useMemo } from 'react'; -import { EuiLink, EuiLinkAnchorProps, EuiText } from '@elastic/eui'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useLocation } from 'react-router-dom'; import { useAppUrl } from '../../../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_custom_assets_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_custom_assets_extension.tsx index f15382d983f99..d47828957c6c3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_custom_assets_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_custom_assets_extension.tsx @@ -8,11 +8,8 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { - CustomAssetsAccordionProps, - CustomAssetsAccordion, - PackageAssetsComponent, -} from '@kbn/fleet-plugin/public'; +import type { CustomAssetsAccordionProps, PackageAssetsComponent } from '@kbn/fleet-plugin/public'; +import { CustomAssetsAccordion } from '@kbn/fleet-plugin/public'; import { useKibana } from '../../../../../common/lib/kibana'; import { APP_PATH } from '../../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx index 4a4364f8d7d03..28d8826a30cc3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.test.tsx @@ -11,7 +11,7 @@ import { I18nProvider } from '@kbn/i18n-react'; import { ExceptionItemsSummary } from './exception_items_summary'; import * as reactTestingLibrary from '@testing-library/react'; import { getMockTheme } from '../../../../../../../common/lib/kibana/kibana_react.mock'; -import { GetExceptionSummaryResponse } from '../../../../../../../../common/endpoint/types'; +import type { GetExceptionSummaryResponse } from '../../../../../../../../common/endpoint/types'; const mockTheme = getMockTheme({ eui: { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.tsx index 45cd14c390e38..188bead260b06 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/exception_items_summary.tsx @@ -5,11 +5,13 @@ * 2.0. */ -import React, { FC, memo, useCallback } from 'react'; -import { EuiBadge, EuiBadgeProps, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import type { FC } from 'react'; +import React, { memo, useCallback } from 'react'; +import type { EuiBadgeProps } from '@elastic/eui'; +import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from 'styled-components'; -import { GetExceptionSummaryResponse } from '../../../../../../../../common/endpoint/types'; +import type { GetExceptionSummaryResponse } from '../../../../../../../../common/endpoint/types'; const SUMMARY_KEYS: Readonly> = [ 'windows', diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.test.tsx index 16b5e9f975e22..ec66721de3f8b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.test.tsx @@ -7,10 +7,8 @@ import { act, waitFor } from '@testing-library/react'; import React from 'react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../../common/mock/endpoint'; import { getEventFiltersListPath } from '../../../../../../common/routing'; import { eventFiltersListQueryHttpMock } from '../../../../../event_filters/test_utils'; import { getEndpointPrivilegesInitialStateMock } from '../../../../../../../common/components/user_privileges/endpoint/mocks'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.tsx index 4f965b54d7bbf..ee1b29ce51582 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_artifacts_card.tsx @@ -9,16 +9,17 @@ import React, { memo, useMemo } from 'react'; import { EuiPanel, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { PackageCustomExtensionComponentProps, pagePathGetters } from '@kbn/fleet-plugin/public'; +import type { PackageCustomExtensionComponentProps } from '@kbn/fleet-plugin/public'; +import { pagePathGetters } from '@kbn/fleet-plugin/public'; import { INTEGRATIONS_PLUGIN_ID } from '@kbn/fleet-plugin/common'; -import { ListPageRouteState } from '../../../../../../../../common/endpoint/types'; +import type { ListPageRouteState } from '../../../../../../../../common/endpoint/types'; import { useToasts } from '../../../../../../../common/lib/kibana'; import { useAppUrl } from '../../../../../../../common/lib/kibana/hooks'; import { LinkWithIcon } from './link_with_icon'; import { ExceptionItemsSummary } from './exception_items_summary'; import { StyledEuiFlexGridGroup, StyledEuiFlexGridItem } from './styled_components'; import { useSummaryArtifact } from '../../../../../../hooks/artifacts'; -import { ExceptionsListApiClient } from '../../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../../services/exceptions_list/exceptions_list_api_client'; import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator'; const ARTIFACTS_LABELS = { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.test.tsx index b8724850e1188..2e662b393c92f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.test.tsx @@ -8,16 +8,14 @@ import React from 'react'; import { waitFor, act } from '@testing-library/react'; import * as reactTestingLibrary from '@testing-library/react'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../../../common/mock/endpoint'; import { eventFiltersListQueryHttpMock } from '../../../../../event_filters/test_utils'; import { FleetIntegrationArtifactsCard } from './fleet_integration_artifacts_card'; import { EndpointDocGenerator } from '../../../../../../../../common/endpoint/generate_data'; import { getPolicyEventFiltersPath } from '../../../../../../common/routing'; -import { PolicyData } from '../../../../../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../../../../../common/endpoint/types'; import { getSummaryExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_summary_schema.mock'; import { EventFiltersApiClient } from '../../../../../event_filters/service/api_client'; import { SEARCHABLE_FIELDS } from '../../../../../event_filters/constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.tsx index 378c1e5cbd146..b627db37e5245 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/fleet_integration_artifacts_card.tsx @@ -11,13 +11,13 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { memo, useMemo } from 'react'; import { INTEGRATIONS_PLUGIN_ID } from '@kbn/fleet-plugin/common'; import { pagePathGetters } from '@kbn/fleet-plugin/public'; -import { PolicyDetailsRouteState } from '../../../../../../../../common/endpoint/types'; +import type { PolicyDetailsRouteState } from '../../../../../../../../common/endpoint/types'; import { useAppUrl, useToasts } from '../../../../../../../common/lib/kibana'; import { ExceptionItemsSummary } from './exception_items_summary'; import { LinkWithIcon } from './link_with_icon'; import { StyledEuiFlexItem } from './styled_components'; import { useSummaryArtifact } from '../../../../../../hooks/artifacts'; -import { ExceptionsListApiClient } from '../../../../../../services/exceptions_list/exceptions_list_api_client'; +import type { ExceptionsListApiClient } from '../../../../../../services/exceptions_list/exceptions_list_api_client'; import { useTestIdGenerator } from '../../../../../../hooks/use_test_id_generator'; const ARTIFACTS_LABELS = { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/link_with_icon.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/link_with_icon.tsx index 0da81029c2517..f051db19911e2 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/link_with_icon.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/components/link_with_icon.tsx @@ -6,12 +6,11 @@ */ import styled from 'styled-components'; -import React, { FC, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; import { EuiIcon } from '@elastic/eui'; -import { - LinkToApp, - LinkToAppProps, -} from '../../../../../../../common/components/endpoint/link_to_app'; +import type { LinkToAppProps } from '../../../../../../../common/components/endpoint/link_to_app'; +import { LinkToApp } from '../../../../../../../common/components/endpoint/link_to_app'; const LinkLabel = styled.span<{ size?: 'm' | 'l'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.test.tsx index 45aa397161039..4c8bfac78d5d3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { AppContextTestRender } from '../../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { createFleetContextRendererMock, generateFleetPackageInfo } from '../mocks'; import { EndpointPackageCustomExtension } from './endpoint_package_custom_extension'; import { useEndpointPrivileges as _useEndpointPrivileges } from '../../../../../../common/components/user_privileges/endpoint/use_endpoint_privileges'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.tsx index f1af7c3505297..479b2290a1b00 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_package_custom_extension/endpoint_package_custom_extension.tsx @@ -7,7 +7,7 @@ import React, { memo, useMemo } from 'react'; import { EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; -import { PackageCustomExtensionComponentProps } from '@kbn/fleet-plugin/public'; +import type { PackageCustomExtensionComponentProps } from '@kbn/fleet-plugin/public'; import { useHttp } from '../../../../../../common/lib/kibana'; import { useCanSeeHostIsolationExceptionsMenu } from '../../../../host_isolation_exceptions/view/hooks'; import { TrustedAppsApiClient } from '../../../../trusted_apps/service/api_client'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension.tsx index 318dcf0f672e2..ece9464d0c34d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_create_extension.tsx @@ -8,7 +8,7 @@ import React, { memo, useEffect } from 'react'; import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { PackagePolicyCreateExtensionComponentProps } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyCreateExtensionComponentProps } from '@kbn/fleet-plugin/public'; /** * Exports Endpoint-specific package policy instructions diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.test.tsx index 71545a17f9aa1..0c56c7c8c8339 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.test.tsx @@ -7,13 +7,13 @@ import React from 'react'; import { waitFor } from '@testing-library/react'; -import { PackagePolicy, NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy, NewPackagePolicy } from '@kbn/fleet-plugin/common'; import { useEndpointPrivileges } from '../../../../../common/components/user_privileges/endpoint/use_endpoint_privileges'; import { useUserPrivileges } from '../../../../../common/components/user_privileges'; import { getEndpointPrivilegesInitialStateMock } from '../../../../../common/components/user_privileges/endpoint/mocks'; import { composeHttpHandlerMocks } from '../../../../../common/mock/endpoint/http_handler_mock_factory'; -import { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; import { fleetGetAgentStatusHttpMock, fleetGetEndpointPackagePolicyHttpMock, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.tsx index 9ac612aec05ed..6e0a1ffe47b79 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_edit_extension.tsx @@ -10,7 +10,7 @@ import { EuiCallOut, EuiLoadingSpinner, EuiSpacer, EuiText } from '@elastic/eui' import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useDispatch } from 'react-redux'; -import { +import type { PackagePolicyEditExtensionComponentProps, NewPackagePolicy, } from '@kbn/fleet-plugin/public'; @@ -23,7 +23,7 @@ import { getPolicyEventFiltersPath, } from '../../../../common/routing'; import { PolicyDetailsForm } from '../policy_details_form'; -import { AppAction } from '../../../../../common/store/actions'; +import type { AppAction } from '../../../../../common/store/actions'; import { usePolicyDetailsSelector } from '../policy_hooks'; import { apiError, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_response_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_response_extension.tsx index 2e952e5332f5c..26c894edfa47d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_response_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/endpoint_policy_response_extension.tsx @@ -6,7 +6,7 @@ */ import React, { memo } from 'react'; -import { PackagePolicyResponseExtensionComponentProps } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyResponseExtensionComponentProps } from '@kbn/fleet-plugin/public'; import { PolicyResponseWrapper } from '../../../../components/policy_response'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_package_custom_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_package_custom_extension.tsx index 56a8144d08a25..38d3aad8a6d93 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_package_custom_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_package_custom_extension.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { lazy } from 'react'; -import { PackageCustomExtensionComponent } from '@kbn/fleet-plugin/public'; -import { StartPlugins } from '../../../../../types'; +import type { PackageCustomExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { StartPlugins } from '../../../../../types'; export const getLazyEndpointPackageCustomExtension = ( coreStart: CoreStart, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_create_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_create_extension.tsx index eb4a9b98084dc..840abd074eb5c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_create_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_create_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; export const LazyEndpointPolicyCreateExtension = lazy( async () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_edit_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_edit_extension.tsx index 23fe4a959cfc5..191df9aec0fb4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_edit_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_edit_extension.tsx @@ -6,12 +6,12 @@ */ import { lazy } from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { +import type { CoreStart } from '@kbn/core/public'; +import type { PackagePolicyEditExtensionComponent, PackagePolicyEditExtensionComponentProps, } from '@kbn/fleet-plugin/public'; -import { StartPlugins } from '../../../../../types'; +import type { StartPlugins } from '../../../../../types'; export const getLazyEndpointPolicyEditExtension = ( coreStart: CoreStart, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_response_extension.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_response_extension.tsx index 7e7725c7eab50..ea703478c5d53 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_response_extension.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_response_extension.tsx @@ -6,12 +6,12 @@ */ import { lazy } from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { +import type { CoreStart } from '@kbn/core/public'; +import type { PackagePolicyResponseExtensionComponent, PackagePolicyResponseExtensionComponentProps, } from '@kbn/fleet-plugin/public'; -import { StartPlugins } from '../../../../../types'; +import type { StartPlugins } from '../../../../../types'; export const getLazyEndpointPolicyResponseExtension = ( coreStart: CoreStart, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx index 21aa203a36f53..afb4b38c550b0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/mocks.tsx @@ -6,31 +6,27 @@ */ import React, { useEffect, useMemo } from 'react'; -import { Action, Reducer } from 'redux'; +import type { Action, Reducer } from 'redux'; +import type { RenderOptions } from '@testing-library/react'; // eslint-disable-next-line import/no-extraneous-dependencies -import { render as reactRender, RenderOptions } from '@testing-library/react'; +import { render as reactRender } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; import type { PackageInfo } from '@kbn/fleet-plugin/common/types'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { SecuritySolutionQueryClient } from '../../../../../common/containers/query_client/query_client_provider'; -import { - AppContextTestRender, - createAppRootMockRenderer, - UiRender, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender, UiRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { createFleetContextReduxStore } from './with_security_context/store'; -import { - allowedExperimentalValues, - ExperimentalFeatures, -} from '../../../../../../common/experimental_features'; -import { State } from '../../../../../common/store'; +import type { ExperimentalFeatures } from '../../../../../../common/experimental_features'; +import { allowedExperimentalValues } from '../../../../../../common/experimental_features'; +import type { State } from '../../../../../common/store'; import { mockGlobalState } from '../../../../../common/mock'; import { managementReducer } from '../../../../store/reducer'; import { appReducer } from '../../../../../common/store/app'; import { ExperimentalFeaturesService } from '../../../../../common/experimental_features_service'; import { RenderContextProviders } from './with_security_context/render_context_providers'; -import { AppAction } from '../../../../../common/store/actions'; +import type { AppAction } from '../../../../../common/store/actions'; // Defined a private custom reducer that reacts to an action that enables us to update the // store with new values for technical preview features/flags. Because the `action.type` is a `Symbol`, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/render_context_providers.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/render_context_providers.tsx index ec222de1713f0..c5e5b8f113e72 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/render_context_providers.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/render_context_providers.tsx @@ -5,16 +5,15 @@ * 2.0. */ -import React, { memo, PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { memo } from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; -import { Store } from 'redux'; -import { - ReactQueryClientProvider, - SecuritySolutionQueryClient, -} from '../../../../../../common/containers/query_client/query_client_provider'; +import type { Store } from 'redux'; +import type { SecuritySolutionQueryClient } from '../../../../../../common/containers/query_client/query_client_provider'; +import { ReactQueryClientProvider } from '../../../../../../common/containers/query_client/query_client_provider'; import { SecuritySolutionStartDependenciesContext } from '../../../../../../common/components/user_privileges/endpoint/security_solution_start_dependencies'; import { CurrentLicense } from '../../../../../../common/components/current_license'; -import { StartPlugins } from '../../../../../../types'; +import type { StartPlugins } from '../../../../../../types'; export type RenderContextProvidersProps = PropsWithChildren<{ store: Store; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/store.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/store.ts index 7524dce744204..79d92c130282b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/store.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/store.ts @@ -5,17 +5,9 @@ * 2.0. */ -import { - applyMiddleware, - combineReducers, - compose, - createStore, - Dispatch, - Middleware, - PreloadedState, - ReducersMapObject, -} from 'redux'; -import { CoreStart } from '@kbn/core/public'; +import type { Dispatch, Middleware, PreloadedState, ReducersMapObject } from 'redux'; +import { applyMiddleware, combineReducers, compose, createStore } from 'redux'; +import type { CoreStart } from '@kbn/core/public'; import { managementReducer } from '../../../../../store/reducer'; import { appReducer } from '../../../../../../common/store/app'; import { ExperimentalFeaturesService } from '../../../../../../common/experimental_features_service'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/with_security_context.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/with_security_context.tsx index 91355c0edc2e8..53eb5f112c487 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/with_security_context.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/ingest_manager_integration/with_security_context/with_security_context.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { ComponentType, memo } from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { StartPlugins } from '../../../../../../types'; +import type { ComponentType } from 'react'; +import React, { memo } from 'react'; +import type { CoreStart } from '@kbn/core/public'; +import type { StartPlugins } from '../../../../../../types'; import { createFleetContextReduxStore } from './store'; import { RenderContextProviders } from './render_context_providers'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx index 95395ac8f0b21..227e4eb3a78cd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.test.tsx @@ -11,8 +11,8 @@ import React from 'react'; import { AGENT_API_ROUTES, PACKAGE_POLICY_API_ROOT } from '@kbn/fleet-plugin/common'; import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; import { useUserPrivileges } from '../../../../common/components/user_privileges'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; import { - AppContextTestRender, createAppRootMockRenderer, resetReactDomCreatePortalMock, } from '../../../../common/mock/endpoint'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx index 210b32fcaad65..de3a5ab32534b 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_details.tsx @@ -14,11 +14,9 @@ import { policyDetails, agentStatusSummary, apiError } from '../store/policy_det import { AgentsSummary } from './agents_summary'; import { PolicyTabs } from './tabs'; import { AdministrationListPage } from '../../../components/administration_list_page'; -import { - BackToExternalAppButton, - BackToExternalAppButtonProps, -} from '../../../components/back_to_external_app_button/back_to_external_app_button'; -import { PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; +import type { BackToExternalAppButtonProps } from '../../../components/back_to_external_app_button/back_to_external_app_button'; +import { BackToExternalAppButton } from '../../../components/back_to_external_app_button/back_to_external_app_button'; +import type { PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; import { getEndpointListPath, getPoliciesPath } from '../../../common/routing'; import { useAppUrl } from '../../../../common/lib/kibana'; import { APP_UI_ID } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.test.tsx index 8b9555b912daa..f77ff8cfe6af3 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.test.tsx @@ -11,8 +11,8 @@ import { mount } from 'enzyme'; import { PolicyFormLayout } from './policy_form_layout'; import '../../../../../../common/mock/match_media'; import { EndpointDocGenerator } from '../../../../../../../common/endpoint/generate_data'; +import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { - AppContextTestRender, createAppRootMockRenderer, resetReactDomCreatePortalMock, } from '../../../../../../common/mock/endpoint'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx index 81a29e8a528fd..46936d2484db4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/policy_form_layout.tsx @@ -19,7 +19,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; -import { ApplicationStart } from '@kbn/core/public'; +import type { ApplicationStart } from '@kbn/core/public'; import { toMountPoint } from '@kbn/kibana-react-plugin/public'; import { usePolicyDetailsSelector } from '../../policy_hooks'; import { @@ -30,13 +30,13 @@ import { } from '../../../store/policy_details/selectors'; import { useToasts, useKibana } from '../../../../../../common/lib/kibana'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { AppAction } from '../../../../../../common/store/actions'; import { SpyRoute } from '../../../../../../common/utils/route/spy_routes'; import { SecurityPageName } from '../../../../../../app/types'; import { getEndpointListPath } from '../../../../../common/routing'; import { useNavigateToAppEventHandler } from '../../../../../../common/hooks/endpoint/use_navigate_to_app_event_handler'; import { APP_UI_ID } from '../../../../../../../common/constants'; -import { PolicyDetailsRouteState } from '../../../../../../../common/endpoint/types'; +import type { PolicyDetailsRouteState } from '../../../../../../../common/endpoint/types'; import { SecuritySolutionPageWrapper } from '../../../../../../common/components/page_wrapper'; import { PolicyDetailsForm } from '../../policy_details_form'; import { ConfirmUpdate } from './policy_form_confirm_update'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_radio.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_radio.tsx index fe698fdb727a5..b875f755b258e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_radio.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_radio.tsx @@ -9,15 +9,12 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { cloneDeep } from 'lodash'; import { htmlIdGenerator, EuiRadio } from '@elastic/eui'; -import { - ImmutableArray, - ProtectionModes, - UIPolicyConfig, -} from '../../../../../../../common/endpoint/types'; -import { MacPolicyProtection, LinuxPolicyProtection, PolicyProtection } from '../../../types'; +import type { ImmutableArray, UIPolicyConfig } from '../../../../../../../common/endpoint/types'; +import { ProtectionModes } from '../../../../../../../common/endpoint/types'; +import type { MacPolicyProtection, LinuxPolicyProtection, PolicyProtection } from '../../../types'; import { usePolicyDetailsSelector } from '../../policy_hooks'; import { policyConfig } from '../../../store/policy_details/selectors'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { AppAction } from '../../../../../../common/store/actions'; import { useLicense } from '../../../../../../common/hooks/use_license'; export const ProtectionRadio = React.memo( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_switch.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_switch.tsx index b49553f26bcc6..75d79439a14fc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_switch.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/protection_switch.tsx @@ -13,14 +13,14 @@ import { cloneDeep } from 'lodash'; import { useLicense } from '../../../../../../common/hooks/use_license'; import { policyConfig } from '../../../store/policy_details/selectors'; import { usePolicyDetailsSelector } from '../../policy_hooks'; -import { AppAction } from '../../../../../../common/store/actions'; -import { +import type { AppAction } from '../../../../../../common/store/actions'; +import type { ImmutableArray, - ProtectionModes, UIPolicyConfig, AdditionalOnSwitchChangeParams, } from '../../../../../../../common/endpoint/types'; -import { PolicyProtection, MacPolicyProtection, LinuxPolicyProtection } from '../../../types'; +import { ProtectionModes } from '../../../../../../../common/endpoint/types'; +import type { PolicyProtection, MacPolicyProtection, LinuxPolicyProtection } from '../../../types'; export const ProtectionSwitch = React.memo( ({ diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/radio_buttons.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/radio_buttons.tsx index bcb2c73eb8f1e..bb07f4e28cf1e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/radio_buttons.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/radio_buttons.tsx @@ -10,13 +10,13 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; import { EuiSpacer, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; -import { +import type { Immutable, ImmutableArray, - ProtectionModes, UIPolicyConfig, } from '../../../../../../../common/endpoint/types'; -import { PolicyProtection } from '../../../types'; +import { ProtectionModes } from '../../../../../../../common/endpoint/types'; +import type { PolicyProtection } from '../../../types'; import { ConfigFormHeading } from '../../components/config_form'; import { ProtectionRadio } from './protection_radio'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/user_notification.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/user_notification.tsx index 90e3cd6658d0c..2a9dd8bffb6d9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/user_notification.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/components/user_notification.tsx @@ -19,16 +19,13 @@ import { EuiText, EuiTextArea, } from '@elastic/eui'; -import { - ImmutableArray, - ProtectionModes, - UIPolicyConfig, -} from '../../../../../../../common/endpoint/types'; -import { PolicyProtection, MacPolicyProtection, LinuxPolicyProtection } from '../../../types'; +import type { ImmutableArray, UIPolicyConfig } from '../../../../../../../common/endpoint/types'; +import { ProtectionModes } from '../../../../../../../common/endpoint/types'; +import type { PolicyProtection, MacPolicyProtection, LinuxPolicyProtection } from '../../../types'; import { ConfigFormHeading } from '../../components/config_form'; import { usePolicyDetailsSelector } from '../../policy_hooks'; import { policyConfig } from '../../../store/policy_details/selectors'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { AppAction } from '../../../../../../common/store/actions'; import { SupportedVersionNotice } from './supported_version'; export const UserNotification = React.memo( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx index 71e7dba966484..af447b0e72205 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/linux.tsx @@ -12,11 +12,8 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { policyConfig } from '../../../store/policy_details/selectors'; import { setIn } from '../../../models/policy_details_config'; import { usePolicyDetailsSelector } from '../../policy_hooks'; -import { - EventFormOption, - EventsForm, - SupplementalEventFormOption, -} from '../../components/events_form'; +import type { EventFormOption, SupplementalEventFormOption } from '../../components/events_form'; +import { EventsForm } from '../../components/events_form'; const OPTIONS: ReadonlyArray> = [ { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/mac.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/mac.tsx index 8bc1f0fcaf17c..7682a91daafcc 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/mac.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/mac.tsx @@ -12,7 +12,8 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { policyConfig } from '../../../store/policy_details/selectors'; import { setIn } from '../../../models/policy_details_config'; import { usePolicyDetailsSelector } from '../../policy_hooks'; -import { EventFormOption, EventsForm } from '../../components/events_form'; +import type { EventFormOption } from '../../components/events_form'; +import { EventsForm } from '../../components/events_form'; const OPTIONS: ReadonlyArray> = [ { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/windows.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/windows.tsx index 4ca72da6abfdf..4be1f97624ba2 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/windows.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/events/windows.tsx @@ -12,7 +12,8 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { policyConfig } from '../../../store/policy_details/selectors'; import { setIn } from '../../../models/policy_details_config'; import { usePolicyDetailsSelector } from '../../policy_hooks'; -import { EventFormOption, EventsForm } from '../../components/events_form'; +import type { EventFormOption } from '../../components/events_form'; +import { EventsForm } from '../../components/events_form'; const OPTIONS: ReadonlyArray> = [ { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/behavior.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/behavior.tsx index 4d177c5cf6d30..1e9efefe4ac60 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/behavior.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/behavior.tsx @@ -10,8 +10,9 @@ import { i18n } from '@kbn/i18n'; import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { Immutable, PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; -import { BehaviorProtectionOSes } from '../../../types'; +import type { Immutable } from '../../../../../../../common/endpoint/types'; +import { PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; +import type { BehaviorProtectionOSes } from '../../../types'; import { ConfigForm } from '../../components/config_form'; import { RadioButtons } from '../components/radio_buttons'; import { UserNotification } from '../components/user_notification'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx index 880da78221e13..00d4ddf2197c6 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/malware.tsx @@ -21,13 +21,13 @@ import { useDispatch } from 'react-redux'; import { cloneDeep } from 'lodash'; import { APP_UI_ID } from '../../../../../../../common/constants'; import { SecurityPageName } from '../../../../../../app/types'; -import { +import type { Immutable, - PolicyOperatingSystem, AdditionalOnSwitchChangeParams, UIPolicyConfig, } from '../../../../../../../common/endpoint/types'; -import { MalwareProtectionOSes } from '../../../types'; +import { PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; +import type { MalwareProtectionOSes } from '../../../types'; import { ConfigForm } from '../../components/config_form'; import { LinkToApp } from '../../../../../../common/components/endpoint/link_to_app'; import { useLicense } from '../../../../../../common/hooks/use_license'; @@ -36,7 +36,7 @@ import { UserNotification } from '../components/user_notification'; import { ProtectionSwitch } from '../components/protection_switch'; import { policyConfig } from '../../../store/policy_details/selectors'; import { usePolicyDetailsSelector } from '../../policy_hooks'; -import { AppAction } from '../../../../../../common/store/actions'; +import type { AppAction } from '../../../../../../common/store/actions'; /** The Malware Protections form for policy details * which will configure for all relevant OSes. diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/memory.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/memory.tsx index ae3b2f7a1abc6..5f9fec17d1749 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/memory.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/memory.tsx @@ -12,8 +12,9 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { OperatingSystem } from '@kbn/securitysolution-utils'; import { APP_UI_ID } from '../../../../../../../common/constants'; import { SecurityPageName } from '../../../../../../app/types'; -import { Immutable, PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; -import { MemoryProtectionOSes } from '../../../types'; +import type { Immutable } from '../../../../../../../common/endpoint/types'; +import { PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; +import type { MemoryProtectionOSes } from '../../../types'; import { ConfigForm } from '../../components/config_form'; import { LinkToApp } from '../../../../../../common/components/endpoint/link_to_app'; import { RadioButtons } from '../components/radio_buttons'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/ransomware.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/ransomware.tsx index da1b2e06b3a09..8b4cf8d4d4877 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/ransomware.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_forms/protections/ransomware.tsx @@ -12,8 +12,9 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui'; import { OperatingSystem } from '@kbn/securitysolution-utils'; import { APP_UI_ID } from '../../../../../../../common/constants'; import { SecurityPageName } from '../../../../../../app/types'; -import { Immutable, PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; -import { RansomwareProtectionOSes } from '../../../types'; +import type { Immutable } from '../../../../../../../common/endpoint/types'; +import { PolicyOperatingSystem } from '../../../../../../../common/endpoint/types'; +import type { RansomwareProtectionOSes } from '../../../types'; import { ConfigForm } from '../../components/config_form'; import { LinkToApp } from '../../../../../../common/components/endpoint/link_to_app'; import { RadioButtons } from '../components/radio_buttons'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts index 3b4452606f968..133089481d529 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_hooks.ts @@ -13,8 +13,8 @@ import { ENDPOINT_EVENT_FILTERS_LIST_ID, ENDPOINT_TRUSTED_APPS_LIST_ID, } from '@kbn/securitysolution-list-constants'; -import { PolicyDetailsArtifactsPageLocation, PolicyDetailsState } from '../types'; -import { State } from '../../../../common/store'; +import type { PolicyDetailsArtifactsPageLocation, PolicyDetailsState } from '../types'; +import type { State } from '../../../../common/store'; import { MANAGEMENT_STORE_GLOBAL_NAMESPACE, MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx index 6d9ade15971eb..122ef57fa4a3e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.test.tsx @@ -7,12 +7,13 @@ import React from 'react'; import { act, waitFor, fireEvent } from '@testing-library/react'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { sendGetEndpointSpecificPackagePolicies } from '../../../services/policies/policies'; import { sendGetEndpointSpecificPackagePoliciesMock } from '../../../services/policies/test_mock_utils'; import { PolicyList } from './policy_list'; import { sendGetAgentPolicyList } from '../../../services/policies/ingest'; -import { GetPolicyListResponse } from '../types'; +import type { GetPolicyListResponse } from '../types'; import { getEndpointListPath, getPoliciesPath } from '../../../common/routing'; import { APP_UI_ID } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index b2c4d1a92f980..43a7223260f28 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -6,6 +6,7 @@ */ import React, { memo, useCallback, useMemo } from 'react'; +import type { CriteriaWithPagination } from '@elastic/eui'; import { EuiBasicTable, EuiText, @@ -14,17 +15,17 @@ import { EuiFlexGroup, EuiFlexItem, EuiToolTip, - CriteriaWithPagination, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { useLocation } from 'react-router-dom'; -import { AgentPolicy } from '@kbn/fleet-plugin/common'; -import { CreatePackagePolicyRouteState, pagePathGetters } from '@kbn/fleet-plugin/public'; +import type { AgentPolicy } from '@kbn/fleet-plugin/common'; +import type { CreatePackagePolicyRouteState } from '@kbn/fleet-plugin/public'; +import { pagePathGetters } from '@kbn/fleet-plugin/public'; import { AdministrationListPage } from '../../../components/administration_list_page'; import { FormattedDate } from '../../../../common/components/formatted_date'; import { EndpointPolicyLink } from '../../../components/endpoint_policy_link'; -import { PolicyData, PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; +import type { PolicyData, PolicyDetailsRouteState } from '../../../../../common/endpoint/types'; import { useUrlPagination } from '../../../hooks/use_url_pagination'; import { useGetAgentCountForPolicy, diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/blocklists_translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/blocklists_translations.ts index bf695c92b51ff..4222029cd12fa 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/blocklists_translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/blocklists_translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_BLOCKLISTS_LABELS = Object.freeze({ deleteModalTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/event_filters_translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/event_filters_translations.ts index 29b731a1eee56..8d9f5863fea31 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/event_filters_translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/event_filters_translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_EVENT_FILTERS_LABELS = Object.freeze({ deleteModalTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/host_isolation_exceptions_translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/host_isolation_exceptions_translations.ts index 2df0d18ac03d4..a6066b4df29b9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/host_isolation_exceptions_translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/host_isolation_exceptions_translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_HOST_ISOLATION_EXCEPTIONS_LABELS = Object.freeze({ deleteModalTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/policy_tabs.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/policy_tabs.tsx index f81b55b5e8a31..7449a0c81afb4 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/policy_tabs.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/policy_tabs.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiSpacer, EuiTabbedContent, EuiTabbedContentTab } from '@elastic/eui'; +import type { EuiTabbedContentTab } from '@elastic/eui'; +import { EuiSpacer, EuiTabbedContent } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useEffect, useMemo } from 'react'; @@ -49,7 +50,7 @@ import { SEARCHABLE_FIELDS as TRUSTED_APPS_SEARCHABLE_FIELDS } from '../../../tr import { SEARCHABLE_FIELDS as EVENT_FILTERS_SEARCHABLE_FIELDS } from '../../../event_filters/constants'; import { SEARCHABLE_FIELDS as HOST_ISOLATION_EXCEPTIONS_SEARCHABLE_FIELDS } from '../../../host_isolation_exceptions/constants'; import { SEARCHABLE_FIELDS as BLOCKLISTS_SEARCHABLE_FIELDS } from '../../../blocklist/constants'; -import { PolicyDetailsRouteState } from '../../../../../../common/endpoint/types'; +import type { PolicyDetailsRouteState } from '../../../../../../common/endpoint/types'; import { useListArtifact } from '../../../../hooks/artifacts'; const enum PolicyTabKeys { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/trusted_apps_translations.ts b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/trusted_apps_translations.ts index b990c2f9fc26c..18a982bd7fa95 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/trusted_apps_translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/tabs/trusted_apps_translations.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; export const POLICY_ARTIFACT_TRUSTED_APPS_LABELS = Object.freeze({ deleteModalTitle: i18n.translate( diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts index c13539426cff9..b568cba8010cf 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/constants.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - CreateExceptionListSchema, - ExceptionListTypeEnum, -} from '@kbn/securitysolution-io-ts-list-types'; +import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_TRUSTED_APPS_LIST_DESCRIPTION, ENDPOINT_TRUSTED_APPS_LIST_ID, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts index e66c16717e428..9ace94955d30f 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/api_client.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { +import type { CreateExceptionListItemSchema, ExceptionListItemSchema, UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_TRUSTED_APPS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; -import { ConditionEntry } from '../../../../../common/endpoint/types'; +import type { HttpStart } from '@kbn/core/public'; +import type { ConditionEntry } from '../../../../../common/endpoint/types'; import { conditionEntriesToEntries, entriesToConditionEntries, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/mappers.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/mappers.ts index fda0dde4c473a..791df4cd130bd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/mappers.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/service/mappers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CreateExceptionListItemSchema, ExceptionListItemSchema, OsType, @@ -13,7 +13,7 @@ import { } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_TRUSTED_APPS_LIST_ID } from '@kbn/securitysolution-list-constants'; import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; -import { +import type { EffectScope, NewTrustedApp, TrustedApp, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/state/type_guards.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/state/type_guards.ts index 239255b641bf4..082435817d43d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/state/type_guards.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/state/type_guards.ts @@ -6,7 +6,7 @@ */ import { ConditionEntryField } from '@kbn/securitysolution-utils'; -import { +import type { TrustedAppConditionEntry, MacosLinuxConditionEntry, WindowsConditionEntry, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.test.tsx index 8d20974249cce..78c36c782d08c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.test.tsx @@ -9,10 +9,10 @@ import { shallow, mount } from 'enzyme'; import React from 'react'; import { keys } from 'lodash'; import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; -import { TrustedAppConditionEntry } from '../../../../../../../common/endpoint/types'; +import type { TrustedAppConditionEntry } from '../../../../../../../common/endpoint/types'; import { ConditionEntryInput } from '.'; -import { EuiSuperSelectProps } from '@elastic/eui'; +import type { EuiSuperSelectProps } from '@elastic/eui'; let onRemoveMock: jest.Mock; let onChangeMock: jest.Mock; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.tsx index 9ff55560f7c52..6149d501a16a9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_entry_input/index.tsx @@ -5,22 +5,15 @@ * 2.0. */ -import React, { ChangeEventHandler, memo, useCallback, useMemo, useState } from 'react'; +import type { ChangeEventHandler } from 'react'; +import React, { memo, useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; -import { - EuiButtonIcon, - EuiFieldText, - EuiFormRow, - EuiSuperSelect, - EuiSuperSelectOption, - EuiText, -} from '@elastic/eui'; +import type { EuiSuperSelectOption } from '@elastic/eui'; +import { EuiButtonIcon, EuiFieldText, EuiFormRow, EuiSuperSelect, EuiText } from '@elastic/eui'; import { ConditionEntryField, OperatingSystem } from '@kbn/securitysolution-utils'; -import { - TrustedAppConditionEntry, - OperatorFieldIds, -} from '../../../../../../../common/endpoint/types'; +import type { TrustedAppConditionEntry } from '../../../../../../../common/endpoint/types'; +import { OperatorFieldIds } from '../../../../../../../common/endpoint/types'; import { CONDITION_FIELD_DESCRIPTION, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_group/index.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_group/index.tsx index 7cf9d74592a29..687299b98bf7c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_group/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/condition_group/index.tsx @@ -9,10 +9,11 @@ import React, { memo } from 'react'; import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiHideFor, EuiSpacer } from '@elastic/eui'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; -import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { TrustedAppConditionEntry } from '../../../../../../../common/endpoint/types'; +import type { OperatingSystem } from '@kbn/securitysolution-utils'; +import type { TrustedAppConditionEntry } from '../../../../../../../common/endpoint/types'; import { AndOrBadge } from '../../../../../../common/components/and_or_badge'; -import { ConditionEntryInput, ConditionEntryInputProps } from '../condition_entry_input'; +import type { ConditionEntryInputProps } from '../condition_entry_input'; +import { ConditionEntryInput } from '../condition_entry_input'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; const ConditionGroupFlexGroup = styled(EuiFlexGroup)` diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx index dca86557f6309..41bc5f905d1e9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx @@ -8,22 +8,17 @@ import React from 'react'; import { screen, cleanup, act, fireEvent, getByTestId } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { - TrustedAppEntryTypes, - OperatingSystem, - ConditionEntryField, -} from '@kbn/securitysolution-utils'; +import type { TrustedAppEntryTypes } from '@kbn/securitysolution-utils'; +import { OperatingSystem, ConditionEntryField } from '@kbn/securitysolution-utils'; import { ENDPOINT_TRUSTED_APPS_LIST_ID } from '@kbn/securitysolution-list-constants'; import { TrustedAppsForm } from './form'; -import { +import type { ArtifactFormComponentOnChangeCallbackProps, ArtifactFormComponentProps, } from '../../../../components/artifact_list_page'; -import { - AppContextTestRender, - createAppRootMockRenderer, -} from '../../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../../common/mock/endpoint'; import { INPUT_ERRORS } from '../translations'; import { licenseService } from '../../../../../common/hooks/use_license'; import { forceHTMLElementOffsetWidth } from '../../../../components/effected_policy_select/test_utils'; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.tsx index 347f394aa03e8..333e0da92cceb 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.tsx @@ -5,30 +5,34 @@ * 2.0. */ -import React, { ChangeEventHandler, memo, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ChangeEventHandler } from 'react'; +import React, { memo, useCallback, useEffect, useMemo, useState } from 'react'; +import type { EuiSuperSelectOption } from '@elastic/eui'; import { EuiFieldText, EuiForm, EuiFormRow, EuiHorizontalRule, EuiSuperSelect, - EuiSuperSelectOption, EuiTextArea, EuiText, EuiTitle, EuiSpacer, } from '@elastic/eui'; +import type { AllConditionEntryFields, EntryTypes } from '@kbn/securitysolution-utils'; import { hasSimpleExecutableName, isPathValid, ConditionEntryField, OperatingSystem, - AllConditionEntryFields, - EntryTypes, } from '@kbn/securitysolution-utils'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { TrustedAppConditionEntry, NewTrustedApp } from '../../../../../../common/endpoint/types'; +import type { + TrustedAppConditionEntry, + NewTrustedApp, + PolicyData, +} from '../../../../../../common/endpoint/types'; import { isValidHash, getDuplicateFields, @@ -55,19 +59,17 @@ import { SELECT_OS_LABEL, } from '../translations'; import { OS_TITLES } from '../../../../common/translations'; -import { LogicalConditionBuilder, LogicalConditionBuilderProps } from './logical_condition'; +import type { LogicalConditionBuilderProps } from './logical_condition'; +import { LogicalConditionBuilder } from './logical_condition'; import { useTestIdGenerator } from '../../../../hooks/use_test_id_generator'; import { useLicense } from '../../../../../common/hooks/use_license'; -import { - EffectedPolicySelect, - EffectedPolicySelection, -} from '../../../../components/effected_policy_select'; +import type { EffectedPolicySelection } from '../../../../components/effected_policy_select'; +import { EffectedPolicySelect } from '../../../../components/effected_policy_select'; import { GLOBAL_ARTIFACT_TAG, BY_POLICY_ARTIFACT_TAG_PREFIX, } from '../../../../../../common/endpoint/service/artifacts/constants'; -import type { PolicyData } from '../../../../../../common/endpoint/types'; -import { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; +import type { ArtifactFormComponentProps } from '../../../../components/artifact_list_page'; import { isGlobalPolicyEffected } from '../../../../components/effected_policy_select/utils'; interface FieldValidationState { diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/logical_condition_builder.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/logical_condition_builder.tsx index 1e880c8c691d7..9ecaccfa3faa9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/logical_condition_builder.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/logical_condition_builder.tsx @@ -6,9 +6,11 @@ */ import React, { memo } from 'react'; -import { CommonProps, EuiText, EuiPanel } from '@elastic/eui'; +import type { CommonProps } from '@elastic/eui'; +import { EuiText, EuiPanel } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ConditionGroup, ConditionGroupProps } from '../condition_group'; +import type { ConditionGroupProps } from '../condition_group'; +import { ConditionGroup } from '../condition_group'; import { useTestIdGenerator } from '../../../../../hooks/use_test_id_generator'; export type LogicalConditionBuilderProps = CommonProps & ConditionGroupProps; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts index b5b92f3a686ea..d27b727c40a66 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/translations.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { ConditionEntryField } from '@kbn/securitysolution-utils'; -import { +import type { MacosLinuxConditionEntry, WindowsConditionEntry, OperatorFieldIds, diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx index 17313df2e839b..55992f5ffac03 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.test.tsx @@ -9,7 +9,8 @@ import { act, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; import { TRUSTED_APPS_PATH } from '../../../../../common/constants'; -import { AppContextTestRender, createAppRootMockRenderer } from '../../../../common/mock/endpoint'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../../common/mock/endpoint'; import { TrustedAppsList } from './trusted_apps_list'; import { exceptionsListAllHttpMocks } from '../../../mocks/exceptions_list_http_mocks'; import { SEARCHABLE_FIELDS } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx index 359e9d1aeb99d..acb4c4ae13bce 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/trusted_apps_list.tsx @@ -8,11 +8,12 @@ import React, { memo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocLinks } from '@kbn/doc-links'; +import type { DocLinks } from '@kbn/doc-links'; import { EuiLink } from '@elastic/eui'; import { useHttp } from '../../../../common/lib/kibana'; -import { ArtifactListPage, ArtifactListPageProps } from '../../../components/artifact_list_page'; +import type { ArtifactListPageProps } from '../../../components/artifact_list_page'; +import { ArtifactListPage } from '../../../components/artifact_list_page'; import { TrustedAppsApiClient } from '../service'; import { TrustedAppsForm } from './components/form'; import { SEARCHABLE_FIELDS } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/management/routes.tsx b/x-pack/plugins/security_solution/public/management/routes.tsx index b93d9592ab194..a13244b294b2e 100644 --- a/x-pack/plugins/security_solution/public/management/routes.tsx +++ b/x-pack/plugins/security_solution/public/management/routes.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { MANAGEMENT_PATH } from '../../common/constants'; import { ManagementContainer } from './pages'; -import { SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; import { CurrentLicense } from '../common/components/current_license'; /** diff --git a/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.test.ts b/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.test.ts index a8c6b0eda16a8..a0f217254079d 100644 --- a/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.test.ts +++ b/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CoreStart, HttpSetup } from '@kbn/core/public'; -import { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { CoreStart, HttpSetup } from '@kbn/core/public'; +import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; import { coreMock } from '@kbn/core/public/mocks'; import { ExceptionsListItemGenerator } from '../../../../common/endpoint/data_generators/exceptions_list_item_generator'; diff --git a/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.ts b/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.ts index 832a3248c5753..28c8e4a2fb99a 100644 --- a/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.ts +++ b/x-pack/plugins/security_solution/public/management/services/exceptions_list/exceptions_list_api_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CreateExceptionListItemSchema, CreateExceptionListSchema, ExceptionListItemSchema, @@ -15,7 +15,7 @@ import { UpdateExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { MANAGEMENT_DEFAULT_PAGE, MANAGEMENT_DEFAULT_PAGE_SIZE } from '../../common/constants'; /** diff --git a/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts b/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts index aa4aeafb096ff..955a340f66d96 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts @@ -6,11 +6,11 @@ */ import { useGetEndpointSecurityPackage } from './hooks'; -import { HttpFetchError, HttpSetup } from '@kbn/core/public'; +import type { HttpFetchError, HttpSetup } from '@kbn/core/public'; import { getFakeHttpService, renderQuery } from '../../hooks/test_utils'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { UseQueryOptions } from 'react-query'; -import { GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import type { UseQueryOptions } from 'react-query'; +import type { GetPackagesResponse } from '@kbn/fleet-plugin/common'; import { useHttp } from '../../../common/lib/kibana'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts index cf053128e5f37..ce1aaf0a98730 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts @@ -4,19 +4,17 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { QueryObserverResult, useQuery, UseQueryOptions } from 'react-query'; -import { HttpFetchError } from '@kbn/core/public'; -import { - AGENT_POLICY_SAVED_OBJECT_TYPE, - GetAgentPoliciesResponse, - GetPackagesResponse, -} from '@kbn/fleet-plugin/common'; +import type { QueryObserverResult, UseQueryOptions } from 'react-query'; +import { useQuery } from 'react-query'; +import type { HttpFetchError } from '@kbn/core/public'; +import type { GetAgentPoliciesResponse, GetPackagesResponse } from '@kbn/fleet-plugin/common'; +import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { useHttp } from '../../../common/lib/kibana'; import { MANAGEMENT_DEFAULT_PAGE_SIZE } from '../../common/constants'; import { sendGetAgentPolicyList, sendGetEndpointSecurityPackage } from './ingest'; -import { GetPolicyListResponse } from '../../pages/policy/types'; +import type { GetPolicyListResponse } from '../../pages/policy/types'; import { sendGetEndpointSpecificPackagePolicies } from './policies'; -import { ServerApiError } from '../../../common/types'; +import type { ServerApiError } from '../../../common/types'; export function useGetEndpointSpecificPolicies( { diff --git a/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts b/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts index 447984e1e1a3c..3fa2a14387c96 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HttpFetchOptions, HttpStart } from '@kbn/core/public'; -import { +import type { HttpFetchOptions, HttpStart } from '@kbn/core/public'; +import type { GetAgentStatusResponse, GetAgentsResponse, DeletePackagePoliciesResponse, @@ -15,8 +15,8 @@ import { GetAgentPoliciesRequest, GetAgentPoliciesResponse, } from '@kbn/fleet-plugin/common'; -import { NewPolicyData } from '../../../../common/endpoint/types'; -import { GetPolicyResponse, UpdatePolicyResponse } from '../../pages/policy/types'; +import type { NewPolicyData } from '../../../../common/endpoint/types'; +import type { GetPolicyResponse, UpdatePolicyResponse } from '../../pages/policy/types'; const INGEST_API_ROOT = `/api/fleet`; export const INGEST_API_PACKAGE_POLICIES = `${INGEST_API_ROOT}/package_policies`; diff --git a/x-pack/plugins/security_solution/public/management/services/policies/policies.ts b/x-pack/plugins/security_solution/public/management/services/policies/policies.ts index e78237c87827b..de700e20e8c40 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/policies.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/policies.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { HttpFetchOptions, HttpStart } from '@kbn/core/public'; -import { - GetPackagePoliciesRequest, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, -} from '@kbn/fleet-plugin/common'; -import { GetPolicyListResponse } from '../../pages/policy/types'; +import type { HttpFetchOptions, HttpStart } from '@kbn/core/public'; +import type { GetPackagePoliciesRequest } from '@kbn/fleet-plugin/common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import type { GetPolicyListResponse } from '../../pages/policy/types'; import { INGEST_API_PACKAGE_POLICIES } from './ingest'; /** diff --git a/x-pack/plugins/security_solution/public/management/services/policies/test_mock_utils.ts b/x-pack/plugins/security_solution/public/management/services/policies/test_mock_utils.ts index 354e6ed03eccd..b415fceedc0cd 100644 --- a/x-pack/plugins/security_solution/public/management/services/policies/test_mock_utils.ts +++ b/x-pack/plugins/security_solution/public/management/services/policies/test_mock_utils.ts @@ -5,7 +5,7 @@ * 2.0. */ import { FleetPackagePolicyGenerator } from '../../../../common/endpoint/data_generators/fleet_package_policy_generator'; -import { GetPolicyListResponse } from '../../pages/policy/types'; +import type { GetPolicyListResponse } from '../../pages/policy/types'; export const sendGetEndpointSpecificPackagePoliciesMock = async ( params: { diff --git a/x-pack/plugins/security_solution/public/management/state/async_resource_builders.ts b/x-pack/plugins/security_solution/public/management/state/async_resource_builders.ts index f23d3397be6ad..962241a0d5dda 100644 --- a/x-pack/plugins/security_solution/public/management/state/async_resource_builders.ts +++ b/x-pack/plugins/security_solution/public/management/state/async_resource_builders.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { +import type { FailedResourceState, LoadedResourceState, LoadingResourceState, StaleResourceState, UninitialisedResourceState, } from './async_resource_state'; -import { ServerApiError } from '../../common/types'; -import { Immutable } from '../../../common/endpoint/types'; +import type { ServerApiError } from '../../common/types'; +import type { Immutable } from '../../../common/endpoint/types'; export const createUninitialisedResourceState = (): UninitialisedResourceState => { return { type: 'UninitialisedResourceState' }; diff --git a/x-pack/plugins/security_solution/public/management/state/async_resource_state.test.ts b/x-pack/plugins/security_solution/public/management/state/async_resource_state.test.ts index f6542e82792fe..d03acf31c2d2c 100644 --- a/x-pack/plugins/security_solution/public/management/state/async_resource_state.test.ts +++ b/x-pack/plugins/security_solution/public/management/state/async_resource_state.test.ts @@ -5,11 +5,13 @@ * 2.0. */ -import { +import type { UninitialisedResourceState, LoadingResourceState, LoadedResourceState, FailedResourceState, +} from './async_resource_state'; +import { isUninitialisedResourceState, isLoadingResourceState, isLoadedResourceState, diff --git a/x-pack/plugins/security_solution/public/management/state/async_resource_state.ts b/x-pack/plugins/security_solution/public/management/state/async_resource_state.ts index ec8922da46191..e2d5b327ff1ed 100644 --- a/x-pack/plugins/security_solution/public/management/state/async_resource_state.ts +++ b/x-pack/plugins/security_solution/public/management/state/async_resource_state.ts @@ -15,8 +15,8 @@ * - update can fail due to multiple reasons and also needs to be communicated to the user */ -import { Immutable } from '../../../common/endpoint/types'; -import { ServerApiError } from '../../common/types'; +import type { Immutable } from '../../../common/endpoint/types'; +import type { ServerApiError } from '../../common/types'; /** * Data type to represent uninitialised state of asynchronous resource. diff --git a/x-pack/plugins/security_solution/public/management/store/middleware.ts b/x-pack/plugins/security_solution/public/management/store/middleware.ts index 475fe0bc9bb7c..c1dcd59c4269c 100644 --- a/x-pack/plugins/security_solution/public/management/store/middleware.ts +++ b/x-pack/plugins/security_solution/public/management/store/middleware.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - substateMiddlewareFactory, - SecuritySubPluginMiddlewareFactory, - State, -} from '../../common/store'; +import type { SecuritySubPluginMiddlewareFactory, State } from '../../common/store'; +import { substateMiddlewareFactory } from '../../common/store'; import { MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, MANAGEMENT_STORE_GLOBAL_NAMESPACE, diff --git a/x-pack/plugins/security_solution/public/management/store/reducer.ts b/x-pack/plugins/security_solution/public/management/store/reducer.ts index 678819a51d747..dbaefe3d2ccc5 100644 --- a/x-pack/plugins/security_solution/public/management/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/management/store/reducer.ts @@ -14,9 +14,9 @@ import { MANAGEMENT_STORE_ENDPOINTS_NAMESPACE, MANAGEMENT_STORE_POLICY_DETAILS_NAMESPACE, } from '../common/constants'; -import { ImmutableCombineReducers } from '../../common/store'; -import { Immutable } from '../../../common/endpoint/types'; -import { ManagementState } from '../types'; +import type { ImmutableCombineReducers } from '../../common/store'; +import type { Immutable } from '../../../common/endpoint/types'; +import type { ManagementState } from '../types'; import { endpointListReducer } from '../pages/endpoint_hosts/store/reducer'; import { initialEndpointPageState } from '../pages/endpoint_hosts/store/builders'; diff --git a/x-pack/plugins/security_solution/public/management/types.ts b/x-pack/plugins/security_solution/public/management/types.ts index f92c2d5fdf3e7..2658bd7a58b22 100644 --- a/x-pack/plugins/security_solution/public/management/types.ts +++ b/x-pack/plugins/security_solution/public/management/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { CombinedState } from 'redux'; -import { SecurityPageName } from '../app/types'; -import { PolicyDetailsState } from './pages/policy/types'; -import { EndpointState } from './pages/endpoint_hosts/types'; +import type { CombinedState } from 'redux'; +import type { SecurityPageName } from '../app/types'; +import type { PolicyDetailsState } from './pages/policy/types'; +import type { EndpointState } from './pages/endpoint_hosts/types'; /** * The type for the management store global namespace. Used mostly internally to reference diff --git a/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx index 3ae735e1cef19..a05e62a5b252d 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/details/index.test.tsx @@ -7,7 +7,7 @@ import { shallow } from 'enzyme'; import React from 'react'; -import { ActionCreator } from 'typescript-fsa'; +import type { ActionCreator } from 'typescript-fsa'; import '../../../common/mock/match_media'; import { @@ -17,13 +17,14 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../../common/mock'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { IpOverview } from '.'; import { mockData } from './mock'; import { mockAnomalies } from '../../../common/components/ml/mock'; -import { NarrowDateRange } from '../../../common/components/ml/types'; +import type { NarrowDateRange } from '../../../common/components/ml/types'; import { FlowTargetSourceDest } from '../../../../common/search_strategy'; describe('IP Overview Component', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/details/index.tsx b/x-pack/plugins/security_solution/public/network/components/details/index.tsx index a4ccde6e592b5..8541d2453c120 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/details/index.tsx @@ -9,13 +9,13 @@ import { euiLightVars as lightTheme, euiDarkVars as darkTheme } from '@kbn/ui-th import React from 'react'; import { DEFAULT_DARK_MODE } from '../../../../common/constants'; -import { DescriptionList } from '../../../../common/utility_types'; +import type { DescriptionList } from '../../../../common/utility_types'; import { useUiSetting$ } from '../../../common/lib/kibana'; -import { +import type { FlowTargetSourceDest, NetworkDetailsStrategyResponse, } from '../../../../common/search_strategy'; -import { networkModel } from '../../store'; +import type { networkModel } from '../../store'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { @@ -33,7 +33,7 @@ import { import * as i18n from './translations'; import { OverviewWrapper } from '../../../common/components/page'; import { Loader } from '../../../common/components/loader'; -import { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; +import type { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; import { AnomalyScores } from '../../../common/components/ml/score/anomaly_scores'; import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; diff --git a/x-pack/plugins/security_solution/public/network/components/details/mock.ts b/x-pack/plugins/security_solution/public/network/components/details/mock.ts index ebe3cb1d997df..c101456ca55b5 100644 --- a/x-pack/plugins/security_solution/public/network/components/details/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/details/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkDetailsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkDetailsStrategyResponse } from '../../../../common/search_strategy'; export const mockData: Readonly> = { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts index 7067407e8a01f..abcaa079d3b20 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/__mocks__/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IndexPatternMapping } from '../types'; -import { IndexPatternSavedObject } from '../../../../common/hooks/types'; +import type { IndexPatternMapping } from '../types'; +import type { IndexPatternSavedObject } from '../../../../common/hooks/types'; import { LAYER_TYPE } from '@kbn/maps-plugin/common'; export const mockIndexPatternIds: IndexPatternMapping[] = [ diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx index 1bd46f848f3ae..7da3a90a6d4fb 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper, shallow } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount, shallow } from 'enzyme'; import React from 'react'; import * as redux from 'react-redux'; import { waitFor } from '@testing-library/react'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx index f3b6a394db0ff..9afec661d22fb 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map.tsx @@ -12,12 +12,13 @@ import { createPortalNode, InPortal } from 'react-reverse-portal'; import styled, { css } from 'styled-components'; import type { Filter, Query } from '@kbn/es-query'; -import { ErrorEmbeddable, isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import type { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; +import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { MapEmbeddable } from '@kbn/maps-plugin/public/embeddable'; +import type { MapEmbeddable } from '@kbn/maps-plugin/public/embeddable'; import { Loader } from '../../../common/components/loader'; import { displayErrorToast, useStateToaster } from '../../../common/components/toasters'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { Embeddable } from './embeddable'; import { createEmbeddable } from './embedded_map_helpers'; import { IndexPatternsMissingPrompt } from './index_patterns_missing_prompt'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx index 8a68ea87682e2..731adaa9b5081 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/embedded_map_helpers.tsx @@ -7,7 +7,8 @@ import uuid from 'uuid'; import React from 'react'; -import { OutPortal, PortalNode } from 'react-reverse-portal'; +import type { PortalNode } from 'react-reverse-portal'; +import { OutPortal } from 'react-reverse-portal'; import minimatch from 'minimatch'; import type { Filter, Query } from '@kbn/es-query'; import { MAP_SAVED_OBJECT_TYPE } from '@kbn/maps-plugin/public'; @@ -16,19 +17,18 @@ import type { MapEmbeddable, MapEmbeddableInput, } from '@kbn/maps-plugin/public'; -import { +import type { EmbeddableStart, - isErrorEmbeddable, EmbeddableOutput, - ViewMode, ErrorEmbeddable, } from '@kbn/embeddable-plugin/public'; -import { IndexPatternMapping } from './types'; +import { isErrorEmbeddable, ViewMode } from '@kbn/embeddable-plugin/public'; +import type { IndexPatternMapping } from './types'; import { getLayerList } from './map_config'; import * as i18n from './translations'; -import { IndexPatternSavedObject } from '../../../common/hooks/types'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { IndexPatternSavedObject } from '../../../common/hooks/types'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; /** * Creates MapEmbeddable with provided initial configuration diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts b/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts index 757c5391e6f3a..0a0e926840035 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_config.ts @@ -8,7 +8,7 @@ import uuid from 'uuid'; import { euiPaletteColorBlind } from '@elastic/eui'; import { LAYER_TYPE, SCALING_TYPES, SOURCE_TYPES } from '@kbn/maps-plugin/common'; -import { +import type { IndexPatternMapping, LayerMapping, LayerMappingCollection, diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx index b74d8a86bfea6..3733ad22a23a6 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.test.tsx @@ -16,10 +16,8 @@ import { SUM_OF_SERVER_BYTES, SUM_OF_SOURCE_BYTES, } from '../map_config'; -import { - ITooltipProperty, - TooltipProperty, -} from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import { TooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; describe('LineToolTipContent', () => { const mockFeatureProps: ITooltipProperty[] = [ diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx index c344c6e0c4317..018bb4dd30e2b 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/line_tool_tip_content.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { SourceDestinationArrows } from '../../source_destination/source_destination_arrows'; import { SUM_OF_CLIENT_BYTES, diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx index 611690b1d1a79..1002c6bed86cd 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.test.tsx @@ -9,7 +9,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import '../../../../common/mock/match_media'; import { MapToolTipComponent } from './map_tool_tip'; -import { TooltipFeature } from '@kbn/maps-plugin/common'; +import type { TooltipFeature } from '@kbn/maps-plugin/common'; describe('MapToolTip', () => { test('placeholder component renders correctly against snapshot', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx index 39960df0f1c17..93b5436b13bce 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/map_tool_tip.tsx @@ -12,10 +12,10 @@ import { EuiLoadingSpinner, EuiOutsideClickDetector, } from '@elastic/eui'; -import { Geometry } from 'geojson'; +import type { Geometry } from 'geojson'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; -import { MapToolTipProps } from '../types'; +import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import type { MapToolTipProps } from '../types'; import { ToolTipFooter } from './tooltip_footer'; import { LineToolTipContent } from './line_tool_tip_content'; import { PointToolTipContent } from './point_tool_tip_content'; diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx index b75b5075e33ff..ca040a9c0b9c2 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.test.tsx @@ -13,10 +13,8 @@ import { getRenderedFieldValue, PointToolTipContentComponent } from './point_too import { TestProviders } from '../../../../common/mock'; import { getEmptyStringTag } from '../../../../common/components/empty_value'; import { HostDetailsLink, NetworkDetailsLink } from '../../../../common/components/links'; -import { - TooltipProperty, - ITooltipProperty, -} from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import { TooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { FlowTarget } from '../../../../../common/search_strategy'; describe('PointToolTipContent', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx index 6483cd2ab30f3..dd1cc78ac3519 100644 --- a/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx +++ b/x-pack/plugins/security_solution/public/network/components/embeddables/map_tool_tip/point_tool_tip_content.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; +import type { ITooltipProperty } from '@kbn/maps-plugin/public/classes/tooltips/tooltip_property'; import { sourceDestinationFieldMappings } from '../map_config'; import { getEmptyTagValue, @@ -16,7 +16,7 @@ import { import { DescriptionListStyled } from '../../../../common/components/page'; import { HostDetailsLink, NetworkDetailsLink } from '../../../../common/components/links'; import { DefaultFieldRenderer } from '../../../../timelines/components/field_renderers/field_renderers'; -import { FlowTarget } from '../../../../../common/search_strategy'; +import type { FlowTarget } from '../../../../../common/search_strategy'; interface PointToolTipContentProps { contextId: string; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx index d2c6365287e62..ab3796096b45a 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx +++ b/x-pack/plugins/security_solution/public/network/components/flow_controls/flow_target_select.tsx @@ -7,11 +7,8 @@ import { EuiSuperSelect } from '@elastic/eui'; import React from 'react'; -import { - FlowTarget, - FlowTargetSourceDest, - FlowDirection, -} from '../../../../common/search_strategy'; +import type { FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowTarget, FlowDirection } from '../../../../common/search_strategy'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx b/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx index 872a4f06cc435..5b3cc427cad62 100644 --- a/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/flow_target_select_connected/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import { EuiFlexItem } from '@elastic/eui'; import React, { useCallback } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; @@ -15,11 +15,8 @@ import * as i18nIp from '../details/translations'; import { FlowTargetSelect } from '../flow_controls/flow_target_select'; import { IpOverviewId } from '../../../timelines/components/field_renderers/field_renderers'; -import { - FlowTarget, - FlowTargetSourceDest, - FlowDirection, -} from '../../../../common/search_strategy'; +import type { FlowTarget, FlowTargetSourceDest } from '../../../../common/search_strategy'; +import { FlowDirection } from '../../../../common/search_strategy'; const SelectTypeItem = styled(EuiFlexItem)` min-width: 180px; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx index 94e81c2d80d4a..8a5073ce2edc0 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/dns/index.tsx @@ -7,12 +7,12 @@ import React, { useEffect, useState } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiDnsQueriesLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_dns_queries'; import { useNetworkKpiDns, ID } from '../../../containers/kpi_network/dns'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { NetworkKpiProps } from '../types'; +import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx index 7f9c5b4672f9a..e322ea0ee899d 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.test.tsx @@ -16,7 +16,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import '../../../common/mock/match_media'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { NetworkKpiComponent } from '.'; describe('NetworkKpiComponent', () => { diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx index c1a1fbb7f2398..8b4c7d30bb8ec 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/index.tsx @@ -13,7 +13,7 @@ import { NetworkKpiNetworkEvents } from './network_events'; import { NetworkKpiTlsHandshakes } from './tls_handshakes'; import { NetworkKpiUniqueFlows } from './unique_flows'; import { NetworkKpiUniquePrivateIps } from './unique_private_ips'; -import { NetworkKpiProps } from './types'; +import type { NetworkKpiProps } from './types'; export const NetworkKpiComponent = React.memo( ({ filterQuery, from, indexNames, to, setQuery, skip, narrowDateRange }) => ( diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts b/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts index f5ed1ebde6992..3220101bf226f 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { NetworkKpiStrategyResponse } from '../../../../common/search_strategy'; -import { StatItems } from '../../../common/components/stat_items'; +import type { NetworkKpiStrategyResponse } from '../../../../common/search_strategy'; +import type { StatItems } from '../../../common/components/stat_items'; import { kpiUniquePrivateIpsAreaLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_area'; import { kpiUniquePrivateIpsBarLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_bar'; import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx index 52aa98a117afa..e01615697ac53 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/network_events/index.tsx @@ -8,9 +8,9 @@ import React, { useEffect, useState } from 'react'; import { euiPaletteColorBlind } from '@elastic/eui'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { ID, useNetworkKpiNetworkEvents } from '../../../containers/kpi_network/network_events'; -import { NetworkKpiProps } from '../types'; +import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; import { kpiNetworkEventsLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_network_events'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx index c25a4cd140108..ee1409fe4d316 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/tls_handshakes/index.tsx @@ -7,11 +7,11 @@ import React, { useEffect, useState } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiTlsHandshakesLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_tls_handshakes'; import { useNetworkKpiTlsHandshakes, ID } from '../../../containers/kpi_network/tls_handshakes'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { NetworkKpiProps } from '../types'; +import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts b/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts index 3be0177557712..b15d05ebc3c73 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { UpdateDateRange } from '../../../common/components/charts/common'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; export interface NetworkKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx index d6874818ab901..8db91826721ab 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_flows/index.tsx @@ -7,11 +7,11 @@ import React, { useState, useEffect } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiUniqueFlowIdsLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_flow_ids'; import { useNetworkKpiUniqueFlows, ID } from '../../../containers/kpi_network/unique_flows'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; -import { NetworkKpiProps } from '../types'; +import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx b/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx index 91791d09f8113..fd5f24fc1b5eb 100644 --- a/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/kpi_network/unique_private_ips/index.tsx @@ -8,12 +8,12 @@ import React, { useEffect, useState } from 'react'; import { euiPaletteColorBlind } from '@elastic/eui'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { useNetworkKpiUniquePrivateIps, ID, } from '../../../containers/kpi_network/unique_private_ips'; -import { NetworkKpiProps } from '../types'; +import type { NetworkKpiProps } from '../types'; import * as i18n from './translations'; import { kpiUniquePrivateIpsSourceMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_source_metric'; import { kpiUniquePrivateIpsDestinationMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/network/kpi_unique_private_ips_destination_metric'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx index be88d18cddf1d..fc332d30fedc1 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/columns.tsx @@ -8,14 +8,15 @@ import numeral from '@elastic/numeral'; import React from 'react'; -import { NetworkDnsFields, NetworkDnsItem } from '../../../../common/search_strategy'; +import type { NetworkDnsItem } from '../../../../common/search_strategy'; +import { NetworkDnsFields } from '../../../../common/search_strategy'; import { DragEffects, DraggableWrapper, } from '../../../common/components/drag_and_drop/draggable_wrapper'; import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; import { defaultToEmptyTag, getEmptyTagValue } from '../../../common/components/empty_value'; -import { Columns } from '../../../common/components/paginated_table'; +import type { Columns } from '../../../common/components/paginated_table'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { PreferenceFormattedBytes } from '../../../common/components/formatted_bytes'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx index 2757baef2c1f4..e65d13274001e 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.test.tsx @@ -18,7 +18,8 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../../common/mock'; -import { State, createStore } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx index a87908d27e63d..1961f50bce631 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/index.tsx @@ -10,13 +10,14 @@ import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import { +import type { Direction, SortField, NetworkDnsEdges, NetworkDnsFields, } from '../../../../common/search_strategy'; -import { Criteria, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table'; +import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { getNetworkDnsColumns } from './columns'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts index a78826f200c54..3fa4ddd3fc9c0 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/network_dns_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkDnsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkDnsStrategyResponse } from '../../../../common/search_strategy'; export const mockData: NetworkDnsStrategyResponse = { totalCount: 80, diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx index b9c3ed7073e45..b2724fc4cb4a5 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/columns.tsx @@ -7,15 +7,15 @@ import React from 'react'; import numeral from '@elastic/numeral'; -import { +import type { NetworkHttpEdges, - NetworkHttpFields, NetworkHttpItem, } from '../../../../common/search_strategy/security_solution/network'; +import { NetworkHttpFields } from '../../../../common/search_strategy/security_solution/network'; import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { NetworkDetailsLink } from '../../../common/components/links'; -import { Columns } from '../../../common/components/paginated_table'; +import type { Columns } from '../../../common/components/paginated_table'; import * as i18n from './translations'; import { diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx index e8bac5e54765c..2f1cf3696ffc7 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.test.tsx @@ -19,7 +19,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { NetworkHttpTable } from '.'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx index 5bdfd45951292..beba355f38ace 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/index.tsx @@ -9,9 +9,11 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import { NetworkHttpEdges, NetworkHttpFields } from '../../../../common/search_strategy'; +import type { NetworkHttpEdges } from '../../../../common/search_strategy'; +import { NetworkHttpFields } from '../../../../common/search_strategy'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { Criteria, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table'; +import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getNetworkHttpColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts index af1c52a23dc6f..751edf77a13e9 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/network_http_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkHttpStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkHttpStrategyResponse } from '../../../../common/search_strategy'; export const mockData: NetworkHttpStrategyResponse = { edges: [ diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx index e3d8de02a25bb..286ad973d4706 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/columns.tsx @@ -10,11 +10,11 @@ import numeral from '@elastic/numeral'; import React from 'react'; import type { DataViewBase } from '@kbn/es-query'; import { CountryFlagAndName } from '../source_destination/country_flag'; -import { - FlowTargetSourceDest, +import type { NetworkTopCountriesEdges, TopNetworkTablesEcsField, } from '../../../../common/search_strategy/security_solution/network'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; import { networkModel } from '../../store'; import { DragEffects, @@ -22,7 +22,7 @@ import { } from '../../../common/components/drag_and_drop/draggable_wrapper'; import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; import { getEmptyTagValue } from '../../../common/components/empty_value'; -import { Columns } from '../../../common/components/paginated_table'; +import type { Columns } from '../../../common/components/paginated_table'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx index 12dc41961bdf5..97cd7523c1746 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.test.tsx @@ -21,7 +21,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { NetworkTopCountriesTable } from '.'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx index 00c9c7d0aaf30..da6a4b862b6f8 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx @@ -12,16 +12,16 @@ import deepEqual from 'fast-deep-equal'; import type { DataViewBase } from '@kbn/es-query'; import { networkActions, networkModel, networkSelectors } from '../../store'; +import type { NetworkTopCountriesEdges, SortField } from '../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, - NetworkTopCountriesEdges, NetworkTopTablesFields, - SortField, } from '../../../../common/search_strategy'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { Criteria, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table'; +import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getCountriesColumnsCurated } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts index 92a30a704ab66..c213d0535d992 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkTopCountriesStrategyResponse } from '../../../../common/search_strategy/security_solution/network'; +import type { NetworkTopCountriesStrategyResponse } from '../../../../common/search_strategy/security_solution/network'; export const mockData: { NetworkTopCountries: NetworkTopCountriesStrategyResponse } = { NetworkTopCountries: { diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx index 3a85c6d93269e..18a5e808b699a 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/columns.tsx @@ -10,12 +10,12 @@ import numeral from '@elastic/numeral'; import React from 'react'; import { CountryFlag } from '../source_destination/country_flag'; -import { +import type { AutonomousSystemItem, - FlowTargetSourceDest, NetworkTopNFlowEdges, TopNetworkTablesEcsField, } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy'; import { networkModel } from '../../store'; import { DragEffects, @@ -24,7 +24,7 @@ import { import { escapeDataProviderId } from '../../../common/components/drag_and_drop/helpers'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { NetworkDetailsLink } from '../../../common/components/links'; -import { Columns } from '../../../common/components/paginated_table'; +import type { Columns } from '../../../common/components/paginated_table'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx index b5df028f4d7a4..0ab7736e2ec09 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.test.tsx @@ -19,7 +19,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { NetworkTopNFlowTable } from '.'; import { mockData } from './mock'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx index 12895226a82eb..4dde37630f08c 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/index.tsx @@ -10,15 +10,15 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; +import type { SortField, NetworkTopNFlowEdges } from '../../../../common/search_strategy'; import { Direction, - SortField, FlowTargetSourceDest, - NetworkTopNFlowEdges, NetworkTopTablesFields, } from '../../../../common/search_strategy'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { Criteria, ItemsPerRow, PaginatedTable } from '../../../common/components/paginated_table'; +import type { Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { networkActions, networkModel, networkSelectors } from '../../store'; import { getNFlowColumnsCurated } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts index 93a3e6d7692f9..387ec9d7d72b9 100644 --- a/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/network_top_n_flow_table/mock.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - NetworkTopNFlowStrategyResponse, - FlowTargetSourceDest, -} from '../../../../common/search_strategy'; +import type { NetworkTopNFlowStrategyResponse } from '../../../../common/search_strategy'; +import { FlowTargetSourceDest } from '../../../../common/search_strategy'; export const mockData: NetworkTopNFlowStrategyResponse = { totalCount: 524, diff --git a/x-pack/plugins/security_solution/public/network/components/port/index.tsx b/x-pack/plugins/security_solution/public/network/components/port/index.tsx index f22dc9f65dae2..57e2cd8398214 100644 --- a/x-pack/plugins/security_solution/public/network/components/port/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/port/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import React from 'react'; import { DefaultDraggable } from '../../../common/components/draggables'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx index 65bd3bf1ec154..b414f7e8ee363 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/geo_fields.tsx @@ -13,7 +13,7 @@ import styled from 'styled-components'; import { DefaultDraggable } from '../../../common/components/draggables'; import { CountryFlag } from './country_flag'; -import { GeoFieldsProps, SourceDestinationType } from './types'; +import type { GeoFieldsProps, SourceDestinationType } from './types'; export const SOURCE_GEO_CONTINENT_NAME_FIELD_NAME = 'source.geo.continent_name'; export const SOURCE_GEO_COUNTRY_NAME_FIELD_NAME = 'source.geo.country_name'; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx index d7bcf9f6c5297..b546716e58ab4 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/index.tsx @@ -11,7 +11,7 @@ import styled from 'styled-components'; import { Network } from './network'; import { SourceDestinationWithArrows } from './source_destination_with_arrows'; -import { SourceDestinationProps } from './types'; +import type { SourceDestinationProps } from './types'; const EuiFlexItemMarginTop = styled(EuiFlexItem)` margin-top: 3px; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx index df563ef6d7b99..e577d91205aea 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_ip.tsx @@ -18,7 +18,7 @@ import * as i18n from '../../../timelines/components/timeline/body/renderers/tra import { GeoFields } from './geo_fields'; import { IpWithPort } from './ip_with_port'; import { Label } from './label'; -import { SourceDestinationIpProps, SourceDestinationType } from './types'; +import type { SourceDestinationIpProps, SourceDestinationType } from './types'; export interface IpPortPair { ip: string; diff --git a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx index a010d674291ba..2e90ced97dd83 100644 --- a/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx +++ b/x-pack/plugins/security_solution/public/network/components/source_destination/source_destination_with_arrows.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { SourceDestinationArrows } from './source_destination_arrows'; import { SourceDestinationIp } from './source_destination_ip'; -import { SourceDestinationWithArrowsProps } from './types'; +import type { SourceDestinationWithArrowsProps } from './types'; /** * Visualizes the communication between a source and a destination by diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx index 56e2a8e00fedb..580bd0734071b 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/columns.tsx @@ -8,8 +8,8 @@ import React from 'react'; import moment from 'moment'; -import { NetworkTlsNode } from '../../../../common/search_strategy'; -import { Columns } from '../../../common/components/paginated_table'; +import type { NetworkTlsNode } from '../../../../common/search_strategy'; +import type { Columns } from '../../../common/components/paginated_table'; import { getRowItemDraggables, getRowItemDraggable, diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx index a54b219985817..b52b4cd685b9b 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/index.test.tsx @@ -19,7 +19,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { TlsTable } from '.'; import { mockTlsData } from './mock'; diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx index 60079e50f27ce..fa98daf40794b 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/index.tsx @@ -10,19 +10,15 @@ import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import { - Direction, - NetworkTlsEdges, - NetworkTlsFields, - SortField, -} from '../../../../common/search_strategy'; +import type { Direction, NetworkTlsEdges, SortField } from '../../../../common/search_strategy'; +import { NetworkTlsFields } from '../../../../common/search_strategy'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { +import type { Criteria, ItemsPerRow, - PaginatedTable, SortingBasicTable, } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getTlsColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts index d1c9ebe6e49eb..c2c3f5fe265fd 100644 --- a/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/tls_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkTlsStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkTlsStrategyResponse } from '../../../../common/search_strategy'; export const mockTlsData: NetworkTlsStrategyResponse = { totalCount: 2, diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx index 198f3462e8d0f..a20b8eefdf335 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/network/components/users_table/columns.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { FlowTargetSourceDest, NetworkUsersItem } from '../../../../common/search_strategy'; +import type { FlowTargetSourceDest, NetworkUsersItem } from '../../../../common/search_strategy'; import { defaultToEmptyTag } from '../../../common/components/empty_value'; -import { Columns } from '../../../common/components/paginated_table'; +import type { Columns } from '../../../common/components/paginated_table'; import * as i18n from './translations'; import { diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx index fd0894131c567..a7b6e98054790 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/components/users_table/index.test.tsx @@ -19,7 +19,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { networkModel } from '../../store'; import { UsersTable } from '.'; diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx b/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx index 29bbf58821add..eed8ddad9dddf 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx +++ b/x-pack/plugins/security_solution/public/network/components/users_table/index.tsx @@ -12,19 +12,19 @@ import deepEqual from 'fast-deep-equal'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { assertUnreachable } from '../../../../common/utility_types'; import { networkActions, networkModel, networkSelectors } from '../../store'; -import { +import type { Direction, FlowTargetSourceDest, NetworkUsersEdges, - NetworkUsersFields, SortField, } from '../../../../common/search_strategy'; -import { +import { NetworkUsersFields } from '../../../../common/search_strategy'; +import type { Criteria, ItemsPerRow, - PaginatedTable, SortingBasicTable, } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getUsersColumns } from './columns'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts b/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts index 625561c54f26d..ae4d182733613 100644 --- a/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts +++ b/x-pack/plugins/security_solution/public/network/components/users_table/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkUsersStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkUsersStrategyResponse } from '../../../../common/search_strategy'; export const mockUsersData: NetworkUsersStrategyResponse = { edges: [ diff --git a/x-pack/plugins/security_solution/public/network/containers/details/index.tsx b/x-pack/plugins/security_solution/public/network/containers/details/index.tsx index 31af3c6cd2ab6..65d5cd3978991 100644 --- a/x-pack/plugins/security_solution/public/network/containers/details/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/details/index.tsx @@ -11,18 +11,18 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; -import { - NetworkQueries, +import type { NetworkDetailsRequestOptions, NetworkDetailsStrategyResponse, } from '../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../common/search_strategy'; import * as i18n from './translations'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; export const ID = 'networkDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx index 03f7e589b1953..96de20a02ff6e 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/kpi_network/dns/index.tsx @@ -12,19 +12,19 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - NetworkKpiQueries, +import type { NetworkKpiDnsRequestOptions, NetworkKpiDnsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { NetworkKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'networkKpiDnsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx index 3d8168c0beb89..c6d3d37bc4581 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/kpi_network/network_events/index.tsx @@ -12,19 +12,19 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - NetworkKpiQueries, +import type { NetworkKpiNetworkEventsRequestOptions, NetworkKpiNetworkEventsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { NetworkKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'networkKpiNetworkEventsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx index 644dd5f71e4b2..855d25a1c2da1 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/kpi_network/tls_handshakes/index.tsx @@ -12,19 +12,19 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - NetworkKpiQueries, +import type { NetworkKpiTlsHandshakesRequestOptions, NetworkKpiTlsHandshakesStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { NetworkKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'networkKpiTlsHandshakesQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx index f348ddabf8c6a..1a33d693662b8 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_flows/index.tsx @@ -12,19 +12,19 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { - NetworkKpiQueries, +import type { NetworkKpiUniqueFlowsRequestOptions, NetworkKpiUniqueFlowsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { NetworkKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'networkKpiUniqueFlowsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx b/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx index bcd573d85b9d8..902ca3620afca 100644 --- a/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/kpi_network/unique_private_ips/index.tsx @@ -12,20 +12,20 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { +import type { NetworkKpiHistogramData, - NetworkKpiQueries, NetworkKpiUniquePrivateIpsRequestOptions, NetworkKpiUniquePrivateIpsStrategyResponse, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { NetworkKpiQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'networkKpiUniquePrivateIpsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx index ca9ac65da41c2..e13036cc0d3bc 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_dns/index.tsx @@ -11,25 +11,26 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { networkModel, networkSelectors } from '../../store'; -import { +import type { networkModel } from '../../store'; +import { networkSelectors } from '../../store'; +import type { DocValueFields, - NetworkQueries, NetworkDnsRequestOptions, NetworkDnsStrategyResponse, MatrixOverOrdinalHistogramData, NetworkDnsEdges, PageInfoPaginated, } from '../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../common/search_strategy'; import * as i18n from './translations'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; export const ID = 'networkDnsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx index 626866fe421f8..830209f16d87d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_http/index.tsx @@ -11,23 +11,24 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { networkModel, networkSelectors } from '../../store'; -import { - NetworkQueries, +import type { networkModel } from '../../store'; +import { networkSelectors } from '../../store'; +import type { NetworkHttpEdges, PageInfoPaginated, NetworkHttpRequestOptions, NetworkHttpStrategyResponse, SortField, } from '../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../common/search_strategy'; import * as i18n from './translations'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { getInspectResponse } from '../../../helpers'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx index b26c519210800..6631d3a9c2fcd 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_top_countries/index.tsx @@ -11,23 +11,24 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { networkModel, networkSelectors } from '../../store'; -import { +import type { networkModel } from '../../store'; +import { networkSelectors } from '../../store'; +import type { FlowTargetSourceDest, - NetworkQueries, NetworkTopCountriesEdges, NetworkTopCountriesRequestOptions, NetworkTopCountriesStrategyResponse, PageInfoPaginated, } from '../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../common/search_strategy'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx b/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx index e1622ff9a302c..fcaafb3a9fe8d 100644 --- a/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/network_top_n_flow/index.tsx @@ -11,23 +11,24 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { networkModel, networkSelectors } from '../../store'; -import { +import type { networkModel } from '../../store'; +import { networkSelectors } from '../../store'; +import type { FlowTargetSourceDest, - NetworkQueries, NetworkTopNFlowEdges, NetworkTopNFlowRequestOptions, NetworkTopNFlowStrategyResponse, PageInfoPaginated, } from '../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../common/search_strategy'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx b/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx index 29874ffaa3d53..1609b76612b76 100644 --- a/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/tls/index.tsx @@ -11,22 +11,23 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { inputsModel } from '../../../common/store'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { inputsModel } from '../../../common/store'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; -import { networkModel, networkSelectors } from '../../store'; -import { - NetworkQueries, +import type { networkModel } from '../../store'; +import { networkSelectors } from '../../store'; +import type { NetworkTlsRequestOptions, NetworkTlsStrategyResponse, } from '../../../../common/search_strategy/security_solution/network'; +import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; import { getInspectResponse } from '../../../helpers'; -import { FlowTargetSourceDest, PageInfoPaginated } from '../../../../common/search_strategy'; +import type { FlowTargetSourceDest, PageInfoPaginated } from '../../../../common/search_strategy'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; export const ID = 'networkTlsQuery'; diff --git a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx b/x-pack/plugins/security_solution/public/network/containers/users/index.tsx index da6f34fb73039..7158ca8ed6efb 100644 --- a/x-pack/plugins/security_solution/public/network/containers/users/index.tsx +++ b/x-pack/plugins/security_solution/public/network/containers/users/index.tsx @@ -12,23 +12,23 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../common/typed_json'; import { DEFAULT_INDEX_KEY } from '../../../../common/constants'; -import { inputsModel } from '../../../common/store'; +import type { inputsModel } from '../../../common/store'; import { useKibana } from '../../../common/lib/kibana'; import { createFilter } from '../../../common/containers/helpers'; import { generateTablePaginationOptions } from '../../../common/components/paginated_table/helpers'; import { networkSelectors } from '../../store'; -import { +import type { FlowTargetSourceDest, - NetworkQueries, NetworkUsersRequestOptions, NetworkUsersStrategyResponse, } from '../../../../common/search_strategy/security_solution/network'; +import { NetworkQueries } from '../../../../common/search_strategy/security_solution/network'; import * as i18n from './translations'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; -import { PageInfoPaginated } from '../../../../common/search_strategy'; +import type { InspectResponse } from '../../../types'; +import type { PageInfoPaginated } from '../../../../common/search_strategy'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; export const ID = 'networkUsersQuery'; diff --git a/x-pack/plugins/security_solution/public/network/index.ts b/x-pack/plugins/security_solution/public/network/index.ts index 882921ba9f657..e3ec6d650529f 100644 --- a/x-pack/plugins/security_solution/public/network/index.ts +++ b/x-pack/plugins/security_solution/public/network/index.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { SecuritySubPluginWithStore } from '../app/types'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { SecuritySubPluginWithStore } from '../app/types'; import { routes } from './routes'; -import { initialNetworkState, networkReducer, NetworkState } from './store'; +import type { NetworkState } from './store'; +import { initialNetworkState, networkReducer } from './store'; import { TimelineId } from '../../common/types/timeline'; import { getTimelinesInStorageByIds } from '../timelines/containers/local_storage'; diff --git a/x-pack/plugins/security_solution/public/network/links.ts b/x-pack/plugins/security_solution/public/network/links.ts index 34c0d6438ffd1..221d46a2f78ee 100644 --- a/x-pack/plugins/security_solution/public/network/links.ts +++ b/x-pack/plugins/security_solution/public/network/links.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { NETWORK_PATH, SecurityPageName } from '../../common/constants'; import { NETWORK } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import networkPageImg from '../common/images/network_page.png'; export const links: LinkItem = { diff --git a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx b/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx index 3c141422ab551..dbc8f4e864aca 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx @@ -19,7 +19,8 @@ import { createSecuritySolutionStorageMock, } from '../../../common/mock'; import { useMountAppended } from '../../../common/utils/use_mount_appended'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { NetworkDetails } from '.'; import { FlowTargetSourceDest } from '../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/types.ts b/x-pack/plugins/security_solution/public/network/pages/details/types.ts index 7a8b95c1e62f3..6e7250607ee09 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/network/pages/details/types.ts @@ -7,13 +7,13 @@ import type { DataViewBase } from '@kbn/es-query'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../common/typed_json'; import { NetworkType } from '../../store/model'; -import { +import type { FlowTarget, FlowTargetSourceDest, } from '../../../../common/search_strategy/security_solution'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; export const type = NetworkType.details; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/utils.ts b/x-pack/plugins/security_solution/public/network/pages/details/utils.ts index d0d885fc47a79..8f8daa88ff9ab 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/network/pages/details/utils.ts @@ -7,15 +7,15 @@ import { get } from 'lodash/fp'; -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { decodeIpv6 } from '../../../common/lib/helpers'; import { getNetworkDetailsUrl } from '../../../common/components/link_to/redirect_to_network'; import { networkModel } from '../../store'; import * as i18n from '../translations'; import { NetworkRouteType } from '../navigation/types'; -import { NetworkRouteSpyState } from '../../../common/utils/route/types'; +import type { NetworkRouteSpyState } from '../../../common/utils/route/types'; import { SecurityPageName } from '../../../app/types'; -import { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; export const type = networkModel.NetworkType.details; const TabNameMappedToI18nKey: Record = { diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx index ad07147bfc4ed..b469d8624aa7a 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/alerts_query_tab_body.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { TimelineId } from '../../../../common/types/timeline'; import { AlertsView } from '../../../common/components/alerts_viewer'; -import { NetworkComponentQueryProps } from './types'; +import type { NetworkComponentQueryProps } from './types'; import { filterNetworkExternalAlertData } from '../../../common/components/visualization_actions/utils'; export const NetworkAlertsQueryTabBody = React.memo((alertsProps: NetworkComponentQueryProps) => ( diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx index ba18dc2e5b204..979c87f5f1852 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/countries_query_tab_body.tsx @@ -12,7 +12,7 @@ import { NetworkTopCountriesTable } from '../../components/network_top_countries import { useNetworkTopCountries, ID } from '../../containers/network_top_countries'; import { manageQuery } from '../../../common/components/page/manage_query'; -import { IPsQueryTabBodyProps as CountriesQueryTabBodyProps } from './types'; +import type { IPsQueryTabBodyProps as CountriesQueryTabBodyProps } from './types'; import { useQueryToggle } from '../../../common/containers/query_toggle'; const NetworkTopCountriesTableManage = manageQuery(NetworkTopCountriesTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx index 18946e55700b7..971c424d78fe1 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/dns_query_tab_body.tsx @@ -12,9 +12,9 @@ import { NetworkDnsTable } from '../../components/network_dns_table'; import { useNetworkDns, ID } from '../../containers/network_dns'; import { manageQuery } from '../../../common/components/page/manage_query'; -import { NetworkComponentQueryProps } from './types'; +import type { NetworkComponentQueryProps } from './types'; -import { +import type { MatrixHistogramOption, MatrixHistogramConfigs, } from '../../../common/components/matrix_histogram/types'; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx index ce132cceb9892..fe46f639c35de 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/http_query_tab_body.tsx @@ -12,7 +12,7 @@ import { NetworkHttpTable } from '../../components/network_http_table'; import { ID, useNetworkHttp } from '../../containers/network_http'; import { manageQuery } from '../../../common/components/page/manage_query'; -import { HttpQueryTabBodyProps } from './types'; +import type { HttpQueryTabBodyProps } from './types'; import { useQueryToggle } from '../../../common/containers/query_toggle'; const NetworkHttpTableManage = manageQuery(NetworkHttpTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx index ff1aaf609e923..5860fc90ea386 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/ips_query_tab_body.tsx @@ -12,7 +12,7 @@ import { NetworkTopNFlowTable } from '../../components/network_top_n_flow_table' import { ID, useNetworkTopNFlow } from '../../containers/network_top_n_flow'; import { manageQuery } from '../../../common/components/page/manage_query'; -import { IPsQueryTabBodyProps } from './types'; +import type { IPsQueryTabBodyProps } from './types'; import { useQueryToggle } from '../../../common/containers/query_toggle'; const NetworkTopNFlowTableManage = manageQuery(NetworkTopNFlowTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx index 607b2e02ac961..62a0541fed55b 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/nav_tabs.tsx @@ -7,7 +7,8 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; -import { NetworkNavTab, NetworkRouteType } from './types'; +import type { NetworkNavTab } from './types'; +import { NetworkRouteType } from './types'; import { NETWORK_PATH } from '../../../../common/constants'; const getTabsOnNetworkUrl = (tabName: NetworkRouteType) => `${NETWORK_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx index bf3848624453a..a91b47aac32d9 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/network_routes.tsx @@ -24,9 +24,10 @@ import { import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; import { AnomaliesNetworkTable } from '../../../common/components/ml/tables/anomalies_network_table'; import { ConditionalFlexGroup } from './conditional_flex_group'; -import { NetworkRoutesProps, NetworkRouteType } from './types'; -import { Anomaly } from '../../../common/components/ml/types'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { NetworkRoutesProps } from './types'; +import { NetworkRouteType } from './types'; +import type { Anomaly } from '../../../common/components/ml/types'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; import { NETWORK_PATH } from '../../../../common/constants'; export const NetworkRoutes = React.memo( diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx index 699b6ed6f5013..04e9192f30673 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/tls_query_tab_body.tsx @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import { manageQuery } from '../../../common/components/page/manage_query'; import { useNetworkTls, ID } from '../../containers/tls'; import { TlsTable } from '../../components/tls_table'; -import { FTQueryTabBodyProps } from './types'; +import type { FTQueryTabBodyProps } from './types'; import { useQueryToggle } from '../../../common/containers/query_toggle'; const TlsTableManage = manageQuery(TlsTable); diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts index 90b2a59a8a43b..0299d33ea603a 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/types.ts @@ -6,16 +6,16 @@ */ import type { DataViewBase } from '@kbn/es-query'; -import { NarrowDateRange } from '../../../common/components/ml/types'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { NarrowDateRange } from '../../../common/components/ml/types'; +import type { ESTermQuery } from '../../../../common/typed_json'; -import { NavTab } from '../../../common/components/navigation/types'; -import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; -import { networkModel } from '../../store'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { NavTab } from '../../../common/components/navigation/types'; +import type { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; +import type { networkModel } from '../../store'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; -import { SetAbsoluteRangeDatePicker } from '../types'; -import { DocValueFields } from '../../../common/containers/source'; +import type { SetAbsoluteRangeDatePicker } from '../types'; +import type { DocValueFields } from '../../../common/containers/source'; interface QueryTabBodyProps extends Pick { endDate: string; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx b/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx index 85ef772dd0c84..201cda20ad433 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/users_query_tab_body.tsx @@ -9,7 +9,7 @@ import React, { useEffect, useState } from 'react'; import { getOr } from 'lodash/fp'; import { manageQuery } from '../../../common/components/page/manage_query'; import { useNetworkUsers, ID } from '../../containers/users'; -import { IPQueryTabBodyProps } from './types'; +import type { IPQueryTabBodyProps } from './types'; import { UsersTable } from '../../components/users_table'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts b/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts index fcd81ca975584..5eb469e22297d 100644 --- a/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts +++ b/x-pack/plugins/security_solution/public/network/pages/navigation/utils.ts @@ -6,7 +6,8 @@ */ import { NETWORK_PATH } from '../../../../common/constants'; -import { GetNetworkRoutePath, NetworkRouteType } from './types'; +import type { GetNetworkRoutePath } from './types'; +import { NetworkRouteType } from './types'; export const getNetworkRoutePath: GetNetworkRoutePath = ( capabilitiesFetched, diff --git a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx b/x-pack/plugins/security_solution/public/network/pages/network.test.tsx index 32ba03abe500b..5c6226ae8e3c0 100644 --- a/x-pack/plugins/security_solution/public/network/pages/network.test.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/network.test.tsx @@ -19,7 +19,8 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../common/mock'; -import { State, createStore } from '../../common/store'; +import type { State } from '../../common/store'; +import { createStore } from '../../common/store'; import { inputsActions } from '../../common/store/inputs'; import { Network } from './network'; diff --git a/x-pack/plugins/security_solution/public/network/pages/network.tsx b/x-pack/plugins/security_solution/public/network/pages/network.tsx index fffb202959182..e50d1a0d14192 100644 --- a/x-pack/plugins/security_solution/public/network/pages/network.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/network.tsx @@ -15,7 +15,7 @@ import styled from 'styled-components'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { SecurityPageName } from '../../app/types'; -import { UpdateDateRange } from '../../common/components/charts/common'; +import type { UpdateDateRange } from '../../common/components/charts/common'; import { EmbeddedMap } from '../components/embeddables/embedded_map'; import { FiltersGlobal } from '../../common/components/filters_global'; import { HeaderPage } from '../../common/components/header_page'; @@ -37,7 +37,7 @@ import { Display } from '../../hosts/pages/display'; import { networkModel } from '../store'; import { navTabsNetwork, NetworkRoutes, NetworkRoutesLoading } from './navigation'; import * as i18n from './translations'; -import { NetworkComponentProps } from './types'; +import type { NetworkComponentProps } from './types'; import { NetworkRouteType } from './navigation/types'; import { onTimelineTabKeyPressed, diff --git a/x-pack/plugins/security_solution/public/network/pages/types.ts b/x-pack/plugins/security_solution/public/network/pages/types.ts index df5ca5656abfb..6644a51ea39d8 100644 --- a/x-pack/plugins/security_solution/public/network/pages/types.ts +++ b/x-pack/plugins/security_solution/public/network/pages/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { RouteComponentProps } from 'react-router-dom'; -import { ActionCreator } from 'typescript-fsa'; -import { InputsModelId } from '../../common/store/inputs/constants'; +import type { RouteComponentProps } from 'react-router-dom'; +import type { ActionCreator } from 'typescript-fsa'; +import type { InputsModelId } from '../../common/store/inputs/constants'; export type SetAbsoluteRangeDatePicker = ActionCreator<{ id: InputsModelId; diff --git a/x-pack/plugins/security_solution/public/network/routes.tsx b/x-pack/plugins/security_solution/public/network/routes.tsx index 21e018c959234..a094308e1371c 100644 --- a/x-pack/plugins/security_solution/public/network/routes.tsx +++ b/x-pack/plugins/security_solution/public/network/routes.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { NetworkContainer } from './pages'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; import { NETWORK_PATH } from '../../common/constants'; export const NetworkRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/network/store/actions.ts b/x-pack/plugins/security_solution/public/network/store/actions.ts index 969e49d9519b6..81bae080c982f 100644 --- a/x-pack/plugins/security_solution/public/network/store/actions.ts +++ b/x-pack/plugins/security_solution/public/network/store/actions.ts @@ -6,7 +6,7 @@ */ import actionCreatorFactory from 'typescript-fsa'; -import { networkModel } from '.'; +import type { networkModel } from '.'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/network'); diff --git a/x-pack/plugins/security_solution/public/network/store/helpers.test.ts b/x-pack/plugins/security_solution/public/network/store/helpers.test.ts index b38aaf53ad912..08436c262356a 100644 --- a/x-pack/plugins/security_solution/public/network/store/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/network/store/helpers.test.ts @@ -14,7 +14,8 @@ import { NetworkUsersFields, } from '../../../common/search_strategy'; import { DEFAULT_TABLE_LIMIT } from '../../common/store/constants'; -import { NetworkModel, NetworkTableType, NetworkDetailsTableType, NetworkType } from './model'; +import type { NetworkModel } from './model'; +import { NetworkTableType, NetworkDetailsTableType, NetworkType } from './model'; import { setNetworkQueriesActivePageToZero } from './helpers'; export const mockNetworkState: NetworkModel = { diff --git a/x-pack/plugins/security_solution/public/network/store/helpers.ts b/x-pack/plugins/security_solution/public/network/store/helpers.ts index f77950f23681c..8fdf6a66d7fae 100644 --- a/x-pack/plugins/security_solution/public/network/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/network/store/helpers.ts @@ -5,14 +5,8 @@ * 2.0. */ -import { - NetworkModel, - NetworkType, - NetworkTableType, - NetworkDetailsTableType, - NetworkQueries, - NetworkDetailsQueries, -} from './model'; +import type { NetworkModel, NetworkQueries, NetworkDetailsQueries } from './model'; +import { NetworkType, NetworkTableType, NetworkDetailsTableType } from './model'; import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; export const setNetworkPageQueriesActivePageToZero = (state: NetworkModel): NetworkQueries => ({ diff --git a/x-pack/plugins/security_solution/public/network/store/index.ts b/x-pack/plugins/security_solution/public/network/store/index.ts index 0fab572dde18e..159d512d24d89 100644 --- a/x-pack/plugins/security_solution/public/network/store/index.ts +++ b/x-pack/plugins/security_solution/public/network/store/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Reducer, AnyAction } from 'redux'; +import type { Reducer, AnyAction } from 'redux'; import * as networkActions from './actions'; import * as networkModel from './model'; import * as networkSelectors from './selectors'; -import { NetworkState } from './reducer'; +import type { NetworkState } from './reducer'; export { networkActions, networkModel, networkSelectors }; export * from './reducer'; diff --git a/x-pack/plugins/security_solution/public/network/store/model.ts b/x-pack/plugins/security_solution/public/network/store/model.ts index a9b529e25567f..4ba7d331f8880 100644 --- a/x-pack/plugins/security_solution/public/network/store/model.ts +++ b/x-pack/plugins/security_solution/public/network/store/model.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { Direction, FlowTarget, NetworkDnsFields, diff --git a/x-pack/plugins/security_solution/public/network/store/reducer.ts b/x-pack/plugins/security_solution/public/network/store/reducer.ts index 6bd57577d0741..b60fae0725dc4 100644 --- a/x-pack/plugins/security_solution/public/network/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/network/store/reducer.ts @@ -26,7 +26,8 @@ import { setNetworkDetailsQueriesActivePageToZero, setNetworkPageQueriesActivePageToZero, } from './helpers'; -import { NetworkDetailsTableType, NetworkModel, NetworkTableType } from './model'; +import type { NetworkModel } from './model'; +import { NetworkDetailsTableType, NetworkTableType } from './model'; export type NetworkState = NetworkModel; diff --git a/x-pack/plugins/security_solution/public/network/store/selectors.ts b/x-pack/plugins/security_solution/public/network/store/selectors.ts index a32d8eaaf3d28..6566181312eff 100644 --- a/x-pack/plugins/security_solution/public/network/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/network/store/selectors.ts @@ -9,18 +9,16 @@ import { createSelector } from 'reselect'; import { get } from 'lodash/fp'; import { FlowTargetSourceDest } from '../../../common/search_strategy/security_solution/network'; -import { State } from '../../common/store/types'; +import type { State } from '../../common/store/types'; import { initialNetworkState } from './reducer'; -import { - NetworkDetailsTableType, +import type { NetworkDetailsModel, NetworkPageModel, - NetworkTableType, - NetworkType, TopCountriesQuery, TlsQuery, HttpQuery, } from './model'; +import { NetworkDetailsTableType, NetworkTableType, NetworkType } from './model'; const selectNetworkPage = (state: State): NetworkPageModel => state.network.page; diff --git a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx index a2dda44921ee2..8d6aa6d6dc86a 100644 --- a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import '../../../common/mock/match_media'; diff --git a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx index a5d90fdb5fad8..93a70f75d0f7f 100644 --- a/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/alerts_by_category/index.tsx @@ -25,9 +25,9 @@ import { alertsStackByOptions, histogramConfigs, } from '../../../common/components/alerts_viewer/histogram_configs'; -import { MatrixHistogramConfigs } from '../../../common/components/matrix_histogram/types'; +import type { MatrixHistogramConfigs } from '../../../common/components/matrix_histogram/types'; import { getTabsOnHostsUrl } from '../../../common/components/link_to/redirect_to_hosts'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { SecurityPageName } from '../../../app/types'; import { useFormatUrl } from '../../../common/components/link_to'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx index a3f49732267aa..7bb8948825aae 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/alerts_by_status.tsx @@ -7,16 +7,17 @@ import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiProgress, EuiSpacer, EuiText } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; -import { ShapeTreeNode } from '@elastic/charts'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ShapeTreeNode } from '@elastic/charts'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import styled from 'styled-components'; -import { DonutChart, FillColor } from '../../../../common/components/charts/donutchart'; +import type { FillColor } from '../../../../common/components/charts/donutchart'; +import { DonutChart } from '../../../../common/components/charts/donutchart'; import { SecurityPageName } from '../../../../../common/constants'; import { useNavigation } from '../../../../common/lib/kibana'; import { HeaderSection } from '../../../../common/components/header_section'; import { HoverVisibilityContainer } from '../../../../common/components/hover_visibility_container'; import { BUTTON_CLASS as INPECT_BUTTON_CLASS } from '../../../../common/components/inspect'; -import { LegendItem } from '../../../../common/components/charts/legend_item'; +import type { LegendItem } from '../../../../common/components/charts/legend_item'; import { useAlertsByStatus } from './use_alerts_by_status'; import { ALERTS, diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/mock_data.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/mock_data.ts index f8aff3bdc87ac..1c396c6294179 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/mock_data.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/mock_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertsByStatusResponse, AlertsByStatusAgg, ParsedAlertsData } from './types'; +import type { AlertsByStatusResponse, AlertsByStatusAgg, ParsedAlertsData } from './types'; export const from = '2022-04-05T12:00:00.000Z'; export const to = '2022-04-08T12:00:00.000Z'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/types.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/types.ts index 523edf91775fe..31e61ae22e6b2 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/types.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; -import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; interface StatusBySeverity { doc_count_error_upper_bound: number; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx index 68ee64370b26d..4dfc586bb14f4 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx @@ -8,11 +8,8 @@ import { renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../../common/mock'; import { from, mockAlertsData, alertsByStatusQuery, parsedMockAlertsData, to } from './mock_data'; -import { - useAlertsByStatus, - UseAlertsByStatus, - UseAlertsByStatusProps, -} from './use_alerts_by_status'; +import type { UseAlertsByStatus, UseAlertsByStatusProps } from './use_alerts_by_status'; +import { useAlertsByStatus } from './use_alerts_by_status'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); const mockDateNow = jest.fn().mockReturnValue(dateNow); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.ts index 979fd6292243f..cc35f7750f5e7 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.ts @@ -6,11 +6,11 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useQueryAlerts } from '../../../../detections/containers/detection_engine/alerts/use_query'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; -import { AlertsByStatusAgg, AlertsByStatusResponse, ParsedAlertsData } from './types'; +import type { AlertsByStatusAgg, AlertsByStatusResponse, ParsedAlertsData } from './types'; import { STATUS_CRITICAL_LABEL, STATUS_HIGH_LABEL, diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.test.tsx index 18ac775dc5792..93c692c279d8e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.test.tsx @@ -7,7 +7,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; -import { BarChartComponentProps } from '../../../../common/components/charts/barchart'; +import type { BarChartComponentProps } from '../../../../common/components/charts/barchart'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { TestProviders } from '../../../../common/mock'; import { CasesByStatus } from './cases_by_status'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.tsx index cc4bfa5e26703..0fce509b6b280 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/cases_by_status.tsx @@ -7,7 +7,8 @@ import React, { useCallback, useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui'; -import { AxisStyle, Rotation, ScaleType } from '@elastic/charts'; +import type { AxisStyle, Rotation } from '@elastic/charts'; +import { ScaleType } from '@elastic/charts'; import styled from 'styled-components'; import { FormattedNumber } from '@kbn/i18n-react'; import numeral from '@elastic/numeral'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx index 30f027aa9a619..eff9948617b67 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx @@ -9,11 +9,8 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { useKibana } from '../../../../common/lib/kibana'; import { TestProviders } from '../../../../common/mock'; -import { - useCasesByStatus, - UseCasesByStatusProps, - UseCasesByStatusResults, -} from './use_cases_by_status'; +import type { UseCasesByStatusProps, UseCasesByStatusResults } from './use_cases_by_status'; +import { useCasesByStatus } from './use_cases_by_status'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); const mockDateNow = jest.fn().mockReturnValue(dateNow); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.tsx index 3f903e1e73803..2ab0732b561fa 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { CasesStatus } from '@kbn/cases-plugin/common/ui'; +import type { CasesStatus } from '@kbn/cases-plugin/common/ui'; import { useState, useEffect, useMemo } from 'react'; import uuid from 'uuid'; import { APP_ID } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/cases_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/cases_table.tsx index c9259b402615c..7a330a82c1d5a 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/cases_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/cases_table.tsx @@ -7,16 +7,16 @@ import React, { useCallback, useMemo } from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableColumn, EuiButton, EuiEmptyPrompt, EuiPanel, EuiSpacer, EuiText, } from '@elastic/eui'; -import { CaseStatuses } from '@kbn/cases-plugin/common'; +import type { CaseStatuses } from '@kbn/cases-plugin/common'; import { SecurityPageName } from '../../../../app/types'; import { FormattedDate } from '../../../../common/components/formatted_date'; @@ -26,11 +26,13 @@ import { HoverVisibilityContainer } from '../../../../common/components/hover_vi import { BUTTON_CLASS as INPECT_BUTTON_CLASS } from '../../../../common/components/inspect'; import { CaseDetailsLink } from '../../../../common/components/links'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { useNavigation, NavigateTo, GetAppUrl } from '../../../../common/lib/kibana'; +import type { NavigateTo, GetAppUrl } from '../../../../common/lib/kibana'; +import { useNavigation } from '../../../../common/lib/kibana'; import * as i18n from '../translations'; import { LastUpdatedAt } from '../utils'; import { StatusBadge } from './status_badge'; -import { CaseItem, useCaseItems } from './use_case_items'; +import type { CaseItem } from './use_case_items'; +import { useCaseItems } from './use_case_items'; type GetTableColumns = (params: { getAppUrl: GetAppUrl; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts index 2e2578b0d7294..1e9b742f70600 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts @@ -8,9 +8,9 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { mockCasesResult, parsedCasesItems } from './mock_data'; -import { useCaseItems, UseCaseItemsProps } from './use_case_items'; +import { useCaseItems } from './use_case_items'; -import type { UseCaseItems } from './use_case_items'; +import type { UseCaseItems, UseCaseItemsProps } from './use_case_items'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); const mockDateNow = jest.fn().mockReturnValue(dateNow); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.ts index 709fe8c125655..c0e7a2a96d3f2 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.ts @@ -7,8 +7,8 @@ import { useState, useEffect, useMemo } from 'react'; -import { CaseStatuses } from '@kbn/cases-plugin/common'; -import { Cases } from '@kbn/cases-plugin/common/ui'; +import type { CaseStatuses } from '@kbn/cases-plugin/common'; +import type { Cases } from '@kbn/cases-plugin/common/ui'; import uuid from 'uuid'; import { APP_ID } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx index 417ec82be002a..5062c4ab83840 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.tsx @@ -10,7 +10,8 @@ import { useDispatch } from 'react-redux'; import { getDataProvider } from '../../../../common/components/event_details/table/use_action_cell_data_provider'; import { sourcererActions } from '../../../../common/store/sourcerer'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; -import { DataProvider, TimelineId, TimelineType } from '../../../../../common/types/timeline'; +import type { DataProvider } from '../../../../../common/types/timeline'; +import { TimelineId, TimelineType } from '../../../../../common/types/timeline'; import { useCreateTimeline } from '../../../../timelines/components/timeline/properties/use_create_timeline'; import { updateProviders } from '../../../../timelines/store/timeline/actions'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.test.tsx index 5172db743404c..e4cabce7780b9 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.test.tsx @@ -11,7 +11,7 @@ import { fireEvent, render } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { parsedVulnerableHostsAlertsResult } from './mock_data'; -import { UseHostAlertsItems } from './use_host_alerts_items'; +import type { UseHostAlertsItems } from './use_host_alerts_items'; import { HostAlertsTable } from './host_alerts_table'; const mockGetAppUrl = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx index f3151db3927db..c72db22f41067 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/host_alerts_table.tsx @@ -7,9 +7,9 @@ import React, { useMemo } from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableColumn, EuiEmptyPrompt, EuiHealth, EuiLink, @@ -27,7 +27,8 @@ import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { useNavigateToTimeline } from '../hooks/use_navigate_to_timeline'; import * as i18n from '../translations'; import { ITEMS_PER_PAGE, LastUpdatedAt, SEVERITY_COLOR } from '../utils'; -import { HostAlertsItem, useHostAlertsItems } from './use_host_alerts_items'; +import type { HostAlertsItem } from './use_host_alerts_items'; +import { useHostAlertsItems } from './use_host_alerts_items'; interface HostAlertsTableProps { signalIndexName: string | null; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.ts index 62fcc4580b253..4191c2d9ce480 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.ts @@ -9,7 +9,7 @@ import { useCallback, useEffect, useState } from 'react'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { GenericBuckets } from '../../../../../common/search_strategy'; +import type { GenericBuckets } from '../../../../../common/search_strategy'; import { useQueryAlerts } from '../../../../detections/containers/detection_engine/alerts/use_query'; import { getPageCount, ITEMS_PER_PAGE } from '../utils'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/mock_data.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/mock_data.ts index 050c96b91020b..3c5ad1f244b6e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/mock_data.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/mock_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleAlertsItem, SeverityRuleAlertsAggsResponse } from './use_rule_alerts_items'; +import type { RuleAlertsItem, SeverityRuleAlertsAggsResponse } from './use_rule_alerts_items'; export const from = '2022-04-05T12:00:00.000Z'; export const to = '2022-04-08T12:00:00.000Z'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.test.tsx index 16a13c426b550..0776b69e96b27 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.test.tsx @@ -12,8 +12,9 @@ import { render } from '@testing-library/react'; import { SecurityPageName } from '../../../../../common/constants'; import { TestProviders } from '../../../../common/mock'; -import { RuleAlertsTable, RuleAlertsTableProps } from './rule_alerts_table'; -import { RuleAlertsItem, UseRuleAlertsItems } from './use_rule_alerts_items'; +import type { RuleAlertsTableProps } from './rule_alerts_table'; +import { RuleAlertsTable } from './rule_alerts_table'; +import type { RuleAlertsItem, UseRuleAlertsItems } from './use_rule_alerts_items'; const mockGetAppUrl = jest.fn(); jest.mock('../../../../common/lib/kibana/hooks', () => { diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx index 470f9901a05c9..521d9c30554f6 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/rule_alerts_table.tsx @@ -7,9 +7,9 @@ import React, { useCallback, useMemo } from 'react'; import { capitalize } from 'lodash'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableColumn, EuiButton, EuiEmptyPrompt, EuiHealth, @@ -19,13 +19,15 @@ import { EuiToolTip, } from '@elastic/eui'; import { FormattedRelative } from '@kbn/i18n-react'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import { HeaderSection } from '../../../../common/components/header_section'; import { LastUpdatedAt, SEVERITY_COLOR } from '../utils'; import * as i18n from '../translations'; -import { useRuleAlertsItems, RuleAlertsItem } from './use_rule_alerts_items'; -import { useNavigation, NavigateTo, GetAppUrl } from '../../../../common/lib/kibana'; +import type { RuleAlertsItem } from './use_rule_alerts_items'; +import { useRuleAlertsItems } from './use_rule_alerts_items'; +import type { NavigateTo, GetAppUrl } from '../../../../common/lib/kibana'; +import { useNavigation } from '../../../../common/lib/kibana'; import { SecurityPageName } from '../../../../../common/constants'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { HoverVisibilityContainer } from '../../../../common/components/hover_visibility_container'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts index 264c1cf404219..358b9b73fa6d5 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts @@ -14,11 +14,8 @@ import { severityRuleAlertsResponseParsed, to, } from './mock_data'; -import { - useRuleAlertsItems, - UseRuleAlertsItems, - UseRuleAlertsItemsProps, -} from './use_rule_alerts_items'; +import type { UseRuleAlertsItems, UseRuleAlertsItemsProps } from './use_rule_alerts_items'; +import { useRuleAlertsItems } from './use_rule_alerts_items'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); const mockDateNow = jest.fn().mockReturnValue(dateNow); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.ts index ae882329d80db..ca2c447e85943 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.ts @@ -6,7 +6,7 @@ */ import { useCallback, useEffect, useState } from 'react'; -import { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Severity } from '@kbn/securitysolution-io-ts-alerting-types'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useQueryAlerts } from '../../../../detections/containers/detection_engine/alerts/use_query'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.ts index 5c0280f093cbe..5a42174c6854e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.ts @@ -9,7 +9,7 @@ import { useCallback, useEffect, useState } from 'react'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; -import { GenericBuckets } from '../../../../../common/search_strategy'; +import type { GenericBuckets } from '../../../../../common/search_strategy'; import { useQueryAlerts } from '../../../../detections/containers/detection_engine/alerts/use_query'; import { getPageCount, ITEMS_PER_PAGE } from '../utils'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.test.tsx index a7c48f5092a39..9b6ed807e34e6 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.test.tsx @@ -11,7 +11,7 @@ import { fireEvent, render } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { parsedVulnerableUserAlertsResult } from './mock_data'; -import { UseUserAlertsItems } from './use_user_alerts_items'; +import type { UseUserAlertsItems } from './use_user_alerts_items'; import { UserAlertsTable } from './user_alerts_table'; const mockGetAppUrl = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx index 80104244fedf0..6781f3056be71 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/user_alerts_table.tsx @@ -7,9 +7,9 @@ import React, { useMemo } from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableColumn, EuiEmptyPrompt, EuiHealth, EuiLink, @@ -27,7 +27,8 @@ import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { useNavigateToTimeline } from '../hooks/use_navigate_to_timeline'; import * as i18n from '../translations'; import { ITEMS_PER_PAGE, LastUpdatedAt, SEVERITY_COLOR } from '../utils'; -import { UserAlertsItem, useUserAlertsItems } from './use_user_alerts_items'; +import type { UserAlertsItem } from './use_user_alerts_items'; +import { useUserAlertsItems } from './use_user_alerts_items'; interface UserAlertsTableProps { signalIndexName: string | null; diff --git a/x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx index e7b9b290d5fc2..e4706e40aa470 100644 --- a/x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.test.tsx @@ -8,8 +8,8 @@ import { mount } from 'enzyme'; import React from 'react'; -import { OverviewHostProps } from '../overview_host'; -import { OverviewNetworkProps } from '../overview_network'; +import type { OverviewHostProps } from '../overview_host'; +import type { OverviewNetworkProps } from '../overview_network'; import { mockIndexPattern, TestProviders } from '../../../common/mock'; import '../../../common/mock/match_media'; diff --git a/x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx index bc819549cc869..9f73cbf9a2d48 100644 --- a/x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/event_counts/index.tsx @@ -15,7 +15,7 @@ import { OverviewHost } from '../overview_host'; import { OverviewNetwork } from '../overview_network'; import { useKibana } from '../../../common/lib/kibana'; import { convertToBuildEsQuery } from '../../../common/lib/keury'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; import { hostNameExistsFilter, diff --git a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx index b9f00ea2e65a2..4dc0452dd8831 100644 --- a/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/events_by_dataset/index.tsx @@ -7,7 +7,7 @@ import { Position } from '@elastic/charts'; import numeral from '@elastic/numeral'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import React, { useEffect, useMemo, useCallback } from 'react'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; @@ -18,7 +18,7 @@ import { DEFAULT_NUMBER_FORMAT, APP_UI_ID } from '../../../../common/constants'; import { SHOWING, UNIT } from '../../../common/components/events_viewer/translations'; import { getTabsOnHostsUrl } from '../../../common/components/link_to/redirect_to_hosts'; import { MatrixHistogram } from '../../../common/components/matrix_histogram'; -import { +import type { MatrixHistogramConfigs, MatrixHistogramOption, } from '../../../common/components/matrix_histogram/types'; @@ -29,8 +29,8 @@ import { histogramConfigs, } from '../../../common/components/events_tab/events_query_tab_body'; import { HostsTableType } from '../../../hosts/store/model'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { InputsModelId } from '../../../common/store/inputs/constants'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import * as i18n from '../../pages/translations'; import { SecurityPageName } from '../../../app/types'; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx index 130f9ac8d870e..d7591ed353fa9 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.test.tsx @@ -13,10 +13,8 @@ import '../../../../common/mock/react_beautiful_dnd'; import { TestProviders } from '../../../../common/mock'; import { EndpointOverview } from '.'; -import { - EndpointFields, - HostPolicyResponseActionStatus, -} from '../../../../../common/search_strategy/security_solution/hosts'; +import type { EndpointFields } from '../../../../../common/search_strategy/security_solution/hosts'; +import { HostPolicyResponseActionStatus } from '../../../../../common/search_strategy/security_solution/hosts'; import { HostStatus } from '../../../../../common/endpoint/types'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx index 568bf30dbe711..c77b209a721db 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/endpoint_overview/index.tsx @@ -10,14 +10,12 @@ import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import { OverviewDescriptionList } from '../../../../common/components/overview_description_list'; -import { DescriptionList } from '../../../../../common/utility_types'; +import type { DescriptionList } from '../../../../../common/utility_types'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { DefaultFieldRenderer } from '../../../../timelines/components/field_renderers/field_renderers'; import * as i18n from './translations'; -import { - EndpointFields, - HostPolicyResponseActionStatus, -} from '../../../../../common/search_strategy/security_solution/hosts'; +import type { EndpointFields } from '../../../../../common/search_strategy/security_solution/hosts'; +import { HostPolicyResponseActionStatus } from '../../../../../common/search_strategy/security_solution/hosts'; import { AgentStatus } from '../../../../common/components/endpoint/agent_status'; import { EndpointHostIsolationStatus } from '../../../../common/components/endpoint/host_isolation'; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx index c5f264e4ae9ed..a914b059c3ba4 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx @@ -10,9 +10,10 @@ import { euiLightVars as lightTheme, euiDarkVars as darkTheme } from '@kbn/ui-th import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { buildHostNamesFilter, HostItem, RiskSeverity } from '../../../../common/search_strategy'; +import type { HostItem, RiskSeverity } from '../../../../common/search_strategy'; +import { buildHostNamesFilter } from '../../../../common/search_strategy'; import { DEFAULT_DARK_MODE } from '../../../../common/constants'; -import { DescriptionList } from '../../../../common/utility_types'; +import type { DescriptionList } from '../../../../common/utility_types'; import { useUiSetting$ } from '../../../common/lib/kibana'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { @@ -29,7 +30,7 @@ import { NetworkDetailsLink } from '../../../common/components/links'; import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; import { AnomalyScores } from '../../../common/components/ml/score/anomaly_scores'; -import { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; +import type { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; import { DescriptionListStyled, OverviewWrapper } from '../../../common/components/page'; import * as i18n from './translations'; import { EndpointOverview } from './endpoint_overview'; diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts b/x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts index 7841d8e9dc6ad..285f649d8a167 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsStrategyResponse } from '../../../../common/search_strategy'; +import type { HostsStrategyResponse } from '../../../../common/search_strategy'; export const mockData: { Hosts: HostsStrategyResponse; DateFields: string[] } = { Hosts: { diff --git a/x-pack/plugins/security_solution/public/overview/components/link_panel/disabled_link_panel.tsx b/x-pack/plugins/security_solution/public/overview/components/link_panel/disabled_link_panel.tsx index 67d6d5608fe39..17f1159afb834 100644 --- a/x-pack/plugins/security_solution/public/overview/components/link_panel/disabled_link_panel.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/link_panel/disabled_link_panel.tsx @@ -9,7 +9,7 @@ import React, { memo } from 'react'; import { EuiButton } from '@elastic/eui'; import { InnerLinkPanel } from './inner_link_panel'; -import { LinkPanelListItem, LinkPanelViewProps } from './types'; +import type { LinkPanelListItem, LinkPanelViewProps } from './types'; interface DisabledLinkPanelProps { bodyCopy: string; diff --git a/x-pack/plugins/security_solution/public/overview/components/link_panel/link_panel.tsx b/x-pack/plugins/security_solution/public/overview/components/link_panel/link_panel.tsx index a7d497efc482d..07a7634d62b39 100644 --- a/x-pack/plugins/security_solution/public/overview/components/link_panel/link_panel.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/link_panel/link_panel.tsx @@ -7,18 +7,11 @@ import React, { useMemo, useState } from 'react'; import styled from 'styled-components'; import { chunk } from 'lodash'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiTableFieldDataColumnType, - EuiBasicTable, - CriteriaWithPagination, - EuiPanel, - EuiSpacer, -} from '@elastic/eui'; +import type { EuiTableFieldDataColumnType, CriteriaWithPagination } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiBasicTable, EuiPanel, EuiSpacer } from '@elastic/eui'; import { InspectButtonContainer } from '../../../common/components/inspect'; import { HeaderSection } from '../../../common/components/header_section'; -import { LinkPanelListItem } from './types'; +import type { LinkPanelListItem } from './types'; // @ts-expect-error TS2769 const StyledTable = styled(EuiBasicTable)` diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_disabled_module.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_disabled_module.test.tsx index ce641d5309916..15a79b4839cf3 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_disabled_module.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_disabled_module.test.tsx @@ -12,7 +12,8 @@ import { render, screen } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; import { CtiDisabledModule } from './cti_disabled_module'; import { ThemeProvider } from 'styled-components'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.test.tsx index a804e2efc4588..4daa4ebad5c46 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.test.tsx @@ -12,7 +12,8 @@ import { render, screen } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; import { CtiEnabledModule } from './cti_enabled_module'; import { ThemeProvider } from 'styled-components'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.tsx index 4341cab4ec98c..3229355729492 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/cti_enabled_module.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { ThreatIntelLinkPanelProps } from '.'; +import type { ThreatIntelLinkPanelProps } from '.'; import { useTiDataSources } from '../../containers/overview_cti_links/use_ti_data_sources'; import { useCtiDashboardLinks } from '../../containers/overview_cti_links'; import { ThreatIntelPanelView } from './threat_intel_panel_view'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.test.tsx index 26c306b7a587a..55f09497864b5 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.test.tsx @@ -12,7 +12,8 @@ import { mount } from 'enzyme'; import { I18nProvider } from '@kbn/i18n-react'; import { ThreatIntelLinkPanel } from '.'; import { ThemeProvider } from 'styled-components'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.tsx index 5428c8c8b032c..2967baaf35302 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; -import { TiDataSources } from '../../containers/overview_cti_links/use_ti_data_sources'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { TiDataSources } from '../../containers/overview_cti_links/use_ti_data_sources'; import { CtiEnabledModule } from './cti_enabled_module'; import { CtiDisabledModule } from './cti_disabled_module'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/threat_intel_panel_view.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/threat_intel_panel_view.tsx index 2709c193caffd..371f9a1e79f20 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/threat_intel_panel_view.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_cti_links/threat_intel_panel_view.tsx @@ -6,12 +6,13 @@ */ import React, { useMemo } from 'react'; -import { EuiTableFieldDataColumnType } from '@elastic/eui'; +import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import * as i18n from './translations'; -import { LinkPanel, LinkPanelListItem } from '../link_panel'; -import { LinkPanelViewProps } from '../link_panel/types'; +import type { LinkPanelListItem } from '../link_panel'; +import { LinkPanel } from '../link_panel'; +import type { LinkPanelViewProps } from '../link_panel/types'; import { shortenCountIntoString } from '../../../common/utils/shorten_count_into_string'; import { Link } from '../link_panel/link'; import { ID as CTIEventCountQueryId } from '../../containers/overview_cti_links/use_ti_data_sources'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx index 173710a7700e8..c62edc45fb425 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.test.tsx @@ -19,7 +19,8 @@ import { } from '../../../common/mock'; import { OverviewHost } from '.'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { useHostOverview } from '../../containers/overview_host'; import { useQueryToggle } from '../../../common/containers/query_toggle'; import { render } from '@testing-library/react'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.tsx index 60a5db1faa9fc..6e35d801c75d9 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_host/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host/index.tsx @@ -12,7 +12,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo, useCallback, useState, useEffect } from 'react'; import { DEFAULT_NUMBER_FORMAT, APP_UI_ID } from '../../../../common/constants'; -import { ESQuery } from '../../../../common/typed_json'; +import type { ESQuery } from '../../../../common/typed_json'; import { ID as OverviewHostQueryId, useHostOverview } from '../../containers/overview_host'; import { HeaderSection } from '../../../common/components/header_section'; import { useUiSetting$, useKibana } from '../../../common/lib/kibana'; @@ -20,7 +20,7 @@ import { getHostDetailsUrl, useFormatUrl } from '../../../common/components/link import { getOverviewHostStats, OverviewHostStats } from '../overview_host_stats'; import { manageQuery } from '../../../common/components/page/manage_query'; import { InspectButtonContainer } from '../../../common/components/inspect'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { SecurityPageName } from '../../../app/types'; import { LinkButton } from '../../../common/components/links'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx index 4f7712393534f..64a5b03536c43 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/index.tsx @@ -10,8 +10,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import styled from 'styled-components'; -import { HostsOverviewStrategyResponse } from '../../../../common/search_strategy'; -import { FormattedStat, StatGroup } from '../types'; +import type { HostsOverviewStrategyResponse } from '../../../../common/search_strategy'; +import type { FormattedStat, StatGroup } from '../types'; import { StatValue } from '../stat_value'; interface OverviewHostProps { diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts index 2abd7ad2be9ee..87a93a2130684 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts +++ b/x-pack/plugins/security_solution/public/overview/components/overview_host_stats/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsOverviewStrategyResponse } from '../../../../common/search_strategy'; +import type { HostsOverviewStrategyResponse } from '../../../../common/search_strategy'; export const mockData: HostsOverviewStrategyResponse['overviewHost'] = { auditbeatAuditd: 73847, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx index 2293a0380f3a8..2204fbb179f6f 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.test.tsx @@ -18,7 +18,8 @@ import { kibanaObservable, } from '../../../common/mock'; import { OverviewNetwork } from '.'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { useNetworkOverview } from '../../containers/overview_network'; import { SecurityPageName } from '../../../app/types'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx index 62d257a062b69..c7616c3c6d299 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network/index.tsx @@ -12,7 +12,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo, useCallback, useState, useEffect } from 'react'; import { DEFAULT_NUMBER_FORMAT, APP_UI_ID } from '../../../../common/constants'; -import { ESQuery } from '../../../../common/typed_json'; +import type { ESQuery } from '../../../../common/typed_json'; import { HeaderSection } from '../../../common/components/header_section'; import { useUiSetting$, useKibana } from '../../../common/lib/kibana'; import { manageQuery } from '../../../common/components/page/manage_query'; @@ -23,7 +23,7 @@ import { import { getOverviewNetworkStats, OverviewNetworkStats } from '../overview_network_stats'; import { getNetworkUrl, useFormatUrl } from '../../../common/components/link_to'; import { InspectButtonContainer } from '../../../common/components/inspect'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { SecurityPageName } from '../../../app/types'; import { LinkButton } from '../../../common/components/links'; import { useQueryToggle } from '../../../common/containers/query_toggle'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx index a2618aef47c93..21facec119803 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/index.tsx @@ -10,8 +10,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import styled from 'styled-components'; -import { NetworkOverviewStrategyResponse } from '../../../../common/search_strategy'; -import { FormattedStat, StatGroup } from '../types'; +import type { NetworkOverviewStrategyResponse } from '../../../../common/search_strategy'; +import type { FormattedStat, StatGroup } from '../types'; import { StatValue } from '../stat_value'; interface OverviewNetworkProps { diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts index 54992489f615d..d4e18b2b0f4be 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts +++ b/x-pack/plugins/security_solution/public/overview/components/overview_network_stats/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkOverviewStrategyResponse } from '../../../../common/search_strategy'; +import type { NetworkOverviewStrategyResponse } from '../../../../common/search_strategy'; export const mockData: NetworkOverviewStrategyResponse['overviewNetwork'] = { auditbeatSocket: 12, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx index 060c6b3396a6b..9664dd5f2668d 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.test.tsx @@ -13,7 +13,8 @@ import { I18nProvider } from '@kbn/i18n-react'; import { ThemeProvider } from 'styled-components'; import { mockTheme } from '../overview_cti_links/mock'; import { RiskyHostLinks } from '.'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.tsx index dc9c48054a1be..df6286647e82e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/index.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { RiskyHostsEnabledModule } from './risky_hosts_enabled_module'; import { RiskyHostsDisabledModule } from './risky_hosts_disabled_module'; import { useQueryInspector } from '../../../common/components/page/manage_query'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { useHostRiskScore, HostRiskScoreQueryId } from '../../../risk_score/containers'; export interface RiskyHostLinksProps extends Pick { timerange: { to: string; from: string }; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_disabled_module.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_disabled_module.test.tsx index 07108fd4f6ccb..d4b8f4ad816ad 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_disabled_module.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_disabled_module.test.tsx @@ -11,7 +11,8 @@ import { cloneDeep } from 'lodash/fp'; import { render, screen } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; import { ThemeProvider } from 'styled-components'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx index 5cda93859fe16..648e19100c876 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.test.tsx @@ -11,7 +11,8 @@ import { cloneDeep } from 'lodash/fp'; import { render, screen } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; import { ThemeProvider } from 'styled-components'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { createSecuritySolutionStorageMock, kibanaObservable, diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx index 91a7a3fc3fe5d..236cfd5f6228e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_enabled_module.tsx @@ -7,9 +7,9 @@ import React, { useMemo } from 'react'; import { RiskyHostsPanelView } from './risky_hosts_panel_view'; -import { LinkPanelListItem } from '../link_panel'; +import type { LinkPanelListItem } from '../link_panel'; import { useRiskyHostsDashboardLinks } from '../../containers/overview_risky_host_links/use_risky_hosts_dashboard_links'; -import { HostsRiskScore } from '../../../../common/search_strategy'; +import type { HostsRiskScore } from '../../../../common/search_strategy'; import { useDashboardButtonHref } from '../../../common/hooks/use_dashboard_button_href'; import { RISKY_HOSTS_DASHBOARD_TITLE } from '../../../hosts/pages/navigation/constants'; diff --git a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx index 51be0e1f9fb92..3027d23678f9c 100644 --- a/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/overview_risky_host_links/risky_hosts_panel_view.tsx @@ -7,10 +7,12 @@ import React, { useMemo } from 'react'; -import { EuiButton, EuiTableFieldDataColumnType } from '@elastic/eui'; +import type { EuiTableFieldDataColumnType } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { InnerLinkPanel, LinkPanel, LinkPanelListItem } from '../link_panel'; -import { LinkPanelViewProps } from '../link_panel/types'; +import type { LinkPanelListItem } from '../link_panel'; +import { InnerLinkPanel, LinkPanel } from '../link_panel'; +import type { LinkPanelViewProps } from '../link_panel/types'; import { Link } from '../link_panel/link'; import * as i18n from './translations'; import { VIEW_DASHBOARD } from '../overview_cti_links/translations'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx index 0ee7b7ff638aa..f75ed58010c6e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/counts/index.tsx @@ -13,7 +13,7 @@ import { getPinnedEventCount, getNotesCount, } from '../../../../timelines/components/open_timeline/helpers'; -import { OpenTimelineResult } from '../../../../timelines/components/open_timeline/types'; +import type { OpenTimelineResult } from '../../../../timelines/components/open_timeline/types'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx index 9f7621038a516..5b480ac3a9c77 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/filters/index.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; +import { EuiButtonGroup } from '@elastic/eui'; import React from 'react'; -import { FilterMode } from '../types'; +import type { FilterMode } from '../types'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx index d46ac5972806d..f3a867853e5f6 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/header/index.tsx @@ -9,7 +9,7 @@ import { EuiText, EuiLink } from '@elastic/eui'; import React, { useCallback } from 'react'; import { isUntitled } from '../../../../timelines/components/open_timeline/helpers'; -import { +import type { OnOpenTimeline, OpenTimelineResult, } from '../../../../timelines/components/open_timeline/types'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx index ed59918ad4499..7f6edcca27994 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/index.tsx @@ -15,12 +15,12 @@ import { queryTimelineById, dispatchUpdateTimeline, } from '../../../timelines/components/open_timeline/helpers'; -import { OnOpenTimeline } from '../../../timelines/components/open_timeline/types'; +import type { OnOpenTimeline } from '../../../timelines/components/open_timeline/types'; import { updateIsLoading as dispatchUpdateIsLoading } from '../../../timelines/store/timeline/actions'; import { RecentTimelines } from './recent_timelines'; import * as i18n from './translations'; -import { FilterMode } from './types'; +import type { FilterMode } from './types'; import { LoadingPlaceholders } from '../loading_placeholders'; import { useTimelineStatus } from '../../../timelines/components/open_timeline/use_timeline_status'; import { useKibana } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx index b85a4509206b2..41f2fe934154c 100644 --- a/x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/recent_timelines/recent_timelines.tsx @@ -17,7 +17,7 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { RecentTimelineHeader } from './header'; -import { +import type { OnOpenTimeline, OpenTimelineResult, } from '../../../timelines/components/open_timeline/types'; diff --git a/x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx index bd464cb5a3712..b9cc5c5a8a0d8 100644 --- a/x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/sidebar/index.tsx @@ -7,7 +7,7 @@ import React, { useState } from 'react'; -import { FilterMode as RecentTimelinesFilterMode } from '../recent_timelines/types'; +import type { FilterMode as RecentTimelinesFilterMode } from '../recent_timelines/types'; import { Sidebar } from './sidebar'; diff --git a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx index 42457f9b494ab..757f9fc5aa5f2 100644 --- a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.test.tsx @@ -11,7 +11,8 @@ import { waitFor } from '@testing-library/react'; import { TestProviders } from '../../../common/mock'; import { Sidebar } from './sidebar'; import { useGetUserCasesPermissions, useKibana } from '../../../common/lib/kibana'; -import { casesPluginMock, CaseUiClientMock } from '@kbn/cases-plugin/public/mocks'; +import type { CaseUiClientMock } from '@kbn/cases-plugin/public/mocks'; +import { casesPluginMock } from '@kbn/cases-plugin/public/mocks'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx index bde783afc3a2e..4f87ec1d86605 100644 --- a/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/sidebar/sidebar.tsx @@ -12,7 +12,7 @@ import { ENABLE_NEWS_FEED_SETTING, NEWS_FEED_URL_SETTING } from '../../../../com import { Filters as RecentTimelinesFilters } from '../recent_timelines/filters'; import { StatefulRecentTimelines } from '../recent_timelines'; import { StatefulNewsFeed } from '../../../common/components/news_feed'; -import { FilterMode as RecentTimelinesFilterMode } from '../recent_timelines/types'; +import type { FilterMode as RecentTimelinesFilterMode } from '../recent_timelines/types'; import { SidebarHeader } from '../../../common/components/sidebar_header'; import * as i18n from '../../pages/translations'; diff --git a/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx b/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx index ef44a5b1ac464..b05989c0c4a91 100644 --- a/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/signals_by_category/index.tsx @@ -7,17 +7,17 @@ import React, { useCallback } from 'react'; import { useDispatch } from 'react-redux'; -import { Filter, Query } from '@kbn/es-query'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { Filter, Query } from '@kbn/es-query'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { AlertsHistogramPanel } from '../../../detections/components/alerts_kpis/alerts_histogram_panel'; import { useSignalIndex } from '../../../detections/containers/detection_engine/alerts/use_signal_index'; import { setAbsoluteRangeDatePicker } from '../../../common/store/inputs/actions'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { UpdateDateRange } from '../../../common/components/charts/common'; +import type { InputsModelId } from '../../../common/store/inputs/constants'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; -import { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; +import type { AlertsStackByField } from '../../../detections/components/alerts_kpis/common/types'; import * as i18n from '../../pages/translations'; diff --git a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx index c07fc5c5735b9..5be86c8850029 100644 --- a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.test.tsx @@ -13,7 +13,8 @@ import { TestProviders } from '../../../common/mock'; import { mockAnomalies } from '../../../common/components/ml/mock'; import { useUserRiskScore } from '../../../risk_score/containers/all'; -import { UserOverview, UserSummaryProps } from '.'; +import type { UserSummaryProps } from '.'; +import { UserOverview } from '.'; jest.mock('../../../risk_score/containers/all', () => ({ useUserRiskScore: jest.fn().mockReturnValue([ diff --git a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx index 0ddcb2ea63de9..f13402171d543 100644 --- a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx @@ -10,9 +10,10 @@ import { euiLightVars as lightTheme, euiDarkVars as darkTheme } from '@kbn/ui-th import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { buildUserNamesFilter, RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; +import { buildUserNamesFilter } from '../../../../common/search_strategy'; import { DEFAULT_DARK_MODE } from '../../../../common/constants'; -import { DescriptionList } from '../../../../common/utility_types'; +import type { DescriptionList } from '../../../../common/utility_types'; import { useUiSetting$ } from '../../../common/lib/kibana'; import { getEmptyTagValue } from '../../../common/components/empty_value'; import { DefaultFieldRenderer } from '../../../timelines/components/field_renderers/field_renderers'; @@ -26,7 +27,7 @@ import { NetworkDetailsLink } from '../../../common/components/links'; import { hasMlUserPermissions } from '../../../../common/machine_learning/has_ml_user_permissions'; import { useMlCapabilities } from '../../../common/components/ml/hooks/use_ml_capabilities'; import { AnomalyScores } from '../../../common/components/ml/score/anomaly_scores'; -import { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; +import type { Anomalies, NarrowDateRange } from '../../../common/components/ml/types'; import { DescriptionListStyled, OverviewWrapper } from '../../../common/components/page'; import * as i18n from './translations'; @@ -34,7 +35,7 @@ import * as i18n from './translations'; import { OverviewDescriptionList } from '../../../common/components/overview_description_list'; import { useUserRiskScore } from '../../../risk_score/containers'; import { RiskScore } from '../../../common/components/severity/common'; -import { UserItem } from '../../../../common/search_strategy/security_solution/users/common'; +import type { UserItem } from '../../../../common/search_strategy/security_solution/users/common'; export interface UserSummaryProps { contextID?: string; // used to provide unique draggable context when viewing in the side panel diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/index.tsx index 5766bd8d6170e..71aca410e3fea 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/index.tsx @@ -5,9 +5,9 @@ * 2.0. */ import { useState, useEffect, useCallback } from 'react'; -import { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; -import { TiDataSources } from './use_ti_data_sources'; -import { LinkPanelListItem } from '../../components/link_panel'; +import type { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { TiDataSources } from './use_ti_data_sources'; +import type { LinkPanelListItem } from '../../components/link_panel'; import { useKibana } from '../../../common/lib/kibana'; const TAG_REQUEST_BODY_SEARCH = 'threat intel'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/use_ti_data_sources.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/use_ti_data_sources.ts index 837bc01007601..43aff52970348 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/use_ti_data_sources.ts +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_cti_links/use_ti_data_sources.ts @@ -4,24 +4,21 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import { filter } from 'rxjs/operators'; import { useEffect, useState } from 'react'; import { useObservable, withOptionalSignal } from '@kbn/securitysolution-hook-utils'; -import { - DataPublicPluginStart, - isCompleteResponse, - isErrorResponse, -} from '@kbn/data-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/public'; import { useKibana } from '../../../common/lib/kibana'; -import { +import type { Bucket, - CtiQueries, CtiDataSourceStrategyResponse, CtiDataSourceRequestOptions, } from '../../../../common/search_strategy/security_solution/cti'; +import { CtiQueries } from '../../../../common/search_strategy/security_solution/cti'; import { DEFAULT_THREAT_INDEX_KEY } from '../../../../common/constants'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; import { OTHER_DATA_SOURCE_TITLE } from '../../components/overview_cti_links/translations'; import { OTHER_TI_DATASET_KEY } from '../../../../common/cti/constants'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx index cb6c9d484cf6f..20dab088f14ea 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.tsx @@ -11,17 +11,17 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { - HostsQueries, +import type { HostOverviewRequestOptions, HostsOverviewStrategyResponse, } from '../../../../common/search_strategy/security_solution'; +import { HostsQueries } from '../../../../common/search_strategy/security_solution'; import { useKibana } from '../../../common/lib/kibana'; -import { inputsModel } from '../../../common/store/inputs'; +import type { inputsModel } from '../../../common/store/inputs'; import { createFilter } from '../../../common/containers/helpers'; -import { ESQuery } from '../../../../common/typed_json'; +import type { ESQuery } from '../../../../common/typed_json'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx index e33060e247b83..3d8f4af168244 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.tsx @@ -11,17 +11,17 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { - NetworkQueries, +import type { NetworkOverviewRequestOptions, NetworkOverviewStrategyResponse, } from '../../../../common/search_strategy/security_solution'; +import { NetworkQueries } from '../../../../common/search_strategy/security_solution'; import { useKibana } from '../../../common/lib/kibana'; -import { inputsModel } from '../../../common/store/inputs'; +import type { inputsModel } from '../../../common/store/inputs'; import { createFilter } from '../../../common/containers/helpers'; -import { ESQuery } from '../../../../common/typed_json'; +import type { ESQuery } from '../../../../common/typed_json'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import * as i18n from './translations'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_id.ts b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_id.ts index c01e65fa20e81..1e0758343ba47 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_id.ts +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_id.ts @@ -6,7 +6,7 @@ */ import { useState, useEffect } from 'react'; -import { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { SavedObjectAttributes } from '@kbn/securitysolution-io-ts-alerting-types'; import { useKibana } from '../../../common/lib/kibana'; const DASHBOARD_REQUEST_BODY_SEARCH = '"Drilldown of Host Risk Score"'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx index 5b8bf180da1f8..bf09bb56bb6f4 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_risky_host_links/use_risky_hosts_dashboard_links.tsx @@ -6,7 +6,7 @@ */ import { useState, useEffect } from 'react'; import { useKibana } from '../../../common/lib/kibana'; -import { LinkPanelListItem } from '../../components/link_panel'; +import type { LinkPanelListItem } from '../../components/link_panel'; import { useRiskyHostsDashboardId } from './use_risky_hosts_dashboard_id'; export const useRiskyHostsDashboardLinks = ( diff --git a/x-pack/plugins/security_solution/public/overview/index.ts b/x-pack/plugins/security_solution/public/overview/index.ts index 3aa6c4185f6da..dcb93b065a378 100644 --- a/x-pack/plugins/security_solution/public/overview/index.ts +++ b/x-pack/plugins/security_solution/public/overview/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { routes } from './routes'; export class Overview { diff --git a/x-pack/plugins/security_solution/public/overview/links.ts b/x-pack/plugins/security_solution/public/overview/links.ts index fe3f6757e5bff..3e9c0dae52502 100644 --- a/x-pack/plugins/security_solution/public/overview/links.ts +++ b/x-pack/plugins/security_solution/public/overview/links.ts @@ -14,7 +14,7 @@ import { SERVER_APP_ID, } from '../../common/constants'; import { DETECTION_RESPONSE, GETTING_STARTED, OVERVIEW } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import overviewPageImg from '../common/images/overview_page.png'; import detectionResponsePageImg from '../common/images/detection_response_page.png'; diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx index ad3eff86e6753..51ad2755a97dc 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.test.tsx @@ -12,10 +12,8 @@ import { merge } from 'lodash'; import '../../common/mock/match_media'; import { TestProviders } from '../../common/mock'; -import { - useMessagesStorage, - UseMessagesStorage, -} from '../../common/containers/local_storage/use_messages_storage'; +import type { UseMessagesStorage } from '../../common/containers/local_storage/use_messages_storage'; +import { useMessagesStorage } from '../../common/containers/local_storage/use_messages_storage'; import { Overview } from '.'; import { useUserPrivileges } from '../../common/components/user_privileges'; import { useSourcererDataView } from '../../common/containers/sourcerer'; @@ -25,7 +23,7 @@ import { mockCtiLinksResponse, mockTiDataSources } from '../components/overview_ import { useCtiDashboardLinks } from '../containers/overview_cti_links'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; import { initialUserPrivilegesState } from '../../common/components/user_privileges/user_privileges_context'; -import { EndpointPrivileges } from '../../../common/endpoint/types'; +import type { EndpointPrivileges } from '../../../common/endpoint/types'; import { useHostRiskScore } from '../../risk_score/containers'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { LandingPageComponent } from '../../common/components/landing_page'; diff --git a/x-pack/plugins/security_solution/public/overview/routes.tsx b/x-pack/plugins/security_solution/public/overview/routes.tsx index f1df9517e7d06..0709bd618314e 100644 --- a/x-pack/plugins/security_solution/public/overview/routes.tsx +++ b/x-pack/plugins/security_solution/public/overview/routes.tsx @@ -13,7 +13,7 @@ import { DETECTION_RESPONSE_PATH, SecurityPageName, } from '../../common/constants'; -import { SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; import { LandingPage } from './pages/landing'; import { StatefulOverview } from './pages/overview'; diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index b9633c49849e5..986667363f7b6 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -7,19 +7,19 @@ import { i18n } from '@kbn/i18n'; import reduceReducers from 'reduce-reducers'; -import { BehaviorSubject, Subject, Subscription } from 'rxjs'; +import type { Subscription } from 'rxjs'; +import { BehaviorSubject, Subject } from 'rxjs'; import { combineLatestWith, pluck } from 'rxjs/operators'; -import { AnyAction, Reducer } from 'redux'; -import { +import type { AnyAction, Reducer } from 'redux'; +import type { AppMountParameters, AppUpdater, CoreSetup, CoreStart, PluginInitializerContext, Plugin as IPlugin, - DEFAULT_APP_CATEGORIES, - AppNavLinkStatus, } from '@kbn/core/public'; +import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import type { TimelineState } from '@kbn/timelines-plugin/public'; import type { @@ -49,24 +49,24 @@ import { } from '../common/constants'; import { getDeepLinks, registerDeepLinksUpdater } from './app/deep_links'; -import { LinksPermissions, updateAppLinks } from './common/links'; +import type { LinksPermissions } from './common/links'; +import { updateAppLinks } from './common/links'; import { getSubPluginRoutesByCapabilities, manageOldSiemRoutes } from './helpers'; -import { SecurityAppStore } from './common/store/store'; +import type { SecurityAppStore } from './common/store/store'; import { licenseService } from './common/hooks/use_license'; -import { SecuritySolutionUiConfigType } from './common/types'; +import type { SecuritySolutionUiConfigType } from './common/types'; import { ExperimentalFeaturesService } from './common/experimental_features_service'; import { getLazyEndpointPolicyEditExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_edit_extension'; import { LazyEndpointPolicyCreateExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_create_extension'; import { getLazyEndpointPackageCustomExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_package_custom_extension'; import { getLazyEndpointPolicyResponseExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_policy_response_extension'; -import { - ExperimentalFeatures, - parseExperimentalConfigValue, -} from '../common/experimental_features'; +import type { ExperimentalFeatures } from '../common/experimental_features'; +import { parseExperimentalConfigValue } from '../common/experimental_features'; import { LazyEndpointCustomAssetsExtension } from './management/pages/policy/view/ingest_manager_integration/lazy_endpoint_custom_assets_extension'; -import { initDataView, SourcererModel, KibanaDataView } from './common/store/sourcerer/model'; -import { SecurityDataView } from './common/containers/sourcerer/api'; +import type { SourcererModel, KibanaDataView } from './common/store/sourcerer/model'; +import { initDataView } from './common/store/sourcerer/model'; +import type { SecurityDataView } from './common/containers/sourcerer/api'; export class Plugin implements IPlugin { readonly kibanaVersion: string; diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/factory.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/factory.ts index 758f942966ea1..159eae67dd168 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/factory.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/factory.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; -import { StartServices } from '../../types'; -import { DataAccessLayer, TimeRange } from '../types'; -import { +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; +import type { StartServices } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../types'; +import type { ResolverNode, ResolverRelatedEvents, ResolverEntityIndex, diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts index b0d3ad22c9dc8..2a81551b6552d 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/emptify_mock.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { ResolverRelatedEvents, ResolverNode, ResolverEntityIndex, SafeResolverEvent, } from '../../../../common/endpoint/types'; import { mockTreeWithNoProcessEvents } from '../../mocks/resolver_tree'; -import { DataAccessLayer } from '../../types'; +import type { DataAccessLayer } from '../../types'; type EmptiableRequests = | 'relatedEvents' diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/generator_tree.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/generator_tree.ts index 6b79f9340070b..130b81c5622b2 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/generator_tree.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/generator_tree.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { TreeOptions } from '../../../../common/endpoint/generate_data'; -import { DataAccessLayer, GeneratedTreeMetadata, TimeRange } from '../../types'; +import type { TreeOptions } from '../../../../common/endpoint/generate_data'; +import type { DataAccessLayer, GeneratedTreeMetadata, TimeRange } from '../../types'; -import { +import type { ResolverRelatedEvents, ResolverEntityIndex, SafeResolverEvent, diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children.ts index f631d663b233e..000d08b4e15c7 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ResolverRelatedEvents, SafeResolverEvent, ResolverEntityIndex, @@ -13,7 +13,7 @@ import { ResolverSchema, } from '../../../../common/endpoint/types'; import { mockTreeWithNoAncestorsAnd2Children } from '../../mocks/resolver_tree'; -import { DataAccessLayer, TimeRange } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../../types'; interface Metadata { /** diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_in_index_called_awesome_index.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_in_index_called_awesome_index.ts index 72f34daa102ab..808c4463f3a89 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_in_index_called_awesome_index.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_in_index_called_awesome_index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ResolverRelatedEvents, ResolverEntityIndex, SafeResolverEvent, @@ -14,7 +14,7 @@ import { } from '../../../../common/endpoint/types'; import { mockEndpointEvent } from '../../mocks/endpoint_event'; import { mockTreeWithNoAncestorsAnd2Children } from '../../mocks/resolver_tree'; -import { DataAccessLayer, TimeRange } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../../types'; interface Metadata { /** diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_and_cursor_on_origin.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_and_cursor_on_origin.ts index 82c4caac22f5b..79a2eb23a671f 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_and_cursor_on_origin.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_and_cursor_on_origin.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { DataAccessLayer, TimeRange } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../../types'; import { mockTreeWithNoAncestorsAndTwoChildrenAndRelatedEventsOnOrigin, firstRelatedEventID, secondRelatedEventID, } from '../../mocks/resolver_tree'; -import { +import type { ResolverRelatedEvents, ResolverEntityIndex, SafeResolverEvent, diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin.ts index b2ed63d793505..774111baf165d 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { DataAccessLayer, TimeRange } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../../types'; import { mockTreeWithNoAncestorsAndTwoChildrenAndRelatedEventsOnOrigin } from '../../mocks/resolver_tree'; -import { +import type { ResolverRelatedEvents, ResolverEntityIndex, SafeResolverEvent, diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_node_with_paginated_related_events.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_node_with_paginated_related_events.ts index dbdd06151c709..7eb8c28a433e3 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_node_with_paginated_related_events.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/one_node_with_paginated_related_events.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { DataAccessLayer, TimeRange } from '../../types'; +import type { DataAccessLayer, TimeRange } from '../../types'; import { mockTreeWithOneNodeAndTwoPagesOfRelatedEvents } from '../../mocks/resolver_tree'; -import { +import type { ResolverRelatedEvents, ResolverEntityIndex, SafeResolverEvent, diff --git a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts index c4d6987545939..56b63a5418f82 100644 --- a/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts +++ b/x-pack/plugins/security_solution/public/resolver/data_access_layer/mocks/pausify_mock.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { ResolverNode, SafeResolverEvent, ResolverRelatedEvents, ResolverEntityIndex, } from '../../../../common/endpoint/types'; -import { DataAccessLayer } from '../../types'; +import type { DataAccessLayer } from '../../types'; type PausableRequests = | 'relatedEvents' diff --git a/x-pack/plugins/security_solution/public/resolver/index.ts b/x-pack/plugins/security_solution/public/resolver/index.ts index 1869c3c1b11a5..fdb1315cd769f 100644 --- a/x-pack/plugins/security_solution/public/resolver/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/index.ts @@ -6,7 +6,7 @@ */ import { Provider } from 'react-redux'; -import { ResolverPluginSetup } from './types'; +import type { ResolverPluginSetup } from './types'; import { resolverStoreFactory } from './store'; import { ResolverWithoutProviders } from './view/resolver_without_providers'; import { noAncestorsTwoChildrenWithRelatedEventsOnOrigin } from './data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin'; diff --git a/x-pack/plugins/security_solution/public/resolver/lib/date.ts b/x-pack/plugins/security_solution/public/resolver/lib/date.ts index de2cdddccc289..e8ac6be38f576 100644 --- a/x-pack/plugins/security_solution/public/resolver/lib/date.ts +++ b/x-pack/plugins/security_solution/public/resolver/lib/date.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DurationDetails, DurationTypes } from '../types'; +import type { DurationDetails, DurationTypes } from '../types'; /** * Given a time, it will convert it to a unix timestamp if not one already. If it is unable to do so, it will return NaN diff --git a/x-pack/plugins/security_solution/public/resolver/lib/transformation.ts b/x-pack/plugins/security_solution/public/resolver/lib/transformation.ts index 2b19399bf04ac..7ce1c3ed3df9e 100644 --- a/x-pack/plugins/security_solution/public/resolver/lib/transformation.ts +++ b/x-pack/plugins/security_solution/public/resolver/lib/transformation.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Matrix3, Vector2 } from '../types'; +import type { Matrix3, Vector2 } from '../types'; /** * The inverse of `orthographicProjection`. diff --git a/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.test.ts b/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.test.ts index a47e41b069662..64287c2d108e0 100644 --- a/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/lib/tree_sequencers.test.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { ResolverNode } from '../../../common/endpoint/types'; -import { EndpointDocGenerator, TreeNode } from '../../../common/endpoint/generate_data'; +import type { ResolverNode } from '../../../common/endpoint/types'; +import type { TreeNode } from '../../../common/endpoint/generate_data'; +import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; import { calculateGenerationsAndDescendants } from './tree_sequencers'; import { nodeID } from '../../../common/endpoint/models/node'; import { genResolverNode, generateTree, convertEventToResolverNode } from '../mocks/generator'; diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts b/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts index 59089af4a22f5..f00163367ae80 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/endpoint_event.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SafeResolverEvent } from '../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../common/endpoint/types'; /** * Simple mock endpoint event that works for tree layouts. diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/generator.ts b/x-pack/plugins/security_solution/public/resolver/mocks/generator.ts index 55f8819f71381..202ae1c385d38 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/generator.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/generator.ts @@ -5,21 +5,16 @@ * 2.0. */ -import { +import type { EventStats, FieldsObject, NewResolverTree, ResolverNode, SafeResolverEvent, } from '../../../common/endpoint/types'; -import { EventOptions } from '../../../common/endpoint/types/generator'; -import { - EndpointDocGenerator, - Tree, - TreeNode, - TreeOptions, - Event, -} from '../../../common/endpoint/generate_data'; +import type { EventOptions } from '../../../common/endpoint/types/generator'; +import type { Tree, TreeNode, TreeOptions, Event } from '../../../common/endpoint/generate_data'; +import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; import * as eventModel from '../../../common/endpoint/models/event'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/resolver_node.ts b/x-pack/plugins/security_solution/public/resolver/mocks/resolver_node.ts index 5c9fd9bad901d..255b71c0c42e4 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/resolver_node.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/resolver_node.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ResolverNode } from '../../../common/endpoint/types'; +import type { ResolverNode } from '../../../common/endpoint/types'; /** * Simple mock endpoint event that works for tree layouts. diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/resolver_tree.ts b/x-pack/plugins/security_solution/public/resolver/mocks/resolver_tree.ts index 0700e92157937..c51dda9a4dc64 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/resolver_tree.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/resolver_tree.ts @@ -6,7 +6,7 @@ */ import { mockEndpointEvent } from './endpoint_event'; -import { +import type { SafeResolverEvent, NewResolverTree, ResolverNode, diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/tree_fetcher_parameters.ts b/x-pack/plugins/security_solution/public/resolver/mocks/tree_fetcher_parameters.ts index f8a69562232fb..daffa1c5e0b09 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/tree_fetcher_parameters.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/tree_fetcher_parameters.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TreeFetcherParameters } from '../types'; +import type { TreeFetcherParameters } from '../types'; /** * A factory for the most basic `TreeFetcherParameters`. Many tests need to provide this even when the values aren't relevant to the test. diff --git a/x-pack/plugins/security_solution/public/resolver/mocks/tree_schema.ts b/x-pack/plugins/security_solution/public/resolver/mocks/tree_schema.ts index 4cd94fab1fb6a..e2d20cb6d5c23 100644 --- a/x-pack/plugins/security_solution/public/resolver/mocks/tree_schema.ts +++ b/x-pack/plugins/security_solution/public/resolver/mocks/tree_schema.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ResolverSchema } from '../../../common/endpoint/types'; +import type { ResolverSchema } from '../../../common/endpoint/types'; /* * This file provides simple factory functions which return mock schemas for various data sources such as endpoint and winlogbeat. diff --git a/x-pack/plugins/security_solution/public/resolver/models/aabb.test.ts b/x-pack/plugins/security_solution/public/resolver/models/aabb.test.ts index 23d4cbf593409..0e15a0fddb2fd 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/aabb.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/aabb.test.ts @@ -6,7 +6,7 @@ */ import { isEqual } from './aabb'; -import { AABB } from '../types'; +import type { AABB } from '../types'; describe('AABB', () => { const minimumX = 0; diff --git a/x-pack/plugins/security_solution/public/resolver/models/aabb.ts b/x-pack/plugins/security_solution/public/resolver/models/aabb.ts index 0be99d622bd72..e0f13920c4806 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/aabb.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/aabb.ts @@ -6,7 +6,7 @@ */ import * as vector2 from './vector2'; -import { AABB } from '../types'; +import type { AABB } from '../types'; /** * Return a boolean indicating if 2 vector objects are equal. diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.test.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.test.ts index 450f451b71347..017a3c0a2ce96 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ResolverNode } from '../../../../common/endpoint/types'; +import type { ResolverNode } from '../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { generateTree, genResolverNode } from '../../mocks/generator'; -import { IndexedProcessTree } from '../../types'; +import type { IndexedProcessTree } from '../../types'; import { factory } from '.'; describe('factory', () => { diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts index 6dfeaa9723a33..f1f74c86dc0d5 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/index.ts @@ -6,8 +6,8 @@ */ import { orderByTime } from '../process_event'; -import { IndexedProcessTree } from '../../types'; -import { ResolverNode } from '../../../../common/endpoint/types'; +import type { IndexedProcessTree } from '../../types'; +import type { ResolverNode } from '../../../../common/endpoint/types'; import { levelOrder as baseLevelOrder, calculateGenerationsAndDescendants, diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.test.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.test.ts index b83dd4ba13610..5896cedce9a9a 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.test.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ResolverNode } from '../../../../common/endpoint/types'; +import type { ResolverNode } from '../../../../common/endpoint/types'; import { isometricTaxiLayoutFactory } from './isometric_taxi_layout'; import { factory } from '.'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { genResolverNode } from '../../mocks/generator'; -import { IsometricTaxiLayout } from '../../types'; +import type { IsometricTaxiLayout } from '../../types'; function layout(events: ResolverNode[]) { return isometricTaxiLayoutFactory(factory(events, 'A')); diff --git a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.ts b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.ts index 7d45f4ae6e727..47c3cf5844e7d 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/indexed_process_tree/isometric_taxi_layout.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { IndexedProcessTree, Vector2, EdgeLineSegment, @@ -17,7 +17,7 @@ import { IsometricTaxiLayout, } from '../../types'; import * as nodeModel from '../../../../common/endpoint/models/node'; -import { ResolverNode } from '../../../../common/endpoint/types'; +import type { ResolverNode } from '../../../../common/endpoint/types'; import * as vector2 from '../vector2'; import * as indexedProcessTreeModel from '.'; import { getFriendlyElapsedTime as elapsedTime } from '../../lib/date'; diff --git a/x-pack/plugins/security_solution/public/resolver/models/location_search.ts b/x-pack/plugins/security_solution/public/resolver/models/location_search.ts index d25b4e312d2b8..a57c2792f10c0 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/location_search.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/location_search.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PanelViewAndParameters } from '../types'; +import type { PanelViewAndParameters } from '../types'; import * as schema from './schema'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/models/matrix3.ts b/x-pack/plugins/security_solution/public/resolver/models/matrix3.ts index 6cf656835626f..738dcb8025e1c 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/matrix3.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/matrix3.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Matrix3 } from '../types'; +import type { Matrix3 } from '../types'; /** * Return a new matrix which is the product of the first and second matrix. diff --git a/x-pack/plugins/security_solution/public/resolver/models/node_data.test.ts b/x-pack/plugins/security_solution/public/resolver/models/node_data.test.ts index d59d87655e719..efa3821bd3b36 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/node_data.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/node_data.test.ts @@ -6,7 +6,7 @@ */ import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; -import { NodeData } from '../types'; +import type { NodeData } from '../types'; import { setErrorNodes, setReloadedNodes, diff --git a/x-pack/plugins/security_solution/public/resolver/models/node_data.ts b/x-pack/plugins/security_solution/public/resolver/models/node_data.ts index d0d1b3af64fe1..c87c48b785d90 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/node_data.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/node_data.ts @@ -6,8 +6,8 @@ */ import { entityIDSafeVersion } from '../../../common/endpoint/models/event'; -import { SafeResolverEvent } from '../../../common/endpoint/types'; -import { FetchedNodeData, NodeData } from '../types'; +import type { SafeResolverEvent } from '../../../common/endpoint/types'; +import type { FetchedNodeData, NodeData } from '../types'; import { isTerminatedProcess } from './process_event'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/models/process_event.test.ts b/x-pack/plugins/security_solution/public/resolver/models/process_event.test.ts index 9aec87c0b1358..b60b627776da6 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/process_event.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/process_event.test.ts @@ -8,7 +8,7 @@ import { eventType, orderByTime, userInfoForProcess } from './process_event'; import { mockProcessEvent } from './process_event_test_helpers'; -import { LegacyEndpointEvent, ResolverNode } from '../../../common/endpoint/types'; +import type { LegacyEndpointEvent, ResolverNode } from '../../../common/endpoint/types'; describe('process event', () => { describe('eventType', () => { diff --git a/x-pack/plugins/security_solution/public/resolver/models/process_event.ts b/x-pack/plugins/security_solution/public/resolver/models/process_event.ts index f6695e5d2834d..025a5c75324fd 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/process_event.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/process_event.ts @@ -9,8 +9,12 @@ import { firstNonNullValue } from '../../../common/endpoint/models/ecs_safety_he import * as eventModel from '../../../common/endpoint/models/event'; import * as nodeModel from '../../../common/endpoint/models/node'; -import { ResolverEvent, SafeResolverEvent, ResolverNode } from '../../../common/endpoint/types'; -import { ResolverProcessType } from '../types'; +import type { + ResolverEvent, + SafeResolverEvent, + ResolverNode, +} from '../../../common/endpoint/types'; +import type { ResolverProcessType } from '../types'; /** * Returns true if the process's eventType is either 'processCreated' or 'processRan'. diff --git a/x-pack/plugins/security_solution/public/resolver/models/process_event_test_helpers.ts b/x-pack/plugins/security_solution/public/resolver/models/process_event_test_helpers.ts index 8f04873801573..2facd4d91fea3 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/process_event_test_helpers.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/process_event_test_helpers.ts @@ -6,7 +6,7 @@ */ import { defaults } from 'lodash/fp'; -import { LegacyEndpointEvent } from '../../../common/endpoint/types'; +import type { LegacyEndpointEvent } from '../../../common/endpoint/types'; type DeepPartial = { [K in keyof T]?: DeepPartial }; /** diff --git a/x-pack/plugins/security_solution/public/resolver/models/resolver_tree.ts b/x-pack/plugins/security_solution/public/resolver/models/resolver_tree.ts index aa5136d8781b9..e73201165a5e9 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/resolver_tree.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/resolver_tree.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { NewResolverTree, ResolverNode, EventStats, diff --git a/x-pack/plugins/security_solution/public/resolver/models/time_range.ts b/x-pack/plugins/security_solution/public/resolver/models/time_range.ts index 12b56576e1e6a..89bff9a3f6f29 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/time_range.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/time_range.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TimeRange } from '../types'; +import type { TimeRange } from '../types'; /** * This is the maximum millisecond value that can be used with a Date object. If you use a number greater than this it diff --git a/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.test.ts b/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.test.ts index 701e4ac1f6325..81ceda82157bd 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TreeFetcherParameters } from '../types'; +import type { TreeFetcherParameters } from '../types'; import { equal } from './tree_fetcher_parameters'; describe('TreeFetcherParameters#equal:', () => { diff --git a/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.ts b/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.ts index a87336f8c21df..83eae24f049fc 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/tree_fetcher_parameters.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TreeFetcherParameters } from '../types'; +import type { TreeFetcherParameters } from '../types'; /** * Determine if two instances of `TreeFetcherParameters` are equivalent. Use this to determine if diff --git a/x-pack/plugins/security_solution/public/resolver/models/vector2.ts b/x-pack/plugins/security_solution/public/resolver/models/vector2.ts index 955505e1e070b..32de7aeb01ab6 100644 --- a/x-pack/plugins/security_solution/public/resolver/models/vector2.ts +++ b/x-pack/plugins/security_solution/public/resolver/models/vector2.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Vector2, Matrix3 } from '../types'; +import type { Vector2, Matrix3 } from '../types'; /** * Returns a vector which is the sum of `a` and `b`. diff --git a/x-pack/plugins/security_solution/public/resolver/store/actions.ts b/x-pack/plugins/security_solution/public/resolver/store/actions.ts index e593e95ba2e1f..0b621046a22bc 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/actions.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/actions.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CameraAction } from './camera'; -import { DataAction } from './data/action'; +import type { CameraAction } from './camera'; +import type { DataAction } from './data/action'; /** * The action dispatched when the app requests related event data for one diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/action.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/action.ts index f2ea0bcefb1ec..dcffe90f8d383 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/action.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/action.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Vector2 } from '../../types'; +import type { Vector2 } from '../../types'; interface TimestampedPayload { /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/animation.test.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/animation.test.ts index 69d87e6ccd351..e94398ccaf098 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/animation.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/animation.test.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { createStore, Store, Reducer } from 'redux'; +import type { Store, Reducer } from 'redux'; +import { createStore } from 'redux'; import { cameraReducer, cameraInitialState } from './reducer'; -import { CameraState, Vector2 } from '../../types'; +import type { CameraState, Vector2 } from '../../types'; import * as selectors from './selectors'; import { animatePanning } from './methods'; import { lerp } from '../../lib/math'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; import { panAnimationDuration } from './scaling_constants'; type TestAction = diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/inverse_projection_matrix.test.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/inverse_projection_matrix.test.ts index 7e71b7355a0d8..da6794aaaeb94 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/inverse_projection_matrix.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/inverse_projection_matrix.test.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { Store, createStore } from 'redux'; -import { CameraAction } from './action'; -import { CameraState } from '../../types'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; +import type { CameraAction } from './action'; +import type { CameraState } from '../../types'; import { cameraReducer } from './reducer'; import { inverseProjectionMatrix } from './selectors'; import { applyMatrix3 } from '../../models/vector2'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/methods.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/methods.ts index 7e3c70a5c25ef..9f45904ece1ca 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/methods.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/methods.ts @@ -6,7 +6,7 @@ */ import { translation } from './selectors'; -import { CameraState, Vector2 } from '../../types'; +import type { CameraState, Vector2 } from '../../types'; import { distance } from '../../models/vector2'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/panning.test.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/panning.test.ts index 3718659bea5c9..6bebab2ec0673 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/panning.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/panning.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { Store, createStore } from 'redux'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; import { cameraReducer } from './reducer'; -import { CameraState, Vector2 } from '../../types'; -import { CameraAction } from './action'; +import type { CameraState, Vector2 } from '../../types'; +import type { CameraAction } from './action'; import { translation } from './selectors'; describe('panning interaction', () => { diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/projection_matrix.test.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/projection_matrix.test.ts index 7c48d805bdf16..8ce59209d2293 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/projection_matrix.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/projection_matrix.test.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { Store, createStore } from 'redux'; -import { CameraAction } from './action'; -import { CameraState } from '../../types'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; +import type { CameraAction } from './action'; +import type { CameraState } from '../../types'; import { cameraReducer } from './reducer'; import { projectionMatrix } from './selectors'; import { applyMatrix3 } from '../../models/vector2'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/reducer.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/reducer.ts index d3c2603040929..fb7618b705fa5 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/reducer.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/reducer.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { Reducer } from 'redux'; +import type { Reducer } from 'redux'; import { unitsPerNudge, nudgeAnimationDuration } from './scaling_constants'; import { animatePanning } from './methods'; import * as vector2 from '../../models/vector2'; import * as selectors from './selectors'; import { clamp } from '../../lib/math'; -import { CameraState, Vector2 } from '../../types'; +import type { CameraState, Vector2 } from '../../types'; import { scaleToZoom } from './scale_to_zoom'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; /** * Used in tests. diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/selectors.ts index 7694d416f9c38..e022f9d5d3b98 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/selectors.ts @@ -17,7 +17,7 @@ import { translationTransformation, } from '../../lib/transformation'; import * as scalingConstants from './scaling_constants'; -import { Vector2, CameraState, AABB, Matrix3, CameraAnimationState } from '../../types'; +import type { Vector2, CameraState, AABB, Matrix3, CameraAnimationState } from '../../types'; export interface ClippingPlanes { renderWidth: number; diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/test_helpers.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/test_helpers.ts index ca3a2a8a9648e..beaca14aeabc5 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/test_helpers.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/test_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Vector2 } from '../../types'; +import type { Vector2 } from '../../types'; /** * Used to assert that two Vector2s are close to each other (accounting for round-off errors.) diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/zooming.test.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/zooming.test.ts index 555b67a1af308..2de281e02e613 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/zooming.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/zooming.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { CameraAction } from './action'; +import type { CameraAction } from './action'; import { cameraReducer } from './reducer'; -import { createStore, Store } from 'redux'; -import { CameraState, AABB } from '../../types'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; +import type { CameraState, AABB } from '../../types'; import { viewableBoundingBox, inverseProjectionMatrix, scalingFactor } from './selectors'; import { expectVectorsToBeClose } from './test_helpers'; import { scaleToZoom } from './scale_to_zoom'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/action.ts b/x-pack/plugins/security_solution/public/resolver/store/data/action.ts index f66458790d37b..c93ba64ba801e 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/action.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/action.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { NewResolverTree, SafeEndpointEvent, SafeResolverEvent, ResolverSchema, } from '../../../../common/endpoint/types'; -import { TreeFetcherParameters, PanelViewAndParameters } from '../../types'; +import type { TreeFetcherParameters, PanelViewAndParameters } from '../../types'; interface ServerReturnedResolverData { readonly type: 'serverReturnedResolverData'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/node_events_in_category_model.ts b/x-pack/plugins/security_solution/public/resolver/store/data/node_events_in_category_model.ts index 4dbb4ef445404..cddab8babd12d 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/node_events_in_category_model.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/node_events_in_category_model.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PanelViewAndParameters, NodeEventsInCategoryState } from '../../types'; +import type { PanelViewAndParameters, NodeEventsInCategoryState } from '../../types'; /** * `NodeEventsInCategoryState` is used to model an ordered collection of events that are all related to the same node and which all belong to a given category. diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.test.ts b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.test.ts index a448df4600baf..52cb97dbc24f5 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.test.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { createStore, Store } from 'redux'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; import { RelatedEventCategory } from '../../../../common/endpoint/generate_data'; import { dataReducer } from './reducer'; import * as selectors from './selectors'; -import { DataState, GeneratedTreeMetadata } from '../../types'; -import { DataAction } from './action'; +import type { DataState, GeneratedTreeMetadata } from '../../types'; +import type { DataAction } from './action'; import { generateTreeWithDAL } from '../../data_access_layer/mocks/generator_tree'; import { endpointSourceSchema, winlogSourceSchema } from '../../mocks/tree_schema'; -import { NewResolverTree, ResolverSchema } from '../../../../common/endpoint/types'; +import type { NewResolverTree, ResolverSchema } from '../../../../common/endpoint/types'; import { ancestorsWithAncestryField, descendantsLimit } from '../../models/resolver_tree'; type SourceAndSchemaFunction = () => { schema: ResolverSchema; dataSource: string }; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts index b5864a0a83cf2..64fe9080a3d5d 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/reducer.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Reducer } from 'redux'; -import { DataState } from '../../types'; -import { ResolverAction } from '../actions'; +import type { Reducer } from 'redux'; +import type { DataState } from '../../types'; +import type { ResolverAction } from '../actions'; import * as treeFetcherParameters from '../../models/tree_fetcher_parameters'; import * as selectors from './selectors'; import * as nodeEventsInCategoryModel from './node_events_in_category_model'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts index 0fb86ec93c89f..bbec11486bcce 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.test.ts @@ -6,8 +6,8 @@ */ import * as selectors from './selectors'; -import { DataState, TimeRange } from '../../types'; -import { ResolverAction } from '../actions'; +import type { DataState, TimeRange } from '../../types'; +import type { ResolverAction } from '../actions'; import { dataReducer } from './reducer'; import { createStore } from 'redux'; import { @@ -19,7 +19,7 @@ import { import { endpointSourceSchema } from '../../mocks/tree_schema'; import * as nodeModel from '../../../../common/endpoint/models/node'; import { mockTreeFetcherParameters } from '../../mocks/tree_fetcher_parameters'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; import { mockEndpointEvent } from '../../mocks/endpoint_event'; import { maxDate } from '../../models/time_range'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts index 1f302e82d70ec..07ab14242bc68 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts @@ -8,7 +8,7 @@ import rbush from 'rbush'; import { createSelector, defaultMemoize } from 'reselect'; import { panelViewAndParameters as panelViewAndParametersFromLocationSearchAndResolverComponentInstanceID } from '../panel_view_and_parameters'; -import { +import type { DataState, Vector2, IndexedEntity, @@ -25,7 +25,7 @@ import { import * as indexedProcessTreeModel from '../../models/indexed_process_tree'; import * as nodeModel from '../../../../common/endpoint/models/node'; import * as nodeEventsInCategoryModel from './node_events_in_category_model'; -import { +import type { SafeResolverEvent, NewResolverTree, ResolverNode, diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/visible_entities.test.ts b/x-pack/plugins/security_solution/public/resolver/store/data/visible_entities.test.ts index 71dcbffb5db67..e40c7c8b40ba7 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/visible_entities.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/visible_entities.test.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { Store, createStore } from 'redux'; -import { ResolverAction } from '../actions'; +import type { Store } from 'redux'; +import { createStore } from 'redux'; +import type { ResolverAction } from '../actions'; import { resolverReducer } from '../reducer'; -import { ResolverState } from '../../types'; -import { ResolverNode } from '../../../../common/endpoint/types'; +import type { ResolverState } from '../../types'; +import type { ResolverNode } from '../../../../common/endpoint/types'; import { visibleNodesAndEdgeLines } from '../selectors'; import { mock as mockResolverTree } from '../../models/resolver_tree'; import { mockTreeFetcherParameters } from '../../mocks/tree_fetcher_parameters'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/index.ts b/x-pack/plugins/security_solution/public/resolver/store/index.ts index 3c08f30c7af4d..3781fb24cbce2 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/index.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { createStore, applyMiddleware, Store } from 'redux'; +import type { Store } from 'redux'; +import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'; -import { ResolverState, DataAccessLayer } from '../types'; +import type { ResolverState, DataAccessLayer } from '../types'; import { resolverReducer } from './reducer'; import { resolverMiddlewareFactory } from './middleware'; -import { ResolverAction } from './actions'; +import type { ResolverAction } from './actions'; export const resolverStoreFactory = ( dataAccessLayer: DataAccessLayer diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/current_related_event_fetcher.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/current_related_event_fetcher.ts index 33772dddd676e..6b58dd4e8e62e 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/current_related_event_fetcher.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/current_related_event_fetcher.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Dispatch, MiddlewareAPI } from 'redux'; +import type { Dispatch, MiddlewareAPI } from 'redux'; import { isEqual } from 'lodash'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; -import { ResolverState, DataAccessLayer, PanelViewAndParameters } from '../../types'; +import type { ResolverState, DataAccessLayer, PanelViewAndParameters } from '../../types'; import * as selectors from '../selectors'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; /** * diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/index.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/index.ts index 918d50ff5ef34..ca719aca177bd 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Dispatch, MiddlewareAPI } from 'redux'; -import { ResolverState, DataAccessLayer } from '../../types'; +import type { Dispatch, MiddlewareAPI } from 'redux'; +import type { ResolverState, DataAccessLayer } from '../../types'; import { ResolverTreeFetcher } from './resolver_tree_fetcher'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; import { RelatedEventsFetcher } from './related_events_fetcher'; import { CurrentRelatedEventFetcher } from './current_related_event_fetcher'; import { NodeDataFetcher } from './node_data_fetcher'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/node_data_fetcher.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/node_data_fetcher.ts index 074fdf7535790..c3173b3238737 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/node_data_fetcher.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/node_data_fetcher.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Dispatch, MiddlewareAPI } from 'redux'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { Dispatch, MiddlewareAPI } from 'redux'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; -import { ResolverState, DataAccessLayer } from '../../types'; +import type { ResolverState, DataAccessLayer } from '../../types'; import * as selectors from '../selectors'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; /** * Max number of nodes to request from the server diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/related_events_fetcher.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/related_events_fetcher.ts index 19a11e07a9d87..ec0f068b5425c 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/related_events_fetcher.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/related_events_fetcher.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Dispatch, MiddlewareAPI } from 'redux'; +import type { Dispatch, MiddlewareAPI } from 'redux'; import { isEqual } from 'lodash'; -import { ResolverPaginatedEvents } from '../../../../common/endpoint/types'; +import type { ResolverPaginatedEvents } from '../../../../common/endpoint/types'; -import { ResolverState, DataAccessLayer, PanelViewAndParameters } from '../../types'; +import type { ResolverState, DataAccessLayer, PanelViewAndParameters } from '../../types'; import * as selectors from '../selectors'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; export function RelatedEventsFetcher( dataAccessLayer: DataAccessLayer, diff --git a/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts b/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts index ff5484ff20214..c2403920bac55 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/middleware/resolver_tree_fetcher.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { Dispatch, MiddlewareAPI } from 'redux'; -import { +import type { Dispatch, MiddlewareAPI } from 'redux'; +import type { ResolverEntityIndex, ResolverNode, NewResolverTree, ResolverSchema, } from '../../../../common/endpoint/types'; -import { ResolverState, DataAccessLayer } from '../../types'; +import type { ResolverState, DataAccessLayer } from '../../types'; import * as selectors from '../selectors'; -import { ResolverAction } from '../actions'; +import type { ResolverAction } from '../actions'; import { ancestorsRequestAmount, descendantsRequestAmount } from '../../models/resolver_tree'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/panel_view_and_parameters.ts b/x-pack/plugins/security_solution/public/resolver/store/panel_view_and_parameters.ts index 752b1e825d854..34f5adc868a9c 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/panel_view_and_parameters.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/panel_view_and_parameters.ts @@ -7,7 +7,7 @@ import { decode } from 'rison-node'; import { isPanelViewAndParameters } from '../models/location_search'; -import { PanelViewAndParameters } from '../types'; +import type { PanelViewAndParameters } from '../types'; import { parameterName } from './parameter_name'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/reducer.ts b/x-pack/plugins/security_solution/public/resolver/store/reducer.ts index de15d4be7ecf6..b67bcbd6960ea 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/reducer.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { Reducer, combineReducers } from 'redux'; +import type { Reducer } from 'redux'; +import { combineReducers } from 'redux'; import { animatePanning } from './camera/methods'; import { layout } from './selectors'; import { cameraReducer } from './camera/reducer'; import { dataReducer } from './data/reducer'; -import { ResolverAction } from './actions'; -import { ResolverState, ResolverUIState } from '../types'; +import type { ResolverAction } from './actions'; +import type { ResolverState, ResolverUIState } from '../types'; import { panAnimationDuration } from './camera/scaling_constants'; import { nodePosition } from '../models/indexed_process_tree/isometric_taxi_layout'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts b/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts index 5a5a1ba14e185..69ba5fa5c6422 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/selectors.test.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ResolverState } from '../types'; +import type { ResolverState } from '../types'; import { createStore } from 'redux'; -import { ResolverAction } from './actions'; +import type { ResolverAction } from './actions'; import { resolverReducer } from './reducer'; import * as selectors from './selectors'; import { mockTreeWith2AncestorsAndNoChildren, mockTreeWithNoAncestorsAnd2Children, } from '../mocks/resolver_tree'; -import { ResolverNode } from '../../../common/endpoint/types'; +import type { ResolverNode } from '../../../common/endpoint/types'; import { mockTreeFetcherParameters } from '../mocks/tree_fetcher_parameters'; import { endpointSourceSchema } from '../mocks/tree_schema'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/selectors.ts index 8dcca877b31f6..51c75b0eaa047 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/selectors.ts @@ -9,8 +9,8 @@ import { createSelector, defaultMemoize } from 'reselect'; import * as cameraSelectors from './camera/selectors'; import * as dataSelectors from './data/selectors'; import * as uiSelectors from './ui/selectors'; -import { ResolverState, IsometricTaxiLayout, DataState } from '../types'; -import { EventStats } from '../../../common/endpoint/types'; +import type { ResolverState, IsometricTaxiLayout, DataState } from '../types'; +import type { EventStats } from '../../../common/endpoint/types'; import * as nodeModel from '../../../common/endpoint/models/node'; /** diff --git a/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts index 792d8a0fe056a..ef60c139aced6 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts @@ -8,7 +8,7 @@ import { encode } from 'rison-node'; import { createSelector } from 'reselect'; -import { PanelViewAndParameters, ResolverUIState } from '../../types'; +import type { PanelViewAndParameters, ResolverUIState } from '../../types'; import { panelViewAndParameters as panelViewAndParametersFromLocationSearchAndResolverComponentInstanceID } from '../panel_view_and_parameters'; import { parameterName } from '../parameter_name'; diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx index 7e1f4d4d73ead..d4be5d9268fe8 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/index.tsx @@ -6,22 +6,25 @@ */ import React from 'react'; -import { Store, createStore, applyMiddleware } from 'redux'; -import { mount, ReactWrapper } from 'enzyme'; -import { History as HistoryPackageHistoryInterface, createMemoryHistory } from 'history'; +import type { Store } from 'redux'; +import { createStore, applyMiddleware } from 'redux'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; +import type { History as HistoryPackageHistoryInterface } from 'history'; +import { createMemoryHistory } from 'history'; import { coreMock } from '@kbn/core/public/mocks'; import { spyMiddlewareFactory } from '../spy_middleware_factory'; import { resolverMiddlewareFactory } from '../../store/middleware'; import { resolverReducer } from '../../store/reducer'; import { MockResolver } from './mock_resolver'; -import { +import type { ResolverState, DataAccessLayer, SpyMiddleware, SideEffectSimulator, TimeFilters, } from '../../types'; -import { ResolverAction } from '../../store/actions'; +import type { ResolverAction } from '../../store/actions'; import { sideEffectSimulatorFactory } from '../../view/side_effect_simulator_factory'; import { uiSetting } from '../../mocks/ui_setting'; diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx index 6d5bdbea48f97..4540c871b81b9 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/simulator/mock_resolver.tsx @@ -11,11 +11,11 @@ import React, { useEffect, useState, useCallback } from 'react'; import { Router } from 'react-router-dom'; import { I18nProvider } from '@kbn/i18n-react'; import { Provider } from 'react-redux'; -import { Store } from 'redux'; +import type { Store } from 'redux'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core/public'; -import { ResolverState, SideEffectSimulator, ResolverProps } from '../../types'; -import { ResolverAction } from '../../store/actions'; +import type { CoreStart } from '@kbn/core/public'; +import type { ResolverState, SideEffectSimulator, ResolverProps } from '../../types'; +import type { ResolverAction } from '../../store/actions'; import { ResolverWithoutProviders } from '../../view/resolver_without_providers'; import { SideEffectContext } from '../../view/side_effect_context'; diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/spy_middleware_factory.ts b/x-pack/plugins/security_solution/public/resolver/test_utilities/spy_middleware_factory.ts index 9fbee8cf350fc..2c0a25f1706cf 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/spy_middleware_factory.ts +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/spy_middleware_factory.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ResolverAction } from '../store/actions'; -import { SpyMiddleware, SpyMiddlewareStateActionPair } from '../types'; +import type { ResolverAction } from '../store/actions'; +import type { SpyMiddleware, SpyMiddlewareStateActionPair } from '../types'; /** * Return a `SpyMiddleware` to be used in testing. Use `debugActions` to console.log actions and the state they produced. diff --git a/x-pack/plugins/security_solution/public/resolver/test_utilities/url_search.ts b/x-pack/plugins/security_solution/public/resolver/test_utilities/url_search.ts index f337e412aa1c2..d6e850d6b1287 100644 --- a/x-pack/plugins/security_solution/public/resolver/test_utilities/url_search.ts +++ b/x-pack/plugins/security_solution/public/resolver/test_utilities/url_search.ts @@ -6,7 +6,7 @@ */ import { encode } from 'rison-node'; -import { PanelViewAndParameters } from '../types'; +import type { PanelViewAndParameters } from '../types'; /** * Calculate the expected URL search based on options. diff --git a/x-pack/plugins/security_solution/public/resolver/types.ts b/x-pack/plugins/security_solution/public/resolver/types.ts index 52b39b6ae7279..29124a89bd548 100644 --- a/x-pack/plugins/security_solution/public/resolver/types.ts +++ b/x-pack/plugins/security_solution/public/resolver/types.ts @@ -7,11 +7,11 @@ import type ResizeObserver from 'resize-observer-polyfill'; import type React from 'react'; -import { Store, Middleware, Dispatch } from 'redux'; -import { BBox } from 'rbush'; -import { Provider } from 'react-redux'; -import { ResolverAction } from './store/actions'; -import { +import type { Store, Middleware, Dispatch } from 'redux'; +import type { BBox } from 'rbush'; +import type { Provider } from 'react-redux'; +import type { ResolverAction } from './store/actions'; +import type { ResolverNode, ResolverRelatedEvents, ResolverEntityIndex, @@ -20,7 +20,7 @@ import { NewResolverTree, ResolverSchema, } from '../../common/endpoint/types'; -import { Tree } from '../../common/endpoint/generate_data'; +import type { Tree } from '../../common/endpoint/generate_data'; /** * Redux state for the Resolver feature. Properties on this interface are populated via multiple reducers using redux's `combineReducers`. diff --git a/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx index 57ce1b1991fdd..ffebf2e1d780a 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/clickthrough.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; import { noAncestorsTwoChildenInIndexCalledAwesomeIndex } from '../data_access_layer/mocks/no_ancestors_two_children_in_index_called_awesome_index'; import { noAncestorsTwoChildren } from '../data_access_layer/mocks/no_ancestors_two_children'; import { Simulator } from '../test_utilities/simulator'; @@ -13,9 +13,9 @@ import { Simulator } from '../test_utilities/simulator'; import '../test_utilities/extend_jest'; import { noAncestorsTwoChildrenWithRelatedEventsOnOrigin } from '../data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin'; import { urlSearch } from '../test_utilities/url_search'; -import { Vector2, AABB, TimeRange, DataAccessLayer } from '../types'; +import type { Vector2, AABB, TimeRange, DataAccessLayer } from '../types'; import { generateTreeWithDAL } from '../data_access_layer/mocks/generator_tree'; -import { SafeResolverEvent } from '../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../common/endpoint/types'; let simulator: Simulator; let databaseDocumentID: string; diff --git a/x-pack/plugins/security_solution/public/resolver/view/edge_line.tsx b/x-pack/plugins/security_solution/public/resolver/view/edge_line.tsx index 5508a7e0aed76..329b5b1da40c8 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/edge_line.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/edge_line.tsx @@ -11,7 +11,7 @@ import React from 'react'; import styled from 'styled-components'; import { FormattedMessage } from '@kbn/i18n-react'; import { applyMatrix3, distance, angle } from '../models/vector2'; -import { Vector2, Matrix3, EdgeLineMetadata } from '../types'; +import type { Vector2, Matrix3, EdgeLineMetadata } from '../types'; import { fontSize } from './font_size'; import { useColors } from './use_colors'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/graph_controls.tsx b/x-pack/plugins/security_solution/public/resolver/view/graph_controls.tsx index 68222ce8cd9e7..099f1b556e601 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/graph_controls.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/graph_controls.tsx @@ -11,6 +11,7 @@ import React, { useCallback, useMemo, useContext, useState } from 'react'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; +import type { EuiRangeProps } from '@elastic/eui'; import { EuiRange, EuiPanel, @@ -21,13 +22,12 @@ import { EuiIconTip, EuiDescriptionListTitle, EuiDescriptionListDescription, - EuiRangeProps, } from '@elastic/eui'; import { useSelector, useDispatch } from 'react-redux'; import { SideEffectContext } from './side_effect_context'; -import { Vector2 } from '../types'; +import type { Vector2 } from '../types'; import * as selectors from '../store/selectors'; -import { ResolverAction } from '../store/actions'; +import type { ResolverAction } from '../store/actions'; import { useColors } from './use_colors'; import { StyledDescriptionList } from './panels/styles'; import { CubeForProcess } from './panels/cube_for_process'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/index.tsx b/x-pack/plugins/security_solution/public/resolver/view/index.tsx index 794658758eccf..2d30108006b29 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/index.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/index.tsx @@ -11,8 +11,8 @@ import React, { useMemo, useState, useEffect } from 'react'; import { Provider } from 'react-redux'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { resolverStoreFactory } from '../store'; -import { StartServices } from '../../types'; -import { DataAccessLayer, ResolverProps } from '../types'; +import type { StartServices } from '../../types'; +import type { DataAccessLayer, ResolverProps } from '../types'; import { dataAccessLayerFactory } from '../data_access_layer/factory'; import { ResolverWithoutProviders } from './resolver_without_providers'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx index 72db334e17c2c..3a55b29383a1f 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panel.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { createMemoryHistory, History as HistoryPackageHistoryInterface } from 'history'; +import type { History as HistoryPackageHistoryInterface } from 'history'; +import { createMemoryHistory } from 'history'; import { noAncestorsTwoChildrenWithRelatedEventsOnOrigin } from '../data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin'; import { Simulator } from '../test_utilities/simulator'; // Extend jest with a custom matcher diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/breadcrumbs.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/breadcrumbs.tsx index 839d16b3e3e36..5e34c87d155b4 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/breadcrumbs.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/breadcrumbs.tsx @@ -7,7 +7,7 @@ /* eslint-disable react/display-name */ -import { EuiBreadcrumb } from '@elastic/eui'; +import type { EuiBreadcrumb } from '@elastic/eui'; import React, { memo, useMemo } from 'react'; import { ThemedBreadcrumbs } from './styles'; import { useColors } from '../use_colors'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/cube_for_process.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/cube_for_process.tsx index d6b9f93992c25..d16e1bec3c36c 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/cube_for_process.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/cube_for_process.tsx @@ -18,7 +18,7 @@ interface StyledSVGCube { } import { useCubeAssets } from '../use_cube_assets'; import { useSymbolIDs } from '../use_symbol_ids'; -import { NodeDataStatus } from '../../types'; +import type { NodeDataStatus } from '../../types'; /** * Icon representing a process node. diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.test.tsx index cef8aa718985f..838e6e8ef044c 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.test.tsx @@ -11,7 +11,7 @@ import { I18nProvider } from '@kbn/i18n-react'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { DescriptiveName } from './descriptive_name'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; describe('DescriptiveName', () => { const generator = new EndpointDocGenerator('seed'); diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.tsx index a95f52d612a76..9a5137d4bec1b 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/descriptive_name.tsx @@ -13,7 +13,7 @@ import { processNameSafeVersion, entityIDSafeVersion, } from '../../../../common/endpoint/models/event'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; /** * Based on the ECS category of the event, attempt to provide a more descriptive name diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/event_detail.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/event_detail.tsx index 21a3f6d9ce066..48322f7edf05b 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/event_detail.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/event_detail.tsx @@ -12,8 +12,8 @@ import React, { memo, useMemo, Fragment } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import type { EuiBreadcrumb } from '@elastic/eui'; import { - EuiBreadcrumb, EuiSpacer, EuiText, EuiDescriptionList, @@ -32,10 +32,10 @@ import * as eventModel from '../../../../common/endpoint/models/event'; import * as selectors from '../../store/selectors'; import { PanelLoading } from './panel_loading'; import { PanelContentError } from './panel_content_error'; -import { ResolverState } from '../../types'; +import type { ResolverState } from '../../types'; import { DescriptiveName } from './descriptive_name'; import { useLinkProps } from '../use_link_props'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; import { deepObjectEntries } from './deep_object_entries'; import { useFormattedDate } from './use_formatted_date'; import * as nodeDataModel from '../../models/node_data'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/index.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/index.tsx index e0f316d5eeaac..423387294a3c1 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/index.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/index.tsx @@ -15,7 +15,7 @@ import { NodeEvents } from './node_events'; import { NodeDetail } from './node_detail'; import { NodeList } from './node_list'; import { EventDetail } from './event_detail'; -import { PanelViewAndParameters } from '../../types'; +import type { PanelViewAndParameters } from '../../types'; /** * Show the panel that matches the `panelViewAndParameters` (derived from the browser's location.search) diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx index eaa7813ddc966..04e2780f6b3d0 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_detail.tsx @@ -7,13 +7,14 @@ /* eslint-disable react/display-name */ -import React, { memo, useMemo, HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React, { memo, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { i18n } from '@kbn/i18n'; import { htmlIdGenerator, EuiSpacer, EuiTitle, EuiText, EuiTextColor, EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; -import { EuiDescriptionListProps } from '@elastic/eui/src/components/description_list/description_list'; +import type { EuiDescriptionListProps } from '@elastic/eui/src/components/description_list/description_list'; import { StyledDescriptionList, StyledTitle } from './styles'; import * as selectors from '../../store/selectors'; import * as eventModel from '../../../../common/endpoint/models/event'; @@ -23,9 +24,9 @@ import { Breadcrumbs } from './breadcrumbs'; import { processPath, processPID } from '../../models/process_event'; import * as nodeDataModel from '../../models/node_data'; import { CubeForProcess } from './cube_for_process'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; import { useCubeAssets } from '../use_cube_assets'; -import { ResolverState } from '../../types'; +import type { ResolverState } from '../../types'; import { PanelLoading } from './panel_loading'; import { StyledPanel } from '../styles'; import { useLinkProps } from '../use_link_props'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events.tsx index 61e848782a8ed..c21ca56034f77 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events.tsx @@ -9,14 +9,15 @@ import React, { memo, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiBasicTableColumn, EuiButtonEmpty, EuiSpacer, EuiInMemoryTable } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiButtonEmpty, EuiSpacer, EuiInMemoryTable } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { useSelector } from 'react-redux'; import { Breadcrumbs } from './breadcrumbs'; import * as event from '../../../../common/endpoint/models/event'; -import { EventStats } from '../../../../common/endpoint/types'; +import type { EventStats } from '../../../../common/endpoint/types'; import * as selectors from '../../store/selectors'; -import { ResolverState } from '../../types'; +import type { ResolverState } from '../../types'; import { StyledPanel } from '../styles'; import { PanelLoading } from './panel_loading'; import { useLinkProps } from '../use_link_props'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.test.tsx index e1e26f787a63e..5056f5e78c554 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { createMemoryHistory, History as HistoryPackageHistoryInterface } from 'history'; +import type { History as HistoryPackageHistoryInterface } from 'history'; +import { createMemoryHistory } from 'history'; import { oneNodeWithPaginatedEvents } from '../../data_access_layer/mocks/one_node_with_paginated_related_events'; import { Simulator } from '../../test_utilities/simulator'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.tsx index ebe04139802f4..9e6eb7d0cf266 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_events_of_type.tsx @@ -24,9 +24,9 @@ import { StyledPanel } from '../styles'; import { BoldCode, StyledTime } from './styles'; import { Breadcrumbs } from './breadcrumbs'; import * as eventModel from '../../../../common/endpoint/models/event'; -import { SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { SafeResolverEvent } from '../../../../common/endpoint/types'; import * as selectors from '../../store/selectors'; -import { ResolverState } from '../../types'; +import type { ResolverState } from '../../types'; import { PanelLoading } from './panel_loading'; import { DescriptiveName } from './descriptive_name'; import { useLinkProps } from '../use_link_props'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/node_list.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/node_list.tsx index 3b42fedeb3280..04c2297e4c0f8 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/node_list.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/node_list.tsx @@ -12,13 +12,8 @@ import { useDispatch, useSelector } from 'react-redux'; /* eslint-disable react/display-name */ import React, { memo, useMemo, useCallback, useContext } from 'react'; -import { - EuiBasicTableColumn, - EuiBadge, - EuiButtonEmpty, - EuiSpacer, - EuiInMemoryTable, -} from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBadge, EuiButtonEmpty, EuiSpacer, EuiInMemoryTable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { SideEffectContext } from '../side_effect_context'; import { StyledPanel } from '../styles'; @@ -33,10 +28,10 @@ import * as selectors from '../../store/selectors'; import { Breadcrumbs } from './breadcrumbs'; import { CubeForProcess } from './cube_for_process'; import { LimitWarning } from '../limit_warnings'; -import { ResolverState } from '../../types'; +import type { ResolverState } from '../../types'; import { useLinkProps } from '../use_link_props'; import { useColors } from '../use_colors'; -import { ResolverAction } from '../../store/actions'; +import type { ResolverAction } from '../../store/actions'; import { useFormattedDate } from './use_formatted_date'; import { CopyablePanelField } from './copyable_panel_field'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/panels/panel_states.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/panels/panel_states.test.tsx index 23d10e06d6059..c1668e9080642 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/panels/panel_states.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/panels/panel_states.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { createMemoryHistory, History as HistoryPackageHistoryInterface } from 'history'; +import type { History as HistoryPackageHistoryInterface } from 'history'; +import { createMemoryHistory } from 'history'; import { Simulator } from '../../test_utilities/simulator'; import { pausifyMock } from '../../data_access_layer/mocks/pausify_mock'; import { emptifyMock } from '../../data_access_layer/mocks/emptify_mock'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx index f6064fe54f6db..2f3f1ba1afd39 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx @@ -13,8 +13,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { NodeSubMenu } from './styles'; import { applyMatrix3 } from '../models/vector2'; -import { Vector2, Matrix3, ResolverState } from '../types'; -import { ResolverNode } from '../../../common/endpoint/types'; +import type { Vector2, Matrix3, ResolverState } from '../types'; +import type { ResolverNode } from '../../../common/endpoint/types'; import { useResolverDispatch } from './use_resolver_dispatch'; import { SideEffectContext } from './side_effect_context'; import * as nodeModel from '../../../common/endpoint/models/node'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx b/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx index 863ca21e4fd7e..91c2527265361 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/resolver_without_providers.tsx @@ -22,7 +22,7 @@ import { useStateSyncingActions } from './use_state_syncing_actions'; import { StyledMapContainer, GraphContainer } from './styles'; import * as nodeModel from '../../../common/endpoint/models/node'; import { SideEffectContext } from './side_effect_context'; -import { ResolverProps, ResolverState } from '../types'; +import type { ResolverProps, ResolverState } from '../types'; import { PanelRouter } from './panels'; import { useColors } from './use_colors'; import { useSyncSelectedNode } from './use_sync_selected_node'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts b/x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts index 881bd9275848e..8c7f62c4cea59 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/side_effect_context.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { createContext, Context } from 'react'; +import type { Context } from 'react'; +import { createContext } from 'react'; import ResizeObserver from 'resize-observer-polyfill'; -import { SideEffectors } from '../types'; +import type { SideEffectors } from '../types'; /** * React context that provides 'side-effectors' which we need to mock during testing. diff --git a/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts b/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts index 268b75b4a3fbb..2dd128218411d 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/side_effect_simulator_factory.ts @@ -7,7 +7,7 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { act } from '@testing-library/react'; -import { SideEffectSimulator } from '../types'; +import type { SideEffectSimulator } from '../types'; /** * Create mock `SideEffectors` for `SideEffectContext.Provider`. The `control` diff --git a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx index 878dbe30a6971..59c80f52c1f37 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/submenu.tsx @@ -7,10 +7,10 @@ import React, { useMemo, useContext, useCallback } from 'react'; import { useDispatch } from 'react-redux'; -import { EventStats } from '../../../common/endpoint/types'; +import type { EventStats } from '../../../common/endpoint/types'; import { useColors } from './use_colors'; import { useLinkProps } from './use_link_props'; -import { ResolverAction } from '../store/actions'; +import type { ResolverAction } from '../store/actions'; import { SideEffectContext } from './side_effect_context'; import { FormattedCount } from '../../common/components/formatted_number'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx index 16d25a519fe8c..e318dfcb562e9 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/use_camera.test.tsx @@ -8,18 +8,19 @@ // Extend jest with a custom matcher import '../test_utilities/extend_jest'; -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { useCamera } from './use_camera'; import { Provider } from 'react-redux'; import * as selectors from '../store/selectors'; -import { Matrix3, ResolverStore, SideEffectors, SideEffectSimulator } from '../types'; -import { ResolverNode } from '../../../common/endpoint/types'; +import type { Matrix3, ResolverStore, SideEffectors, SideEffectSimulator } from '../types'; +import type { ResolverNode } from '../../../common/endpoint/types'; import { SideEffectContext } from './side_effect_context'; import { applyMatrix3 } from '../models/vector2'; import { sideEffectSimulatorFactory } from './side_effect_simulator_factory'; import { mock as mockResolverTree } from '../models/resolver_tree'; -import { ResolverAction } from '../store/actions'; +import type { ResolverAction } from '../store/actions'; import { createStore } from 'redux'; import { resolverReducer } from '../store/reducer'; import { mockTreeFetcherParameters } from '../mocks/tree_fetcher_parameters'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_camera.ts b/x-pack/plugins/security_solution/public/resolver/view/use_camera.ts index 286c4075b38b5..7af543984be40 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_camera.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_camera.ts @@ -5,17 +5,11 @@ * 2.0. */ -import React, { - useCallback, - useState, - useEffect, - useRef, - useLayoutEffect, - useContext, -} from 'react'; +import type React from 'react'; +import { useCallback, useState, useEffect, useRef, useLayoutEffect, useContext } from 'react'; import { useSelector } from 'react-redux'; import { SideEffectContext } from './side_effect_context'; -import { Matrix3 } from '../types'; +import type { Matrix3 } from '../types'; import { useResolverDispatch } from './use_resolver_dispatch'; import * as selectors from '../store/selectors'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_cube_assets.ts b/x-pack/plugins/security_solution/public/resolver/view/use_cube_assets.ts index f2fef61d6f385..e360062c64376 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_cube_assets.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_cube_assets.ts @@ -8,9 +8,9 @@ import { i18n } from '@kbn/i18n'; import { euiThemeVars } from '@kbn/ui-theme'; -import { ButtonColor } from '@elastic/eui'; +import type { ButtonColor } from '@elastic/eui'; import { useMemo } from 'react'; -import { ResolverProcessType, NodeDataStatus } from '../types'; +import type { ResolverProcessType, NodeDataStatus } from '../types'; import { useSymbolIDs } from './use_symbol_ids'; import { useColors } from './use_colors'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_link_props.ts b/x-pack/plugins/security_solution/public/resolver/view/use_link_props.ts index b0544c8b21dde..033c87ea88b1e 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_link_props.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_link_props.ts @@ -6,11 +6,11 @@ */ import { useSelector } from 'react-redux'; -import { MouseEventHandler } from 'react'; +import type { MouseEventHandler } from 'react'; import { useNavigateOrReplace } from './use_navigate_or_replace'; import * as selectors from '../store/selectors'; -import { PanelViewAndParameters, ResolverState } from '../types'; +import type { PanelViewAndParameters, ResolverState } from '../types'; type EventHandlerCallback = MouseEventHandler; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_navigate_or_replace.ts b/x-pack/plugins/security_solution/public/resolver/view/use_navigate_or_replace.ts index 21230977b1cae..447bedb673523 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_navigate_or_replace.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_navigate_or_replace.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { MouseEventHandler, useCallback } from 'react'; +import type { MouseEventHandler } from 'react'; +import { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; -import { LocationDescriptorObject } from 'history'; +import type { LocationDescriptorObject } from 'history'; type EventHandlerCallback = MouseEventHandler; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts index 15566e5e17bfd..b707e7ffcd768 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_dispatch.ts @@ -6,7 +6,7 @@ */ import { useDispatch } from 'react-redux'; -import { ResolverAction } from '../store/actions'; +import type { ResolverAction } from '../store/actions'; /** * Call `useDispatch`, but only accept `ResolverAction` actions. diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.test.tsx b/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.test.tsx index 7ff17e2a86b57..bd5d403afe8f0 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.test.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { createMemoryHistory, History as HistoryPackageHistoryInterface } from 'history'; +import type { History as HistoryPackageHistoryInterface } from 'history'; +import { createMemoryHistory } from 'history'; import { noAncestorsTwoChildrenWithRelatedEventsOnOrigin } from '../data_access_layer/mocks/no_ancestors_two_children_with_related_events_on_origin'; import { Simulator } from '../test_utilities/simulator'; import '../test_utilities/extend_jest'; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.ts b/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.ts index 0c794d476537e..2ca4eb3c7816d 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_sync_selected_node.ts @@ -10,7 +10,7 @@ import { useSelector, useDispatch } from 'react-redux'; import { useLocation } from 'react-router-dom'; import * as selectors from '../store/selectors'; import { SideEffectContext } from './side_effect_context'; -import { ResolverAction } from '../store/actions'; +import type { ResolverAction } from '../store/actions'; import { panelViewAndParameters } from '../store/panel_view_and_parameters'; /** diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx b/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx index 368bf2589d5c7..50c7a095887c0 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx +++ b/x-pack/plugins/security_solution/public/risk_score/containers/all/index.tsx @@ -13,25 +13,27 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { createFilter } from '../../../common/containers/helpers'; import { useKibana } from '../../../common/lib/kibana'; -import { +import type { RiskScoreStrategyResponse, - getHostRiskIndex, HostsRiskScore, UsersRiskScore, RiskScoreSortField, RiskScoreRequestOptions, +} from '../../../../common/search_strategy'; +import { + getHostRiskIndex, RiskQueries, getUserRiskIndex, } from '../../../../common/search_strategy'; -import { ESQuery } from '../../../../common/typed_json'; +import type { ESQuery } from '../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../helpers'; -import { InspectResponse } from '../../../types'; +import type { InspectResponse } from '../../../types'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; import { isIndexNotFoundError } from '../../../common/utils/exceptions'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; -import { inputsModel } from '../../../common/store'; +import type { inputsModel } from '../../../common/store'; import { useSpaceId } from '../common'; export interface RiskScoreState { diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/index.ts b/x-pack/plugins/security_solution/public/risk_score/containers/index.ts index ffe964b974776..56e3ff14ce148 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/index.ts +++ b/x-pack/plugins/security_solution/public/risk_score/containers/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsRiskScore } from '../../../common/search_strategy/security_solution/risk_score'; +import type { HostsRiskScore } from '../../../common/search_strategy/security_solution/risk_score'; export * from './all'; export * from './kpi'; diff --git a/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx b/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx index 1df1ac9f9ac5f..685a0c992c9f1 100644 --- a/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx +++ b/x-pack/plugins/security_solution/public/risk_score/containers/kpi/index.tsx @@ -13,21 +13,23 @@ import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { createFilter } from '../../../common/containers/helpers'; +import type { + KpiRiskScoreRequestOptions, + KpiRiskScoreStrategyResponse, + RiskScoreAggByFields, +} from '../../../../common/search_strategy'; import { getHostRiskIndex, getUserRiskIndex, - KpiRiskScoreRequestOptions, - KpiRiskScoreStrategyResponse, RiskQueries, - RiskScoreAggByFields, RiskSeverity, } from '../../../../common/search_strategy'; import { useKibana } from '../../../common/lib/kibana'; import { isIndexNotFoundError } from '../../../common/utils/exceptions'; -import { ESTermQuery } from '../../../../common/typed_json'; +import type { ESTermQuery } from '../../../../common/typed_json'; import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; -import { SeverityCount } from '../../../common/components/severity/types'; +import type { SeverityCount } from '../../../common/components/severity/types'; import { useSpaceId } from '../common'; type GetHostsRiskScoreProps = KpiRiskScoreRequestOptions & { diff --git a/x-pack/plugins/security_solution/public/rules/index.ts b/x-pack/plugins/security_solution/public/rules/index.ts index 10af0407c18e6..cd24b2cab8e0a 100644 --- a/x-pack/plugins/security_solution/public/rules/index.ts +++ b/x-pack/plugins/security_solution/public/rules/index.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { SecuritySubPlugin } from '../app/types'; +import type { SecuritySubPlugin } from '../app/types'; import { DETECTIONS_TIMELINE_IDS } from '../detections'; import { getTimelinesInStorageByIds } from '../timelines/containers/local_storage'; import { routes } from './routes'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx index 55db06c74104c..bcda8c7167bf6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx @@ -6,14 +6,12 @@ */ import { findIndex } from 'lodash/fp'; -import { EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; -import { BrowserField, BrowserFields, getAllFieldsByName } from '../../../common/containers/source'; -import { - QueryOperator, - EXISTS_OPERATOR, - IS_OPERATOR, -} from '../timeline/data_providers/data_provider'; +import type { BrowserField, BrowserFields } from '../../../common/containers/source'; +import { getAllFieldsByName } from '../../../common/containers/source'; +import type { QueryOperator } from '../timeline/data_providers/data_provider'; +import { EXISTS_OPERATOR, IS_OPERATOR } from '../timeline/data_providers/data_provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx index 9aa0f85f5fadf..223a8f8cccd9f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/index.tsx @@ -6,10 +6,10 @@ */ import { noop, startsWith, endsWith } from 'lodash/fp'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiButton, EuiComboBox, - EuiComboBoxOptionOption, EuiFieldText, EuiFlexGroup, EuiFlexItem, @@ -20,9 +20,10 @@ import { import React, { useEffect, useMemo, useState, useCallback } from 'react'; import styled from 'styled-components'; -import { BrowserFields } from '../../../common/containers/source'; -import { OnDataProviderEdited } from '../timeline/events'; -import { DataProviderType, QueryOperator } from '../timeline/data_providers/data_provider'; +import type { BrowserFields } from '../../../common/containers/source'; +import type { OnDataProviderEdited } from '../timeline/events'; +import type { QueryOperator } from '../timeline/data_providers/data_provider'; +import { DataProviderType } from '../timeline/data_providers/data_provider'; import { getCategorizedFieldNames, diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx index e6c745564ed3b..03717b0722cfe 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.test.tsx @@ -26,8 +26,9 @@ import { MoreContainer, } from './field_renderers'; import { mockData } from '../../../network/components/details/mock'; -import { AutonomousSystem, FlowTarget } from '../../../../common/search_strategy'; -import { HostEcs } from '../../../../common/ecs/host'; +import type { AutonomousSystem } from '../../../../common/search_strategy'; +import { FlowTarget } from '../../../../common/search_strategy'; +import type { HostEcs } from '../../../../common/ecs/host'; jest.mock('../../../common/lib/kibana'); jest.mock('../../../common/lib/kibana/kibana_react', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx index 662a012033887..1c0029b97b733 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/field_renderers/field_renderers.tsx @@ -11,8 +11,8 @@ import { getOr } from 'lodash/fp'; import React, { useCallback, Fragment, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { HostEcs } from '../../../../common/ecs/host'; -import { +import type { HostEcs } from '../../../../common/ecs/host'; +import type { AutonomousSystem, FlowTarget, FlowTargetSourceDest, @@ -25,7 +25,8 @@ import { FormattedRelativePreferenceDate } from '../../../common/components/form import { HostDetailsLink, ReputationLink, WhoIsLink } from '../../../common/components/links'; import { Spacer } from '../../../common/components/page'; import * as i18n from '../../../network/components/details/translations'; -import { IS_OPERATOR, QueryOperator } from '../../../../common/types'; +import type { QueryOperator } from '../../../../common/types'; +import { IS_OPERATOR } from '../../../../common/types'; import { DraggableWrapper } from '../../../common/components/drag_and_drop/draggable_wrapper'; const DraggableContainerFlexGroup = styled(EuiFlexGroup)` diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/create_field_button/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/create_field_button/index.test.tsx index d1f7740268313..a7051882ee881 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/create_field_button/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/create_field_button/index.test.tsx @@ -7,7 +7,8 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { useCreateFieldButton, UseCreateFieldButton, UseCreateFieldButtonProps } from '.'; +import type { UseCreateFieldButton, UseCreateFieldButtonProps } from '.'; +import { useCreateFieldButton } from '.'; import { TestProviders } from '../../../../common/mock'; import { renderHook } from '@testing-library/react-hooks'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.test.tsx index 7b3b303dc2962..ea0f71f4f3923 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.test.tsx @@ -7,11 +7,12 @@ import React from 'react'; import { render } from '@testing-library/react'; -import { useFieldTableColumns, UseFieldTableColumnsProps, UseFieldTableColumns } from '.'; +import type { UseFieldTableColumnsProps, UseFieldTableColumns } from '.'; +import { useFieldTableColumns } from '.'; import { TestProviders } from '../../../../common/mock'; import { renderHook } from '@testing-library/react-hooks'; -import { BrowserFieldItem } from '@kbn/timelines-plugin/common/types'; +import type { BrowserFieldItem } from '@kbn/timelines-plugin/common/types'; import { EuiInMemoryTable } from '@elastic/eui'; const mockOnHide = jest.fn(); diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.tsx index 29622eadb6a08..e2922c9e8d798 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/field_table_columns/index.tsx @@ -18,7 +18,7 @@ import { EuiText, EuiHighlight, } from '@elastic/eui'; -import { Action } from '@elastic/eui/src/components/basic_table/action_types'; +import type { Action } from '@elastic/eui/src/components/basic_table/action_types'; import type { BrowserFieldItem, GetFieldTableColumns } from '@kbn/timelines-plugin/common/types'; import * as i18n from './translations'; @@ -28,7 +28,7 @@ import { } from '../../../../common/components/event_details/helpers'; import { getEmptyValue } from '../../../../common/components/empty_value'; import { EllipsisText } from '../../../../common/components/truncatable_text'; -import { OpenFieldEditor, OpenDeleteFieldModal } from '..'; +import type { OpenFieldEditor, OpenDeleteFieldModal } from '..'; export interface UseFieldTableColumnsProps { hasFieldEditPermission: boolean; diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx index 6539383639fe0..96ed68d32398d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.test.tsx @@ -7,27 +7,22 @@ import React from 'react'; import { render, act } from '@testing-library/react'; -import { - useFieldBrowserOptions, - UseFieldBrowserOptionsProps, - UseFieldBrowserOptions, - FieldEditorActionsRef, -} from '.'; -import { - indexPatternFieldEditorPluginMock, - Start, -} from '@kbn/data-view-field-editor-plugin/public/mocks'; +import type { UseFieldBrowserOptionsProps, UseFieldBrowserOptions, FieldEditorActionsRef } from '.'; +import { useFieldBrowserOptions } from '.'; +import type { Start } from '@kbn/data-view-field-editor-plugin/public/mocks'; +import { indexPatternFieldEditorPluginMock } from '@kbn/data-view-field-editor-plugin/public/mocks'; import { TestProviders } from '../../../common/mock'; import { useKibana } from '../../../common/lib/kibana'; import type { DataView, DataViewField } from '@kbn/data-plugin/common'; import { TimelineId } from '../../../../common/types'; -import { renderHook, RenderHookResult } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react-hooks'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; import { removeColumn, upsertColumn } from '../../store/timeline/actions'; import { defaultColumnHeaderType } from '../timeline/body/column_headers/default_headers'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../timeline/body/constants'; -import { BrowserFieldItem } from '@kbn/timelines-plugin/common/types'; +import type { BrowserFieldItem } from '@kbn/timelines-plugin/common/types'; import { EuiInMemoryTable } from '@elastic/eui'; let mockIndexPatternFieldEditor: Start; diff --git a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx index be67cb83e84b4..0d7a23800d404 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/fields_browser/index.tsx @@ -5,19 +5,20 @@ * 2.0. */ -import { MutableRefObject, useCallback, useEffect, useMemo, useState } from 'react'; +import type { MutableRefObject } from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; -import { DataViewField, DataView } from '@kbn/data-views-plugin/common'; +import type { DataViewField, DataView } from '@kbn/data-views-plugin/common'; import type { CreateFieldComponent, GetFieldTableColumns, } from '@kbn/timelines-plugin/common/types'; -import { TimelineId } from '../../../../common/types'; +import type { TimelineId } from '../../../../common/types'; import { useDataView } from '../../../common/containers/source/use_data_view'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { useKibana } from '../../../common/lib/kibana'; import { sourcererSelectors } from '../../../common/store'; -import { SourcererScopeName } from '../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../common/store/sourcerer/model'; import { upsertColumn, removeColumn } from '../../store/timeline/actions'; import { defaultColumnHeaderType } from '../timeline/body/column_headers/default_headers'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../timeline/body/constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_timeline_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_timeline_button/index.tsx index 5ea1b60e4f156..04bd9d506b63e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_timeline_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_timeline_button/index.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { OpenTimelineModalButton } from '../../open_timeline/open_timeline_modal/open_timeline_modal_button'; import { OpenTimelineModal } from '../../open_timeline/open_timeline_modal'; -import { ActionTimelineToShow } from '../../open_timeline/types'; +import type { ActionTimelineToShow } from '../../open_timeline/types'; import * as i18n from '../../timeline/properties/translations'; import { NewTimeline } from '../../timeline/properties/helpers'; import { NewTemplateTimeline } from '../../timeline/properties/new_template_timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx index 736fb23e4b8a0..41f7d298eaa61 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx @@ -10,7 +10,7 @@ import { EuiButton, EuiContextMenuPanel, EuiContextMenuItem, EuiPopover } from ' import React, { useCallback, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; -import { Case } from '@kbn/cases-plugin/common'; +import type { Case } from '@kbn/cases-plugin/common'; import { APP_ID, APP_UI_ID } from '../../../../../common/constants'; import { timelineSelectors } from '../../../store/timeline'; import { setInsertTimeline, showTimeline } from '../../../store/timeline/actions'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/bottom_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/bottom_bar/index.tsx index 32d36006fffd5..732212b29051c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/bottom_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/bottom_bar/index.tsx @@ -9,7 +9,7 @@ import { EuiPanel } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { DataProvider } from '../../timeline/data_providers/data_provider'; +import type { DataProvider } from '../../timeline/data_providers/data_provider'; import { flattenIntoAndGroups } from '../../timeline/data_providers/helpers'; import { DataProviders } from '../../timeline/data_providers'; import { FLYOUT_BUTTON_BAR_CLASS_NAME } from '../../timeline/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx index d731cd3a03ae0..3541af9fcb7ca 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/index.tsx @@ -16,7 +16,8 @@ import { EuiTextColor, useEuiTheme, } from '@elastic/eui'; -import React, { MouseEventHandler, MouseEvent, useCallback, useMemo } from 'react'; +import type { MouseEventHandler, MouseEvent } from 'react'; +import React, { useCallback, useMemo } from 'react'; import { isEmpty, get, pick } from 'lodash/fp'; import { useDispatch, useSelector } from 'react-redux'; import styled from 'styled-components'; @@ -30,11 +31,11 @@ import { TimelineType, TimelineId, } from '../../../../../common/types/timeline'; -import { State } from '../../../../common/store'; +import type { State } from '../../../../common/store'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { AddToFavoritesButton } from '../../timeline/properties/helpers'; -import { TimerangeInput } from '../../../../../common/search_strategy'; +import type { TimerangeInput } from '../../../../../common/search_strategy'; import { AddToCaseButton } from '../add_to_case_button'; import { AddTimelineButton } from '../add_timeline_button'; import { SaveTimelineButton } from '../../timeline/header/save_timeline_button'; @@ -42,7 +43,7 @@ import { useGetUserCasesPermissions, useKibana } from '../../../../common/lib/ki import { InspectButton } from '../../../../common/components/inspect'; import { useTimelineKpis } from '../../../containers/kpis'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { TimelineModel } from '../../../store/timeline/model'; +import type { TimelineModel } from '../../../store/timeline/model'; import { startSelector, endSelector, diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/kpis.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/kpis.tsx index 5bfb099ecceef..4cb622ec801b4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/header/kpis.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/header/kpis.tsx @@ -12,7 +12,7 @@ import { EuiStat, EuiFlexItem, EuiFlexGroup, EuiToolTip } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { DEFAULT_NUMBER_FORMAT } from '../../../../../common/constants'; import { useUiSetting$ } from '../../../../common/lib/kibana'; -import { TimelineKpiStrategyResponse } from '../../../../../common/search_strategy'; +import type { TimelineKpiStrategyResponse } from '../../../../../common/search_strategy'; import { getEmptyValue } from '../../../../common/components/empty_value'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx index ab8ab6a3f4383..2b77901b4f102 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/index.tsx @@ -10,7 +10,7 @@ import { EuiFocusTrap, EuiOutsideClickDetector } from '@elastic/eui'; import React, { useEffect, useMemo, useCallback, useState, useRef } from 'react'; import { useDispatch } from 'react-redux'; -import { AppLeaveHandler } from '@kbn/core/public'; +import type { AppLeaveHandler } from '@kbn/core/public'; import { TimelineId, TimelineStatus, TimelineTabs } from '../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { timelineActions } from '../../store/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx index 8073d029ce40b..acd6016e737a3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/pane/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFlyout, EuiFlyoutProps } from '@elastic/eui'; +import type { EuiFlyoutProps } from '@elastic/eui'; +import { EuiFlyout } from '@elastic/eui'; import React, { useCallback, useEffect } from 'react'; import styled, { createGlobalStyle } from 'styled-components'; import { useDispatch } from 'react-redux'; @@ -15,7 +16,7 @@ import { TIMELINE_EUI_THEME_ZINDEX_LEVEL, } from '../../timeline/styles'; import { StatefulTimeline } from '../../timeline'; -import { TimelineId } from '../../../../../common/types/timeline'; +import type { TimelineId } from '../../../../../common/types/timeline'; import * as i18n from './translations'; import { timelineActions } from '../../../store/timeline'; import { defaultRowRenderers } from '../../timeline/body/renderers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx index c406607849772..4ba0acd561a32 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/formatted_ip/index.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useMemo, useContext } from 'react'; import { useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; -import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { StatefulEventContext } from '@kbn/timelines-plugin/public'; import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; import { @@ -21,13 +21,11 @@ import { escapeDataProviderId } from '../../../common/components/drag_and_drop/h import { Content } from '../../../common/components/draggables'; import { getOrEmptyTagFromValue } from '../../../common/components/empty_value'; import { parseQueryValue } from '../timeline/body/renderers/parse_query_value'; -import { DataProvider, IS_OPERATOR } from '../timeline/data_providers/data_provider'; +import type { DataProvider } from '../timeline/data_providers/data_provider'; +import { IS_OPERATOR } from '../timeline/data_providers/data_provider'; import { Provider } from '../timeline/data_providers/provider'; -import { - TimelineExpandedDetailType, - TimelineId, - TimelineTabs, -} from '../../../../common/types/timeline'; +import type { TimelineExpandedDetailType } from '../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; import { activeTimeline } from '../../containers/active_timeline_context'; import { timelineActions } from '../../store/timeline'; import { NetworkDetailsLink } from '../../../common/components/links'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx index eae5c633d3679..cc56c36337bd2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/lazy_accordion/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiAccordion, EuiAccordionProps } from '@elastic/eui'; +import type { EuiAccordionProps } from '@elastic/eui'; +import { EuiAccordion } from '@elastic/eui'; import React, { useState, useCallback } from 'react'; type Props = Pick> & { diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx index a755aa54fca7b..4bdfa3055a4e3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/index.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { Fingerprints } from './fingerprints'; import { NetflowColumns } from './netflow_columns'; -import { NetflowProps } from './types'; +import type { NetflowProps } from './types'; /** * Renders a visual representation of network traffic between hosts, diff --git a/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx index e319e803e63fe..60275a3e55041 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/netflow/netflow_columns/index.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { SourceDestination } from '../../../../network/components/source_destination'; import { DurationEventStartEnd } from './duration_event_start_end'; -import { NetflowColumnsProps } from './types'; +import type { NetflowColumnsProps } from './types'; import { UserProcess } from './user_process'; export const EVENT_START = 'event.start'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx index 21f3efb78462d..3ec407ba78e63 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/index.tsx @@ -17,8 +17,9 @@ import styled from 'styled-components'; import { useDispatch } from 'react-redux'; import { appActions } from '../../../../common/store/app'; -import { Note } from '../../../../common/lib/note'; -import { AssociateNote, updateAndAssociateNode, UpdateInternalNewNote } from '../helpers'; +import type { Note } from '../../../../common/lib/note'; +import type { AssociateNote, UpdateInternalNewNote } from '../helpers'; +import { updateAndAssociateNode } from '../helpers'; import * as i18n from '../translations'; import { NewNote } from './new_note'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx index bf1a2227f6f99..4d02a1e8c74c1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/add_note/new_note.tsx @@ -10,7 +10,7 @@ import React from 'react'; import styled from 'styled-components'; import { MarkdownEditor } from '../../../../common/components/markdown_editor'; -import { UpdateInternalNewNote } from '../helpers'; +import type { UpdateInternalNewNote } from '../helpers'; import * as i18n from '../translations'; const NewNoteTabs = styled(EuiFlexItem)` diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx index 24854f5278080..af2bfbf20365f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/helpers.tsx @@ -11,7 +11,7 @@ import React from 'react'; import styled from 'styled-components'; import uuid from 'uuid'; -import { Note } from '../../../common/lib/note'; +import type { Note } from '../../../common/lib/note'; import * as i18n from './translations'; import { CountBadge } from '../../../common/components/page'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx index 8d56c31224863..451a132e0a9b0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.test.tsx @@ -12,7 +12,7 @@ import '../../../../common/mock/formatted_relative'; import { NoteCards } from '.'; import { TimelineStatus } from '../../../../../common/types/timeline'; import { TestProviders } from '../../../../common/mock'; -import { TimelineResultNote } from '../../open_timeline/types'; +import type { TimelineResultNote } from '../../open_timeline/types'; const getNotesByIds = () => ({ abc: { diff --git a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx index fb9cdd37bf4db..59ebf283d1d66 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/notes/note_cards/index.tsx @@ -11,9 +11,9 @@ import styled from 'styled-components'; import { getNotesContainerClassName } from '@kbn/timelines-plugin/public'; import { AddNote } from '../add_note'; -import { AssociateNote } from '../helpers'; +import type { AssociateNote } from '../helpers'; import { NotePreviews, NotePreviewsContainer } from '../../open_timeline/note_previews'; -import { TimelineResultNote } from '../../open_timeline/types'; +import type { TimelineResultNote } from '../../open_timeline/types'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/index.tsx index 41e491ccc0ceb..3df69da9cfd95 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/delete_timeline_modal/index.tsx @@ -11,7 +11,7 @@ import { createGlobalStyle } from 'styled-components'; import { useParams } from 'react-router-dom'; import { DeleteTimelineModal, DELETE_TIMELINE_MODAL_WIDTH } from './delete_timeline_modal'; -import { DeleteTimelines } from '../types'; +import type { DeleteTimelines } from '../types'; import { TimelineType } from '../../../../../common/types/timeline'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_actions.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_actions.tsx index cae7dce99edb9..9058c37f6ec91 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_actions.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_actions.tsx @@ -6,7 +6,7 @@ */ import { useState, useCallback } from 'react'; -import { OpenTimelineResult } from './types'; +import type { OpenTimelineResult } from './types'; export const useEditTimelineActions = () => { const [actionItem, setActionTimeline] = useState(null); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_batch_actions.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_batch_actions.tsx index c1372868e07df..cec4cd42775cc 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_batch_actions.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/edit_timeline_batch_actions.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import { EuiContextMenuPanel, EuiContextMenuItem, EuiBasicTable } from '@elastic/eui'; +import type { EuiBasicTable } from '@elastic/eui'; +import { EuiContextMenuPanel, EuiContextMenuItem } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; import { TimelineType } from '../../../../common/types/timeline'; import * as i18n from './translations'; -import { DeleteTimelines, OpenTimelineResult } from './types'; +import type { DeleteTimelines, OpenTimelineResult } from './types'; import { EditTimelineActions } from './export_timeline'; import { useEditTimelineActions } from './edit_timeline_actions'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/export_timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/export_timeline.test.tsx index 738d166fcb9a4..f8a2c4271ff53 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/export_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/export_timeline.test.tsx @@ -12,7 +12,8 @@ import { mockSelectedTimeline } from './mocks'; import * as i18n from '../translations'; import { downloadBlob } from '../../../../common/utils/download_blob'; -import { ReactWrapper, mount } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; import { useParams } from 'react-router-dom'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/index.tsx index aa447c9e84f97..42a075b339a80 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/export_timeline/index.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { DeleteTimelines } from '../types'; +import type { DeleteTimelines } from '../types'; import { TimelineDownloader } from './export_timeline'; import { DeleteTimelineModalOverlay } from '../delete_timeline_modal'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts index a0ab9a0e5fc42..a5a313c936701 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.test.ts @@ -6,7 +6,7 @@ */ import { cloneDeep, getOr, omit } from 'lodash/fp'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import { mockTimelineResults, @@ -24,6 +24,7 @@ import { addNotes as dispatchAddNotes, updateNote as dispatchUpdateNote, } from '../../../common/store/app/actions'; +import type { QueryTimelineById } from './helpers'; import { defaultTimelineToTimelineModel, getNotesCount, @@ -32,19 +33,14 @@ import { omitTypenameInTimeline, dispatchUpdateTimeline, queryTimelineById, - QueryTimelineById, formatTimelineResultToModel, } from './helpers'; -import { OpenTimelineResult, DispatchUpdateTimeline } from './types'; -import { Note } from '../../../common/lib/note'; +import type { OpenTimelineResult, DispatchUpdateTimeline } from './types'; +import type { Note } from '../../../common/lib/note'; import moment from 'moment'; import sinon from 'sinon'; -import { - TimelineId, - TimelineType, - TimelineStatus, - KueryFilterQueryKind, -} from '../../../../common/types/timeline'; +import type { KueryFilterQueryKind } from '../../../../common/types/timeline'; +import { TimelineId, TimelineType, TimelineStatus } from '../../../../common/types/timeline'; import { mockTimeline as mockSelectedTimeline, mockTemplate as mockSelectedTemplate, diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts index 8d69e822d0990..39df7ecee41f1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/helpers.ts @@ -7,24 +7,26 @@ import { set } from '@elastic/safer-lodash-set/fp'; import { getOr, isEmpty } from 'lodash/fp'; -import { Action } from 'typescript-fsa'; +import type { Action } from 'typescript-fsa'; import uuid from 'uuid'; -import { Dispatch } from 'redux'; +import type { Dispatch } from 'redux'; import deepMerge from 'deepmerge'; -import { +import type { ColumnHeaderOptions, - DataProviderType, - TimelineId, - TimelineStatus, - TimelineType, - TimelineTabs, TimelineResult, SingleTimelineResolveResponse, ColumnHeaderResult, FilterTimelineResult, DataProviderResult, } from '../../../../common/types/timeline'; +import { + DataProviderType, + TimelineId, + TimelineStatus, + TimelineType, + TimelineTabs, +} from '../../../../common/types/timeline'; import { addNotes as dispatchAddNotes, @@ -39,7 +41,7 @@ import { addTimeline as dispatchAddTimeline, addNote as dispatchAddGlobalTimelineNote, } from '../../store/timeline/actions'; -import { TimelineModel } from '../../store/timeline/model'; +import type { TimelineModel } from '../../store/timeline/model'; import { timelineDefaults } from '../../store/timeline/defaults'; import { @@ -51,7 +53,7 @@ import { DEFAULT_COLUMN_MIN_WIDTH, } from '../timeline/body/constants'; -import { +import type { OpenTimelineResult, UpdateTimeline, DispatchUpdateTimeline, @@ -67,8 +69,8 @@ import { DEFAULT_TO_MOMENT, } from '../../../common/utils/default_date_settings'; import { resolveTimeline } from '../../containers/api'; -import { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; -import { NoteResult } from '../../../../common/types/timeline/note'; +import type { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; +import type { NoteResult } from '../../../../common/types/timeline/note'; export const OPEN_TIMELINE_CLASS_NAME = 'open-timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx index c917351679edd..7f26cc493a6f8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.test.tsx @@ -26,11 +26,8 @@ import { NotePreviews } from './note_previews'; import { OPEN_TIMELINE_CLASS_NAME, queryTimelineById } from './helpers'; import { StatefulOpenTimeline } from '.'; import { TimelineTabsStyle } from './types'; -import { - useTimelineTypes, - UseTimelineTypesArgs, - UseTimelineTypesResult, -} from './use_timeline_types'; +import type { UseTimelineTypesArgs, UseTimelineTypesResult } from './use_timeline_types'; +import { useTimelineTypes } from './use_timeline_types'; import { deleteTimelinesByIds } from '../../containers/api'; jest.mock('react-router-dom', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx index b6163ea93169e..1dd795bd795b5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/index.tsx @@ -9,8 +9,9 @@ import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { useShallowEqualSelector } from '../../../common/hooks/use_selector'; -import { SortFieldTimeline, TimelineId } from '../../../../common/types/timeline'; -import { TimelineModel } from '../../store/timeline/model'; +import type { SortFieldTimeline } from '../../../../common/types/timeline'; +import { TimelineId } from '../../../../common/types/timeline'; +import type { TimelineModel } from '../../store/timeline/model'; import { timelineSelectors } from '../../store/timeline'; import { createTimeline as dispatchCreateNewTimeline, @@ -24,7 +25,7 @@ import { defaultHeaders } from '../timeline/body/column_headers/default_headers' import { OpenTimeline } from './open_timeline'; import { OPEN_TIMELINE_CLASS_NAME, queryTimelineById, dispatchUpdateTimeline } from './helpers'; import { OpenTimelineModalBody } from './open_timeline_modal/open_timeline_modal_body'; -import { +import type { ActionTimelineToShow, DeleteTimelines, EuiSearchBarQuery, @@ -44,7 +45,7 @@ import { DEFAULT_SORT_FIELD, DEFAULT_SORT_DIRECTION } from './constants'; import { useTimelineTypes } from './use_timeline_types'; import { useTimelineStatus } from './use_timeline_status'; import { deleteTimelinesByIds } from '../../containers/api'; -import { Direction } from '../../../../common/search_strategy'; +import type { Direction } from '../../../../common/search_strategy'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; import { useSourcererDataView } from '../../../common/containers/sourcerer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx index e00a23261e747..139aeb40fddad 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.test.tsx @@ -12,7 +12,7 @@ import React from 'react'; import '../../../../common/mock/formatted_relative'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; -import { OpenTimelineResult, TimelineResultNote } from '../types'; +import type { OpenTimelineResult, TimelineResultNote } from '../types'; import { NotePreviews } from '.'; jest.mock('../../../../common/hooks/use_selector'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx index 57d9a330d2e58..3f07397e1ac6d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx @@ -18,7 +18,7 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; -import { TimelineResultNote } from '../types'; +import type { TimelineResultNote } from '../types'; import { getEmptyValue, defaultToEmptyTag } from '../../../../common/components/empty_value'; import { MarkdownRenderer } from '../../../../common/components/markdown_editor'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx index d754aeba9072b..05aa0c105d5a3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.test.tsx @@ -13,8 +13,8 @@ import { waitFor } from '@testing-library/react'; import '../../../common/mock/match_media'; import { DEFAULT_SEARCH_RESULTS_PER_PAGE } from '../../pages/timelines_page'; -import { OpenTimelineResult, OpenTimelineProps } from './types'; -import { TimelinesTableProps } from './timelines_table'; +import type { OpenTimelineResult, OpenTimelineProps } from './types'; +import type { TimelinesTableProps } from './timelines_table'; import { mockTimelineResults } from '../../../common/mock/timeline_results'; import { OpenTimeline } from './open_timeline'; import { DEFAULT_SORT_DIRECTION, DEFAULT_SORT_FIELD } from './constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.tsx index fcecca2da5df1..8fee5fcc0da3b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiBasicTable } from '@elastic/eui'; +import type { EuiBasicTable } from '@elastic/eui'; import React, { useCallback, useMemo, useRef } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -29,7 +29,7 @@ import { SearchRow } from './search_row'; import { TimelinesTable } from './timelines_table'; import * as i18n from './translations'; import { OPEN_TIMELINE_CLASS_NAME } from './helpers'; -import { OpenTimelineProps, OpenTimelineResult, ActionTimelineToShow } from './types'; +import type { OpenTimelineProps, OpenTimelineResult, ActionTimelineToShow } from './types'; const QueryText = styled.span` white-space: normal; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.test.tsx index 3eab32a6ed76b..91785b05c5bf5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.test.tsx @@ -6,7 +6,8 @@ */ import { mount } from 'enzyme'; -import React, { ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React from 'react'; import { TestProviders } from '../../../../common/mock/test_providers'; import { mockOpenTimelineQueryResults } from '../../../../common/mock/timeline_results'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.tsx index c2423da9ca372..9d803357058a0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/index.tsx @@ -8,10 +8,10 @@ import { EuiModal } from '@elastic/eui'; import React from 'react'; -import { TimelineModel } from '../../../store/timeline/model'; +import type { TimelineModel } from '../../../store/timeline/model'; import * as i18n from '../translations'; -import { ActionTimelineToShow } from '../types'; +import type { ActionTimelineToShow } from '../types'; import { StatefulOpenTimeline } from '..'; export interface OpenTimelineModalProps { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx index 7e00290c380db..1f214f40c8255 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.test.tsx @@ -12,8 +12,8 @@ import { ThemeProvider } from 'styled-components'; import '../../../../common/mock/match_media'; import { DEFAULT_SEARCH_RESULTS_PER_PAGE } from '../../../pages/timelines_page'; -import { OpenTimelineResult, OpenTimelineProps } from '../types'; -import { TimelinesTableProps } from '../timelines_table'; +import type { OpenTimelineResult, OpenTimelineProps } from '../types'; +import type { TimelinesTableProps } from '../timelines_table'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; import { OpenTimelineModalBody } from './open_timeline_modal_body'; import { DEFAULT_SORT_DIRECTION, DEFAULT_SORT_FIELD } from '../constants'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx index 1616c5e84247f..6e012c65478c8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/open_timeline_modal/open_timeline_modal_body.tsx @@ -9,7 +9,7 @@ import { EuiModalBody, EuiModalHeader, EuiSpacer } from '@elastic/eui'; import React, { Fragment, memo, useMemo } from 'react'; import styled from 'styled-components'; -import { OpenTimelineProps, ActionTimelineToShow } from '../types'; +import type { OpenTimelineProps, ActionTimelineToShow } from '../types'; import { SearchRow } from '../search_row'; import { TimelinesTable } from '../timelines_table'; import { TitleRow } from '../title_row'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx index 55d230d118e25..2e0947b563602 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiFilterButtonProps } from '@elastic/eui'; +import type { EuiFilterButtonProps } from '@elastic/eui'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import React from 'react'; import { ThemeProvider } from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.tsx index 15f97b72855fc..7b7516646b19a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/search_row/index.tsx @@ -17,7 +17,7 @@ import styled from 'styled-components'; import { TimelineType } from '../../../../../common/types/timeline'; import * as i18n from '../translations'; -import { OpenTimelineProps } from '../types'; +import type { OpenTimelineProps } from '../types'; const SearchRowContainer = styled.div` &:not(:last-child) { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx index 925ea396b7fa0..fd78f88b9e161 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonIconProps } from '@elastic/eui'; +import type { EuiButtonIconProps } from '@elastic/eui'; import { cloneDeep, omit } from 'lodash/fp'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import React from 'react'; @@ -14,8 +14,8 @@ import { ThemeProvider } from 'styled-components'; import '../../../../common/mock/match_media'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; -import { OpenTimelineResult } from '../types'; -import { TimelinesTableProps } from '.'; +import type { OpenTimelineResult } from '../types'; +import type { TimelinesTableProps } from '.'; import { getMockTimelinesTableProps } from './mocks'; import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx index a7953d60ba767..2cbccd3cb2355 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/actions_columns.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ActionTimelineToShow, DeleteTimelines, EnableExportTimelineDownloader, diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx index f80786889b57f..d9857febce0cb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonIconProps } from '@elastic/eui'; +import type { EuiButtonIconProps } from '@elastic/eui'; import { cloneDeep, omit } from 'lodash/fp'; import React from 'react'; import { ThemeProvider } from 'styled-components'; @@ -14,10 +14,11 @@ import { mountWithIntl } from '@kbn/test-jest-helpers'; import '../../../../common/mock/match_media'; import '../../../../common/mock/formatted_relative'; import { getEmptyValue } from '../../../../common/components/empty_value'; -import { OpenTimelineResult } from '../types'; +import type { OpenTimelineResult } from '../types'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; import { NotePreviews } from '../note_previews'; -import { TimelinesTable, TimelinesTableProps } from '.'; +import type { TimelinesTableProps } from '.'; +import { TimelinesTable } from '.'; import * as i18n from '../translations'; import { getMockTimelinesTableProps } from './mocks'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.tsx index 9c85296b8f69d..3d44e0f27b6b3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/common_columns.tsx @@ -13,7 +13,7 @@ import { ACTION_COLUMN_WIDTH } from './common_styles'; import { isUntitled } from '../helpers'; import { NotePreviews } from '../note_previews'; import * as i18n from '../translations'; -import { OnOpenTimeline, OnToggleShowNotes, OpenTimelineResult } from '../types'; +import type { OnOpenTimeline, OnToggleShowNotes, OpenTimelineResult } from '../types'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; import { TimelineType } from '../../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx index 89331ca8e33bf..eecd1a9680219 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.test.tsx @@ -13,9 +13,10 @@ import { ThemeProvider } from 'styled-components'; import '../../../../common/mock/match_media'; import { getEmptyValue } from '../../../../common/components/empty_value'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; -import { OpenTimelineResult } from '../types'; +import type { OpenTimelineResult } from '../types'; -import { TimelinesTable, TimelinesTableProps } from '.'; +import type { TimelinesTableProps } from '.'; +import { TimelinesTable } from '.'; import * as i18n from '../translations'; import { getMockTimelinesTableProps } from './mocks'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.tsx index 4e2357dcbf7c7..454ecce7bf2af 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/extended_columns.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { defaultToEmptyTag } from '../../../../common/components/empty_value'; import * as i18n from '../translations'; -import { OpenTimelineResult } from '../types'; +import type { OpenTimelineResult } from '../types'; /** * Returns the extended columns that are specific to the `All Timelines` view diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx index 01e9c588f0ef5..7d1dec7423800 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.test.tsx @@ -12,8 +12,9 @@ import { ThemeProvider } from 'styled-components'; import '../../../../common/mock/match_media'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; -import { TimelinesTable, TimelinesTableProps } from '.'; -import { OpenTimelineResult } from '../types'; +import type { TimelinesTableProps } from '.'; +import { TimelinesTable } from '.'; +import type { OpenTimelineResult } from '../types'; import { getMockTimelinesTableProps } from './mocks'; import { getMockTheme } from '../../../../common/lib/kibana/kibana_react.mock'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.tsx index 6ad585ca207ec..1d556234faaf5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/icon_header_columns.tsx @@ -11,8 +11,9 @@ import React from 'react'; import { ACTION_COLUMN_WIDTH } from './common_styles'; import { getNotesCount, getPinnedEventCount } from '../helpers'; import * as i18n from '../translations'; -import { FavoriteTimelineResult, OpenTimelineResult } from '../types'; -import { TimelineTypeLiteralWithNull, TimelineType } from '../../../../../common/types/timeline'; +import type { FavoriteTimelineResult, OpenTimelineResult } from '../types'; +import type { TimelineTypeLiteralWithNull } from '../../../../../common/types/timeline'; +import { TimelineType } from '../../../../../common/types/timeline'; /** * Returns the columns that have icon headers diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx index 55de25ff283e3..c83ee49dfa38e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.test.tsx @@ -12,8 +12,9 @@ import { ThemeProvider } from 'styled-components'; import '../../../../common/mock/match_media'; import { mockTimelineResults } from '../../../../common/mock/timeline_results'; -import { OpenTimelineResult } from '../types'; -import { TimelinesTable, TimelinesTableProps } from '.'; +import type { OpenTimelineResult } from '../types'; +import type { TimelinesTableProps } from '.'; +import { TimelinesTable } from '.'; import { getMockTimelinesTableProps } from './mocks'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx index de9d74019fbf8..32a63bdf6c5b6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/index.tsx @@ -10,7 +10,7 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; import * as i18n from '../translations'; -import { +import type { ActionTimelineToShow, DeleteTimelines, OnOpenTimeline, @@ -25,11 +25,8 @@ import { getActionsColumns } from './actions_columns'; import { getCommonColumns } from './common_columns'; import { getExtendedColumns } from './extended_columns'; import { getIconHeaderColumns } from './icon_header_columns'; -import { - TimelineTypeLiteralWithNull, - TimelineStatus, - TimelineType, -} from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteralWithNull } from '../../../../../common/types/timeline'; +import { TimelineStatus, TimelineType } from '../../../../../common/types/timeline'; // there are a number of type mismatches across this file const EuiBasicTable: any = _EuiBasicTable; // eslint-disable-line @typescript-eslint/no-explicit-any diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/mocks.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/mocks.ts index b3597c68d2800..35f4324d6208f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/mocks.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/timelines_table/mocks.ts @@ -7,8 +7,8 @@ import { DEFAULT_SEARCH_RESULTS_PER_PAGE } from '../../../pages/timelines_page'; import { DEFAULT_SORT_DIRECTION, DEFAULT_SORT_FIELD } from '../constants'; -import { OpenTimelineResult } from '../types'; -import { TimelinesTableProps } from '.'; +import type { OpenTimelineResult } from '../types'; +import type { TimelinesTableProps } from '.'; import { TimelineType } from '../../../../../common/types/timeline'; export const getMockTimelinesTableProps = ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx index ed68bba3b59e3..1c1ad61f2e87e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiButtonProps } from '@elastic/eui'; +import type { EuiButtonProps } from '@elastic/eui'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import React from 'react'; import { ThemeProvider } from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.tsx index 8ba0fe06b67dd..8700e7af1edc3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/title_row/index.tsx @@ -9,7 +9,7 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; import * as i18n from '../translations'; -import { OpenTimelineProps } from '../types'; +import type { OpenTimelineProps } from '../types'; import { HeaderSection } from '../../../../common/components/header_section'; type Props = Pick & { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts index 67131e68fe1b2..1f8e966141a7c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts @@ -6,10 +6,10 @@ */ import type React from 'react'; -import { AllTimelinesVariables } from '../../containers/all'; -import { TimelineModel } from '../../store/timeline/model'; -import { NoteResult } from '../../../../common/types/timeline/note'; -import { +import type { AllTimelinesVariables } from '../../containers/all'; +import type { TimelineModel } from '../../store/timeline/model'; +import type { NoteResult } from '../../../../common/types/timeline/note'; +import type { TimelineTypeLiteral, TimelineTypeLiteralWithNull, TimelineStatus, diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_status.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_status.tsx index 097919d7e6f08..f8cd07cbdd841 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_status.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_status.tsx @@ -8,17 +8,19 @@ import React, { useState, useCallback, useMemo } from 'react'; import { EuiFilterButton } from '@elastic/eui'; +import type { + TimelineTypeLiteralWithNull, + TemplateTimelineTypeLiteralWithNull, + TimelineStatusLiteralWithNull, +} from '../../../../common/types/timeline'; import { TimelineStatus, TimelineType, - TimelineTypeLiteralWithNull, TemplateTimelineType, - TemplateTimelineTypeLiteralWithNull, - TimelineStatusLiteralWithNull, } from '../../../../common/types/timeline'; import * as i18n from './translations'; -import { TemplateTimelineFilter } from './types'; +import type { TemplateTimelineFilter } from './types'; import { installPrepackedTimelines } from '../../containers/api'; export const useTimelineStatus = ({ diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.test.tsx index 66bbca5c7c18c..b7bb49c67bb60 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.test.tsx @@ -8,11 +8,8 @@ import React from 'react'; import { fireEvent, render } from '@testing-library/react'; import { renderHook, act } from '@testing-library/react-hooks'; -import { - useTimelineTypes, - UseTimelineTypesArgs, - UseTimelineTypesResult, -} from './use_timeline_types'; +import type { UseTimelineTypesArgs, UseTimelineTypesResult } from './use_timeline_types'; +import { useTimelineTypes } from './use_timeline_types'; jest.mock('react-router-dom', () => { return { diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx index ca8b443309e12..dab590fcaa56d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/use_timeline_types.tsx @@ -10,11 +10,13 @@ import { useParams } from 'react-router-dom'; import { EuiTabs, EuiTab, EuiSpacer } from '@elastic/eui'; import { noop } from 'lodash/fp'; -import { TimelineTypeLiteralWithNull, TimelineType } from '../../../../common/types/timeline'; +import type { TimelineTypeLiteralWithNull } from '../../../../common/types/timeline'; +import { TimelineType } from '../../../../common/types/timeline'; import { SecurityPageName } from '../../../app/types'; import { getTimelineTabsUrl, useFormatUrl } from '../../../common/components/link_to'; import * as i18n from './translations'; -import { TimelineTabsStyle, TimelineTab } from './types'; +import type { TimelineTab } from './types'; +import { TimelineTabsStyle } from './types'; import { useKibana } from '../../../common/lib/kibana'; export interface UseTimelineTypesArgs { defaultTimelineCount?: number | null; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/index.tsx index 04237bfa43dc6..96e4e8f52900a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/index.tsx @@ -22,7 +22,7 @@ import React, { useState, useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; -import { State } from '../../../common/store'; +import type { State } from '../../../common/store'; import { RowRendererId } from '../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { setExcludedRowRendererIds as dispatchSetExcludedRowRendererIds } from '../../store/timeline/actions'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/row_renderers_browser.tsx b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/row_renderers_browser.tsx index b27b63be36471..8afdbec8d51d1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/row_renderers_browser.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/row_renderers_browser/row_renderers_browser.tsx @@ -10,8 +10,9 @@ import React, { useMemo, useCallback } from 'react'; import { xor } from 'lodash/fp'; import styled from 'styled-components'; -import { RowRendererId } from '../../../../common/types/timeline'; -import { renderers, RowRendererOption } from './catalog'; +import type { RowRendererId } from '../../../../common/types/timeline'; +import type { RowRendererOption } from './catalog'; +import { renderers } from './catalog'; interface RowRenderersBrowserProps { excludedRowRendererIds: RowRendererId[]; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx index 9955c2c318065..7ec4e5c2c942e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/expandable_event.tsx @@ -18,13 +18,13 @@ import { import React from 'react'; import styled from 'styled-components'; -import { TimelineTabs } from '../../../../../common/types/timeline'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { TimelineTabs } from '../../../../../common/types/timeline'; +import type { BrowserFields } from '../../../../common/containers/source'; import { EventDetails } from '../../../../common/components/event_details/event_details'; -import { TimelineEventsDetailsItem } from '../../../../../common/search_strategy/timeline'; +import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy/timeline'; import * as i18n from './translations'; import { PreferenceFormattedDate } from '../../../../common/components/formatted_date'; -import { HostRisk } from '../../../../risk_score/containers'; +import type { HostRisk } from '../../../../risk_score/containers'; export type HandleOnEventClosed = () => void; interface Props { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/body.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/body.tsx index 65897fbb88f4d..58d09a6450017 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/body.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/body.tsx @@ -10,9 +10,13 @@ import styled from 'styled-components'; import React from 'react'; import { EndpointIsolateSuccess } from '../../../../../common/components/endpoint/host_isolation'; import { HostIsolationPanel } from '../../../../../detections/components/host_isolation'; -import { BrowserFields, TimelineEventsDetailsItem } from '../../../../../../common/search_strategy'; -import { ExpandableEvent, HandleOnEventClosed } from '../expandable_event'; -import { HostRisk } from '../../../../../risk_score/containers'; +import type { + BrowserFields, + TimelineEventsDetailsItem, +} from '../../../../../../common/search_strategy'; +import type { HandleOnEventClosed } from '../expandable_event'; +import { ExpandableEvent } from '../expandable_event'; +import type { HostRisk } from '../../../../../risk_score/containers'; const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` .euiFlyoutBody__overflow { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx index 3471b65a73b34..35fd8ac8db1a4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx @@ -10,7 +10,7 @@ import { FlyoutFooter } from './footer'; import '../../../../../common/mock/match_media'; import { TestProviders } from '../../../../../common/mock'; import { TimelineId } from '../../../../../../common/types/timeline'; -import { Ecs } from '../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../common/ecs'; import { mockAlertDetailsData } from '../../../../../common/components/event_details/__mocks__'; import type { TimelineEventsDetailsItem } from '../../../../../../common/search_strategy'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.tsx index 6a17592f5b764..d768f8aa94645 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.tsx @@ -8,7 +8,8 @@ import React, { useCallback, useMemo, useState } from 'react'; import { EuiFlyoutFooter, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { find } from 'lodash/fp'; -import { connect, ConnectedProps } from 'react-redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; import { TakeActionDropdown } from '../../../../../detections/components/take_action_dropdown'; import type { TimelineEventsDetailsItem } from '../../../../../../common/search_strategy'; import { useExceptionFlyout } from '../../../../../detections/components/alerts_table/timeline_actions/use_add_exception_flyout'; @@ -16,9 +17,10 @@ import { AddExceptionFlyoutWrapper } from '../../../../../detections/components/ import { EventFiltersFlyout } from '../../../../../management/pages/event_filters/view/components/event_filters_flyout'; import { useEventFilterModal } from '../../../../../detections/components/alerts_table/timeline_actions/use_event_filter_modal'; import { getFieldValue } from '../../../../../detections/components/host_isolation/helpers'; -import { Status } from '../../../../../../common/detection_engine/schemas/common/schemas'; -import { Ecs } from '../../../../../../common/ecs'; -import { inputsModel, inputsSelectors, State } from '../../../../../common/store'; +import type { Status } from '../../../../../../common/detection_engine/schemas/common/schemas'; +import type { Ecs } from '../../../../../../common/ecs'; +import type { inputsModel, State } from '../../../../../common/store'; +import { inputsSelectors } from '../../../../../common/store'; import { OsqueryFlyout } from '../../../../../detections/components/osquery/osquery_flyout'; import { TimelineId } from '../../../../../../common/types'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/index.tsx index 055da32e74673..d306d914b2146 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/index.tsx @@ -10,7 +10,8 @@ import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useState } from 'react'; import { buildHostNamesFilter } from '../../../../../../common/search_strategy'; -import { HostRisk, useHostRiskScore } from '../../../../../risk_score/containers'; +import type { HostRisk } from '../../../../../risk_score/containers'; +import { useHostRiskScore } from '../../../../../risk_score/containers'; import { useHostIsolationTools } from '../use_host_isolation_tools'; import { FlyoutHeaderContent } from './header'; import { FlyoutBody } from './body'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/helpers.tsx index 9f7019e68b17f..32af7f9920a34 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/helpers.tsx @@ -7,7 +7,7 @@ import { some } from 'lodash/fp'; import { useMemo } from 'react'; -import { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; +import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; import { getFieldValue } from '../../../../detections/components/host_isolation/helpers'; interface GetBasicDataFromDetailsData { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx index 488cd1758565d..996a0b6820466 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx @@ -10,7 +10,7 @@ import { EventDetailsPanel } from '.'; import '../../../../common/mock/match_media'; import { TestProviders } from '../../../../common/mock'; import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { mockAlertDetailsData } from '../../../../common/components/event_details/__mocks__'; import type { TimelineEventsDetailsItem } from '../../../../../common/search_strategy'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx index 364239f2625f6..4463d397b9564 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.tsx @@ -9,14 +9,15 @@ import { EuiSpacer } from '@elastic/eui'; import React from 'react'; import deepEqual from 'fast-deep-equal'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { EntityType } from '@kbn/timelines-plugin/common'; -import { BrowserFields, DocValueFields } from '../../../../common/containers/source'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { EntityType } from '@kbn/timelines-plugin/common'; +import type { BrowserFields, DocValueFields } from '../../../../common/containers/source'; import { ExpandableEvent, ExpandableEventTitle } from './expandable_event'; import { useTimelineEventsDetails } from '../../../containers/details'; -import { TimelineTabs } from '../../../../../common/types/timeline'; +import type { TimelineTabs } from '../../../../../common/types/timeline'; import { buildHostNamesFilter } from '../../../../../common/search_strategy'; -import { useHostRiskScore, HostRisk } from '../../../../risk_score/containers'; +import type { HostRisk } from '../../../../risk_score/containers'; +import { useHostRiskScore } from '../../../../risk_score/containers'; import { useHostIsolationTools } from './use_host_isolation_tools'; import { FlyoutBody, FlyoutHeader, FlyoutFooter } from './flyout'; import { useBasicDataFromDetailsData } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx index 4bc5ba44c1695..ac7845dce7f9e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useDetailPanel, UseDetailPanelConfig } from './use_detail_panel'; +import type { UseDetailPanelConfig } from './use_detail_panel'; +import { useDetailPanel } from './use_detail_panel'; import { timelineActions } from '../../../store/timeline'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx index f54b2b2433832..5b7a1f5c2feaf 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/hooks/use_detail_panel.tsx @@ -10,9 +10,10 @@ import { useDispatch } from 'react-redux'; import type { EntityType } from '@kbn/timelines-plugin/common'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; -import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; +import type { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { activeTimeline } from '../../../containers/active_timeline_context'; -import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; +import type { TimelineTabs } from '../../../../../common/types/timeline'; +import { TimelineId } from '../../../../../common/types/timeline'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { DetailsPanel as DetailsPanelComponent } from '..'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx index a5d735be571d3..b8009a376bb88 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/host_details/expandable_host.tsx @@ -14,7 +14,7 @@ import { useGlobalTime } from '../../../../common/containers/use_global_time'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { HostOverview } from '../../../../overview/components/host_overview'; import { setAbsoluteRangeDatePicker } from '../../../../common/store/inputs/actions'; -import { HostItem } from '../../../../../common/search_strategy'; +import type { HostItem } from '../../../../../common/search_strategy'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; import { hostToCriteria } from '../../../../common/components/ml/criteria/host_to_criteria'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.test.tsx index d0076dafd3315..be52507d1ba07 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.test.tsx @@ -16,13 +16,11 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../../common/mock'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { DetailsPanel } from '.'; -import { - TimelineExpandedDetail, - TimelineId, - TimelineTabs, -} from '../../../../common/types/timeline'; +import type { TimelineExpandedDetail } from '../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; import { FlowTargetSourceDest } from '../../../../common/search_strategy/security_solution/network'; import { EventDetailsPanel } from './event_details'; import { useKibana } from '../../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx index dee4926cf5bec..1d261875a1f18 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/index.tsx @@ -7,13 +7,14 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { EuiFlyout, EuiFlyoutProps } from '@elastic/eui'; +import type { EuiFlyoutProps } from '@elastic/eui'; +import { EuiFlyout } from '@elastic/eui'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { EntityType } from '@kbn/timelines-plugin/common'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { EntityType } from '@kbn/timelines-plugin/common'; import { timelineActions, timelineSelectors } from '../../store/timeline'; import { timelineDefaults } from '../../store/timeline/defaults'; -import { BrowserFields, DocValueFields } from '../../../common/containers/source'; +import type { BrowserFields, DocValueFields } from '../../../common/containers/source'; import { TimelineId, TimelineTabs } from '../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import { EventDetailsPanel } from './event_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx index 8f66719e42635..5ec681002cc4b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/expandable_network.tsx @@ -12,7 +12,7 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; -import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; import { NetworkDetailsLink } from '../../../../common/components/links'; import { IpOverview } from '../../../../network/components/details'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/index.tsx index 96b9c62d6817f..a67de58a8bde9 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/network_details/index.tsx @@ -18,7 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from 'styled-components'; -import { FlowTargetSourceDest } from '../../../../../common/search_strategy'; +import type { FlowTargetSourceDest } from '../../../../../common/search_strategy'; import { ExpandableNetworkDetailsTitle, ExpandableNetworkDetailsPageLink, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx index c4616c0ead360..596f1ccf9b235 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/auto_save_warning/index.tsx @@ -5,12 +5,8 @@ * 2.0. */ -import { - EuiButton, - EuiFlexGroup, - EuiFlexItem, - EuiGlobalToastListToast as Toast, -} from '@elastic/eui'; +import type { EuiGlobalToastListToast as Toast } from '@elastic/eui'; +import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/action_icon_item.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/action_icon_item.tsx index 2bcac278f85d9..9d74310cd807e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/action_icon_item.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/action_icon_item.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { MouseEvent } from 'react'; +import type { MouseEvent } from 'react'; +import React from 'react'; import { EuiContextMenuItem, EuiButtonIcon, EuiToolTip, EuiText } from '@elastic/eui'; import { DEFAULT_ACTION_BUTTON_WIDTH } from '@kbn/timelines-plugin/public'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.test.tsx index 923e723f8cf42..cd90f1cfb8e7e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.test.tsx @@ -11,11 +11,11 @@ import { render } from '@testing-library/react'; import { TestProviders, mockTimelineModel } from '../../../../../common/mock'; import { HeaderActions } from './header_actions'; import { mockTriggersActionsUi } from '../../../../../common/mock/mock_triggers_actions_ui_plugin'; -import { +import type { ColumnHeaderOptions, HeaderActionProps, - TimelineTabs, } from '../../../../../../common/types/timeline'; +import { TimelineTabs } from '../../../../../../common/types/timeline'; import { timelineActions } from '../../../../store/timeline'; import { getColumnHeader } from '../column_headers/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.tsx index 4f7ed9739d35e..67150373d5d44 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/header_actions.tsx @@ -6,23 +6,14 @@ */ import React, { useMemo, useCallback } from 'react'; -import { - EuiButtonIcon, - EuiCheckbox, - EuiDataGridSorting, - EuiToolTip, - useDataGridColumnSorting, -} from '@elastic/eui'; +import type { EuiDataGridSorting } from '@elastic/eui'; +import { EuiButtonIcon, EuiCheckbox, EuiToolTip, useDataGridColumnSorting } from '@elastic/eui'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { DEFAULT_ACTION_BUTTON_WIDTH } from '@kbn/timelines-plugin/public'; -import { - HeaderActionProps, - SortDirection, - TimelineId, - TimelineTabs, -} from '../../../../../../common/types/timeline'; +import type { HeaderActionProps, SortDirection } from '../../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { EXIT_FULL_SCREEN } from '../../../../../common/components/exit_full_screen/translations'; import { FULL_SCREEN_TOGGLED_CLASS_NAME } from '../../../../../../common/constants'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx index 997852f06fa96..1e53ba23c39af 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/index.tsx @@ -30,13 +30,12 @@ import { useGlobalFullScreen, useTimelineFullScreen, } from '../../../../../common/containers/use_full_screen'; -import { - TimelineId, +import type { ActionProps, OnPinEvent, - TimelineTabs, TimelineEventsType, } from '../../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { timelineActions, timelineSelectors } from '../../../../store/timeline'; import { timelineDefaults } from '../../../../store/timeline/defaults'; import { isInvestigateInResolverActionEnabled } from '../../../../../detections/components/alerts_table/timeline_actions/investigate_in_resolver'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/pin_event_action.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/pin_event_action.tsx index d0294d3908590..97280b9dd029b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/pin_event_action.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/actions/pin_event_action.tsx @@ -12,7 +12,7 @@ import { DEFAULT_ACTION_BUTTON_WIDTH } from '@kbn/timelines-plugin/public'; import { EventsTdContent } from '../../styles'; import { eventHasNotes, getPinTooltip } from '../helpers'; import { Pin } from '../../pin'; -import { TimelineType } from '../../../../../../common/types/timeline'; +import type { TimelineType } from '../../../../../../common/types/timeline'; import { useUserPrivileges } from '../../../../../common/components/user_privileges'; interface PinEventActionProps { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx index 1306509a87a54..025d12bc6ddc5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/actions/index.tsx @@ -8,10 +8,10 @@ import { EuiButtonIcon } from '@elastic/eui'; import React, { useCallback } from 'react'; -import { ColumnHeaderOptions } from '../../../../../../../common/types'; -import { OnColumnRemoved } from '../../../events'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types'; +import type { OnColumnRemoved } from '../../../events'; import { EventsHeadingExtra, EventsLoading } from '../../../styles'; -import { Sort } from '../../sort'; +import type { Sort } from '../../sort'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx index 82ca99d077bf5..c879a505dbda6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/column_header.tsx @@ -5,22 +5,25 @@ * 2.0. */ -import { EuiContextMenu, EuiContextMenuPanelDescriptor, EuiIcon, EuiPopover } from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiContextMenu, EuiIcon, EuiPopover } from '@elastic/eui'; import React, { useCallback, useMemo, useRef, useState } from 'react'; import { Draggable } from 'react-beautiful-dnd'; -import { Resizable, ResizeCallback } from 're-resizable'; +import type { ResizeCallback } from 're-resizable'; +import { Resizable } from 're-resizable'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { DRAGGABLE_KEYBOARD_WRAPPER_CLASS_NAME } from '@kbn/securitysolution-t-grid'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../constants'; import { getDraggableFieldId } from '../../../../../common/components/drag_and_drop/helpers'; -import { ColumnHeaderOptions, TimelineTabs } from '../../../../../../common/types/timeline'; +import type { ColumnHeaderOptions } from '../../../../../../common/types/timeline'; +import { TimelineTabs } from '../../../../../../common/types/timeline'; import { Direction } from '../../../../../../common/search_strategy'; -import { OnFilterChange } from '../../events'; +import type { OnFilterChange } from '../../events'; import { ARIA_COLUMN_INDEX_OFFSET } from '../../helpers'; import { EventsTh, EventsThContent, EventsHeadingHandle } from '../../styles'; -import { Sort } from '../sort'; +import type { Sort } from '../sort'; import { Header } from './header'; import { timelineActions } from '../../../../store/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx index 0d7ed0a91121e..bcfdc80794585 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/common/dragging_container.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { FC, memo, useEffect } from 'react'; +import type { FC } from 'react'; +import { memo, useEffect } from 'react'; interface DraggingContainerProps { children: JSX.Element; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts index 7bad6fc73afb9..d407b7da847cd 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/default_headers.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ColumnHeaderOptions } from '../../../../../../common/types'; -import { ColumnHeaderType } from '../../../../store/timeline/model'; +import type { ColumnHeaderOptions } from '../../../../../../common/types'; +import type { ColumnHeaderType } from '../../../../store/timeline/model'; import { DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../constants'; export const defaultColumnHeaderType: ColumnHeaderType = 'not-filtered'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx index e3e1d49f2eb9c..a6222549be4c3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.test.tsx @@ -8,7 +8,7 @@ import { mount, shallow } from 'enzyme'; import React from 'react'; -import { ColumnHeaderType } from '../../../../../store/timeline/model'; +import type { ColumnHeaderType } from '../../../../../store/timeline/model'; import { defaultHeaders } from '../default_headers'; import { Filter } from '.'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx index b897fef57f076..3eb2cda8af242 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/filter/index.tsx @@ -8,9 +8,9 @@ import { noop } from 'lodash/fp'; import React from 'react'; -import { ColumnHeaderOptions } from '../../../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types'; import { DEFAULT_COLUMN_MIN_WIDTH } from '../../constants'; -import { OnFilterChange } from '../../../events'; +import type { OnFilterChange } from '../../../events'; import { TextFilter } from '../text_filter'; interface Props { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx index ffab38b64bef8..24b75c88d7963 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/header_content.tsx @@ -8,11 +8,11 @@ import { EuiToolTip } from '@elastic/eui'; import { noop } from 'lodash/fp'; import React from 'react'; -import { ColumnHeaderOptions } from '../../../../../../../common/types/timeline'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types/timeline'; import { TruncatableText } from '../../../../../../common/components/truncatable_text'; import { EventsHeading, EventsHeadingTitleButton, EventsHeadingTitleSpan } from '../../../styles'; -import { Sort } from '../../sort'; +import type { Sort } from '../../sort'; import { SortIndicator } from '../../sort/sort_indicator'; import { HeaderToolTipContent } from '../header_tooltip_content'; import { getSortDirection, getSortIndex } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts index 257b88944c14e..e31ed05e55929 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/helpers.ts @@ -6,8 +6,11 @@ */ import { Direction } from '../../../../../../../common/search_strategy'; -import { ColumnHeaderOptions, SortDirection } from '../../../../../../../common/types/timeline'; -import { Sort } from '../../sort'; +import type { + ColumnHeaderOptions, + SortDirection, +} from '../../../../../../../common/types/timeline'; +import type { Sort } from '../../sort'; interface GetNewSortDirectionOnClickParams { clickedHeader: ColumnHeaderOptions; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx index b0c21ac3698df..227327fd8e856 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.test.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { timelineActions } from '../../../../../store/timeline'; import { TestProviders } from '../../../../../../common/mock'; -import { ColumnHeaderType } from '../../../../../store/timeline/model'; -import { Sort } from '../../sort'; +import type { ColumnHeaderType } from '../../../../../store/timeline/model'; +import type { Sort } from '../../sort'; import { CloseButton } from '../actions'; import { defaultHeaders } from '../default_headers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx index 44e461224a180..910da7314c474 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header/index.tsx @@ -10,14 +10,14 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { isDataViewFieldSubtypeNested } from '@kbn/es-query'; -import { ColumnHeaderOptions } from '../../../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types'; import { useDeepEqualSelector, useShallowEqualSelector, } from '../../../../../../common/hooks/use_selector'; import { timelineActions, timelineSelectors } from '../../../../../store/timeline'; -import { OnFilterChange } from '../../../events'; -import { Sort } from '../../sort'; +import type { OnFilterChange } from '../../../events'; +import type { Sort } from '../../sort'; import { Actions } from '../actions'; import { Filter } from '../filter'; import { getNewSortDirectionOnClick } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx index 532937c3e8b99..d2a134f37aba4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.test.tsx @@ -9,7 +9,7 @@ import { mount, shallow } from 'enzyme'; import { cloneDeep } from 'lodash/fp'; import React from 'react'; -import { ColumnHeaderOptions } from '../../../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types'; import { defaultHeaders } from '../../../../../../common/mock'; import { HeaderToolTipContent } from '.'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx index 8cadcad9ef79d..c96f3473a0064 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/header_tooltip_content/index.tsx @@ -10,7 +10,7 @@ import { isEmpty } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { ColumnHeaderOptions } from '../../../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../../../common/types'; import { getIconFromType } from '../../../../../../common/components/event_details/helpers'; import * as i18n from '../translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts index 012ec4a058841..317400f3bae90 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.test.ts @@ -7,8 +7,8 @@ import { mockBrowserFields } from '../../../../../common/containers/source/mock'; import '../../../../../common/mock/match_media'; -import { BrowserFields } from '../../../../../../common/search_strategy'; -import { ColumnHeaderOptions } from '../../../../../../common/types'; +import type { BrowserFields } from '../../../../../../common/search_strategy'; +import type { ColumnHeaderOptions } from '../../../../../../common/types'; import { DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../constants'; import { defaultHeaders } from './default_headers'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts index 42c74042b58ca..0ecfcb16f7126 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/helpers.ts @@ -6,9 +6,9 @@ */ import { has, get } from 'lodash/fp'; -import { ColumnHeaderOptions } from '../../../../../../common/types'; +import type { ColumnHeaderOptions } from '../../../../../../common/types'; -import { BrowserFields } from '../../../../../common/containers/source'; +import type { BrowserFields } from '../../../../../common/containers/source'; import { DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_DATE_COLUMN_MIN_WIDTH } from '../constants'; import { defaultColumnHeaderType } from './default_headers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx index 6d9b8e50894ee..ebfd9440891de 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.test.tsx @@ -12,11 +12,12 @@ import '../../../../../common/mock/match_media'; import { getActionsColumnWidth } from '@kbn/timelines-plugin/public'; import { defaultHeaders } from './default_headers'; import { mockBrowserFields } from '../../../../../common/containers/source/mock'; -import { Sort } from '../sort'; +import type { Sort } from '../sort'; import { TestProviders } from '../../../../../common/mock/test_providers'; import { useMountAppended } from '../../../../../common/utils/use_mount_appended'; -import { ColumnHeadersComponent, ColumnHeadersComponentProps } from '.'; +import type { ColumnHeadersComponentProps } from '.'; +import { ColumnHeadersComponent } from '.'; import { cloneDeep } from 'lodash/fp'; import { timelineActions } from '../../../../store/timeline'; import { TimelineTabs } from '../../../../../../common/types/timeline'; @@ -24,7 +25,7 @@ import { Direction } from '../../../../../../common/search_strategy'; import { getDefaultControlColumn } from '../control_columns'; import { testTrailingControlColumns } from '../../../../../common/mock/mock_timeline_control_columns'; import { HeaderActions } from '../actions/header_actions'; -import { UseFieldBrowserOptionsProps } from '../../../fields_browser'; +import type { UseFieldBrowserOptionsProps } from '../../../fields_browser'; import { mockTriggersActionsUi } from '../../../../../common/mock/mock_triggers_actions_ui_plugin'; import { mockTimelines } from '../../../../../common/mock/mock_timelines_plugin'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx index 2bd5eda49bd98..0c0acedf3fa3c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx @@ -6,23 +6,24 @@ */ import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react'; -import { Droppable, DraggableChildrenFn } from 'react-beautiful-dnd'; +import type { DraggableChildrenFn } from 'react-beautiful-dnd'; +import { Droppable } from 'react-beautiful-dnd'; import { DragEffects } from '../../../../../common/components/drag_and_drop/draggable_wrapper'; import { DraggableFieldBadge } from '../../../../../common/components/draggables/field_badge'; -import { BrowserFields } from '../../../../../common/containers/source'; +import type { BrowserFields } from '../../../../../common/containers/source'; import { DRAG_TYPE_FIELD, droppableTimelineColumnsPrefix, } from '../../../../../common/components/drag_and_drop/helpers'; -import { +import type { ColumnHeaderOptions, ControlColumnProps, HeaderActionProps, - TimelineId, TimelineTabs, } from '../../../../../../common/types/timeline'; -import { OnSelectAll } from '../../events'; +import { TimelineId } from '../../../../../../common/types/timeline'; +import type { OnSelectAll } from '../../events'; import { EventsTh, EventsThead, @@ -30,11 +31,12 @@ import { EventsTrHeader, EventsThGroupActions, } from '../../styles'; -import { Sort } from '../sort'; +import type { Sort } from '../sort'; import { ColumnHeader } from './column_header'; import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; -import { useFieldBrowserOptions, FieldEditorActions } from '../../../fields_browser'; +import type { FieldEditorActions } from '../../../fields_browser'; +import { useFieldBrowserOptions } from '../../../fields_browser'; export interface ColumnHeadersComponentProps { actionsColumnWidth: number; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx index 8ce0e74cffb74..2eca94729aeb7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/range_picker/index.tsx @@ -9,7 +9,7 @@ import { EuiSelect } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { OnRangeSelected } from '../../../events'; +import type { OnRangeSelected } from '../../../events'; import { Ranges } from './ranges'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx index b19b951170cee..d22e2ca40ca40 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/text_filter/index.tsx @@ -10,8 +10,8 @@ import { noop } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { OnFilterChange } from '../../../events'; -import { ColumnId } from '../../column_id'; +import type { OnFilterChange } from '../../../events'; +import type { ColumnId } from '../../column_id'; interface Props { columnId: ColumnId; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/control_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/control_columns/index.tsx index 11e8dd7f4d329..e1712409074de 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/control_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/control_columns/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { getActionsColumnWidth } from '@kbn/timelines-plugin/public'; -import { ControlColumnProps } from '../../../../../../common/types/timeline'; +import type { ControlColumnProps } from '../../../../../../common/types/timeline'; import { Actions } from '../actions'; import * as i18n from '../../../../../common/components/events_viewer/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx index 031c6e9f98ef7..9fecbcd9f5691 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/index.tsx @@ -11,9 +11,9 @@ import { getOr } from 'lodash/fp'; import { DRAGGABLE_KEYBOARD_WRAPPER_CLASS_NAME } from '@kbn/securitysolution-t-grid'; import type { SetEventsLoading, SetEventsDeleted } from '@kbn/timelines-plugin/common'; -import { Ecs } from '../../../../../../common/ecs'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; -import { +import type { Ecs } from '../../../../../../common/ecs'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions, CellValueElementProps, ActionProps, @@ -22,8 +22,8 @@ import { RowCellRender, } from '../../../../../../common/types/timeline'; import { ARIA_COLUMN_INDEX_OFFSET } from '../../helpers'; -import { OnRowSelected } from '../../events'; -import { inputsModel } from '../../../../../common/store'; +import type { OnRowSelected } from '../../events'; +import type { inputsModel } from '../../../../../common/store'; import { EventsTd, EVENTS_TD_CLASS_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.test.tsx index 4afeb9d58c865..50d2df21a2f19 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.test.tsx @@ -10,12 +10,12 @@ import { cloneDeep } from 'lodash/fp'; import React, { useEffect } from 'react'; import { defaultHeaders, mockTimelineData } from '../../../../../common/mock'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; -import { +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions, CellValueElementProps, - TimelineTabs, } from '../../../../../../common/types/timeline'; +import { TimelineTabs } from '../../../../../../common/types/timeline'; import { StatefulCell } from './stateful_cell'; import { useGetMappedNonEcsValue } from '.'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.tsx index c3e106f63501a..7dd836182f787 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/data_driven_columns/stateful_cell.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { HTMLAttributes, useState } from 'react'; +import type { HTMLAttributes } from 'react'; +import React, { useState } from 'react'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; -import { +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions, CellValueElementProps, TimelineTabs, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx index ae576e7c81512..6d6af33a7bfec 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/event_column_view.tsx @@ -8,13 +8,13 @@ import React, { useMemo } from 'react'; import type { SetEventsLoading, SetEventsDeleted } from '@kbn/timelines-plugin/common'; -import { Ecs } from '../../../../../../common/ecs'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; -import { OnRowSelected } from '../../events'; +import type { Ecs } from '../../../../../../common/ecs'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { OnRowSelected } from '../../events'; import { EventsTrData, EventsTdGroupActions } from '../../styles'; import { DataDrivenColumns, getMappedNonEcsValue } from '../data_driven_columns'; -import { inputsModel } from '../../../../../common/store'; -import { +import type { inputsModel } from '../../../../../common/store'; +import type { ColumnHeaderOptions, CellValueElementProps, ControlColumnProps, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx index 69d97a4e248ea..1338fc8d9c2cc 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/index.tsx @@ -8,19 +8,19 @@ import React from 'react'; import { isEmpty } from 'lodash'; -import { inputsModel } from '../../../../../common/store'; -import { +import type { inputsModel } from '../../../../../common/store'; +import type { TimelineItem, TimelineNonEcsData, } from '../../../../../../common/search_strategy/timeline'; -import { +import type { ColumnHeaderOptions, CellValueElementProps, ControlColumnProps, RowRenderer, TimelineTabs, } from '../../../../../../common/types/timeline'; -import { OnRowSelected } from '../../events'; +import type { OnRowSelected } from '../../events'; import { EventsTbody } from '../../styles'; import { StatefulEvent } from './stateful_event'; import { eventIsPinned } from '../helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx index 1e8835c57d449..c25ac6573d79d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_event.tsx @@ -11,30 +11,30 @@ import { useDispatch } from 'react-redux'; import type { SetEventsDeleted, SetEventsLoading } from '@kbn/timelines-plugin/common'; import { StatefulEventContext } from '@kbn/timelines-plugin/public'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; -import { +import type { ColumnHeaderOptions, CellValueElementProps, ControlColumnProps, RowRenderer, TimelineExpandedDetailType, - TimelineId, - TimelineTabs, } from '../../../../../../common/types/timeline'; -import { +import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; +import type { TimelineItem, TimelineNonEcsData, } from '../../../../../../common/search_strategy/timeline'; -import { OnRowSelected } from '../../events'; +import type { OnRowSelected } from '../../events'; import { STATEFUL_EVENT_CSS_CLASS_NAME } from '../../helpers'; import { EventsTrGroup, EventsTrSupplement, EventsTrSupplementContainer } from '../../styles'; import { isEventBuildingBlockType, getEventType, isEvenEqlSequence } from '../helpers'; import { NoteCards } from '../../../notes/note_cards'; import { useEventDetailsWidthContext } from '../../../../../common/components/events_viewer/event_details_width_context'; import { EventColumnView } from './event_column_view'; -import { appSelectors, inputsModel } from '../../../../../common/store'; +import type { inputsModel } from '../../../../../common/store'; +import { appSelectors } from '../../../../../common/store'; import { timelineActions, timelineSelectors } from '../../../../store/timeline'; import { activeTimeline } from '../../../../containers/active_timeline_context'; -import { TimelineResultNote } from '../../../open_timeline/types'; +import type { TimelineResultNote } from '../../../open_timeline/types'; import { getRowRenderer } from '../renderers/get_row_renderer'; import { StatefulRowRenderer } from './stateful_row_renderer'; import { NOTES_BUTTON_CLASS_NAME } from '../../properties/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx index 9d2cd7a03ad55..b9a02a949ae85 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/stateful_row_renderer/index.tsx @@ -14,8 +14,8 @@ import { ARIA_ROWINDEX_ATTRIBUTE, getRowRendererClassName, } from '@kbn/timelines-plugin/public'; -import { RowRenderer } from '../../../../../../../common/types'; -import { TimelineItem } from '../../../../../../../common/search_strategy/timeline'; +import type { RowRenderer } from '../../../../../../../common/types'; +import type { TimelineItem } from '../../../../../../../common/search_strategy/timeline'; import { getRowRenderer } from '../../renderers/get_row_renderer'; import { useStatefulEventFocus } from '../use_stateful_event_focus'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/use_stateful_event_focus/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/use_stateful_event_focus/index.tsx index 85a2f0a1e08f2..2f5fc9d7c8d89 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/use_stateful_event_focus/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/events/use_stateful_event_focus/index.tsx @@ -5,14 +5,15 @@ * 2.0. */ -import React, { useCallback, useState, useMemo } from 'react'; +import type React from 'react'; +import { useCallback, useState, useMemo } from 'react'; +import type { OnColumnFocused } from '@kbn/timelines-plugin/public'; import { isArrowDownOrArrowUp, isArrowUp, isEscape, focusColumn, - OnColumnFocused, } from '@kbn/timelines-plugin/public'; type FocusOwnership = 'not-owned' | 'owned'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts index 35b7e26ad4de6..25a5b89d7e3d3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.test.ts @@ -12,7 +12,7 @@ import { getPinTooltip, stringifyEvent, } from './helpers'; -import { Ecs } from '../../../../../common/ecs'; +import type { Ecs } from '../../../../../common/ecs'; import { TimelineType } from '../../../../../common/types/timeline'; describe('helpers', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx index 2076c57d3db48..876afd8cbd989 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx @@ -7,14 +7,11 @@ import { isEmpty } from 'lodash/fp'; -import { Ecs } from '../../../../../common/ecs'; -import { TimelineItem, TimelineNonEcsData } from '../../../../../common/search_strategy'; -import { - TimelineEventsType, - TimelineTypeLiteral, - TimelineType, -} from '../../../../../common/types/timeline'; -import { OnPinEvent, OnUnPinEvent } from '../events'; +import type { Ecs } from '../../../../../common/ecs'; +import type { TimelineItem, TimelineNonEcsData } from '../../../../../common/search_strategy'; +import type { TimelineEventsType, TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineType } from '../../../../../common/types/timeline'; +import type { OnPinEvent, OnUnPinEvent } from '../events'; import * as i18n from './translations'; export const omitTypenameAndEmpty = ( diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx index f87baf3fd055a..d3030c668b0c8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.test.tsx @@ -25,14 +25,16 @@ import { TestProviders } from '../../../../common/mock/test_providers'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useAppToastsMock } from '../../../../common/hooks/use_app_toasts.mock'; -import { StatefulBody, Props } from '.'; -import { Sort } from './sort'; +import type { Props } from '.'; +import { StatefulBody } from '.'; +import type { Sort } from './sort'; import { getDefaultControlColumn } from './control_columns'; import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { timelineActions } from '../../../store/timeline'; import { TimelineTabs } from '../../../../../common/types/timeline'; import { defaultRowRenderers } from './renderers'; -import { createStore, State } from '../../../../common/store'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; jest.mock('../../../../common/hooks/use_app_toasts'); jest.mock('../../../../common/components/user_privileges', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx index df4a3703be35f..c1c5f7e9056b2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/index.tsx @@ -16,24 +16,23 @@ import { onKeyDownFocusHandler, getActionsColumnWidth, } from '@kbn/timelines-plugin/public'; -import { CellValueElementProps } from '../cell_rendering'; +import type { CellValueElementProps } from '../cell_rendering'; import { DEFAULT_COLUMN_MIN_WIDTH } from './constants'; -import { +import type { ControlColumnProps, - RowRendererId, RowRenderer, - TimelineId, TimelineTabs, } from '../../../../../common/types/timeline'; -import { BrowserFields } from '../../../../common/containers/source'; -import { TimelineItem } from '../../../../../common/search_strategy/timeline'; -import { inputsModel, State } from '../../../../common/store'; +import { RowRendererId, TimelineId } from '../../../../../common/types/timeline'; +import type { BrowserFields } from '../../../../common/containers/source'; +import type { TimelineItem } from '../../../../../common/search_strategy/timeline'; +import type { inputsModel, State } from '../../../../common/store'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { timelineActions } from '../../../store/timeline'; -import { OnRowSelected, OnSelectAll } from '../events'; +import type { OnRowSelected, OnSelectAll } from '../events'; import { getColumnHeaders } from './column_headers/helpers'; import { getEventIdToDataMapping } from './helpers'; -import { Sort } from './sort'; +import type { Sort } from './sort'; import { plainRowRenderer } from './renderers/plain_row_renderer'; import { EventsTable, TimelineBody, TimelineBodyGlobalStyle } from '../styles'; import { ColumnHeaders } from './column_headers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts index 2562d91ee3374..36749de01333a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/mini_map/date_ranges.test.ts @@ -7,7 +7,8 @@ import moment from 'moment'; -import { getDateRange, getDates, MomentUnit } from './date_ranges'; +import type { MomentUnit } from './date_ranges'; +import { getDateRange, getDates } from './date_ranges'; describe('dateRanges', () => { describe('#getDates', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx index bcadb329c65ca..c4e0915810970 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_details.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { DraggableBadge } from '../../../../../../common/components/draggables'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx index dd48571092dec..be927fd2aac05 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_file_details.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiFlexGroup, EuiSpacer, IconType } from '@elastic/eui'; +import type { IconType } from '@elastic/eui'; +import { EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { DraggableBadge } from '../../../../../../common/components/draggables'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx index a5571f9c50b43..33c0ff5168dab 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.test.tsx @@ -9,8 +9,8 @@ import { shallow } from 'enzyme'; import { cloneDeep } from 'lodash/fp'; import React from 'react'; -import { RowRenderer } from '../../../../../../../common/types'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { RowRenderer } from '../../../../../../../common/types'; +import type { Ecs } from '../../../../../../../common/ecs'; import { mockTimelineData, TestProviders } from '../../../../../../common/mock'; import { useMountAppended } from '../../../../../../common/utils/use_mount_appended'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx index 87baa4aaffac0..0bbe94ace677c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/auditd/generic_row_renderer.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { IconType } from '@elastic/eui'; +import type { IconType } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { RowRendererContainer } from '../row_renderer'; import { AuditdGenericDetails } from './generic_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts index c10261bfbb3a1..22a393a785ed5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts @@ -8,9 +8,9 @@ import type React from 'react'; import type { Filter } from '@kbn/es-query'; -import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; -import { Ecs } from '../../../../../../common/ecs'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; +import type { Ecs } from '../../../../../../common/ecs'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; export interface ColumnRenderer { isInstance: (columnName: string, data: TimelineNonEcsData[]) => boolean; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/helpers.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/helpers.ts index 99dc241650bd4..78e4debb5cbf6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/helpers.ts @@ -10,8 +10,8 @@ import styled from 'styled-components'; import { ENRICHMENT_DESTINATION_PATH } from '../../../../../../../common/constants'; import { INDICATOR_MATCH_SUBFIELDS } from '../../../../../../../common/cti/constants'; -import { Ecs } from '../../../../../../../common/ecs'; -import { ThreatIndicatorEcs } from '../../../../../../../common/ecs/threat'; +import type { Ecs } from '../../../../../../../common/ecs'; +import type { ThreatIndicatorEcs } from '../../../../../../../common/ecs/threat'; const getIndicatorEcs = (data: Ecs): ThreatIndicatorEcs[] => { const threatData = get(data, ENRICHMENT_DESTINATION_PATH); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.test.tsx index e4600048bc1da..50afca712bccb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.test.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { TestProviders } from '../../../../../../common/mock'; import { useMountAppended } from '../../../../../../common/utils/use_mount_appended'; -import { ThreatMatchRowProps, ThreatMatchRowView } from './threat_match_row'; +import type { ThreatMatchRowProps } from './threat_match_row'; +import { ThreatMatchRowView } from './threat_match_row'; jest.mock('../../../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.tsx index 7b6ddd361ba8d..14ba63e7adfb6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row.tsx @@ -9,7 +9,7 @@ import { get } from 'lodash'; import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { Fields } from '../../../../../../../common/search_strategy'; +import type { Fields } from '../../../../../../../common/search_strategy'; import { MATCHED_ATOMIC, MATCHED_FIELD, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row_renderer.tsx index 16426bf74aba7..9044370711d5a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_row_renderer.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { hasThreatMatchValue } from './helpers'; import { ThreatMatchRows } from './threat_match_rows'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx index 0b76c97a5c17e..3963d690b4c3c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/cti/threat_match_rows.tsx @@ -11,8 +11,8 @@ import React, { Fragment } from 'react'; import styled from 'styled-components'; import { ENRICHMENT_DESTINATION_PATH } from '../../../../../../../common/constants'; -import { RowRenderer } from '../../../../../../../common/types'; -import { Fields } from '../../../../../../../common/search_strategy'; +import type { RowRenderer } from '../../../../../../../common/types'; +import type { Fields } from '../../../../../../../common/search_strategy'; import { ID_FIELD_NAME } from '../../../../../../common/components/event_details/event_id'; import { RowRendererContainer } from '../row_renderer'; import { ThreatMatchRow } from './threat_match_row'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx index 5c3efba0bc3b6..d35e8c329de92 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/dns/dns_request_event_details.tsx @@ -10,7 +10,7 @@ import { get } from 'lodash/fp'; import React from 'react'; import { Details } from '../helpers'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { NetflowRenderer } from '../netflow'; import { DnsRequestEventDetailsLine } from './dns_request_event_details_line'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx index 5144705f26174..0f8653df92df5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import { DRAGGABLE_KEYBOARD_INSTRUCTIONS_NOT_DRAGGING_SCREEN_READER_ONLY } from '../../../../../common/components/drag_and_drop/translations'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../../common/mock'; import '../../../../../common/mock/match_media'; import { useMountAppended } from '../../../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx index 334bfa76b84e1..c660721c4ca20 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/empty_column_renderer.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import { ColumnHeaderOptions } from '../../../../../../common/types'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions } from '../../../../../../common/types'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { DraggableWrapper, DragEffects, @@ -16,7 +16,7 @@ import { escapeDataProviderId } from '../../../../../common/components/drag_and_ import { getEmptyValue } from '../../../../../common/components/empty_value'; import { EXISTS_OPERATOR } from '../../data_providers/data_provider'; import { Provider } from '../../data_providers/provider'; -import { ColumnRenderer } from './column_renderer'; +import type { ColumnRenderer } from './column_renderer'; import { parseQueryValue } from './parse_query_value'; export const dataNotExistsAtColumn = (columnName: string, data: TimelineNonEcsData[]): boolean => diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx index 00d506df424d3..e7a8798a3189f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/endgame/endgame_security_event_details.tsx @@ -9,7 +9,7 @@ import { EuiSpacer } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { NetflowRenderer } from '../netflow'; import { EndgameSecurityEventDetailsLine } from './endgame_security_event_details_line'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx index 704202be12228..6f8311522f018 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx @@ -7,7 +7,8 @@ /* eslint-disable complexity */ -import { EuiButtonEmpty, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { isNumber, isEmpty } from 'lodash/fp'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx index 95e2dd92b8729..a5eaa0801e528 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field_helpers.tsx @@ -5,17 +5,11 @@ * 2.0. */ -import { - EuiButtonEmpty, - EuiButtonIcon, - EuiLink, - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import { EuiLink, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiToolTip } from '@elastic/eui'; import { isString, isEmpty } from 'lodash/fp'; -import React, { SyntheticEvent, useCallback, useMemo } from 'react'; +import type { SyntheticEvent } from 'react'; +import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { DefaultDraggable } from '../../../../../common/components/draggables'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx index 93283e918d494..6b05e9e11fb8a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import '../../../../../common/mock/match_media'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { mockTimelineData } from '../../../../../common/mock'; import { TestProviders } from '../../../../../common/mock/test_providers'; import { getEmptyValue } from '../../../../../common/components/empty_value'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts index a65f1534cbbbf..f94c1c6105533 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_column_renderer.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; -import { ColumnRenderer } from './column_renderer'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnRenderer } from './column_renderer'; const unhandledColumnRenderer = (): never => { throw new Error('Unhandled Column Renderer'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx index 73bfdfc283361..0f09a66270017 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.test.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; import '../../../../../common/mock/match_media'; -import { Ecs } from '../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../common/ecs'; import { mockTimelineData } from '../../../../../common/mock'; import { TestProviders } from '../../../../../common/mock/test_providers'; import { useMountAppended } from '../../../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts index cb6ea7760842b..2bed7bfce16f2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/get_row_renderer.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { RowRenderer } from '../../../../../../common/types'; -import { Ecs } from '../../../../../../common/ecs'; +import type { RowRenderer } from '../../../../../../common/types'; +import type { Ecs } from '../../../../../../common/ecs'; export const getRowRenderer = (ecs: Ecs, rowRenderers: RowRenderer[]): RowRenderer | null => rowRenderers.find((rowRenderer) => rowRenderer.isInstance(ecs)) ?? null; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx index 6fe3726c328fa..268254f5e42a1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.test.tsx @@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash/fp'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { mockTimelineData } from '../../../../../common/mock'; import { deleteItemIdx, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx index e4644414fdc8e..396ee9e96b54e 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/helpers.tsx @@ -9,7 +9,7 @@ import { EuiFlexItem } from '@elastic/eui'; import { isNumber, isEmpty } from 'lodash/fp'; import styled from 'styled-components'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; export const deleteItemIdx = (data: TimelineNonEcsData[], idx: number) => [ ...data.slice(0, idx), diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx index 991f82d2b916c..03dba41530ee0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/host_name.tsx @@ -6,16 +6,13 @@ */ import React, { useCallback, useContext, useMemo } from 'react'; -import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { useDispatch } from 'react-redux'; import { isString } from 'lodash/fp'; import { StatefulEventContext } from '@kbn/timelines-plugin/public'; import { HostDetailsLink } from '../../../../../common/components/links'; -import { - TimelineId, - TimelineTabs, - TimelineExpandedDetailType, -} from '../../../../../../common/types/timeline'; +import type { TimelineExpandedDetailType } from '../../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { DefaultDraggable } from '../../../../../common/components/draggables'; import { getEmptyTagValue } from '../../../../../common/components/empty_value'; import { TruncatableText } from '../../../../../common/components/truncatable_text'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts index 9a68a8b658149..5d5e42f0d1b02 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { RowRenderer } from '../../../../../../common/types'; +import type { RowRenderer } from '../../../../../../common/types'; import { auditdRowRenderers } from './auditd/generic_row_renderer'; -import { ColumnRenderer } from './column_renderer'; +import type { ColumnRenderer } from './column_renderer'; import { emptyColumnRenderer } from './empty_column_renderer'; import { netflowRowRenderer } from './netflow/netflow_row_renderer'; import { plainColumnRenderer } from './plain_column_renderer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx index acc88ef3ee111..d03a5cde8c384 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow.tsx @@ -8,7 +8,7 @@ import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../common/ecs'; import { asArrayIfExists } from '../../../../../common/lib/helpers'; import { TLS_CLIENT_CERTIFICATE_FINGERPRINT_SHA1_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx index 36971879962e5..35b1e096f48ef 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import '../../../../../../common/mock/match_media'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { getMockNetflowData, TestProviders } from '../../../../../../common/mock'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx index e36e347fc0cc3..52494d9fc7c97 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/netflow_row_renderer.tsx @@ -9,7 +9,8 @@ import { get } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { asArrayIfExists } from '../../../../../../common/lib/helpers'; import { TLS_CLIENT_CERTIFICATE_FINGERPRINT_SHA1_FIELD_NAME, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx index 8b901e4bd42a2..d49347093660a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import '../../../../../common/mock/match_media'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../../common/mock'; import { getEmptyValue } from '../../../../../common/components/empty_value'; import { useMountAppended } from '../../../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx index b22eeff0b2733..7aaf2b796388f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_column_renderer.tsx @@ -9,10 +9,10 @@ import { head } from 'lodash/fp'; import React from 'react'; import type { Filter } from '@kbn/es-query'; -import { ColumnHeaderOptions } from '../../../../../../common/types'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions } from '../../../../../../common/types'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { getEmptyTagValue } from '../../../../../common/components/empty_value'; -import { ColumnRenderer } from './column_renderer'; +import type { ColumnRenderer } from './column_renderer'; import { FormattedFieldValue } from './formatted_field'; export const dataExistsAtColumn = (columnName: string, data: TimelineNonEcsData[]): boolean => diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx index da5a71d4c12f8..ee8494c536d10 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.test.tsx @@ -9,7 +9,7 @@ import { mount, shallow } from 'enzyme'; import { cloneDeep } from 'lodash'; import React from 'react'; -import { Ecs } from '../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../common/ecs'; import { mockTimelineData } from '../../../../../common/mock'; import { plainRowRenderer } from './plain_row_renderer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx index 15620a7fc04b4..40c632479f002 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/plain_row_renderer.tsx @@ -7,7 +7,8 @@ import React from 'react'; -import { RowRendererId, RowRenderer } from '../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../common/types/timeline'; const PlainRowRenderer = () => <>; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx index 77caaabcae3ba..72e32ff62a740 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.test.tsx @@ -13,7 +13,8 @@ import { REASON_FIELD_NAME } from './constants'; import { reasonColumnRenderer } from './reason_column_renderer'; import { plainColumnRenderer } from './plain_column_renderer'; -import { RowRendererId, ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; +import type { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; +import { RowRendererId } from '../../../../../../common/types'; import { render } from '@testing-library/react'; import { TestProviders } from '@kbn/timelines-plugin/public/mock'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx index 72fbc7be19dd2..f7f3792a4c142 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/reason_column_renderer.tsx @@ -9,10 +9,10 @@ import { EuiSpacer, EuiPanel } from '@elastic/eui'; import { isEqual } from 'lodash/fp'; import React, { useMemo } from 'react'; -import { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; -import { Ecs } from '../../../../../../common/ecs'; +import type { ColumnHeaderOptions, RowRenderer } from '../../../../../../common/types'; +import type { Ecs } from '../../../../../../common/ecs'; import { eventRendererNames } from '../../../row_renderers_browser/catalog/constants'; -import { ColumnRenderer } from './column_renderer'; +import type { ColumnRenderer } from './column_renderer'; import { REASON_FIELD_NAME } from './constants'; import { getRowRenderer } from './get_row_renderer'; import { plainColumnRenderer } from './plain_column_renderer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/registry/registry_event_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/registry/registry_event_details.tsx index 1d2c502586687..4cf05e62fc9ff 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/registry/registry_event_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/registry/registry_event_details.tsx @@ -9,7 +9,7 @@ import { get } from 'lodash/fp'; import React from 'react'; import { Details, isNillEmptyOrNotFinite } from '../helpers'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { RegistryEventDetailsLine } from './registry_event_details_line'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/rule_status.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/rule_status.tsx index 25cd1d1475b26..ef205eb00be45 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/rule_status.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/rule_status.tsx @@ -6,7 +6,8 @@ */ import React, { useMemo } from 'react'; -import { EuiBadge, EuiBadgeProps } from '@elastic/eui'; +import type { EuiBadgeProps } from '@elastic/eui'; +import { EuiBadge } from '@elastic/eui'; import { getOr } from 'lodash/fp'; import styled from 'styled-components'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx index 08eeb4248b6b6..1012a675c65ef 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_details.tsx @@ -10,7 +10,7 @@ import { get } from 'lodash/fp'; import React from 'react'; import styled from 'styled-components'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { NetflowRenderer } from '../netflow'; import { SuricataSignature } from './suricata_signature'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx index bde4fb7f592aa..1808be3fcaaee 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { mockTimelineData } from '../../../../../../common/mock'; import '../../../../../../common/mock/match_media'; import { TestProviders } from '../../../../../../common/mock/test_providers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx index 303e0e3f78ba1..6e98e14cdee89 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_row_renderer.tsx @@ -8,7 +8,8 @@ import { get } from 'lodash/fp'; import React from 'react'; -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { RowRendererContainer } from '../row_renderer'; import { SuricataDetails } from './suricata_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx index 1b15258afa7ed..55950f9a9aac6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_signature.tsx @@ -20,7 +20,8 @@ import { Provider } from '../../../data_providers/provider'; import { TokensFlexItem } from '../helpers'; import { getBeginningTokens } from './suricata_links'; import { DefaultDraggable } from '../../../../../../common/components/draggables'; -import { IS_OPERATOR, QueryOperator } from '../../../data_providers/data_provider'; +import type { QueryOperator } from '../../../data_providers/data_provider'; +import { IS_OPERATOR } from '../../../data_providers/data_provider'; export const SURICATA_SIGNATURE_FIELD_NAME = 'suricata.eve.alert.signature'; export const SURICATA_SIGNATURE_ID_FIELD_NAME = 'suricata.eve.alert.signature_id'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx index 471a764042be0..5d343f6f41588 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_details.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { DraggableBadge } from '../../../../../../common/components/draggables'; import { OverflowField } from '../../../../../../common/components/tables/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx index 7042850caa8a2..34fa5c2804852 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_file_details.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiSpacer } from '@elastic/eui'; import { get } from 'lodash/fp'; import React from 'react'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { DraggableBadge } from '../../../../../../common/components/draggables'; import { OverflowField } from '../../../../../../common/components/tables/helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx index 3b2b17fc4cc38..67b9990050b27 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { mockDnsEvent, mockEndpointProcessExecutionMalwarePreventionAlert, @@ -65,6 +65,7 @@ import { mockEndpointSecurityLogOffEvent, } from '../../../../../../common/mock/mock_endgame_ecs_data'; import { useMountAppended } from '../../../../../../common/utils/use_mount_appended'; +import type { EndpointAlertCriteria } from './generic_row_renderer'; import { createDnsRowRenderer, createEndgameProcessRowRenderer, @@ -76,10 +77,9 @@ import { createGenericFileRowRenderer, createSecurityEventRowRenderer, createSocketRowRenderer, - EndpointAlertCriteria, } from './generic_row_renderer'; import * as i18n from './translations'; -import { RowRenderer } from '../../../../../../../common/types'; +import type { RowRenderer } from '../../../../../../../common/types'; // EuiIcons coming from .testenv render the icon's aria-label as a span // extractEuiIcon removes the aria-label before checking for equality diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx index 36ba6adb06917..9db535c80e8e3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/system/generic_row_renderer.tsx @@ -8,7 +8,8 @@ import { get } from 'lodash/fp'; import React from 'react'; -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { DnsRequestEventDetails } from '../dns/dns_request_event_details'; import { EndgameSecurityEventDetails } from '../endgame/endgame_security_event_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx index d3c5da72cd2ad..119b5e7c1cd27 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash'; import React from 'react'; import { ThemeProvider } from 'styled-components'; -import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; +import type { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { defaultHeaders, mockTimelineData } from '../../../../../common/mock'; import { getEmptyValue } from '../../../../../common/components/empty_value'; import { unknownColumnRenderer } from './unknown_column_renderer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx index ed9b3f78a6028..52a085cb6924b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/unknown_column_renderer.tsx @@ -6,7 +6,7 @@ */ import { getEmptyTagValue } from '../../../../../common/components/empty_value'; -import { ColumnRenderer } from './column_renderer'; +import type { ColumnRenderer } from './column_renderer'; export const unknownColumnRenderer: ColumnRenderer = { isInstance: () => true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_name.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_name.tsx index dcf566c88862b..3cebcd3177488 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_name.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/user_name.tsx @@ -6,15 +6,12 @@ */ import React, { useCallback, useContext, useMemo } from 'react'; -import { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; +import type { EuiButtonEmpty, EuiButtonIcon } from '@elastic/eui'; import { useDispatch } from 'react-redux'; import { isString } from 'lodash/fp'; import { StatefulEventContext } from '@kbn/timelines-plugin/public'; -import { - TimelineId, - TimelineTabs, - TimelineExpandedDetailType, -} from '../../../../../../common/types/timeline'; +import type { TimelineExpandedDetailType } from '../../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../../common/types/timeline'; import { DefaultDraggable } from '../../../../../common/components/draggables'; import { getEmptyTagValue } from '../../../../../common/components/empty_value'; import { UserDetailsLink } from '../../../../../common/components/links'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx index ac899cad8521e..d3620e4a61c88 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_details.tsx @@ -9,7 +9,7 @@ import { EuiSpacer } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { NetflowRenderer } from '../netflow'; import { ZeekSignature } from './zeek_signature'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx index 80f4aafbcfeb7..ca842e88c3d57 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.test.tsx @@ -10,7 +10,7 @@ import { cloneDeep } from 'lodash/fp'; import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { mockTimelineData, TestProviders } from '../../../../../../common/mock'; import '../../../../../../common/mock/match_media'; import { useMountAppended } from '../../../../../../common/utils/use_mount_appended'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx index 5fd2acd852804..f1c582e030c65 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_row_renderer.tsx @@ -8,7 +8,8 @@ import { get } from 'lodash/fp'; import React from 'react'; -import { RowRendererId, RowRenderer } from '../../../../../../../common/types/timeline'; +import type { RowRenderer } from '../../../../../../../common/types/timeline'; +import { RowRendererId } from '../../../../../../../common/types/timeline'; import { RowRendererContainer } from '../row_renderer'; import { ZeekDetails } from './zeek_details'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx index 726716c7f53ab..a33269d317465 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.test.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { removeExternalLinkText } from '@kbn/securitysolution-io-ts-utils'; import '../../../../../../common/mock/match_media'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { mockTimelineData, TestProviders } from '../../../../../../common/mock'; import { useMountAppended } from '../../../../../../common/utils/use_mount_appended'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx index f2435db26110e..7f0895cd421ed 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/zeek/zeek_signature.tsx @@ -10,7 +10,7 @@ import { get } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; -import { Ecs } from '../../../../../../../common/ecs'; +import type { Ecs } from '../../../../../../../common/ecs'; import { DragEffects, DraggableWrapper, @@ -18,7 +18,8 @@ import { import { escapeDataProviderId } from '../../../../../../common/components/drag_and_drop/helpers'; import { GoogleLink, ReputationLink } from '../../../../../../common/components/links'; import { Provider } from '../../../data_providers/provider'; -import { IS_OPERATOR, QueryOperator } from '../../../data_providers/data_provider'; +import type { QueryOperator } from '../../../data_providers/data_provider'; +import { IS_OPERATOR } from '../../../data_providers/data_provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts index bd05bf0656687..96503dcac3812 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SortColumnTimeline } from '../../../../../../common/types/timeline'; +import type { SortColumnTimeline } from '../../../../../../common/types/timeline'; /** Specifies which column the timeline is sorted on */ export type Sort = SortColumnTimeline; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx index 3e610abe79050..82c25f00c78ab 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/sort/sort_indicator.tsx @@ -12,7 +12,7 @@ import * as i18n from '../translations'; import { SortNumber } from './sort_number'; import { Direction } from '../../../../../../common/search_strategy'; -import { SortDirection } from '../../../../../../common/types/timeline'; +import type { SortDirection } from '../../../../../../common/types/timeline'; enum SortDirectionIndicatorEnum { SORT_UP = 'sortUp', diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx index 133b3ab5f36db..5da06cf390bad 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.test.tsx @@ -16,8 +16,8 @@ import { DroppableWrapper } from '../../../../common/components/drag_and_drop/dr import { mockBrowserFields } from '../../../../common/containers/source/mock'; import { defaultHeaders, mockTimelineData, TestProviders } from '../../../../common/mock'; import { DefaultCellRenderer } from './default_cell_renderer'; -import { BrowserFields } from '@kbn/timelines-plugin/common/search_strategy'; -import { Ecs } from '../../../../../common/ecs'; +import type { BrowserFields } from '@kbn/timelines-plugin/common/search_strategy'; +import type { Ecs } from '../../../../../common/ecs'; jest.mock('../../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx index 88cd6fa6541dc..8b5865486df72 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/default_cell_renderer.tsx @@ -10,7 +10,7 @@ import React, { useMemo } from 'react'; import { useGetMappedNonEcsValue } from '../body/data_driven_columns'; import { columnRenderers } from '../body/renderers'; import { getColumnRenderer } from '../body/renderers/get_column_renderer'; -import { CellValueElementProps } from '.'; +import type { CellValueElementProps } from '.'; import { getLinkColumnDefinition } from '../../../../common/lib/cell_actions/helpers'; import { FIELDS_WITHOUT_CELL_ACTIONS } from '../../../../common/lib/cell_actions/constants'; import { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx index 52443cf92a9cb..b2a1b091ded83 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/add_data_provider_popover.tsx @@ -7,6 +7,7 @@ import { pick } from 'lodash/fp'; import React, { useCallback, useMemo, useState } from 'react'; +import type { EuiContextMenuPanelItemDescriptor } from '@elastic/eui'; import { EuiButton, EuiButtonEmpty, @@ -14,12 +15,11 @@ import { EuiText, EuiPopover, EuiIcon, - EuiContextMenuPanelItemDescriptor, } from '@elastic/eui'; import uuid from 'uuid'; import { useDispatch } from 'react-redux'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; import { TimelineType } from '../../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { StatefulEditDataProvider } from '../../edit_data_provider'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx index 3f6b1f629217a..709638de9cb71 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/empty.tsx @@ -9,7 +9,7 @@ import { EuiBadge, EuiText } from '@elastic/eui'; import React from 'react'; import styled from 'styled-components'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; import { AndOrBadge } from '../../../../common/components/and_or_badge'; import { AddDataProviderPopover } from './add_data_provider_popover'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx index c3fe83b1e3445..faafb8eca7eca 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { DataProvider, DataProvidersAnd } from './data_provider'; +import type { DataProvider, DataProvidersAnd } from './data_provider'; import { addContentToTimeline, addProviderToGroup, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx index 4a558df6a9a4e..2af72c36d26ef 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/helpers.tsx @@ -6,12 +6,12 @@ */ import { omit } from 'lodash/fp'; -import { DraggableLocation } from 'react-beautiful-dnd'; -import { Dispatch } from 'redux'; +import type { DraggableLocation } from 'react-beautiful-dnd'; +import type { Dispatch } from 'redux'; import { updateProviders } from '../../../store/timeline/actions'; -import { DataProvider, DataProvidersAnd } from './data_provider'; +import type { DataProvider, DataProvidersAnd } from './data_provider'; export const omitAnd = (provider: DataProvider): DataProvidersAnd => omit('and', provider); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx index d1b66da19c5eb..f2ee132748821 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_and_providers.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { DataProvider, DataProvidersAnd, IS_OPERATOR } from '../data_provider'; +import type { DataProvider, DataProvidersAnd } from '../data_provider'; +import { IS_OPERATOR } from '../data_provider'; export const providerA: DataProvidersAnd = { enabled: true, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx index 73bb84b75b489..c5a491bd01975 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/mock/mock_data_providers.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { DataProvider, IS_OPERATOR } from '../data_provider'; +import type { DataProvider } from '../data_provider'; +import { IS_OPERATOR } from '../data_provider'; interface NameToEventCount { [name: string]: TValue; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx index 8bba09996c607..dcfd4337af803 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider.tsx @@ -8,7 +8,8 @@ import { noop } from 'lodash/fp'; import React, { useState } from 'react'; -import { DataProvider, DataProviderType, IS_OPERATOR } from './data_provider'; +import type { DataProvider } from './data_provider'; +import { DataProviderType, IS_OPERATOR } from './data_provider'; import { ProviderItemBadge } from './provider_item_badge'; interface OwnProps { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx index 6ee6d45804d54..2c1a33c69c1c5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_badge.tsx @@ -15,7 +15,8 @@ import { TimelineType } from '../../../../../common/types/timeline'; import { getEmptyString } from '../../../../common/components/empty_value'; import { ProviderContainer } from '../../../../common/components/drag_and_drop/provider_container'; -import { DataProviderType, EXISTS_OPERATOR, QueryOperator } from './data_provider'; +import type { QueryOperator } from './data_provider'; +import { DataProviderType, EXISTS_OPERATOR } from './data_provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx index 8c758eb6ef569..b78866ceb82ab 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_actions.tsx @@ -5,20 +5,18 @@ * 2.0. */ -import { - EuiContextMenu, - EuiContextMenuPanelDescriptor, - EuiPopover, - EuiPopoverProps, -} from '@elastic/eui'; -import React, { FunctionComponent } from 'react'; +import type { EuiContextMenuPanelDescriptor, EuiPopoverProps } from '@elastic/eui'; +import { EuiContextMenu, EuiPopover } from '@elastic/eui'; +import type { FunctionComponent } from 'react'; +import React from 'react'; import styled from 'styled-components'; import { TimelineType } from '../../../../../common/types/timeline'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; -import { OnDataProviderEdited } from '../events'; -import { DataProviderType, QueryOperator, EXISTS_OPERATOR } from './data_provider'; +import type { OnDataProviderEdited } from '../events'; +import type { QueryOperator } from './data_provider'; +import { DataProviderType, EXISTS_OPERATOR } from './data_provider'; import { StatefulEditDataProvider } from '../../edit_data_provider'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx index e5e5ad5f010fc..82d58f1980060 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/provider_item_badge.tsx @@ -10,17 +10,18 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; import { TimelineType } from '../../../../../common/types/timeline'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; import { useDeepEqualSelector, useShallowEqualSelector, } from '../../../../common/hooks/use_selector'; import { timelineSelectors } from '../../../store/timeline'; -import { OnDataProviderEdited } from '../events'; +import type { OnDataProviderEdited } from '../events'; import { ProviderBadge } from './provider_badge'; import { ProviderItemActions } from './provider_item_actions'; -import { DataProvidersAnd, DataProviderType, QueryOperator } from './data_provider'; +import type { DataProvidersAnd, QueryOperator } from './data_provider'; +import { DataProviderType } from './data_provider'; import { dragAndDropActions } from '../../../../common/store/drag_and_drop'; interface ProviderItemBadgeProps { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx index 7e52267cd6f1b..eb3e9a2c280b3 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/data_providers/providers.tsx @@ -8,7 +8,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiFormHelpText, EuiSpacer } from '@elastic/eui'; import { rgba } from 'polished'; import React, { useCallback, useMemo, useRef, useState } from 'react'; -import { Draggable, DraggingStyle, Droppable, NotDraggingStyle } from 'react-beautiful-dnd'; +import type { DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd'; +import { Draggable, Droppable } from 'react-beautiful-dnd'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; @@ -20,12 +21,13 @@ import { timelineActions } from '../../../store/timeline'; import { AndOrBadge } from '../../../../common/components/and_or_badge'; import { AddDataProviderPopover } from './add_data_provider_popover'; -import { BrowserFields } from '../../../../common/containers/source'; +import type { BrowserFields } from '../../../../common/containers/source'; import { getTimelineProviderDraggableId, getTimelineProviderDroppableId, } from '../../../../common/components/drag_and_drop/helpers'; -import { DataProvider, DataProviderType, DataProvidersAnd, IS_OPERATOR } from './data_provider'; +import type { DataProvider, DataProvidersAnd } from './data_provider'; +import { DataProviderType, IS_OPERATOR } from './data_provider'; import { EMPTY_GROUP, flattenIntoAndGroups } from './helpers'; import { ProviderItemBadge } from './provider_item_badge'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.test.tsx index ac766c7df986d..c2036263ec28d 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.test.tsx @@ -15,7 +15,8 @@ import { defaultHeaders, mockTimelineData } from '../../../../common/mock'; import '../../../../common/mock/match_media'; import { TestProviders } from '../../../../common/mock/test_providers'; -import { EqlTabContentComponent, Props as EqlTabContentComponentProps } from '.'; +import type { Props as EqlTabContentComponentProps } from '.'; +import { EqlTabContentComponent } from '.'; import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../containers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.tsx index c9dd9ce76d665..5c52fa0dc2570 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/eql_tab_content/index.tsx @@ -16,37 +16,38 @@ import { import { isEmpty } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo } from 'react'; import styled from 'styled-components'; -import { Dispatch } from 'redux'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; +import type { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { InPortal } from 'react-reverse-portal'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; -import { CellValueElementProps } from '../cell_rendering'; -import { TimelineItem } from '../../../../../common/search_strategy'; +import type { CellValueElementProps } from '../cell_rendering'; +import type { TimelineItem } from '../../../../../common/search_strategy'; import { useTimelineEvents } from '../../../containers'; import { defaultHeaders } from '../body/column_headers/default_headers'; import { StatefulBody } from '../body'; import { Footer, footerHeight } from '../footer'; import { calculateTotalPages } from '../helpers'; import { TimelineRefetch } from '../refetch_timeline'; -import { +import type { ControlColumnProps, RowRenderer, - TimelineId, - TimelineTabs, ToggleDetailPanel, } from '../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { requiredFieldsForActions } from '../../../../detections/components/alerts_table/default_config'; import { ExitFullScreen } from '../../../../common/components/exit_full_screen'; import { SuperDatePicker } from '../../../../common/components/super_date_picker'; import { EventDetailsWidthProvider } from '../../../../common/components/events_viewer/event_details_width_context'; -import { inputsModel, inputsSelectors, State } from '../../../../common/store'; +import type { inputsModel, State } from '../../../../common/store'; +import { inputsSelectors } from '../../../../common/store'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { useEqlEventsCountPortal } from '../../../../common/hooks/use_timeline_events_count'; -import { TimelineModel } from '../../../store/timeline/model'; +import type { TimelineModel } from '../../../store/timeline/model'; import { TimelineDatePickerLock } from '../date_picker_lock'; import { useTimelineFullScreen } from '../../../../common/containers/use_full_screen'; import { activeTimeline } from '../../../containers/active_timeline_context'; @@ -54,7 +55,7 @@ import { DetailsPanel } from '../../side_panel'; import { EqlQueryBarTimeline } from '../query_bar/eql'; import { HeaderActions } from '../body/actions/header_actions'; import { getDefaultControlColumn } from '../body/control_columns'; -import { Sort } from '../body/sort'; +import type { Sort } from '../body/sort'; import { Sourcerer } from '../../../../common/components/sourcerer'; const TimelineHeaderContainer = styled.div` diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts index c90d04e1e640a..5aff599670dc2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ColumnId } from './body/column_id'; -import { DataProvider, QueryOperator } from './data_providers/data_provider'; +import type { ColumnId } from './body/column_id'; +import type { DataProvider, QueryOperator } from './data_providers/data_provider'; export type { OnColumnSorted, OnColumnsSorted, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx index 1a100e5bf4815..8974dea1aded7 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiPopoverProps } from '@elastic/eui'; import { EuiBadge, EuiButtonEmpty, @@ -16,15 +17,15 @@ import { EuiPopover, EuiText, EuiToolTip, - EuiPopoverProps, EuiPagination, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { FC, useCallback, useEffect, useState, useMemo } from 'react'; +import type { FC } from 'react'; +import React, { useCallback, useEffect, useState, useMemo } from 'react'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; -import { OnChangePage } from '../events'; +import type { OnChangePage } from '../events'; import { EVENTS_COUNT_BUTTON_CLASS_NAME } from '../helpers'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/graph_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/graph_tab_content/index.tsx index b835c87308e15..dbe88de36b97b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/graph_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/graph_tab_content/index.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem } from '@elastic/eui'; import styled from 'styled-components'; import { timelineSelectors } from '../../../store/timeline'; import { useShallowEqualSelector } from '../../../../common/hooks/use_selector'; -import { TimelineId } from '../../../../../common/types/timeline'; +import type { TimelineId } from '../../../../../common/types/timeline'; import { GraphOverlay } from '../../graph_overlay'; import { useSessionViewNavigation, useSessionView } from '../session_tab_content/use_session_view'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/index.tsx index 052bed15ac8a9..1164c70009ac5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/index.tsx @@ -13,10 +13,8 @@ import { DataProviders } from '../data_providers'; import { StatefulSearchOrFilter } from '../search_or_filter'; import * as i18n from './translations'; -import { - TimelineStatus, - TimelineStatusLiteralWithNull, -} from '../../../../../common/types/timeline'; +import type { TimelineStatusLiteralWithNull } from '../../../../../common/types/timeline'; +import { TimelineStatus } from '../../../../../common/types/timeline'; interface Props { filterManager: FilterManager; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/schema.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/schema.ts index 406a26ac97102..3c025b774eae4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/schema.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/schema.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { FIELD_TYPES, FormSchema, fieldValidators } from '../../../../shared_imports'; +import type { FormSchema } from '../../../../shared_imports'; +import { FIELD_TYPES, fieldValidators } from '../../../../shared_imports'; export const formSchema: FormSchema = { title: { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts index 082650548d56c..fa58db5d8a7cf 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/header/translations.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { TimelineType, TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineType } from '../../../../../common/types/timeline'; export const CALL_OUT_UNAUTHORIZED_MSG = i18n.translate( 'xpack.securitySolution.timeline.callOut.unauthorized.message.description', diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.test.tsx index 8014a0e257971..5f6713c82c42c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.test.tsx @@ -12,7 +12,8 @@ import { DataProviderType } from './data_providers/data_provider'; import { mockDataProviders } from './data_providers/mock/mock_data_providers'; import { buildGlobalQuery, combineQueries, resolverIsShowing, showGlobalFilters } from './helpers'; import { mockBrowserFields } from '../../../common/containers/source/mock'; -import { EsQueryConfig, FilterStateStore, Filter } from '@kbn/es-query'; +import type { EsQueryConfig, Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; const cleanUpKqlQuery = (str: string) => str.replace(/\n/g, '').replace(/\s\s+/g, ' '); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx index cbe7a57bc13a3..94e42c158a469 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx @@ -18,13 +18,9 @@ import { } from '@kbn/timelines-plugin/public'; import { escapeQueryValue, convertToBuildEsQuery } from '../../../common/lib/keury'; -import { - DataProvider, - DataProviderType, - DataProvidersAnd, - EXISTS_OPERATOR, -} from './data_providers/data_provider'; -import { BrowserFields } from '../../../common/containers/source'; +import type { DataProvider, DataProvidersAnd } from './data_providers/data_provider'; +import { DataProviderType, EXISTS_OPERATOR } from './data_providers/data_provider'; +import type { BrowserFields } from '../../../common/containers/source'; import { EVENTS_TABLE_CLASS_NAME } from './styles'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx index 6b29ea26da045..a9d3f8c31b0a0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.test.tsx @@ -23,7 +23,8 @@ import { TestProviders, } from '../../../common/mock'; -import { StatefulTimeline, Props as StatefulTimelineOwnProps } from '.'; +import type { Props as StatefulTimelineOwnProps } from '.'; +import { StatefulTimeline } from '.'; import { useTimelineEvents } from '../../containers'; import { DefaultCellRenderer } from './cell_rendering/default_cell_renderer'; import { SELECTOR_TIMELINE_GLOBAL_CONTAINER } from './styles'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx index b97885fa84cbc..364e853c4a2a4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/index.tsx @@ -15,10 +15,11 @@ import { isTab, TimelineContext } from '@kbn/timelines-plugin/public'; import { timelineActions, timelineSelectors } from '../../store/timeline'; import { timelineDefaults } from '../../store/timeline/defaults'; import { defaultHeaders } from './body/column_headers/default_headers'; -import { CellValueElementProps } from './cell_rendering'; +import type { CellValueElementProps } from './cell_rendering'; import { SourcererScopeName } from '../../../common/store/sourcerer/model'; import { FlyoutHeader, FlyoutHeaderPanel } from '../flyout/header'; -import { TimelineType, TimelineId, RowRenderer } from '../../../../common/types/timeline'; +import type { TimelineId, RowRenderer } from '../../../../common/types/timeline'; +import { TimelineType } from '../../../../common/types/timeline'; import { useDeepEqualSelector, useShallowEqualSelector } from '../../../common/hooks/use_selector'; import { activeTimeline } from '../../containers/active_timeline_context'; import { EVENTS_COUNT_BUTTON_CLASS_NAME, onTimelineTabKeyPressed } from './helpers'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content/index.tsx index 7c25794a16c80..382ff4cb0dbaf 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/notes_tab_content/index.tsx @@ -34,7 +34,7 @@ import { AddNote } from '../../notes/add_note'; import { CREATED_BY, NOTES } from '../../notes/translations'; import { PARTICIPANTS } from '../translations'; import { NotePreviews } from '../../open_timeline/note_previews'; -import { TimelineResultNote } from '../../open_timeline/types'; +import type { TimelineResultNote } from '../../open_timeline/types'; import { getTimelineNoteSelector } from './selectors'; import { DetailsPanel } from '../../side_panel'; import { getScrollToTopSelector } from '../tabs_content/selectors'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx index 5a58c084ec996..87bfbea149905 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/pin/index.tsx @@ -9,7 +9,8 @@ import { EuiButtonIcon } from '@elastic/eui'; import { noop } from 'lodash/fp'; import React from 'react'; -import { TimelineType, TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineType } from '../../../../../common/types/timeline'; import * as i18n from '../body/translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.test.tsx index f7291f172879e..bb7dde1a8238a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.test.tsx @@ -14,14 +14,15 @@ import { defaultHeaders, mockTimelineData } from '../../../../common/mock'; import '../../../../common/mock/match_media'; import { TestProviders } from '../../../../common/mock/test_providers'; import { defaultRowRenderers } from '../body/renderers'; -import { Sort } from '../body/sort'; +import type { Sort } from '../body/sort'; import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { useTimelineEvents } from '../../../containers'; import { useTimelineEventsDetails } from '../../../containers/details'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { mockSourcererScope } from '../../../../common/containers/sourcerer/mocks'; -import { PinnedTabContentComponent, Props as PinnedTabContentComponentProps } from '.'; +import type { Props as PinnedTabContentComponentProps } from '.'; +import { PinnedTabContentComponent } from '.'; import { Direction } from '../../../../../common/search_strategy'; import { useDraggableKeyboardWrapper as mockUseDraggableKeyboardWrapper } from '@kbn/timelines-plugin/public/components'; import { mockCasesContext } from '@kbn/cases-plugin/public/mocks/mock_cases_context'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx index eacb6ca4282ab..693d64b9377d1 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/pinned_tab_content/index.tsx @@ -9,14 +9,15 @@ import { EuiFlexGroup, EuiFlexItem, EuiFlyoutBody, EuiFlyoutFooter } from '@elas import { isEmpty } from 'lodash/fp'; import React, { useMemo, useCallback } from 'react'; import styled from 'styled-components'; -import { Dispatch } from 'redux'; -import { connect, ConnectedProps } from 'react-redux'; +import type { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; import { HeaderActions } from '../body/actions/header_actions'; -import { CellValueElementProps } from '../cell_rendering'; -import { Direction } from '../../../../../common/search_strategy'; +import type { CellValueElementProps } from '../cell_rendering'; +import type { Direction } from '../../../../../common/search_strategy'; import { useTimelineEvents } from '../../../containers'; import { defaultHeaders } from '../body/column_headers/default_headers'; import { StatefulBody } from '../body'; @@ -27,15 +28,15 @@ import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { useTimelineFullScreen } from '../../../../common/containers/use_full_screen'; -import { TimelineModel } from '../../../store/timeline/model'; -import { State } from '../../../../common/store'; +import type { TimelineModel } from '../../../store/timeline/model'; +import type { State } from '../../../../common/store'; import { calculateTotalPages } from '../helpers'; -import { +import type { ControlColumnProps, RowRenderer, - TimelineTabs, ToggleDetailPanel, } from '../../../../../common/types/timeline'; +import { TimelineTabs } from '../../../../../common/types/timeline'; import { DetailsPanel } from '../../side_panel'; import { ExitFullScreen } from '../../../../common/components/exit_full_screen'; import { getDefaultControlColumn } from '../body/control_columns'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.test.tsx index 1366fe632a000..76d3ceb240883 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.test.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { mount } from 'enzyme'; import { waitFor } from '@testing-library/react'; -import { AddToFavoritesButton, NewTimeline, NewTimelineProps } from './helpers'; +import type { NewTimelineProps } from './helpers'; +import { AddToFavoritesButton, NewTimeline } from './helpers'; import { useCreateTimelineButton } from './use_create_timeline'; import { kibanaObservable, TestProviders } from '../../../../common/mock/test_providers'; import { timelineActions } from '../../../store/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx index ff0d8686bb9c3..024ef9e89a358 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/helpers.tsx @@ -10,11 +10,8 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; -import { - TimelineTypeLiteral, - TimelineType, - TimelineStatus, -} from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineType, TimelineStatus } from '../../../../../common/types/timeline'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; import { useShallowEqualSelector } from '../../../../common/hooks/use_selector'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/new_template_timeline.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/new_template_timeline.test.tsx index 1cbf7587dd29b..fcecef0d4c212 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/new_template_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/new_template_timeline.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { mount, ReactWrapper } from 'enzyme'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import React from 'react'; import { Provider as ReduxStoreProvider } from 'react-redux'; @@ -15,7 +16,8 @@ import { kibanaObservable, createSecuritySolutionStorageMock, } from '../../../../common/mock'; -import { createStore, State } from '../../../../common/store'; +import type { State } from '../../../../common/store'; +import { createStore } from '../../../../common/store'; import { useKibana } from '../../../../common/lib/kibana'; import { NewTemplateTimeline } from './new_template_timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/use_create_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/use_create_timeline.tsx index bad05baf86a59..d4581de08f3b8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/use_create_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/properties/use_create_timeline.tsx @@ -12,11 +12,8 @@ import { EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { defaultHeaders } from '../body/column_headers/default_headers'; import { timelineActions } from '../../../store/timeline'; import { useTimelineFullScreen } from '../../../../common/containers/use_full_screen'; -import { - TimelineId, - TimelineType, - TimelineTypeLiteral, -} from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineId, TimelineType } from '../../../../../common/types/timeline'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { inputsActions, inputsSelectors } from '../../../../common/store/inputs'; import { sourcererActions, sourcererSelectors } from '../../../../common/store/sourcerer'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx index 2b3b92f09d747..56969a288102c 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx @@ -10,7 +10,7 @@ import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from ' import { useDispatch } from 'react-redux'; import styled from 'styled-components'; -import { FieldsEqlOptions } from '../../../../../../common/search_strategy'; +import type { FieldsEqlOptions } from '../../../../../../common/search_strategy'; import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; @@ -20,9 +20,10 @@ import { debounceAsync, eqlValidator, } from '../../../../../detections/components/rules/eql_query_bar/validators'; -import { FieldValueQueryBar } from '../../../../../detections/components/rules/query_bar'; +import type { FieldValueQueryBar } from '../../../../../detections/components/rules/query_bar'; -import { Form, FormSchema, UseField, useForm, useFormData } from '../../../../../shared_imports'; +import type { FormSchema } from '../../../../../shared_imports'; +import { Form, UseField, useForm, useFormData } from '../../../../../shared_imports'; import { timelineActions } from '../../../../store/timeline'; import * as i18n from '../translations'; import { getEqlOptions } from './selectors'; 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 b301703f3cae2..a1fcefceadfb5 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,12 +21,8 @@ import { buildGlobalQuery } from '../helpers'; import { setAutocomplete } from '@kbn/unified-search-plugin/public/services'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; -import { - QueryBarTimeline, - QueryBarTimelineComponentProps, - getDataProviderFilter, - TIMELINE_FILTER_DROP_AREA, -} from '.'; +import type { QueryBarTimelineComponentProps } from '.'; +import { QueryBarTimeline, getDataProviderFilter, TIMELINE_FILTER_DROP_AREA } from '.'; import { waitFor } from '@testing-library/dom'; const mockUiSettingsForFilterManager = coreMock.createStart().uiSettings; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx index c62869c0f0746..3556f034aaae0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx @@ -11,20 +11,21 @@ import { useDispatch } from 'react-redux'; import { Subscription } from 'rxjs'; import deepEqual from 'fast-deep-equal'; -import { FilterStateStore, Filter, Query } from '@kbn/es-query'; +import type { Filter, Query } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import type { FilterManager, SavedQuery, SavedQueryTimeFilter } from '@kbn/data-plugin/public'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { convertKueryToElasticSearchQuery } from '../../../../common/lib/keury'; -import { KqlMode } from '../../../store/timeline/model'; +import type { KqlMode } from '../../../store/timeline/model'; import { useSavedQueryServices } from '../../../../common/utils/saved_query_services'; -import { DispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; +import type { DispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; import { QueryBar } from '../../../../common/components/query_bar'; -import { DataProvider } from '../data_providers/data_provider'; +import type { DataProvider } from '../data_providers/data_provider'; import { buildGlobalQuery } from '../helpers'; import { timelineActions } from '../../../store/timeline'; -import { KueryFilterQuery, KueryFilterQueryKind } from '../../../../../common/types/timeline'; +import type { KueryFilterQuery, KueryFilterQueryKind } from '../../../../../common/types/timeline'; export interface QueryBarTimelineComponentProps { dataProviders: DataProvider[]; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.test.tsx index a4ddca5e22bf9..831b8358bad26 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.test.tsx @@ -14,9 +14,10 @@ import { defaultHeaders, mockTimelineData } from '../../../../common/mock'; import '../../../../common/mock/match_media'; import { TestProviders } from '../../../../common/mock/test_providers'; -import { QueryTabContentComponent, Props as QueryTabContentComponentProps } from '.'; +import type { Props as QueryTabContentComponentProps } from '.'; +import { QueryTabContentComponent } from '.'; import { defaultRowRenderers } from '../body/renderers'; -import { Sort } from '../body/sort'; +import type { Sort } from '../body/sort'; import { mockDataProviders } from '../data_providers/mock/mock_data_providers'; import { useMountAppended } from '../../../../common/utils/use_mount_appended'; import { TimelineId, TimelineStatus, TimelineTabs } from '../../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx index 771cb52ff1091..163756a8862e8 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx @@ -16,8 +16,9 @@ import { import { isEmpty } from 'lodash/fp'; import React, { useMemo, useEffect, useCallback } from 'react'; import styled from 'styled-components'; -import { Dispatch } from 'redux'; -import { connect, ConnectedProps, useDispatch } from 'react-redux'; +import type { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; import deepEqual from 'fast-deep-equal'; import { InPortal } from 'react-reverse-portal'; @@ -25,8 +26,8 @@ import { FilterManager } from '@kbn/data-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; -import { CellValueElementProps } from '../cell_rendering'; -import { Direction, TimelineItem } from '../../../../../common/search_strategy'; +import type { CellValueElementProps } from '../cell_rendering'; +import type { Direction, TimelineItem } from '../../../../../common/search_strategy'; import { useTimelineEvents } from '../../../containers'; import { useKibana } from '../../../../common/lib/kibana'; import { defaultHeaders } from '../body/column_headers/default_headers'; @@ -35,23 +36,23 @@ import { Footer, footerHeight } from '../footer'; import { TimelineHeader } from '../header'; import { calculateTotalPages, combineQueries } from '../helpers'; import { TimelineRefetch } from '../refetch_timeline'; -import { +import type { ControlColumnProps, KueryFilterQueryKind, RowRenderer, - TimelineId, - TimelineTabs, ToggleDetailPanel, } from '../../../../../common/types/timeline'; +import { TimelineId, TimelineTabs } from '../../../../../common/types/timeline'; import { requiredFieldsForActions } from '../../../../detections/components/alerts_table/default_config'; import { SuperDatePicker } from '../../../../common/components/super_date_picker'; import { EventDetailsWidthProvider } from '../../../../common/components/events_viewer/event_details_width_context'; -import { inputsModel, inputsSelectors, State } from '../../../../common/store'; +import type { inputsModel, State } from '../../../../common/store'; +import { inputsSelectors } from '../../../../common/store'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { useTimelineEventsCountPortal } from '../../../../common/hooks/use_timeline_events_count'; -import { TimelineModel } from '../../../store/timeline/model'; +import type { TimelineModel } from '../../../store/timeline/model'; import { TimelineDatePickerLock } from '../date_picker_lock'; import { useTimelineFullScreen } from '../../../../common/containers/use_full_screen'; import { activeTimeline } from '../../../containers/active_timeline_context'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx index 0b51f0183bbb4..b9872e3a4cbea 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/refetch_timeline.tsx @@ -8,9 +8,9 @@ import React, { useEffect } from 'react'; import { useDispatch } from 'react-redux'; -import { inputsModel } from '../../../common/store'; +import type { inputsModel } from '../../../common/store'; import { inputsActions } from '../../../common/store/actions'; -import { InputsModelId } from '../../../common/store/inputs/constants'; +import type { InputsModelId } from '../../../common/store/inputs/constants'; export interface TimelineRefetchProps { id: string; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx index 3e6aff9acca6b..e8db433c0a117 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/helpers.tsx @@ -12,7 +12,7 @@ import styled from 'styled-components'; import { AndOrBadge } from '../../../../common/components/and_or_badge'; import * as i18n from './translations'; -import { KqlMode } from '../../../store/timeline/model'; +import type { KqlMode } from '../../../store/timeline/model'; const AndOrContainer = styled.div` position: relative; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx index 08ac3ff9ff50a..84f0b59f7d1d4 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx @@ -7,19 +7,21 @@ import { getOr } from 'lodash/fp'; import React, { useCallback } from 'react'; -import { connect, ConnectedProps } from 'react-redux'; -import { Dispatch } from 'redux'; +import type { ConnectedProps } from 'react-redux'; +import { connect } from 'react-redux'; +import type { Dispatch } from 'redux'; import deepEqual from 'fast-deep-equal'; import type { Filter } from '@kbn/es-query'; import type { FilterManager } from '@kbn/data-plugin/public'; -import { State, inputsModel, inputsSelectors } from '../../../../common/store'; +import type { State, inputsModel } from '../../../../common/store'; +import { inputsSelectors } from '../../../../common/store'; import { timelineActions, timelineSelectors } from '../../../store/timeline'; -import { KqlMode, TimelineModel } from '../../../store/timeline/model'; +import type { KqlMode, TimelineModel } from '../../../store/timeline/model'; import { timelineDefaults } from '../../../store/timeline/defaults'; import { dispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; import { SearchOrFilter } from './search_or_filter'; -import { SerializedFilterQuery } from '../../../../../common/types/timeline'; +import type { SerializedFilterQuery } from '../../../../../common/types/timeline'; interface OwnProps { filterManager: FilterManager; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx index c5cc33c18c1c4..5ddfc4cd49623 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx @@ -11,10 +11,10 @@ import styled, { createGlobalStyle } from 'styled-components'; import type { Filter } from '@kbn/es-query'; import type { FilterManager } from '@kbn/data-plugin/public'; -import { KqlMode } from '../../../store/timeline/model'; -import { DispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; -import { KueryFilterQuery } from '../../../../../common/types/timeline'; -import { DataProvider } from '../data_providers/data_provider'; +import type { KqlMode } from '../../../store/timeline/model'; +import type { DispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; +import type { KueryFilterQuery } from '../../../../../common/types/timeline'; +import type { DataProvider } from '../data_providers/data_provider'; import { QueryBarTimeline } from '../query_bar'; import { EuiSuperSelect } from './super_select'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/super_select.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/super_select.tsx index 6b5e60bbf16ee..e26d8339a2134 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/super_select.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/super_select.tsx @@ -11,8 +11,8 @@ (we want the panel to be wider than the input) */ +import type { EuiSuperSelectProps } from '@elastic/eui'; import { - EuiSuperSelectProps, EuiScreenReaderOnly, EuiSuperSelectControl, EuiInputPopover, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx index af7ff36473fd7..2c4db3dc1c5a6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_super_select/index.tsx @@ -5,14 +5,16 @@ * 2.0. */ -import { EuiInputPopover, EuiSelectableOption, EuiFieldText } from '@elastic/eui'; +import type { EuiSelectableOption } from '@elastic/eui'; +import { EuiInputPopover, EuiFieldText } from '@elastic/eui'; import React, { memo, useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { OpenTimelineResult } from '../../open_timeline/types'; +import type { OpenTimelineResult } from '../../open_timeline/types'; import { SelectableTimeline } from '../selectable_timeline'; import * as i18n from '../translations'; -import { TimelineType, TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../../common/types/timeline'; +import { TimelineType } from '../../../../../common/types/timeline'; const StyledEuiFieldText = styled(EuiFieldText)` padding-left: 12px; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx index 6bf1f3b161b85..5b4e08622bc3f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { EuiSelectableProps } from '@elastic/eui'; +import type { EuiSelectableProps } from '@elastic/eui'; import React from 'react'; -import { shallow, ShallowWrapper, mount } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow, mount } from 'enzyme'; import { SortFieldTimeline, TimelineType } from '../../../../../common/types/timeline'; import { SelectableTimeline, ORIGINAL_PAGE_SIZE } from '.'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx index 0d7d9892a9e5e..0c48299931663 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/selectable_timeline/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiSelectableOption, EuiSelectableProps } from '@elastic/eui'; import { EuiSelectable, EuiHighlight, @@ -12,8 +13,6 @@ import { EuiFlexItem, EuiIcon, EuiTextColor, - EuiSelectableOption, - EuiSelectableProps, EuiFilterButton, EuiToolTip, } from '@elastic/eui'; @@ -21,16 +20,16 @@ import { isEmpty, debounce } from 'lodash/fp'; import React, { memo, useCallback, useMemo, useState, useEffect, useRef } from 'react'; import styled from 'styled-components'; -import { +import type { TimelineTypeLiteralWithNull, TimelineTypeLiteral, - SortFieldTimeline, } from '../../../../../common/types/timeline'; +import { SortFieldTimeline } from '../../../../../common/types/timeline'; import { useGetAllTimeline } from '../../../containers/all'; import { isUntitled } from '../../open_timeline/helpers'; import * as i18nTimeline from '../../open_timeline/translations'; -import { OpenTimelineResult } from '../../open_timeline/types'; +import type { OpenTimelineResult } from '../../open_timeline/types'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import * as i18n from '../translations'; import { Direction } from '../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/session_tab_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/session_tab_content/index.tsx index 1685f55076c58..6fe60e76fb931 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/session_tab_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/session_tab_content/index.tsx @@ -8,7 +8,7 @@ import React, { useState, useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; import styled from 'styled-components'; -import { TimelineId } from '../../../../../common/types/timeline'; +import type { TimelineId } from '../../../../../common/types/timeline'; import { useSessionViewNavigation, useSessionView } from './use_session_view'; const MaxWidthFlexItem = styled(EuiFlexItem)` diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx index 125803b4d1b30..2e39316424812 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/styles.tsx @@ -10,7 +10,7 @@ import { rgba } from 'polished'; import styled, { createGlobalStyle } from 'styled-components'; import { IS_TIMELINE_FIELD_DRAGGING_CLASS_NAME } from '@kbn/securitysolution-t-grid'; -import { TimelineEventsType } from '../../../../common/types/timeline'; +import type { TimelineEventsType } from '../../../../common/types/timeline'; import { ACTIONS_COLUMN_ARIA_COL_INDEX } from './helpers'; import { EVENTS_TABLE_ARIA_LABEL } from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx index 2ca377c57ce33..9b633b0baed7f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs_content/index.tsx @@ -11,12 +11,8 @@ import React, { lazy, memo, Suspense, useCallback, useEffect, useMemo } from 're import { useDispatch } from 'react-redux'; import styled from 'styled-components'; -import { - RowRenderer, - TimelineTabs, - TimelineId, - TimelineType, -} from '../../../../../common/types/timeline'; +import type { RowRenderer, TimelineId } from '../../../../../common/types/timeline'; +import { TimelineTabs, TimelineType } from '../../../../../common/types/timeline'; import { useShallowEqualSelector, useDeepEqualSelector, @@ -26,8 +22,8 @@ import { TimelineEventsCountBadge, } from '../../../../common/hooks/use_timeline_events_count'; import { timelineActions } from '../../../store/timeline'; -import { CellValueElementProps } from '../cell_rendering'; -import { SessionViewConfig } from '../session_tab_content/use_session_view'; +import type { CellValueElementProps } from '../cell_rendering'; +import type { SessionViewConfig } from '../session_tab_content/use_session_view'; import { getActiveTabSelector, getNoteIdsSelector, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts index 0095fdace4723..0ce743cf69cf2 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/translations.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { TimelineTypeLiteral, TimelineType } from '../../../../common/types/timeline'; +import type { TimelineTypeLiteral } from '../../../../common/types/timeline'; +import { TimelineType } from '../../../../common/types/timeline'; export const DEFAULT_TIMELINE_TITLE = i18n.translate( 'xpack.securitySolution.timeline.defaultTimelineTitle', diff --git a/x-pack/plugins/security_solution/public/timelines/containers/active_timeline_context.ts b/x-pack/plugins/security_solution/public/timelines/containers/active_timeline_context.ts index 8dd4b0b6a75e6..4ce0defe5b832 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/active_timeline_context.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/active_timeline_context.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { +import type { TimelineExpandedDetail, TimelineExpandedDetailType, - TimelineTabs, } from '../../../common/types/timeline'; -import { +import { TimelineTabs } from '../../../common/types/timeline'; +import type { TimelineEqlRequestOptions, TimelineEventsAllRequestOptions, } from '../../../common/search_strategy/timeline'; -import { TimelineArgs } from '.'; +import type { TimelineArgs } from '.'; /* * Future Engineer diff --git a/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx index 16c300298e4ee..a923da48d871a 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/all/index.tsx @@ -10,13 +10,12 @@ import memoizeOne from 'memoize-one'; import { useCallback, useState, useEffect } from 'react'; import { useDispatch } from 'react-redux'; -import { OpenTimelineResult } from '../../components/open_timeline/types'; +import type { OpenTimelineResult } from '../../components/open_timeline/types'; import { errorToToaster, useStateToaster } from '../../../common/components/toasters'; import { inputsActions } from '../../../common/store/inputs'; import * as i18n from '../../pages/translations'; -import { - TimelineType, +import type { TimelineTypeLiteralWithNull, TimelineStatusLiteralWithNull, PageInfoTimeline, @@ -24,6 +23,7 @@ import { SortTimeline, GetAllTimelineVariables, } from '../../../../common/types/timeline'; +import { TimelineType } from '../../../../common/types/timeline'; import { getAllTimelines } from '../api'; export interface AllTimelinesArgs { diff --git a/x-pack/plugins/security_solution/public/timelines/containers/api.test.ts b/x-pack/plugins/security_solution/public/timelines/containers/api.test.ts index 99e50829c71a5..0d74241ed88bc 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/api.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/api.test.ts @@ -9,7 +9,7 @@ import * as api from './api'; import { KibanaServices } from '../../common/lib/kibana'; import { TimelineType, TimelineStatus } from '../../../common/types/timeline'; import { TIMELINE_DRAFT_URL, TIMELINE_URL } from '../../../common/constants'; -import { ImportDataProps } from '../../detections/containers/detection_engine/rules/types'; +import type { ImportDataProps } from '../../detections/containers/detection_engine/rules/types'; jest.mock('../../common/lib/kibana', () => { return { diff --git a/x-pack/plugins/security_solution/public/timelines/containers/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/api.ts index 024a7cd16944c..cdabd37b443fe 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/api.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/api.ts @@ -11,21 +11,23 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { isEmpty } from 'lodash'; import { throwErrors } from '@kbn/cases-plugin/common'; -import { +import type { TimelineResponse, - TimelineResponseType, - TimelineStatus, - TimelineErrorResponseType, TimelineErrorResponse, ImportTimelineResultSchema, - importTimelineResultSchema, ResponseFavoriteTimeline, AllTimelinesResponse, SingleTimelineResponse, SingleTimelineResolveResponse, + GetTimelinesArgs, +} from '../../../common/types/timeline'; +import { + TimelineResponseType, + TimelineStatus, + TimelineErrorResponseType, + importTimelineResultSchema, allTimelinesResponse, responseFavoriteTimeline, - GetTimelinesArgs, SingleTimelineResponseType, TimelineType, ResolvedSingleTimelineResponseType, @@ -43,12 +45,12 @@ import { import { KibanaServices } from '../../common/lib/kibana'; import { ToasterError } from '../../common/components/toasters'; -import { +import type { ExportDocumentsProps, ImportDataProps, ImportDataResponse, } from '../../detections/containers/detection_engine/rules'; -import { TimelineInput } from '../../../common/search_strategy'; +import type { TimelineInput } from '../../../common/search_strategy'; interface RequestPostTimeline { timeline: TimelineInput; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx index f844defff4ec2..469d736946d24 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/details/index.tsx @@ -11,20 +11,20 @@ import ReactDOM from 'react-dom'; import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { EntityType } from '@kbn/timelines-plugin/common'; import { useKibana } from '../../../common/lib/kibana'; -import { +import type { DocValueFields, TimelineEventsDetailsItem, - TimelineEventsQueries, TimelineEventsDetailsRequestOptions, TimelineEventsDetailsStrategyResponse, } from '../../../../common/search_strategy'; +import { TimelineEventsQueries } from '../../../../common/search_strategy'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; import * as i18n from './translations'; -import { Ecs } from '../../../../common/ecs'; +import type { Ecs } from '../../../../common/ecs'; export interface EventsArgs { detailsData: TimelineEventsDetailsItem[] | null; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx index ee4af121dd054..96a5023d0c628 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/index.test.tsx @@ -6,7 +6,8 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { initSortDefault, TimelineArgs, useTimelineEvents, UseTimelineEventsProps } from '.'; +import type { TimelineArgs, UseTimelineEventsProps } from '.'; +import { initSortDefault, useTimelineEvents } from '.'; import { SecurityPageName } from '../../../common/constants'; import { TimelineId } from '../../../common/types/timeline'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx index 362e20d140843..4fb4be47c4bf2 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/index.tsx @@ -11,20 +11,19 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { useDispatch } from 'react-redux'; import { Subscription } from 'rxjs'; -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { DataView, isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; -import { ESQuery } from '../../../common/typed_json'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { DataView } from '@kbn/data-plugin/common'; +import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; +import type { ESQuery } from '../../../common/typed_json'; -import { inputsModel } from '../../common/store'; +import type { inputsModel } from '../../common/store'; import { useKibana } from '../../common/lib/kibana'; import { createFilter } from '../../common/containers/helpers'; import { timelineActions } from '../store/timeline'; import { detectionsTimelineIds, skipQueryForDetectionsPage } from './helpers'; import { getInspectResponse } from '../../helpers'; -import { - Direction, +import type { PaginationInputPaginated, - TimelineEventsQueries, TimelineEventsAllStrategyResponse, TimelineEventsAllRequestOptions, TimelineEdges, @@ -32,12 +31,14 @@ import { TimelineRequestSortField, DocValueFields, } from '../../../common/search_strategy'; -import { InspectResponse } from '../../types'; +import { Direction, TimelineEventsQueries } from '../../../common/search_strategy'; +import type { InspectResponse } from '../../types'; import * as i18n from './translations'; -import { KueryFilterQueryKind, TimelineId } from '../../../common/types/timeline'; +import type { KueryFilterQueryKind } from '../../../common/types/timeline'; +import { TimelineId } from '../../../common/types/timeline'; import { useRouteSpy } from '../../common/utils/route/use_route_spy'; import { activeTimeline } from './active_timeline_context'; -import { +import type { EqlOptionsSelected, TimelineEqlRequestOptions, TimelineEqlResponse, diff --git a/x-pack/plugins/security_solution/public/timelines/containers/kpis/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/kpis/index.tsx index de2169bb390c3..5a4a61e809bd1 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/kpis/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/kpis/index.tsx @@ -11,16 +11,16 @@ import deepEqual from 'fast-deep-equal'; import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/public'; -import { inputsModel } from '../../../common/store'; +import type { inputsModel } from '../../../common/store'; import { useKibana } from '../../../common/lib/kibana'; -import { +import type { DocValueFields, - TimelineEventsQueries, TimelineKpiStrategyRequest, TimelineKpiStrategyResponse, TimerangeInput, } from '../../../../common/search_strategy'; -import { ESQuery } from '../../../../common/typed_json'; +import { TimelineEventsQueries } from '../../../../common/search_strategy'; +import type { ESQuery } from '../../../../common/typed_json'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.test.ts b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.test.ts index 938655803be80..10fabbb86fd0a 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.test.ts @@ -19,7 +19,7 @@ import { import { TimelineId } from '../../../../common/types/timeline'; import { mockTimelineModel, createSecuritySolutionStorageMock } from '../../../common/mock'; import { useKibana } from '../../../common/lib/kibana'; -import { TimelineModel } from '../../store/timeline/model'; +import type { TimelineModel } from '../../store/timeline/model'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx index b344b5a3fdb82..f4ef268b96f0c 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx @@ -6,11 +6,11 @@ */ import { isEmpty } from 'lodash/fp'; -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { TimelinesStorage } from './types'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { TimelinesStorage } from './types'; import { useKibana } from '../../../common/lib/kibana'; -import { TimelineModel } from '../../store/timeline/model'; -import { ColumnHeaderOptions, TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { TimelineModel } from '../../store/timeline/model'; +import type { ColumnHeaderOptions, TimelineIdLiteral } from '../../../../common/types/timeline'; export const LOCAL_STORAGE_TIMELINE_KEY = 'timelines'; const EMPTY_TIMELINE = {} as { diff --git a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/types.ts b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/types.ts index b8030cc07d6a3..3b18755bb7eda 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/types.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { TimelineModel } from '../../store/timeline/model'; -import { TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { TimelineModel } from '../../store/timeline/model'; +import type { TimelineIdLiteral } from '../../../../common/types/timeline'; export interface TimelinesStorage { getAllTimelines: () => Record; diff --git a/x-pack/plugins/security_solution/public/timelines/containers/notes/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/notes/api.ts index 53c54f915cb8a..61815bb8b5af9 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/notes/api.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/notes/api.ts @@ -6,7 +6,7 @@ */ import { NOTE_URL } from '../../../../common/constants'; -import { NoteSavedObject, SavedNote } from '../../../../common/types/timeline/note'; +import type { NoteSavedObject, SavedNote } from '../../../../common/types/timeline/note'; import { KibanaServices } from '../../../common/lib/kibana'; export const persistNote = async ({ diff --git a/x-pack/plugins/security_solution/public/timelines/containers/pinned_event/api.ts b/x-pack/plugins/security_solution/public/timelines/containers/pinned_event/api.ts index c43a16df09062..23ff91f980eb5 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/pinned_event/api.ts +++ b/x-pack/plugins/security_solution/public/timelines/containers/pinned_event/api.ts @@ -5,7 +5,7 @@ * 2.0. */ import { PINNED_EVENT_URL } from '../../../../common/constants'; -import { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; +import type { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; import { KibanaServices } from '../../../common/lib/kibana'; export const persistPinnedEvent = async ({ diff --git a/x-pack/plugins/security_solution/public/timelines/index.ts b/x-pack/plugins/security_solution/public/timelines/index.ts index 8725072e61849..71c15088d1acf 100644 --- a/x-pack/plugins/security_solution/public/timelines/index.ts +++ b/x-pack/plugins/security_solution/public/timelines/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SecuritySubPluginWithStore } from '../app/types'; +import type { SecuritySubPluginWithStore } from '../app/types'; import { routes } from './routes'; import { initialTimelineState, timelineReducer } from './store/timeline/reducer'; -import { TimelineState } from './store/timeline/types'; +import type { TimelineState } from './store/timeline/types'; export class Timelines { public setup() {} diff --git a/x-pack/plugins/security_solution/public/timelines/links.ts b/x-pack/plugins/security_solution/public/timelines/links.ts index 7b18b11f6bf7b..7a9b32b87675c 100644 --- a/x-pack/plugins/security_solution/public/timelines/links.ts +++ b/x-pack/plugins/security_solution/public/timelines/links.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { SecurityPageName, SERVER_APP_ID, TIMELINES_PATH } from '../../common/constants'; import { TIMELINES } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; export const links: LinkItem = { id: SecurityPageName.timelines, diff --git a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx index 7a36f7296eff3..18521e8303655 100644 --- a/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/pages/timelines_page.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { shallow, ShallowWrapper } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; import React from 'react'; import { useKibana } from '../../common/lib/kibana'; diff --git a/x-pack/plugins/security_solution/public/timelines/routes.tsx b/x-pack/plugins/security_solution/public/timelines/routes.tsx index 0b427eeb86767..cef6b4d9b7c66 100644 --- a/x-pack/plugins/security_solution/public/timelines/routes.tsx +++ b/x-pack/plugins/security_solution/public/timelines/routes.tsx @@ -10,7 +10,8 @@ import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { Timelines } from './pages'; import { TIMELINES_PATH } from '../../common/constants'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; const TimelinesRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts index 36fe600ae18fc..aa8671fbc7a0a 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/actions.ts @@ -8,15 +8,15 @@ import actionCreatorFactory from 'typescript-fsa'; import type { Filter } from '@kbn/es-query'; -import { +import type { DataProvider, DataProviderType, QueryOperator, } from '../../components/timeline/data_providers/data_provider'; -import { KqlMode, TimelineModel } from './model'; -import { InsertTimeline } from './types'; -import { FieldsEqlOptions } from '../../../../common/search_strategy/timeline'; +import type { KqlMode, TimelineModel } from './model'; +import type { InsertTimeline } from './types'; +import type { FieldsEqlOptions } from '../../../../common/search_strategy/timeline'; import type { TimelineEventsType, RowRendererId, @@ -45,8 +45,8 @@ export { updateSort, upsertColumn, } from '@kbn/timelines-plugin/public'; -import { ResolveTimelineConfig } from '../../components/open_timeline/types'; -import { SessionViewConfig } from '../../components/timeline/session_tab_content/use_session_view'; +import type { ResolveTimelineConfig } from '../../components/open_timeline/types'; +import type { SessionViewConfig } from '../../components/timeline/session_tab_content/use_session_view'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/timeline'); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts index 1213953c431fb..4b6a895c32ad5 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/defaults.ts @@ -9,7 +9,7 @@ import { TimelineType, TimelineStatus, TimelineTabs } from '../../../../common/t import { defaultHeaders } from '../../components/timeline/body/column_headers/default_headers'; import { normalizeTimeRange } from '../../../common/components/url_state/normalize_time_range'; -import { SubsetTimelineModel, TimelineModel } from './model'; +import type { SubsetTimelineModel, TimelineModel } from './model'; // normalizeTimeRange uses getTimeRangeSettings which cannot be used outside Kibana context if the uiSettings is not false const { from: start, to: end } = normalizeTimeRange({ from: '', to: '' }, false); diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts index d3f204d58d884..e7c55322ef8b4 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.test.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { FilterStateStore, Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; +import { FilterStateStore } from '@kbn/es-query'; import { Direction } from '../../../../common/search_strategy'; import { TimelineType, TimelineStatus, TimelineTabs } from '../../../../common/types/timeline'; import { convertTimelineAsInput } from './epic'; -import { TimelineModel } from './model'; +import type { TimelineModel } from './model'; describe('Epic Timeline', () => { describe('#convertTimelineAsInput ', () => { diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts index 167f39c152837..2a6e277c46e1a 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic.ts @@ -15,12 +15,11 @@ import { isObject, toString as fpToString, } from 'lodash/fp'; -import { Action } from 'redux'; -import { Epic } from 'redux-observable'; +import type { Action } from 'redux'; +import type { Epic } from 'redux-observable'; import { from, empty, merge } from 'rxjs'; +import type { Filter, MatchAllFilter } from '@kbn/es-query'; import { - Filter, - MatchAllFilter, isScriptedRangeFilter, isExistsFilter, isRangeFilter, @@ -41,15 +40,14 @@ import { takeUntil, } from 'rxjs/operators'; -import { - TimelineStatus, +import type { TimelineErrorResponse, - TimelineType, ResponseTimeline, TimelineResult, ColumnHeaderOptions, } from '../../../../common/types/timeline'; -import { inputsModel } from '../../../common/store/inputs'; +import { TimelineStatus, TimelineType } from '../../../../common/types/timeline'; +import type { inputsModel } from '../../../common/store/inputs'; import { addError } from '../../../common/store/app/actions'; import { persistTimeline } from '../../containers/api'; @@ -88,15 +86,15 @@ import { showCallOutUnauthorizedMsg, saveTimeline, } from './actions'; -import { TimelineModel } from './model'; +import type { TimelineModel } from './model'; import { epicPersistNote, timelineNoteActionsType } from './epic_note'; import { epicPersistPinnedEvent, timelinePinnedEventActionsType } from './epic_pinned_event'; import { epicPersistTimelineFavorite, timelineFavoriteActionsType } from './epic_favorite'; import { isNotNull } from './helpers'; import { dispatcherTimelinePersistQueue } from './epic_dispatcher_timeline_persistence_queue'; import { myEpicTimelineId } from './my_epic_timeline_id'; -import { ActionTimeline, TimelineEpicDependencies } from './types'; -import { TimelineInput } from '../../../../common/search_strategy'; +import type { ActionTimeline, TimelineEpicDependencies } from './types'; +import type { TimelineInput } from '../../../../common/search_strategy'; const timelineActionsType = [ applyKqlFilterQuery.type, diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts index af067278d997a..8cd4f9c84e8cf 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_favorite.ts @@ -6,9 +6,10 @@ */ import { get } from 'lodash/fp'; -import { Action } from 'redux'; -import { Epic } from 'redux-observable'; -import { from, Observable, empty } from 'rxjs'; +import type { Action } from 'redux'; +import type { Epic } from 'redux-observable'; +import type { Observable } from 'rxjs'; +import { from, empty } from 'rxjs'; import { filter, mergeMap, withLatestFrom, startWith, takeUntil } from 'rxjs/operators'; import { addError } from '../../../common/store/app/actions'; @@ -21,9 +22,10 @@ import { } from './actions'; import { dispatcherTimelinePersistQueue } from './epic_dispatcher_timeline_persistence_queue'; import { myEpicTimelineId } from './my_epic_timeline_id'; -import { ActionTimeline, TimelineById } from './types'; -import { inputsModel } from '../../../common/store/inputs'; -import { ResponseFavoriteTimeline, TimelineType } from '../../../../common/types/timeline'; +import type { ActionTimeline, TimelineById } from './types'; +import type { inputsModel } from '../../../common/store/inputs'; +import type { ResponseFavoriteTimeline } from '../../../../common/types/timeline'; +import { TimelineType } from '../../../../common/types/timeline'; import { persistFavorite } from '../../containers/api'; export const timelineFavoriteActionsType = [updateIsFavorite.type]; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.test.tsx b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.test.tsx index e35a5b6480426..42a7460a129db 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.test.tsx @@ -20,7 +20,8 @@ import { kibanaObservable, } from '../../../common/mock'; -import { createStore, State } from '../../../common/store'; +import type { State } from '../../../common/store'; +import { createStore } from '../../../common/store'; import { removeColumn, upsertColumn, @@ -32,13 +33,11 @@ import { updateSort, } from './actions'; import { DefaultCellRenderer } from '../../components/timeline/cell_rendering/default_cell_renderer'; -import { - QueryTabContentComponent, - Props as QueryTabContentComponentProps, -} from '../../components/timeline/query_tab_content'; +import type { Props as QueryTabContentComponentProps } from '../../components/timeline/query_tab_content'; +import { QueryTabContentComponent } from '../../components/timeline/query_tab_content'; import { defaultRowRenderers } from '../../components/timeline/body/renderers'; import { mockDataProviders } from '../../components/timeline/data_providers/mock/mock_data_providers'; -import { Sort } from '../../components/timeline/body/sort'; +import type { Sort } from '../../components/timeline/body/sort'; import { addTimelineInStorage } from '../../containers/local_storage'; import { isPageTimeline } from './epic_local_storage'; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.ts index 6c4ebf91b7adf..43d13fd344c9e 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_local_storage.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Action } from 'redux'; +import type { Action } from 'redux'; import { map, filter, ignoreElements, tap, withLatestFrom, delay } from 'rxjs/operators'; -import { Epic } from 'redux-observable'; +import type { Epic } from 'redux-observable'; import { get } from 'lodash/fp'; -import { TimelineIdLiteral } from '../../../../common/types/timeline'; +import type { TimelineIdLiteral } from '../../../../common/types/timeline'; import { addTimelineInStorage } from '../../containers/local_storage'; import { @@ -24,7 +24,7 @@ import { updateItemsPerPage, updateSort, } from './actions'; -import { TimelineEpicDependencies } from './types'; +import type { TimelineEpicDependencies } from './types'; import { isNotNull } from './helpers'; const timelineActionTypes = [ diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts index f7b747dc0dba1..4a41d3af0815f 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_note.ts @@ -6,14 +6,15 @@ */ import { get } from 'lodash/fp'; -import { Action } from 'redux'; -import { Epic } from 'redux-observable'; -import { from, empty, Observable } from 'rxjs'; +import type { Action } from 'redux'; +import type { Epic } from 'redux-observable'; +import type { Observable } from 'rxjs'; +import { from, empty } from 'rxjs'; import { filter, mergeMap, switchMap, withLatestFrom, startWith, takeUntil } from 'rxjs/operators'; import { updateNote, addError } from '../../../common/store/app/actions'; -import { NotesById } from '../../../common/store/app/model'; -import { inputsModel } from '../../../common/store/inputs'; +import type { NotesById } from '../../../common/store/app/model'; +import type { inputsModel } from '../../../common/store/inputs'; import { addNote, @@ -25,9 +26,9 @@ import { } from './actions'; import { myEpicTimelineId } from './my_epic_timeline_id'; import { dispatcherTimelinePersistQueue } from './epic_dispatcher_timeline_persistence_queue'; -import { ActionTimeline, TimelineById } from './types'; +import type { ActionTimeline, TimelineById } from './types'; import { persistNote } from '../../containers/notes/api'; -import { ResponseNote } from '../../../../common/types/timeline/note'; +import type { ResponseNote } from '../../../../common/types/timeline/note'; export const timelineNoteActionsType = [addNote.type, addNoteToEvent.type]; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts index 7e9431a594a0e..fd2289ed0c340 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/epic_pinned_event.ts @@ -6,14 +6,15 @@ */ import { get, omit } from 'lodash/fp'; -import { Action } from 'redux'; -import { Epic } from 'redux-observable'; -import { from, Observable, empty } from 'rxjs'; +import type { Action } from 'redux'; +import type { Epic } from 'redux-observable'; +import type { Observable } from 'rxjs'; +import { from, empty } from 'rxjs'; import { filter, mergeMap, startWith, withLatestFrom, takeUntil } from 'rxjs/operators'; import { addError } from '../../../common/store/app/actions'; -import { inputsModel } from '../../../common/store/inputs'; -import { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; +import type { inputsModel } from '../../../common/store/inputs'; +import type { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; import { pinEvent, endTimelineSaving, @@ -24,7 +25,7 @@ import { } from './actions'; import { myEpicTimelineId } from './my_epic_timeline_id'; import { dispatcherTimelinePersistQueue } from './epic_dispatcher_timeline_persistence_queue'; -import { ActionTimeline, TimelineById } from './types'; +import type { ActionTimeline, TimelineById } from './types'; import { persistPinnedEvent } from '../../containers/pinned_event/api'; export const timelinePinnedEventActionsType = [pinEvent.type, unPinEvent.type]; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts index 76c94619a7fb3..0e4e64c1971b2 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/helpers.ts @@ -11,34 +11,38 @@ import uuid from 'uuid'; import type { Filter } from '@kbn/es-query'; -import { Sort } from '../../components/timeline/body/sort'; -import { +import type { Sort } from '../../components/timeline/body/sort'; +import type { DataProvider, QueryOperator, QueryMatch, +} from '../../components/timeline/data_providers/data_provider'; +import { DataProviderType, IS_OPERATOR, EXISTS_OPERATOR, } from '../../components/timeline/data_providers/data_provider'; -import { TimelineNonEcsData } from '../../../../common/search_strategy/timeline'; -import { +import type { TimelineNonEcsData } from '../../../../common/search_strategy/timeline'; +import type { ColumnHeaderOptions, TimelineEventsType, TimelineTypeLiteral, - TimelineType, RowRendererId, - TimelineStatus, - TimelineId, - TimelineTabs, SerializedFilterQuery, ToggleDetailPanel, TimelinePersistInput, } from '../../../../common/types/timeline'; +import { + TimelineType, + TimelineStatus, + TimelineId, + TimelineTabs, +} from '../../../../common/types/timeline'; import { normalizeTimeRange } from '../../../common/components/url_state/normalize_time_range'; import { timelineDefaults } from './defaults'; -import { KqlMode, TimelineModel } from './model'; -import { TimelineById } from './types'; +import type { KqlMode, TimelineModel } from './model'; +import type { TimelineById } from './types'; import { DEFAULT_FROM_MOMENT, DEFAULT_TO_MOMENT, @@ -48,8 +52,8 @@ import { RESIZED_COLUMN_MIN_WITH, } from '../../components/timeline/body/constants'; import { activeTimeline } from '../../containers/active_timeline_context'; -import { ResolveTimelineConfig } from '../../components/open_timeline/types'; -import { SessionViewConfig } from '../../components/timeline/session_tab_content/use_session_view'; +import type { ResolveTimelineConfig } from '../../components/open_timeline/types'; +import type { SessionViewConfig } from '../../components/timeline/session_tab_content/use_session_view'; export const isNotNull = (value: T | null): value is T => value !== null; interface AddTimelineHistoryParams { diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts index bee6bd8d532ed..9a43ba61cfaa9 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { AnyAction, Reducer } from 'redux'; +import type { AnyAction, Reducer } from 'redux'; import * as timelineActions from './actions'; import * as timelineSelectors from './selectors'; -import { TimelineState } from './types'; +import type { TimelineState } from './types'; export { timelineActions, timelineSelectors }; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts index 5356c4bf3c7e3..bf2c717b4d3b2 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/model.ts @@ -6,7 +6,7 @@ */ import type { TGridModelForTimeline } from '@kbn/timelines-plugin/public'; -import { EqlOptionsSelected } from '../../../../common/search_strategy/timeline'; +import type { EqlOptionsSelected } from '../../../../common/search_strategy/timeline'; import type { TimelineEventsType, TimelineType, @@ -14,8 +14,8 @@ import type { TimelineTabs, ScrollToTopEvent, } from '../../../../common/types/timeline'; -import { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; -import { ResolveTimelineConfig } from '../../components/open_timeline/types'; +import type { PinnedEvent } from '../../../../common/types/timeline/pinned_event'; +import type { ResolveTimelineConfig } from '../../components/open_timeline/types'; import type { SessionViewConfig } from '../../components/timeline/session_tab_content/use_session_view'; export const DEFAULT_PAGE_COUNT = 2; // Eui Pager will not render unless this is a minimum of 2 pages diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts index 916376a0b9a38..c2464e411bd39 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.test.ts @@ -6,19 +6,21 @@ */ import { cloneDeep } from 'lodash/fp'; +import type { ColumnHeaderOptions } from '../../../../common/types/timeline'; import { - ColumnHeaderOptions, TimelineType, TimelineStatus, TimelineTabs, TimelineId, } from '../../../../common/types/timeline'; +import type { + DataProvider, + DataProvidersAnd, +} from '../../components/timeline/data_providers/data_provider'; import { IS_OPERATOR, - DataProvider, DataProviderType, - DataProvidersAnd, } from '../../components/timeline/data_providers/data_provider'; import { defaultColumnHeaderType } from '../../components/timeline/body/column_headers/default_headers'; import { @@ -48,9 +50,9 @@ import { upsertTimelineColumn, updateGraphEventId, } from './helpers'; -import { TimelineModel } from './model'; +import type { TimelineModel } from './model'; import { timelineDefaults } from './defaults'; -import { TimelineById } from './types'; +import type { TimelineById } from './types'; import { Direction } from '../../../../common/search_strategy'; import type { FilterManager } from '@kbn/data-plugin/public'; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts index 18fce283962e0..d1ebd8aebc386 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/reducer.ts @@ -81,7 +81,8 @@ import { updateSessionViewConfig, } from './helpers'; -import { TimelineState, EMPTY_TIMELINE_BY_ID } from './types'; +import type { TimelineState } from './types'; +import { EMPTY_TIMELINE_BY_ID } from './types'; import { TimelineType } from '../../../../common/types/timeline'; export const initialTimelineState: TimelineState = { diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts index ec57984ada1f3..8b1fc372c474a 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/selectors.ts @@ -8,10 +8,10 @@ import { createSelector } from 'reselect'; export { getManageTimelineById } from '@kbn/timelines-plugin/public'; -import { State } from '../../../common/store/types'; +import type { State } from '../../../common/store/types'; -import { TimelineModel } from './model'; -import { AutoSavedWarningMsg, InsertTimeline, TimelineById } from './types'; +import type { TimelineModel } from './model'; +import type { AutoSavedWarningMsg, InsertTimeline, TimelineById } from './types'; const selectTimelineById = (state: State): TimelineById => state.timeline.timelineById; diff --git a/x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts index c91f16b1345ad..914cbe775bb66 100644 --- a/x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts +++ b/x-pack/plugins/security_solution/public/timelines/store/timeline/types.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { Action } from 'redux'; -import { Observable } from 'rxjs'; +import type { Action } from 'redux'; +import type { Observable } from 'rxjs'; -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { CoreStart } from '@kbn/core/public'; -import { inputsModel } from '../../../common/store/inputs'; -import { NotesById } from '../../../common/store/app/model'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; +import type { inputsModel } from '../../../common/store/inputs'; +import type { NotesById } from '../../../common/store/app/model'; -import { TimelineModel } from './model'; +import type { TimelineModel } from './model'; export interface AutoSavedWarningMsg { timelineId: string | null; diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index ad17fa0652491..1a32eefa983e9 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -32,7 +32,7 @@ import type { OsqueryPluginStart } from '@kbn/osquery-plugin/public'; import type { LicensingPluginStart, LicensingPluginSetup } from '@kbn/licensing-plugin/public'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import type { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; -import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import type { ApmBase } from '@elastic/apm-rum'; import type { ResolverPluginSetup } from './resolver/types'; import type { Inspect } from '../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx b/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx index b0fb9a76ae3d0..6d30abce0f506 100644 --- a/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/all_users/index.tsx @@ -12,20 +12,16 @@ import { FormattedRelativePreferenceDate } from '../../../common/components/form import { UserDetailsLink } from '../../../common/components/links'; import { getOrEmptyTagFromValue } from '../../../common/components/empty_value'; -import { - Columns, - Criteria, - ItemsPerRow, - PaginatedTable, -} from '../../../common/components/paginated_table'; +import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getRowItemDraggables } from '../../../common/components/tables/helpers'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; import * as i18n from './translations'; import { usersActions, usersModel, usersSelectors } from '../../store'; -import { User } from '../../../../common/search_strategy/security_solution/users/all'; -import { SortUsersField } from '../../../../common/search_strategy/security_solution/users/common'; +import type { User } from '../../../../common/search_strategy/security_solution/users/all'; +import type { SortUsersField } from '../../../../common/search_strategy/security_solution/users/common'; const tableType = usersModel.UsersTableType.allUsers; diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx b/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx index 562f08b8f9b37..aafeb29e9d116 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/kpi_users/authentications/index.tsx @@ -7,7 +7,7 @@ import React, { useEffect, useState } from 'react'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { kpiUserAuthenticationsAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_area'; import { kpiUserAuthenticationsBarLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_bar'; import { kpiUserAuthenticationsMetricSuccessLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_user_authentications_metric_success'; @@ -16,7 +16,7 @@ import { useUsersKpiAuthentications, ID } from '../../../containers/users/authen import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { UsersKpiProps } from '../types'; +import type { UsersKpiProps } from '../types'; enum ChartColors { authenticationsSuccess = '#54B399', diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx b/x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx index 37f488cf0d1ce..909bb44829e65 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/kpi_users/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiFlexItem, EuiFlexGroup, EuiSpacer, EuiLink } from '@elastic/eui'; -import { UsersKpiProps } from './types'; +import type { UsersKpiProps } from './types'; import { UsersKpiAuthentications } from './authentications'; import { TotalUsersKpi } from './total_users'; diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx b/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx index 107a51d173009..df5a7208930bc 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/kpi_users/total_users/index.tsx @@ -8,14 +8,14 @@ import { euiPaletteColorBlind } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; -import { StatItems } from '../../../../common/components/stat_items'; +import type { StatItems } from '../../../../common/components/stat_items'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; import { KpiBaseComponentManage } from '../../../../hosts/components/kpi_hosts/common'; import { kpiTotalUsersMetricLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_metric'; import { kpiTotalUsersAreaLensAttributes } from '../../../../common/components/visualization_actions/lens_attributes/users/kpi_total_users_area'; import * as i18n from './translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import { UsersKpiProps } from '../types'; +import type { UsersKpiProps } from '../types'; const euiVisColorPalette = euiPaletteColorBlind(); const euiColorVis1 = euiVisColorPalette[1]; diff --git a/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts b/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts index 19eff93b17631..ddc689bcbafe8 100644 --- a/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts +++ b/x-pack/plugins/security_solution/public/users/components/kpi_users/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { UpdateDateRange } from '../../../common/components/charts/common'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; export interface UsersKpiProps { filterQuery?: string; diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_information/index.tsx b/x-pack/plugins/security_solution/public/users/components/user_risk_information/index.tsx index 066e3b01fbdd2..408f13638e6a4 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_information/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/user_risk_information/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiBasicTableColumn } from '@elastic/eui'; import { useGeneratedHtmlId, EuiFlyout, @@ -18,7 +19,6 @@ import { EuiFlyoutFooter, EuiButton, EuiSpacer, - EuiBasicTableColumn, EuiButtonEmpty, EuiLink, } from '@elastic/eui'; diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx index 9864dd6b096ec..6cde49e39c390 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx +++ b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { render } from '@testing-library/react'; -import { UserRiskScoreColumns } from '.'; +import type { UserRiskScoreColumns } from '.'; import { getUserRiskScoreColumns } from './columns'; import { TestProviders } from '../../../common/mock'; diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx index f0c26ed31bb7a..24ccfd3eb01f5 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx +++ b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/columns.tsx @@ -16,11 +16,11 @@ import { getEmptyTagValue } from '../../../common/components/empty_value'; import { IS_OPERATOR } from '../../../timelines/components/timeline/data_providers/data_provider'; import { Provider } from '../../../timelines/components/timeline/data_providers/provider'; -import { UserRiskScoreColumns } from '.'; +import type { UserRiskScoreColumns } from '.'; import * as i18n from './translations'; import { RiskScore } from '../../../common/components/severity/common'; -import { RiskSeverity } from '../../../../common/search_strategy'; +import type { RiskSeverity } from '../../../../common/search_strategy'; import { UserDetailsLink } from '../../../common/components/links'; import { UsersTableType } from '../../store/model'; diff --git a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx index 0d0eee5848bb5..96a81ab4f5073 100644 --- a/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx +++ b/x-pack/plugins/security_solution/public/users/components/user_risk_score_table/index.tsx @@ -10,29 +10,25 @@ import { useDispatch } from 'react-redux'; import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; import styled from 'styled-components'; -import { - Columns, - Criteria, - ItemsPerRow, - PaginatedTable, -} from '../../../common/components/paginated_table'; +import type { Columns, Criteria, ItemsPerRow } from '../../../common/components/paginated_table'; +import { PaginatedTable } from '../../../common/components/paginated_table'; import { getUserRiskScoreColumns } from './columns'; import * as i18nUsers from '../../pages/translations'; import * as i18n from './translations'; import { usersModel, usersSelectors, usersActions } from '../../store'; -import { +import type { UserRiskScoreFields, UserRiskScoreItem, } from '../../../../common/search_strategy/security_solution/users/common'; -import { SeverityCount } from '../../../common/components/severity/types'; +import type { SeverityCount } from '../../../common/components/severity/types'; import { SeverityBadges } from '../../../common/components/severity/severity_badges'; import { SeverityBar } from '../../../common/components/severity/severity_bar'; import { SeverityFilterGroup } from '../../../common/components/severity/severity_filter_group'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { State } from '../../../common/store'; -import { +import type { State } from '../../../common/store'; +import type { RiskScoreSortField, RiskSeverity, UsersRiskScore, diff --git a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx b/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx index 081fd7c2be5fb..e4262fdc0d1ba 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx +++ b/x-pack/plugins/security_solution/public/users/containers/users/authentications/index.tsx @@ -11,19 +11,19 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { Subscription } from 'rxjs'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { createFilter } from '../../../../common/containers/helpers'; import { useKibana } from '../../../../common/lib/kibana'; -import { +import type { UsersKpiAuthenticationsRequestOptions, UsersKpiAuthenticationsStrategyResponse, - UsersQueries, } from '../../../../../common/search_strategy'; -import { ESTermQuery } from '../../../../../common/typed_json'; +import { UsersQueries } from '../../../../../common/search_strategy'; +import type { ESTermQuery } from '../../../../../common/typed_json'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; +import type { InspectResponse } from '../../../../types'; export const ID = 'usersKpiAuthenticationsQuery'; diff --git a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx b/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx index effe635ac921c..83b2a017737c5 100644 --- a/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx +++ b/x-pack/plugins/security_solution/public/users/containers/users/details/index.tsx @@ -12,18 +12,18 @@ import { Subscription } from 'rxjs'; import { isCompleteResponse, isErrorResponse } from '@kbn/data-plugin/common'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import { inputsModel } from '../../../../common/store'; +import type { inputsModel } from '../../../../common/store'; import { useKibana } from '../../../../common/lib/kibana'; import * as i18n from './translations'; import { getInspectResponse } from '../../../../helpers'; -import { InspectResponse } from '../../../../types'; -import { +import type { InspectResponse } from '../../../../types'; +import type { UserDetailsRequestOptions, UserDetailsStrategyResponse, } from '../../../../../common/search_strategy/security_solution/users/details'; import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; -import { UserItem } from '../../../../../common/search_strategy/security_solution/users/common'; +import type { UserItem } from '../../../../../common/search_strategy/security_solution/users/common'; export const ID = 'usersDetailsQuery'; diff --git a/x-pack/plugins/security_solution/public/users/index.ts b/x-pack/plugins/security_solution/public/users/index.ts index 1ff1f7056d8de..f567eec8520d5 100644 --- a/x-pack/plugins/security_solution/public/users/index.ts +++ b/x-pack/plugins/security_solution/public/users/index.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { SecuritySubPluginWithStore } from '../app/types'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { SecuritySubPluginWithStore } from '../app/types'; import { routes } from './routes'; -import { initialUsersState, usersReducer, usersModel } from './store'; +import type { usersModel } from './store'; +import { initialUsersState, usersReducer } from './store'; export class Users { public setup() {} diff --git a/x-pack/plugins/security_solution/public/users/links.ts b/x-pack/plugins/security_solution/public/users/links.ts index 1686be6f4e0cd..0990cbed24b33 100644 --- a/x-pack/plugins/security_solution/public/users/links.ts +++ b/x-pack/plugins/security_solution/public/users/links.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { SecurityPageName, USERS_PATH } from '../../common/constants'; import { USERS } from '../app/translations'; -import { LinkItem } from '../common/links/types'; +import type { LinkItem } from '../common/links/types'; import userPageImg from '../common/images/users_page.png'; export const links: LinkItem = { diff --git a/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx b/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx index 3cc2970b9d650..5bf985d59e14e 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/details/details_tabs.tsx @@ -11,11 +11,11 @@ import { Route } from '@kbn/kibana-react-plugin/public'; import { UsersTableType } from '../../store/model'; import { AnomaliesUserTable } from '../../../common/components/ml/tables/anomalies_user_table'; -import { UsersDetailsTabsProps } from './types'; +import type { UsersDetailsTabsProps } from './types'; import { AnomaliesQueryTabBody } from '../../../common/containers/anomalies/anomalies_query_tab_body'; import { scoreIntervalToDateTime } from '../../../common/components/ml/score/score_interval_to_datetime'; -import { UpdateDateRange } from '../../../common/components/charts/common'; -import { Anomaly } from '../../../common/components/ml/types'; +import type { UpdateDateRange } from '../../../common/components/charts/common'; +import type { Anomaly } from '../../../common/components/ml/types'; import { usersDetailsPagePath } from '../constants'; import { TimelineId } from '../../../../common/types'; import { EventsQueryTabBody } from '../../../common/components/events_tab/events_query_tab_body'; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx b/x-pack/plugins/security_solution/public/users/pages/details/index.tsx index 9db18bde62188..4fca3261e5d00 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/details/index.tsx @@ -28,7 +28,7 @@ import { SpyRoute } from '../../../common/utils/route/spy_routes'; import { UsersDetailsTabs } from './details_tabs'; import { navTabsUsersDetails } from './nav_tabs'; -import { UsersDetailsProps } from './types'; +import type { UsersDetailsProps } from './types'; import { type } from './utils'; import { getUsersDetailsPageFilters } from './helpers'; import { showGlobalFilters } from '../../../timelines/components/timeline/helpers'; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx b/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx index 3c8e5cbd5e368..9c7827bd9709f 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/details/nav_tabs.tsx @@ -7,7 +7,7 @@ import { omit } from 'lodash/fp'; import * as i18n from '../translations'; -import { UsersDetailsNavTab } from './types'; +import type { UsersDetailsNavTab } from './types'; import { UsersTableType } from '../../store/model'; import { USERS_PATH } from '../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/types.ts b/x-pack/plugins/security_solution/public/users/pages/details/types.ts index 1608d4b735b59..6caf0567098fe 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/types.ts +++ b/x-pack/plugins/security_solution/public/users/pages/details/types.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ActionCreator } from 'typescript-fsa'; +import type { ActionCreator } from 'typescript-fsa'; import type { DataViewBase, Filter, Query } from '@kbn/es-query'; -import { InputsModelId } from '../../../common/store/inputs/constants'; -import { UsersQueryProps } from '../types'; -import { NavTab } from '../../../common/components/navigation/types'; +import type { InputsModelId } from '../../../common/store/inputs/constants'; +import type { UsersQueryProps } from '../types'; +import type { NavTab } from '../../../common/components/navigation/types'; -import { DocValueFields } from '../../../common/containers/source'; +import type { DocValueFields } from '../../../common/containers/source'; -import { UsersTableType } from '../../store/model'; -import { usersModel } from '../../store'; +import type { UsersTableType } from '../../store/model'; +import type { usersModel } from '../../store'; interface UsersDetailsComponentReduxProps { query: Query; diff --git a/x-pack/plugins/security_solution/public/users/pages/details/utils.ts b/x-pack/plugins/security_solution/public/users/pages/details/utils.ts index a9b3cb30ef84a..79329e7d128a7 100644 --- a/x-pack/plugins/security_solution/public/users/pages/details/utils.ts +++ b/x-pack/plugins/security_solution/public/users/pages/details/utils.ts @@ -7,15 +7,15 @@ import { get } from 'lodash/fp'; -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { usersModel } from '../../store'; import { UsersTableType } from '../../store/model'; import { getUsersDetailsUrl } from '../../../common/components/link_to/redirect_to_users'; import * as i18n from '../translations'; -import { UsersRouteSpyState } from '../../../common/utils/route/types'; +import type { UsersRouteSpyState } from '../../../common/utils/route/types'; import { SecurityPageName } from '../../../app/types'; -import { GetSecuritySolutionUrl } from '../../../common/components/link_to'; +import type { GetSecuritySolutionUrl } from '../../../common/components/link_to'; export const type = usersModel.UsersType.details; diff --git a/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx b/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx index 046b8b7088125..832d070dfc492 100644 --- a/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/nav_tabs.tsx @@ -8,7 +8,7 @@ import { omit } from 'lodash/fp'; import * as i18n from './translations'; import { UsersTableType } from '../store/model'; -import { UsersNavTab } from './navigation/types'; +import type { UsersNavTab } from './navigation/types'; import { USERS_PATH } from '../../../common/constants'; const getTabsOnUsersUrl = (tabName: UsersTableType) => `${USERS_PATH}/${tabName}`; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx b/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx index 164df6325bb09..0030391a2b54a 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/navigation/all_users_query_tab_body.tsx @@ -8,7 +8,7 @@ import { getOr, noop } from 'lodash/fp'; import React, { useEffect, useMemo, useState } from 'react'; -import { UsersComponentsQueryProps } from './types'; +import type { UsersComponentsQueryProps } from './types'; import { manageQuery } from '../../../common/components/page/manage_query'; import { UsersTable } from '../../components/all_users'; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx b/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx index 044a0e4de67ee..0187ee4ed0831 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/navigation/authentications_query_tab_body.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { AuthenticationsUserTable } from '../../../common/components/authentication/authentications_user_table'; import { histogramConfigs } from '../../../common/components/authentication/helpers'; -import { AuthenticationsUserTableProps } from '../../../common/components/authentication/types'; +import type { AuthenticationsUserTableProps } from '../../../common/components/authentication/types'; import { MatrixHistogram } from '../../../common/components/matrix_histogram'; export const ID = 'usersAuthenticationsQuery'; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts b/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts index d66e6b8d84c29..fb95d2ed794a3 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts +++ b/x-pack/plugins/security_solution/public/users/pages/navigation/types.ts @@ -4,11 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { DocValueFields } from '@kbn/timelines-plugin/common'; -import { UsersTableType, UsersType } from '../../store/model'; -import { GlobalTimeArgs } from '../../../common/containers/use_global_time'; -import { ESTermQuery } from '../../../../common/typed_json'; -import { NavTab } from '../../../common/components/navigation/types'; +import type { DocValueFields } from '@kbn/timelines-plugin/common'; +import type { UsersTableType, UsersType } from '../../store/model'; +import type { GlobalTimeArgs } from '../../../common/containers/use_global_time'; +import type { ESTermQuery } from '../../../../common/typed_json'; +import type { NavTab } from '../../../common/components/navigation/types'; type KeyUsersNavTabWithoutMlPermission = UsersTableType.allUsers & UsersTableType.risk & diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx b/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx index a479788ce0f41..52b8c60f605e7 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_score_tab_body.tsx @@ -8,10 +8,10 @@ import React, { useEffect, useMemo, useState } from 'react'; import { noop } from 'lodash/fp'; -import { UsersComponentsQueryProps } from './types'; +import type { UsersComponentsQueryProps } from './types'; import { manageQuery } from '../../../common/components/page/manage_query'; import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; -import { State } from '../../../common/store'; +import type { State } from '../../../common/store'; import { UserRiskScoreTable } from '../../components/user_risk_score_table'; import { usersSelectors } from '../../store'; diff --git a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_tab_body.tsx b/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_tab_body.tsx index cc0396d634b63..1f31e3c98992d 100644 --- a/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_tab_body.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/navigation/user_risk_tab_body.tsx @@ -17,7 +17,7 @@ import { TopRiskScoreContributors } from '../../../common/components/top_risk_sc import { useQueryToggle } from '../../../common/containers/query_toggle'; import { UserRiskScoreQueryId, useUserRiskScore } from '../../../risk_score/containers'; import { buildUserNamesFilter } from '../../../../common/search_strategy'; -import { UsersComponentsQueryProps } from './types'; +import type { UsersComponentsQueryProps } from './types'; import { UserRiskInformationButtonEmpty } from '../../components/user_risk_information'; import { useDashboardButtonHref } from '../../../common/hooks/use_dashboard_button_href'; diff --git a/x-pack/plugins/security_solution/public/users/pages/types.ts b/x-pack/plugins/security_solution/public/users/pages/types.ts index 79336098813da..0f196e9009070 100644 --- a/x-pack/plugins/security_solution/public/users/pages/types.ts +++ b/x-pack/plugins/security_solution/public/users/pages/types.ts @@ -4,14 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ActionCreator } from 'typescript-fsa'; +import type { ActionCreator } from 'typescript-fsa'; -import { Filter } from '@kbn/es-query'; -import { DocValueFields } from '@kbn/timelines-plugin/common'; -import { GlobalTimeArgs } from '../../common/containers/use_global_time'; +import type { Filter } from '@kbn/es-query'; +import type { DocValueFields } from '@kbn/timelines-plugin/common'; +import type { GlobalTimeArgs } from '../../common/containers/use_global_time'; -import { usersModel } from '../store'; -import { InputsModelId } from '../../common/store/inputs/constants'; +import type { usersModel } from '../store'; +import type { InputsModelId } from '../../common/store/inputs/constants'; export type UsersTabsProps = GlobalTimeArgs & { docValueFields: DocValueFields[]; diff --git a/x-pack/plugins/security_solution/public/users/pages/users.tsx b/x-pack/plugins/security_solution/public/users/pages/users.tsx index f1f07249ff19e..4aac53838661d 100644 --- a/x-pack/plugins/security_solution/public/users/pages/users.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/users.tsx @@ -11,7 +11,7 @@ import { noop } from 'lodash/fp'; import React, { useCallback, useMemo, useRef } from 'react'; import { useDispatch } from 'react-redux'; import { useParams } from 'react-router-dom'; -import { Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; import { isTab } from '@kbn/timelines-plugin/public'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { SecurityPageName } from '../../app/types'; @@ -26,7 +26,8 @@ import { useGlobalFullScreen } from '../../common/containers/use_full_screen'; import { useGlobalTime } from '../../common/containers/use_global_time'; import { useKibana } from '../../common/lib/kibana'; import { convertToBuildEsQuery } from '../../common/lib/keury'; -import { inputsSelectors, State } from '../../common/store'; +import type { State } from '../../common/store'; +import { inputsSelectors } from '../../common/store'; import { setAbsoluteRangeDatePicker } from '../../common/store/inputs/actions'; import { SpyRoute } from '../../common/utils/route/spy_routes'; @@ -42,7 +43,7 @@ import { useSourcererDataView } from '../../common/containers/sourcerer'; import { useDeepEqualSelector } from '../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../common/hooks/use_invalid_filter_query'; import { UsersKpiComponent } from '../components/kpi_users'; -import { UpdateDateRange } from '../../common/components/charts/common'; +import type { UpdateDateRange } from '../../common/components/charts/common'; import { LastEventIndexKey } from '../../../common/search_strategy'; import { generateSeverityFilter } from '../../hosts/store/helpers'; import { UsersTableType } from '../store/model'; diff --git a/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx b/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx index 4d154ee5e3e7c..f1aca82f21493 100644 --- a/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx +++ b/x-pack/plugins/security_solution/public/users/pages/users_tabs.tsx @@ -9,15 +9,15 @@ import React, { memo, useCallback } from 'react'; import { Switch } from 'react-router-dom'; import { Route } from '@kbn/kibana-react-plugin/public'; -import { UsersTabsProps } from './types'; +import type { UsersTabsProps } from './types'; import { UsersTableType } from '../store/model'; import { USERS_PATH } from '../../../common/constants'; import { AllUsersQueryTabBody, AuthenticationsQueryTabBody } from './navigation'; import { AnomaliesQueryTabBody } from '../../common/containers/anomalies/anomalies_query_tab_body'; import { AnomaliesUserTable } from '../../common/components/ml/tables/anomalies_user_table'; -import { Anomaly } from '../../common/components/ml/types'; +import type { Anomaly } from '../../common/components/ml/types'; import { scoreIntervalToDateTime } from '../../common/components/ml/score/score_interval_to_datetime'; -import { UpdateDateRange } from '../../common/components/charts/common'; +import type { UpdateDateRange } from '../../common/components/charts/common'; import { UserRiskScoreQueryTabBody } from './navigation/user_risk_score_tab_body'; import { EventsQueryTabBody } from '../../common/components/events_tab/events_query_tab_body'; diff --git a/x-pack/plugins/security_solution/public/users/routes.tsx b/x-pack/plugins/security_solution/public/users/routes.tsx index 426e7090ca845..f316a8d4b2a9f 100644 --- a/x-pack/plugins/security_solution/public/users/routes.tsx +++ b/x-pack/plugins/security_solution/public/users/routes.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { UsersContainer } from './pages'; -import { SecurityPageName, SecuritySubPluginRoutes } from '../app/types'; +import type { SecuritySubPluginRoutes } from '../app/types'; +import { SecurityPageName } from '../app/types'; import { USERS_PATH } from '../../common/constants'; export const UsersRoutes = () => ( diff --git a/x-pack/plugins/security_solution/public/users/store/actions.ts b/x-pack/plugins/security_solution/public/users/store/actions.ts index 9e68891ba3975..8465ae4b73927 100644 --- a/x-pack/plugins/security_solution/public/users/store/actions.ts +++ b/x-pack/plugins/security_solution/public/users/store/actions.ts @@ -6,9 +6,9 @@ */ import actionCreatorFactory from 'typescript-fsa'; -import { usersModel } from '.'; -import { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; +import type { usersModel } from '.'; +import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; +import type { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; const actionCreator = actionCreatorFactory('x-pack/security_solution/local/users'); diff --git a/x-pack/plugins/security_solution/public/users/store/helpers.ts b/x-pack/plugins/security_solution/public/users/store/helpers.ts index f2c6ca9fcdc0b..ee9139c4335ec 100644 --- a/x-pack/plugins/security_solution/public/users/store/helpers.ts +++ b/x-pack/plugins/security_solution/public/users/store/helpers.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { UsersModel, UsersType, UsersTableType, UsersQueries } from './model'; +import type { UsersModel, UsersQueries } from './model'; +import { UsersType, UsersTableType } from './model'; import { DEFAULT_TABLE_ACTIVE_PAGE } from '../../common/store/constants'; export const setUsersPageQueriesActivePageToZero = (state: UsersModel): UsersQueries => ({ diff --git a/x-pack/plugins/security_solution/public/users/store/index.ts b/x-pack/plugins/security_solution/public/users/store/index.ts index d0d0b2fcf2e48..4c2b845e9def4 100644 --- a/x-pack/plugins/security_solution/public/users/store/index.ts +++ b/x-pack/plugins/security_solution/public/users/store/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Reducer, AnyAction } from 'redux'; +import type { Reducer, AnyAction } from 'redux'; import * as usersActions from './actions'; import * as usersModel from './model'; import * as usersSelectors from './selectors'; diff --git a/x-pack/plugins/security_solution/public/users/store/model.ts b/x-pack/plugins/security_solution/public/users/store/model.ts index 491f35c5efd12..5ce996dc52623 100644 --- a/x-pack/plugins/security_solution/public/users/store/model.ts +++ b/x-pack/plugins/security_solution/public/users/store/model.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; -import { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; +import type { RiskScoreSortField, RiskSeverity } from '../../../common/search_strategy'; +import type { SortUsersField } from '../../../common/search_strategy/security_solution/users/common'; export enum UsersType { page = 'page', diff --git a/x-pack/plugins/security_solution/public/users/store/reducer.ts b/x-pack/plugins/security_solution/public/users/store/reducer.ts index b08287a4e31b3..76e3d245c3b5d 100644 --- a/x-pack/plugins/security_solution/public/users/store/reducer.ts +++ b/x-pack/plugins/security_solution/public/users/store/reducer.ts @@ -16,7 +16,8 @@ import { updateUserRiskScoreSeverityFilter, } from './actions'; import { setUsersPageQueriesActivePageToZero } from './helpers'; -import { UsersTableType, UsersModel } from './model'; +import type { UsersModel } from './model'; +import { UsersTableType } from './model'; import { Direction } from '../../../common/search_strategy/common'; import { RiskScoreFields } from '../../../common/search_strategy'; import { UsersFields } from '../../../common/search_strategy/security_solution/users/common'; diff --git a/x-pack/plugins/security_solution/public/users/store/selectors.ts b/x-pack/plugins/security_solution/public/users/store/selectors.ts index 1ccedf3b5da20..0e3cf3fef6b2f 100644 --- a/x-pack/plugins/security_solution/public/users/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/users/store/selectors.ts @@ -7,9 +7,10 @@ import { createSelector } from 'reselect'; -import { State } from '../../common/store/types'; +import type { State } from '../../common/store/types'; -import { UsersPageModel, UsersTableType } from './model'; +import type { UsersPageModel } from './model'; +import { UsersTableType } from './model'; const selectUserPage = (state: State): UsersPageModel => state.users.page; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/index.ts index b0683bfbad868..ae73a3a978d21 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { run, RunContext } from '@kbn/dev-cli-runner'; +import type { RunContext } from '@kbn/dev-cli-runner'; +import { run } from '@kbn/dev-cli-runner'; import { HORIZONTAL_LINE, SUPPORTED_TOKENS } from './constants'; import { runInAutoMode } from './run_in_auto_mode'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/run_in_auto_mode.ts b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/run_in_auto_mode.ts index 29b5f66786d08..8e93cf7625b73 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/run_in_auto_mode.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/run_in_auto_mode.ts @@ -8,8 +8,9 @@ import type { RunContext } from '@kbn/dev-cli-runner'; import { set } from 'lodash'; import { SUPPORTED_TOKENS } from './constants'; -import { ActionDetails } from '../../../common/endpoint/types'; -import { createRuntimeServices, RuntimeServices } from '../common/stack_services'; +import type { ActionDetails } from '../../../common/endpoint/types'; +import type { RuntimeServices } from '../common/stack_services'; +import { createRuntimeServices } from '../common/stack_services'; import { fetchEndpointActionList, diff --git a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/utils.ts b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/utils.ts index c4724a65cb16e..bc077cd35a405 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/action_responder/utils.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/action_responder/utils.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { KbnClient } from '@kbn/test'; -import { Client } from '@elastic/elasticsearch'; +import type { KbnClient } from '@kbn/test'; +import type { Client } from '@elastic/elasticsearch'; import { AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common'; import { sendEndpointMetadataUpdate } from '../common/endpoint_metadata_services'; import { FleetActionGenerator } from '../../../common/endpoint/data_generators/fleet_action_generator'; @@ -14,7 +14,7 @@ import { ENDPOINT_ACTION_RESPONSES_INDEX, ENDPOINTS_ACTION_LIST_ROUTE, } from '../../../common/endpoint/constants'; -import { +import type { ActionDetails, ActionListApiResponse, EndpointActionData, @@ -23,7 +23,7 @@ import { ActionResponseOutput, ProcessesEntry, } from '../../../common/endpoint/types'; -import { EndpointActionListRequestQuery } from '../../../common/endpoint/schema/actions'; +import type { EndpointActionListRequestQuery } from '../../../common/endpoint/schema/actions'; import { EndpointActionGenerator } from '../../../common/endpoint/data_generators/endpoint_action_generator'; const ES_INDEX_OPTIONS = { headers: { 'X-elastic-product-origin': 'fleet' } }; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/blocklists/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/blocklists/index.ts index 9ad2adcdeaf9b..77c6b164a4698 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/blocklists/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/blocklists/index.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { run, RunFn } from '@kbn/dev-cli-runner'; +import type { RunFn } from '@kbn/dev-cli-runner'; +import { run } from '@kbn/dev-cli-runner'; import { createFailError } from '@kbn/dev-cli-errors'; import { KbnClient } from '@kbn/test'; -import { AxiosError } from 'axios'; +import type { AxiosError } from 'axios'; import pMap from 'p-map'; import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/endpoint_metadata_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/endpoint_metadata_services.ts index b288b70a9b772..6d5059defe374 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/endpoint_metadata_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/endpoint_metadata_services.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; -import { KbnClient } from '@kbn/test'; -import { WriteResponseBase } from '@elastic/elasticsearch/lib/api/types'; +import type { Client } from '@elastic/elasticsearch'; +import type { KbnClient } from '@kbn/test'; +import type { WriteResponseBase } from '@elastic/elasticsearch/lib/api/types'; import { clone, merge } from 'lodash'; -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import { resolvePathVariables } from '../../../public/common/utils/resolve_path_variables'; import { HOST_METADATA_GET_ROUTE, METADATA_DATASTREAM } from '../../../common/endpoint/constants'; -import { HostInfo, HostMetadata } from '../../../common/endpoint/types'; +import type { HostInfo, HostMetadata } from '../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../common/endpoint/generate_data'; import { checkInFleetAgent } from './fleet_services'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts index 5f3e6b3375c30..3d7d3c5a03172 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import { AGENTS_INDEX } from '@kbn/fleet-plugin/common'; export const checkInFleetAgent = async (esClient: Client, agentId: string) => { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/random_policy_id_generator.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/random_policy_id_generator.ts index 4160c11fc3521..9c432f66c2a02 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/random_policy_id_generator.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/random_policy_id_generator.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ToolingLog } from '@kbn/tooling-log'; -import { KbnClient } from '@kbn/test'; -import { AxiosResponse } from 'axios'; +import type { ToolingLog } from '@kbn/tooling-log'; +import type { KbnClient } from '@kbn/test'; +import type { AxiosResponse } from 'axios'; import { PACKAGE_POLICY_API_ROUTES, PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common/constants'; import { indexFleetEndpointPolicy } from '../../../common/endpoint/data_loaders/index_fleet_endpoint_policy'; import { setupFleetForEndpoint } from '../../../common/endpoint/data_loaders/setup_fleet_for_endpoint'; -import { GetPolicyListResponse } from '../../../public/management/pages/policy/types'; +import type { GetPolicyListResponse } from '../../../public/management/pages/policy/types'; const fetchEndpointPolicies = ( kbnClient: KbnClient diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts index 52fe4b3d15fe3..dab9e2b6abd27 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/security_user_services.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import { userInfo } from 'os'; export const createSecuritySuperuser = async ( diff --git a/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts index 18761127122d0..76cfdc11bde4e 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/event_filters/index.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { run, RunFn } from '@kbn/dev-cli-runner'; +import type { RunFn } from '@kbn/dev-cli-runner'; +import { run } from '@kbn/dev-cli-runner'; import { createFailError } from '@kbn/dev-cli-errors'; import { KbnClient } from '@kbn/test'; -import { AxiosError } from 'axios'; +import type { AxiosError } from 'axios'; import pMap from 'p-map'; import type { CreateExceptionListItemSchema, diff --git a/x-pack/plugins/security_solution/scripts/endpoint/host_isolation_exceptions/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/host_isolation_exceptions/index.ts index 219d3de1bd977..246f3e16ef78c 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/host_isolation_exceptions/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/host_isolation_exceptions/index.ts @@ -6,7 +6,8 @@ */ import { createFailError } from '@kbn/dev-cli-errors'; -import { run, RunFn } from '@kbn/dev-cli-runner'; +import type { RunFn } from '@kbn/dev-cli-runner'; +import { run } from '@kbn/dev-cli-runner'; import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_DESCRIPTION, @@ -16,7 +17,7 @@ import { EXCEPTION_LIST_URL, } from '@kbn/securitysolution-list-constants'; import { KbnClient } from '@kbn/test'; -import { AxiosError } from 'axios'; +import type { AxiosError } from 'axios'; import { HostIsolationExceptionGenerator } from '../../../common/endpoint/data_generators/host_isolation_exception_generator'; import { randomPolicyIdGenerator } from '../common/random_policy_id_generator'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/resolver_generator_script.ts b/x-pack/plugins/security_solution/scripts/endpoint/resolver_generator_script.ts index a564e627c9909..9eb03dd80e326 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/resolver_generator_script.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/resolver_generator_script.ts @@ -12,7 +12,8 @@ import { Client, errors } from '@elastic/elasticsearch'; import type { ClientOptions } from '@elastic/elasticsearch/lib/client'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { ToolingLog } from '@kbn/tooling-log'; -import { KbnClient, KbnClientOptions } from '@kbn/test'; +import type { KbnClientOptions } from '@kbn/test'; +import { KbnClient } from '@kbn/test'; import { indexHostsAndAlerts } from '../../common/endpoint/index_data'; import { ANCESTRY_LIMIT, EndpointDocGenerator } from '../../common/endpoint/generate_data'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts b/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts index 9df43704da81c..f1da0eda44962 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts @@ -17,8 +17,8 @@ import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL, } from '@kbn/securitysolution-list-constants'; -import { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { TrustedApp } from '../../../common/endpoint/types'; +import type { CreateExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { TrustedApp } from '../../../common/endpoint/types'; import { TrustedAppGenerator } from '../../../common/endpoint/data_generators/trusted_app_generator'; import { newTrustedAppToCreateExceptionListItem } from '../../../public/management/pages/trusted_apps/service/mappers'; diff --git a/x-pack/plugins/security_solution/server/client/client.ts b/x-pack/plugins/security_solution/server/client/client.ts index e697331944012..7b6e81ba9693f 100644 --- a/x-pack/plugins/security_solution/server/client/client.ts +++ b/x-pack/plugins/security_solution/server/client/client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConfigType } from '../config'; +import type { ConfigType } from '../config'; import { DEFAULT_DATA_VIEW_ID, DEFAULT_PREVIEW_INDEX } from '../../common/constants'; export class AppClient { diff --git a/x-pack/plugins/security_solution/server/client/factory.ts b/x-pack/plugins/security_solution/server/client/factory.ts index 09a6791596ce1..88dd8a87b19c8 100644 --- a/x-pack/plugins/security_solution/server/client/factory.ts +++ b/x-pack/plugins/security_solution/server/client/factory.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { AppClient } from './client'; -import { ConfigType } from '../config'; +import type { ConfigType } from '../config'; interface SetupDependencies { getSpaceId?: (request: KibanaRequest) => string | undefined; diff --git a/x-pack/plugins/security_solution/server/config.mock.ts b/x-pack/plugins/security_solution/server/config.mock.ts index 52e68ac548e6c..d643c5d22b434 100644 --- a/x-pack/plugins/security_solution/server/config.mock.ts +++ b/x-pack/plugins/security_solution/server/config.mock.ts @@ -6,11 +6,9 @@ */ import { DEFAULT_SIGNALS_INDEX, SIGNALS_INDEX_KEY } from '../common/constants'; -import { - ExperimentalFeatures, - parseExperimentalConfigValue, -} from '../common/experimental_features'; -import { ConfigType } from './config'; +import type { ExperimentalFeatures } from '../common/experimental_features'; +import { parseExperimentalConfigValue } from '../common/experimental_features'; +import type { ConfigType } from './config'; export const createMockConfig = (): ConfigType => { const enableExperimental: string[] = []; diff --git a/x-pack/plugins/security_solution/server/config.ts b/x-pack/plugins/security_solution/server/config.ts index 42eaed75be239..596194f8e8b9c 100644 --- a/x-pack/plugins/security_solution/server/config.ts +++ b/x-pack/plugins/security_solution/server/config.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; -import { PluginInitializerContext } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; +import type { PluginInitializerContext } from '@kbn/core/server'; import { SIGNALS_INDEX_KEY, DEFAULT_SIGNALS_INDEX } from '../common/constants'; +import type { ExperimentalFeatures } from '../common/experimental_features'; import { - ExperimentalFeatures, getExperimentalAllowedValues, isValidExperimentalValue, parseExperimentalConfigValue, diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index e65dac1e0b688..c66643df5b508 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -5,45 +5,44 @@ * 2.0. */ -import { KibanaRequest, Logger } from '@kbn/core/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { +import type { KibanaRequest, Logger } from '@kbn/core/server'; +import type { ExceptionListClient, ListsServerExtensionRegistrar } from '@kbn/lists-plugin/server'; +import type { CasesClient, PluginStartContract as CasesPluginStartContract, } from '@kbn/cases-plugin/server'; -import { SecurityPluginStart } from '@kbn/security-plugin/server'; -import { +import type { SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { AgentService, FleetStartContract, AgentPolicyServiceInterface, PackagePolicyServiceInterface, } from '@kbn/fleet-plugin/server'; -import { PluginStartContract as AlertsPluginStartContract } from '@kbn/alerting-plugin/server'; -import type { ListsServerExtensionRegistrar } from '@kbn/lists-plugin/server'; +import type { PluginStartContract as AlertsPluginStartContract } from '@kbn/alerting-plugin/server'; import { getPackagePolicyCreateCallback, getPackagePolicyUpdateCallback, getPackagePolicyDeleteCallback, } from '../fleet_integration/fleet_integration'; -import { ManifestManager } from './services/artifacts'; -import { ConfigType } from '../config'; -import { IRequestContextFactory } from '../request_context_factory'; -import { LicenseService } from '../../common/license'; -import { ExperimentalFeatures } from '../../common/experimental_features'; -import { EndpointMetadataService } from './services/metadata'; +import type { ManifestManager } from './services/artifacts'; +import type { ConfigType } from '../config'; +import type { IRequestContextFactory } from '../request_context_factory'; +import type { LicenseService } from '../../common/license'; +import type { ExperimentalFeatures } from '../../common/experimental_features'; +import type { EndpointMetadataService } from './services/metadata'; import { EndpointAppContentServicesNotSetUpError, EndpointAppContentServicesNotStartedError, } from './errors'; -import { +import type { EndpointFleetServicesFactoryInterface, EndpointInternalFleetServicesInterface, EndpointScopedFleetServicesInterface, } from './services/fleet/endpoint_fleet_services_factory'; import { registerListsPluginEndpointExtensionPoints } from '../lists_integration'; -import { EndpointAuthz } from '../../common/endpoint/types/authz'; +import type { EndpointAuthz } from '../../common/endpoint/types/authz'; import { calculateEndpointAuthz } from '../../common/endpoint/service/authz'; -import { FeatureUsageService } from './services/feature_usage/service'; +import type { FeatureUsageService } from './services/feature_usage/service'; export interface EndpointAppContextServiceSetupContract { securitySolutionRequestContextFactory: IRequestContextFactory; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/common.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/common.ts index 4a1552e2b3a25..23118028ead49 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/common.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/common.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { InternalArtifactSchema, InternalArtifactCompleteSchema, - internalArtifactCompleteSchema, } from '../../schemas/artifacts'; +import { internalArtifactCompleteSchema } from '../../schemas/artifacts'; export const ArtifactConstants = { GLOBAL_ALLOWLIST_NAME: 'endpoint-exceptionlist', diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.test.ts index 0f4890ac3baba..3ef1522109d35 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.test.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { getFoundExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/found_exception_list_item_schema.mock'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import type { EntriesArray, EntryList } from '@kbn/securitysolution-io-ts-list-types'; import { buildArtifact, getEndpointExceptionList, getFilteredEndpointExceptionList } from './lists'; -import { TranslatedEntry, TranslatedExceptionListItem } from '../../schemas/artifacts'; +import type { TranslatedEntry, TranslatedExceptionListItem } from '../../schemas/artifacts'; import { ArtifactConstants } from './common'; import { ENDPOINT_BLOCKLISTS_LIST_ID, diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts index f2fda48dbc05e..581b46deebcfd 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/lists.ts @@ -13,32 +13,35 @@ import type { ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { hasSimpleExecutableName, OperatingSystem } from '@kbn/securitysolution-utils'; +import type { OperatingSystem } from '@kbn/securitysolution-utils'; +import { hasSimpleExecutableName } from '@kbn/securitysolution-utils'; -import { +import type { ENDPOINT_BLOCKLISTS_LIST_ID, ENDPOINT_EVENT_FILTERS_LIST_ID, ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, - ENDPOINT_LIST_ID, ENDPOINT_TRUSTED_APPS_LIST_ID, } from '@kbn/securitysolution-list-constants'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { +import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { InternalArtifactCompleteSchema, TranslatedEntry, TranslatedPerformantEntries, - translatedPerformantEntries as translatedPerformantEntriesType, - translatedEntry as translatedEntryType, - translatedEntryMatchAnyMatcher, TranslatedEntryMatcher, - translatedEntryMatchMatcher, TranslatedEntryMatchWildcard, TranslatedEntryMatchWildcardMatcher, - translatedEntryMatchWildcardMatcher, TranslatedEntryNestedEntry, - translatedEntryNestedEntry, TranslatedExceptionListItem, WrappedTranslatedExceptionList, +} from '../../schemas'; +import { + translatedPerformantEntries as translatedPerformantEntriesType, + translatedEntry as translatedEntryType, + translatedEntryMatchAnyMatcher, + translatedEntryMatchMatcher, + translatedEntryMatchWildcardMatcher, + translatedEntryNestedEntry, wrappedTranslatedExceptionList, } from '../../schemas'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.test.ts index 3948c51f6c5d8..f28b8721e6bf7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ManifestSchemaVersion } from '../../../../common/endpoint/schema/common'; -import { InternalArtifactCompleteSchema } from '../../schemas'; +import type { ManifestSchemaVersion } from '../../../../common/endpoint/schema/common'; +import type { InternalArtifactCompleteSchema } from '../../schemas'; import { getArtifactId } from './common'; import { isEmptyManifestDiff, Manifest } from './manifest'; import { getMockArtifacts, toArtifactRecords } from './mocks'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.ts index 7c1906cdd7a88..400094a946792 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest.ts @@ -8,21 +8,23 @@ import { flatMap, isEqual } from 'lodash'; import semver from 'semver'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { +import type { InternalArtifactSchema, InternalManifestSchema, InternalManifestEntrySchema, InternalArtifactCompleteSchema, } from '../../schemas/artifacts'; -import { +import type { ManifestSchemaVersion, SemanticVersion, - semanticVersion, } from '../../../../common/endpoint/schema/common'; -import { manifestSchema, ManifestSchema } from '../../../../common/endpoint/schema/manifest'; +import { semanticVersion } from '../../../../common/endpoint/schema/common'; +import type { ManifestSchema } from '../../../../common/endpoint/schema/manifest'; +import { manifestSchema } from '../../../../common/endpoint/schema/manifest'; import { ManifestEntry } from './manifest_entry'; import { getArtifactId } from './common'; -import { ManifestVersion, manifestVersion } from '../../schemas/artifacts/manifest'; +import type { ManifestVersion } from '../../schemas/artifacts/manifest'; +import { manifestVersion } from '../../schemas/artifacts/manifest'; function createInternalManifestEntries( artifactIds: string[], diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.test.ts index 23dd4aabac181..732aef2d14d42 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InternalArtifactSchema } from '../../schemas'; +import type { InternalArtifactSchema } from '../../schemas'; import { getInternalArtifactMock } from '../../schemas/artifacts/saved_objects.mock'; import { ManifestEntry } from './manifest_entry'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.ts index 0226e8d47df3d..a15c4db1dcd02 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/manifest_entry.ts @@ -6,9 +6,9 @@ */ import { relativeDownloadUrlFromArtifact } from '@kbn/fleet-plugin/server'; -import { InternalArtifactSchema } from '../../schemas/artifacts'; -import { CompressionAlgorithm } from '../../../../common/endpoint/schema/common'; -import { ManifestEntrySchema } from '../../../../common/endpoint/schema/manifest'; +import type { InternalArtifactSchema } from '../../schemas/artifacts'; +import type { CompressionAlgorithm } from '../../../../common/endpoint/schema/common'; +import type { ManifestEntrySchema } from '../../../../common/endpoint/schema/manifest'; import { getArtifactId } from './common'; export class ManifestEntry { diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.test.ts index ee850f93a7b2a..940acc839b0e7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.test.ts @@ -10,7 +10,7 @@ import { savedObjectsClientMock, elasticsearchServiceMock, } from '@kbn/core/server/mocks'; -import { +import type { Logger, SavedObjectsClient, SavedObjectsFindResponse, @@ -18,10 +18,10 @@ import { } from '@kbn/core/server'; import { migrateArtifactsToFleet } from './migrate_artifacts_to_fleet'; import { createEndpointArtifactClientMock } from '../../services/artifacts/mocks'; -import { InternalArtifactCompleteSchema } from '../../schemas'; +import type { InternalArtifactCompleteSchema } from '../../schemas'; import { generateArtifactEsGetSingleHitMock } from '@kbn/fleet-plugin/server/services/artifacts/mocks'; -import { NewArtifact } from '@kbn/fleet-plugin/server/services'; -import { CreateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { NewArtifact } from '@kbn/fleet-plugin/server/services'; +import type { CreateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; describe('When migrating artifacts to fleet', () => { let soClient: jest.Mocked; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.ts index ee72ccbc73e82..e015019fa8a5d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrate_artifacts_to_fleet.ts @@ -7,9 +7,9 @@ import { inflate as _inflate } from 'zlib'; import { promisify } from 'util'; -import { SavedObjectsClient, Logger } from '@kbn/core/server'; -import { EndpointArtifactClientInterface } from '../../services'; -import { InternalArtifactCompleteSchema, InternalArtifactSchema } from '../../schemas'; +import type { SavedObjectsClient, Logger } from '@kbn/core/server'; +import type { EndpointArtifactClientInterface } from '../../services'; +import type { InternalArtifactCompleteSchema, InternalArtifactSchema } from '../../schemas'; import { ArtifactConstants } from './common'; class ArtifactMigrationError extends Error { diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.test.ts index 9ec6cd9e26a02..b1daee8af6c14 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import type { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; import { migrationMocks } from '@kbn/core/server/mocks'; import { ManifestConstants } from './common'; -import { migrations, OldInternalManifestSchema } from './migrations'; +import type { OldInternalManifestSchema } from './migrations'; +import { migrations } from './migrations'; describe('7.12.0 manifest migrations', () => { const ARTIFACT_ID_0 = diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.ts index 057a840d2fc6e..733af778b2315 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/migrations.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { SavedObjectMigrationMap, SavedObjectSanitizedDoc, SavedObjectUnsanitizedDoc, } from '@kbn/core/server'; -import { InternalManifestSchema } from '../../schemas/artifacts'; +import type { InternalManifestSchema } from '../../schemas/artifacts'; export type OldInternalManifestSchema = Omit & { ids: string[]; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/mocks.ts index bf3e4d398933a..bc8989f2b9b72 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/mocks.ts @@ -6,9 +6,9 @@ */ import { mapValues } from 'lodash'; -import { PackagePolicy, PackagePolicyConfigRecord } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy, PackagePolicyConfigRecord } from '@kbn/fleet-plugin/common'; import { createPackagePolicyMock } from '@kbn/fleet-plugin/common/mocks'; -import { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; +import type { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; import { getInternalArtifactMock, getInternalArtifactMockWithDiffs, diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/saved_object_mappings.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/saved_object_mappings.ts index 0805e94262572..9ce550859da4d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/saved_object_mappings.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/saved_object_mappings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { ArtifactConstants, ManifestConstants } from './common'; import { migrations } from './migrations'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.test.ts index 170a12ed5bd18..a0ad1f9712be1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.test.ts @@ -14,7 +14,7 @@ import { ManifestTaskConstants, ManifestTask } from './task'; import { MockManifestTask } from './task.mock'; import { ManifestManager } from '../../services/artifacts/manifest_manager'; import { buildManifestManagerMock } from '../../services/artifacts/manifest_manager/manifest_manager.mock'; -import { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; +import type { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; import { getMockArtifacts } from './mocks'; import { InvalidInternalManifestError } from '../../services/artifacts/errors'; import { loggingSystemMock } from '@kbn/core/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts index ad31b51cae22b..d6f8e92c02c8a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/artifacts/task.ts @@ -5,16 +5,17 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { ConcreteTaskInstance, TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { getArtifactId, reportErrors } from './common'; -import { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; -import { isEmptyManifestDiff, Manifest } from './manifest'; +import type { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; +import type { Manifest } from './manifest'; +import { isEmptyManifestDiff } from './manifest'; import { InvalidInternalManifestError } from '../../services/artifacts/errors'; import { ManifestManager } from '../../services'; import { wrapErrorIfNeeded } from '../../utils'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts index 0395db54b7a2e..e9c088d17e00a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.test.ts @@ -6,7 +6,7 @@ */ import type { TransportResult } from '@elastic/elasticsearch'; -import { TransformGetTransformStatsResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { TransformGetTransformStatsResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { CheckMetadataTransformsTask, TYPE, @@ -16,14 +16,16 @@ import { import { createMockEndpointAppContext } from '../../mocks'; import { coreMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import { TaskManagerSetupContract, TaskStatus } from '@kbn/task-manager-plugin/server'; -import { CoreSetup } from '@kbn/core/server'; +import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import { TaskStatus } from '@kbn/task-manager-plugin/server'; +import type { CoreSetup } from '@kbn/core/server'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; import { TRANSFORM_STATES } from '../../../../common/constants'; import { METADATA_TRANSFORMS_PATTERN } from '../../../../common/endpoint/constants'; -import { RunResult } from '@kbn/task-manager-plugin/server/task'; -import { ElasticsearchAssetType, EsAssetReference, Installation } from '@kbn/fleet-plugin/common'; +import type { RunResult } from '@kbn/task-manager-plugin/server/task'; +import type { EsAssetReference, Installation } from '@kbn/fleet-plugin/common'; +import { ElasticsearchAssetType } from '@kbn/fleet-plugin/common'; import type { EndpointAppContext } from '../../types'; import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts index 114e29d0a221b..64d37e07342c4 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/metadata/check_metadata_transforms_task.ts @@ -6,19 +6,19 @@ */ import type { TransportResult } from '@elastic/elasticsearch'; -import { +import type { TransformGetTransformStatsResponse, TransformGetTransformStatsTransformStats, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { CoreSetup, ElasticsearchClient, Logger } from '@kbn/core/server'; -import { +import type { CoreSetup, ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ConcreteTaskInstance, TaskManagerSetupContract, TaskManagerStartContract, - throwUnrecoverableError, } from '@kbn/task-manager-plugin/server'; +import { throwUnrecoverableError } from '@kbn/task-manager-plugin/server'; import { ElasticsearchAssetType, FLEET_ENDPOINT_PACKAGE } from '@kbn/fleet-plugin/common'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { METADATA_TRANSFORMS_PATTERN } from '../../../../common/endpoint/constants'; import { WARNING_TRANSFORM_STATES } from '../../../../common/constants'; import { wrapErrorIfNeeded } from '../../utils'; diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts index d49f07919a9c9..fd83bb95a7ef7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts @@ -14,13 +14,13 @@ import { import { LicenseService } from '../../../../common/license'; import { createPackagePolicyServiceMock } from '@kbn/fleet-plugin/server/mocks'; import { PolicyWatcher } from './license_watch'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { createPackagePolicyMock } from '@kbn/fleet-plugin/common/mocks'; import { policyFactory } from '../../../../common/endpoint/models/policy_config'; -import { PolicyConfig } from '../../../../common/endpoint/types'; +import type { PolicyConfig } from '../../../../common/endpoint/types'; const MockPPWithEndpointPolicy = (cb?: (p: PolicyConfig) => PolicyConfig): PackagePolicy => { const packagePolicy = createPackagePolicyMock(); diff --git a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts index f88b3dab61b26..0997b7c2e565d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts +++ b/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Subscription } from 'rxjs'; +import type { Subscription } from 'rxjs'; -import { +import type { ElasticsearchClient, ElasticsearchServiceStart, KibanaRequest, @@ -15,15 +15,16 @@ import { SavedObjectsClientContract, SavedObjectsServiceStart, } from '@kbn/core/server'; -import { PackagePolicy, PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { isEndpointPolicyValidForLicense, unsetPolicyFeaturesAccordingToLicenseLevel, } from '../../../../common/license/policy_config'; -import { LicenseService } from '../../../../common/license/license'; -import { PolicyData } from '../../../../common/endpoint/types'; +import type { LicenseService } from '../../../../common/license/license'; +import type { PolicyData } from '../../../../common/endpoint/types'; import { getPolicyDataForUpdate } from '../../../../common/endpoint/service/policy'; export class PolicyWatcher { diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 6d6c83efd70fd..638a522616a31 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -6,16 +6,13 @@ */ import type { AwaitedProperties } from '@kbn/utility-types'; -import { - loggingSystemMock, - savedObjectsServiceMock, - ScopedClusterClientMock, -} from '@kbn/core/server/mocks'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { ScopedClusterClientMock } from '@kbn/core/server/mocks'; +import { loggingSystemMock, savedObjectsServiceMock } from '@kbn/core/server/mocks'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { securityMock } from '@kbn/security-plugin/server/mocks'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; -import { FleetStartContract, ExternalCallback } from '@kbn/fleet-plugin/server'; +import type { FleetStartContract, ExternalCallback } from '@kbn/fleet-plugin/server'; import { createPackagePolicyServiceMock, createMockAgentPolicyService, @@ -32,15 +29,15 @@ import { createCasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; import { xpackMocks } from '../fixtures'; import { createMockConfig, requestContextMock } from '../lib/detection_engine/routes/__mocks__'; -import { +import type { EndpointAppContextService, EndpointAppContextServiceSetupContract, EndpointAppContextServiceStartContract, } from './endpoint_app_context_services'; -import { ManifestManager } from './services/artifacts/manifest_manager/manifest_manager'; +import type { ManifestManager } from './services/artifacts/manifest_manager/manifest_manager'; import { getManifestManagerMock } from './services/artifacts/manifest_manager/manifest_manager.mock'; -import { EndpointAppContext } from './types'; -import { SecuritySolutionRequestHandlerContext } from '../types'; +import type { EndpointAppContext } from './types'; +import type { SecuritySolutionRequestHandlerContext } from '../types'; import { parseExperimentalConfigValue } from '../../common/experimental_features'; import { requestContextFactoryMock } from '../request_context_factory.mock'; import { EndpointMetadataService } from './services/metadata'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.test.ts index c6dbe24cdb901..3780fd95e3d91 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.test.ts @@ -7,7 +7,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; +import type { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; import { coreMock, elasticsearchServiceMock, @@ -16,11 +16,11 @@ import { loggingSystemMock, savedObjectsClientMock, } from '@kbn/core/server/mocks'; -import { +import type { EndpointActionLogRequestParams, EndpointActionLogRequestQuery, - EndpointActionLogRequestSchema, } from '../../../../common/endpoint/schema/actions'; +import { EndpointActionLogRequestSchema } from '../../../../common/endpoint/schema/actions'; import { ENDPOINT_ACTION_LOG_ROUTE } from '../../../../common/endpoint/constants'; import { parseExperimentalConfigValue } from '../../../../common/experimental_features'; import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__'; @@ -32,9 +32,10 @@ import { } from '../../mocks'; import { registerActionAuditLogRoutes } from './audit_log'; import uuid from 'uuid'; -import { mockAuditLogSearchResult, Results } from './mocks'; -import { SecuritySolutionRequestHandlerContext } from '../../../types'; -import { +import type { Results } from './mocks'; +import { mockAuditLogSearchResult } from './mocks'; +import type { SecuritySolutionRequestHandlerContext } from '../../../types'; +import type { ActivityLog, EndpointAction, EndpointActionResponse, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.ts index 1b171c39b2dd3..916a80de00c2c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log.ts @@ -9,8 +9,8 @@ import { ENDPOINT_ACTION_LOG_ROUTE } from '../../../../common/endpoint/constants import { EndpointActionLogRequestSchema } from '../../../../common/endpoint/schema/actions'; import { auditLogRequestHandler } from './audit_log_handler'; -import { SecuritySolutionPluginRouter } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { SecuritySolutionPluginRouter } from '../../../types'; +import type { EndpointAppContext } from '../../types'; import { withEndpointAuthz } from '../with_endpoint_authz'; /** diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log_handler.ts index 49aa5bc5691b6..d9792aff74e3b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/audit_log_handler.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { +import type { RequestHandler } from '@kbn/core/server'; +import type { EndpointActionLogRequestParams, EndpointActionLogRequestQuery, } from '../../../../common/endpoint/schema/actions'; import { getAuditLogResponse } from '../../services'; -import { SecuritySolutionRequestHandlerContext } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { SecuritySolutionRequestHandlerContext } from '../../../types'; +import type { EndpointAppContext } from '../../types'; export const auditLogRequestHandler = ( endpointContext: EndpointAppContext diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.test.ts index 9c6ef9b3a2c57..07ebd913d25c7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import type { ScopedClusterClientMock } from '@kbn/core/server/mocks'; import { - ScopedClusterClientMock, elasticsearchServiceMock, savedObjectsClientMock, httpServerMock, @@ -18,7 +18,7 @@ import { applyActionsEsSearchMock } from '../../services/actions/mocks'; import { requestContextMock } from '../../../lib/detection_engine/routes/__mocks__'; import { getActionDetailsRequestHandler } from './details'; import { NotFoundError } from '../../errors'; -import { ActionDetailsRequestSchema } from '../../../../common/endpoint/schema/actions'; +import type { ActionDetailsRequestSchema } from '../../../../common/endpoint/schema/actions'; import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; describe('when calling the Action Details route handler', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts index a5ba924a42728..35ac696b3601e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/details.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; -import { +import type { RequestHandler } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import type { SecuritySolutionPluginRouter, SecuritySolutionRequestHandlerContext, } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { ACTION_DETAILS_ROUTE } from '../../../../common/endpoint/constants'; import { ActionDetailsRequestSchema } from '../../../../common/endpoint/schema/actions'; import { withEndpointAuthz } from '../with_endpoint_authz'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/index.ts index e30b982fc2e9b..d947cfefa9a2a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/index.ts @@ -6,8 +6,8 @@ */ import { registerActionDetailsRoutes } from './details'; -import { SecuritySolutionPluginRouter } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { SecuritySolutionPluginRouter } from '../../../types'; +import type { EndpointAppContext } from '../../types'; import { registerActionStatusRoutes } from './status'; import { registerActionAuditLogRoutes } from './audit_log'; import { registerActionListRoutes } from './list'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts index 965a3ee9dcf4d..ab4627f384147 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SecuritySolutionRequestHandlerContextMock } from '../../../lib/detection_engine/routes/__mocks__/request_context'; -import { AwaitedProperties } from '@kbn/utility-types'; -import { EndpointActionListRequestQuery } from '../../../../common/endpoint/schema/actions'; -import { EndpointAuthz } from '../../../../common/endpoint/types/authz'; +import type { SecuritySolutionRequestHandlerContextMock } from '../../../lib/detection_engine/routes/__mocks__/request_context'; +import type { AwaitedProperties } from '@kbn/utility-types'; +import type { EndpointActionListRequestQuery } from '../../../../common/endpoint/schema/actions'; +import type { EndpointAuthz } from '../../../../common/endpoint/types/authz'; import { createMockEndpointAppContextServiceSetupContract, createMockEndpointAppContextServiceStartContract, @@ -21,13 +21,13 @@ import { loggingSystemMock, savedObjectsClientMock, } from '@kbn/core/server/mocks'; -import { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; +import type { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; import { ENDPOINTS_ACTION_LIST_ROUTE } from '../../../../common/endpoint/constants'; import { EndpointAppContextService } from '../../endpoint_app_context_services'; import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__'; import { LicenseService, parseExperimentalConfigValue } from '@kbn/fleet-plugin/common'; import { Subject } from 'rxjs'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock'; import { registerActionListRoutes } from './list'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts index 808ad76abd1e3..204f8d83e1aa8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts @@ -11,7 +11,7 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; +import type { RequestHandler } from '@kbn/core/server'; import type { EndpointActionListRequestQuery } from '../../../../common/endpoint/schema/actions'; import { getActionList } from '../../services'; import type { SecuritySolutionRequestHandlerContext } from '../../../types'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/mocks.ts index a2e01e7e3312b..0c9621c0cdd5d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/mocks.ts @@ -12,7 +12,7 @@ import type { TransportResult } from '@elastic/elasticsearch'; import moment from 'moment'; import uuid from 'uuid'; -import { +import type { LogsEndpointAction, LogsEndpointActionResponse, EndpointAction, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts index e4c66d5ca0538..a0acd5927f5a8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.test.ts @@ -8,12 +8,12 @@ import { Subject } from 'rxjs'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock'; -import { License } from '@kbn/licensing-plugin/common/license'; -import { AwaitedProperties } from '@kbn/utility-types'; -import { +import type { License } from '@kbn/licensing-plugin/common/license'; +import type { AwaitedProperties } from '@kbn/utility-types'; +import type { KibanaRequest, KibanaResponseFactory, RequestHandler, @@ -29,7 +29,7 @@ import { import type { PackageClient } from '@kbn/fleet-plugin/server'; import { createMockPackageService } from '@kbn/fleet-plugin/server/mocks'; import { AGENT_ACTIONS_INDEX, ElasticsearchAssetType } from '@kbn/fleet-plugin/common'; -import { CasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; +import type { CasesClientMock } from '@kbn/cases-plugin/server/client/mocks'; import { parseExperimentalConfigValue } from '../../../../common/experimental_features'; import { LicenseService } from '../../../../common/license'; @@ -44,7 +44,7 @@ import { ISOLATE_HOST_ROUTE, UNISOLATE_HOST_ROUTE, } from '../../../../common/endpoint/constants'; -import { +import type { ActionDetails, EndpointAction, ResponseActionApiResponse, @@ -53,9 +53,9 @@ import { ResponseActionRequestBody, } from '../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { EndpointAuthz } from '../../../../common/endpoint/types/authz'; +import type { EndpointAuthz } from '../../../../common/endpoint/types/authz'; import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__'; -import { SecuritySolutionRequestHandlerContextMock } from '../../../lib/detection_engine/routes/__mocks__/request_context'; +import type { SecuritySolutionRequestHandlerContextMock } from '../../../lib/detection_engine/routes/__mocks__/request_context'; import { EndpointAppContextService } from '../../endpoint_app_context_services'; import { createMockEndpointAppContextServiceSetupContract, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts index b10988ed2c597..d4508f24ea685 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/response_actions.ts @@ -8,16 +8,16 @@ import uuid from 'uuid'; import moment from 'moment'; -import { RequestHandler, Logger } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; -import { CasesByAlertId } from '@kbn/cases-plugin/common/api/cases/case'; +import type { RequestHandler, Logger } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import type { CasesByAlertId } from '@kbn/cases-plugin/common/api/cases/case'; import { AGENT_ACTIONS_INDEX } from '@kbn/fleet-plugin/common'; import { CommentType } from '@kbn/cases-plugin/common'; +import type { ResponseActionBodySchema } from '../../../../common/endpoint/schema/actions'; import { NoParametersRequestSchema, KillOrSuspendProcessRequestSchema, - ResponseActionBodySchema, } from '../../../../common/endpoint/schema/actions'; import { APP_ID } from '../../../../common/constants'; import { @@ -47,7 +47,7 @@ import type { SecuritySolutionPluginRouter, SecuritySolutionRequestHandlerContext, } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { getMetadataForEndpoints, getActionDetailsById } from '../../services'; import { doLogsEndpointActionDsExists } from '../../utils'; import { withEndpointAuthz } from '../with_endpoint_authz'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.test.ts index 5a84d7764454c..624b80887ff15 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.test.ts @@ -7,7 +7,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; +import type { KibanaResponseFactory, RequestHandler, RouteConfig } from '@kbn/core/server'; import { elasticsearchServiceMock, httpServerMock, @@ -27,15 +27,8 @@ import { } from '../../mocks'; import { registerActionStatusRoutes } from './status'; import uuid from 'uuid'; -import { - aMockAction, - aMockResponse, - aMockEndpointResponse, - MockEndpointResponse, - MockAction, - mockSearchResult, - MockResponse, -} from './mocks'; +import type { MockEndpointResponse, MockAction, MockResponse } from './mocks'; +import { aMockAction, aMockResponse, aMockEndpointResponse, mockSearchResult } from './mocks'; describe('Endpoint Action Status', () => { describe('schema', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts index 61b2b9c56f5b0..7debbf4f033fe 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/status.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; +import type { RequestHandler } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; import { ActionStatusRequestSchema } from '../../../../common/endpoint/schema/actions'; import { ACTION_STATUS_ROUTE } from '../../../../common/endpoint/constants'; -import { +import type { SecuritySolutionPluginRouter, SecuritySolutionRequestHandlerContext, } from '../../../types'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { getPendingActionCounts } from '../../services'; import { withEndpointAuthz } from '../with_endpoint_authz'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts index 065ab835dbf99..9b6de8ac0b6e0 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; +import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; import { CustomHttpRequestError } from '../../utils/custom_http_request_error'; import { NotFoundError } from '../errors'; import { EndpointHostUnEnrolledError } from '../services/metadata'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts index 0aaa138c90d31..e9b1f709dcedb 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/enrichment.test.ts @@ -9,8 +9,9 @@ import { coreMock } from '@kbn/core/server/mocks'; import { HostStatus } from '../../../../common/endpoint/types'; import { createMockMetadataRequestContext } from '../../mocks'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { enrichHostMetadata, MetadataRequestContext } from './handlers'; -import { AgentClient } from '@kbn/fleet-plugin/server'; +import type { MetadataRequestContext } from './handlers'; +import { enrichHostMetadata } from './handlers'; +import type { AgentClient } from '@kbn/fleet-plugin/server'; describe('test document enrichment', () => { let metaReqCtx: ReturnType; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts index f9aa361e71f32..0cc0d4bb50e55 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/handlers.ts @@ -5,40 +5,40 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; -import { +import type { TypeOf } from '@kbn/config-schema'; +import type { IScopedClusterClient, Logger, RequestHandler, SavedObjectsClientContract, } from '@kbn/core/server'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; import { errorHandler } from '../error_handler'; -import { +import type { HostInfo, HostMetadata, HostResultList, - HostStatus, MetadataListResponse, } from '../../../../common/endpoint/types'; +import { HostStatus } from '../../../../common/endpoint/types'; import type { SecuritySolutionRequestHandlerContext } from '../../../types'; import { kibanaRequestToMetadataListESQuery } from './query_builders'; -import { EndpointAppContext, HostListQueryResult } from '../../types'; -import { GetMetadataRequestSchema } from '.'; +import type { EndpointAppContext, HostListQueryResult } from '../../types'; +import type { GetMetadataRequestSchema } from '.'; import { findAllUnenrolledAgentIds } from './support/unenroll'; import { findAgentIdsByStatus } from './support/agent_status'; -import { EndpointAppContextService } from '../../endpoint_app_context_services'; +import type { EndpointAppContextService } from '../../endpoint_app_context_services'; import { fleetAgentStatusToEndpointHostStatus } from '../../utils'; import { queryResponseToHostListResult } from './support/query_strategies'; -import { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; +import type { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; import { ENDPOINT_DEFAULT_PAGE, ENDPOINT_DEFAULT_PAGE_SIZE, METADATA_TRANSFORMS_PATTERN, } from '../../../../common/endpoint/constants'; -import { EndpointFleetServicesInterface } from '../../services/fleet/endpoint_fleet_services_factory'; +import type { EndpointFleetServicesInterface } from '../../services/fleet/endpoint_fleet_services_factory'; export interface MetadataRequestContext { esClient?: IScopedClusterClient; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts index 6b23d5aa4ba0a..eba1c27d91f8d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/index.ts @@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema'; import { HostStatus } from '../../../../common/endpoint/types'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { getLogger, getMetadataRequestHandler, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 39f1890df7ca9..36ae8d9f95af3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { KibanaResponseFactory, RequestHandler, RouteConfig, @@ -18,7 +18,8 @@ import { loggingSystemMock, savedObjectsClientMock, } from '@kbn/core/server/mocks'; -import { HostInfo, HostStatus, MetadataListResponse } from '../../../../common/endpoint/types'; +import type { HostInfo, MetadataListResponse } from '../../../../common/endpoint/types'; +import { HostStatus } from '../../../../common/endpoint/types'; import { parseExperimentalConfigValue } from '../../../../common/experimental_features'; import { registerEndpointRoutes } from '.'; import { @@ -26,18 +27,22 @@ import { createMockEndpointAppContextServiceStartContract, createRouteHandlerContext, } from '../../mocks'; -import { - EndpointAppContextService, - EndpointAppContextServiceStartContract, -} from '../../endpoint_app_context_services'; +import type { EndpointAppContextServiceStartContract } from '../../endpoint_app_context_services'; +import { EndpointAppContextService } from '../../endpoint_app_context_services'; import { createMockConfig } from '../../../lib/detection_engine/routes/__mocks__'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; -import { Agent, ElasticsearchAssetType } from '@kbn/fleet-plugin/common/types/models'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; +import { ElasticsearchAssetType } from '@kbn/fleet-plugin/common/types/models'; import { legacyMetadataSearchResponseMock, unitedMetadataSearchResponseMock, } from './support/test_support'; -import type { AgentClient, PackageService, PackageClient } from '@kbn/fleet-plugin/server'; +import type { + AgentClient, + PackageService, + PackageClient, + PackagePolicyServiceInterface, +} from '@kbn/fleet-plugin/server'; import { HOST_METADATA_GET_ROUTE, HOST_METADATA_LIST_ROUTE, @@ -48,8 +53,8 @@ import { } from '../../../../common/endpoint/constants'; import { TRANSFORM_STATES } from '../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../types'; -import { AgentNotFoundError, PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { +import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; +import type { ClusterClientMock, ScopedClusterClientMock, // eslint-disable-next-line @kbn/eslint/no-restricted-paths @@ -57,7 +62,7 @@ import { import { EndpointHostNotFoundError } from '../../services/metadata'; import { FleetAgentGenerator } from '../../../../common/endpoint/data_generators/fleet_agent_generator'; import { createMockAgentClient, createMockPackageService } from '@kbn/fleet-plugin/server/mocks'; -import { TransformGetTransformStatsResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { TransformGetTransformStatsResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getEndpointAuthzInitialStateMock } from '../../../../common/endpoint/service/authz'; class IndexNotFoundException extends Error { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts index 4c7ca37d53560..746e78c6adf2e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.ts @@ -7,16 +7,16 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { ENDPOINT_DEFAULT_PAGE, ENDPOINT_DEFAULT_PAGE_SIZE, metadataCurrentIndexPattern, METADATA_UNITED_INDEX, } from '../../../../common/endpoint/constants'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { buildStatusesKuery } from './support/agent_status'; -import { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; +import type { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; /** * 00000000-0000-0000-0000-000000000000 is initial Elastic Agent id sent by Endpoint before policy is configured diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts index 2d2f46b410026..f3c5c6b542de5 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.test.ts @@ -6,9 +6,9 @@ */ import { buildStatusesKuery, findAgentIdsByStatus } from './agent_status'; -import { AgentClient } from '@kbn/fleet-plugin/server/services'; +import type { AgentClient } from '@kbn/fleet-plugin/server/services'; import { createMockAgentClient } from '@kbn/fleet-plugin/server/mocks'; -import { Agent } from '@kbn/fleet-plugin/common/types/models'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; import { AgentStatusKueryHelper } from '@kbn/fleet-plugin/common/services'; describe('test filtering endpoint hosts by agent status', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts index 058fff6481a4d..6bb788365ea22 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/agent_status.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { AgentClient } from '@kbn/fleet-plugin/server'; +import type { AgentClient } from '@kbn/fleet-plugin/server'; import { AgentStatusKueryHelper } from '@kbn/fleet-plugin/common/services'; -import { Agent } from '@kbn/fleet-plugin/common/types/models'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; import { HostStatus } from '../../../../../common/endpoint/types'; const getStatusQueryMap = (path: string = '') => diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.test.ts index 9577c32d512e7..366d83c6ac57a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.test.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { createPackagePolicyServiceMock } from '@kbn/fleet-plugin/server/mocks'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; import { getAllEndpointPackagePolicies } from './endpoint_package_policies'; describe('endpoint_package_policies', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.ts index 2e09360a34901..f2557fdedee83 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/endpoint_package_policies.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; export const getAllEndpointPackagePolicies = async ( packagePolicyService: PackagePolicyServiceInterface, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/query_strategies.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/query_strategies.ts index 3770a6c36fb01..1912640666dd2 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/query_strategies.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/query_strategies.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SearchResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { HostMetadata } from '../../../../../common/endpoint/types'; -import { HostListQueryResult, HostQueryResult } from '../../../types'; +import type { SearchResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { HostMetadata } from '../../../../../common/endpoint/types'; +import type { HostListQueryResult, HostQueryResult } from '../../../types'; // remove the top-level 'HostDetails' property if found, from previous schemas function stripHostDetails(host: HostMetadata | { HostDetails: HostMetadata }): HostMetadata { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts index ce78153d78dea..208c05100ca96 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/test_support.ts @@ -6,9 +6,9 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Agent } from '@kbn/fleet-plugin/common'; +import type { Agent } from '@kbn/fleet-plugin/common'; import { METADATA_UNITED_INDEX } from '../../../../../common/endpoint/constants'; -import { HostMetadata, UnitedAgentMetadata } from '../../../../../common/endpoint/types'; +import type { HostMetadata, UnitedAgentMetadata } from '../../../../../common/endpoint/types'; export function legacyMetadataSearchResponseMock( hostMetadata?: HostMetadata diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.test.ts index 054dae748b6f3..c78816306eb81 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.test.ts @@ -6,13 +6,13 @@ */ import { findAllUnenrolledAgentIds } from './unenroll'; -import { AgentClient } from '@kbn/fleet-plugin/server/services'; +import type { AgentClient } from '@kbn/fleet-plugin/server/services'; import { createMockAgentClient, createPackagePolicyServiceMock, } from '@kbn/fleet-plugin/server/mocks'; -import { Agent, PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { Agent, PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; describe('test find all unenrolled Agent id', () => { let mockAgentClient: jest.Mocked; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.ts index 2163308bd0f91..6f5ac098cf154 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/support/unenroll.ts @@ -6,7 +6,7 @@ */ import type { AgentClient } from '@kbn/fleet-plugin/server'; -import { Agent } from '@kbn/fleet-plugin/common/types/models'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; export async function findAllUnenrolledAgentIds( agentClient: AgentClient, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts index 01136fef81884..7cd02dace23ea 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.test.ts @@ -13,7 +13,7 @@ import { } from '../../mocks'; import { createMockAgentClient, createMockAgentService } from '@kbn/fleet-plugin/server/mocks'; import { getHostPolicyResponseHandler, getAgentPolicySummaryHandler } from './handlers'; -import { KibanaResponseFactory, SavedObjectsClientContract } from '@kbn/core/server'; +import type { KibanaResponseFactory, SavedObjectsClientContract } from '@kbn/core/server'; import { elasticsearchServiceMock, httpServerMock, @@ -21,18 +21,18 @@ import { savedObjectsClientMock, } from '@kbn/core/server/mocks'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { GetHostPolicyResponse, HostPolicyResponse } from '../../../../common/endpoint/types'; +import type { GetHostPolicyResponse, HostPolicyResponse } from '../../../../common/endpoint/types'; import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data'; import { parseExperimentalConfigValue } from '../../../../common/experimental_features'; import { createMockConfig, requestContextMock, } from '../../../lib/detection_engine/routes/__mocks__'; -import { Agent } from '@kbn/fleet-plugin/common/types/models'; -import { AgentClient, AgentService } from '@kbn/fleet-plugin/server/services'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; +import type { AgentClient, AgentService } from '@kbn/fleet-plugin/server/services'; import { get } from 'lodash'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ScopedClusterClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ScopedClusterClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; describe('test policy response handler', () => { let endpointAppContextService: EndpointAppContextService; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts index 7ccae199a3ed9..cf3e003c5bcc5 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/handlers.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; +import type { RequestHandler } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; import { policyIndexPattern } from '../../../../common/endpoint/constants'; -import { +import type { GetPolicyResponseSchema, GetAgentPolicySummaryRequestSchema, } from '../../../../common/endpoint/schema/policy'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; import { getAgentPolicySummary, getPolicyResponseByAgentId } from './service'; -import { GetAgentSummaryResponse } from '../../../../common/endpoint/types'; +import type { GetAgentSummaryResponse } from '../../../../common/endpoint/types'; export const getHostPolicyResponseHandler = function (): RequestHandler< undefined, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts index c21a47452b6e8..18eb1c961ee76 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; -import { EndpointAppContext } from '../../types'; +import type { IRouter } from '@kbn/core/server'; +import type { EndpointAppContext } from '../../types'; import { GetPolicyResponseSchema, GetAgentPolicySummaryRequestSchema, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts index 1280cfb3db016..c0639bcbcb848 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/policy/service.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { IScopedClusterClient, KibanaRequest } from '@kbn/core/server'; -import { Agent } from '@kbn/fleet-plugin/common/types/models'; +import type { IScopedClusterClient, KibanaRequest } from '@kbn/core/server'; +import type { Agent } from '@kbn/fleet-plugin/common/types/models'; import type { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { GetHostPolicyResponse, HostPolicyResponse } from '../../../../common/endpoint/types'; +import type { GetHostPolicyResponse, HostPolicyResponse } from '../../../../common/endpoint/types'; import { INITIAL_POLICY_ID } from '.'; -import { EndpointAppContext } from '../../types'; +import type { EndpointAppContext } from '../../types'; export const getESQueryPolicyResponseByAgentID = ( agentID: string, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts index 76336e33cb522..90e89405170ea 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IRouter } from '@kbn/core/server'; +import type { IRouter } from '@kbn/core/server'; import { validateEvents, validateEntities, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/handler.ts index 2552cf4754c90..33e655b49d21a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/handler.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; -import { validateEntities } from '../../../../../common/endpoint/schema/resolver'; -import { ResolverEntityIndex } from '../../../../../common/endpoint/types'; +import type { RequestHandler } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import type { validateEntities } from '../../../../../common/endpoint/schema/resolver'; +import type { ResolverEntityIndex } from '../../../../../common/endpoint/types'; import { resolverEntity } from './utils/build_resolver_entity'; /** diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/build_resolver_entity.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/build_resolver_entity.ts index 3c554f1602591..6cbbe8cf953b7 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/build_resolver_entity.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/build_resolver_entity.ts @@ -5,9 +5,9 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getFieldAsString, supportedSchemas } from './supported_schemas'; -import { ResolverEntityIndex } from '../../../../../../common/endpoint/types'; +import type { ResolverEntityIndex } from '../../../../../../common/endpoint/types'; export function resolverEntity(hits: Array>) { const responseBody: ResolverEntityIndex = []; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts index 9c40b2b5024e6..38f03c987ea34 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts @@ -6,7 +6,7 @@ */ import _ from 'lodash'; -import { ResolverSchema } from '../../../../../../common/endpoint/types'; +import type { ResolverSchema } from '../../../../../../common/endpoint/types'; interface SupportedSchema { /** diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts index 9734c89900960..aebe6ebf9b7c0 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/events.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { TypeOf } from '@kbn/config-schema'; -import { RequestHandler } from '@kbn/core/server'; -import { ResolverPaginatedEvents, SafeResolverEvent } from '../../../../common/endpoint/types'; -import { validateEvents } from '../../../../common/endpoint/schema/resolver'; +import type { TypeOf } from '@kbn/config-schema'; +import type { RequestHandler } from '@kbn/core/server'; +import type { ResolverPaginatedEvents, SafeResolverEvent } from '../../../../common/endpoint/types'; +import type { validateEvents } from '../../../../common/endpoint/schema/resolver'; import { EventsQuery } from './queries/events'; import { PaginationBuilder } from './utils/pagination'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts index 1dab8bd7e1ab3..ed712c2a05aba 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/queries/events.ts @@ -6,10 +6,10 @@ */ import type { IScopedClusterClient } from '@kbn/core/server'; -import { JsonObject } from '@kbn/utility-types'; +import type { JsonObject } from '@kbn/utility-types'; import { parseFilterQuery } from '../../../../utils/serialized_query'; -import { SafeResolverEvent } from '../../../../../common/endpoint/types'; -import { PaginationBuilder } from '../utils/pagination'; +import type { SafeResolverEvent } from '../../../../../common/endpoint/types'; +import type { PaginationBuilder } from '../utils/pagination'; interface TimeRange { from: string; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/handler.ts index 2d82c1eedf540..c608a1309511f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/handler.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { RequestHandler } from '@kbn/core/server'; -import { TypeOf } from '@kbn/config-schema'; -import { validateTree } from '../../../../../common/endpoint/schema/resolver'; +import type { RequestHandler } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import type { validateTree } from '../../../../../common/endpoint/schema/resolver'; import { Fetcher } from './utils/fetch'; export function handleTree(): RequestHandler> { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts index d4206dc853a3c..4b4f32259096b 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts @@ -6,10 +6,11 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IScopedClusterClient } from '@kbn/core/server'; -import { JsonObject, JsonValue } from '@kbn/utility-types'; -import { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types'; -import { NodeID, TimeRange, docValueFields, validIDs } from '../utils'; +import type { IScopedClusterClient } from '@kbn/core/server'; +import type { JsonObject, JsonValue } from '@kbn/utility-types'; +import type { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types'; +import type { NodeID, TimeRange } from '../utils'; +import { docValueFields, validIDs } from '../utils'; interface DescendantsParams { schema: ResolverSchema; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts index be5a34092e0c5..8a224c1641577 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { IScopedClusterClient } from '@kbn/core/server'; -import { JsonObject, JsonValue } from '@kbn/utility-types'; -import { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types'; -import { NodeID, TimeRange, docValueFields, validIDs } from '../utils'; +import type { IScopedClusterClient } from '@kbn/core/server'; +import type { JsonObject, JsonValue } from '@kbn/utility-types'; +import type { FieldsObject, ResolverSchema } from '../../../../../../common/endpoint/types'; +import type { NodeID, TimeRange } from '../utils'; +import { docValueFields, validIDs } from '../utils'; interface LifecycleParams { schema: ResolverSchema; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/stats.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/stats.ts index b4143345d9db4..2eb8d0e8d1cfd 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/stats.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/stats.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IScopedClusterClient } from '@kbn/core/server'; -import { JsonObject } from '@kbn/utility-types'; -import { EventStats, ResolverSchema } from '../../../../../../common/endpoint/types'; -import { NodeID, TimeRange } from '../utils'; +import type { IScopedClusterClient } from '@kbn/core/server'; +import type { JsonObject } from '@kbn/utility-types'; +import type { EventStats, ResolverSchema } from '../../../../../../common/endpoint/types'; +import type { NodeID, TimeRange } from '../utils'; interface AggBucket { key: string; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.test.ts index 59be8f76576dd..13a10fc5f40a3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { TreeOptions } from './fetch'; import { Fetcher, getAncestryAsArray, @@ -12,14 +13,13 @@ import { getLeafNodes, getNameField, getParentField, - TreeOptions, } from './fetch'; import { LifecycleQuery } from '../queries/lifecycle'; import { DescendantsQuery } from '../queries/descendants'; import { StatsQuery } from '../queries/stats'; -import { IScopedClusterClient } from '@kbn/core/server'; +import type { IScopedClusterClient } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -import { +import type { FieldsObject, ResolverNode, ResolverSchema, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.ts index add798f861c96..21a64a85928f0 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/fetch.ts @@ -5,19 +5,19 @@ * 2.0. */ -import { IScopedClusterClient } from '@kbn/core/server'; +import type { IScopedClusterClient } from '@kbn/core/server'; import { firstNonNullValue, values, } from '../../../../../../common/endpoint/models/ecs_safety_helpers'; -import { +import type { ECSField, ResolverNode, FieldsObject, ResolverSchema, } from '../../../../../../common/endpoint/types'; import { DescendantsQuery } from '../queries/descendants'; -import { NodeID } from '.'; +import type { NodeID } from '.'; import { LifecycleQuery } from '../queries/lifecycle'; import { StatsQuery } from '../queries/stats'; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/index.ts index b68f8b49db4bf..0c5d0827b4a87 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/utils/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ResolverSchema } from '../../../../../../common/endpoint/types'; +import type { ResolverSchema } from '../../../../../../common/endpoint/types'; /** * Represents a time range filter diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts index 8be5ff5427192..a44be24ef2fca 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.test.ts @@ -7,7 +7,7 @@ import { PaginationBuilder } from './pagination'; import { EndpointDocGenerator } from '../../../../../common/endpoint/generate_data'; -import { SafeEndpointEvent } from '../../../../../common/endpoint/types'; +import type { SafeEndpointEvent } from '../../../../../common/endpoint/types'; import { eventIDSafeVersion, timestampSafeVersion, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts index caa28abe1abfd..96086f1312f85 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/utils/pagination.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { JsonObject } from '@kbn/utility-types'; -import { SafeResolverEvent } from '../../../../../common/endpoint/types'; +import type { JsonObject } from '@kbn/utility-types'; +import type { SafeResolverEvent } from '../../../../../common/endpoint/types'; import { eventIDSafeVersion, timestampSafeVersion, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts index 34f2f7a434fbd..92ee8c9953ca9 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts @@ -6,10 +6,11 @@ */ import { coreMock, httpServerMock, loggingSystemMock } from '@kbn/core/server/mocks'; -import { RequestHandler } from '@kbn/core/server'; +import type { RequestHandler } from '@kbn/core/server'; import { requestContextMock } from '../../lib/detection_engine/routes/__mocks__'; -import { EndpointApiNeededAuthz, withEndpointAuthz } from './with_endpoint_authz'; -import { EndpointAuthz } from '../../../common/endpoint/types/authz'; +import type { EndpointApiNeededAuthz } from './with_endpoint_authz'; +import { withEndpointAuthz } from './with_endpoint_authz'; +import type { EndpointAuthz } from '../../../common/endpoint/types/authz'; import { EndpointAuthorizationError } from '../errors'; describe('When using `withEndpointAuthz()`', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/lists.mock.ts b/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/lists.mock.ts index 483abdadc616d..dfb541fe42e71 100644 --- a/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/lists.mock.ts +++ b/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/lists.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { WrappedTranslatedExceptionList } from './lists'; +import type { WrappedTranslatedExceptionList } from './lists'; export const getTranslatedExceptionListMock = (): WrappedTranslatedExceptionList => { return { diff --git a/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/saved_objects.mock.ts b/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/saved_objects.mock.ts index 7137c94ec71d2..1583a6c558369 100644 --- a/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/saved_objects.mock.ts +++ b/x-pack/plugins/security_solution/server/endpoint/schemas/artifacts/saved_objects.mock.ts @@ -7,7 +7,7 @@ import { buildArtifact, ArtifactConstants } from '../../lib/artifacts'; import { getTranslatedExceptionListMock } from './lists.mock'; -import { InternalManifestSchema, InternalArtifactCompleteSchema } from './saved_objects'; +import type { InternalManifestSchema, InternalArtifactCompleteSchema } from './saved_objects'; export const getInternalArtifactMock = async ( os: string, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.test.ts index 82cd5af08b6fe..c8aceb9e66d94 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.test.ts @@ -7,8 +7,8 @@ import type { ElasticsearchClientMock } from '@kbn/core/server/mocks'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { EndpointActionResponse, LogsEndpointAction, LogsEndpointActionResponse, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.ts index 8dfd2813baa15..041260687287c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_details_by_id.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { ENDPOINT_ACTIONS_INDEX } from '../../../../common/endpoint/constants'; import { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts index 8ee3aefeb17e9..d7ae86bdad0fd 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts @@ -7,8 +7,8 @@ import type { ElasticsearchClientMock } from '@kbn/core/server/mocks'; import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { EndpointActionResponse, LogsEndpointAction, LogsEndpointActionResponse, @@ -21,7 +21,7 @@ import { createActionRequestsEsSearchResultsMock, createActionResponsesEsSearchResultsMock, } from './mocks'; -import { MockedLogger } from '@kbn/logging-mocks'; +import type { MockedLogger } from '@kbn/logging-mocks'; describe('When using `getActionList()', () => { let esClient: ElasticsearchClientMock; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts index 0ac4aa7e43e25..0cde2fc59948a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; import { ENDPOINT_DEFAULT_PAGE_SIZE } from '../../../../common/endpoint/constants'; import { CustomHttpRequestError } from '../../../utils/custom_http_request_error'; import type { ActionDetails, ActionListApiResponse } from '../../../../common/endpoint/types'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/mocks.ts index 106e2db069cb4..d67807bf2cd83 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/mocks.ts @@ -5,12 +5,12 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ElasticsearchClientMock } from '@kbn/core/server/mocks'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ElasticsearchClientMock } from '@kbn/core/server/mocks'; import { AGENT_ACTIONS_RESULTS_INDEX } from '@kbn/fleet-plugin/common'; import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; import { FleetActionGenerator } from '../../../../common/endpoint/data_generators/fleet_action_generator'; -import { +import type { EndpointActionResponse, LogsEndpointAction, LogsEndpointActionResponse, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.test.ts index 92214d88dea15..86bd9331dd932 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/utils.test.ts @@ -29,7 +29,8 @@ import type { LogsEndpointActionResponse, } from '../../../../common/endpoint/types'; import uuid from 'uuid'; -import { mockAuditLogSearchResult, Results } from '../../routes/actions/mocks'; +import type { Results } from '../../routes/actions/mocks'; +import { mockAuditLogSearchResult } from '../../routes/actions/mocks'; describe('When using Actions service utilities', () => { let fleetActionGenerator: FleetActionGenerator; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts index 0161b9ccb12a2..48172a4600cd8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/artifact_client.ts @@ -5,9 +5,13 @@ * 2.0. */ -import { Artifact, ArtifactsClientInterface, ListArtifactsProps } from '@kbn/fleet-plugin/server'; -import { ListResult } from '@kbn/fleet-plugin/common'; -import { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; +import type { + Artifact, + ArtifactsClientInterface, + ListArtifactsProps, +} from '@kbn/fleet-plugin/server'; +import type { ListResult } from '@kbn/fleet-plugin/common'; +import type { InternalArtifactCompleteSchema } from '../../schemas/artifacts'; export interface EndpointArtifactClientInterface { getArtifact(id: string): Promise; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.test.ts index 511f0a08bcf91..7527eef7d01ab 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.test.ts @@ -6,7 +6,7 @@ */ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { ManifestSchemaVersion } from '../../../../common/endpoint/schema/common'; +import type { ManifestSchemaVersion } from '../../../../common/endpoint/schema/common'; import { ManifestConstants } from '../../lib/artifacts'; import { getInternalManifestMock } from '../../schemas/artifacts/saved_objects.mock'; import { getManifestClientMock } from './mocks'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.ts index e20cd1f8c9bf4..d2f0093c11812 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_client.ts @@ -5,18 +5,16 @@ * 2.0. */ -import { +import type { SavedObject, SavedObjectsClientContract, SavedObjectsUpdateResponse, } from '@kbn/core/server'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { - manifestSchemaVersion, - ManifestSchemaVersion, -} from '../../../../common/endpoint/schema/common'; +import type { ManifestSchemaVersion } from '../../../../common/endpoint/schema/common'; +import { manifestSchemaVersion } from '../../../../common/endpoint/schema/common'; import { ManifestConstants } from '../../lib/artifacts'; -import { InternalManifestSchema, InternalManifestCreateSchema } from '../../schemas/artifacts'; +import type { InternalManifestSchema, InternalManifestCreateSchema } from '../../schemas/artifacts'; interface UpdateManifestOpts { version: string; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts index 2928f35c721b5..9a702aeba140c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.mock.ts @@ -7,10 +7,10 @@ import LRU from 'lru-cache'; import { savedObjectsClientMock, loggingSystemMock } from '@kbn/core/server/mocks'; -import { Logger } from '@kbn/core/server'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; import { createPackagePolicyServiceMock } from '@kbn/fleet-plugin/server/mocks'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { @@ -21,7 +21,8 @@ import { getEmptyMockArtifacts, } from '../../../lib/artifacts/mocks'; import { createEndpointArtifactClientMock, getManifestClientMock } from '../mocks'; -import { ManifestManager, ManifestManagerContext } from './manifest_manager'; +import type { ManifestManagerContext } from './manifest_manager'; +import { ManifestManager } from './manifest_manager'; import { parseExperimentalConfigValue } from '../../../../../common/experimental_features'; export const createExceptionListResponse = (data: ExceptionListItemSchema[], total?: number) => ({ diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts index 324d3a1974cd4..f4b4559e08708 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts @@ -14,9 +14,9 @@ import { ENDPOINT_BLOCKLISTS_LIST_ID, } from '@kbn/securitysolution-list-constants'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models'; import { getEmptyInternalArtifactMock } from '../../../schemas/artifacts/saved_objects.mock'; -import { +import type { InternalArtifactCompleteSchema, InternalArtifactSchema, InternalManifestSchema, @@ -39,7 +39,7 @@ import { } from './manifest_manager.mock'; import { ManifestManager } from './manifest_manager'; -import { EndpointArtifactClientInterface } from '../artifact_client'; +import type { EndpointArtifactClientInterface } from '../artifact_client'; import { InvalidInternalManifestError } from '../errors'; import { EndpointError } from '../../../../../common/endpoint/errors'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index d1f744b3791c6..a843a6d325f6e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -7,39 +7,35 @@ import pMap from 'p-map'; import semver from 'semver'; -import LRU from 'lru-cache'; +import type LRU from 'lru-cache'; import { isEqual, isEmpty } from 'lodash'; -import { Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import type { Logger, SavedObjectsClientContract } from '@kbn/core/server'; import { ENDPOINT_EVENT_FILTERS_LIST_ID, ENDPOINT_TRUSTED_APPS_LIST_ID, ENDPOINT_BLOCKLISTS_LIST_ID, ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID, } from '@kbn/securitysolution-list-constants'; -import { ListResult } from '@kbn/fleet-plugin/common'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { ManifestSchemaVersion } from '../../../../../common/endpoint/schema/common'; -import { - manifestDispatchSchema, - ManifestSchema, -} from '../../../../../common/endpoint/schema/manifest'; - +import type { ListResult } from '@kbn/fleet-plugin/common'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ManifestSchemaVersion } from '../../../../../common/endpoint/schema/common'; +import type { ManifestSchema } from '../../../../../common/endpoint/schema/manifest'; +import { manifestDispatchSchema } from '../../../../../common/endpoint/schema/manifest'; + +import type { ArtifactListId } from '../../../lib/artifacts'; import { ArtifactConstants, buildArtifact, getArtifactId, getEndpointExceptionList, Manifest, - ArtifactListId, } from '../../../lib/artifacts'; -import { - InternalArtifactCompleteSchema, - internalArtifactCompleteSchema, -} from '../../../schemas/artifacts'; -import { EndpointArtifactClientInterface } from '../artifact_client'; +import type { InternalArtifactCompleteSchema } from '../../../schemas/artifacts'; +import { internalArtifactCompleteSchema } from '../../../schemas/artifacts'; +import type { EndpointArtifactClientInterface } from '../artifact_client'; import { ManifestClient } from '../manifest_client'; -import { ExperimentalFeatures } from '../../../../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; import { InvalidInternalManifestError } from '../errors'; import { wrapErrorIfNeeded } from '../../../utils'; import { EndpointError } from '../../../../../common/endpoint/errors'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts index bdaf93e7bea7f..5fa55f9a3cbba 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/mocks.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; // Because mocks are for testing only, should be ok to import the FleetArtifactsClient directly // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { FleetArtifactsClient } from '@kbn/fleet-plugin/server/services'; import { createArtifactsClientMock } from '@kbn/fleet-plugin/server/mocks'; -import { EndpointArtifactClient, EndpointArtifactClientInterface } from './artifact_client'; +import type { EndpointArtifactClientInterface } from './artifact_client'; +import { EndpointArtifactClient } from './artifact_client'; import { ManifestClient } from './manifest_client'; export const getManifestClientMock = ( diff --git a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/mocks.ts index 58a2fd51e4d05..1eb1b3b82371a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/mocks.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { FeatureUsageService } from './service'; -import { PolicyData } from '../../../../common/endpoint/types'; +import type { FeatureUsageService } from './service'; +import type { PolicyData } from '../../../../common/endpoint/types'; export function createFeatureUsageServiceMock() { return { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts index 53cb1b8ec2098..7b9edee253c87 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/feature_usage/service.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Values } from '@kbn/utility-types'; -import { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; +import type { Values } from '@kbn/utility-types'; +import type { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; const FEATURES = { HOST_ISOLATION: 'Host isolation', diff --git a/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts b/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts index 55b737b573fdb..5a141b38d88c1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { KibanaRequest, SavedObjectsClientContract, SavedObjectsServiceStart, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts index d8003d368e63e..adc41b3ec7df8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts @@ -5,13 +5,11 @@ * 2.0. */ -import { - createEndpointMetadataServiceTestContextMock, - EndpointMetadataServiceTestContextMock, -} from './mocks'; +import type { EndpointMetadataServiceTestContextMock } from './mocks'; +import { createEndpointMetadataServiceTestContextMock } from './mocks'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; +import type { ElasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; import { legacyMetadataSearchResponseMock, unitedMetadataSearchResponseMock, @@ -21,9 +19,9 @@ import { getESQueryHostMetadataByFleetAgentIds, buildUnitedIndexQuery, } from '../../routes/metadata/query_builders'; -import { HostMetadata } from '../../../../common/endpoint/types'; -import { Agent, PackagePolicy } from '@kbn/fleet-plugin/common'; -import { AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server/services'; +import type { HostMetadata } from '../../../../common/endpoint/types'; +import type { Agent, PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server/services'; import { EndpointError } from '../../../../common/endpoint/errors'; describe('EndpointMetadataService', () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts index 4b43d51a44c53..fc95c7a025393 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.ts @@ -5,22 +5,22 @@ * 2.0. */ -import { +import type { ElasticsearchClient, Logger, SavedObjectsClientContract, SavedObjectsServiceStart, } from '@kbn/core/server'; -import { SearchTotalHits, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; -import { Agent, AgentPolicy, PackagePolicy } from '@kbn/fleet-plugin/common'; -import { - AgentNotFoundError, +import type { SearchTotalHits, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { Agent, AgentPolicy, PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { AgentPolicyServiceInterface, PackagePolicyServiceInterface, } from '@kbn/fleet-plugin/server'; +import { AgentNotFoundError } from '@kbn/fleet-plugin/server'; import { getAgentStatus } from '@kbn/fleet-plugin/common/services/agent_status'; -import { +import type { HostInfo, HostMetadata, MaybeImmutable, @@ -53,9 +53,9 @@ import { import { createInternalReadonlySoClient } from '../../utils/create_internal_readonly_so_client'; import { METADATA_UNITED_INDEX } from '../../../../common/endpoint/constants'; import { getAllEndpointPackagePolicies } from '../../routes/metadata/support/endpoint_package_policies'; -import { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; +import type { GetMetadataListRequestQuery } from '../../../../common/endpoint/schema/metadata'; import { EndpointError } from '../../../../common/endpoint/errors'; -import { EndpointFleetServicesInterface } from '../fleet/endpoint_fleet_services_factory'; +import type { EndpointFleetServicesInterface } from '../fleet/endpoint_fleet_services_factory'; type AgentPolicyWithPackagePolicies = Omit & { package_policies: PackagePolicy[]; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts index 9e21c2c192b82..1f68552e999ae 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/metadata.ts @@ -6,8 +6,8 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { HostMetadata } from '../../../../common/endpoint/types'; -import { SecuritySolutionRequestHandlerContext } from '../../../types'; +import type { HostMetadata } from '../../../../common/endpoint/types'; +import type { SecuritySolutionRequestHandlerContext } from '../../../types'; import { getESQueryHostMetadataByIDs } from '../../routes/metadata/query_builders'; import { queryResponseToHostListResult } from '../../routes/metadata/support/query_strategies'; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts index ce9f6123635a9..ac97b51265d4e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsServiceStart } from '@kbn/core/server'; +import type { SavedObjectsServiceStart } from '@kbn/core/server'; import { loggingSystemMock, savedObjectsServiceMock } from '@kbn/core/server/mocks'; import { createMockAgentPolicyService, @@ -13,12 +13,10 @@ import { createMockPackageService, createPackagePolicyServiceMock, } from '@kbn/fleet-plugin/server/mocks'; -import { AgentPolicyServiceInterface, AgentService } from '@kbn/fleet-plugin/server'; +import type { AgentPolicyServiceInterface, AgentService } from '@kbn/fleet-plugin/server'; import { EndpointMetadataService } from './endpoint_metadata_service'; -import { - EndpointFleetServicesFactory, - EndpointInternalFleetServicesInterface, -} from '../fleet/endpoint_fleet_services_factory'; +import type { EndpointInternalFleetServicesInterface } from '../fleet/endpoint_fleet_services_factory'; +import { EndpointFleetServicesFactory } from '../fleet/endpoint_fleet_services_factory'; const createCustomizedPackagePolicyService = () => { const service = createPackagePolicyServiceMock(); diff --git a/x-pack/plugins/security_solution/server/endpoint/types.ts b/x-pack/plugins/security_solution/server/endpoint/types.ts index acf04c0b0527e..c93276aaec90a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/types.ts +++ b/x-pack/plugins/security_solution/server/endpoint/types.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { LoggerFactory } from '@kbn/core/server'; +import type { LoggerFactory } from '@kbn/core/server'; -import { ConfigType } from '../config'; -import { EndpointAppContextService } from './endpoint_app_context_services'; -import { HostMetadata } from '../../common/endpoint/types'; -import { ExperimentalFeatures } from '../../common/experimental_features'; +import type { ConfigType } from '../config'; +import type { EndpointAppContextService } from './endpoint_app_context_services'; +import type { HostMetadata } from '../../common/endpoint/types'; +import type { ExperimentalFeatures } from '../../common/experimental_features'; /** * The context for Endpoint apps. diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.test.ts b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.test.ts index 3552e1632b437..9ea0e66a510cd 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.test.ts @@ -6,7 +6,8 @@ */ import uuid from 'uuid'; -import { ScopedClusterClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; +import type { ScopedClusterClientMock } from '@kbn/core/server/mocks'; +import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { applyActionListEsSearchMock, createActionRequestsEsSearchResultsMock, diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts index 1dd4c8ffca7be..4af0da29e6307 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/action_list_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import type { SearchRequest } from '@kbn/data-plugin/public'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; @@ -20,7 +20,7 @@ import type { import { ACTIONS_SEARCH_PAGE_SIZE, ACTION_RESPONSE_INDICES } from '../services/actions/constants'; import { getDateFilters } from '../services/actions/utils'; import { catchAndWrapError } from './wrap_errors'; -import { GetActionDetailsListParam } from '../services/actions/action_list'; +import type { GetActionDetailsListParam } from '../services/actions/action_list'; const queryOptions = Object.freeze({ ignore: [404], diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.test.ts b/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.test.ts index ab453a574e89c..56d5396954536 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.test.ts @@ -6,7 +6,7 @@ */ import { savedObjectsServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { createInternalReadonlySoClient, InternalReadonlySoClientMethodNotAllowedError, diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.ts b/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.ts index 962abe330ea39..9866e866a7ea3 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/create_internal_readonly_so_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { KibanaRequest, SavedObjectsClientContract, SavedObjectsServiceStart, diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts b/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts index d87046b6ea0d1..c654b1a11a78c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/fleet_agent_status_to_endpoint_host_status.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AgentStatus } from '@kbn/fleet-plugin/common'; +import type { AgentStatus } from '@kbn/fleet-plugin/common'; import { HostStatus } from '../../../common/endpoint/types'; // For an understanding of how fleet agent status is calculated: diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.test.ts b/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.test.ts index eb53a5854c2aa..6abfbfb5ba7aa 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.test.ts @@ -11,7 +11,7 @@ import { savedObjectsClientMock, loggingSystemMock, } from '@kbn/core/server/mocks'; -import { SecuritySolutionRequestHandlerContext } from '../../types'; +import type { SecuritySolutionRequestHandlerContext } from '../../types'; import { createRouteHandlerContext } from '../mocks'; import { doLogsEndpointActionDsExists, diff --git a/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.ts b/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.ts index 9e94e4ba29c32..16abbcca7feac 100644 --- a/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.ts +++ b/x-pack/plugins/security_solution/server/endpoint/utils/yes_no_data_stream.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { SecuritySolutionRequestHandlerContext } from '../../types'; +import type { Logger } from '@kbn/core/server'; +import type { SecuritySolutionRequestHandlerContext } from '../../types'; export const doLogsEndpointActionDsExists = async ({ context, diff --git a/x-pack/plugins/security_solution/server/features.ts b/x-pack/plugins/security_solution/server/features.ts index d05c1b9710219..96ae8497ad19d 100644 --- a/x-pack/plugins/security_solution/server/features.ts +++ b/x-pack/plugins/security_solution/server/features.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; -import { KibanaFeatureConfig, SubFeatureConfig } from '@kbn/features-plugin/common'; +import type { KibanaFeatureConfig, SubFeatureConfig } from '@kbn/features-plugin/common'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common'; import { APP_ID, CASES_FEATURE_ID, SERVER_APP_ID } from '../common/constants'; diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts index 17bfa0d584f28..c93b8035aea8f 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; import { httpServerMock, loggingSystemMock } from '@kbn/core/server/mocks'; import { @@ -22,27 +22,27 @@ import { getPackagePolicyDeleteCallback, getPackagePolicyUpdateCallback, } from './fleet_integration'; -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { requestContextMock } from '../lib/detection_engine/routes/__mocks__'; import { requestContextFactoryMock } from '../request_context_factory.mock'; -import { EndpointAppContextServiceStartContract } from '../endpoint/endpoint_app_context_services'; +import type { EndpointAppContextServiceStartContract } from '../endpoint/endpoint_app_context_services'; import { createMockEndpointAppContextServiceStartContract } from '../endpoint/mocks'; import { licenseMock } from '@kbn/licensing-plugin/common/licensing.mock'; import { LicenseService } from '../../common/license'; import { Subject } from 'rxjs'; -import { ILicense } from '@kbn/licensing-plugin/common/types'; +import type { ILicense } from '@kbn/licensing-plugin/common/types'; import { EndpointDocGenerator } from '../../common/endpoint/generate_data'; import { ProtectionModes } from '../../common/endpoint/types'; import { getExceptionListClientMock } from '@kbn/lists-plugin/server/services/exception_lists/exception_list_client.mock'; import { getExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { InternalArtifactCompleteSchema } from '../endpoint/schemas/artifacts'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { InternalArtifactCompleteSchema } from '../endpoint/schemas/artifacts'; import { ManifestManager } from '../endpoint/services/artifacts/manifest_manager'; import { getMockArtifacts, toArtifactRecords } from '../endpoint/lib/artifacts/mocks'; import { Manifest } from '../endpoint/lib/artifacts'; -import { NewPackagePolicy } from '@kbn/fleet-plugin/common/types/models'; -import { ManifestSchema } from '../../common/endpoint/schema/manifest'; -import { DeletePackagePoliciesResponse } from '@kbn/fleet-plugin/common'; +import type { NewPackagePolicy } from '@kbn/fleet-plugin/common/types/models'; +import type { ManifestSchema } from '../../common/endpoint/schema/manifest'; +import type { DeletePackagePoliciesResponse } from '@kbn/fleet-plugin/common'; import { createMockPolicyData } from '../endpoint/services/feature_usage'; import { ALL_ENDPOINT_ARTIFACT_LIST_IDS } from '../../common/endpoint/service/artifacts/constants'; diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts index a67f08c92d4e4..e7f21716541cc 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts @@ -5,28 +5,28 @@ * 2.0. */ -import { KibanaRequest, Logger, RequestHandlerContext } from '@kbn/core/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; -import { +import type { KibanaRequest, Logger, RequestHandlerContext } from '@kbn/core/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; +import type { PostPackagePolicyCreateCallback, PostPackagePolicyDeleteCallback, PutPackagePolicyUpdateCallback, } from '@kbn/fleet-plugin/server'; -import { NewPackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/common'; +import type { NewPackagePolicy, UpdatePackagePolicy } from '@kbn/fleet-plugin/common'; -import { NewPolicyData, PolicyConfig } from '../../common/endpoint/types'; -import { LicenseService } from '../../common/license'; -import { ManifestManager } from '../endpoint/services'; -import { IRequestContextFactory } from '../request_context_factory'; +import type { NewPolicyData, PolicyConfig } from '../../common/endpoint/types'; +import type { LicenseService } from '../../common/license'; +import type { ManifestManager } from '../endpoint/services'; +import type { IRequestContextFactory } from '../request_context_factory'; import { installPrepackagedRules } from './handlers/install_prepackaged_rules'; import { createPolicyArtifactManifest } from './handlers/create_policy_artifact_manifest'; import { createDefaultPolicy } from './handlers/create_default_policy'; import { validatePolicyAgainstLicense } from './handlers/validate_policy_against_license'; import { removePolicyFromArtifacts } from './handlers/remove_policy_from_artifacts'; -import { FeatureUsageService } from '../endpoint/services/feature_usage/service'; -import { EndpointMetadataService } from '../endpoint/services/metadata'; +import type { FeatureUsageService } from '../endpoint/services/feature_usage/service'; +import type { EndpointMetadataService } from '../endpoint/services/metadata'; import { notifyProtectionFeatureUsage } from './notify_protection_feature_usage'; const isEndpointPackagePolicy = ( diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.ts index 461d82ff7c9d1..ab01467e75cee 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.ts @@ -9,8 +9,9 @@ import { policyFactory as policyConfigFactory, policyFactoryWithoutPaidFeatures as policyConfigFactoryWithoutPaidFeatures, } from '../../../common/endpoint/models/policy_config'; -import { isAtLeast, LicenseService } from '../../../common/license/license'; -import { PolicyConfig } from '../../../common/endpoint/types'; +import type { LicenseService } from '../../../common/license/license'; +import { isAtLeast } from '../../../common/license/license'; +import type { PolicyConfig } from '../../../common/endpoint/types'; /** * Create the default endpoint policy based on the current license diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_policy_artifact_manifest.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_policy_artifact_manifest.ts index 6fb356c1906f3..f5eb5065b069e 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_policy_artifact_manifest.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_policy_artifact_manifest.ts @@ -5,11 +5,13 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { ManifestManager } from '../../endpoint/services'; -import { Manifest, reportErrors } from '../../endpoint/lib/artifacts'; -import { InternalArtifactCompleteSchema } from '../../endpoint/schemas'; -import { manifestDispatchSchema, ManifestSchema } from '../../../common/endpoint/schema/manifest'; +import type { Manifest } from '../../endpoint/lib/artifacts'; +import { reportErrors } from '../../endpoint/lib/artifacts'; +import type { InternalArtifactCompleteSchema } from '../../endpoint/schemas'; +import type { ManifestSchema } from '../../../common/endpoint/schema/manifest'; +import { manifestDispatchSchema } from '../../../common/endpoint/schema/manifest'; const getManifest = async (logger: Logger, manifestManager: ManifestManager): Promise => { let manifest: Manifest | null = null; diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts index 609fb8a9554f5..da52432571f97 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { KibanaRequest, Logger } from '@kbn/core/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; +import type { KibanaRequest, Logger } from '@kbn/core/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; import { createDetectionIndex } from '../../lib/detection_engine/routes/index/create_index_route'; import { createPrepackagedRules } from '../../lib/detection_engine/routes/rules/add_prepackaged_rules_route'; -import { SecuritySolutionApiRequestHandlerContext } from '../../types'; +import type { SecuritySolutionApiRequestHandlerContext } from '../../types'; export interface InstallPrepackagedRulesProps { logger: Logger; diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts index ac666579faa2a..9f2dbf416dd80 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts @@ -7,8 +7,8 @@ import pMap from 'p-map'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { PostPackagePolicyDeleteCallback } from '@kbn/fleet-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { PostPackagePolicyDeleteCallback } from '@kbn/fleet-plugin/server'; import { ALL_ENDPOINT_ARTIFACT_LIST_IDS } from '../../../common/endpoint/service/artifacts/constants'; /** diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/validate_policy_against_license.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/validate_policy_against_license.ts index 97314d4a39803..4b19654b93ad4 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/validate_policy_against_license.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/validate_policy_against_license.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { isEndpointPolicyValidForLicense } from '../../../common/license/policy_config'; -import { PolicyConfig } from '../../../common/endpoint/types'; -import { LicenseService } from '../../../common/license'; +import type { PolicyConfig } from '../../../common/endpoint/types'; +import type { LicenseService } from '../../../common/license'; export const validatePolicyAgainstLicense = ( policyConfig: PolicyConfig, diff --git a/x-pack/plugins/security_solution/server/fleet_integration/notify_protection_feature_usage.ts b/x-pack/plugins/security_solution/server/fleet_integration/notify_protection_feature_usage.ts index 2d1618f8f0147..d860685e7cb3e 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/notify_protection_feature_usage.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/notify_protection_feature_usage.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { NewPackagePolicy } from '@kbn/fleet-plugin/common'; -import { PolicyConfig, PolicyOperatingSystem, ProtectionModes } from '../../common/endpoint/types'; -import { EndpointMetadataService } from '../endpoint/services/metadata'; -import { FeatureUsageService } from '../endpoint/services/feature_usage/service'; +import type { NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PolicyConfig, ProtectionModes } from '../../common/endpoint/types'; +import { PolicyOperatingSystem } from '../../common/endpoint/types'; +import type { EndpointMetadataService } from '../endpoint/services/metadata'; +import type { FeatureUsageService } from '../endpoint/services/feature_usage/service'; const OS_KEYS = Object.values(PolicyOperatingSystem); const PROTECTION_KEYS = ['memory_protection', 'behavior_protection'] as const; diff --git a/x-pack/plugins/security_solution/server/index.ts b/x-pack/plugins/security_solution/server/index.ts index ab133d6c0a4a6..6ef18f44809c8 100644 --- a/x-pack/plugins/security_solution/server/index.ts +++ b/x-pack/plugins/security_solution/server/index.ts @@ -5,9 +5,11 @@ * 2.0. */ -import { PluginInitializerContext, PluginConfigDescriptor } from '@kbn/core/server'; -import { Plugin, PluginSetup, PluginStart } from './plugin'; -import { configSchema, ConfigSchema, ConfigType } from './config'; +import type { PluginInitializerContext, PluginConfigDescriptor } from '@kbn/core/server'; +import type { PluginSetup, PluginStart } from './plugin'; +import { Plugin } from './plugin'; +import type { ConfigSchema, ConfigType } from './config'; +import { configSchema } from './config'; import { SIGNALS_INDEX_KEY } from '../common/constants'; import { AppClient } from './types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts index 10f2dbdd93d50..992bad6432cb4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; -import { SignalsReindexOptions } from '../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; +import type { ElasticsearchClient } from '@kbn/core/server'; +import type { SignalsReindexOptions } from '../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; import { createMigrationIndex } from './create_migration_index'; export interface CreatedMigration { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_index.ts index 00c6bc369dfc7..fb27d2dfd71aa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; /** * Creates the destination index to be used during the migration of a diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_saved_object.ts index 4bee5cbe6dd4a..c6171a1d28741 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/create_migration_saved_object.ts @@ -8,16 +8,15 @@ import { chain, tryCatch } from 'fp-ts/lib/TaskEither'; import { pipe } from 'fp-ts/lib/pipeable'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { validateTaskEither } from '@kbn/securitysolution-io-ts-utils'; import { toError, toPromise } from '@kbn/securitysolution-list-api'; import { signalsMigrationSOClient } from './saved_objects_client'; -import { - signalsMigrationSO, +import type { SignalsMigrationSO, - signalsMigrationSOCreateAttributes, SignalsMigrationSOCreateAttributes, } from './saved_objects_schema'; +import { signalsMigrationSO, signalsMigrationSOCreateAttributes } from './saved_objects_schema'; import { getIsoDateString } from './helpers'; const generateAttributes = (username: string) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.test.ts index 50fab4a3e1e02..eec35c259fc71 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { deleteMigration } from './delete_migration'; import { getSignalsMigrationSavedObjectMock } from './saved_objects_schema.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.ts index e1e4bfe0bc562..45098f8dea239 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { deleteMigrationSavedObject } from './delete_migration_saved_object'; import { isMigrationFailed, isMigrationPending, isMigrationSuccess } from './helpers'; import { applyMigrationCleanupPolicy } from './migration_cleanup'; -import { SignalsMigrationSO } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; /** * Deletes a completed migration: diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration_saved_object.ts index 97495c1e55ff1..16664269e47e0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/delete_migration_saved_object.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { signalsMigrationSOClient } from './saved_objects_client'; export const deleteMigrationSavedObject = async ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/finalize_migration.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/finalize_migration.ts index 21741de8775e8..e9ce2a4a641a6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/finalize_migration.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/finalize_migration.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { getIndexCount } from '@kbn/securitysolution-es-utils'; import { isMigrationPending } from './helpers'; import { applyMigrationCleanupPolicy } from './migration_cleanup'; import { replaceSignalsIndexAlias } from './replace_signals_index_alias'; -import { SignalsMigrationSO } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; import { updateMigrationSavedObject } from './update_migration_saved_object'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/find_migration_saved_objects.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/find_migration_saved_objects.ts index 8022b66ed465d..7abe376403645 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/find_migration_saved_objects.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/find_migration_saved_objects.ts @@ -8,10 +8,11 @@ import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { SavedObjectsClientContract, SavedObjectsFindOptions } from '@kbn/core/server'; +import type { SavedObjectsClientContract, SavedObjectsFindOptions } from '@kbn/core/server'; import { validateEither } from '@kbn/securitysolution-io-ts-utils'; import { signalsMigrationSOClient } from './saved_objects_client'; -import { SignalsMigrationSO, signalsMigrationSOs } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; +import { signalsMigrationSOs } from './saved_objects_schema'; export const findMigrationSavedObjects = async ({ options, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_index_versions_by_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_index_versions_by_index.ts index 49056eecb9454..4757ba49cadbf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_index_versions_by_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_index_versions_by_index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; export interface IndexMappingsResponse { [indexName: string]: { mappings: { _meta: { version: number } } }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_id.ts index cdae6104c2945..99342fcf74c2f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_id.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_id.ts @@ -8,10 +8,11 @@ import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { validateEither } from '@kbn/securitysolution-io-ts-utils'; import { signalsMigrationSOClient } from './saved_objects_client'; -import { SignalsMigrationSO, signalsMigrationSOs } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; +import { signalsMigrationSOs } from './saved_objects_schema'; class MigrationResponseError extends Error { public readonly statusCode: number; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_index.ts index 62f748a03547c..44c387430e7e9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_migration_saved_objects_by_index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { findMigrationSavedObjects } from './find_migration_saved_objects'; -import { SignalsMigrationSO } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; export interface MigrationsByIndex { [indexName: string]: SignalsMigrationSO[] | undefined; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signal_versions_by_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signal_versions_by_index.ts index 665bbe86d6b9f..5bed307b69164 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signal_versions_by_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signal_versions_by_index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; export interface SignalVersionsAggResponse { aggregations: { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.test.ts index 7d77dddc9a7f0..00bdd874b09a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { getSignalsIndicesInRange } from './get_signals_indices_in_range'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.ts index 24eb70dde03f6..bc178c71c183e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/get_signals_indices_in_range.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; interface IndexesResponse { aggregations: { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/helpers.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/helpers.ts index 0626926de8f25..f23a803353e08 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/helpers.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SignalsMigrationSO } from './saved_objects_schema'; -import { SignalVersion } from './get_signal_versions_by_index'; +import type { SignalsMigrationSO } from './saved_objects_schema'; +import type { SignalVersion } from './get_signal_versions_by_index'; export const isMigrationPending = (migration: SignalsMigrationSO): boolean => migration.attributes.status === 'pending'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_cleanup.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_cleanup.ts index ab6a13c96985a..f32aee3ff32ed 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_cleanup.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_cleanup.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import migrationCleanupPolicy from './migration_cleanup_policy.json'; export const getMigrationCleanupPolicyName = (alias: string): string => diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.mock.ts index 66828390392e4..3f80302ab087c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SignalsMigrationService } from './migration_service'; +import type { SignalsMigrationService } from './migration_service'; const create = () => ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.ts index 9c35adba92a2e..e3d30bfb17c6c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/migration_service.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { SignalsReindexOptions } from '../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; -import { SignalsMigrationSO } from './saved_objects_schema'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { SignalsReindexOptions } from '../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; import { createMigrationSavedObject } from './create_migration_saved_object'; import { createMigration } from './create_migration'; import { finalizeMigration } from './finalize_migration'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/replace_signals_index_alias.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/replace_signals_index_alias.ts index 211e81d0168bd..ad77e64a55ac7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/replace_signals_index_alias.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/replace_signals_index_alias.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; /** * Updates aliases for the old and new concrete indexes specified, respectively diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects.ts index 7bcc30798806f..8a168d3c43ba0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; export const signalsMigrationType = 'security-solution-signals-migration'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.mock.ts index ee15775c5cc24..3a9b8324b3f92 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SignalsMigrationSOClient } from './saved_objects_client'; +import type { SignalsMigrationSOClient } from './saved_objects_client'; const create = () => ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.ts index fe3801cf24276..1ae2dcbb6c995 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { SavedObjectsClientContract, SavedObject, SavedObjectsUpdateResponse, @@ -16,7 +16,7 @@ import { SavedObjectsBaseOptions, } from '@kbn/core/server'; import { signalsMigrationType } from './saved_objects'; -import { SignalsMigrationSOAttributes } from './saved_objects_schema'; +import type { SignalsMigrationSOAttributes } from './saved_objects_schema'; export interface SignalsMigrationSOClient { bulkGet: ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_schema.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_schema.mock.ts index 9c6eea8df84ac..7226803ddf761 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_schema.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/saved_objects_schema.mock.ts @@ -6,7 +6,7 @@ */ import { signalsMigrationType } from './saved_objects'; -import { SignalsMigrationSO } from './saved_objects_schema'; +import type { SignalsMigrationSO } from './saved_objects_schema'; export const getSignalsMigrationSavedObjectMock = ( overrides: Partial = {} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.test.ts index ed4ebea7dfb93..c0b283e4ee29c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.test.ts @@ -6,7 +6,7 @@ */ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { SignalsMigrationSOUpdateAttributes } from './saved_objects_schema'; +import type { SignalsMigrationSOUpdateAttributes } from './saved_objects_schema'; import { getSignalsMigrationSavedObjectMock } from './saved_objects_schema.mock'; import { updateMigrationSavedObject } from './update_migration_saved_object'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.ts index a4268895498cc..7aca3ad51ff67 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/migrations/update_migration_saved_object.ts @@ -8,14 +8,12 @@ import { chain, tryCatch } from 'fp-ts/lib/TaskEither'; import { pipe } from 'fp-ts/lib/pipeable'; -import { SavedObjectsClientContract, SavedObjectsUpdateResponse } from '@kbn/core/server'; +import type { SavedObjectsClientContract, SavedObjectsUpdateResponse } from '@kbn/core/server'; import { validateTaskEither } from '@kbn/securitysolution-io-ts-utils'; import { toError, toPromise } from '@kbn/securitysolution-list-api'; import { signalsMigrationSOClient } from './saved_objects_client'; -import { - SignalsMigrationSOUpdateAttributes, - signalsMigrationSOUpdateAttributes, -} from './saved_objects_schema'; +import type { SignalsMigrationSOUpdateAttributes } from './saved_objects_schema'; +import { signalsMigrationSOUpdateAttributes } from './saved_objects_schema'; import { getIsoDateString } from './helpers'; export const updateMigrationSavedObject = async ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts index a3c22273ed140..ab202170e5764 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/get_signals.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import type { SignalSearchResponse, SignalSource } from '../signals/types'; import { buildSignalsSearchQuery } from './build_signals_query'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_create_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_create_notifications.ts index e82b19faa40bd..5db2759ad88da 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_create_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_create_notifications.ts @@ -5,10 +5,13 @@ * 2.0. */ -import { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { SERVER_APP_ID, LEGACY_NOTIFICATIONS_ID } from '../../../../common/constants'; // eslint-disable-next-line no-restricted-imports -import { CreateNotificationParams, LegacyRuleNotificationAlertTypeParams } from './legacy_types'; +import type { + CreateNotificationParams, + LegacyRuleNotificationAlertTypeParams, +} from './legacy_types'; /** * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_find_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_find_notifications.ts index 919af2a131046..ba2f3e54dd9dc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_find_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_find_notifications.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { RuleTypeParams, FindResult } from '@kbn/alerting-plugin/server'; +import type { RuleTypeParams, FindResult } from '@kbn/alerting-plugin/server'; import { LEGACY_NOTIFICATIONS_ID } from '../../../../common/constants'; // eslint-disable-next-line no-restricted-imports -import { LegacyFindNotificationParams } from './legacy_types'; +import type { LegacyFindNotificationParams } from './legacy_types'; /** * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_read_notifications.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_read_notifications.ts index 3e28ac879e2c3..187cde7ce8c9d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_read_notifications.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_read_notifications.ts @@ -5,9 +5,11 @@ * 2.0. */ -import { RuleTypeParams, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RuleTypeParams, SanitizedRule } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line no-restricted-imports -import { LegacyReadNotificationParams, legacyIsAlertType } from './legacy_types'; +import type { LegacyReadNotificationParams } from './legacy_types'; +// eslint-disable-next-line no-restricted-imports +import { legacyIsAlertType } from './legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyFindNotifications } from './legacy_find_notifications'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.test.ts index 16ce9c7d2a3e2..89d760c4e6eeb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.test.ts @@ -6,14 +6,15 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { getRuleMock } from '../routes/__mocks__/request_responses'; // eslint-disable-next-line no-restricted-imports import { legacyRulesNotificationAlertType } from './legacy_rules_notification_alert_type'; import { buildSignalsSearchQuery } from './build_signals_query'; // eslint-disable-next-line no-restricted-imports -import { LegacyNotificationExecutorOptions } from './legacy_types'; +import type { LegacyNotificationExecutorOptions } from './legacy_types'; import { sampleDocSearchResultsNoSortIdNoVersion, sampleDocSearchResultsWithSortId, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.ts index 55e7b69610501..880882df04af2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_rules_notification_alert_type.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { parseScheduleDates } from '@kbn/securitysolution-io-ts-utils'; import { DEFAULT_RULE_NOTIFICATION_QUERY_SIZE, @@ -14,11 +14,10 @@ import { } from '../../../../common/constants'; // eslint-disable-next-line no-restricted-imports -import { - LegacyNotificationAlertTypeDefinition, - legacyRulesNotificationParams, -} from './legacy_types'; -import { AlertAttributes } from '../signals/types'; +import type { LegacyNotificationAlertTypeDefinition } from './legacy_types'; +// eslint-disable-next-line no-restricted-imports +import { legacyRulesNotificationParams } from './legacy_types'; +import type { AlertAttributes } from '../signals/types'; import { siemRuleActionGroups } from '../signals/siem_rule_action_groups'; import { scheduleNotificationActions } from './schedule_notification_actions'; import { getNotificationResultsLink } from './utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.test.ts index f7b97b884a381..fe5705f848760 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyExtractReferences } from './legacy_extract_references'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.ts index 1d883cc21cdb0..069017fcabbcb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_references.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { RuleParamsAndRefs } from '@kbn/alerting-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { RuleParamsAndRefs } from '@kbn/alerting-plugin/server'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyExtractRuleId } from './legacy_extract_rule_id'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.test.ts index 05c923a01fc52..ce6e6fb3b45fc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyExtractRuleId } from './legacy_extract_rule_id'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.ts index c223b08b5170c..38b86a006ec27 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_extract_rule_id.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports import { legacyGetRuleReference } from '../../rule_actions/legacy_utils'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; /** * This extracts the "ruleAlertId" "id" and returns it as a saved object reference. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.test.ts index 214164063c5f2..d3d77e0bd55b3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.test.ts @@ -6,10 +6,10 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyInjectReferences } from './legacy_inject_references'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.ts index 8af032f8b099b..b89acc4363a50 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_references.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyInjectRuleIdReferences } from './legacy_inject_rule_id_references'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.test.ts index 52a0d6019bfaa..3dbb39895523e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.test.ts @@ -6,12 +6,12 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports import { legacyInjectRuleIdReferences } from './legacy_inject_rule_id_references'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; describe('legacy_inject_rule_id_references', () => { type FuncReturn = ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.ts index da76a562a940e..bb5b8ef81b763 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_saved_object_references/legacy_inject_rule_id_references.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesNotificationParams } from '../legacy_types'; +import type { LegacyRulesNotificationParams } from '../legacy_types'; /** * This injects any legacy "id"'s from saved object reference and returns the "ruleAlertId" using the saved object reference. If for diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_types.ts index 417740ecdea5a..a3516d2caa7f0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/legacy_types.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; -import { +import type { RulesClient, PartialRule, RuleType, @@ -17,7 +18,7 @@ import { AlertInstanceContext, RuleExecutorOptions, } from '@kbn/alerting-plugin/server'; -import { Rule, RuleAction } from '@kbn/alerting-plugin/common'; +import type { Rule, RuleAction } from '@kbn/alerting-plugin/common'; import { LEGACY_NOTIFICATIONS_ID } from '../../../../common/constants'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts index fa9b5cab1bfd7..39364d766726d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.test.ts @@ -5,12 +5,11 @@ * 2.0. */ -import { RuleExecutorServicesMock, alertsMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { sampleThresholdAlert } from '../rule_types/__mocks__/threshold'; -import { - NotificationRuleTypeParams, - scheduleNotificationActions, -} from './schedule_notification_actions'; +import type { NotificationRuleTypeParams } from './schedule_notification_actions'; +import { scheduleNotificationActions } from './schedule_notification_actions'; describe('schedule_notification_actions', () => { const alertServices: RuleExecutorServicesMock = alertsMock.createRuleExecutorServices(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts index 80ed63663a4d0..8d17b871bd14a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_notification_actions.ts @@ -6,12 +6,12 @@ */ import { mapKeys, snakeCase } from 'lodash/fp'; -import { Alert } from '@kbn/alerting-plugin/server'; +import type { Alert } from '@kbn/alerting-plugin/server'; import { expandDottedObject } from '../../../../common/utils/expand_dotted'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { RuleParams } from '../schemas/rule_schemas'; import aadFieldConversion from '../routes/index/signal_aad_mapping.json'; import { isDetectionAlert } from '../signals/utils'; -import { DetectionAlert } from '../../../../common/detection_engine/schemas/alerts'; +import type { DetectionAlert } from '../../../../common/detection_engine/schemas/alerts'; export type NotificationRuleTypeParams = RuleParams & { id: string; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.test.ts index cd672af86032b..7857fb202fbd2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.test.ts @@ -8,10 +8,8 @@ import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { scheduleThrottledNotificationActions } from './schedule_throttle_notification_actions'; -import { - NotificationRuleTypeParams, - scheduleNotificationActions, -} from './schedule_notification_actions'; +import type { NotificationRuleTypeParams } from './schedule_notification_actions'; +import { scheduleNotificationActions } from './schedule_notification_actions'; jest.mock('./schedule_notification_actions', () => ({ scheduleNotificationActions: jest.fn(), diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.ts index 64701060a5418..90bc88a7ccb56 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/schedule_throttle_notification_actions.ts @@ -5,18 +5,16 @@ * 2.0. */ -import { ElasticsearchClient, SavedObject, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient, SavedObject, Logger } from '@kbn/core/server'; import { parseScheduleDates } from '@kbn/securitysolution-io-ts-utils'; -import { Alert } from '@kbn/alerting-plugin/server'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { Alert } from '@kbn/alerting-plugin/server'; +import type { RuleParams } from '../schemas/rule_schemas'; import { deconflictSignalsAndResults, getNotificationResultsLink } from './utils'; import { DEFAULT_RULE_NOTIFICATION_QUERY_SIZE } from '../../../../common/constants'; import { getSignals } from './get_signals'; -import { - NotificationRuleTypeParams, - scheduleNotificationActions, -} from './schedule_notification_actions'; -import { AlertAttributes } from '../signals/types'; +import type { NotificationRuleTypeParams } from './schedule_notification_actions'; +import { scheduleNotificationActions } from './schedule_notification_actions'; +import type { AlertAttributes } from '../signals/types'; interface ScheduleThrottledNotificationActionsOptions { id: SavedObject['id']; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts index 96ea4362b3338..d281cc9ae977b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SignalSource } from '../signals/types'; +import type { SignalSource } from '../signals/types'; import { deconflictSignalsAndResults, getNotificationResultsLink } from './utils'; describe('utils', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts index e376d7941fa36..560ec11cbef19 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/notifications/utils.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { APP_PATH } from '../../../../common/constants'; -import { SignalSearchResponse } from '../signals/types'; +import type { SignalSearchResponse } from '../signals/types'; export const getNotificationResultsLink = ({ kibanaSiemAppUrl = APP_PATH, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index 73c855326a0ac..0f20d04fc5f7c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -10,8 +10,8 @@ import type { MockedKeys } from '@kbn/utility-types-jest'; import type { KibanaRequest } from '@kbn/core/server'; import { coreMock } from '@kbn/core/server/mocks'; -import { ActionsApiRequestHandlerContext } from '@kbn/actions-plugin/server'; -import { AlertingApiRequestHandlerContext } from '@kbn/alerting-plugin/server'; +import type { ActionsApiRequestHandlerContext } from '@kbn/actions-plugin/server'; +import type { AlertingApiRequestHandlerContext } from '@kbn/alerting-plugin/server'; import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; // See: https://github.com/elastic/kibana/issues/117255, the moduleNameMapper creates mocks to avoid memory leaks from kibana core. @@ -34,7 +34,7 @@ import type { } from '../../../../types'; import { getEndpointAuthzInitialStateMock } from '../../../../../common/endpoint/service/authz'; -import { EndpointAuthz } from '../../../../../common/endpoint/types/authz'; +import type { EndpointAuthz } from '../../../../../common/endpoint/types/authz'; export const createMockClients = () => { const core = coreMock.createRequestHandlerContext(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts index 9f4670e3c252a..ae1dae64fa724 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_responses.ts @@ -9,9 +9,9 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_WORKFLOW_STATUS } from '@kbn/rule-data-utils'; import { ruleTypeMappings } from '@kbn/securitysolution-rules'; -import { SavedObjectsFindResponse, SavedObjectsFindResult } from '@kbn/core/server'; +import type { SavedObjectsFindResponse, SavedObjectsFindResult } from '@kbn/core/server'; -import { ActionResult } from '@kbn/actions-plugin/server'; +import type { ActionResult } from '@kbn/actions-plugin/server'; import { DETECTION_ENGINE_RULES_URL, DETECTION_ENGINE_SIGNALS_STATUS_URL, @@ -26,32 +26,32 @@ import { DETECTION_ENGINE_RULES_BULK_DELETE, DETECTION_ENGINE_RULES_BULK_CREATE, } from '../../../../../common/constants'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; -import { RuleAlertType, HapiReadableStream } from '../../rules/types'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { RuleAlertType, HapiReadableStream } from '../../rules/types'; import { requestMock } from './request'; -import { QuerySignalsSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_signals_index_schema'; -import { SetSignalsStatusSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/set_signal_status_schema'; +import type { QuerySignalsSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_signals_index_schema'; +import type { SetSignalsStatusSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/set_signal_status_schema'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; import { getFinalizeSignalsMigrationSchemaMock } from '../../../../../common/detection_engine/schemas/request/finalize_signals_migration_schema.mock'; -import { EqlSearchResponse } from '../../../../../common/detection_engine/types'; +import type { EqlSearchResponse } from '../../../../../common/detection_engine/types'; import { getSignalsMigrationStatusSchemaMock } from '../../../../../common/detection_engine/schemas/request/get_signals_migration_status_schema.mock'; -import { RuleParams } from '../../schemas/rule_schemas'; -import { SanitizedRule, ResolvedSanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RuleParams } from '../../schemas/rule_schemas'; +import type { SanitizedRule, ResolvedSanitizedRule } from '@kbn/alerting-plugin/common'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; import { getPerformBulkActionSchemaMock, getPerformBulkActionEditSchemaMock, } from '../../../../../common/detection_engine/schemas/request/perform_bulk_action_schema.mock'; -import { +import type { RuleExecutionEvent, - RuleExecutionStatus, RuleExecutionSummary, } from '../../../../../common/detection_engine/schemas/common'; +import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; // eslint-disable-next-line no-restricted-imports import type { LegacyRuleNotificationAlertType } from '../../notifications/legacy_types'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributes } from '../../rule_actions/legacy_types'; -import { RuleExecutionSummariesByRuleId } from '../../rule_execution_log'; +import type { LegacyIRuleActionsAttributes } from '../../rule_actions/legacy_types'; +import type { RuleExecutionSummariesByRuleId } from '../../rule_execution_log'; export const typicalSetStatusSignalByIdsPayload = (): SetSignalsStatusSchemaDecoded => ({ signal_ids: ['somefakeid1', 'somefakeid2'], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts index ef2a3016e5f91..5a95c7a09d5b6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/server.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { RequestHandler, RouteConfig, KibanaRequest } from '@kbn/core/server'; +import type { RequestHandler, RouteConfig, KibanaRequest } from '@kbn/core/server'; import { httpServiceMock } from '@kbn/core/server/mocks'; import { requestContextMock } from './request_context'; import { responseMock as responseFactoryMock } from './response_factory'; import { requestMock } from '.'; import { responseAdapter } from './test_adapters'; -import { SecuritySolutionRequestHandlerContext } from '../../../../types'; +import type { SecuritySolutionRequestHandlerContext } from '../../../../types'; interface Route { config: RouteConfig; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts index bfbd396851cd8..9da1573738d82 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/test_adapters.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { responseMock } from './response_factory'; +import type { responseMock } from './response_factory'; type ResponseMock = ReturnType; type Method = keyof ResponseMock; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts index 54bf6133f9e37..ccd0eb5c80fe6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/utils.ts @@ -7,8 +7,8 @@ import { Readable } from 'stream'; -import { HapiReadableStream } from '../../rules/types'; -import { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; +import type { HapiReadableStream } from '../../rules/types'; +import type { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; import { getListArrayMock } from '../../../../../common/detection_engine/schemas/types/lists.mock'; import { getThreatMock } from '../../../../../common/detection_engine/schemas/types/threat.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts index 7dbc67e6125b0..50c89f989f990 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { initPromisePool } from '../../../../../utils/promise_pool'; import { buildSiemResponse } from '../../utils'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { DETECTION_ENGINE_INSTALLED_INTEGRATIONS_URL } from '../../../../../../common/constants'; -import { GetInstalledIntegrationsResponse } from '../../../../../../common/detection_engine/schemas/response/get_installed_integrations_response_schema'; +import type { GetInstalledIntegrationsResponse } from '../../../../../../common/detection_engine/schemas/response/get_installed_integrations_response_schema'; import { createInstalledIntegrationSet } from './installed_integration_set'; const MAX_CONCURRENT_REQUESTS_TO_PACKAGE_REGISTRY = 5; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts index 092435a07f360..d55b8fdce3a3f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/fleet/get_installed_integrations/installed_integration_set.ts @@ -6,8 +6,8 @@ */ import { capitalize, flatten } from 'lodash'; -import { PackagePolicy, RegistryPackage } from '@kbn/fleet-plugin/common'; -import { +import type { PackagePolicy, RegistryPackage } from '@kbn/fleet-plugin/common'; +import type { InstalledIntegration, InstalledIntegrationArray, InstalledIntegrationBasicInfo, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/check_template_version.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/check_template_version.ts index 3a2afef665cf4..0245015fa2018 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/check_template_version.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/check_template_version.ts @@ -6,7 +6,7 @@ */ import { get } from 'lodash'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { isOutdated } from '../../migrations/helpers'; import { ALIAS_VERSION_FIELD, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts index 9879d4f83cfbd..20e5afba17f4e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/create_index_route.ts @@ -7,7 +7,7 @@ import { chunk, get } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { transformError, getBootstrapIndexExists, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_index_version.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_index_version.ts index ea9c36a4f8f41..df14055b1960a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_index_version.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/get_index_version.ts @@ -7,7 +7,7 @@ import { get } from 'lodash'; import { readIndex } from '@kbn/securitysolution-es-utils'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; export const getIndexVersion = async ( esClient: ElasticsearchClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts index c03f8e000d0f1..973ef902117ba 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_index_route.ts @@ -6,7 +6,7 @@ */ import { transformError, getBootstrapIndexExists } from '@kbn/securitysolution-es-utils'; -import { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import type { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_INDEX_URL } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts index 911eb988b39e1..f56a1a4be67d3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.test.ts @@ -13,10 +13,10 @@ import { getBasicEmptySearchResponse, } from '../__mocks__/request_responses'; import { requestContextMock, serverMock } from '../__mocks__'; -import { AddPrepackagedRulesSchema } from '../../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from '../../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; import { addPrepackedRulesRoute, createPrepackagedRules } from './add_prepackaged_rules_route'; import { listMock } from '@kbn/lists-plugin/server/mocks'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { installPrepackagedTimelines } from '../../../timeline/routes/prepackaged_timelines/install_prepackaged_timelines'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts index b46dcec9f5155..e2c982a923020 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/add_prepackaged_rules_route.ts @@ -8,17 +8,15 @@ import moment from 'moment'; import { transformError } from '@kbn/securitysolution-es-utils'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import type { SecuritySolutionApiRequestHandlerContext, SecuritySolutionPluginRouter, } from '../../../../types'; -import { - PrePackagedRulesAndTimelinesSchema, - prePackagedRulesAndTimelinesSchema, -} from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_schema'; +import type { PrePackagedRulesAndTimelinesSchema } from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_schema'; +import { prePackagedRulesAndTimelinesSchema } from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_schema'; import { importTimelineResultSchema } from '../../../../../common/types/timeline'; import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts index a68a8febb603e..b6bdba6fca3bd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_bulk_route.ts @@ -6,13 +6,13 @@ */ import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { createRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/create_rules_type_dependents'; import { createRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/create_rules_bulk_schema'; import { rulesBulkSchema } from '../../../../../common/detection_engine/schemas/response/rules_bulk_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_BULK_CREATE } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { readRules } from '../../rules/read_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts index 11e5f34fbe9a6..7d4e88f3868d0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/create_rules_route.ts @@ -8,7 +8,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts index 273d65a5f021b..2a459dd7c2941 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_bulk_route.ts @@ -10,10 +10,8 @@ import { validate } from '@kbn/securitysolution-io-ts-utils'; import type { RouteConfig, RequestHandler, Logger } from '@kbn/core/server'; import { queryRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/query_rules_type_dependents'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { - queryRulesBulkSchema, - QueryRulesBulkSchemaDecoded, -} from '../../../../../common/detection_engine/schemas/request/query_rules_bulk_schema'; +import type { QueryRulesBulkSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_rules_bulk_schema'; +import { queryRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/query_rules_bulk_schema'; import { rulesBulkSchema } from '../../../../../common/detection_engine/schemas/response/rules_bulk_schema'; import type { SecuritySolutionPluginRouter, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts index beb2cf94c047a..2ad26472b699a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/delete_rules_route.ts @@ -7,10 +7,8 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { queryRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/query_rules_type_dependents'; -import { - queryRulesSchema, - QueryRulesSchemaDecoded, -} from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; +import type { QueryRulesSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; +import { queryRulesSchema } from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts index f21df4556327a..145ab6217d2ab 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/export_rules_route.ts @@ -6,17 +6,19 @@ */ import { transformError } from '@kbn/securitysolution-es-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; +import type { + ExportRulesQuerySchemaDecoded, + ExportRulesSchemaDecoded, +} from '../../../../../common/detection_engine/schemas/request/export_rules_schema'; import { exportRulesQuerySchema, - ExportRulesQuerySchemaDecoded, exportRulesSchema, - ExportRulesSchemaDecoded, } from '../../../../../common/detection_engine/schemas/request/export_rules_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { ConfigType } from '../../../../config'; +import type { ConfigType } from '../../../../config'; import { getNonPackagedRulesCount } from '../../rules/get_existing_prepackaged_rules'; import { getExportByObjectIds } from '../../rules/get_export_by_object_ids'; import { getExportAll } from '../../rules/get_export_all'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts index eac8c4a5001d7..4f5621440a92b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts @@ -6,12 +6,10 @@ */ import { transformError } from '@kbn/securitysolution-es-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { findRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/find_rules_type_dependents'; -import { - findRulesSchema, - FindRulesSchemaDecoded, -} from '../../../../../common/detection_engine/schemas/request/find_rules_schema'; +import type { FindRulesSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/find_rules_schema'; +import { findRulesSchema } from '../../../../../common/detection_engine/schemas/request/find_rules_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; import { findRules } from '../../rules/find_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts index 2883d9af0f9ed..5853aecf13021 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.test.ts @@ -13,7 +13,7 @@ import { getPrepackagedRulesStatusRequest, } from '../__mocks__/request_responses'; import { requestContextMock, serverMock, createMockConfig } from '../__mocks__'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { checkTimelinesStatus } from '../../../timeline/utils/check_timelines_status'; import { mockCheckTimelinesStatusBeforeInstallResult, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts index 0f70a12e463cf..e2c67f8de1b57 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_prepackaged_rules_status_route.ts @@ -7,10 +7,8 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { - PrePackagedRulesAndTimelinesStatusSchema, - prePackagedRulesAndTimelinesStatusSchema, -} from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_status_schema'; +import type { PrePackagedRulesAndTimelinesStatusSchema } from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_status_schema'; +import { prePackagedRulesAndTimelinesStatusSchema } from '../../../../../common/detection_engine/schemas/response/prepackaged_rules_status_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_PREPACKAGED_URL } from '../../../../../common/constants'; import { buildSiemResponse } from '../utils'; @@ -22,8 +20,8 @@ import { getLatestPrepackagedRules } from '../../rules/get_prepackaged_rules'; import { getExistingPrepackagedRules } from '../../rules/get_existing_prepackaged_rules'; import { ruleAssetSavedObjectsClientFactory } from '../../rules/rule_asset/rule_asset_saved_objects_client'; import { buildFrameworkRequest } from '../../../timeline/utils/common'; -import { ConfigType } from '../../../../config'; -import { SetupPlugins } from '../../../../plugin'; +import type { ConfigType } from '../../../../config'; +import type { SetupPlugins } from '../../../../plugin'; import { checkTimelinesStatus, checkTimelineStatusRt, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_rule_execution_events_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_rule_execution_events_route.ts index 6bd6610c9c912..1cfb7871dbf0f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_rule_execution_events_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/get_rule_execution_events_route.ts @@ -6,7 +6,7 @@ */ import { transformError } from '@kbn/securitysolution-es-utils'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../utils'; import type { SecuritySolutionPluginRouter } from '../../../../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts index d42b099097c32..578ba7786780b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.test.ts @@ -14,7 +14,8 @@ import { getFindResultWithSingleHit, getBasicEmptySearchResponse, } from '../__mocks__/request_responses'; -import { createMockConfig, requestContextMock, serverMock, requestMock } from '../__mocks__'; +import type { requestMock } from '../__mocks__'; +import { createMockConfig, requestContextMock, serverMock } from '../__mocks__'; import { mlServicesMock, mlAuthzMock as mockMlAuthzFactory } from '../../../machine_learning/mocks'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { importRulesRoute } from './import_rules_route'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts index 51c494b183b88..958993b34c03b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/import_rules_route.ts @@ -12,24 +12,18 @@ import { createPromiseFromStreams } from '@kbn/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { ImportQuerySchemaDecoded, importQuerySchema } from '@kbn/securitysolution-io-ts-types'; +import type { ImportQuerySchemaDecoded } from '@kbn/securitysolution-io-ts-types'; +import { importQuerySchema } from '@kbn/securitysolution-io-ts-types'; -import { - ImportRulesSchema as ImportRulesResponseSchema, - importRulesSchema as importRulesResponseSchema, -} from '../../../../../common/detection_engine/schemas/response/import_rules_schema'; +import type { ImportRulesSchema as ImportRulesResponseSchema } from '../../../../../common/detection_engine/schemas/response/import_rules_schema'; +import { importRulesSchema as importRulesResponseSchema } from '../../../../../common/detection_engine/schemas/response/import_rules_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { ConfigType } from '../../../../config'; -import { SetupPlugins } from '../../../../plugin'; +import type { ConfigType } from '../../../../config'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; -import { - ImportRuleResponse, - BulkError, - isBulkError, - isImportRegular, - buildSiemResponse, -} from '../utils'; +import type { ImportRuleResponse, BulkError } from '../utils'; +import { isBulkError, isImportRegular, buildSiemResponse } from '../utils'; import { getTupleDuplicateErrorsAndUniqueRules, @@ -38,14 +32,12 @@ import { } from './utils'; import { createRulesAndExceptionsStreamFromNdJson } from '../../rules/create_rules_stream_from_ndjson'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { HapiReadableStream } from '../../rules/types'; -import { - importRules as importRulesHelper, - RuleExceptionsPromiseFromStreams, -} from './utils/import_rules_utils'; +import type { HapiReadableStream } from '../../rules/types'; +import type { RuleExceptionsPromiseFromStreams } from './utils/import_rules_utils'; +import { importRules as importRulesHelper } from './utils/import_rules_utils'; import { getReferencedExceptionLists } from './utils/gather_referenced_exceptions'; import { importRuleExceptions } from './utils/import_rule_exceptions'; -import { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; const CHUNK_PARSED_OBJECT_SIZE = 50; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/legacy_create_legacy_notification.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/legacy_create_legacy_notification.ts index ffccedb691db4..e6d98ed4f8195 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/legacy_create_legacy_notification.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/legacy_create_legacy_notification.ts @@ -6,7 +6,7 @@ */ import { schema } from '@kbn/config-schema'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { SecuritySolutionPluginRouter } from '../../../../types'; // eslint-disable-next-line no-restricted-imports @@ -14,7 +14,7 @@ import { legacyUpdateOrCreateRuleActionsSavedObject } from '../../rule_actions/l // eslint-disable-next-line no-restricted-imports import { legacyReadNotifications } from '../../notifications/legacy_read_notifications'; // eslint-disable-next-line no-restricted-imports -import { LegacyRuleNotificationAlertTypeParams } from '../../notifications/legacy_types'; +import type { LegacyRuleNotificationAlertTypeParams } from '../../notifications/legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyCreateNotifications } from '../../notifications/legacy_create_notifications'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts index bb4ba585dccaf..aeff52f61cfbf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_bulk_route.ts @@ -6,13 +6,13 @@ */ import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { patchRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/patch_rules_bulk_schema'; import { buildRouteValidationNonExact } from '../../../../utils/build_validation/route_validation'; import { rulesBulkSchema } from '../../../../../common/detection_engine/schemas/response/rules_bulk_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_BULK_UPDATE } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { transformBulkError, buildSiemResponse } from '../utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts index eb6132ae3e1e4..f6f2ff03efa25 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/patch_rules_route.ts @@ -11,7 +11,7 @@ import { buildRouteValidationNonExact } from '../../../../utils/build_validation import { patchRulesSchema } from '../../../../../common/detection_engine/schemas/request/patch_rules_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { patchRules } from '../../rules/patch_rules'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts index 0a848d30d9a5b..27ad55b7b0179 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/perform_bulk_action_route.ts @@ -8,12 +8,12 @@ import { truncate } from 'lodash'; import moment from 'moment'; import { BadRequestError, transformError } from '@kbn/securitysolution-es-utils'; -import { KibanaResponseFactory, Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import type { KibanaResponseFactory, Logger, SavedObjectsClientContract } from '@kbn/core/server'; import type { RulesClient, BulkEditError } from '@kbn/alerting-plugin/server'; -import { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; -import { RuleAlertType } from '../../rules/types'; +import type { RuleAlertType } from '../../rules/types'; import { DETECTION_ENGINE_RULES_BULK_ACTION, @@ -22,15 +22,12 @@ import { } from '../../../../../common/constants'; import { BulkAction } from '../../../../../common/detection_engine/schemas/common/schemas'; import { performBulkActionSchema } from '../../../../../common/detection_engine/schemas/request/perform_bulk_action_schema'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { routeLimitedConcurrencyTag } from '../../../../utils/route_limited_concurrency_tag'; -import { - initPromisePool, - PromisePoolError, - PromisePoolOutcome, -} from '../../../../utils/promise_pool'; +import type { PromisePoolError, PromisePoolOutcome } from '../../../../utils/promise_pool'; +import { initPromisePool } from '../../../../utils/promise_pool'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { deleteRules } from '../../rules/delete_rules'; @@ -42,7 +39,7 @@ import { getExportByObjectIds } from '../../rules/get_export_by_object_ids'; import { buildSiemResponse } from '../utils'; import { internalRuleToAPIResponse } from '../../schemas/rule_converters'; import { legacyMigrate } from '../../rules/utils'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; const MAX_RULES_TO_PROCESS_TOTAL = 10000; const MAX_ERROR_MESSAGE_LENGTH = 1000; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts index 8fe7f9cc3a5fa..477153828417b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/preview_rules_route.ts @@ -8,26 +8,25 @@ import moment from 'moment'; import uuid from 'uuid'; import { transformError } from '@kbn/securitysolution-es-utils'; import type { StartServicesAccessor } from '@kbn/core/server'; -import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; -import { +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleTypeState, - parseDuration, } from '@kbn/alerting-plugin/common'; +import { parseDuration } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ExecutorType } from '@kbn/alerting-plugin/server/types'; -import { Alert } from '@kbn/alerting-plugin/server'; -import type { StartPlugins } from '../../../../plugin'; +import type { ExecutorType } from '@kbn/alerting-plugin/server/types'; +import type { Alert } from '@kbn/alerting-plugin/server'; +import type { StartPlugins, SetupPlugins } from '../../../../plugin'; import { buildSiemResponse } from '../utils'; import { convertCreateAPIToInternalSchema } from '../../schemas/rule_converters'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { createPreviewRuleExecutionLogger } from '../../signals/preview/preview_rule_execution_logger'; import { parseInterval } from '../../signals/utils'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { SetupPlugins } from '../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { createRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/create_rules_type_dependents'; import { @@ -35,15 +34,13 @@ import { DETECTION_ENGINE_RULES_PREVIEW, } from '../../../../../common/constants'; import { wrapScopedClusterClient } from './utils/wrap_scoped_cluster_client'; -import { - previewRulesSchema, - RulePreviewLogs, -} from '../../../../../common/detection_engine/schemas/request'; +import type { RulePreviewLogs } from '../../../../../common/detection_engine/schemas/request'; +import { previewRulesSchema } from '../../../../../common/detection_engine/schemas/request'; import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; -import { ConfigType } from '../../../../config'; +import type { ConfigType } from '../../../../config'; import { alertInstanceFactoryStub } from '../../signals/preview/alert_instance_factory_stub'; -import { CreateRuleOptions, CreateSecurityRuleTypeWrapperProps } from '../../rule_types/types'; +import type { CreateRuleOptions, CreateSecurityRuleTypeWrapperProps } from '../../rule_types/types'; import { createEqlAlertType, createIndicatorMatchAlertType, @@ -53,7 +50,7 @@ import { } from '../../rule_types'; import { createSecurityRuleTypeWrapper } from '../../rule_types/create_security_rule_type_wrapper'; import { RULE_PREVIEW_INVOCATION_COUNT } from '../../../../../common/detection_engine/constants'; -import { RuleExecutionContext, StatusChangeArgs } from '../../rule_execution_log'; +import type { RuleExecutionContext, StatusChangeArgs } from '../../rule_execution_log'; import { wrapSearchSourceClient } from './utils/wrap_search_source_client'; const PREVIEW_TIMEOUT_SECONDS = 60; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts index 37af66b50c6bb..b19e94b6f0484 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/read_rules_route.ts @@ -6,12 +6,10 @@ */ import { transformError } from '@kbn/securitysolution-es-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { queryRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/query_rules_type_dependents'; -import { - queryRulesSchema, - QueryRulesSchemaDecoded, -} from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; +import type { QueryRulesSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; +import { queryRulesSchema } from '../../../../../common/detection_engine/schemas/request/query_rules_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts index e0c9289a562e7..09e4dacec09de 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.test.ts @@ -17,7 +17,7 @@ import { } from '../__mocks__/request_responses'; import { serverMock, requestContextMock, requestMock } from '../__mocks__'; import { updateRulesBulkRoute } from './update_rules_bulk_route'; -import { BulkError } from '../utils'; +import type { BulkError } from '../utils'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; import { getQueryRuleParams } from '../../schemas/rule_schemas.mock'; import { loggingSystemMock } from '@kbn/core/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts index a9f27331dafb9..d949a4bb9f5f9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_bulk_route.ts @@ -6,14 +6,14 @@ */ import { validate } from '@kbn/securitysolution-io-ts-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { updateRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/update_rules_type_dependents'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { updateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/update_rules_bulk_schema'; import { rulesBulkSchema } from '../../../../../common/detection_engine/schemas/response/rules_bulk_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_BULK_UPDATE } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { getIdBulkError } from './utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts index 2234de0ff73af..81d77e1e2eb71 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/update_rules_route.ts @@ -10,7 +10,7 @@ import { updateRulesSchema } from '../../../../../common/detection_engine/schema import { updateRuleValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/update_rules_type_dependents'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_RULES_URL } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildMlAuthz } from '../../../machine_learning/authz'; import { throwAuthzError } from '../../../machine_learning/validation'; import { buildSiemResponse } from '../utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts index 6f3891a2c1dfb..dd9d7ef74cb30 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.test.ts @@ -7,7 +7,7 @@ import { Readable } from 'stream'; import { createPromiseFromStreams } from '@kbn/utils'; -import { Action, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Action, ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; import { getIdError, @@ -22,15 +22,16 @@ import { migrateLegacyActionsIds, } from './utils'; import { getRuleMock } from '../__mocks__/request_responses'; -import { PartialFilter } from '../../types'; -import { BulkError, createBulkErrorObject } from '../utils'; +import type { PartialFilter } from '../../types'; +import type { BulkError } from '../utils'; +import { createBulkErrorObject } from '../utils'; import { getOutputRuleAlertForRest } from '../__mocks__/utils'; -import { PartialRule } from '@kbn/alerting-plugin/server'; +import type { PartialRule } from '@kbn/alerting-plugin/server'; import { createRulesAndExceptionsStreamFromNdJson } from '../../rules/create_rules_stream_from_ndjson'; -import { RuleAlertType } from '../../rules/types'; -import { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { RuleAlertType } from '../../rules/types'; +import type { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; import { getCreateRulesSchemaMock } from '../../../../../common/detection_engine/schemas/request/rule_schemas.mock'; -import { CreateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request'; +import type { CreateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request'; import { getMlRuleParams, getQueryRuleParams, @@ -40,10 +41,10 @@ import { internalRuleToAPIResponse } from '../../schemas/rule_converters'; import { requestContextMock } from '../__mocks__'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports -import { LegacyRuleAlertAction } from '../../rule_actions/legacy_types'; -import { RuleExceptionsPromiseFromStreams } from './utils/import_rules_utils'; +import type { LegacyRuleAlertAction } from '../../rule_actions/legacy_types'; +import type { RuleExceptionsPromiseFromStreams } from './utils/import_rules_utils'; import { partition } from 'lodash/fp'; type PromiseFromStreams = ImportRulesSchema | Error; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts index 15c7c551f699f..857b0df46ba24 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils.ts @@ -7,23 +7,25 @@ import { countBy, partition } from 'lodash/fp'; import uuid from 'uuid'; -import { Action } from '@kbn/securitysolution-io-ts-alerting-types'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { Action } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import pMap from 'p-map'; -import { PartialRule, FindResult } from '@kbn/alerting-plugin/server'; -import { ActionsClient, FindActionResult } from '@kbn/actions-plugin/server'; -import { RuleExecutionSummary } from '../../../../../common/detection_engine/schemas/common'; -import { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; -import { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; -import { CreateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/create_rules_bulk_schema'; -import { RuleAlertType, isAlertType } from '../../rules/types'; -import { createBulkErrorObject, BulkError, OutputError } from '../utils'; +import type { PartialRule, FindResult } from '@kbn/alerting-plugin/server'; +import type { ActionsClient, FindActionResult } from '@kbn/actions-plugin/server'; +import type { RuleExecutionSummary } from '../../../../../common/detection_engine/schemas/common'; +import type { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; +import type { ImportRulesSchema } from '../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { CreateRulesBulkSchema } from '../../../../../common/detection_engine/schemas/request/create_rules_bulk_schema'; +import type { RuleAlertType } from '../../rules/types'; +import { isAlertType } from '../../rules/types'; +import type { BulkError, OutputError } from '../utils'; +import { createBulkErrorObject } from '../utils'; import { internalRuleToAPIResponse } from '../../schemas/rule_converters'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; -import { RuleExecutionSummariesByRuleId } from '../../rule_execution_log'; +import type { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; +import type { RuleExecutionSummariesByRuleId } from '../../rule_execution_log'; type PromiseFromStreams = ImportRulesSchema | Error; const MAX_CONCURRENT_SEARCHES = 10; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_rule_exception_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_rule_exception_references.ts index 4ad7dc51821cd..a92d7e4ec1723 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_rule_exception_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/check_rule_exception_references.ts @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ListArray, ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ListArray, ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; -import { BulkError, createBulkErrorObject } from '../../utils'; +import type { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { BulkError } from '../../utils'; +import { createBulkErrorObject } from '../../utils'; /** * Helper to check if all the exception lists referenced on a diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/deprecation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/deprecation.ts index 9145eb50f80d7..314d7db33fcef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/deprecation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/deprecation.ts @@ -6,7 +6,7 @@ */ import { getDocLinks } from '@kbn/doc-links'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../../common/constants'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.test.ts index 5206e85e8fdb2..62c591abc5e9d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; import { findExceptionList } from '@kbn/lists-plugin/server/services/exception_lists/find_exception_list'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts index 5158b361bdd64..268c5448d7fe2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/gather_referenced_exceptions.ts @@ -4,14 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ExceptionListSchema, ListArray } from '@kbn/securitysolution-io-ts-list-types'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { ExceptionListSchema, ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +// eslint-disable-next-line @kbn/eslint/no-restricted-paths +import type { ExceptionListQueryInfo } from '@kbn/lists-plugin/server/services/exception_lists/utils/import/find_all_exception_list_types'; import { - ExceptionListQueryInfo, getAllListTypes, // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '@kbn/lists-plugin/server/services/exception_lists/utils/import/find_all_exception_list_types'; -import { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; /** * Helper that takes rules, goes through their referenced exception lists and diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rule_exceptions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rule_exceptions.ts index f2487df4f6615..0829816a6a6d1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rule_exceptions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rule_exceptions.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { +import type { ImportExceptionsListSchema, ImportExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; /** * Util to call into exceptions list client import logic diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rules_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rules_utils.ts index 3a69febefbeea..49d85307cac06 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rules_utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/import_rules_utils.ts @@ -5,22 +5,23 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { ImportExceptionsListSchema, ImportExceptionListItemSchema, ExceptionListSchema, } from '@kbn/securitysolution-io-ts-list-types'; -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { legacyMigrate } from '../../../rules/utils'; -import { createBulkErrorObject, ImportRuleResponse } from '../../utils'; +import type { ImportRuleResponse } from '../../utils'; +import { createBulkErrorObject } from '../../utils'; import { createRules } from '../../../rules/create_rules'; import { readRules } from '../../../rules/read_rules'; import { patchRules } from '../../../rules/patch_rules'; -import { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; -import { MlAuthz } from '../../../../machine_learning/authz'; +import type { ImportRulesSchema } from '../../../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { MlAuthz } from '../../../../machine_learning/authz'; import { throwAuthzError } from '../../../../machine_learning/validation'; import { checkRuleExceptionReferences } from './check_rule_exception_references'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.test.ts index 2c355661ecfba..551562c6b6e9f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Client } from '@elastic/elasticsearch'; +import type { Client } from '@elastic/elasticsearch'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { wrapScopedClusterClient } from './wrap_scoped_cluster_client'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.ts index da6264e756ad9..e813f1caf16ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_scoped_cluster_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { TransportRequestOptions, TransportResult, TransportRequestOptionsWithMeta, @@ -20,7 +20,7 @@ import type { SearchRequest as SearchRequestWithBody, AggregationsAggregate, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IScopedClusterClient, ElasticsearchClient } from '@kbn/core/server'; +import type { IScopedClusterClient, ElasticsearchClient } from '@kbn/core/server'; interface WrapScopedClusterClientOpts { scopedClusterClient: IScopedClusterClient; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts index c8fff85476957..371e49d26db96 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ISearchStartSearchSource } from '@kbn/data-plugin/common'; +import type { ISearchStartSearchSource } from '@kbn/data-plugin/common'; import { createSearchSourceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { of, throwError } from 'rxjs'; import { wrapSearchSourceClient } from './wrap_search_source_client'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts index 619a4dee788f7..7c85e2fcf28ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/utils/wrap_search_source_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ISearchOptions, ISearchSource, ISearchStartSearchSource, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts index 833361e7e22bf..fb038ebabe08e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.test.ts @@ -6,8 +6,8 @@ */ import { transformValidate, transformValidateBulkError } from './validate'; -import { BulkError } from '../utils'; -import { RulesSchema } from '../../../../../common/detection_engine/schemas/response'; +import type { BulkError } from '../utils'; +import type { RulesSchema } from '../../../../../common/detection_engine/schemas/response'; import { getRuleMock, getRuleExecutionSummarySucceeded } from '../__mocks__/request_responses'; import { getListArrayMock } from '../../../../../common/detection_engine/schemas/types/lists.mock'; import { getThreatMock } from '../../../../../common/detection_engine/schemas/types/threat.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts index 852c06ba394f9..cdecd3abf5960 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/validate.ts @@ -7,22 +7,19 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; -import { PartialRule } from '@kbn/alerting-plugin/server'; -import { RuleExecutionSummary } from '../../../../../common/detection_engine/schemas/common'; -import { - FullResponseSchema, - fullResponseSchema, -} from '../../../../../common/detection_engine/schemas/request'; -import { - RulesSchema, - rulesSchema, -} from '../../../../../common/detection_engine/schemas/response/rules_schema'; +import type { PartialRule } from '@kbn/alerting-plugin/server'; +import type { RuleExecutionSummary } from '../../../../../common/detection_engine/schemas/common'; +import type { FullResponseSchema } from '../../../../../common/detection_engine/schemas/request'; +import { fullResponseSchema } from '../../../../../common/detection_engine/schemas/request'; +import type { RulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; +import { rulesSchema } from '../../../../../common/detection_engine/schemas/response/rules_schema'; import { isAlertType } from '../../rules/types'; -import { createBulkErrorObject, BulkError } from '../utils'; +import type { BulkError } from '../utils'; +import { createBulkErrorObject } from '../utils'; import { transform } from './utils'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from '../../rule_actions/legacy_get_rule_actions_saved_object'; import { internalRuleToAPIResponse } from '../../schemas/rule_converters'; export const transformValidate = ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts index b02d93ef63d1d..6b7d28bc63e10 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.test.ts @@ -6,8 +6,8 @@ */ import { requestMock, serverMock } from '../__mocks__'; -import { SetupPlugins } from '../../../../plugin'; -import { SignalsReindexOptions } from '../../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; +import type { SetupPlugins } from '../../../../plugin'; +import type { SignalsReindexOptions } from '../../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { getCreateSignalsMigrationSchemaMock } from '../../../../../common/detection_engine/schemas/request/create_signals_migration_schema.mock'; import { getIndexVersionsByIndex } from '../../migrations/get_index_versions_by_index'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts index df4ff25e9c640..5166aafc1c4a7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts @@ -7,7 +7,7 @@ import { transformError, BadRequestError, getIndexAliases } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { createSignalsMigrationSchema } from '../../../../../common/detection_engine/schemas/request/create_signals_migration_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts index f94aff365f496..f25364820a0f4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts @@ -7,7 +7,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_MIGRATION_URL } from '../../../../../common/constants'; import { deleteSignalsMigrationSchema } from '../../../../../common/detection_engine/schemas/request/delete_signals_migration_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts index 79fc38e21c7ce..341cff93ccc63 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.test.ts @@ -6,12 +6,12 @@ */ import { serverMock } from '../__mocks__'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { getFinalizeSignalsMigrationRequest } from '../__mocks__/request_responses'; import { getMigrationSavedObjectsById } from '../../migrations/get_migration_saved_objects_by_id'; import { getSignalsMigrationSavedObjectMock } from '../../migrations/saved_objects_schema.mock'; import { finalizeSignalsMigrationRoute } from './finalize_signals_migration_route'; -import { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import type { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; import { ruleDataServiceMock } from '@kbn/rule-registry-plugin/server/rule_data_plugin_service/rule_data_plugin_service.mock'; jest.mock('../../migrations/get_migration_saved_objects_by_id'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts index 6029ad8e86bbc..539dd6af4c9e5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts @@ -6,9 +6,9 @@ */ import { transformError, BadRequestError } from '@kbn/securitysolution-es-utils'; -import { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import type { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { DETECTION_ENGINE_SIGNALS_FINALIZE_MIGRATION_URL } from '../../../../../common/constants'; import { finalizeSignalsMigrationSchema } from '../../../../../common/detection_engine/schemas/request/finalize_signals_migration_schema'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts index 5a46d7a9b55f6..50c6cc8878723 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals.test.ts @@ -15,7 +15,7 @@ import { getSuccessfulSignalUpdateResponse, } from '../__mocks__/request_responses'; import { requestContextMock, serverMock, requestMock } from '../__mocks__'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { createMockTelemetryEventsSender } from '../../../telemetry/__mocks__'; import { setSignalsStatusRoute } from './open_close_signals_route'; import { loggingSystemMock } from '@kbn/core/server/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts index 63b90ccc4cfc7..9681d22d91198 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/open_close_signals_route.ts @@ -8,21 +8,19 @@ import { get } from 'lodash'; import { transformError } from '@kbn/securitysolution-es-utils'; import { ALERT_WORKFLOW_STATUS } from '@kbn/rule-data-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { setSignalStatusValidateTypeDependents } from '../../../../../common/detection_engine/schemas/request/set_signal_status_type_dependents'; -import { - SetSignalsStatusSchemaDecoded, - setSignalsStatusSchema, -} from '../../../../../common/detection_engine/schemas/request/set_signal_status_schema'; +import type { SetSignalsStatusSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/set_signal_status_schema'; +import { setSignalsStatusSchema } from '../../../../../common/detection_engine/schemas/request/set_signal_status_schema'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DEFAULT_ALERTS_INDEX, DETECTION_ENGINE_SIGNALS_STATUS_URL, } from '../../../../../common/constants'; import { buildSiemResponse } from '../utils'; -import { ITelemetryEventsSender } from '../../../telemetry/sender'; +import type { ITelemetryEventsSender } from '../../../telemetry/sender'; import { INSIGHTS_CHANNEL } from '../../../telemetry/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { getSessionIDfromKibanaRequest, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts index 7b8216084ac9d..1fe70f170b0fa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts @@ -5,18 +5,16 @@ * 2.0. */ -import { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import type { SecuritySolutionPluginRouter } from '../../../../types'; import { DETECTION_ENGINE_QUERY_SIGNALS_URL } from '../../../../../common/constants'; import { buildSiemResponse } from '../utils'; import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; -import { - querySignalsSchema, - QuerySignalsSchemaDecoded, -} from '../../../../../common/detection_engine/schemas/request/query_signals_index_schema'; +import type { QuerySignalsSchemaDecoded } from '../../../../../common/detection_engine/schemas/request/query_signals_index_schema'; +import { querySignalsSchema } from '../../../../../common/detection_engine/schemas/request/query_signals_index_schema'; export const querySignalsRoute = ( router: SecuritySolutionPluginRouter, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route.ts index 01a99028d1ec0..077aa561ef82d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { SECURITY_TELEMETRY_URL } from '../../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../../types'; -import { ITelemetryReceiver } from '../../../telemetry/receiver'; -import { ITelemetryEventsSender } from '../../../telemetry/sender'; +import type { ITelemetryReceiver } from '../../../telemetry/receiver'; +import type { ITelemetryEventsSender } from '../../../telemetry/sender'; import { getDetectionRulesPreview } from './utils/get_detecton_rules_preview'; import { getSecurityListsPreview } from './utils/get_security_lists_preview'; import { getEndpointPreview } from './utils/get_endpoint_preview'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_detecton_rules_preview.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_detecton_rules_preview.ts index 2372cb515b4fa..5797164e8b2ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_detecton_rules_preview.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_detecton_rules_preview.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { PreviewTelemetryEventsSender } from '../../../../telemetry/preview_sender'; -import { ITelemetryReceiver } from '../../../../telemetry/receiver'; -import { ITelemetryEventsSender } from '../../../../telemetry/sender'; +import type { ITelemetryReceiver } from '../../../../telemetry/receiver'; +import type { ITelemetryEventsSender } from '../../../../telemetry/sender'; import { createTelemetryDetectionRuleListsTaskConfig } from '../../../../telemetry/tasks/detection_rule'; import { parseNdjson } from './parse_ndjson'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_diagnostics_preview.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_diagnostics_preview.ts index 4fb6ca22070e5..f065d140d8556 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_diagnostics_preview.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_diagnostics_preview.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { PreviewTelemetryEventsSender } from '../../../../telemetry/preview_sender'; -import { ITelemetryReceiver } from '../../../../telemetry/receiver'; -import { ITelemetryEventsSender } from '../../../../telemetry/sender'; +import type { ITelemetryReceiver } from '../../../../telemetry/receiver'; +import type { ITelemetryEventsSender } from '../../../../telemetry/sender'; import { createTelemetryDiagnosticsTaskConfig } from '../../../../telemetry/tasks/diagnostic'; import { parseNdjson } from './parse_ndjson'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_endpoint_preview.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_endpoint_preview.ts index 5e37baadd02d7..008a9d9b1d89d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_endpoint_preview.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_endpoint_preview.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { PreviewTelemetryEventsSender } from '../../../../telemetry/preview_sender'; -import { ITelemetryReceiver } from '../../../../telemetry/receiver'; -import { ITelemetryEventsSender } from '../../../../telemetry/sender'; +import type { ITelemetryReceiver } from '../../../../telemetry/receiver'; +import type { ITelemetryEventsSender } from '../../../../telemetry/sender'; import { createTelemetryEndpointTaskConfig } from '../../../../telemetry/tasks/endpoint'; import { parseNdjson } from './parse_ndjson'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_security_lists_preview.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_security_lists_preview.ts index a0a35e2d01088..4cb9fec83ff58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_security_lists_preview.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/telemetry/utils/get_security_lists_preview.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { PreviewTelemetryEventsSender } from '../../../../telemetry/preview_sender'; -import { ITelemetryReceiver } from '../../../../telemetry/receiver'; -import { ITelemetryEventsSender } from '../../../../telemetry/sender'; +import type { ITelemetryReceiver } from '../../../../telemetry/receiver'; +import type { ITelemetryEventsSender } from '../../../../telemetry/sender'; import { createTelemetrySecurityListTaskConfig } from '../../../../telemetry/tasks/security_lists'; import { parseNdjson } from './parse_ndjson'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts index d9845f85b2935..da0bc90c9e4df 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.test.ts @@ -6,7 +6,8 @@ */ import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { transformBulkError, BulkError, convertToSnakeCase, SiemResponseFactory } from './utils'; +import type { BulkError } from './utils'; +import { transformBulkError, convertToSnakeCase, SiemResponseFactory } from './utils'; import { responseMock } from './__mocks__'; import { CustomHttpRequestError } from '../../../utils/custom_http_request_error'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts index 9246beea7bb7d..7d822733b4da5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/utils.ts @@ -8,7 +8,7 @@ import { has, snakeCase } from 'lodash/fp'; import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { +import type { RouteValidationFunction, KibanaResponseFactory, CustomHttpResponseOptions, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.test.ts index 514f1b3096ee0..61bea17db1156 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.test.ts @@ -10,7 +10,7 @@ import { savedObjectsClientMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line no-restricted-imports import { legacyCreateRuleActionsSavedObject } from './legacy_create_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; describe('legacy_create_rule_actions_saved_object', () => { let savedObjectsClient: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.ts index 974aa41b25473..6b2052518ad7e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_create_rule_actions_saved_object.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { SavedObjectReference } from '@kbn/core/server'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { SavedObjectReference } from '@kbn/core/server'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyGetActionReference, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.test.ts index 92db1aa2a265e..6caca1b085be7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.test.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { SavedObjectsFindOptions, SavedObjectsFindResult } from '@kbn/core/server'; +import type { SavedObjectsFindOptions, SavedObjectsFindResult } from '@kbn/core/server'; import { loggingSystemMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line no-restricted-imports import { legacyGetBulkRuleActionsSavedObject } from './legacy_get_bulk_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; describe('legacy_get_bulk_rule_actions_saved_object', () => { let savedObjectsClient: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts index 944c7cd5c2cf8..e827bd4fe14e5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_bulk_rule_actions_saved_object.ts @@ -6,17 +6,17 @@ */ import { chunk } from 'lodash'; -import { SavedObjectsFindOptionsReference, Logger } from '@kbn/core/server'; +import type { SavedObjectsFindOptionsReference, Logger } from '@kbn/core/server'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; // eslint-disable-next-line no-restricted-imports import { legacyGetRuleActionsFromSavedObject } from './legacy_utils'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; import { initPromisePool } from '../../../utils/promise_pool'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.test.ts index d1798c4065b49..1f598f0ccf78b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.test.ts @@ -5,18 +5,17 @@ * 2.0. */ -import { SavedObjectsFindOptions, SavedObjectsFindResult } from '@kbn/core/server'; +import type { SavedObjectsFindOptions, SavedObjectsFindResult } from '@kbn/core/server'; import { loggingSystemMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line no-restricted-imports -import { - legacyGetRuleActionsSavedObject, - LegacyRulesActionsSavedObject, -} from './legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; +// eslint-disable-next-line no-restricted-imports +import { legacyGetRuleActionsSavedObject } from './legacy_get_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; describe('legacy_get_rule_actions_saved_object', () => { let savedObjectsClient: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.ts index 5f23ceace2b55..0cb57091af7bc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_get_rule_actions_saved_object.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { SavedObjectsFindOptionsReference, Logger } from '@kbn/core/server'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { SavedObjectsFindOptionsReference, Logger } from '@kbn/core/server'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { +import type { LegacyIRuleActionsAttributesSavedObjectAttributes, LegacyRuleAlertAction, } from './legacy_types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.test.ts index 5837733e75cbd..8e3fd9a16453a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.test.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import type { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports import { legacyMigrateRuleAlertId, legacyMigrateAlertId } from './legacy_migrations'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; describe('legacy_migrations', () => { describe('legacyMigrateRuleAlertId', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.ts index 9fff45b3cf023..1c5d1cc1a63b2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_migrations.ts @@ -6,7 +6,7 @@ */ import { isString } from 'lodash/fp'; -import { +import type { SavedObjectUnsanitizedDoc, SavedObjectSanitizedDoc, SavedObjectAttributes, @@ -14,7 +14,7 @@ import { } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports -import { +import type { LegacyIRuleActionsAttributesSavedObjectAttributes, LegacyRuleAlertAction, LegacyRuleAlertSavedObjectAction, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_saved_object_mappings.ts index 8a0858830be98..26daac60ffc23 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_saved_object_mappings.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_saved_object_mappings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectMigration } from './legacy_migrations'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_types.ts index 7ea80663df92e..5ebe1a7155a9b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectAttributes } from '@kbn/core/server'; -import { RuleActionParams } from '@kbn/alerting-plugin/common'; +import type { SavedObjectAttributes } from '@kbn/core/server'; +import type { RuleActionParams } from '@kbn/alerting-plugin/common'; /** * This was the pre-7.16 version of LegacyRuleAlertAction and how it was stored on disk pre-7.16. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_or_create_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_or_create_rule_actions_saved_object.ts index a6146dcea638f..d7bf02f4591db 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_or_create_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_or_create_rule_actions_saved_object.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { RuleAction } from '@kbn/alerting-plugin/common'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; // eslint-disable-next-line no-restricted-imports import { legacyGetRuleActionsSavedObject } from './legacy_get_rule_actions_saved_object'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_rule_actions_saved_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_rule_actions_saved_object.ts index b524a0127283c..3d620182f5c44 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_rule_actions_saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_update_rule_actions_saved_object.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { SavedObjectReference } from '@kbn/core/server'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { SavedObjectReference } from '@kbn/core/server'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; +import type { LegacyRulesActionsSavedObject } from './legacy_get_rule_actions_saved_object'; // eslint-disable-next-line no-restricted-imports import { legacyGetActionReference, @@ -21,7 +21,7 @@ import { legacyTransformLegacyRuleAlertActionToReference, } from './legacy_utils'; // eslint-disable-next-line no-restricted-imports -import { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; +import type { LegacyIRuleActionsAttributesSavedObjectAttributes } from './legacy_types'; /** * @deprecated Once we are confident all rules relying on side-car actions SO's have been migrated to SO references we should remove this function diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.test.ts index c3962dc28ae3e..53b38d812b32c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.test.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { SavedObjectsUpdateResponse } from '@kbn/core/server'; +import type { SavedObjectsUpdateResponse } from '@kbn/core/server'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from './legacy_saved_object_mappings'; // eslint-disable-next-line no-restricted-imports -import { +import type { LegacyIRuleActionsAttributesSavedObjectAttributes, LegacyRuleAlertAction, } from './legacy_types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.ts index 8d35272d10fdd..68e5e74e550d8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions/legacy_utils.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { SavedObjectsUpdateResponse, Logger } from '@kbn/core/server'; +import type { SavedObjectsUpdateResponse, Logger } from '@kbn/core/server'; -import { RuleAction } from '@kbn/alerting-plugin/common'; +import type { RuleAction } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line no-restricted-imports -import { +import type { LegacyIRuleActionsAttributesSavedObjectAttributes, LegacyRuleAlertAction, LegacyRuleAlertSavedObjectAction, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/__mocks__/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/__mocks__/index.ts index 04516f22734db..666b35ed93f56 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/__mocks__/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IRuleExecutionLogForRoutes } from '../client_for_routes/client_interface'; -import { +import type { IRuleExecutionLogForRoutes } from '../client_for_routes/client_interface'; +import type { IRuleExecutionLogForExecutors, RuleExecutionContext, } from '../client_for_executors/client_interface'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_factories.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_factories.ts index 73ca6eb2dad9e..330010acfbcc4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_factories.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_factories.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Logger, SavedObjectsClientContract } from '@kbn/core/server'; -import { IEventLogClient, IEventLogService } from '@kbn/event-log-plugin/server'; +import type { Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import type { IEventLogClient, IEventLogService } from '@kbn/event-log-plugin/server'; -import { IRuleExecutionLogForRoutes } from './client_for_routes/client_interface'; +import type { IRuleExecutionLogForRoutes } from './client_for_routes/client_interface'; import { createClientForRoutes } from './client_for_routes/client'; -import { +import type { IRuleExecutionLogForExecutors, RuleExecutionContext, } from './client_for_executors/client_interface'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client.ts index b680bcfe261bc..46a16d567de7f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client.ts @@ -6,22 +6,22 @@ */ import { sum } from 'lodash'; -import { Duration } from 'moment'; -import { Logger } from '@kbn/core/server'; +import type { Duration } from 'moment'; +import type { Logger } from '@kbn/core/server'; -import { +import type { RuleExecutionStatus, - ruleExecutionStatusOrderByStatus, RuleExecutionMetrics, } from '../../../../../common/detection_engine/schemas/common'; +import { ruleExecutionStatusOrderByStatus } from '../../../../../common/detection_engine/schemas/common'; import { withSecuritySpan } from '../../../../utils/with_security_span'; -import { ExtMeta } from '../utils/console_logging'; +import type { ExtMeta } from '../utils/console_logging'; import { truncateValue } from '../utils/normalization'; -import { IEventLogWriter } from '../event_log/event_log_writer'; -import { IRuleExecutionSavedObjectsClient } from '../execution_saved_object/saved_objects_client'; -import { +import type { IEventLogWriter } from '../event_log/event_log_writer'; +import type { IRuleExecutionSavedObjectsClient } from '../execution_saved_object/saved_objects_client'; +import type { IRuleExecutionLogForExecutors, RuleExecutionContext, StatusChangeArgs, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client_interface.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client_interface.ts index 86266eb2da164..eca9c0d82c870 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client_interface.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_executors/client_interface.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Duration } from 'moment'; -import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; +import type { Duration } from 'moment'; +import type { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; /** * Used from rule executors to log various information about the rule execution: diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client.ts index 476b199a1f2f3..b8f5b45098e7f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client.ts @@ -6,18 +6,21 @@ */ import { chunk, mapValues } from 'lodash'; -import { Logger } from '@kbn/core/server'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { Logger } from '@kbn/core/server'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; import { initPromisePool } from '../../../../utils/promise_pool'; import { withSecuritySpan } from '../../../../utils/with_security_span'; import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; -import { IEventLogReader } from '../event_log/event_log_reader'; -import { IRuleExecutionSavedObjectsClient } from '../execution_saved_object/saved_objects_client'; -import { GetAggregateExecutionEventsArgs, IRuleExecutionLogForRoutes } from './client_interface'; +import type { IEventLogReader } from '../event_log/event_log_reader'; +import type { IRuleExecutionSavedObjectsClient } from '../execution_saved_object/saved_objects_client'; +import type { + GetAggregateExecutionEventsArgs, + IRuleExecutionLogForRoutes, +} from './client_interface'; -import { ExtMeta } from '../utils/console_logging'; +import type { ExtMeta } from '../utils/console_logging'; import { truncateList } from '../utils/normalization'; const RULES_PER_CHUNK = 1000; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client_interface.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client_interface.ts index 3f353732abbc5..0df4edc8ecdf3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client_interface.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/client_for_routes/client_interface.ts @@ -5,14 +5,14 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ExecutionLogTableSortColumns, RuleExecutionEvent, RuleExecutionStatus, RuleExecutionSummary, } from '../../../../../common/detection_engine/schemas/common'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; export interface GetAggregateExecutionEventsArgs { ruleId: string; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_reader.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_reader.ts index 20cc2f0e78c77..70a521ac95a52 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_reader.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_reader.ts @@ -5,18 +5,18 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IEventLogClient } from '@kbn/event-log-plugin/server'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { IEventLogClient } from '@kbn/event-log-plugin/server'; import { MAX_EXECUTION_EVENTS_DISPLAYED } from '@kbn/securitysolution-rules'; -import { +import type { RuleExecutionEvent, RuleExecutionStatus, } from '../../../../../common/detection_engine/schemas/common'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../common/detection_engine/schemas/response'; import { invariant } from '../../../../../common/utils/invariant'; import { withSecuritySpan } from '../../../../utils/with_security_span'; -import { GetAggregateExecutionEventsArgs } from '../client_for_routes/client_interface'; +import type { GetAggregateExecutionEventsArgs } from '../client_for_routes/client_interface'; import { RULE_EXECUTION_LOG_PROVIDER, RULE_SAVED_OBJECT_TYPE, @@ -27,10 +27,8 @@ import { getExecutionEventAggregation, mapRuleExecutionStatusToPlatformStatus, } from './get_execution_event_aggregation'; -import { - EXECUTION_UUID_FIELD, - ExecutionUuidAggResult, -} from './get_execution_event_aggregation/types'; +import type { ExecutionUuidAggResult } from './get_execution_event_aggregation/types'; +import { EXECUTION_UUID_FIELD } from './get_execution_event_aggregation/types'; export interface IEventLogReader { getAggregateExecutionEvents( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_writer.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_writer.ts index 9672992a85f57..be212cd80bd14 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/event_log_writer.ts @@ -6,12 +6,13 @@ */ import { SavedObjectsUtils } from '@kbn/core/server'; -import { IEventLogService, SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; -import { +import type { IEventLogService } from '@kbn/event-log-plugin/server'; +import { SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; +import type { RuleExecutionStatus, - ruleExecutionStatusOrderByStatus, RuleExecutionMetrics, } from '../../../../../common/detection_engine/schemas/common'; +import { ruleExecutionStatusOrderByStatus } from '../../../../../common/detection_engine/schemas/common'; import { RULE_SAVED_OBJECT_TYPE, RULE_EXECUTION_LOG_PROVIDER, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/index.ts index dcf2fbfe911bd..dc415bbc200b9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/index.ts @@ -9,18 +9,16 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { BadRequestError } from '@kbn/securitysolution-es-utils'; import { flatMap, get } from 'lodash'; import { MAX_EXECUTION_EVENTS_DISPLAYED } from '@kbn/securitysolution-rules'; -import { AggregateEventsBySavedObjectResult } from '@kbn/event-log-plugin/server'; -import { - AggregateRuleExecutionEvent, - RuleExecutionStatus, -} from '../../../../../../common/detection_engine/schemas/common'; -import { GetAggregateRuleExecutionEventsResponse } from '../../../../../../common/detection_engine/schemas/response'; -import { +import type { AggregateEventsBySavedObjectResult } from '@kbn/event-log-plugin/server'; +import type { AggregateRuleExecutionEvent } from '../../../../../../common/detection_engine/schemas/common'; +import { RuleExecutionStatus } from '../../../../../../common/detection_engine/schemas/common'; +import type { GetAggregateRuleExecutionEventsResponse } from '../../../../../../common/detection_engine/schemas/response'; +import type { ExecutionEventAggregationOptions, ExecutionUuidAggResult, ExecutionUuidAggBucket, - EXECUTION_UUID_FIELD, } from './types'; +import { EXECUTION_UUID_FIELD } from './types'; // Base ECS fields const ACTION_FIELD = 'event.action'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/types.ts index f9846469181da..d98b5f5fc80cc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/get_execution_event_aggregation/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; // Shared constants, consider moving to packages export const EXECUTION_UUID_FIELD = 'kibana.alert.rule.execution.uuid'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/register_event_log_provider.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/register_event_log_provider.ts index dc64fe9e1f717..c05724198e5b2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/register_event_log_provider.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/event_log/register_event_log_provider.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IEventLogService } from '@kbn/event-log-plugin/server'; +import type { IEventLogService } from '@kbn/event-log-plugin/server'; import { RuleExecutionLogAction, RULE_EXECUTION_LOG_PROVIDER } from './constants'; export const registerEventLogProvider = (eventLogService: IEventLogService) => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_client.ts index fcb145dd406e9..3333d87c7e8ef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_client.ts @@ -5,15 +5,13 @@ * 2.0. */ -import { Logger, SavedObjectsClientContract, SavedObjectsErrorHelpers } from '@kbn/core/server'; +import type { Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { withSecuritySpan } from '../../../../utils/with_security_span'; -import { - RuleExecutionSavedObject, - RuleExecutionAttributes, - RULE_EXECUTION_SO_TYPE, -} from './saved_objects_type'; +import type { RuleExecutionSavedObject, RuleExecutionAttributes } from './saved_objects_type'; +import { RULE_EXECUTION_SO_TYPE } from './saved_objects_type'; import { getRuleExecutionSoId, getRuleExecutionSoReferences, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_type.ts index f2d1628efd539..788eb26c3c5ae 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_type.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObject, SavedObjectsType } from '@kbn/core/server'; -import { +import type { SavedObject, SavedObjectsType } from '@kbn/core/server'; +import type { RuleExecutionMetrics, RuleExecutionStatus, RuleExecutionStatusOrder, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_utils.ts index 960197a03cd5d..6899fbac46d95 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/execution_saved_object/saved_objects_utils.ts @@ -6,7 +6,7 @@ */ import uuidv5 from 'uuid/v5'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { RULE_EXECUTION_SO_TYPE } from './saved_objects_type'; export const getRuleExecutionSoId = (ruleId: string): string => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/merge_rule_execution_summary.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/merge_rule_execution_summary.ts index e1b7a008ead07..2e2ac74e94cc5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/merge_rule_execution_summary.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/merge_rule_execution_summary.ts @@ -5,12 +5,12 @@ * 2.0. */ +import type { RuleExecutionSummary } from '../../../../common/detection_engine/schemas/common'; import { RuleExecutionStatus, ruleExecutionStatusOrderByStatus, - RuleExecutionSummary, } from '../../../../common/detection_engine/schemas/common'; -import { RuleAlertType } from '../rules/types'; +import type { RuleAlertType } from '../rules/types'; export const mergeRuleExecutionSummary = ( rule: RuleAlertType, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/console_logging.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/console_logging.ts index 4306fb5e15d9c..89f776a06dd11 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/console_logging.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_execution_log/utils/console_logging.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { LogMeta } from '@kbn/core/server'; -import { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; +import type { LogMeta } from '@kbn/core/server'; +import type { RuleExecutionStatus } from '../../../../../common/detection_engine/schemas/common'; /** * Custom extended log metadata that rule execution logger can attach to every log record. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/eql.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/eql.ts index a7eb512564d42..dd465317c6cdc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/eql.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/eql.ts @@ -6,7 +6,7 @@ */ import type { EqlSearchStrategyResponse } from '@kbn/data-plugin/common'; -import { EqlSearchResponse } from '../../../../../common/detection_engine/types'; +import type { EqlSearchResponse } from '../../../../../common/detection_engine/types'; export const sequenceResponse = { rawResponse: { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule.ts index b75b0f03f5038..505560ee6a25c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; export const createRuleMock = (params: Partial) => ({ actions: [], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts index 812b8cdb73e70..2f636934cbc0c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts @@ -8,19 +8,19 @@ import { of } from 'rxjs'; import { v4 } from 'uuid'; -import { Logger, SavedObject } from '@kbn/core/server'; +import type { Logger, SavedObject } from '@kbn/core/server'; import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { mlPluginServerMock } from '@kbn/ml-plugin/server/mocks'; import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import { ruleRegistryMocks } from '@kbn/rule-registry-plugin/server/mocks'; import { eventLogServiceMock } from '@kbn/event-log-plugin/server/mocks'; -import { PluginSetupContract as AlertingPluginSetupContract } from '@kbn/alerting-plugin/server'; -import { ConfigType } from '../../../../config'; -import { AlertAttributes } from '../../signals/types'; +import type { PluginSetupContract as AlertingPluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { ConfigType } from '../../../../config'; +import type { AlertAttributes } from '../../signals/types'; import { createRuleMock } from './rule'; import { listMock } from '@kbn/lists-plugin/server/mocks'; -import { QueryRuleParams, RuleParams } from '../../schemas/rule_schemas'; +import type { QueryRuleParams, RuleParams } from '../../schemas/rule_schemas'; // this is only used in tests // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { createDefaultAlertExecutorOptions } from '@kbn/rule-registry-plugin/server/utils/rule_executor_test_utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts index 39c4a922cd008..80efbaed06886 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/threshold.ts @@ -24,11 +24,11 @@ import { } from '@kbn/rule-data-utils'; import { flattenWithPrefix } from '@kbn/securitysolution-rules'; -import { TypeOfFieldMap } from '@kbn/rule-registry-plugin/common/field_map'; +import type { TypeOfFieldMap } from '@kbn/rule-registry-plugin/common/field_map'; import { SERVER_APP_ID } from '../../../../../common/constants'; import { ANCHOR_DATE } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { getListArrayMock } from '../../../../../common/detection_engine/schemas/types/lists.mock'; -import { RulesFieldMap } from '../../../../../common/field_maps'; +import type { RulesFieldMap } from '../../../../../common/field_maps'; import { ALERT_ANCESTORS, ALERT_ORIGINAL_TIME, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts index e19a178c54eec..2911cf3d9e28a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts @@ -23,12 +23,10 @@ import { isMachineLearningParams, } from '../signals/utils'; import { DEFAULT_MAX_SIGNALS, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from '../../../../common/constants'; -import { CreateSecurityRuleTypeWrapper } from './types'; +import type { CreateSecurityRuleTypeWrapper } from './types'; import { getListClient } from './utils/get_list_client'; -import { - NotificationRuleTypeParams, - scheduleNotificationActions, -} from '../notifications/schedule_notification_actions'; +import type { NotificationRuleTypeParams } from '../notifications/schedule_notification_actions'; +import { scheduleNotificationActions } from '../notifications/schedule_notification_actions'; import { getNotificationResultsLink } from '../notifications/utils'; import { createResultObject } from './utils'; import { bulkCreateFactory, wrapHitsFactory, wrapSequencesFactory } from './factories'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts index 0f42fab352cfc..922e106f1e0bf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts @@ -9,9 +9,10 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { EQL_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { eqlRuleParams, EqlRuleParams } from '../../schemas/rule_schemas'; +import type { EqlRuleParams } from '../../schemas/rule_schemas'; +import { eqlRuleParams } from '../../schemas/rule_schemas'; import { eqlExecutor } from '../../signals/executors/eql'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable, validateIndexPatterns } from '../utils'; export const createEqlAlertType = ( createOptions: CreateRuleOptions diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/bulk_create_factory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/bulk_create_factory.ts index 5d0a870ac553b..f1701e4436846 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/bulk_create_factory.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/bulk_create_factory.ts @@ -8,13 +8,13 @@ import { performance } from 'perf_hooks'; import { isEmpty } from 'lodash'; -import { Logger } from '@kbn/core/server'; -import { PersistenceAlertService } from '@kbn/rule-registry-plugin/server'; -import { AlertWithCommonFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; -import { BuildRuleMessage } from '../../signals/rule_messages'; +import type { Logger } from '@kbn/core/server'; +import type { PersistenceAlertService } from '@kbn/rule-registry-plugin/server'; +import type { AlertWithCommonFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; +import type { BuildRuleMessage } from '../../signals/rule_messages'; import { makeFloatString } from '../../signals/utils'; -import { RefreshTypes } from '../../types'; -import { +import type { RefreshTypes } from '../../types'; +import type { BaseFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/detection_engine/schemas/alerts'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.test.ts index 725ec2958d339..b1f9ed1361da1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.test.ts @@ -29,7 +29,7 @@ import { flattenWithPrefix } from '@kbn/securitysolution-rules'; import { sampleDocNoSortIdWithTimestamp } from '../../../signals/__mocks__/es_results'; import { buildAlert, buildParent, buildAncestors, additionalAlertFields } from './build_alert'; -import { Ancestor, SignalSourceHit } from '../../../signals/types'; +import type { Ancestor, SignalSourceHit } from '../../../signals/types'; import { getListArrayMock } from '../../../../../../common/detection_engine/schemas/types/lists.mock'; import { SERVER_APP_ID } from '../../../../../../common/constants'; import { EVENT_DATASET } from '../../../../../../common/cti/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.ts index dc111cf229a5c..7460337170c7e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert.ts @@ -43,7 +43,7 @@ import { flattenWithPrefix } from '@kbn/securitysolution-rules'; import { createHash } from 'crypto'; -import { BaseSignalHit, SimpleHit, ThresholdResult } from '../../../signals/types'; +import type { BaseSignalHit, SimpleHit, ThresholdResult } from '../../../signals/types'; import { getField, getValidDateFromDoc, @@ -51,7 +51,7 @@ import { isWrappedSignalHit, } from '../../../signals/utils'; import { SERVER_APP_ID } from '../../../../../../common/constants'; -import { SearchTypes } from '../../../../telemetry/types'; +import type { SearchTypes } from '../../../../telemetry/types'; import { ALERT_ANCESTORS, ALERT_DEPTH, @@ -74,13 +74,13 @@ import { ALERT_RULE_EXCEPTIONS_LIST, ALERT_RULE_IMMUTABLE, } from '../../../../../../common/field_maps/field_names'; -import { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; +import type { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; import { commonParamsCamelToSnake, typeSpecificCamelToSnake, } from '../../../schemas/rule_converters'; import { transformAlertToRuleAction } from '../../../../../../common/detection_engine/transform_actions'; -import { +import type { AncestorLatest, BaseFieldsLatest, } from '../../../../../../common/detection_engine/schemas/alerts'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.test.ts index 7b3e2dc1359da..d90bc09fb7794 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { ALERT_RULE_CONSUMER } from '@kbn/rule-data-utils'; @@ -17,7 +17,7 @@ import { } from './build_alert_group_from_sequence'; import { SERVER_APP_ID } from '../../../../../../common/constants'; import { getCompleteRuleMock, getQueryRuleParams } from '../../../schemas/rule_schemas.mock'; -import { QueryRuleParams } from '../../../schemas/rule_schemas'; +import type { QueryRuleParams } from '../../../schemas/rule_schemas'; import { ALERT_ANCESTORS, ALERT_DEPTH, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.ts index f20d45bd20631..ccd089e767308 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_alert_group_from_sequence.ts @@ -7,22 +7,22 @@ import { ALERT_UUID } from '@kbn/rule-data-utils'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { ConfigType } from '../../../../../config'; -import { Ancestor, SignalSource, SignalSourceHit } from '../../../signals/types'; +import type { Ancestor, SignalSource, SignalSourceHit } from '../../../signals/types'; import { buildAlert, buildAncestors, generateAlertId } from './build_alert'; import { buildBulkBody } from './build_bulk_body'; -import { EqlSequence } from '../../../../../../common/detection_engine/types'; +import type { EqlSequence } from '../../../../../../common/detection_engine/types'; import { generateBuildingBlockIds } from './generate_building_block_ids'; -import { BuildReasonMessage } from '../../../signals/reason_formatters'; -import { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; +import type { BuildReasonMessage } from '../../../signals/reason_formatters'; +import type { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; import { ALERT_BUILDING_BLOCK_TYPE, ALERT_GROUP_ID, ALERT_GROUP_INDEX, } from '../../../../../../common/field_maps/field_names'; -import { +import type { BaseFieldsLatest, EqlBuildingBlockFieldsLatest, EqlShellFieldsLatest, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_bulk_body.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_bulk_body.ts index a808ac4f91046..c2d7bca8f8022 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_bulk_body.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/build_bulk_body.ts @@ -7,18 +7,23 @@ import { flattenWithPrefix } from '@kbn/securitysolution-rules'; -import { BaseHit } from '../../../../../../common/detection_engine/types'; +import type { BaseHit } from '../../../../../../common/detection_engine/types'; import type { ConfigType } from '../../../../../config'; -import { BuildReasonMessage } from '../../../signals/reason_formatters'; +import type { BuildReasonMessage } from '../../../signals/reason_formatters'; import { getMergeStrategy } from '../../../signals/source_fields_merging/strategies'; -import { BaseSignalHit, SignalSource, SignalSourceHit, SimpleHit } from '../../../signals/types'; +import type { + BaseSignalHit, + SignalSource, + SignalSourceHit, + SimpleHit, +} from '../../../signals/types'; import { additionalAlertFields, buildAlert } from './build_alert'; import { filterSource } from './filter_source'; -import { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; +import type { CompleteRule, RuleParams } from '../../../schemas/rule_schemas'; import { buildRuleNameFromMapping } from '../../../signals/mappings/build_rule_name_from_mapping'; import { buildSeverityFromMapping } from '../../../signals/mappings/build_severity_from_mapping'; import { buildRiskScoreFromMapping } from '../../../signals/mappings/build_risk_score_from_mapping'; -import { BaseFieldsLatest } from '../../../../../../common/detection_engine/schemas/alerts'; +import type { BaseFieldsLatest } from '../../../../../../common/detection_engine/schemas/alerts'; const isSourceDoc = ( hit: SignalSourceHit diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/filter_source.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/filter_source.ts index f1fd9d3b83929..707fc6a76f7eb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/filter_source.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/filter_source.ts @@ -6,7 +6,7 @@ */ import { ALERT_THRESHOLD_RESULT } from '../../../../../../common/field_maps/field_names'; -import { SignalSourceHit } from '../../../signals/types'; +import type { SignalSourceHit } from '../../../signals/types'; export const filterSource = (doc: SignalSourceHit) => { const docSource = doc._source ?? {}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/generate_building_block_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/generate_building_block_ids.ts index f0ae5d7cdc6ab..0493424151d84 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/generate_building_block_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/utils/generate_building_block_ids.ts @@ -7,7 +7,7 @@ import { ALERT_RULE_UUID } from '@kbn/rule-data-utils'; import { createHash } from 'crypto'; -import { BaseFieldsLatest } from '../../../../../../common/detection_engine/schemas/alerts'; +import type { BaseFieldsLatest } from '../../../../../../common/detection_engine/schemas/alerts'; import { ALERT_ANCESTORS } from '../../../../../../common/field_maps/field_names'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_hits_factory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_hits_factory.ts index 4ac595e4ff921..bf4c3a8aa46e3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_hits_factory.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_hits_factory.ts @@ -9,12 +9,12 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_UUID } from '@kbn/rule-data-utils'; import type { ConfigType } from '../../../../config'; -import { SignalSource, SimpleHit } from '../../signals/types'; -import { CompleteRule, RuleParams } from '../../schemas/rule_schemas'; +import type { SignalSource, SimpleHit } from '../../signals/types'; +import type { CompleteRule, RuleParams } from '../../schemas/rule_schemas'; import { generateId } from '../../signals/utils'; import { buildBulkBody } from './utils/build_bulk_body'; -import { BuildReasonMessage } from '../../signals/reason_formatters'; -import { +import type { BuildReasonMessage } from '../../signals/reason_formatters'; +import type { BaseFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/detection_engine/schemas/alerts'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_sequences_factory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_sequences_factory.ts index fb95bcf4cea64..ccf959daa9e7a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_sequences_factory.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/factories/wrap_sequences_factory.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; -import { WrapSequences } from '../../signals/types'; +import type { WrapSequences } from '../../signals/types'; import { buildAlertGroupFromSequence } from './utils/build_alert_group_from_sequence'; -import { ConfigType } from '../../../../config'; -import { CompleteRule, RuleParams } from '../../schemas/rule_schemas'; -import { +import type { ConfigType } from '../../../../config'; +import type { CompleteRule, RuleParams } from '../../schemas/rule_schemas'; +import type { BaseFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/detection_engine/schemas/alerts'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.ts index 579fc947fa51e..08da25f544e6c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/create_indicator_match_alert_type.ts @@ -9,9 +9,10 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { INDICATOR_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { threatRuleParams, ThreatRuleParams } from '../../schemas/rule_schemas'; +import type { ThreatRuleParams } from '../../schemas/rule_schemas'; +import { threatRuleParams } from '../../schemas/rule_schemas'; import { threatMatchExecutor } from '../../signals/executors/threat_match'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable, validateIndexPatterns } from '../utils'; export const createIndicatorMatchAlertType = ( createOptions: CreateRuleOptions diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/ml/create_ml_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/ml/create_ml_alert_type.ts index 0bd2e181730fa..abfc279a6e08f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/ml/create_ml_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/ml/create_ml_alert_type.ts @@ -9,9 +9,10 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { ML_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { machineLearningRuleParams, MachineLearningRuleParams } from '../../schemas/rule_schemas'; +import type { MachineLearningRuleParams } from '../../schemas/rule_schemas'; +import { machineLearningRuleParams } from '../../schemas/rule_schemas'; import { mlExecutor } from '../../signals/executors/ml'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable } from '../utils'; export const createMlAlertType = ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.ts index c9626edc19d12..7f5b9301f316e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/create_query_alert_type.ts @@ -9,9 +9,10 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { QUERY_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { queryRuleParams, QueryRuleParams } from '../../schemas/rule_schemas'; +import type { QueryRuleParams } from '../../schemas/rule_schemas'; +import { queryRuleParams } from '../../schemas/rule_schemas'; import { queryExecutor } from '../../signals/executors/query'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable, validateIndexPatterns } from '../utils'; export const createQueryAlertType = ( createOptions: CreateRuleOptions diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_query/create_saved_query_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_query/create_saved_query_alert_type.ts index 896ea445134e0..a970c94e53c79 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_query/create_saved_query_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/saved_query/create_saved_query_alert_type.ts @@ -9,13 +9,10 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { SAVED_QUERY_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { - CompleteRule, - savedQueryRuleParams, - SavedQueryRuleParams, -} from '../../schemas/rule_schemas'; +import type { CompleteRule, SavedQueryRuleParams } from '../../schemas/rule_schemas'; +import { savedQueryRuleParams } from '../../schemas/rule_schemas'; import { queryExecutor } from '../../signals/executors/query'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable, validateIndexPatterns } from '../utils'; export const createSavedQueryAlertType = ( createOptions: CreateRuleOptions diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/create_threshold_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/create_threshold_alert_type.ts index 6906e91706f02..27a6defac7192 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/create_threshold_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/create_threshold_alert_type.ts @@ -9,10 +9,11 @@ import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; import { THRESHOLD_RULE_TYPE_ID } from '@kbn/securitysolution-rules'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import { thresholdRuleParams, ThresholdRuleParams } from '../../schemas/rule_schemas'; +import type { ThresholdRuleParams } from '../../schemas/rule_schemas'; +import { thresholdRuleParams } from '../../schemas/rule_schemas'; import { thresholdExecutor } from '../../signals/executors/threshold'; -import { ThresholdAlertState } from '../../signals/types'; -import { CreateRuleOptions, SecurityAlertType } from '../types'; +import type { ThresholdAlertState } from '../../signals/types'; +import type { CreateRuleOptions, SecurityAlertType } from '../types'; import { validateImmutable, validateIndexPatterns } from '../utils'; export const createThresholdAlertType = ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts index e32c193262476..38a0e2652387b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts @@ -5,39 +5,39 @@ * 2.0. */ -import { Moment } from 'moment'; +import type { Moment } from 'moment'; -import { Logger } from '@kbn/logging'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { Logger } from '@kbn/logging'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { RuleExecutorOptions, RuleType } from '@kbn/alerting-plugin/server'; -import { +import type { RuleExecutorOptions, RuleType } from '@kbn/alerting-plugin/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleTypeState, WithoutReservedActionGroups, } from '@kbn/alerting-plugin/common'; -import { ListClient } from '@kbn/lists-plugin/server'; -import { +import type { ListClient } from '@kbn/lists-plugin/server'; +import type { PersistenceServices, IRuleDataClient, IRuleDataReader, } from '@kbn/rule-registry-plugin/server'; -import { IEventLogService } from '@kbn/event-log-plugin/server'; -import { ConfigType } from '../../../config'; -import { SetupPlugins } from '../../../plugin'; -import { CompleteRule, RuleParams } from '../schemas/rule_schemas'; -import { BuildRuleMessage } from '../signals/rule_messages'; -import { +import type { IEventLogService } from '@kbn/event-log-plugin/server'; +import type { ConfigType } from '../../../config'; +import type { SetupPlugins } from '../../../plugin'; +import type { CompleteRule, RuleParams } from '../schemas/rule_schemas'; +import type { BuildRuleMessage } from '../signals/rule_messages'; +import type { BulkCreate, SearchAfterAndBulkCreateReturnType, WrapHits, WrapSequences, } from '../signals/types'; -import { ExperimentalFeatures } from '../../../../common/experimental_features'; -import { ITelemetryEventsSender } from '../../telemetry/sender'; -import { RuleExecutionLogForExecutorsFactory } from '../rule_execution_log'; +import type { ExperimentalFeatures } from '../../../../common/experimental_features'; +import type { ITelemetryEventsSender } from '../../telemetry/sender'; +import type { RuleExecutionLogForExecutorsFactory } from '../rule_execution_log'; export interface SecurityAlertTypeReturnValue { bulkCreateTimes: string[]; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_list_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_list_client.ts index 15b12223d758a..e8689bcfbf591 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_list_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_list_client.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { ExceptionListClient, ListClient, ListPluginSetup } from '@kbn/lists-plugin/server'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ExceptionListClient, ListClient, ListPluginSetup } from '@kbn/lists-plugin/server'; export const getListClient = ({ lists, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/index.ts index d96c69b8a6bdc..2bded307e1753 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { RuleTypeState } from '@kbn/alerting-plugin/server'; -import { SecurityAlertTypeReturnValue } from '../types'; +import type { RuleTypeState } from '@kbn/alerting-plugin/server'; +import type { SecurityAlertTypeReturnValue } from '../types'; export const createResultObject = (state: TState) => { const result: SecurityAlertTypeReturnValue = { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.test.ts index 84e7db189aa37..6bd89e1eef8c9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.test.ts @@ -11,7 +11,7 @@ import { applyBulkActionEditToRule, } from './bulk_action_edit'; import { BulkActionEditType } from '../../../../common/detection_engine/schemas/common/schemas'; -import { RuleAlertType } from './types'; +import type { RuleAlertType } from './types'; describe('bulk_action_edit', () => { describe('addItemsToArray', () => { test('should add single item to array', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.ts index dd87a572dcef8..0005c346ae430 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_action_edit.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { RuleAlertType } from './types'; +import type { RuleAlertType } from './types'; -import { - BulkActionEditPayload, - BulkActionEditType, -} from '../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../common/detection_engine/schemas/common/schemas'; import { invariant } from '../../../../common/utils/invariant'; import { isMachineLearningParams } from '../signals/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts index 3f206b8520592..c75f7d0943e52 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/action_to_rules_client_operation.ts @@ -7,10 +7,8 @@ import type { BulkEditOperation } from '@kbn/alerting-plugin/server'; -import { - BulkActionEditForRuleAttributes, - BulkActionEditType, -} from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditForRuleAttributes } from '../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; import { assertUnreachable } from '../../../../../common/utility_types'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts index 4e47fdd2c37e0..41485fc1e317e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.test.ts @@ -7,7 +7,7 @@ import { addItemsToArray, deleteItemsFromArray, ruleParamsModifier } from './rule_params_modifier'; import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { RuleAlertType } from '../types'; +import type { RuleAlertType } from '../types'; describe('addItemsToArray', () => { test('should add single item to array', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts index 95c0edee01923..e696432780dad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/rule_params_modifier.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { RuleAlertType } from '../types'; +import type { RuleAlertType } from '../types'; -import { - BulkActionEditForRuleParams, - BulkActionEditType, -} from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditForRuleParams } from '../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; import { invariant } from '../../../../../common/utils/invariant'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts index 156e7e1066a15..0b7f540b4dcc3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.test.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - BulkActionEditPayload, - BulkActionEditType, -} from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { BulkActionEditPayload } from '../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; import { splitBulkEditActions } from './split_bulk_edit_actions'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts index 1335e84a94245..e1ba96390d538 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit/split_bulk_edit_actions.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { +import type { BulkActionEditPayload, - BulkActionEditType, BulkActionEditForRuleAttributes, BulkActionEditForRuleParams, } from '../../../../../common/detection_engine/schemas/common/schemas'; +import { BulkActionEditType } from '../../../../../common/detection_engine/schemas/common/schemas'; /** * Split bulk edit actions in 2 chunks: actions applied to params and diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts index d103cd2c519c6..1592a8e58972b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/bulk_edit_rules.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { BulkActionEditPayload } from '../../../../common/detection_engine/schemas/common'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { BulkActionEditPayload } from '../../../../common/detection_engine/schemas/common'; import { enrichFilterWithRuleTypeMapping } from './enrich_filter_with_rule_type_mappings'; -import { MlAuthz } from '../../machine_learning/authz'; +import type { MlAuthz } from '../../machine_learning/authz'; import { throwAuthzError } from '../../machine_learning/validation'; import { ruleParamsModifier } from './bulk_edit/rule_params_modifier'; import { splitBulkEditActions } from './bulk_edit/split_bulk_edit_actions'; import { bulkEditActionToRulesClientOperation } from './bulk_edit/action_to_rules_client_operation'; -import { RuleAlertType } from './types'; +import type { RuleAlertType } from './types'; export interface BulkEditRulesArguments { rulesClient: RulesClient; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts index 45cba7c0032be..5405fed52b79b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { NOTIFICATION_THROTTLE_NO_ACTIONS } from '../../../../common/constants'; -import { CreateRulesOptions } from './types'; +import type { CreateRulesOptions } from './types'; import { convertCreateAPIToInternalSchema } from '../schemas/rule_converters'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { RuleParams } from '../schemas/rule_schemas'; export const createRules = async ({ rulesClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts index 50c4b8d378598..4b3483229af89 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.test.ts @@ -9,12 +9,12 @@ import { Readable } from 'stream'; import { createPromiseFromStreams } from '@kbn/utils'; import { createRulesAndExceptionsStreamFromNdJson } from './create_rules_stream_from_ndjson'; import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { ImportRulesSchema } from '../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { ImportRulesSchema } from '../../../../common/detection_engine/schemas/request/import_rules_schema'; import { getOutputDetailsSample, getSampleDetailsAsNdjson, } from '../../../../common/detection_engine/schemas/response/export_rules_details_schema.mock'; -import { RuleExceptionsPromiseFromStreams } from '../routes/rules/utils/import_rules_utils'; +import type { RuleExceptionsPromiseFromStreams } from '../routes/rules/utils/import_rules_utils'; export const getOutputSample = (): Partial => ({ rule_id: 'rule-1', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts index f9e2fdd1b6ba5..486b8b531a3fd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/create_rules_stream_from_ndjson.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Transform } from 'stream'; -import * as t from 'io-ts'; +import type { Transform } from 'stream'; +import type * as t from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { @@ -18,16 +18,14 @@ import { import { exactCheck, formatErrors } from '@kbn/securitysolution-io-ts-utils'; import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { +import type { ImportExceptionListItemSchema, ImportExceptionsListSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { has } from 'lodash/fp'; import { importRuleValidateTypeDependents } from '../../../../common/detection_engine/schemas/request/import_rules_type_dependents'; -import { - importRulesSchema, - ImportRulesSchema, -} from '../../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { ImportRulesSchema } from '../../../../common/detection_engine/schemas/request/import_rules_schema'; +import { importRulesSchema } from '../../../../common/detection_engine/schemas/request/import_rules_schema'; import { parseNdjsonStrings, createRulesLimitStream, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts index fbbac1609fdea..7c0daefc6c6c3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.test.ts @@ -8,7 +8,7 @@ import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; import { ruleExecutionLogMock } from '../rule_execution_log/__mocks__'; import { deleteRules } from './delete_rules'; -import { DeleteRuleOptions } from './types'; +import type { DeleteRuleOptions } from './types'; describe('deleteRules', () => { let rulesClient: ReturnType; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts index 8639d2c270599..e0ab62df17c37 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/delete_rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DeleteRuleOptions } from './types'; +import type { DeleteRuleOptions } from './types'; export const deleteRules = async ({ ruleId, rulesClient, ruleExecutionLog }: DeleteRuleOptions) => { await rulesClient.delete({ id: ruleId }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.test.ts index 20f028fb1f703..279bac5885e7d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.test.ts @@ -6,8 +6,8 @@ */ import uuid from 'uuid'; -import { SanitizedRule } from '@kbn/alerting-plugin/common'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RuleParams } from '../schemas/rule_schemas'; import { duplicateRule } from './duplicate_rule'; jest.mock('uuid', () => ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.ts index 81af1533498ee..de077ef91b168 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/duplicate_rule.ts @@ -10,9 +10,9 @@ import uuid from 'uuid'; import { i18n } from '@kbn/i18n'; import { ruleTypeMappings } from '@kbn/securitysolution-rules'; -import { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; import { SERVER_APP_ID } from '../../../../common/constants'; -import { InternalRuleCreate, RuleParams } from '../schemas/rule_schemas'; +import type { InternalRuleCreate, RuleParams } from '../schemas/rule_schemas'; const DUPLICATE_TITLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.cloneRule.duplicateTitle', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts index 59b924f49d5f6..db45306420bb8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/find_rules.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { FindResult } from '@kbn/alerting-plugin/server'; +import type { FindResult } from '@kbn/alerting-plugin/server'; import { enrichFilterWithRuleTypeMapping } from './enrich_filter_with_rule_type_mappings'; -import { RuleParams } from '../schemas/rule_schemas'; -import { FindRuleOptions } from './types'; +import type { RuleParams } from '../schemas/rule_schemas'; +import type { FindRuleOptions } from './types'; export const findRules = ({ rulesClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts index 440d3db36bd63..a40a5fdf55986 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_existing_prepackaged_rules.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { RuleAlertType, isAlertTypes } from './types'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { RuleAlertType } from './types'; +import { isAlertTypes } from './types'; import { findRules } from './find_rules'; export const FILTER_NON_PREPACKED_RULES = 'alert.attributes.params.immutable: false'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts index 68fad65a8ff7e..25818c30f387b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.test.ts @@ -5,10 +5,10 @@ * 2.0. */ +import type { FindHit } from '../routes/__mocks__/request_responses'; import { getRuleMock, getFindResultWithSingleHit, - FindHit, getEmptySavedObjectsResponse, } from '../routes/__mocks__/request_responses'; import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; @@ -22,7 +22,7 @@ import { import { getQueryRuleParams } from '../schemas/rule_schemas.mock'; import { getExceptionListClientMock } from '@kbn/lists-plugin/server/services/exception_lists/exception_list_client.mock'; -import { loggingSystemMock } from '@kbn/core/server/mocks'; +import type { loggingSystemMock } from '@kbn/core/server/mocks'; import { requestContextMock } from '../routes/__mocks__/request_context'; const exceptionsClient = getExceptionListClientMock(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts index cf1a9991b3197..60d75fdd64709 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_all.ts @@ -7,9 +7,9 @@ import { transformDataToNdjson } from '@kbn/securitysolution-utils'; -import { Logger } from '@kbn/core/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { RulesClient, RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { RulesClient, RuleExecutorServices } from '@kbn/alerting-plugin/server'; import { getNonPackagedRules } from './get_existing_prepackaged_rules'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; import { transformAlertsToRules } from '../routes/rules/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts index e31c1444cd9fc..31bdfb398c18a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.test.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { getExportByObjectIds, getRulesFromObjects, RulesErrors } from './get_export_by_object_ids'; +import type { RulesErrors } from './get_export_by_object_ids'; +import { getExportByObjectIds, getRulesFromObjects } from './get_export_by_object_ids'; +import type { FindHit } from '../routes/__mocks__/request_responses'; import { getRuleMock, getFindResultWithSingleHit, - FindHit, getEmptySavedObjectsResponse, } from '../routes/__mocks__/request_responses'; import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks'; @@ -23,7 +24,7 @@ import { getQueryRuleParams } from '../schemas/rule_schemas.mock'; import { getExceptionListClientMock } from '@kbn/lists-plugin/server/services/exception_lists/exception_list_client.mock'; const exceptionsClient = getExceptionListClientMock(); -import { loggingSystemMock } from '@kbn/core/server/mocks'; +import type { loggingSystemMock } from '@kbn/core/server/mocks'; import { requestContextMock } from '../routes/__mocks__/request_context'; describe('get_export_by_object_ids', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts index dcf3f7532b53c..d5008c87f3b6d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_by_object_ids.ts @@ -8,10 +8,10 @@ import { chunk } from 'lodash'; import { transformDataToNdjson } from '@kbn/securitysolution-utils'; -import { Logger } from '@kbn/core/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { RulesClient, RuleExecutorServices } from '@kbn/alerting-plugin/server'; -import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; +import type { Logger } from '@kbn/core/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { RulesClient, RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; import { getExportDetailsNdjson } from './get_export_details_ndjson'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts index ad6b55272a52b..30be45f5eb163 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_details_ndjson.ts @@ -7,8 +7,8 @@ import type { ExportExceptionDetails } from '@kbn/securitysolution-io-ts-list-types'; -import { ExportRulesDetails } from '../../../../common/detection_engine/schemas/response/export_rules_details_schema'; -import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; +import type { ExportRulesDetails } from '../../../../common/detection_engine/schemas/response/export_rules_details_schema'; +import type { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; export const getExportDetailsNdjson = ( rules: Array>, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_rule_exceptions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_rule_exceptions.ts index bafaf29ac9940..a1af3ee76e007 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_rule_exceptions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_export_rule_exceptions.ts @@ -6,10 +6,13 @@ */ import { chunk } from 'lodash/fp'; -import { ListArray } from '@kbn/securitysolution-io-ts-list-types'; +import type { ListArray } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { ExceptionListClient, ExportExceptionListAndItemsReturn } from '@kbn/lists-plugin/server'; +import type { + ExceptionListClient, + ExportExceptionListAndItemsReturn, +} from '@kbn/lists-plugin/server'; const NON_EXPORTABLE_LIST_IDS = [ENDPOINT_LIST_ID]; export const EXCEPTIONS_EXPORT_CHUNK_SIZE = 50; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts index 433366b69a9da..0075b091d58a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.test.ts @@ -7,7 +7,7 @@ import { getPrepackagedRules } from './get_prepackaged_rules'; import { isEmpty } from 'lodash/fp'; -import { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; describe('get_existing_prepackaged_rules', () => { test('should not throw any errors with the existing checked in pre-packaged rules', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts index 795cff421b4ca..f0e88ddf6dc7a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_prepackaged_rules.ts @@ -5,22 +5,20 @@ * 2.0. */ -import * as t from 'io-ts'; +import type * as t from 'io-ts'; import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; import { exactCheck, formatErrors } from '@kbn/securitysolution-io-ts-utils'; import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { SavedObjectAttributes } from '@kbn/core/types'; -import { - addPrepackagedRulesSchema, - AddPrepackagedRulesSchema, -} from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { SavedObjectAttributes } from '@kbn/core/types'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import { addPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; // TODO: convert rules files to TS and add explicit type definitions import { rawRules } from './prepackaged_rules'; -import { RuleAssetSavedObjectsClient } from './rule_asset/rule_asset_saved_objects_client'; -import { IRuleAssetSOAttributes } from './types'; -import { ConfigType } from '../../../config'; +import type { RuleAssetSavedObjectsClient } from './rule_asset/rule_asset_saved_objects_client'; +import type { IRuleAssetSOAttributes } from './types'; +import type { ConfigType } from '../../../config'; /** * Validate the rules from the file system and throw any errors indicating to the developer diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts index c930a4493b513..d671d7870d13b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_install.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; -import { RuleAlertType } from './types'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { RuleAlertType } from './types'; export const getRulesToInstall = ( rulesFromFileSystem: AddPrepackagedRulesSchema[], diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts index 4a6e08e945879..c75200f903d1c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/get_rules_to_update.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; -import { RuleAlertType } from './types'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { RuleAlertType } from './types'; /** * Returns the rules to update by doing a compare to the rules from the file system against diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts index bc94a24ac3752..2f5519d2afe40 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/install_prepacked_rules.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SanitizedRule, RuleTypeParams } from '@kbn/alerting-plugin/common'; -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { SanitizedRule, RuleTypeParams } from '@kbn/alerting-plugin/common'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; import { createRules } from './create_rules'; export const installPrepackagedRules = ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts index c6c768a36294a..d6fc0fba71bf6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/patch_rules.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { PartialRule } from '@kbn/alerting-plugin/server'; -import { RuleParams } from '../schemas/rule_schemas'; -import { PatchRulesOptions } from './types'; +import type { PartialRule } from '@kbn/alerting-plugin/server'; +import type { RuleParams } from '../schemas/rule_schemas'; +import type { PatchRulesOptions } from './types'; import { maybeMute } from './utils'; import { convertPatchAPIToInternalSchema } from '../schemas/rule_converters'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts index ef9d867105e10..40c034ccac6c8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/read_rules.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RuleParams } from '../schemas/rule_schemas'; import { findRules } from './find_rules'; -import { isAlertType, ReadRuleOptions } from './types'; +import type { ReadRuleOptions } from './types'; +import { isAlertType } from './types'; /** * This reads the rules through a cascade try of what is fastest to what is slowest. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_object_mappings.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_object_mappings.ts index 43a37fc79438f..71505fac2d4c5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_object_mappings.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_object_mappings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; export const ruleAssetSavedObjectType = 'security-rule'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_objects_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_objects_client.ts index 93fdbc5cac20e..de1ea7987e457 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_objects_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/rule_asset/rule_asset_saved_objects_client.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { SavedObjectsClientContract, SavedObjectsFindOptions, SavedObjectsFindResponse, } from '@kbn/core/server'; import { ruleAssetSavedObjectType } from './rule_asset_saved_object_mappings'; -import { IRuleAssetSavedObject } from '../types'; +import type { IRuleAssetSavedObject } from '../types'; const DEFAULT_PAGE_SIZE = 100; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts index da4fb4499b13e..ec898c9f3f220 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/types.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { Readable } from 'stream'; +import type { Readable } from 'stream'; -import { SavedObjectAttributes, SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectAttributes, SavedObjectsClientContract } from '@kbn/core/server'; import { ruleTypeMappings } from '@kbn/securitysolution-rules'; -import { RulesClient, PartialRule, BulkEditOperation } from '@kbn/alerting-plugin/server'; -import { SanitizedRule } from '@kbn/alerting-plugin/common'; -import { UpdateRulesSchema } from '../../../../common/detection_engine/schemas/request'; -import { +import type { RulesClient, PartialRule, BulkEditOperation } from '@kbn/alerting-plugin/server'; +import type { SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { UpdateRulesSchema } from '../../../../common/detection_engine/schemas/request'; +import type { Id, IdOrUndefined, RuleIdOrUndefined, @@ -25,10 +25,10 @@ import { SortOrderOrUndefined, } from '../../../../common/detection_engine/schemas/common'; -import { RuleParams } from '../schemas/rule_schemas'; -import { IRuleExecutionLogForRoutes } from '../rule_execution_log'; -import { CreateRulesSchema } from '../../../../common/detection_engine/schemas/request/rule_schemas'; -import { PatchRulesSchema } from '../../../../common/detection_engine/schemas/request/patch_rules_schema'; +import type { RuleParams } from '../schemas/rule_schemas'; +import type { IRuleExecutionLogForRoutes } from '../rule_execution_log'; +import type { CreateRulesSchema } from '../../../../common/detection_engine/schemas/request/rule_schemas'; +import type { PatchRulesSchema } from '../../../../common/detection_engine/schemas/request/patch_rules_schema'; export type RuleAlertType = SanitizedRule; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts index 0cc97ee6b1194..b6b528c307b38 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_prepacked_rules.ts @@ -6,17 +6,17 @@ */ import { chunk } from 'lodash/fp'; -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { RulesClient, PartialRule } from '@kbn/alerting-plugin/server'; -import { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { RulesClient, PartialRule } from '@kbn/alerting-plugin/server'; +import type { AddPrepackagedRulesSchema } from '../../../../common/detection_engine/schemas/request/add_prepackaged_rules_schema'; import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../common/constants'; import { patchRules } from './patch_rules'; import { readRules } from './read_rules'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { RuleParams } from '../schemas/rule_schemas'; import { legacyMigrate } from './utils'; import { deleteRules } from './delete_rules'; import { PrepackagedRulesError } from '../routes/rules/add_prepackaged_rules_route'; -import { IRuleExecutionLogForRoutes } from '../rule_execution_log'; +import type { IRuleExecutionLogForRoutes } from '../rule_execution_log'; import { createRules } from './create_rules'; import { transformAlertToRuleAction } from '../../../../common/detection_engine/transform_actions'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts index a382fc27ed562..453a305d2e1ec 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.test.ts @@ -8,7 +8,7 @@ import { getRuleMock, resolveRuleMock } from '../routes/__mocks__/request_responses'; import { updateRules } from './update_rules'; import { getUpdateRulesOptionsMock, getUpdateMlRulesOptionsMock } from './update_rules.mock'; -import { RulesClientMock } from '@kbn/alerting-plugin/server/rules_client.mock'; +import type { RulesClientMock } from '@kbn/alerting-plugin/server/rules_client.mock'; import { getMlRuleParams, getQueryRuleParams } from '../schemas/rule_schemas.mock'; // Failing with rule registry enabled diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts index 4e077097680af..8caf5c5f71468 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/update_rules.ts @@ -6,13 +6,13 @@ */ /* eslint-disable complexity */ -import { PartialRule } from '@kbn/alerting-plugin/server'; +import type { PartialRule } from '@kbn/alerting-plugin/server'; import { DEFAULT_MAX_SIGNALS } from '../../../../common/constants'; import { transformRuleToAlertAction } from '../../../../common/detection_engine/transform_actions'; -import { UpdateRulesOptions } from './types'; +import type { UpdateRulesOptions } from './types'; import { typeSpecificSnakeToCamel } from '../schemas/rule_converters'; -import { InternalRuleUpdate, RuleParams } from '../schemas/rule_schemas'; +import type { InternalRuleUpdate, RuleParams } from '../schemas/rule_schemas'; import { maybeMute, transformToAlertThrottle, transformToNotifyWhen } from './utils'; export const updateRules = async ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts index 163fc81691739..eb5d877d01942 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.test.ts @@ -13,15 +13,15 @@ import { legacyMigrate, getUpdatedActionsParams, } from './utils'; -import { RuleAction, SanitizedRule } from '@kbn/alerting-plugin/common'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { RuleAction, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RuleParams } from '../schemas/rule_schemas'; import { NOTIFICATION_THROTTLE_NO_ACTIONS, NOTIFICATION_THROTTLE_RULE, } from '../../../../common/constants'; -import { FullResponseSchema } from '../../../../common/detection_engine/schemas/request'; +import type { FullResponseSchema } from '../../../../common/detection_engine/schemas/request'; // eslint-disable-next-line no-restricted-imports -import { LegacyRuleActions } from '../rule_actions/legacy_types'; +import type { LegacyRuleActions } from '../rule_actions/legacy_types'; import { getEmptyFindResult, legacyGetSiemNotificationRuleActionsSOResultWithSingleHit, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts index 6f68e6b57f799..bab2f63007e9a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rules/utils.ts @@ -6,25 +6,25 @@ */ import { isEmpty } from 'lodash/fp'; -import { SavedObjectReference } from '@kbn/core/server'; -import { RuleAction, RuleNotifyWhenType, SanitizedRule } from '@kbn/alerting-plugin/common'; -import { RulesClient } from '@kbn/alerting-plugin/server'; -import { RuleParams } from '../schemas/rule_schemas'; +import type { SavedObjectReference } from '@kbn/core/server'; +import type { RuleAction, RuleNotifyWhenType, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; +import type { RuleParams } from '../schemas/rule_schemas'; import { NOTIFICATION_THROTTLE_NO_ACTIONS, NOTIFICATION_THROTTLE_RULE, } from '../../../../common/constants'; // eslint-disable-next-line no-restricted-imports -import { +import type { LegacyIRuleActionsAttributes, LegacyRuleActions, LegacyRuleAlertSavedObjectAction, } from '../rule_actions/legacy_types'; -import { FullResponseSchema } from '../../../../common/detection_engine/schemas/request'; +import type { FullResponseSchema } from '../../../../common/detection_engine/schemas/request'; import { transformAlertToRuleAction } from '../../../../common/detection_engine/transform_actions'; // eslint-disable-next-line no-restricted-imports import { legacyRuleActionsSavedObjectType } from '../rule_actions/legacy_saved_object_mappings'; -import { LegacyMigrateParams } from './types'; +import type { LegacyMigrateParams } from './types'; /** * Given a throttle from a "security_solution" rule this will transform it into an "alerting" notifyWhen diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_converters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_converters.ts index 51d45b0c7227f..1565c2c61255f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_converters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_converters.ts @@ -11,12 +11,12 @@ import { BadRequestError } from '@kbn/securitysolution-es-utils'; import { ruleTypeMappings } from '@kbn/securitysolution-rules'; import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; -import { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; +import type { ResolvedSanitizedRule, SanitizedRule } from '@kbn/alerting-plugin/common'; import { normalizeMachineLearningJobIds, normalizeThresholdObject, } from '../../../../common/detection_engine/utils'; -import { +import type { InternalRuleCreate, RuleParams, TypeSpecificRuleParams, @@ -36,31 +36,33 @@ import { InternalRuleUpdate, } from './rule_schemas'; import { assertUnreachable } from '../../../../common/utility_types'; -import { +import type { RelatedIntegrationArray, RequiredFieldArray, RuleExecutionSummary, SetupGuide, } from '../../../../common/detection_engine/schemas/common'; import { + eqlPatchParams, + machineLearningPatchParams, + queryPatchParams, + savedQueryPatchParams, + threatMatchPatchParams, + thresholdPatchParams, +} from '../../../../common/detection_engine/schemas/request'; +import type { CreateRulesSchema, CreateTypeSpecific, - eqlPatchParams, EqlPatchParams, FullResponseSchema, - machineLearningPatchParams, MachineLearningPatchParams, - queryPatchParams, QueryPatchParams, ResponseTypeSpecific, - savedQueryPatchParams, SavedQueryPatchParams, - threatMatchPatchParams, ThreatMatchPatchParams, - thresholdPatchParams, ThresholdPatchParams, } from '../../../../common/detection_engine/schemas/request'; -import { PatchRulesSchema } from '../../../../common/detection_engine/schemas/request/patch_rules_schema'; +import type { PatchRulesSchema } from '../../../../common/detection_engine/schemas/request/patch_rules_schema'; import { DEFAULT_INDICATOR_SOURCE_PATH, DEFAULT_MAX_SIGNALS, @@ -74,12 +76,12 @@ import { transformActions, } from '../rules/utils'; // eslint-disable-next-line no-restricted-imports -import { LegacyRuleActions } from '../rule_actions/legacy_types'; +import type { LegacyRuleActions } from '../rule_actions/legacy_types'; import { mergeRuleExecutionSummary } from '../rule_execution_log'; // These functions provide conversions from the request API schema to the internal rule schema and from the internal rule schema // to the response API schema. This provides static type-check assurances that the internal schema is in sync with the API schema for -// required and defaultable fields. However, it is still possible to add an optional field to the API schema +// required and default-able fields. However, it is still possible to add an optional field to the API schema // without causing a type-check error here. // Converts params from the snake case API format to the internal camel case format AND applies default values where needed. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.mock.ts index 5aaebd5ad05e9..ba071176c5a1f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.mock.ts @@ -8,7 +8,7 @@ import { getThreatMock } from '../../../../common/detection_engine/schemas/types/threat.mock'; import { getListArrayMock } from '../../../../common/detection_engine/schemas/types/lists.mock'; import { getThreatMappingMock } from '../signals/threat_mapping/build_threat_mapping_filter.mock'; -import { +import type { BaseRuleParams, CompleteRule, EqlRuleParams, @@ -19,7 +19,7 @@ import { ThreatRuleParams, ThresholdRuleParams, } from './rule_schemas'; -import { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; +import type { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; import { sampleRuleGuid } from '../signals/__mocks__/es_results'; const getBaseRuleParams = (): BaseRuleParams => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.ts index 4bc65a21f620b..d6002c5a1c026 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/schemas/rule_schemas.ts @@ -37,7 +37,7 @@ import { SAVED_QUERY_RULE_TYPE_ID, } from '@kbn/securitysolution-rules'; -import { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; +import type { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; import { author, buildingBlockTypeOrUndefined, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/empty_signal_source_hit.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/empty_signal_source_hit.ts index 805a401f782fa..2ef49a5ebff36 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/empty_signal_source_hit.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/empty_signal_source_hit.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SignalSourceHit } from '../types'; +import type { SignalSourceHit } from '../types'; /** * Simple empty Elasticsearch result for testing diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts index f17e0ea9d2b48..3a2e0e4eb6891 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/es_results.ts @@ -16,11 +16,11 @@ import type { AlertAttributes, AlertSourceHit, } from '../types'; -import { SavedObject } from '@kbn/core/server'; +import type { SavedObject } from '@kbn/core/server'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { getListArrayMock } from '../../../../../common/detection_engine/schemas/types/lists.mock'; -import { RulesSchema } from '../../../../../common/detection_engine/schemas/response'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RulesSchema } from '../../../../../common/detection_engine/schemas/response'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { getThreatMock } from '../../../../../common/detection_engine/schemas/types/threat.mock'; import { ALERT_BUILDING_BLOCK_TYPE, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/threshold_signal_history.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/threshold_signal_history.mock.ts index 4daa0de79ac30..4c43bd9ee1bde 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/threshold_signal_history.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/__mocks__/threshold_signal_history.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ThresholdSignalHistory } from '../types'; +import type { ThresholdSignalHistory } from '../types'; import { getThresholdTermsHash } from '../utils'; export const sampleThresholdSignalHistory = (): ThresholdSignalHistory => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts index adb395eb49945..3dd99219f5a20 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/build_events_query.ts @@ -5,9 +5,9 @@ * 2.0. */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { isEmpty } from 'lodash'; -import { +import type { FiltersOrUndefined, TimestampOverrideOrUndefined, } from '../../../../common/detection_engine/schemas/common/schemas'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts index e38ee3952cadb..ef8662960d0a5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/bulk_create_ml_signals.ts @@ -8,19 +8,19 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { flow, omit } from 'lodash/fp'; import set from 'set-value'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { GenericBulkCreateResponse } from '../rule_types/factories'; -import { Anomaly } from '../../machine_learning'; -import { BuildRuleMessage } from './rule_messages'; -import { BulkCreate, WrapHits } from './types'; -import { CompleteRule, MachineLearningRuleParams } from '../schemas/rule_schemas'; +import type { GenericBulkCreateResponse } from '../rule_types/factories'; +import type { Anomaly } from '../../machine_learning'; +import type { BuildRuleMessage } from './rule_messages'; +import type { BulkCreate, WrapHits } from './types'; +import type { CompleteRule, MachineLearningRuleParams } from '../schemas/rule_schemas'; import { buildReasonMessageForMlAlert } from './reason_formatters'; -import { BaseFieldsLatest } from '../../../../common/detection_engine/schemas/alerts'; +import type { BaseFieldsLatest } from '../../../../common/detection_engine/schemas/alerts'; interface BulkCreateMlSignalsParams { anomalyHits: Array>; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.test.ts index 182c10e13970c..6077ebe1ef1ad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.test.ts @@ -7,7 +7,8 @@ import dateMath from '@kbn/datemath'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { eqlExecutor } from './eql'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { getEntryListMock } from '@kbn/lists-plugin/common/schemas/types/entry_list.mock'; @@ -15,7 +16,7 @@ import { getCompleteRuleMock, getEqlRuleParams } from '../../schemas/rule_schema import { getIndexVersion } from '../../routes/index/get_index_version'; import { SIGNALS_TEMPLATE_VERSION } from '../../routes/index/get_signals_template'; import { allowedExperimentalValues } from '../../../../../common/experimental_features'; -import { EqlRuleParams } from '../../schemas/rule_schemas'; +import type { EqlRuleParams } from '../../schemas/rule_schemas'; import { DEFAULT_INDEX_PATTERN } from '../../../../../common/constants'; jest.mock('../../routes/index/get_index_version'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.ts index c78fc6bbb2451..e61f68d0e5e8b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/eql.ts @@ -7,8 +7,8 @@ import { performance } from 'perf_hooks'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, @@ -18,7 +18,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { buildEqlSearchRequest } from '../build_events_query'; import { hasLargeValueItem } from '../../../../../common/detection_engine/utils'; -import { +import type { BulkCreate, WrapHits, WrapSequences, @@ -27,11 +27,11 @@ import { SignalSource, } from '../types'; import { createSearchAfterReturnType, makeFloatString } from '../utils'; -import { ExperimentalFeatures } from '../../../../../common/experimental_features'; +import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; import { buildReasonMessageForEqlAlert } from '../reason_formatters'; -import { CompleteRule, EqlRuleParams } from '../../schemas/rule_schemas'; +import type { CompleteRule, EqlRuleParams } from '../../schemas/rule_schemas'; import { withSecuritySpan } from '../../../../utils/with_security_span'; -import { +import type { BaseFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/detection_engine/schemas/alerts'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.test.ts index 94a363333f1e5..c838f3243fc33 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.test.ts @@ -7,7 +7,8 @@ import dateMath from '@kbn/datemath'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { mlExecutor } from './ml'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { getCompleteRuleMock, getMlRuleParams } from '../../schemas/rule_schemas.mock'; @@ -16,7 +17,7 @@ import { getListClientMock } from '@kbn/lists-plugin/server/services/lists/list_ import { findMlSignals } from '../find_ml_signals'; import { bulkCreateMlSignals } from '../bulk_create_ml_signals'; import { mlPluginServerMock } from '@kbn/ml-plugin/server/mocks'; -import { MachineLearningRuleParams } from '../../schemas/rule_schemas'; +import type { MachineLearningRuleParams } from '../../schemas/rule_schemas'; jest.mock('../find_ml_signals'); jest.mock('../bulk_create_ml_signals'); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.ts index 22c11b565e909..4e568128e9f03 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/ml.ts @@ -5,23 +5,23 @@ * 2.0. */ -import { KibanaRequest, Logger } from '@kbn/core/server'; +import type { KibanaRequest, Logger } from '@kbn/core/server'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ListClient } from '@kbn/lists-plugin/server'; +import type { ListClient } from '@kbn/lists-plugin/server'; import { isJobStarted } from '../../../../../common/machine_learning/helpers'; -import { CompleteRule, MachineLearningRuleParams } from '../../schemas/rule_schemas'; +import type { CompleteRule, MachineLearningRuleParams } from '../../schemas/rule_schemas'; import { bulkCreateMlSignals } from '../bulk_create_ml_signals'; import { filterEventsAgainstList } from '../filters/filter_events_against_list'; import { findMlSignals } from '../find_ml_signals'; -import { BuildRuleMessage } from '../rule_messages'; -import { BulkCreate, RuleRangeTuple, WrapHits } from '../types'; +import type { BuildRuleMessage } from '../rule_messages'; +import type { BulkCreate, RuleRangeTuple, WrapHits } from '../types'; import { createErrorsFromShard, createSearchAfterReturnType, mergeReturns } from '../utils'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { withSecuritySpan } from '../../../../utils/with_security_span'; export const mlExecutor = async ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts index 3e51dc9f117ab..43b8e2a788e70 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/query.ts @@ -5,23 +5,27 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ListClient } from '@kbn/lists-plugin/server'; +import type { ListClient } from '@kbn/lists-plugin/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getFilter } from '../get_filter'; import { searchAfterAndBulkCreate } from '../search_after_bulk_create'; -import { RuleRangeTuple, BulkCreate, WrapHits } from '../types'; -import { ITelemetryEventsSender } from '../../../telemetry/sender'; -import { BuildRuleMessage } from '../rule_messages'; -import { CompleteRule, SavedQueryRuleParams, QueryRuleParams } from '../../schemas/rule_schemas'; -import { ExperimentalFeatures } from '../../../../../common/experimental_features'; +import type { RuleRangeTuple, BulkCreate, WrapHits } from '../types'; +import type { ITelemetryEventsSender } from '../../../telemetry/sender'; +import type { BuildRuleMessage } from '../rule_messages'; +import type { + CompleteRule, + SavedQueryRuleParams, + QueryRuleParams, +} from '../../schemas/rule_schemas'; +import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; import { buildReasonMessageForQueryAlert } from '../reason_formatters'; import { withSecuritySpan } from '../../../../utils/with_security_span'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threat_match.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threat_match.ts index 4955917fbabe7..bcd90e45defc8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threat_match.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threat_match.ts @@ -5,22 +5,22 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ListClient } from '@kbn/lists-plugin/server'; -import { RuleRangeTuple, BulkCreate, WrapHits } from '../types'; -import { ITelemetryEventsSender } from '../../../telemetry/sender'; -import { BuildRuleMessage } from '../rule_messages'; +import type { ListClient } from '@kbn/lists-plugin/server'; +import type { RuleRangeTuple, BulkCreate, WrapHits } from '../types'; +import type { ITelemetryEventsSender } from '../../../telemetry/sender'; +import type { BuildRuleMessage } from '../rule_messages'; import { createThreatSignals } from '../threat_mapping/create_threat_signals'; -import { CompleteRule, ThreatRuleParams } from '../../schemas/rule_schemas'; -import { ExperimentalFeatures } from '../../../../../common/experimental_features'; +import type { CompleteRule, ThreatRuleParams } from '../../schemas/rule_schemas'; +import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; import { withSecuritySpan } from '../../../../utils/with_security_span'; import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts index ae39ef56d812a..c1954edd7e5f0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.test.ts @@ -9,7 +9,8 @@ import dateMath from '@kbn/datemath'; import { loggingSystemMock } from '@kbn/core/server/mocks'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { thresholdExecutor } from './threshold'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; import { getEntryListMock } from '@kbn/lists-plugin/common/schemas/types/entry_list.mock'; @@ -17,7 +18,7 @@ import { getThresholdRuleParams, getCompleteRuleMock } from '../../schemas/rule_ import { buildRuleMessageFactory } from '../rule_messages'; import { sampleEmptyDocSearchResults } from '../__mocks__/es_results'; import { allowedExperimentalValues } from '../../../../../common/experimental_features'; -import { ThresholdRuleParams } from '../../schemas/rule_schemas'; +import type { ThresholdRuleParams } from '../../schemas/rule_schemas'; import { createRuleDataClientMock } from '@kbn/rule-registry-plugin/server/rule_data_client/rule_data_client.mock'; describe('threshold_executor', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.ts index 7d7481a79bf89..b52cac1a2066f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/executors/threshold.ts @@ -5,20 +5,20 @@ * 2.0. */ -import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { IRuleDataReader } from '@kbn/rule-registry-plugin/server'; +import type { IRuleDataReader } from '@kbn/rule-registry-plugin/server'; import { hasLargeValueItem } from '../../../../../common/detection_engine/utils'; -import { CompleteRule, ThresholdRuleParams } from '../../schemas/rule_schemas'; +import type { CompleteRule, ThresholdRuleParams } from '../../schemas/rule_schemas'; import { getFilter } from '../get_filter'; import { bulkCreateThresholdSignals, @@ -26,7 +26,7 @@ import { getThresholdBucketFilters, getThresholdSignalHistory, } from '../threshold'; -import { +import type { BulkCreate, RuleRangeTuple, SearchAfterAndBulkCreateReturnType, @@ -38,8 +38,8 @@ import { createSearchAfterReturnTypeFromResponse, mergeReturns, } from '../utils'; -import { BuildRuleMessage } from '../rule_messages'; -import { ExperimentalFeatures } from '../../../../../common/experimental_features'; +import type { BuildRuleMessage } from '../rule_messages'; +import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; import { withSecuritySpan } from '../../../../utils/with_security_span'; import { buildThresholdSignalHistory } from '../threshold/build_signal_history'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_field_and_set_tuples.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_field_and_set_tuples.ts index 40322029c1d98..0d58a4f7be078 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_field_and_set_tuples.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_field_and_set_tuples.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { EntryList, entriesList } from '@kbn/securitysolution-io-ts-list-types'; +import type { EntryList } from '@kbn/securitysolution-io-ts-list-types'; +import { entriesList } from '@kbn/securitysolution-io-ts-list-types'; import { createSetToFilterAgainst } from './create_set_to_filter_against'; -import { CreateFieldAndSetTuplesOptions, FieldSet } from './types'; +import type { CreateFieldAndSetTuplesOptions, FieldSet } from './types'; export const createFieldAndSetTuples = async ({ events, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_set_to_filter_against.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_set_to_filter_against.ts index d400cc901a3ed..97369f269a7a0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_set_to_filter_against.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/create_set_to_filter_against.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CreateSetToFilterAgainstOptions } from './types'; +import type { CreateSetToFilterAgainstOptions } from './types'; /** * Creates a field set to filter against using the stringed version of the diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.test.ts index bed5f96fbc233..94fa5f01358be 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.test.ts @@ -10,7 +10,7 @@ import { sampleDocWithSortId } from '../__mocks__/es_results'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { getSearchListItemResponseMock } from '@kbn/lists-plugin/common/schemas/response/search_list_item_schema.mock'; import { partitionEvents } from './filter_events'; -import { FieldSet } from './types'; +import type { FieldSet } from './types'; describe('partitionEvents', () => { let listClient = listMock.getListClient(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.ts index aee98b7e0ff5b..9f8fc026ccb6d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { partition } from 'lodash'; -import { FilterEventsOptions } from './types'; +import type { FilterEventsOptions } from './types'; /** * Check if for each tuple, the entry is not in both for when two or more value list entries exist. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events_against_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events_against_list.ts index 7b9f6fde51842..91fa599e9e207 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events_against_list.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/filter_events_against_list.ts @@ -5,11 +5,12 @@ * 2.0. */ -import { entriesList, ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import { entriesList } from '@kbn/securitysolution-io-ts-list-types'; import { hasLargeValueList } from '@kbn/securitysolution-list-utils'; -import { FilterEventsAgainstListOptions, FilterEventsAgainstListReturn } from './types'; +import type { FilterEventsAgainstListOptions, FilterEventsAgainstListReturn } from './types'; import { partitionEvents } from './filter_events'; import { createFieldAndSetTuples } from './create_field_and_set_tuples'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/types.ts index f5d438f54bdb3..114dd5ee43f1c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/filters/types.ts @@ -5,11 +5,11 @@ * 2.0. */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { Type, ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { ListClient } from '@kbn/lists-plugin/server'; -import { BuildRuleMessage } from '../rule_messages'; +import type { ListClient } from '@kbn/lists-plugin/server'; +import type { BuildRuleMessage } from '../rule_messages'; export interface FilterEventsAgainstListOptions { listClient: ListClient; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts index f06d62b8cf302..195225e9b327d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/find_ml_signals.ts @@ -8,9 +8,10 @@ import dateMath from '@kbn/datemath'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { AnomalyResults, getAnomalies } from '../../machine_learning'; +import type { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { AnomalyResults } from '../../machine_learning'; +import { getAnomalies } from '../../machine_learning'; export const findMlSignals = async ({ ml, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts index 60d630d3e1178..bc82d7c0d3111 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.test.ts @@ -6,7 +6,8 @@ */ import { getFilter } from './get_filter'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; describe('get_filter', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts index 8b7a531db78b4..dfaf986f348df 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_filter.ts @@ -6,23 +6,27 @@ */ import { BadRequestError } from '@kbn/securitysolution-es-utils'; -import { Type, LanguageOrUndefined, Language } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + Type, + LanguageOrUndefined, + Language, +} from '@kbn/securitysolution-io-ts-alerting-types'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; import { assertUnreachable } from '../../../../common/utility_types'; import { getQueryFilter } from '../../../../common/detection_engine/get_query_filter'; -import { +import type { QueryOrUndefined, SavedIdOrUndefined, IndexOrUndefined, } from '../../../../common/detection_engine/schemas/common/schemas'; -import { PartialFilter } from '../types'; +import type { PartialFilter } from '../types'; import { withSecuritySpan } from '../../../utils/with_security_span'; -import { ESBoolQuery } from '../../../../common/typed_json'; +import type { ESBoolQuery } from '../../../../common/typed_json'; interface GetFilterArgs { type: Type; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts index 410be81a0ff9f..60f98a32dad87 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.test.ts @@ -5,12 +5,14 @@ * 2.0. */ -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import type { MockedLogger } from '@kbn/logging-mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; -import { getInputIndex, GetInputIndex } from './get_input_output_index'; +import type { GetInputIndex } from './get_input_output_index'; +import { getInputIndex } from './get_input_output_index'; describe('get_input_output_index', () => { let servicesMock: RuleExecutorServicesMock; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts index 29bedb1c2a0a4..796c9ff2598a8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/get_input_output_index.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { DataViewAttributes } from '@kbn/data-views-plugin/common'; +import type { DataViewAttributes } from '@kbn/data-views-plugin/common'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { DEFAULT_INDEX_KEY, DEFAULT_INDEX_PATTERN } from '../../../../common/constants'; import { withSecuritySpan } from '../../../utils/with_security_span'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.test.ts index 82f3ff46b347d..ffd9e2b46d48f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.test.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { RiskScore, RiskScoreMappingOrUndefined } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + RiskScore, + RiskScoreMappingOrUndefined, +} from '@kbn/securitysolution-io-ts-alerting-types'; import { sampleDocRiskScore } from '../__mocks__/es_results'; -import { - buildRiskScoreFromMapping, - BuildRiskScoreFromMappingReturn, -} from './build_risk_score_from_mapping'; +import type { BuildRiskScoreFromMappingReturn } from './build_risk_score_from_mapping'; +import { buildRiskScoreFromMapping } from './build_risk_score_from_mapping'; describe('buildRiskScoreFromMapping', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.ts index 7253b24e66088..9e875165cf469 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_risk_score_from_mapping.ts @@ -5,10 +5,13 @@ * 2.0. */ -import { RiskScore, RiskScoreMappingOrUndefined } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + RiskScore, + RiskScoreMappingOrUndefined, +} from '@kbn/securitysolution-io-ts-alerting-types'; import { get } from 'lodash/fp'; -import { Meta } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { SignalSource } from '../types'; +import type { Meta } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { SignalSource } from '../types'; export interface BuildRiskScoreFromMappingProps { eventSource: SignalSource; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_rule_name_from_mapping.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_rule_name_from_mapping.ts index f10041546fc51..ae7247c01b1af 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_rule_name_from_mapping.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_rule_name_from_mapping.ts @@ -7,12 +7,12 @@ import * as t from 'io-ts'; import { get } from 'lodash/fp'; -import { +import type { Meta, Name, RuleNameOverrideOrUndefined, } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { SignalSource } from '../types'; +import type { SignalSource } from '../types'; interface BuildRuleNameFromMappingProps { eventSource: SignalSource; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.test.ts index 4ccf24a307cc4..75e53cdf0ae4c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.test.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { Severity, SeverityMappingOrUndefined } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + Severity, + SeverityMappingOrUndefined, +} from '@kbn/securitysolution-io-ts-alerting-types'; import { sampleDocSeverity } from '../__mocks__/es_results'; -import { - buildSeverityFromMapping, - BuildSeverityFromMappingReturn, -} from './build_severity_from_mapping'; +import type { BuildSeverityFromMappingReturn } from './build_severity_from_mapping'; +import { buildSeverityFromMapping } from './build_severity_from_mapping'; const ECS_FIELD = 'event.severity'; const ANY_FIELD = 'event.my_custom_severity'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.ts index 652b6b2221900..4a57467040b5e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/mappings/build_severity_from_mapping.ts @@ -7,15 +7,15 @@ import { get } from 'lodash/fp'; -import { +import type { Severity, SeverityMappingItem, - severity as SeverityIOTS, SeverityMappingOrUndefined, } from '@kbn/securitysolution-io-ts-alerting-types'; -import { Meta } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { SearchTypes } from '../../../../../common/detection_engine/types'; -import { SignalSource } from '../types'; +import { severity as SeverityIOTS } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { Meta } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { SearchTypes } from '../../../../../common/detection_engine/types'; +import type { SignalSource } from '../types'; export interface BuildSeverityFromMappingProps { eventSource: SignalSource; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts index a1d78386fa1ea..40bb3e3ef41e4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/alert_instance_factory_stub.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { AlertInstanceContext, AlertInstanceState, RuleTypeState, } from '@kbn/alerting-plugin/common'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { Alert } from '@kbn/alerting-plugin/server/alert'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; export const alertInstanceFactoryStub = < TParams extends RuleParams, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/preview_rule_execution_logger.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/preview_rule_execution_logger.ts index 55ce5913e5903..f7a05d618ee99 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/preview_rule_execution_logger.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/preview/preview_rule_execution_logger.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { RuleExecutionLogForExecutorsFactory, RuleExecutionContext, StatusChangeArgs, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatter.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatter.test.ts index d2d3638288868..67deaec8e1d23 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatter.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatter.test.ts @@ -6,7 +6,7 @@ */ import { buildReasonMessageUtil } from './reason_formatters'; -import { SignalSourceHit } from './types'; +import type { SignalSourceHit } from './types'; describe('reason_formatter', () => { let name: string; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatters.ts index e30bf9a265193..04eb6cf6f4260 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/reason_formatters.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { getOr } from 'lodash/fp'; -import { SignalSourceHit } from './types'; +import type { SignalSourceHit } from './types'; export interface BuildReasonMessageArgs { name: string; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts index 7a0c7df8b41aa..35cefcaad8189 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/rule_messages.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { BuildRuleMessageFactoryParams, buildRuleMessageFactory } from './rule_messages'; +import type { BuildRuleMessageFactoryParams } from './rule_messages'; +import { buildRuleMessageFactory } from './rule_messages'; describe('buildRuleMessageFactory', () => { let factoryParams: BuildRuleMessageFactoryParams; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_data_view.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_data_view.ts index c2f4118134c39..3cbe4d4b1c980 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_data_view.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_data_view.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; -import { +import type { EqlRuleParams, QueryRuleParams, ThreatRuleParams, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.test.ts index 367f9f32d8716..68d262961bfa1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.test.ts @@ -7,7 +7,7 @@ import { extractExceptionsList } from './extract_exceptions_list'; import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { EXCEPTION_LIST_NAMESPACE, EXCEPTION_LIST_NAMESPACE_AGNOSTIC, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.ts index 34b5b2d205d20..87e607bb3b9a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_exceptions_list.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectType } from '@kbn/securitysolution-list-utils'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { getSavedObjectNamePatternForExceptionsList } from './utils'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.test.ts index 94f4a5f8d7c68..76325e187b005 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { extractReferences } from './extract_references'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { EXCEPTION_LIST_NAMESPACE, EXCEPTION_LIST_NAMESPACE_AGNOSTIC, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.ts index 58e231eff1b81..8ec99fa6d228d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/extract_references.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { RuleParamsAndRefs } from '@kbn/alerting-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { RuleParamsAndRefs } from '@kbn/alerting-plugin/server'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { isEqlParams, isQueryParams, isThresholdParams, isThreatParams } from '../utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.test.ts index 3c1cd7ed6f865..7c4e131fa1889 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.test.ts @@ -6,7 +6,7 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { injectDataViewReferences } from './inject_data_view'; describe('inject_data_view', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.ts index 6a877a99ead77..023222c984223 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_data_view.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectReferenceForDataView } from './utils'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.test.ts index 343a476dabefc..4d086970e458e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.test.ts @@ -6,10 +6,10 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { EXCEPTION_LIST_NAMESPACE } from '@kbn/securitysolution-list-constants'; import { injectExceptionsReferences } from './inject_exceptions_list'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { EXCEPTIONS_SAVED_OBJECT_REFERENCE_NAME } from './utils/constants'; describe('inject_exceptions_list', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.ts index 19513dab20791..84a2c30c2e7ee 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_exceptions_list.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { getSavedObjectReferenceForExceptionsList, logMissingSavedObjectError } from './utils'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.test.ts index daffc56731633..3d7b17e5b6e89 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.test.ts @@ -6,10 +6,10 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { EXCEPTION_LIST_NAMESPACE } from '@kbn/securitysolution-list-constants'; import { injectReferences } from './inject_references'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { EXCEPTIONS_SAVED_OBJECT_REFERENCE_NAME } from './utils/constants'; describe('inject_references', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.ts index a4523e3e72600..bae0e0749a62b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/inject_references.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; -import { RuleParams } from '../../schemas/rule_schemas'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { RuleParams } from '../../schemas/rule_schemas'; import { isMachineLearningParams } from '../utils'; import { injectExceptionsReferences } from './inject_exceptions_list'; import { injectDataViewReferences } from './inject_data_view'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.test.ts index d64d024c67e76..3f43be5f8f468 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.test.ts @@ -6,7 +6,7 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectReference } from '.'; describe('get_saved_object_reference', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.ts index dca564b9a495b..36f579caa28a5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectNamePattern } from './get_saved_object_name_pattern'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.test.ts index ae39160ba93e1..ee087a2dd6a58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.test.ts @@ -6,7 +6,7 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectReferenceForDataView } from '.'; describe('get_saved_object_reference_for_data_view', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.ts index 476279845210b..f36cb3d1935f1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_data_view.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; import { getSavedObjectReference } from './get_saved_object_reference'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.test.ts index 7bb10a83053e4..dda978248cad9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.test.ts @@ -6,7 +6,7 @@ */ import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { EXCEPTIONS_SAVED_OBJECT_REFERENCE_NAME, getSavedObjectReferenceForExceptionsList, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.ts index ddb073da8ef96..df234093f587c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/get_saved_object_reference_for_exceptions_list.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger, SavedObjectReference } from '@kbn/core/server'; +import type { Logger, SavedObjectReference } from '@kbn/core/server'; import { EXCEPTIONS_SAVED_OBJECT_REFERENCE_NAME } from './constants'; import { getSavedObjectReference } from './get_saved_object_reference'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/log_missing_saved_object_error.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/log_missing_saved_object_error.ts index 4a3ce53d138a8..203d6ce342d4c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/log_missing_saved_object_error.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/saved_object_references/utils/log_missing_saved_object_error.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { RuleParams } from '../../../schemas/rule_schemas'; +import type { Logger } from '@kbn/core/server'; +import type { RuleParams } from '../../../schemas/rule_schemas'; type Keys = keyof RuleParams; type PossibleRuleParamValues = RuleParams[Keys]; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts index 10263cbde5740..d8801190cc0ed 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.test.ts @@ -15,11 +15,12 @@ import { sampleDocWithSortId, } from './__mocks__/es_results'; import { searchAfterAndBulkCreate } from './search_after_bulk_create'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import uuid from 'uuid'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; -import { BulkCreate, BulkResponse, RuleRangeTuple, WrapHits } from './types'; +import type { BulkCreate, BulkResponse, RuleRangeTuple, WrapHits } from './types'; import type { SearchListItemArraySchema } from '@kbn/securitysolution-io-ts-list-types'; import { getSearchListItemResponseMock } from '@kbn/lists-plugin/common/schemas/response/search_list_item_schema.mock'; import { getRuleRangeTuples } from './utils'; @@ -29,10 +30,10 @@ import { getCompleteRuleMock, getQueryRuleParams } from '../schemas/rule_schemas import { bulkCreateFactory } from '../rule_types/factories/bulk_create_factory'; import { wrapHitsFactory } from '../rule_types/factories/wrap_hits_factory'; import { mockBuildRuleMessage } from './__mocks__/build_rule_message.mock'; -import { BuildReasonMessage } from './reason_formatters'; -import { QueryRuleParams } from '../schemas/rule_schemas'; +import type { BuildReasonMessage } from './reason_formatters'; +import type { QueryRuleParams } from '../schemas/rule_schemas'; import { createPersistenceServicesMock } from '@kbn/rule-registry-plugin/server/utils/create_persistence_rule_type_wrapper.mock'; -import { PersistenceServices } from '@kbn/rule-registry-plugin/server'; +import type { PersistenceServices } from '@kbn/rule-registry-plugin/server'; import { ALERT_RULE_CATEGORY, ALERT_RULE_CONSUMER, @@ -46,7 +47,7 @@ import { TIMESTAMP, } from '@kbn/rule-data-utils'; import { SERVER_APP_ID } from '../../../../common/constants'; -import { CommonAlertFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; +import type { CommonAlertFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; const buildRuleMessage = mockBuildRuleMessage; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts index dbd43e5228e62..7f9e93920dbd6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/search_after_bulk_create.ts @@ -19,7 +19,7 @@ import { mergeSearchResults, getSafeSortIds, } from './utils'; -import { SearchAfterAndBulkCreateParams, SearchAfterAndBulkCreateReturnType } from './types'; +import type { SearchAfterAndBulkCreateParams, SearchAfterAndBulkCreateReturnType } from './types'; import { withSecuritySpan } from '../../../utils/with_security_span'; // search_after through documents and re-index using bulk endpoint. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/send_telemetry_events.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/send_telemetry_events.ts index e419fdf632137..a8ded1ea3f063 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/send_telemetry_events.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/send_telemetry_events.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { ITelemetryEventsSender } from '../../telemetry/sender'; -import { TelemetryEvent } from '../../telemetry/types'; -import { BuildRuleMessage } from './rule_messages'; -import { SignalSource, SignalSourceHit } from './types'; +import type { Logger } from '@kbn/core/server'; +import type { ITelemetryEventsSender } from '../../telemetry/sender'; +import type { TelemetryEvent } from '../../telemetry/types'; +import type { BuildRuleMessage } from './rule_messages'; +import type { SignalSource, SignalSourceHit } from './types'; interface SearchResultSource { _source: SignalSource; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts index cc7883ede6c33..bfc0bd6daff76 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/siem_rule_action_groups.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { ActionGroup } from '@kbn/alerting-plugin/common'; +import type { ActionGroup } from '@kbn/alerting-plugin/common'; export const siemRuleActionGroups: Array> = [ { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts index d57716fa661c9..d532e4923441f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.test.ts @@ -11,7 +11,8 @@ import { sampleDocSearchResultsWithSortId, } from './__mocks__/es_results'; import { singleSearchAfter } from './single_search_after'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { buildRuleMessageFactory } from './rule_messages'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { elasticsearchClientMock } from '@kbn/core/server/elasticsearch/client/mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts index bd26900bfda6e..ac9a001257ca2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/single_search_after.ts @@ -6,17 +6,17 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { performance } from 'perf_hooks'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { SignalSearchResponse, SignalSource } from './types'; -import { BuildRuleMessage } from './rule_messages'; +import type { BuildRuleMessage } from './rule_messages'; import { buildEventsSearchQuery } from './build_events_query'; import { createErrorsFromShard, makeFloatString } from './utils'; -import { TimestampOverrideOrUndefined } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { TimestampOverrideOrUndefined } from '../../../../common/detection_engine/schemas/common/schemas'; import { withSecuritySpan } from '../../../utils/with_security_span'; interface SingleSearchAfterParams { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts index 15164842fe0d6..636a0bbb3de6f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/get_strategy.ts @@ -7,7 +7,7 @@ import { assertUnreachable } from '../../../../../../common/utility_types'; import type { ConfigType } from '../../../../../config'; -import { MergeStrategyFunction } from '../types'; +import type { MergeStrategyFunction } from '../types'; import { mergeAllFieldsWithSource } from './merge_all_fields_with_source'; import { mergeMissingFieldsWithSource } from './merge_missing_fields_with_source'; import { mergeNoFields } from './merge_no_fields'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.test.ts index 6af82d3a71028..74445d4be790a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.test.ts @@ -6,7 +6,7 @@ */ import { mergeAllFieldsWithSource } from './merge_all_fields_with_source'; -import { SignalSourceHit } from '../../types'; +import type { SignalSourceHit } from '../../types'; import { emptyEsResult } from '../../__mocks__/empty_signal_source_hit'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.ts index ade83b88d526b..f4851e77f2048 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_all_fields_with_source.ts @@ -7,7 +7,7 @@ import { get } from 'lodash/fp'; import { set } from '@elastic/safer-lodash-set/fp'; -import { SignalSource } from '../../types'; +import type { SignalSource } from '../../types'; import { filterFieldEntries } from '../utils/filter_field_entries'; import type { FieldsType, MergeStrategyFunction } from '../types'; import { isObjectLikeOrArrayOfObjectLikes } from '../utils/is_objectlike_or_array_of_objectlikes'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.test.ts index 612bff75792da..eb21579ddea87 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.test.ts @@ -6,7 +6,7 @@ */ import { mergeMissingFieldsWithSource } from './merge_missing_fields_with_source'; -import { SignalSourceHit } from '../../types'; +import type { SignalSourceHit } from '../../types'; import { emptyEsResult } from '../../__mocks__/empty_signal_source_hit'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.ts index 611a3ad879705..28269652ae5e8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_missing_fields_with_source.ts @@ -7,7 +7,7 @@ import { get } from 'lodash/fp'; import { set } from '@elastic/safer-lodash-set/fp'; -import { SignalSource } from '../../types'; +import type { SignalSource } from '../../types'; import { filterFieldEntries } from '../utils/filter_field_entries'; import type { FieldsType, MergeStrategyFunction } from '../types'; import { recursiveUnboxingFields } from '../utils/recursive_unboxing_fields'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_no_fields.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_no_fields.ts index 5e26b619fbdfa..5ddca6c1807b9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_no_fields.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/strategies/merge_no_fields.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MergeStrategyFunction } from '../types'; +import type { MergeStrategyFunction } from '../types'; /** * Does nothing and does not merge source with fields diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/types.ts index 0b847064d5d62..56ca8fb460374 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SignalSourceHit } from '../types'; +import type { SignalSourceHit } from '../types'; /** * A bit stricter typing since the default fields type is an "any" diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/array_in_path_exists.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/array_in_path_exists.ts index b8e742fbaba61..cc891b0f609a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/array_in_path_exists.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/array_in_path_exists.ts @@ -6,7 +6,7 @@ */ import { get } from 'lodash/fp'; -import { SignalSource } from '../../types'; +import type { SignalSource } from '../../types'; /** * Returns true if an array within the path exists anywhere. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.test.ts index 031a2013b462e..7288e7d1e9b80 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.test.ts @@ -6,7 +6,7 @@ */ import { filterFieldEntries } from './filter_field_entries'; -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; describe('filter_field_entries', () => { beforeAll(() => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.ts index 4ee5fa1db52f5..383aa616603e6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/filter_field_entries.ts @@ -8,7 +8,7 @@ import { isMultiField } from './is_multifield'; import { isInvalidKey } from './is_invalid_key'; import { isTypeObject } from './is_type_object'; -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; import { isIgnored } from './is_ignored'; import { isEqlBug77152 } from './is_eql_bug_77152'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_array_of_primitives.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_array_of_primitives.ts index c65c88c40b9bb..80916659b8a12 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_array_of_primitives.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_array_of_primitives.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SearchTypes } from '../../../../../../common/detection_engine/types'; +import type { SearchTypes } from '../../../../../../common/detection_engine/types'; import { isPrimitive } from './is_primitive'; /** diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_multifield.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_multifield.ts index feee6026c60b3..e9e51f9f50389 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_multifield.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_multifield.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; /** * Returns true if we are a multiField when passed in a fields entry and a fields key, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_nested_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_nested_object.ts index 38a0f871279eb..03e438c31f993 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_nested_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_nested_object.ts @@ -7,7 +7,7 @@ import { isObjectLike } from 'lodash/fp'; import { isTypeObject } from './is_type_object'; -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; /** * Returns true if the first value is object-like but does not contain the shape of diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_objectlike_or_array_of_objectlikes.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_objectlike_or_array_of_objectlikes.ts index 3f57eda31ca3a..38c3db1d8fd24 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_objectlike_or_array_of_objectlikes.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_objectlike_or_array_of_objectlikes.ts @@ -6,7 +6,7 @@ */ import { isObjectLike } from 'lodash/fp'; -import { SearchTypes } from '../../../../../../common/detection_engine/types'; +import type { SearchTypes } from '../../../../../../common/detection_engine/types'; /** * Returns true if at least one element is an object, otherwise false if they all are not objects diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_primitive.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_primitive.ts index c74b5f085989b..fd9997ba66a55 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_primitive.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_primitive.ts @@ -6,7 +6,7 @@ */ import { isObjectLike } from 'lodash/fp'; -import { SearchTypes } from '../../../../../../common/detection_engine/types'; +import type { SearchTypes } from '../../../../../../common/detection_engine/types'; /** * Returns true if it is a primitive type, otherwise false diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_type_object.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_type_object.ts index 68afad9ff4fe3..b0458073b4287 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_type_object.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/is_type_object.ts @@ -6,7 +6,7 @@ */ import { get } from 'lodash/fp'; -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; /** * Returns true if we match a "type" object which could be a geo-point when we are parsing field diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.test.ts index 130990393b743..2d2febf9901d3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SearchTypes } from '../../../../../../common/detection_engine/types'; +import type { SearchTypes } from '../../../../../../common/detection_engine/types'; import { recursiveUnboxingFields } from './recursive_unboxing_fields'; -import { FieldsType } from '../types'; +import type { FieldsType } from '../types'; describe('recursive_unboxing_fields', () => { beforeAll(() => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.ts index e9967cda363ea..cc5096825951f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/source_fields_merging/utils/recursive_unboxing_fields.ts @@ -7,8 +7,8 @@ import { get } from 'lodash/fp'; import { set } from '@elastic/safer-lodash-set/fp'; -import { SearchTypes } from '../../../../../../common/detection_engine/types'; -import { FieldsType } from '../types'; +import type { SearchTypes } from '../../../../../../common/detection_engine/types'; +import type { FieldsType } from '../types'; /** * Recursively unboxes fields from an array when it is common sense to unbox them and safe to diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_enrichment.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_enrichment.ts index 535e65c2a3933..ec431a23e0e54 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_enrichment.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_enrichment.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SignalsEnrichment } from '../types'; +import type { SignalsEnrichment } from '../types'; import { enrichSignalThreatMatches } from './enrich_signal_threat_matches'; -import { BuildThreatEnrichmentOptions, GetMatchedThreats } from './types'; +import type { BuildThreatEnrichmentOptions, GetMatchedThreats } from './types'; import { getThreatList } from './get_threat_list'; export const buildThreatEnrichment = ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.mock.ts index ce418413b8e41..0f4c2ed863141 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.mock.ts @@ -5,11 +5,11 @@ * 2.0. */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; import type { Filter } from '@kbn/es-query'; -import { ThreatListDoc, ThreatListItem } from './types'; +import type { ThreatListDoc, ThreatListItem } from './types'; export const getThreatMappingMock = (): ThreatMapping => { return [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.test.ts index 1b4baaa0607b0..ea896dbb2130a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.test.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { ThreatMapping, ThreatMappingEntries } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { + ThreatMapping, + ThreatMappingEntries, +} from '@kbn/securitysolution-io-ts-alerting-types'; import { filterThreatMapping, @@ -24,7 +27,7 @@ import { getThreatMappingFilterShouldMock, getThreatListSearchResponseMock, } from './build_threat_mapping_filter.mock'; -import { BooleanFilter, ThreatListItem } from './types'; +import type { BooleanFilter, ThreatListItem } from './types'; describe('build_threat_mapping_filter', () => { describe('buildThreatMappingFilter', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.ts index 82b6c5a6c523f..bc59d490bc7f4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/build_threat_mapping_filter.ts @@ -7,8 +7,8 @@ import get from 'lodash/fp/get'; import type { Filter } from '@kbn/es-query'; -import { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; -import { +import type { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { BooleanFilter, BuildEntriesMappingFilterOptions, BuildThreatMappingFilterOptions, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_event_signal.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_event_signal.ts index 69e14d9e84a97..1c9e2c5f6ca28 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_event_signal.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_event_signal.ts @@ -9,8 +9,8 @@ import { buildThreatMappingFilter } from './build_threat_mapping_filter'; import { getFilter } from '../get_filter'; import { searchAfterAndBulkCreate } from '../search_after_bulk_create'; import { buildReasonMessageForThreatMatchAlert } from '../reason_formatters'; -import { CreateEventSignalOptions } from './types'; -import { SearchAfterAndBulkCreateReturnType, SignalSourceHit } from '../types'; +import type { CreateEventSignalOptions } from './types'; +import type { SearchAfterAndBulkCreateReturnType, SignalSourceHit } from '../types'; import { getAllThreatListHits } from './get_threat_list'; import { enrichSignalThreatMatches, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signal.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signal.ts index 7499c6eae3876..831ad0c14ce24 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signal.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signal.ts @@ -10,8 +10,8 @@ import { buildThreatMappingFilter } from './build_threat_mapping_filter'; import { getFilter } from '../get_filter'; import { searchAfterAndBulkCreate } from '../search_after_bulk_create'; import { buildReasonMessageForThreatMatchAlert } from '../reason_formatters'; -import { CreateThreatSignalOptions } from './types'; -import { SearchAfterAndBulkCreateReturnType } from '../types'; +import type { CreateThreatSignalOptions } from './types'; +import type { SearchAfterAndBulkCreateReturnType } from '../types'; export const createThreatSignal = async ({ alertId, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signals.ts index 9a957f187847a..90fc8d2a3e4ec 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/create_threat_signals.ts @@ -6,17 +6,17 @@ */ import chunk from 'lodash/fp/chunk'; -import { OpenPointInTimeResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { OpenPointInTimeResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getThreatList, getThreatListCount } from './get_threat_list'; -import { +import type { CreateThreatSignalsOptions, CreateSignalInterface, GetDocumentListInterface, } from './types'; import { createThreatSignal } from './create_threat_signal'; import { createEventSignal } from './create_event_signal'; -import { SearchAfterAndBulkCreateReturnType } from '../types'; +import type { SearchAfterAndBulkCreateReturnType } from '../types'; import { buildExecutionIntervalValidator, combineConcurrentResults } from './utils'; import { buildThreatEnrichment } from './build_threat_enrichment'; import { getEventCount, getEventList } from './get_event_count'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.mock.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.mock.ts index 89656de5ea630..8ace36a32873c 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.mock.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SignalSearchResponse, SignalSourceHit } from '../types'; -import { ThreatMatchNamedQuery } from './types'; +import type { SignalSearchResponse, SignalSourceHit } from '../types'; +import type { ThreatMatchNamedQuery } from './types'; export const getNamedQueryMock = ( overrides: Partial = {} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.test.ts index b6df435c04dda..6f08defd91ab8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/enrich_signal_threat_matches.test.ts @@ -8,7 +8,7 @@ import { get } from 'lodash'; import { ENRICHMENT_DESTINATION_PATH } from '../../../../../common/constants'; import { ENRICHMENT_TYPES } from '../../../../../common/cti/constants'; -import { SignalSourceHit } from '../types'; +import type { SignalSourceHit } from '../types'; import { getThreatListItemMock } from './build_threat_mapping_filter.mock'; import { @@ -18,7 +18,7 @@ import { getSignalMatchesFromThreatList, } from './enrich_signal_threat_matches'; import { getNamedQueryMock, getSignalHitMock } from './enrich_signal_threat_matches.mock'; -import { GetMatchedThreats, ThreatListItem, ThreatMatchNamedQuery } from './types'; +import type { GetMatchedThreats, ThreatListItem, ThreatMatchNamedQuery } from './types'; import { encodeThreatMatchNamedQuery } from './utils'; describe('groupAndMergeSignalMatches', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_event_count.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_event_count.ts index 1b0234509d085..58b84a49959d0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_event_count.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_event_count.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { EventCountOptions, EventsOptions, EventDoc } from './types'; +import type { EventCountOptions, EventsOptions, EventDoc } from './types'; import { getQueryFilter } from '../../../../../common/detection_engine/get_query_filter'; import { singleSearchAfter } from '../single_search_after'; import { buildEventsSearchQuery } from '../build_events_query'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.test.ts index 82ab39b653c0e..29105f59abede 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.test.ts @@ -6,7 +6,7 @@ */ import { getMappingFilters } from './get_mapping_filters'; -import { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; describe('getMappingFilters', () => { const sampleMapping: ThreatMapping = [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.ts index b563793da8677..437f87e3fd458 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_mapping_filters.ts @@ -6,7 +6,7 @@ */ import type { Filter } from '@kbn/es-query'; -import { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { ThreatMapping } from '@kbn/securitysolution-io-ts-alerting-types'; interface MustExist { bool: { must: Array<{ exists: { field: string } }> }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_threat_list.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_threat_list.ts index 2253b85309a9e..7ca91748fa567 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_threat_list.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/get_threat_list.ts @@ -7,7 +7,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getQueryFilter } from '../../../../../common/detection_engine/get_query_filter'; -import { +import type { GetThreatListOptions, ThreatListCountOptions, ThreatListDoc, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts index 22f3301bf543b..e0add0da6dd17 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/types.ts @@ -18,24 +18,24 @@ import type { Type, } from '@kbn/securitysolution-io-ts-alerting-types'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { OpenPointInTimeResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ListClient } from '@kbn/lists-plugin/server'; -import { +import type { OpenPointInTimeResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ListClient } from '@kbn/lists-plugin/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { ITelemetryEventsSender } from '../../../telemetry/sender'; -import { BuildRuleMessage } from '../rule_messages'; -import { +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ITelemetryEventsSender } from '../../../telemetry/sender'; +import type { BuildRuleMessage } from '../rule_messages'; +import type { BulkCreate, RuleRangeTuple, SearchAfterAndBulkCreateReturnType, SignalsEnrichment, WrapHits, } from '../types'; -import { CompleteRule, ThreatRuleParams } from '../../schemas/rule_schemas'; +import type { CompleteRule, ThreatRuleParams } from '../../schemas/rule_schemas'; export type SortOrderOrUndefined = 'asc' | 'desc' | undefined; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.test.ts index ff4fbb58d7493..981868589e4a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SearchAfterAndBulkCreateReturnType } from '../types'; +import type { SearchAfterAndBulkCreateReturnType } from '../types'; import { sampleSignalHit } from '../__mocks__/es_results'; -import { ThreatMatchNamedQuery } from './types'; +import type { ThreatMatchNamedQuery } from './types'; import { buildExecutionIntervalValidator, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.ts index 2918bffec3631..bfba9a6fd22a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threat_mapping/utils.ts @@ -7,9 +7,9 @@ import moment from 'moment'; -import { SearchAfterAndBulkCreateReturnType, SignalSourceHit } from '../types'; +import type { SearchAfterAndBulkCreateReturnType, SignalSourceHit } from '../types'; import { parseInterval } from '../utils'; -import { ThreatMatchNamedQuery, ThreatListItem } from './types'; +import type { ThreatMatchNamedQuery, ThreatListItem } from './types'; /** * Given two timers this will take the max of each and add them to each other and return that addition. diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/build_signal_history.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/build_signal_history.ts index 9fda5205e9dab..8497b94397d9b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/build_signal_history.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/build_signal_history.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; import { ALERT_ORIGINAL_TIME } from '../../../../../common/field_maps/field_names'; -import { SimpleHit, ThresholdSignalHistory } from '../types'; +import type { SimpleHit, ThresholdSignalHistory } from '../types'; import { getThresholdTermsHash, isWrappedDetectionAlert, isWrappedSignalHit } from '../utils'; interface GetThresholdSignalHistoryParams { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.test.ts index 4f68be017ad67..c01065cda24bd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ThresholdNormalized } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { ThresholdNormalized } from '../../../../../common/detection_engine/schemas/common/schemas'; import { sampleDocSearchResultsNoSortId } from '../__mocks__/es_results'; import { calculateThresholdSignalUuid } from '../utils'; import { transformThresholdResultsToEcs } from './bulk_create_threshold_signals'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts index 12a6bef472aaa..da3fd2da4362a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/bulk_create_threshold_signals.ts @@ -9,16 +9,16 @@ import { TIMESTAMP } from '@kbn/rule-data-utils'; import { get } from 'lodash/fp'; import set from 'set-value'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ThresholdNormalized } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { BaseHit } from '../../../../../common/detection_engine/types'; -import { TermAggregationBucket } from '../../../types'; -import { GenericBulkCreateResponse } from '../../rule_types/factories/bulk_create_factory'; +import type { ThresholdNormalized } from '../../../../../common/detection_engine/schemas/common/schemas'; +import type { BaseHit } from '../../../../../common/detection_engine/types'; +import type { TermAggregationBucket } from '../../../types'; +import type { GenericBulkCreateResponse } from '../../rule_types/factories/bulk_create_factory'; import { calculateThresholdSignalUuid, getThresholdAggregationParts } from '../utils'; import { buildReasonMessageForThresholdAlert } from '../reason_formatters'; import type { @@ -29,8 +29,8 @@ import type { BulkCreate, WrapHits, } from '../types'; -import { CompleteRule, ThresholdRuleParams } from '../../schemas/rule_schemas'; -import { BaseFieldsLatest } from '../../../../../common/detection_engine/schemas/alerts'; +import type { CompleteRule, ThresholdRuleParams } from '../../schemas/rule_schemas'; +import type { BaseFieldsLatest } from '../../../../../common/detection_engine/schemas/alerts'; interface BulkCreateThresholdSignalsParams { someResult: SignalSearchResponse; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts index e36694881040a..ab48d339c35a9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { getQueryFilter } from '../../../../../common/detection_engine/get_query_filter'; import { mockLogger } from '../__mocks__/es_results'; import { buildRuleMessageFactory } from '../rule_messages'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts index 0c6947e419690..5ff25209ea414 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/find_threshold_signals.ts @@ -9,17 +9,17 @@ import { set } from '@elastic/safer-lodash-set'; import { TIMESTAMP } from '@kbn/rule-data-utils'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { ThresholdNormalized, TimestampOverrideOrUndefined, } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { BuildRuleMessage } from '../rule_messages'; +import type { BuildRuleMessage } from '../rule_messages'; import { singleSearchAfter } from '../single_search_after'; import type { SignalSearchResponse } from '../types'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts index 9ce6898e084bf..61c15f1d2e4ad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_bucket_filters.ts @@ -6,8 +6,8 @@ */ import type { Filter } from '@kbn/es-query'; -import { ESFilter } from '@kbn/core/types/elasticsearch'; -import { ThresholdSignalHistory, ThresholdSignalHistoryRecord } from '../types'; +import type { ESFilter } from '@kbn/core/types/elasticsearch'; +import type { ThresholdSignalHistory, ThresholdSignalHistoryRecord } from '../types'; /* * Returns a filter to exclude events that have already been included in a diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts index 8a4931b3ce2de..59e9424109beb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/threshold/get_threshold_signal_history.ts @@ -5,9 +5,9 @@ * 2.0. */ -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IRuleDataReader } from '@kbn/rule-registry-plugin/server'; -import { ThresholdSignalHistory } from '../types'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { IRuleDataReader } from '@kbn/rule-registry-plugin/server'; +import type { ThresholdSignalHistory } from '../types'; import { buildThresholdSignalHistory } from './build_signal_history'; import { createErrorsFromShard } from '../utils'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts index 83dcea4cb60e7..4b779c27a1a89 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/types.ts @@ -6,9 +6,9 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import moment from 'moment'; +import type moment from 'moment'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { +import type { RuleType, RuleTypeState, AlertInstanceState, @@ -16,31 +16,31 @@ import { RuleExecutorOptions as AlertingRuleExecutorOptions, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; -import { ListClient } from '@kbn/lists-plugin/server'; -import { Logger } from '@kbn/core/server'; -import { EcsFieldMap } from '@kbn/rule-registry-plugin/common/assets/field_maps/ecs_field_map'; -import { TypeOfFieldMap } from '@kbn/rule-registry-plugin/common/field_map'; -import { Status } from '../../../../common/detection_engine/schemas/common/schemas'; -import { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; -import { TermAggregationBucket } from '../../types'; -import { +import type { ListClient } from '@kbn/lists-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import type { EcsFieldMap } from '@kbn/rule-registry-plugin/common/assets/field_maps/ecs_field_map'; +import type { TypeOfFieldMap } from '@kbn/rule-registry-plugin/common/field_map'; +import type { Status } from '../../../../common/detection_engine/schemas/common/schemas'; +import type { RulesSchema } from '../../../../common/detection_engine/schemas/response/rules_schema'; +import type { TermAggregationBucket } from '../../types'; +import type { BaseHit, RuleAlertAction, SearchTypes, EqlSequence, } from '../../../../common/detection_engine/types'; -import { BuildRuleMessage } from './rule_messages'; -import { ITelemetryEventsSender } from '../../telemetry/sender'; -import { +import type { BuildRuleMessage } from './rule_messages'; +import type { ITelemetryEventsSender } from '../../telemetry/sender'; +import type { CompleteRule, QueryRuleParams, ThreatRuleParams, RuleParams, SavedQueryRuleParams, } from '../schemas/rule_schemas'; -import { GenericBulkCreateResponse } from '../rule_types/factories'; -import { BuildReasonMessage } from './reason_formatters'; -import { +import type { GenericBulkCreateResponse } from '../rule_types/factories'; +import type { BuildReasonMessage } from './reason_formatters'; +import type { BaseFieldsLatest, DetectionAlert, WrappedFieldsLatest, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts index 9c5becc8353b6..c0e6c2cb903ca 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.test.ts @@ -10,10 +10,11 @@ import sinon from 'sinon'; import type { TransportResult } from '@elastic/elasticsearch'; import { ALERT_REASON, ALERT_RULE_PARAMETERS, ALERT_UUID } from '@kbn/rule-data-utils'; -import { alertsMock, RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { buildRuleMessageFactory } from './rule_messages'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; import { RuleExecutionStatus } from '../../../../common/detection_engine/schemas/common'; import { getListArrayMock } from '../../../../common/detection_engine/schemas/types/lists.mock'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts index 1f96f7eb9dde7..a0ec3547093bb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts @@ -26,18 +26,18 @@ import type { Logger, SavedObjectsClientContract, } from '@kbn/core/server'; -import { +import type { AlertInstanceContext, AlertInstanceState, RuleExecutorServices, - parseDuration, } from '@kbn/alerting-plugin/server'; +import { parseDuration } from '@kbn/alerting-plugin/server'; import type { ExceptionListClient, ListClient, ListPluginSetup } from '@kbn/lists-plugin/server'; -import { +import type { TimestampOverrideOrUndefined, Privilege, - RuleExecutionStatus, } from '../../../../common/detection_engine/schemas/common'; +import { RuleExecutionStatus } from '../../../../common/detection_engine/schemas/common'; import type { BulkResponseErrorAggregation, SignalHit, @@ -65,7 +65,7 @@ import type { import type { BaseHit, SearchTypes } from '../../../../common/detection_engine/types'; import type { IRuleExecutionLogForExecutors } from '../rule_execution_log'; import { withSecuritySpan } from '../../../utils/with_security_span'; -import { DetectionAlert } from '../../../../common/detection_engine/schemas/alerts'; +import type { DetectionAlert } from '../../../../common/detection_engine/schemas/alerts'; import { ENABLE_CCS_READ_WARNING_SETTING } from '../../../../common/constants'; interface SortExceptionsReturn { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts index 4ab3ccc831af1..72a886cd3e3a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/tags/read_tags.ts @@ -6,7 +6,7 @@ */ import { has } from 'lodash/fp'; -import { RulesClient } from '@kbn/alerting-plugin/server'; +import type { RulesClient } from '@kbn/alerting-plugin/server'; import { findRules } from '../rules/find_rules'; export interface TagType { diff --git a/x-pack/plugins/security_solution/server/lib/framework/types.ts b/x-pack/plugins/security_solution/server/lib/framework/types.ts index 6b69251e6d7ff..8909bb6160134 100644 --- a/x-pack/plugins/security_solution/server/lib/framework/types.ts +++ b/x-pack/plugins/security_solution/server/lib/framework/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; export const internalFrameworkRequest = Symbol('internalFrameworkRequest'); diff --git a/x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts index 7a0c72c85d62e..5da237fdb69a1 100644 --- a/x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import type { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; import { httpServerMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { hasMlAdminPermissions } from '../../../common/machine_learning/has_ml_admin_permissions'; import { mlServicesMock } from './mocks'; diff --git a/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts index ffaedc19a7f7b..f96866d968e4b 100644 --- a/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/authz.ts @@ -7,15 +7,15 @@ import { i18n } from '@kbn/i18n'; -import { Type } from '@kbn/securitysolution-io-ts-alerting-types'; -import { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; -import { ILicense } from '@kbn/licensing-plugin/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { SetupPlugins } from '../../plugin'; +import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ILicense } from '@kbn/licensing-plugin/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { SetupPlugins } from '../../plugin'; import { MINIMUM_ML_LICENSE } from '../../../common/constants'; import { hasMlAdminPermissions } from '../../../common/machine_learning/has_ml_admin_permissions'; import { isMlRule } from '../../../common/machine_learning/helpers'; -import { Validation } from './validation'; +import type { Validation } from './validation'; import { cache } from './cache'; export interface MlAuthz { validateRuleType: (type: Type) => Promise; diff --git a/x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts index 9e6df67b89d87..a9b744b173f46 100644 --- a/x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/index.test.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { ESFilter } from '@kbn/core/types/elasticsearch'; +import type { ESFilter } from '@kbn/core/types/elasticsearch'; import { getExceptionListItemSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_item_schema.mock'; -import { getAnomalies, AnomaliesSearchParams } from '.'; +import type { AnomaliesSearchParams } from '.'; +import { getAnomalies } from '.'; const getFiltersFromMock = (mock: jest.Mock) => { const [[searchParams]] = mock.mock.calls; diff --git a/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts index 3728d6faf79f9..410f7ec667c74 100644 --- a/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts @@ -9,7 +9,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { buildExceptionFilter } from '@kbn/securitysolution-list-utils'; -import { MlAnomalyRecordDoc as Anomaly } from '@kbn/ml-plugin/server'; +import type { MlAnomalyRecordDoc as Anomaly } from '@kbn/ml-plugin/server'; export type { Anomaly }; export type AnomalyResults = estypes.SearchResponse; diff --git a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.test.ts index 84ffb30732581..006b054f7ad03 100644 --- a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { findExistingIndices } from './helpers'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; const fieldCaps = jest .fn() diff --git a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.ts b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.ts index 271b2ee45f741..19e65d2d10fbf 100644 --- a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; export const findExistingIndices = async ( indices: string[], diff --git a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.test.ts b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.test.ts index bd5714d7628e2..070a092a5b4d7 100644 --- a/x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/sourcerer/routes/index.test.ts @@ -13,8 +13,8 @@ import { } from '../../detection_engine/routes/__mocks__'; import { SOURCERER_API_URL } from '../../../../common/constants'; -import { StartServicesAccessor } from '@kbn/core/server'; -import { StartPlugins } from '../../../plugin'; +import type { StartServicesAccessor } from '@kbn/core/server'; +import type { StartPlugins } from '../../../plugin'; jest.mock('./helpers', () => { const original = jest.requireActual('./helpers'); diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/__mocks__/index.ts b/x-pack/plugins/security_solution/server/lib/telemetry/__mocks__/index.ts index 6cb91b21de319..ea1caa3c97b69 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/__mocks__/index.ts @@ -6,11 +6,12 @@ */ import moment from 'moment'; -import { ConcreteTaskInstance, TaskStatus } from '@kbn/task-manager-plugin/server'; -import { TelemetryEventsSender } from '../sender'; -import { TelemetryReceiver } from '../receiver'; -import { SecurityTelemetryTaskConfig } from '../task'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; +import type { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server'; +import { TaskStatus } from '@kbn/task-manager-plugin/server'; +import type { TelemetryEventsSender } from '../sender'; +import type { TelemetryReceiver } from '../receiver'; +import type { SecurityTelemetryTaskConfig } from '../task'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; import { stubEndpointAlertResponse, stubProcessTree, stubFetchTimelineEvents } from './timeline'; export const createMockTelemetryEventsSender = ( diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/telemetry/helpers.test.ts index 6f865aa19b781..b1883f8b694f7 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/helpers.test.ts @@ -22,7 +22,7 @@ import { templateExceptionList, } from './helpers'; import type { ESClusterInfo, ESLicense, ExceptionListItem } from './types'; -import { PolicyData } from '../../../common/endpoint/types'; +import type { PolicyData } from '../../../common/endpoint/types'; describe('test diagnostic telemetry scheduled task timing helper', () => { test('test -5 mins is returned when there is no previous task run', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/helpers.ts b/x-pack/plugins/security_solution/server/lib/telemetry/helpers.ts index 095d55228fa71..ccd5133552559 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/helpers.ts @@ -7,9 +7,9 @@ import moment from 'moment'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types/models/package_policy'; import { copyAllowlistedFields, exceptionListAllowlistFields } from './filterlists'; -import { PolicyData } from '../../../common/endpoint/types'; +import type { PolicyData } from '../../../common/endpoint/types'; import type { ExceptionListItem, ESClusterInfo, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/insights/insights.ts b/x-pack/plugins/security_solution/server/lib/telemetry/insights/insights.ts index 9c7f9aa4f7370..bc1ccb9a8081a 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/insights/insights.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/insights/insights.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { sha256 } from 'js-sha256'; interface AlertContext { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/preview_sender.ts b/x-pack/plugins/security_solution/server/lib/telemetry/preview_sender.ts index aaf2779027d3a..08aee614a3cfc 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/preview_sender.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/preview_sender.ts @@ -5,18 +5,19 @@ * 2.0. */ -import axios, { AxiosInstance, AxiosResponse } from 'axios'; -import { Logger } from '@kbn/core/server'; -import { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import axios from 'axios'; +import type { Logger } from '@kbn/core/server'; +import type { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import { +import type { TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { ITelemetryEventsSender } from './sender'; -import { TelemetryEvent } from './types'; -import { ITelemetryReceiver } from './receiver'; +import type { ITelemetryEventsSender } from './sender'; +import type { TelemetryEvent } from './types'; +import type { ITelemetryReceiver } from './receiver'; /** * Preview telemetry events sender for the telemetry route. diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts b/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts index bd98cef5187d4..d9cabfed0ceec 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/receiver.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { Logger, CoreStart, IScopedClusterClient, ElasticsearchClient, SavedObjectsClientContract, } from '@kbn/core/server'; -import { +import type { AggregationsAggregate, SearchRequest, SearchResponse, @@ -27,11 +27,11 @@ import { SIGNALS_ID, THRESHOLD_RULE_TYPE_ID, } from '@kbn/securitysolution-rules'; -import { TransportResult } from '@elastic/elasticsearch'; -import { Agent, AgentPolicy } from '@kbn/fleet-plugin/common'; -import { AgentClient, AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { ExceptionListClient } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../endpoint/endpoint_app_context_services'; +import type { TransportResult } from '@elastic/elasticsearch'; +import type { Agent, AgentPolicy } from '@kbn/fleet-plugin/common'; +import type { AgentClient, AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { ExceptionListClient } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../endpoint/endpoint_app_context_services'; import { TELEMETRY_MAX_BUFFER_SIZE } from './constants'; import { exceptionListItemToTelemetryEntry, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts b/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts index 2b4d8f3ab201f..10ebe5f8679d6 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts @@ -9,21 +9,23 @@ import { cloneDeep } from 'lodash'; import { URL } from 'url'; import { transformDataToNdjson } from '@kbn/securitysolution-utils'; -import { Logger } from '@kbn/core/server'; -import { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import axios, { AxiosInstance } from 'axios'; -import { +import type { Logger } from '@kbn/core/server'; +import type { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import type { AxiosInstance } from 'axios'; +import axios from 'axios'; +import type { TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { ITelemetryReceiver } from './receiver'; +import type { ITelemetryReceiver } from './receiver'; import { copyAllowlistedFields, endpointAllowlistFields } from './filterlists'; import { createTelemetryTaskConfigs } from './tasks'; import { createUsageCounterLabel } from './helpers'; import type { TelemetryEvent } from './types'; import { TELEMETRY_MAX_BUFFER_SIZE } from './constants'; -import { SecurityTelemetryTask, SecurityTelemetryTaskConfig } from './task'; +import type { SecurityTelemetryTaskConfig } from './task'; +import { SecurityTelemetryTask } from './task'; const usageLabelPrefix: string[] = ['security_telemetry', 'sender']; diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/task.test.ts b/x-pack/plugins/security_solution/server/lib/telemetry/task.test.ts index 8ff4eabe77df6..6c7dd8e9afc6e 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/task.test.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/task.test.ts @@ -7,7 +7,7 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import { SuccessfulRunResult } from '@kbn/task-manager-plugin/server/task'; +import type { SuccessfulRunResult } from '@kbn/task-manager-plugin/server/task'; import { SecurityTelemetryTask } from './task'; import { createMockTaskInstance, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/task.ts b/x-pack/plugins/security_solution/server/lib/telemetry/task.ts index 70e06c3d88dbe..11b9e5a28791c 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/task.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/task.ts @@ -6,14 +6,14 @@ */ import moment from 'moment'; -import { Logger } from '@kbn/core/server'; -import { +import type { Logger } from '@kbn/core/server'; +import type { ConcreteTaskInstance, TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { ITelemetryReceiver } from './receiver'; -import { ITelemetryEventsSender } from './sender'; +import type { ITelemetryReceiver } from './receiver'; +import type { ITelemetryEventsSender } from './sender'; export interface SecurityTelemetryTaskConfig { type: string; diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/detection_rule.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/detection_rule.ts index d5d093a2fa074..3ef093c86b082 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/detection_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/detection_rule.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { LIST_DETECTION_RULE_EXCEPTION, TELEMETRY_CHANNEL_LISTS } from '../constants'; import { batchTelemetryRecords, templateExceptionList } from '../helpers'; -import { ITelemetryEventsSender } from '../sender'; -import { ITelemetryReceiver } from '../receiver'; +import type { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryReceiver } from '../receiver'; import type { ExceptionListItem, ESClusterInfo, ESLicense, RuleSearchResult } from '../types'; -import { TaskExecutionPeriod } from '../task'; +import type { TaskExecutionPeriod } from '../task'; export function createTelemetryDetectionRuleListsTaskConfig(maxTelemetryBatch: number) { return { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/diagnostic.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/diagnostic.ts index efaac1b78e421..b66f502d08531 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/diagnostic.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/diagnostic.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { getPreviousDiagTaskTimestamp } from '../helpers'; -import { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryEventsSender } from '../sender'; import type { TelemetryEvent } from '../types'; -import { ITelemetryReceiver } from '../receiver'; -import { TaskExecutionPeriod } from '../task'; +import type { ITelemetryReceiver } from '../receiver'; +import type { TaskExecutionPeriod } from '../task'; export function createTelemetryDiagnosticsTaskConfig() { return { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/endpoint.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/endpoint.ts index f6e3ca6e9d8ef..66047113d90fd 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/endpoint.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/endpoint.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { FLEET_ENDPOINT_PACKAGE } from '@kbn/fleet-plugin/common'; -import { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryEventsSender } from '../sender'; import type { EndpointMetricsAggregation, EndpointPolicyResponseAggregation, @@ -17,15 +17,15 @@ import type { ESClusterInfo, ESLicense, } from '../types'; -import { ITelemetryReceiver } from '../receiver'; -import { TaskExecutionPeriod } from '../task'; +import type { ITelemetryReceiver } from '../receiver'; +import type { TaskExecutionPeriod } from '../task'; import { batchTelemetryRecords, extractEndpointPolicyConfig, getPreviousDailyTaskTimestamp, isPackagePolicyList, } from '../helpers'; -import { PolicyData } from '../../../../common/endpoint/types'; +import type { PolicyData } from '../../../../common/endpoint/types'; import { TELEMETRY_CHANNEL_ENDPOINT_META } from '../constants'; // Endpoint agent uses this Policy ID while it's installing. diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/index.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/index.ts index b0141ca7a5fb1..eda831f48a359 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/index.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityTelemetryTaskConfig } from '../task'; +import type { SecurityTelemetryTaskConfig } from '../task'; import { createTelemetryDiagnosticsTaskConfig } from './diagnostic'; import { createTelemetryEndpointTaskConfig } from './endpoint'; import { createTelemetrySecurityListTaskConfig } from './security_lists'; diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/prebuilt_rule_alerts.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/prebuilt_rule_alerts.ts index 20de990816c9e..184663e5a19bd 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/prebuilt_rule_alerts.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/prebuilt_rule_alerts.ts @@ -5,14 +5,13 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; -import { ITelemetryEventsSender } from '../sender'; -import { ITelemetryReceiver } from '../receiver'; -import type { ESClusterInfo, ESLicense } from '../types'; -import { TaskExecutionPeriod } from '../task'; +import type { Logger } from '@kbn/core/server'; +import type { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryReceiver } from '../receiver'; +import type { ESClusterInfo, ESLicense, TelemetryEvent } from '../types'; +import type { TaskExecutionPeriod } from '../task'; import { TELEMETRY_CHANNEL_DETECTION_ALERTS } from '../constants'; import { batchTelemetryRecords } from '../helpers'; -import { TelemetryEvent } from '../types'; import { copyAllowlistedFields, prebuiltRuleAllowlistFields } from '../filterlists'; export function createTelemetryPrebuiltRuleAlertsTaskConfig(maxTelemetryBatch: number) { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/security_lists.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/security_lists.ts index 54733fe0cc13b..f6dc279b180bf 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/security_lists.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/security_lists.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { ENDPOINT_LIST_ID, ENDPOINT_EVENT_FILTERS_LIST_ID, @@ -18,9 +18,9 @@ import { } from '../constants'; import type { ESClusterInfo, ESLicense } from '../types'; import { batchTelemetryRecords, templateExceptionList } from '../helpers'; -import { ITelemetryEventsSender } from '../sender'; -import { ITelemetryReceiver } from '../receiver'; -import { TaskExecutionPeriod } from '../task'; +import type { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryReceiver } from '../receiver'; +import type { TaskExecutionPeriod } from '../task'; export function createTelemetrySecurityListTaskConfig(maxTelemetryBatch: number) { return { diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/timelines.ts b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/timelines.ts index 85bc08fc9aaaa..2b729843c19a5 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/tasks/timelines.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/tasks/timelines.ts @@ -6,10 +6,10 @@ */ import moment from 'moment'; -import { Logger } from '@kbn/core/server'; -import { SafeEndpointEvent } from '../../../../common/endpoint/types'; -import { ITelemetryEventsSender } from '../sender'; -import { ITelemetryReceiver } from '../receiver'; +import type { Logger } from '@kbn/core/server'; +import type { SafeEndpointEvent } from '../../../../common/endpoint/types'; +import type { ITelemetryEventsSender } from '../sender'; +import type { ITelemetryReceiver } from '../receiver'; import type { TaskExecutionPeriod } from '../task'; import type { ESClusterInfo, diff --git a/x-pack/plugins/security_solution/server/lib/telemetry/types.ts b/x-pack/plugins/security_solution/server/lib/telemetry/types.ts index 7c22bed299fc3..b1f154ac03654 100644 --- a/x-pack/plugins/security_solution/server/lib/telemetry/types.ts +++ b/x-pack/plugins/security_solution/server/lib/telemetry/types.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; -import { AlertEvent, ResolverNode, SafeResolverEvent } from '../../../common/endpoint/types'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; +import type { AlertEvent, ResolverNode, SafeResolverEvent } from '../../../common/endpoint/types'; type BaseSearchTypes = string | number | boolean | object; export type SearchTypes = BaseSearchTypes | BaseSearchTypes[] | undefined; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts b/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts index cda97954563f3..3865dd1aa0843 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/request_responses.ts @@ -6,7 +6,7 @@ */ import path, { join, resolve } from 'path'; -import * as rt from 'io-ts'; +import type * as rt from 'io-ts'; import { TIMELINE_DRAFT_URL, @@ -15,11 +15,16 @@ import { TIMELINE_URL, TIMELINE_PREPACKAGED_URL, } from '../../../../common/constants'; -import { SavedTimeline, TimelineType, TimelineStatus } from '../../../../common/types/timeline'; +import type { SavedTimeline } from '../../../../common/types/timeline'; +import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; import { requestMock } from '../../detection_engine/routes/__mocks__'; -import { patchTimelineSchema, createTimelineSchema, GetTimelineQuery } from '../schemas/timelines'; +import type { + patchTimelineSchema, + createTimelineSchema, + GetTimelineQuery, +} from '../schemas/timelines'; import { getReadables } from '../utils/common'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/resolve_timeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/resolve_timeline.ts index 00edc25541566..64c528117697b 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/resolve_timeline.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/__mocks__/resolve_timeline.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - TimelineStatus, - TimelineType, - ResolvedTimelineWithOutcomeSavedObject, -} from '../../../../common/types/timeline'; +import type { ResolvedTimelineWithOutcomeSavedObject } from '../../../../common/types/timeline'; +import { TimelineStatus, TimelineType } from '../../../../common/types/timeline'; export const mockResolvedSavedObject = { saved_object: { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.test.ts index 1a62b7604bfd7..a1e2479303ace 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { TimelineType } from '../../../../../../common/types/timeline'; import { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts index 4ce18593a85cc..2def786ec7af6 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/clean_draft_timelines/index.ts @@ -8,12 +8,12 @@ import uuid from 'uuid'; import { transformError } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import { ConfigType } from '../../../../..'; +import type { ConfigType } from '../../../../..'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { TIMELINE_DRAFT_URL } from '../../../../../../common/constants'; import { buildFrameworkRequest } from '../../../utils/common'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { getDraftTimeline, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.test.ts index cb488ef7d84ac..350ea6a3cd8e2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { TimelineType } from '../../../../../../common/types/timeline'; import { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts index cd7770dcd5b48..ad4e8943d2c7f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/draft_timelines/get_draft_timelines/index.ts @@ -7,12 +7,12 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import { ConfigType } from '../../../../..'; +import type { ConfigType } from '../../../../..'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { TIMELINE_DRAFT_URL } from '../../../../../../common/constants'; import { buildFrameworkRequest } from '../../../utils/common'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { getDraftTimeline, persistTimeline } from '../../../saved_object/timelines'; import { draftTimelineDefaults } from '../../../utils/default_timeline'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts index ad94f06f2d34f..b4eef425103d3 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/notes/persist_note.ts @@ -10,9 +10,9 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { NOTE_URL } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../utils/build_validation/route_validation'; -import { ConfigType } from '../../../..'; +import type { ConfigType } from '../../../..'; import { buildSiemResponse } from '../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts index ee407468f0c30..300b5f3ce36f3 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/pinned_events/persist_pinned_event.ts @@ -10,9 +10,9 @@ import type { SecuritySolutionPluginRouter } from '../../../../types'; import { PINNED_EVENT_URL } from '../../../../../common/constants'; -import { SetupPlugins } from '../../../../plugin'; +import type { SetupPlugins } from '../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../utils/build_validation/route_validation'; -import { ConfigType } from '../../../..'; +import type { ConfigType } from '../../../..'; import { buildSiemResponse } from '../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts index 4f0690cc288e6..4abfc68ffe1d1 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.test.ts @@ -6,9 +6,9 @@ */ import { createPromiseFromStreams } from '@kbn/utils'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; -import { FrameworkRequest } from '../../../../framework'; +import type { FrameworkRequest } from '../../../../framework'; import { createMockConfig, requestContextMock, @@ -22,7 +22,7 @@ import { import * as helpers from './helpers'; import { importTimelines } from '../../timelines/import_timelines/helpers'; import { buildFrameworkRequest } from '../../../utils/common'; -import { ImportTimelineResultSchema } from '../../../../../../common/types/timeline'; +import type { ImportTimelineResultSchema } from '../../../../../../common/types/timeline'; jest.mock('../../timelines/import_timelines/helpers'); diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.ts index c2ff89ee1d2ad..69d1b672ddcf4 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/helpers.ts @@ -8,9 +8,9 @@ import path, { join, resolve } from 'path'; import { Readable } from 'stream'; -import { ImportTimelineResultSchema } from '../../../../../../common/types/timeline'; +import type { ImportTimelineResultSchema } from '../../../../../../common/types/timeline'; -import { FrameworkRequest } from '../../../../framework'; +import type { FrameworkRequest } from '../../../../framework'; import { importTimelines } from '../../timelines/import_timelines'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts index 34a26b977e38e..17086ca5a317d 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { serverMock, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts index 438ce71edd089..82220fdcb42e4 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines/index.ts @@ -11,8 +11,8 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_PREPACKAGED_URL } from '../../../../../../common/constants'; -import { SetupPlugins } from '../../../../../plugin'; -import { ConfigType } from '../../../../../config'; +import type { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../../config'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts index be97cbd01e428..d228cbb8371e2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.test.ts @@ -8,11 +8,11 @@ import * as module from './helpers'; import { savePinnedEvents } from '../../../saved_object/pinned_events'; import { getNote } from '../../../saved_object/notes'; -import { FrameworkRequest } from '../../../../framework'; -import { SavedTimeline } from '../../../../../../common/types'; +import type { FrameworkRequest } from '../../../../framework'; +import type { SavedTimeline } from '../../../../../../common/types'; import { mockTemplate, mockTimeline } from '../../../__mocks__/create_timelines'; import { buildFrameworkRequest } from '../../../utils/common'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { requestContextMock } from '../../../../detection_engine/routes/__mocks__'; import { getCreateTimelinesRequest, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.ts index b393c753853f5..1306cf498248f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/helpers.ts @@ -9,10 +9,10 @@ import { isEmpty } from 'lodash/fp'; import moment from 'moment'; import { timeline as timelineLib, pinnedEvent as pinnedEventLib } from '../../../saved_object'; -import { FrameworkRequest } from '../../../../framework'; -import { ResponseTimeline, SavedTimeline } from '../../../../../../common/types/timeline'; +import type { FrameworkRequest } from '../../../../framework'; +import type { ResponseTimeline, SavedTimeline } from '../../../../../../common/types/timeline'; import { persistNotes } from '../../../saved_object/notes/persist_notes'; -import { NoteResult } from '../../../../../../common/types/timeline/note'; +import type { NoteResult } from '../../../../../../common/types/timeline/note'; interface CreateTimelineProps { frameworkRequest: FrameworkRequest; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.test.ts index 9de715751ca7f..568a066397b7d 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { serverMock, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts index d20f1bca121c7..b5407191b22f7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/create_timelines/index.ts @@ -10,8 +10,8 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; -import { ConfigType } from '../../../../..'; -import { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../..'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts index 13fbc22aba5d3..e8d2725689ccd 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/delete_timelines/index.ts @@ -7,10 +7,10 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; -import { ConfigType } from '../../../../..'; +import type { ConfigType } from '../../../../..'; import { deleteTimelinesSchema } from '../../../schemas/timelines/delete_timelines_schema'; -import { SecuritySolutionPluginRouter } from '../../../../../types'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SecuritySolutionPluginRouter } from '../../../../../types'; +import type { SetupPlugins } from '../../../../../plugin'; import { TIMELINE_URL } from '../../../../../../common/constants'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts index c857e7fa38a27..57e9b7fa55310 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/helpers.ts @@ -8,15 +8,15 @@ import { omit } from 'lodash/fp'; import { transformDataToNdjson } from '@kbn/securitysolution-utils'; -import { +import type { ExportedTimelines, ExportedNotes, ExportTimelineNotFoundError, } from '../../../../../../common/types/timeline'; -import { NoteSavedObject } from '../../../../../../common/types/timeline/note'; -import { PinnedEventSavedObject } from '../../../../../../common/types/timeline/pinned_event'; +import type { NoteSavedObject } from '../../../../../../common/types/timeline/note'; +import type { PinnedEventSavedObject } from '../../../../../../common/types/timeline/pinned_event'; -import { FrameworkRequest } from '../../../../framework'; +import type { FrameworkRequest } from '../../../../framework'; import * as noteLib from '../../../saved_object/notes'; import * as pinnedEventLib from '../../../saved_object/pinned_events'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts index cfd61beb4b174..044fc77caef80 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.test.ts @@ -24,7 +24,7 @@ import { convertSavedObjectToSavedNote } from '../../../saved_object/notes/saved import { convertSavedObjectToSavedPinnedEvent } from '../../../saved_object/pinned_events'; import { convertSavedObjectToSavedTimeline } from '../../../saved_object/timelines/convert_saved_object_to_savedtimeline'; import { mockGetCurrentUser } from '../../../__mocks__/import_timelines'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; jest.mock('../../../saved_object/timelines/convert_saved_object_to_savedtimeline', () => { return { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts index 0d60129b1fcd6..38e34f75db8f5 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/export_timelines/index.ts @@ -8,7 +8,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { TIMELINE_EXPORT_URL } from '../../../../../../common/constants'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import { ConfigType } from '../../../../../config'; +import type { ConfigType } from '../../../../../config'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; import { @@ -17,7 +17,7 @@ import { } from '../../../schemas/timelines'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildFrameworkRequest } from '../../../utils/common'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SetupPlugins } from '../../../../../plugin'; import { getExportTimelineByObjectIds } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts index c5c8ab6bfb7f2..d439bdd300c4b 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { serverMock, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts index 921ae2352a565..aba7088ff74c4 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timeline/index.ts @@ -10,8 +10,8 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; -import { ConfigType } from '../../../../..'; -import { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../..'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts index 208b804f222dc..012427846f35e 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { serverMock, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts index 37ab77646b65c..ebb96c968467f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/get_timelines/index.ts @@ -13,8 +13,8 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINES_URL } from '../../../../../../common/constants'; -import { ConfigType } from '../../../../..'; -import { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../..'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/create_timelines_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/create_timelines_stream_from_ndjson.ts index 9ddeee365a0a2..cd520f194cfd9 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/create_timelines_stream_from_ndjson.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/create_timelines_stream_from_ndjson.ts @@ -5,8 +5,8 @@ * 2.0. */ -import * as rt from 'io-ts'; -import { Transform } from 'stream'; +import type * as rt from 'io-ts'; +import type { Transform } from 'stream'; import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; @@ -18,7 +18,7 @@ import { createLimitStream, } from '../../../../../utils/read_stream/create_stream_from_ndjson'; -import { ImportTimelineResponse } from './types'; +import type { ImportTimelineResponse } from './types'; import { ImportTimelinesSchemaRt } from '../../../schemas/timelines/import_timelines_schema'; import { throwErrors } from '../../../utils/common'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/get_timelines_from_stream.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/get_timelines_from_stream.ts index 51b858efa3fee..743f667bb4d1f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/get_timelines_from_stream.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/get_timelines_from_stream.ts @@ -6,8 +6,9 @@ */ import uuid from 'uuid'; -import { createBulkErrorObject, BulkError } from '../../../../detection_engine/routes/utils'; -import { PromiseFromStreams } from './types'; +import type { BulkError } from '../../../../detection_engine/routes/utils'; +import { createBulkErrorObject } from '../../../../detection_engine/routes/utils'; +import type { PromiseFromStreams } from './types'; export const getTupleDuplicateErrorsAndUniqueTimeline = ( timelines: PromiseFromStreams[], diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/helpers.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/helpers.ts index 7e35c2163df70..af57a9a08dccb 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/helpers.ts @@ -6,28 +6,29 @@ */ import { has, chunk, omit } from 'lodash/fp'; -import { Readable } from 'stream'; +import type { Readable } from 'stream'; import uuid from 'uuid'; import { createPromiseFromStreams } from '@kbn/utils'; import { validate } from '@kbn/securitysolution-io-ts-utils'; +import type { ImportTimelineResultSchema } from '../../../../../../common/types/timeline'; import { - ImportTimelineResultSchema, importTimelineResultSchema, TimelineStatus, } from '../../../../../../common/types/timeline'; -import { createBulkErrorObject, BulkError } from '../../../../detection_engine/routes/utils'; +import type { BulkError } from '../../../../detection_engine/routes/utils'; +import { createBulkErrorObject } from '../../../../detection_engine/routes/utils'; import { createTimelines } from '../create_timelines'; -import { FrameworkRequest } from '../../../../framework'; +import type { FrameworkRequest } from '../../../../framework'; import { CompareTimelinesStatus } from '../../../utils/compare_timelines_status'; import { TimelineStatusActions } from '../../../utils/common'; import { DEFAULT_ERROR } from '../../../utils/failure_cases'; import { createTimelinesStreamFromNdJson } from './create_timelines_stream_from_ndjson'; import { getTupleDuplicateErrorsAndUniqueTimeline } from './get_timelines_from_stream'; -import { +import type { ImportedTimeline, ImportRegular, ImportTimelineResponse, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.test.ts index 9148c8f5441d1..c5d7ee20d447f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.test.ts @@ -14,7 +14,7 @@ import { } from '../../../../detection_engine/routes/__mocks__'; import { TIMELINE_EXPORT_URL } from '../../../../../../common/constants'; import { TimelineStatus, TimelineType } from '../../../../../../common/types/timeline'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { mockUniqueParsedObjects, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts index 4336c9fd93418..2b30565a9d4a7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/index.ts @@ -6,15 +6,15 @@ */ import { extname } from 'path'; -import { Readable } from 'stream'; +import type { Readable } from 'stream'; import { transformError } from '@kbn/securitysolution-es-utils'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_IMPORT_URL } from '../../../../../../common/constants'; -import { SetupPlugins } from '../../../../../plugin'; -import { ConfigType } from '../../../../../config'; +import type { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../../config'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/types.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/types.ts index 2cec338555b30..aba09f27e2442 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/types.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/import_timelines/types.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BulkError } from '../../../../detection_engine/routes/utils'; +import type { BulkError } from '../../../../detection_engine/routes/utils'; -import { SavedTimeline } from '../../../../../../common/types/timeline'; -import { HapiReadableStream } from '../../../../detection_engine/rules/types'; -import { TimelineStatusActions } from '../../../utils/common'; -import { NoteResult } from '../../../../../../common/types/timeline/note'; +import type { SavedTimeline } from '../../../../../../common/types/timeline'; +import type { HapiReadableStream } from '../../../../detection_engine/rules/types'; +import type { TimelineStatusActions } from '../../../utils/common'; +import type { NoteResult } from '../../../../../../common/types/timeline/note'; export type ImportedTimeline = SavedTimeline & { savedObjectId: string | null; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.test.ts index 1c7ab73cc3809..8a168250669f7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { serverMock, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts index 11daeb50027cc..5413e036237ea 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/patch_timelines/index.ts @@ -10,9 +10,9 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_URL } from '../../../../../../common/constants'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; -import { ConfigType } from '../../../../..'; +import type { ConfigType } from '../../../../..'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts index 3d3e9e7cef2ab..5d74365440690 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/persist_favorite/index.ts @@ -10,9 +10,9 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_FAVORITE_URL } from '../../../../../../common/constants'; -import { SetupPlugins } from '../../../../../plugin'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; -import { ConfigType } from '../../../../..'; +import type { ConfigType } from '../../../../..'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts index 04aa6fef3a372..9e01a000b3dc7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/routes/timelines/resolve_timeline/index.ts @@ -10,8 +10,8 @@ import type { SecuritySolutionPluginRouter } from '../../../../../types'; import { TIMELINE_RESOLVE_URL } from '../../../../../../common/constants'; -import { ConfigType } from '../../../../..'; -import { SetupPlugins } from '../../../../../plugin'; +import type { ConfigType } from '../../../../..'; +import type { SetupPlugins } from '../../../../../plugin'; import { buildRouteValidationWithExcess } from '../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../detection_engine/routes/utils'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/get_overridable_note.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/get_overridable_note.ts index 6feca76ff53a9..338b589bab7fc 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/get_overridable_note.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/get_overridable_note.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { NoteResult, SavedNote } from '../../../../../common/types/timeline/note'; -import { FrameworkRequest } from '../../../framework'; +import type { NoteResult, SavedNote } from '../../../../../common/types/timeline/note'; +import type { FrameworkRequest } from '../../../framework'; import { getNote } from './saved_object'; /** diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/index.ts index 81941853c57a3..c4d449475db66 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { FrameworkRequest } from '../../../framework'; -import { +import type { FrameworkRequest } from '../../../framework'; +import type { SavedNote, NoteSavedObject, PageInfoNote, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/persist_notes.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/persist_notes.ts index 612c9083cb343..656980f355c8f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/persist_notes.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/persist_notes.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { FrameworkRequest } from '../../../framework'; +import type { FrameworkRequest } from '../../../framework'; import { persistNote } from './saved_object'; import { getOverridableNote } from './get_overridable_note'; -import { NoteResult } from '../../../../../common/types/timeline/note'; +import type { NoteResult } from '../../../../../common/types/timeline/note'; export const persistNotes = async ( frameworkRequest: FrameworkRequest, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts index 64820711d6685..87b89b92766a2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/notes/saved_object.ts @@ -13,12 +13,11 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { map, fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; -import { SavedObjectsFindOptions } from '@kbn/core/server'; -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { SavedObjectsFindOptions } from '@kbn/core/server'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; import { UNAUTHENTICATED_USER } from '../../../../../common/constants'; -import { +import type { SavedNote, - NoteSavedObjectRuntimeType, NoteSavedObject, PageInfoNote, SortNote, @@ -27,7 +26,8 @@ import { ResponseNote, NoteWithoutExternalRefs, } from '../../../../../common/types/timeline/note'; -import { FrameworkRequest } from '../../../framework'; +import { NoteSavedObjectRuntimeType } from '../../../../../common/types/timeline/note'; +import type { FrameworkRequest } from '../../../framework'; import { noteSavedObjectType } from '../../saved_object_mappings/notes'; import { createTimeline } from '../timelines'; import { timelineSavedObjectType } from '../../saved_object_mappings'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.test.ts index 4e77aeb474757..d65cee8965bf7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FrameworkRequest } from '../../../framework'; +import type { FrameworkRequest } from '../../../framework'; import { getAllPinnedEventsByTimelineId, PINNED_EVENTS_PER_PAGE } from '.'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.ts index 59d83ee93e5a2..8b865c0a67a0d 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/pinned_events/index.ts @@ -11,17 +11,17 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { map, fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; -import { SavedObjectsFindOptions } from '@kbn/core/server'; -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { SavedObjectsFindOptions } from '@kbn/core/server'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; import { UNAUTHENTICATED_USER } from '../../../../../common/constants'; -import { +import type { PinnedEventSavedObject, - PinnedEventSavedObjectRuntimeType, SavedPinnedEvent, PinnedEvent as PinnedEventResponse, PinnedEventWithoutExternalRefs, } from '../../../../../common/types/timeline/pinned_event'; -import { FrameworkRequest } from '../../../framework'; +import { PinnedEventSavedObjectRuntimeType } from '../../../../../common/types/timeline/pinned_event'; +import type { FrameworkRequest } from '../../../framework'; import { createTimeline } from '../timelines'; import { pinnedEventSavedObjectType } from '../../saved_object_mappings/pinned_events'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts index 5ab971adfcb83..b521750dc71ed 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/convert_saved_object_to_savedtimeline.ts @@ -10,10 +10,10 @@ import { failure } from 'io-ts/lib/PathReporter'; import { pipe } from 'fp-ts/lib/pipeable'; import { map, fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; +import type { TimelineSavedObject } from '../../../../../common/types/timeline'; import { SavedTimelineRuntimeType, TimelineTypeLiteralWithNullRt, - TimelineSavedObject, TimelineType, TimelineStatus, } from '../../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts index c2db0e00a1400..4f3a073486948 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FrameworkRequest } from '../../../framework'; +import type { FrameworkRequest } from '../../../framework'; import { mockGetTimelineValue, mockSavedObject } from '../../__mocks__/import_timelines'; import { @@ -18,7 +18,7 @@ import { import { convertSavedObjectToSavedTimeline } from './convert_saved_object_to_savedtimeline'; import { getNotesByTimelineId } from '../notes/saved_object'; import { getAllPinnedEventsByTimelineId } from '../pinned_events'; -import { +import type { AllTimelinesResponse, ResolvedTimelineWithOutcomeSavedObject, SavedTimeline, @@ -30,7 +30,7 @@ import { } from '../../__mocks__/resolve_timeline'; import { DATA_VIEW_ID_REF_NAME, SAVED_QUERY_ID_REF_NAME, SAVED_QUERY_TYPE } from '../../constants'; import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common'; -import { SavedObjectsUpdateResponse } from '@kbn/core/server'; +import type { SavedObjectsUpdateResponse } from '@kbn/core/server'; jest.mock('./convert_saved_object_to_savedtimeline', () => ({ convertSavedObjectToSavedTimeline: jest.fn(), diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts index 03b16c3292b7e..a7c09062094e1 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/index.ts @@ -7,12 +7,12 @@ import { getOr } from 'lodash/fp'; -import { SavedObjectsClientContract, SavedObjectsFindOptions } from '@kbn/core/server'; -import { AuthenticatedUser } from '@kbn/security-plugin/server'; +import type { SavedObjectsClientContract, SavedObjectsFindOptions } from '@kbn/core/server'; +import type { AuthenticatedUser } from '@kbn/security-plugin/server'; import { UNAUTHENTICATED_USER } from '../../../../../common/constants'; -import { NoteSavedObject } from '../../../../../common/types/timeline/note'; -import { PinnedEventSavedObject } from '../../../../../common/types/timeline/pinned_event'; -import { +import type { NoteSavedObject } from '../../../../../common/types/timeline/note'; +import type { PinnedEventSavedObject } from '../../../../../common/types/timeline/pinned_event'; +import type { AllTimelinesResponse, ExportTimelineNotFoundError, PageInfoTimeline, @@ -24,20 +24,19 @@ import { TimelineSavedObject, TimelineTypeLiteralWithNull, TimelineStatusLiteralWithNull, - TimelineType, - TimelineStatus, TimelineResult, TimelineWithoutExternalRefs, ResolvedTimelineWithOutcomeSavedObject, } from '../../../../../common/types/timeline'; -import { FrameworkRequest } from '../../../framework'; +import { TimelineType, TimelineStatus } from '../../../../../common/types/timeline'; +import type { FrameworkRequest } from '../../../framework'; import * as note from '../notes/saved_object'; import * as pinnedEvent from '../pinned_events'; import { convertSavedObjectToSavedTimeline } from './convert_saved_object_to_savedtimeline'; import { pickSavedTimeline } from './pick_saved_timeline'; import { timelineSavedObjectType } from '../../saved_object_mappings'; import { draftTimelineDefaults } from '../../utils/default_timeline'; -import { Maybe } from '../../../../../common/search_strategy'; +import type { Maybe } from '../../../../../common/search_strategy'; import { timelineFieldsMigrator } from './field_migrator'; export { pickSavedTimeline } from './pick_saved_timeline'; export { convertSavedObjectToSavedTimeline } from './convert_saved_object_to_savedtimeline'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.test.ts index 59899ca564e18..defe8133ecd1f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.test.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; -import { TimelineStatus, TimelineType, SavedTimeline } from '../../../../../common/types/timeline'; -import { NoteSavedObject } from '../../../../../common/types/timeline/note'; +import type { SavedTimeline } from '../../../../../common/types/timeline'; +import { TimelineStatus, TimelineType } from '../../../../../common/types/timeline'; +import type { NoteSavedObject } from '../../../../../common/types/timeline/note'; import { pickSavedTimeline } from './pick_saved_timeline'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.ts index 1df6c4f2108e7..d6cd2413e24c3 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object/timelines/pick_saved_timeline.ts @@ -6,13 +6,10 @@ */ import { isEmpty } from 'lodash/fp'; -import { AuthenticatedUser } from '@kbn/security-plugin/common/model'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common/model'; import { UNAUTHENTICATED_USER } from '../../../../../common/constants'; -import { - TimelineType, - TimelineStatus, - SavedTimelineWithSavedObjectId, -} from '../../../../../common/types/timeline'; +import type { SavedTimelineWithSavedObjectId } from '../../../../../common/types/timeline'; +import { TimelineType, TimelineStatus } from '../../../../../common/types/timeline'; export const pickSavedTimeline = ( timelineId: string | null, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/notes.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/notes.ts index 02ca8a4dd63ce..42215ec36b9f5 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/notes.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/notes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectMigrationMap } from '@kbn/core/server'; +import type { SavedObjectMigrationMap } from '@kbn/core/server'; import { migrateTimelineIdToReferences } from './utils'; export const notesMigrations: SavedObjectMigrationMap = { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/pinned_events.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/pinned_events.ts index 6f960888c83bd..f996ef8852f6f 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/pinned_events.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/pinned_events.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectMigrationMap } from '@kbn/core/server'; +import type { SavedObjectMigrationMap } from '@kbn/core/server'; import { migrateTimelineIdToReferences } from './utils'; export const pinnedEventsMigrations: SavedObjectMigrationMap = { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.test.ts index c585e6ee2e8fb..dff066e975f56 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.test.ts @@ -6,7 +6,8 @@ */ import { SAVED_QUERY_ID_REF_NAME, SAVED_QUERY_TYPE } from '../../constants'; -import { migrateSavedQueryIdToReferences, SavedQueryId } from './timelines'; +import type { SavedQueryId } from './timelines'; +import { migrateSavedQueryIdToReferences } from './timelines'; describe('timeline migrations', () => { describe('7.16.0 savedQueryId', () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.ts index ce4ecd1a46479..5e7c1e3243409 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/timelines.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { SavedObjectMigrationMap, SavedObjectSanitizedDoc, SavedObjectUnsanitizedDoc, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.test.ts index 329f09e85f3a7..b12a7080baee2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.test.ts @@ -7,7 +7,7 @@ import { timelineSavedObjectType } from '../timelines'; import { TIMELINE_ID_REF_NAME } from '../../constants'; -import { TimelineId } from './types'; +import type { TimelineId } from './types'; import { createMigratedDoc, createReference, migrateTimelineIdToReferences } from './utils'; describe('migration utils', () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.ts index fa35c1c622303..e414220fd01c7 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/migrations/utils.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { SavedObjectReference, SavedObjectSanitizedDoc, SavedObjectUnsanitizedDoc, } from '@kbn/core/server'; import { timelineSavedObjectType } from '../timelines'; import { TIMELINE_ID_REF_NAME } from '../../constants'; -import { TimelineId } from './types'; +import type { TimelineId } from './types'; export function createReference( id: string | null | undefined, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts index a1d39af289184..98a965ea0c26b 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/notes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { notesMigrations } from './migrations/notes'; export const noteSavedObjectType = 'siem-ui-timeline-note'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts index bd21e2a4b1cf7..0df23655c6af8 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/pinned_events.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { pinnedEventsMigrations } from './migrations/pinned_events'; export const pinnedEventSavedObjectType = 'siem-ui-timeline-pinned-event'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts index 24fc9ddcbf110..e58c7a70739ab 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/saved_object_mappings/timelines.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { timelinesMigrations } from './migrations/timelines'; export const timelineSavedObjectType = 'siem-ui-timeline'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts index f524d0c7ca3a6..f742a5c6171c0 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/check_timelines_status.ts @@ -7,18 +7,14 @@ import path, { join, resolve } from 'path'; import * as rt from 'io-ts'; -import { - TimelineSavedToReturnObjectRuntimeType, - TimelineSavedObject, -} from '../../../../common/types/timeline'; +import type { TimelineSavedObject } from '../../../../common/types/timeline'; +import { TimelineSavedToReturnObjectRuntimeType } from '../../../../common/types/timeline'; -import { - ImportTimelinesSchema, - ImportTimelinesSchemaRt, -} from '../schemas/timelines/import_timelines_schema'; +import type { ImportTimelinesSchema } from '../schemas/timelines/import_timelines_schema'; +import { ImportTimelinesSchemaRt } from '../schemas/timelines/import_timelines_schema'; import { unionWithNullType } from '../../../../common/utility_types'; -import { FrameworkRequest } from '../../framework'; +import type { FrameworkRequest } from '../../framework'; import { getExistingPrepackagedTimelines } from '../saved_object/timelines'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts index f05366264ece6..0d5cf7684f02b 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts @@ -4,19 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import * as rt from 'io-ts'; +import type * as rt from 'io-ts'; import { set } from '@elastic/safer-lodash-set/fp'; import readline from 'readline'; import fs from 'fs'; -import { Readable } from 'stream'; +import type { Readable } from 'stream'; import { createListStream } from '@kbn/utils'; import { schema } from '@kbn/config-schema'; -import { KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; +import type { KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; import { formatErrors } from '@kbn/securitysolution-io-ts-utils'; -import { SetupPlugins, StartPlugins } from '../../../plugin'; +import type { SetupPlugins, StartPlugins } from '../../../plugin'; -import { FrameworkRequest } from '../../framework'; +import type { FrameworkRequest } from '../../framework'; export const buildFrameworkRequest = async ( context: RequestHandlerContext, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.test.ts index d59c312d0b2a1..031c41f8ae340 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.test.ts @@ -6,7 +6,7 @@ */ import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; -import { FrameworkRequest } from '../../framework'; +import type { FrameworkRequest } from '../../framework'; import { mockUniqueParsedObjects, @@ -15,7 +15,7 @@ import { mockGetTimelineValue, } from '../__mocks__/import_timelines'; -import { CompareTimelinesStatus as TimelinesStatusType } from './compare_timelines_status'; +import type { CompareTimelinesStatus as TimelinesStatusType } from './compare_timelines_status'; import { EMPTY_TITLE_ERROR_MESSAGE, UPDATE_STATUS_ERROR_MESSAGE, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.ts index 385a70e877520..6e3072b7b986b 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/compare_timelines_status.ts @@ -6,15 +6,15 @@ */ import { isEmpty, isInteger } from 'lodash/fp'; -import { +import type { TimelineTypeLiteralWithNull, - TimelineType, - TimelineStatus, TimelineTypeLiteral, } from '../../../../common/types/timeline'; -import { FrameworkRequest } from '../../framework'; +import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; +import type { FrameworkRequest } from '../../framework'; -import { TimelineStatusActions, TimelineStatusAction } from './common'; +import type { TimelineStatusAction } from './common'; +import { TimelineStatusActions } from './common'; import { TimelineObject } from './timeline_object'; import { checkIsCreateFailureCases, diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline.ts index 2f362bb722c63..831726501d2e3 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline.ts @@ -6,7 +6,8 @@ */ import { defaultHeaders } from './default_timeline_headers'; -import { SavedTimeline, TimelineType, TimelineStatus } from '../../../../common/types/timeline'; +import type { SavedTimeline } from '../../../../common/types/timeline'; +import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; import { Direction } from '../../../../common/search_strategy'; export const draftTimelineDefaults: SavedTimeline = { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline_headers.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline_headers.ts index d7f3ca5c008f1..650ecf69d4916 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline_headers.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/default_timeline_headers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedTimeline } from '../../../../common/types/timeline'; +import type { SavedTimeline } from '../../../../common/types/timeline'; export const defaultColumnHeaderType = 'not-filtered'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.test.ts index 196de3541cc23..d20893807999e 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.test.ts @@ -25,11 +25,8 @@ import { NOT_ALLOW_UPDATE_STATUS_ERROR_MESSAGE, TEMPLATE_TIMELINE_VERSION_CONFLICT_MESSAGE, } from './failure_cases'; -import { - TimelineStatus, - TimelineType, - TimelineSavedObject, -} from '../../../../common/types/timeline'; +import type { TimelineSavedObject } from '../../../../common/types/timeline'; +import { TimelineStatus, TimelineType } from '../../../../common/types/timeline'; import { mockGetTimelineValue, mockGetTemplateTimelineValue } from '../__mocks__/import_timelines'; describe('failure cases', () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts index 44f16c57ad2b4..cf6793ad1b1c2 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/failure_cases.ts @@ -6,11 +6,8 @@ */ import { isEmpty } from 'lodash/fp'; -import { - TimelineSavedObject, - TimelineStatus, - TimelineTypeLiteral, -} from '../../../../common/types/timeline'; +import type { TimelineSavedObject, TimelineTypeLiteral } from '../../../../common/types/timeline'; +import { TimelineStatus } from '../../../../common/types/timeline'; export const UPDATE_TIMELINE_ERROR_MESSAGE = 'You cannot create new timelines with PATCH. Use POST instead.'; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.test.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.test.ts index 9e3475d697807..07e812699b93c 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.test.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObject, SavedObjectReference } from '@kbn/core/server'; +import type { SavedObject, SavedObjectReference } from '@kbn/core/server'; import { FieldMigrator } from './migrator'; describe('FieldMigrator', () => { diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.ts index 6267975e3a33b..c97f7053a5098 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/migrator.ts @@ -7,7 +7,11 @@ import { set } from '@elastic/safer-lodash-set'; import _ from 'lodash'; -import { SavedObject, SavedObjectReference, SavedObjectsUpdateResponse } from '@kbn/core/server'; +import type { + SavedObject, + SavedObjectReference, + SavedObjectsUpdateResponse, +} from '@kbn/core/server'; interface Field { path: string; diff --git a/x-pack/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts b/x-pack/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts index 391f887635cff..bccce5a73d3a9 100644 --- a/x-pack/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts +++ b/x-pack/plugins/security_solution/server/lib/timeline/utils/timeline_object.ts @@ -5,13 +5,9 @@ * 2.0. */ -import { - TimelineType, - TimelineTypeLiteral, - TimelineSavedObject, - TimelineStatus, -} from '../../../../common/types/timeline'; -import { FrameworkRequest } from '../../framework'; +import type { TimelineTypeLiteral, TimelineSavedObject } from '../../../../common/types/timeline'; +import { TimelineType, TimelineStatus } from '../../../../common/types/timeline'; +import type { FrameworkRequest } from '../../framework'; import { getTimelineOrNull, getTimelineTemplateOrNull } from '../saved_object/timelines'; interface TimelineObjectProps { diff --git a/x-pack/plugins/security_solution/server/lib/types.ts b/x-pack/plugins/security_solution/server/lib/types.ts index 919e9a7c7b160..6d20331e770ab 100644 --- a/x-pack/plugins/security_solution/server/lib/types.ts +++ b/x-pack/plugins/security_solution/server/lib/types.ts @@ -6,7 +6,7 @@ */ export type { ConfigType as Configuration } from '../config'; -import { TotalValue, BaseHit, Explanation } from '../../common/detection_engine/types'; +import type { TotalValue, BaseHit, Explanation } from '../../common/detection_engine/types'; export interface ShardsResponse { total: number; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_create_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_create_handler.ts index 93497f20501ee..f87e845487a04 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_create_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_create_handler.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { +import type { CreateExceptionListItemOptions, ExceptionsListPreCreateItemServerExtension, } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { EventFilterValidator, TrustedAppValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_delete_item_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_delete_item_handler.ts index ab010d8efe6dd..66a9b4709bd2b 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_delete_item_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_delete_item_handler.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { ExceptionsListPreDeleteItemServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionsListPreDeleteItemServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_export_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_export_handler.ts index d14a5792036fa..7dac876b34f22 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_export_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_export_handler.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExceptionsListPreExportServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionsListPreExportServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_get_one_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_get_one_handler.ts index ec5b3f45ea855..9ed81b1f0d585 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_get_one_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_get_one_handler.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { ExceptionsListPreGetOneItemServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionsListPreGetOneItemServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_import_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_import_handler.ts index 2856bb0af867f..48832f6e315a0 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_import_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_import_handler.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ExceptionsListPreImportServerExtension } from '@kbn/lists-plugin/server'; +import type { ExceptionsListPreImportServerExtension } from '@kbn/lists-plugin/server'; import { EndpointArtifactExceptionValidationError } from '../validators/errors'; import { ALL_ENDPOINT_ARTIFACT_LIST_IDS } from '../../../../common/endpoint/service/artifacts/constants'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_multi_list_find_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_multi_list_find_handler.ts index 3c8e9382486bb..973bb6ce5072a 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_multi_list_find_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_multi_list_find_handler.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExceptionsListPreMultiListFindServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionsListPreMultiListFindServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_single_list_find_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_single_list_find_handler.ts index cad00afd961e4..946a0bf6d7c43 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_single_list_find_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_single_list_find_handler.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExceptionsListPreSingleListFindServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionsListPreSingleListFindServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_summary_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_summary_handler.ts index 2a459ef99409f..6b9af37f877ab 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_summary_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_summary_handler.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ExceptionsListPreSummaryServerExtension } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionsListPreSummaryServerExtension } from '@kbn/lists-plugin/server'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import { TrustedAppValidator, HostIsolationExceptionsValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_update_handler.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_update_handler.ts index 1dfa597314f1a..681d16a1e44b8 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_update_handler.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/handlers/exceptions_pre_update_handler.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { +import type { ExceptionsListPreUpdateItemServerExtension, UpdateExceptionListItemOptions, } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; -import { ExceptionItemLikeOptions } from '../types'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionItemLikeOptions } from '../types'; import { EventFilterValidator, TrustedAppValidator, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/register_endpoint_extension_points.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/register_endpoint_extension_points.ts index 6ba50ccaceb9d..d852cdb317c63 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/register_endpoint_extension_points.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/register_endpoint_extension_points.ts @@ -6,7 +6,7 @@ */ import type { ListsServerExtensionRegistrar } from '@kbn/lists-plugin/server'; -import { EndpointAppContextService } from '../../endpoint/endpoint_app_context_services'; +import type { EndpointAppContextService } from '../../endpoint/endpoint_app_context_services'; import { getExceptionsPreCreateItemHandler } from './handlers/exceptions_pre_create_handler'; import { getExceptionsPreUpdateItemHandler } from './handlers/exceptions_pre_update_handler'; import { getExceptionsPreGetOneHandler } from './handlers/exceptions_pre_get_one_handler'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/types.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/types.ts index 9108e83ad0aa3..94178a6cfeeb9 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/types.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CreateExceptionListItemOptions } from '@kbn/lists-plugin/server'; +import type { CreateExceptionListItemOptions } from '@kbn/lists-plugin/server'; /** * An Exception Like item is a structure used internally by several of the Exceptions api/service in that diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts index cff835ac2d58e..d149b8c0fd7ba 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.test.ts @@ -13,9 +13,10 @@ import { import { BaseValidatorMock, createExceptionItemLikeOptionsMock } from './mocks'; import { EndpointArtifactExceptionValidationError } from './errors'; import { httpServerMock } from '@kbn/core/server/mocks'; -import { createFleetAuthzMock, PackagePolicy } from '@kbn/fleet-plugin/common'; -import { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; -import { ExceptionItemLikeOptions } from '../types'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import { createFleetAuthzMock } from '@kbn/fleet-plugin/common'; +import type { PackagePolicyServiceInterface } from '@kbn/fleet-plugin/server'; +import type { ExceptionItemLikeOptions } from '../types'; import { BY_POLICY_ARTIFACT_TAG_PREFIX, GLOBAL_ARTIFACT_TAG, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts index 97c5dc84a8040..04a7d5a09875b 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/base_validator.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; import { isEqual } from 'lodash/fp'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; -import { ExceptionItemLikeOptions } from '../types'; +import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; +import type { ExceptionItemLikeOptions } from '../types'; import { getEndpointAuthzInitialState } from '../../../../common/endpoint/service/authz'; import { getPolicyIdsFromArtifact, diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts index 5510f352a414e..eaad3e6fb09f8 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/blocklist_validator.ts @@ -7,15 +7,16 @@ import { cloneDeep, uniq } from 'lodash'; import { ENDPOINT_BLOCKLISTS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { schema, Type, TypeOf } from '@kbn/config-schema'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { Type, TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { +import type { CreateExceptionListItemOptions, UpdateExceptionListItemOptions, } from '@kbn/lists-plugin/server'; import { BaseValidator } from './base_validator'; -import { ExceptionItemLikeOptions } from '../types'; +import type { ExceptionItemLikeOptions } from '../types'; import { isValidHash } from '../../../../common/endpoint/service/artifacts/validations'; import { EndpointArtifactExceptionValidationError } from './errors'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/event_filter_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/event_filter_validator.ts index e90c6e4263b38..7759caa20e1f9 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/event_filter_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/event_filter_validator.ts @@ -6,16 +6,16 @@ */ import { schema } from '@kbn/config-schema'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { ENDPOINT_EVENT_FILTERS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { +import type { CreateExceptionListItemOptions, UpdateExceptionListItemOptions, } from '@kbn/lists-plugin/server'; import { EXCEPTIONABLE_ENDPOINT_EVENT_FIELDS } from '../../../../common/endpoint/exceptions/exceptionable_endpoint_event_fields'; -import { ExceptionItemLikeOptions } from '../types'; +import type { ExceptionItemLikeOptions } from '../types'; import { BaseValidator } from './base_validator'; import { EndpointArtifactExceptionValidationError } from './errors'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts index 5d85866a3918f..39e86e7104fae 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/host_isolation_exceptions_validator.ts @@ -8,13 +8,13 @@ import { schema } from '@kbn/config-schema'; import { ENDPOINT_HOST_ISOLATION_EXCEPTIONS_LIST_ID } from '@kbn/securitysolution-list-constants'; import { OperatingSystem } from '@kbn/securitysolution-utils'; -import { +import type { CreateExceptionListItemOptions, UpdateExceptionListItemOptions, } from '@kbn/lists-plugin/server'; import { BaseValidator, BasicEndpointExceptionDataSchema } from './base_validator'; import { EndpointArtifactExceptionValidationError } from './errors'; -import { ExceptionItemLikeOptions } from '../types'; +import type { ExceptionItemLikeOptions } from '../types'; import { isValidIPv4OrCIDR } from '../../../../common/endpoint/utils/is_valid_ip'; diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/mocks.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/mocks.ts index baaac6debb7c0..9f57a7945f4a3 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/mocks.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/mocks.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import { listMock } from '@kbn/lists-plugin/server/mocks'; import { BaseValidator } from './base_validator'; -import { ExceptionItemLikeOptions } from '../types'; +import type { ExceptionItemLikeOptions } from '../types'; import { BY_POLICY_ARTIFACT_TAG_PREFIX } from '../../../../common/endpoint/service/artifacts'; /** diff --git a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts index af98ba7076535..ebc3c05460923 100644 --- a/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts +++ b/x-pack/plugins/security_solution/server/lists_integration/endpoint/validators/trusted_app_validator.ts @@ -6,16 +6,18 @@ */ import { ENDPOINT_TRUSTED_APPS_LIST_ID } from '@kbn/securitysolution-list-constants'; -import { schema, TypeOf } from '@kbn/config-schema'; -import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -import { OperatingSystem, TrustedAppEntryTypes } from '@kbn/securitysolution-utils'; -import { +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; +import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; +import type { TrustedAppEntryTypes } from '@kbn/securitysolution-utils'; +import { OperatingSystem } from '@kbn/securitysolution-utils'; +import type { CreateExceptionListItemOptions, UpdateExceptionListItemOptions, } from '@kbn/lists-plugin/server'; import { BaseValidator } from './base_validator'; -import { ExceptionItemLikeOptions } from '../types'; -import { TrustedAppConditionEntry as ConditionEntry } from '../../../../common/endpoint/types'; +import type { ExceptionItemLikeOptions } from '../types'; +import type { TrustedAppConditionEntry as ConditionEntry } from '../../../../common/endpoint/types'; import { getDuplicateFields, isValidHash, diff --git a/x-pack/plugins/security_solution/server/mocks.ts b/x-pack/plugins/security_solution/server/mocks.ts index bc8183666c7f3..fad5686e2e2e3 100644 --- a/x-pack/plugins/security_solution/server/mocks.ts +++ b/x-pack/plugins/security_solution/server/mocks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AppClient } from './types'; +import type { AppClient } from './types'; type AppClientMock = jest.Mocked; const createAppClientMock = (): AppClientMock => diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 5cebe441dfe18..908920ce77600 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import LRU from 'lru-cache'; import { QUERY_RULE_TYPE_ID, @@ -16,16 +16,18 @@ import { THRESHOLD_RULE_TYPE_ID, } from '@kbn/securitysolution-rules'; -import { Logger, SavedObjectsClient } from '@kbn/core/server'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import type { Logger } from '@kbn/core/server'; +import { SavedObjectsClient } from '@kbn/core/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { ECS_COMPONENT_TEMPLATE_NAME } from '@kbn/rule-registry-plugin/common/assets'; -import { FieldMap } from '@kbn/rule-registry-plugin/common/field_map'; +import type { FieldMap } from '@kbn/rule-registry-plugin/common/field_map'; import { technicalRuleFieldMap } from '@kbn/rule-registry-plugin/common/assets/field_maps/technical_rule_field_map'; import { mappingFromFieldMap } from '@kbn/rule-registry-plugin/common/mapping_from_field_map'; -import { IRuleDataClient, Dataset } from '@kbn/rule-registry-plugin/server'; -import { ListPluginSetup } from '@kbn/lists-plugin/server'; -import { ILicense } from '@kbn/licensing-plugin/server'; +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import { Dataset } from '@kbn/rule-registry-plugin/server'; +import type { ListPluginSetup } from '@kbn/lists-plugin/server'; +import type { ILicense } from '@kbn/licensing-plugin/server'; import { createEqlAlertType, @@ -41,7 +43,8 @@ import { ManifestTask } from './endpoint/lib/artifacts'; import { CheckMetadataTransformsTask } from './endpoint/lib/metadata'; import { initSavedObjects } from './saved_objects'; import { AppClientFactory } from './client'; -import { createConfig, ConfigType } from './config'; +import type { ConfigType } from './config'; +import { createConfig } from './config'; import { initUiSettings } from './ui_settings'; import { APP_ID, @@ -55,12 +58,14 @@ import { registerPolicyRoutes } from './endpoint/routes/policy'; import { registerActionRoutes } from './endpoint/routes/actions'; import { EndpointArtifactClient, ManifestManager } from './endpoint/services'; import { EndpointAppContextService } from './endpoint/endpoint_app_context_services'; -import { EndpointAppContext } from './endpoint/types'; +import type { EndpointAppContext } from './endpoint/types'; import { initUsageCollectors } from './usage'; import type { SecuritySolutionRequestHandlerContext } from './types'; import { securitySolutionSearchStrategyProvider } from './search_strategy/security_solution'; -import { ITelemetryEventsSender, TelemetryEventsSender } from './lib/telemetry/sender'; -import { ITelemetryReceiver, TelemetryReceiver } from './lib/telemetry/receiver'; +import type { ITelemetryEventsSender } from './lib/telemetry/sender'; +import { TelemetryEventsSender } from './lib/telemetry/sender'; +import type { ITelemetryReceiver } from './lib/telemetry/receiver'; +import { TelemetryReceiver } from './lib/telemetry/receiver'; import { licenseService } from './lib/license'; import { PolicyWatcher } from './endpoint/lib/policy/license_watch'; import { migrateArtifactsToFleet } from './endpoint/lib/artifacts/migrate_artifacts_to_fleet'; @@ -72,7 +77,7 @@ import { } from './lib/detection_engine/rule_execution_log'; import { getKibanaPrivilegesFeaturePrivileges, getCasesKibanaFeature } from './features'; import { EndpointMetadataService } from './endpoint/services/metadata'; -import { CreateRuleOptions } from './lib/detection_engine/rule_types/types'; +import type { CreateRuleOptions } from './lib/detection_engine/rule_types/types'; // eslint-disable-next-line no-restricted-imports import { legacyRulesNotificationAlertType } from './lib/detection_engine/notifications/legacy_rules_notification_alert_type'; // eslint-disable-next-line no-restricted-imports diff --git a/x-pack/plugins/security_solution/server/plugin_contract.ts b/x-pack/plugins/security_solution/server/plugin_contract.ts index c07dfa59c3deb..4abf6516696aa 100644 --- a/x-pack/plugins/security_solution/server/plugin_contract.ts +++ b/x-pack/plugins/security_solution/server/plugin_contract.ts @@ -5,35 +5,35 @@ * 2.0. */ -import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; -import { +import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; +import type { PluginSetup as DataPluginSetup, PluginStart as DataPluginStart, } from '@kbn/data-plugin/server'; -import { UsageCollectionSetup as UsageCollectionPluginSetup } from '@kbn/usage-collection-plugin/server'; -import { +import type { UsageCollectionSetup as UsageCollectionPluginSetup } from '@kbn/usage-collection-plugin/server'; +import type { PluginSetupContract as AlertingPluginSetup, PluginStartContract as AlertingPluginStart, } from '@kbn/alerting-plugin/server'; -import { PluginStartContract as CasesPluginStart } from '@kbn/cases-plugin/server'; -import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; -import { IEventLogClientService, IEventLogService } from '@kbn/event-log-plugin/server'; -import { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; -import { FleetStartContract as FleetPluginStart } from '@kbn/fleet-plugin/server'; -import { LicensingPluginStart, LicensingPluginSetup } from '@kbn/licensing-plugin/server'; -import { ListPluginSetup } from '@kbn/lists-plugin/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { +import type { PluginStartContract as CasesPluginStart } from '@kbn/cases-plugin/server'; +import type { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import type { IEventLogClientService, IEventLogService } from '@kbn/event-log-plugin/server'; +import type { PluginSetupContract as FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import type { FleetStartContract as FleetPluginStart } from '@kbn/fleet-plugin/server'; +import type { LicensingPluginStart, LicensingPluginSetup } from '@kbn/licensing-plugin/server'; +import type { ListPluginSetup } from '@kbn/lists-plugin/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { RuleRegistryPluginSetupContract as RuleRegistryPluginSetup, RuleRegistryPluginStartContract as RuleRegistryPluginStart, } from '@kbn/rule-registry-plugin/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; -import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; -import { +import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; +import type { TaskManagerSetupContract as TaskManagerPluginSetup, TaskManagerStartContract as TaskManagerPluginStart, } from '@kbn/task-manager-plugin/server'; -import { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; +import type { TelemetryPluginStart, TelemetryPluginSetup } from '@kbn/telemetry-plugin/server'; export interface SecuritySolutionPluginSetupDependencies { alerting: AlertingPluginSetup; diff --git a/x-pack/plugins/security_solution/server/request_context_factory.mock.ts b/x-pack/plugins/security_solution/server/request_context_factory.mock.ts index 5621ac8fb26ab..4d98d6a4f37bd 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.mock.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.mock.ts @@ -6,7 +6,7 @@ */ import { requestContextMock } from './lib/detection_engine/routes/__mocks__'; -import { IRequestContextFactory } from './request_context_factory'; +import type { IRequestContextFactory } from './request_context_factory'; export const requestContextFactoryMock = { create: (): jest.Mocked => ({ diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index 4d3a9bf32c736..72050aba3f9db 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -7,30 +7,30 @@ import { memoize } from 'lodash'; -import { Logger, KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; +import type { Logger, KibanaRequest, RequestHandlerContext } from '@kbn/core/server'; -import { FleetAuthz } from '@kbn/fleet-plugin/common'; +import type { FleetAuthz } from '@kbn/fleet-plugin/common'; import { DEFAULT_SPACE_ID } from '../common/constants'; import { AppClientFactory } from './client'; -import { ConfigType } from './config'; +import type { ConfigType } from './config'; import { ruleExecutionLogForRoutesFactory } from './lib/detection_engine/rule_execution_log'; import { buildFrameworkRequest } from './lib/timeline/utils/common'; -import { +import type { SecuritySolutionPluginCoreSetupDependencies, SecuritySolutionPluginSetupDependencies, } from './plugin_contract'; -import { +import type { SecuritySolutionApiRequestHandlerContext, SecuritySolutionRequestHandlerContext, } from './types'; -import { Immutable } from '../common/endpoint/types'; -import { EndpointAuthz } from '../common/endpoint/types/authz'; +import type { Immutable } from '../common/endpoint/types'; +import type { EndpointAuthz } from '../common/endpoint/types/authz'; import { calculateEndpointAuthz, getEndpointAuthzInitialState, } from '../common/endpoint/service/authz'; import { licenseService } from './lib/license'; -import { EndpointAppContextService } from './endpoint/endpoint_app_context_services'; +import type { EndpointAppContextService } from './endpoint/endpoint_app_context_services'; export interface IRequestContextFactory { create( diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index 04bc2e1e3988a..129f611e4aa96 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { StartServicesAccessor, Logger } from '@kbn/core/server'; -import { IRuleDataClient, RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import type { StartServicesAccessor, Logger } from '@kbn/core/server'; +import type { IRuleDataClient, RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; -import { SecuritySolutionPluginRouter } from '../types'; +import type { SecuritySolutionPluginRouter } from '../types'; import { createRulesRoute } from '../lib/detection_engine/routes/rules/create_rules_route'; import { createIndexRoute } from '../lib/detection_engine/routes/index/create_index_route'; @@ -55,19 +55,19 @@ import { persistNoteRoute } from '../lib/timeline/routes/notes'; import { persistPinnedEventRoute } from '../lib/timeline/routes/pinned_events'; -import { SetupPlugins, StartPlugins } from '../plugin'; -import { ConfigType } from '../config'; -import { ITelemetryEventsSender } from '../lib/telemetry/sender'; +import type { SetupPlugins, StartPlugins } from '../plugin'; +import type { ConfigType } from '../config'; +import type { ITelemetryEventsSender } from '../lib/telemetry/sender'; import { installPrepackedTimelinesRoute } from '../lib/timeline/routes/prepackaged_timelines/install_prepackaged_timelines'; import { previewRulesRoute } from '../lib/detection_engine/routes/rules/preview_rules_route'; -import { +import type { CreateRuleOptions, CreateSecurityRuleTypeWrapperProps, } from '../lib/detection_engine/rule_types/types'; // eslint-disable-next-line no-restricted-imports import { legacyCreateLegacyNotificationRoute } from '../lib/detection_engine/routes/rules/legacy_create_legacy_notification'; import { createSourcererDataViewRoute, getSourcererDataViewRoute } from '../lib/sourcerer/routes'; -import { ITelemetryReceiver } from '../lib/telemetry/receiver'; +import type { ITelemetryReceiver } from '../lib/telemetry/receiver'; import { telemetryDetectionRulesPreviewRoute } from '../lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route'; import { getInstalledIntegrationsRoute } from '../lib/detection_engine/routes/fleet/get_installed_integrations/get_installed_integrations_route'; diff --git a/x-pack/plugins/security_solution/server/routes/limited_concurrency.ts b/x-pack/plugins/security_solution/server/routes/limited_concurrency.ts index 34ef50a17e02d..bce6c835a7ed7 100644 --- a/x-pack/plugins/security_solution/server/routes/limited_concurrency.ts +++ b/x-pack/plugins/security_solution/server/routes/limited_concurrency.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CoreSetup, KibanaRequest, LifecycleResponseFactory, diff --git a/x-pack/plugins/security_solution/server/saved_objects.ts b/x-pack/plugins/security_solution/server/saved_objects.ts index 677bd581d82d4..e8943c66b3ad7 100644 --- a/x-pack/plugins/security_solution/server/saved_objects.ts +++ b/x-pack/plugins/security_solution/server/saved_objects.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreSetup } from '@kbn/core/server'; +import type { CoreSetup } from '@kbn/core/server'; import { noteType, pinnedEventType, timelineType } from './lib/timeline/saved_object_mappings'; // eslint-disable-next-line no-restricted-imports diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/factory.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/factory.ts index e5e1a14df3c1c..ec08cfbc30965 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/factory.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/factory.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; -import { SecuritySolutionFactory } from '../../types'; +import type { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; +import type { SecuritySolutionFactory } from '../../types'; import { buildEventEnrichmentQuery } from './query'; import { parseEventEnrichmentResponse } from './response'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/helpers.ts index 6cdc1ee8818bd..e15aceb8a713b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/helpers.ts @@ -12,9 +12,11 @@ import { ENRICHMENT_TYPES, EVENT_ENRICHMENT_INDICATOR_FIELD_MAP, } from '../../../../../../common/cti/constants'; -import { +import type { CtiEnrichment, EventField, +} from '../../../../../../common/search_strategy/security_solution/cti'; +import { isValidEventField, validEventFields, } from '../../../../../../common/search_strategy/security_solution/cti'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts index 6f86b0006d156..e8d50cfc24ab5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; +import type { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildIndicatorShouldClauses } from './helpers'; export const buildEventEnrichmentQuery: SecuritySolutionFactory['buildDsl'] = diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.ts index 800e033a781e9..026cf28319e5e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/response.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; +import type { CtiQueries } from '../../../../../../common/search_strategy/security_solution/cti'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildIndicatorEnrichments, getTotalCount } from './helpers'; import { buildEventEnrichmentQuery } from './query'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/index.ts index 1b21e8f412f56..dcd311ece1f9f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { SecuritySolutionFactory } from '../../types'; -import { +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { SecuritySolutionFactory } from '../../types'; +import type { CtiDataSourceStrategyResponse, CtiQueries, CtiDataSourceRequestOptions, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/query.threat_intel_source.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/query.threat_intel_source.dsl.ts index 62ad39111b134..5aef67e1fc42d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/query.threat_intel_source.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/threat_intel_source/query.threat_intel_source.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CtiDataSourceRequestOptions } from '../../../../../../common/search_strategy/security_solution/cti'; +import type { CtiDataSourceRequestOptions } from '../../../../../../common/search_strategy/security_solution/cti'; export const buildTiDataSourceQuery = ({ timerange, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts index 578b9055ebb89..c266dcf6ee603 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts @@ -5,20 +5,18 @@ * 2.0. */ -import { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import type { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { allowedExperimentalValues } from '../../../../../../../common/experimental_features'; -import { - Direction, +import type { HostAggEsItem, - HostsFields, - HostsQueries, HostsRequestOptions, } from '../../../../../../../common/search_strategy'; -import { EndpointAppContextService } from '../../../../../../endpoint/endpoint_app_context_services'; -import { EndpointAppContext } from '../../../../../../endpoint/types'; +import { Direction, HostsFields, HostsQueries } from '../../../../../../../common/search_strategy'; +import type { EndpointAppContextService } from '../../../../../../endpoint/endpoint_app_context_services'; +import type { EndpointAppContext } from '../../../../../../endpoint/types'; export const mockOptions: HostsRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.test.ts index 6b2c0203d10c5..3627ffcf5d1fe 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsEdges } from '../../../../../../common/search_strategy/security_solution'; +import type { HostsEdges } from '../../../../../../common/search_strategy/security_solution'; import { formatHostEdgesData } from './helpers'; import { mockBuckets } from './__mocks__'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.ts index f0d815b332ee6..3e92a733d12bd 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/helpers.ts @@ -8,7 +8,7 @@ import { set } from '@elastic/safer-lodash-set/fp'; import { get, has } from 'lodash/fp'; import { hostFieldsMap } from '../../../../../../common/ecs/ecs_fields'; -import { +import type { HostAggEsItem, HostsEdges, HostValue, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.test.ts index 905a63ba48a1f..b0b2292d6b5f1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.test.ts @@ -7,7 +7,7 @@ import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { HostsRequestOptions } from '../../../../../../common/search_strategy/security_solution'; +import type { HostsRequestOptions } from '../../../../../../common/search_strategy/security_solution'; import * as buildQuery from './query.all_hosts.dsl'; import * as buildRiskQuery from '../../risk_score/all/query.risk_score.dsl'; import { allHosts } from '.'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.ts index 8158190eb65ad..57f30ed8703b0 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/index.ts @@ -8,9 +8,9 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { IScopedClusterClient } from '@kbn/core/server'; +import type { IScopedClusterClient } from '@kbn/core/server'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { HostAggEsItem, HostsStrategyResponse, HostsQueries, @@ -18,18 +18,15 @@ import { HostsEdges, } from '../../../../../../common/search_strategy/security_solution/hosts'; -import { - getHostRiskIndex, - buildHostNamesFilter, - HostsRiskScore, -} from '../../../../../../common/search_strategy'; +import type { HostsRiskScore } from '../../../../../../common/search_strategy'; +import { getHostRiskIndex, buildHostNamesFilter } from '../../../../../../common/search_strategy'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildHostsQuery } from './query.all_hosts.dsl'; import { formatHostEdgesData, HOSTS_FIELDS } from './helpers'; -import { EndpointAppContext } from '../../../../../endpoint/types'; +import type { EndpointAppContext } from '../../../../../endpoint/types'; import { buildRiskScoreQuery } from '../../risk_score/all/query.risk_score.dsl'; export const allHosts: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts index 5d650abd14998..88d70e1065a9a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts @@ -6,12 +6,12 @@ */ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { +import type { Direction, HostsRequestOptions, SortField, - HostsFields, } from '../../../../../../common/search_strategy'; +import { HostsFields } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses, reduceFields } from '../../../../../utils/build_query'; import { assertUnreachable } from '../../../../../../common/utility_types'; import { HOSTS_FIELDS } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts index 175a0f93d5e07..aa4d5c03b23be 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts @@ -6,13 +6,12 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { - Direction, - HostsQueries, +import type { HostDetailsRequestOptions, SortField, HostsFields, } from '../../../../../../../common/search_strategy'; +import { Direction, HostsQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: HostDetailsRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helper.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helper.test.ts index 6dd2dc3834ae8..b095e4ba49327 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helper.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helper.test.ts @@ -6,7 +6,7 @@ */ import { Direction } from '../../../../../../common/search_strategy/common'; -import { AggregationRequest } from '../../../../../../common/search_strategy/security_solution/hosts'; +import type { AggregationRequest } from '../../../../../../common/search_strategy/security_solution/hosts'; import { buildFieldsTermAggregation } from './helpers'; describe('#buildFieldsTermAggregation', () => { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts index 4d2f804b3092c..3f2a052ffc1b1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/helpers.ts @@ -7,10 +7,14 @@ import { set } from '@elastic/safer-lodash-set/fp'; import { get, has, head } from 'lodash/fp'; -import { IScopedClusterClient, KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import type { + IScopedClusterClient, + KibanaRequest, + SavedObjectsClientContract, +} from '@kbn/core/server'; import { hostFieldsMap } from '../../../../../../common/ecs/ecs_fields'; import { Direction } from '../../../../../../common/search_strategy/common'; -import { +import type { AggregationRequest, EndpointFields, HostAggEsItem, @@ -19,7 +23,7 @@ import { HostValue, } from '../../../../../../common/search_strategy/security_solution/hosts'; import { toObjectArrayOfStrings } from '../../../../../../common/utils/to_array'; -import { EndpointAppContext } from '../../../../../endpoint/types'; +import type { EndpointAppContext } from '../../../../../endpoint/types'; import { getPendingActionCounts } from '../../../../../endpoint/services'; export const HOST_DETAILS_FIELDS = [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx index 6eda020d4decf..fd718ceec69aa 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.test.tsx @@ -12,9 +12,13 @@ import { mockSearchStrategyResponse, formattedSearchStrategyResponse, } from './__mocks__'; -import { IScopedClusterClient, KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; -import { EndpointAppContext } from '../../../../../endpoint/types'; -import { EndpointAppContextService } from '../../../../../endpoint/endpoint_app_context_services'; +import type { + IScopedClusterClient, + KibanaRequest, + SavedObjectsClientContract, +} from '@kbn/core/server'; +import type { EndpointAppContext } from '../../../../../endpoint/types'; +import type { EndpointAppContextService } from '../../../../../endpoint/endpoint_app_context_services'; import { allowedExperimentalValues } from '../../../../../../common/experimental_features'; const mockDeps = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.ts index b82e264a2e880..27f00f5b8734a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/index.ts @@ -8,8 +8,12 @@ import { get } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { IScopedClusterClient, KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; -import { +import type { + IScopedClusterClient, + KibanaRequest, + SavedObjectsClientContract, +} from '@kbn/core/server'; +import type { HostAggEsData, HostDetailsStrategyResponse, HostsQueries, @@ -18,10 +22,10 @@ import { } from '../../../../../../common/search_strategy/security_solution/hosts'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildHostDetailsQuery } from './query.host_details.dsl'; import { formatHostItem, getHostEndpoint } from './helpers'; -import { EndpointAppContext } from '../../../../../endpoint/types'; +import type { EndpointAppContext } from '../../../../../endpoint/types'; export const hostDetails: SecuritySolutionFactory = { buildDsl: (options: HostDetailsRequestOptions) => buildHostDetailsQuery(options), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts index 02d98e255cae6..8ed65cef7d736 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts @@ -7,7 +7,7 @@ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; import { cloudFieldsMap, hostFieldsMap } from '../../../../../../common/ecs/ecs_fields'; -import { HostDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution'; +import type { HostDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution'; import { reduceFields } from '../../../../../utils/build_query/reduce_fields'; import { HOST_DETAILS_FIELDS, buildFieldsTermAggregation } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/index.ts index 789eaaa77cf68..d776754eab064 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/index.ts @@ -5,13 +5,13 @@ * 2.0. */ +import type { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution'; import { - FactoryQueryTypes, HostsQueries, HostsKpiQueries, } from '../../../../../common/search_strategy/security_solution'; -import { SecuritySolutionFactory } from '../types'; +import type { SecuritySolutionFactory } from '../types'; import { allHosts } from './all'; import { hostDetails } from './details'; import { hostOverview } from './overview'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/common/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/common/index.ts index 46fc76ffecb56..fba812666eda8 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/common/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/common/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { HostsKpiHistogram, HostsKpiGeneralHistogramCount, HostsKpiHistogramData, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/index.ts index a06beae77daeb..4e5fd3454a503 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/index.ts @@ -8,13 +8,13 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { HostsKpiQueries, HostsKpiHostsStrategyResponse, HostsKpiHostsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/hosts'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildHostsKpiHostsQuery } from './query.hosts_kpi_hosts.dsl'; import { formatGeneralHistogramData } from '../common'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts index cce45724ae33c..0383a58a65353 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsKpiHostsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; +import type { HostsKpiHostsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; export const buildHostsKpiHostsQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/index.ts index 47c4396c142f6..7e66785d9766d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/index.ts @@ -8,13 +8,13 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { HostsKpiQueries, HostsKpiUniqueIpsStrategyResponse, HostsKpiUniqueIpsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/hosts'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildHostsKpiUniqueIpsQuery } from './query.hosts_kpi_unique_ips.dsl'; import { formatGeneralHistogramData } from '../common'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts index 0a8be817b9e46..290f1dc238348 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsKpiUniqueIpsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; +import type { HostsKpiUniqueIpsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; export const buildHostsKpiUniqueIpsQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts index 146b904c4c378..ce87321c3b18f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts @@ -7,10 +7,8 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { - HostOverviewRequestOptions, - HostsQueries, -} from '../../../../../../../common/search_strategy'; +import type { HostOverviewRequestOptions } from '../../../../../../../common/search_strategy'; +import { HostsQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: HostOverviewRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/index.ts index f46ee2b8f315d..c7d08f92ab55a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/index.ts @@ -8,14 +8,14 @@ import { get, getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { HostsOverviewStrategyResponse, HostsQueries, HostOverviewRequestOptions, OverviewHostHit, } from '../../../../../../common/search_strategy/security_solution/hosts'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildOverviewHostQuery } from './query.overview_host.dsl'; export const hostOverview: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts index cbebab5dfcbd9..2ad25f8907ff2 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts @@ -7,7 +7,7 @@ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { HostOverviewRequestOptions } from '../../../../../../common/search_strategy/security_solution/hosts'; +import type { HostOverviewRequestOptions } from '../../../../../../common/search_strategy/security_solution/hosts'; export const buildOverviewHostQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts index 9f67360a0517c..f51b8082d0ffa 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { HostsQueries, SortField } from '../../../../../../../common/search_strategy'; +import type { SortField } from '../../../../../../../common/search_strategy'; +import { HostsQueries } from '../../../../../../../common/search_strategy'; export const mockOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts index d7ed7caf0f782..e810acf86cf49 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts @@ -12,7 +12,7 @@ import { processFieldsMap, userFieldsMap, } from '../../../../../../../common/ecs/ecs_fields'; -import { RequestOptionsPaginated } from '../../../../../../../common/search_strategy/security_solution'; +import type { RequestOptionsPaginated } from '../../../../../../../common/search_strategy/security_solution'; import { UNCOMMON_PROCESSES_FIELDS } from '../helpers'; export const buildQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.test.ts index 0492a66700b6e..c64864b67051b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.test.ts @@ -7,12 +7,13 @@ import { processFieldsMap } from '../../../../../../common/ecs/ecs_fields'; -import { +import type { HostsUncommonProcessesEdges, HostsUncommonProcessHit, } from '../../../../../../common/search_strategy'; -import { formatUncommonProcessesData, getHosts, UncommonProcessBucket } from './helpers'; +import type { UncommonProcessBucket } from './helpers'; +import { formatUncommonProcessesData, getHosts } from './helpers'; describe('helpers', () => { describe('#getHosts', () => { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.ts index b5188c36fb8aa..15d1b3029a96d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/helpers.ts @@ -8,12 +8,12 @@ import { get } from 'lodash/fp'; import { set } from '@elastic/safer-lodash-set/fp'; -import { +import type { ProcessHits, HostsUncommonProcessesEdges, HostsUncommonProcessHit, } from '../../../../../../common/search_strategy/security_solution/hosts/uncommon_processes'; -import { HostHits } from '../../../../../../common/search_strategy'; +import type { HostHits } from '../../../../../../common/search_strategy'; import { getFlattenedFields } from '../../../../helpers/get_flattened_fields'; export const UNCOMMON_PROCESSES_FIELDS = [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.test.ts index b7f03a9e85bb2..4f3f88eaa29c9 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.test.ts @@ -7,7 +7,7 @@ import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { HostsUncommonProcessesRequestOptions } from '../../../../../../common/search_strategy/security_solution'; +import type { HostsUncommonProcessesRequestOptions } from '../../../../../../common/search_strategy/security_solution'; import * as buildQuery from './dsl/query.dsl'; import { uncommonProcesses } from '.'; import { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.ts index 117d65f10d74c..1e03e187434f3 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/index.ts @@ -10,16 +10,16 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { HostsQueries } from '../../../../../../common/search_strategy/security_solution'; +import type { HostsQueries } from '../../../../../../common/search_strategy/security_solution'; import { processFieldsMap, userFieldsMap } from '../../../../../../common/ecs/ecs_fields'; -import { +import type { HostsUncommonProcessesRequestOptions, HostsUncommonProcessesStrategyResponse, } from '../../../../../../common/search_strategy/security_solution/hosts/uncommon_processes'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildQuery } from './dsl/query.dsl'; import { formatUncommonProcessesData, getHits } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/__mocks__/index.ts index 851f610b1ed59..e1c192af513bd 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/__mocks__/index.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - Direction, - FirstLastSeenRequestOptions, - FirstLastSeenQuery, -} from '../../../../../../common/search_strategy'; +import type { FirstLastSeenRequestOptions } from '../../../../../../common/search_strategy'; +import { Direction, FirstLastSeenQuery } from '../../../../../../common/search_strategy'; export const mockOptions: FirstLastSeenRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.test.ts index 4e828bca6fde8..543af5d9b95bb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { Direction, FirstLastSeenRequestOptions } from '../../../../../common/search_strategy'; +import type { FirstLastSeenRequestOptions } from '../../../../../common/search_strategy'; +import { Direction } from '../../../../../common/search_strategy'; import * as buildQuery from './query.first_or_last_seen.dsl'; import { firstOrLastSeen } from '.'; import { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.ts index 6f9b21ec2dc2e..9347f7eda400c 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/index.ts @@ -8,15 +8,15 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { FactoryQueryTypes, FirstLastSeenStrategyResponse, - FirstLastSeenQuery, FirstLastSeenRequestOptions, } from '../../../../../common/search_strategy/security_solution'; +import { FirstLastSeenQuery } from '../../../../../common/search_strategy/security_solution'; import { inspectStringifyObject } from '../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../types'; +import type { SecuritySolutionFactory } from '../types'; import { buildFirstOrLastSeenQuery } from './query.first_or_last_seen.dsl'; export const firstOrLastSeen: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/query.first_or_last_seen.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/query.first_or_last_seen.dsl.ts index 60bdf50a214f4..ba2842b78e92b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/query.first_or_last_seen.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/last_first_seen/query.first_or_last_seen.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FirstLastSeenRequestOptions } from '../../../../../common/search_strategy/security_solution/first_last_seen'; +import type { FirstLastSeenRequestOptions } from '../../../../../common/search_strategy/security_solution/first_last_seen'; export const buildFirstOrLastSeenQuery = ({ field, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts index 6bd26d6ef8ed8..e45c68999acf7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts @@ -7,7 +7,7 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { MatrixHistogramStrategyResponse } from '../../../../../../common/search_strategy'; +import type { MatrixHistogramStrategyResponse } from '../../../../../../common/search_strategy'; export const mockAlertsSearchStrategyResponse: IEsSearchResponse = { isPartial: false, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts index 60df6023a13d0..792829ed32f29 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts @@ -11,7 +11,7 @@ import { createQueryFilterClauses, calculateTimeSeriesInterval, } from '../../../../../utils/build_query'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; export const buildAlertsHistogramQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts index b82e7823fd847..87e2664d74271 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts @@ -11,7 +11,7 @@ import { createQueryFilterClauses, calculateTimeSeriesInterval, } from '../../../../../utils/build_query'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; export const buildAnomaliesHistogramQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts index b16efcd8301e0..9ebd629d1e858 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts @@ -11,7 +11,7 @@ import { createQueryFilterClauses, calculateTimeSeriesInterval, } from '../../../../../utils/build_query'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; export const buildAuthenticationsHistogramQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/helpers.ts index 9abdf5787ac51..3e5cd71241422 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/helpers.ts @@ -6,7 +6,7 @@ */ import { get, getOr } from 'lodash/fp'; -import { +import type { MatrixHistogramData, MatrixHistogramParseData, DnsHistogramSubBucket, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts index 7a7b4b49d17c1..17f083eeca9c1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts @@ -9,7 +9,7 @@ import { isEmpty } from 'lodash/fp'; import moment from 'moment'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy'; import { calculateTimeSeriesInterval, createQueryFilterClauses, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts index a6588d7b759b7..d22eb8bc692fe 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts @@ -5,9 +5,9 @@ * 2.0. */ +import type { MatrixHistogramRequestOptions } from '../../../../../../../common/search_strategy'; import { MatrixHistogramQuery, - MatrixHistogramRequestOptions, MatrixHistogramType, } from '../../../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/helpers.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/helpers.test.ts index ed317031dab04..477381778a367 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/helpers.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { buildThresholdTermsQuery, buildThresholdCardinalityQuery, BaseQuery } from './helpers'; +import type { BaseQuery } from './helpers'; +import { buildThresholdTermsQuery, buildThresholdCardinalityQuery } from './helpers'; const BASE_QUERY: BaseQuery = { eventActionGroup: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts index 4e66cf24027fd..2c7d3e017def2 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts @@ -12,9 +12,10 @@ import { createQueryFilterClauses, calculateTimeSeriesInterval, } from '../../../../../utils/build_query'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; import * as i18n from './translations'; -import { BaseQuery, buildThresholdCardinalityQuery, buildThresholdTermsQuery } from './helpers'; +import type { BaseQuery } from './helpers'; +import { buildThresholdCardinalityQuery, buildThresholdTermsQuery } from './helpers'; export const buildEventsHistogramQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.test.ts index 2680b604c6e28..3492f8097f676 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MatrixHistogramType } from '../../../../../common/search_strategy'; +import type { MatrixHistogramType } from '../../../../../common/search_strategy'; import { getGenericData } from './helpers'; import { stackedByBooleanField, stackedByTextField, result, textResult } from './mock_data'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.ts index 73b90e7cc32ee..7e0950d746b4d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/helpers.ts @@ -6,7 +6,7 @@ */ import { get, getOr } from 'lodash/fp'; -import { +import type { MatrixHistogramParseData, MatrixHistogramBucket, MatrixHistogramData, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.test.ts index 21a05e947dc7e..885322e92cf6c 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { MatrixHistogramRequestOptions, MatrixHistogramType, } from '../../../../../common/search_strategy/security_solution'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.ts index 0b0895beace5b..cb37d1f41dc1a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/index.ts @@ -8,16 +8,18 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { FactoryQueryTypes, MatrixHistogramRequestOptions, MatrixHistogramStrategyResponse, + MatrixHistogramDataConfig, +} from '../../../../../common/search_strategy/security_solution'; +import { MatrixHistogramQuery, MatrixHistogramType, - MatrixHistogramDataConfig, } from '../../../../../common/search_strategy/security_solution'; import { inspectStringifyObject } from '../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../types'; +import type { SecuritySolutionFactory } from '../types'; import { getGenericData } from './helpers'; import { alertsMatrixHistogramConfig } from './alerts'; import { anomaliesMatrixHistogramConfig } from './anomalies'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/query.preview_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/query.preview_histogram.dsl.ts index dde09860109b0..1703b6839ba70 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/query.preview_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/preview/query.preview_histogram.dsl.ts @@ -11,7 +11,7 @@ import { createQueryFilterClauses, calculateTimeSeriesInterval, } from '../../../../../utils/build_query'; -import { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; +import type { MatrixHistogramRequestOptions } from '../../../../../../common/search_strategy/security_solution/matrix_histogram'; export const buildPreviewHistogramQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts index 09f77776fb985..3e3ccbe7a41e1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts @@ -7,10 +7,8 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { - NetworkDetailsRequestOptions, - NetworkQueries, -} from '../../../../../../../common/search_strategy'; +import type { NetworkDetailsRequestOptions } from '../../../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: NetworkDetailsRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/helpers.ts index 5fb4750fa8f28..f7fa3667ec82a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/helpers.ts @@ -10,8 +10,8 @@ import { unflattenObject, transformLocationFields, } from '../../../../helpers/format_response_object_values'; -import { GeoEcs } from '../../../../../../common/ecs/geo'; -import { +import type { GeoEcs } from '../../../../../../common/ecs/geo'; +import type { AutonomousSystem, NetworkHit, } from '../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/index.ts index 9296b14647b94..5201eca70a210 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/index.ts @@ -9,14 +9,14 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkDetailsStrategyResponse, NetworkQueries, NetworkDetailsRequestOptions, } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getNetworkDetailsAgg } from './helpers'; import { buildNetworkDetailsQuery } from './query.details_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts index 9e56387939590..9bac6909271ba 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; const getAggs = (type: string, ip: string) => { return { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts index 06c31afb85195..f49f2bc153ba4 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts @@ -7,10 +7,10 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { NetworkDnsRequestOptions } from '../../../../../../../common/search_strategy'; import { Direction, NetworkDnsFields, - NetworkDnsRequestOptions, NetworkQueries, } from '../../../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/helpers.ts index 78bce6f41f7a3..ed430a19d222d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/helpers.ts @@ -8,7 +8,7 @@ import { get, getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkDnsBuckets, NetworkDnsEdges, } from '../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/index.ts index daa7787411ade..6ff153f8eab4c 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/index.ts @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkDnsStrategyResponse, NetworkQueries, NetworkDnsRequestOptions, @@ -18,7 +18,7 @@ import { } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getDnsEdges } from './helpers'; import { buildDnsQuery } from './query.dns_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts index 37c6146721225..6197fe8c603df 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts @@ -6,12 +6,8 @@ */ import { assertUnreachable } from '../../../../../../common/utility_types'; -import { - Direction, - SortField, - NetworkDnsRequestOptions, - NetworkDnsFields, -} from '../../../../../../common/search_strategy'; +import type { SortField, NetworkDnsRequestOptions } from '../../../../../../common/search_strategy'; +import { Direction, NetworkDnsFields } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; const HUGE_QUERY_SIZE = 1000000; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts index e64321d3d00cb..ddba77e929256 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts @@ -7,13 +7,12 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { - Direction, +import type { NetworkDnsFields, NetworkHttpRequestOptions, - NetworkQueries, SortField, } from '../../../../../../../common/search_strategy'; +import { Direction, NetworkQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: NetworkHttpRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/helpers.ts index 208ea0b36d4e2..79a3c3adbb97b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/helpers.ts @@ -8,7 +8,7 @@ import { get, getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkHttpBuckets, NetworkHttpEdges, } from '../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/index.ts index eaa9a39dc5dcd..9fd347137504e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/index.ts @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkHttpStrategyResponse, NetworkQueries, NetworkHttpRequestOptions, @@ -18,7 +18,7 @@ import { } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getHttpEdges } from './helpers'; import { buildHttpQuery } from './query.http_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts index 36f20752befed..372c6a096f1b5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts @@ -7,7 +7,10 @@ import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { NetworkHttpRequestOptions, SortField } from '../../../../../../common/search_strategy'; +import type { + NetworkHttpRequestOptions, + SortField, +} from '../../../../../../common/search_strategy'; const getCountAgg = () => ({ http_count: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/index.ts index 9d9940247eb30..9cc45f3594c33 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/index.ts @@ -5,8 +5,8 @@ * 2.0. */ +import type { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution'; import { - FactoryQueryTypes, NetworkQueries, NetworkKpiQueries, } from '../../../../../common/search_strategy/security_solution'; @@ -16,7 +16,7 @@ import { networkKpiNetworkEvents } from './kpi/network_events'; import { networkKpiTlsHandshakes } from './kpi/tls_handshakes'; import { networkKpiUniqueFlows } from './kpi/unique_flows'; import { networkKpiUniquePrivateIps } from './kpi/unique_private_ips'; -import { SecuritySolutionFactory } from '../types'; +import type { SecuritySolutionFactory } from '../types'; import { networkDetails } from './details'; import { networkDns } from './dns'; import { networkHttp } from './http'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/common/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/common/index.ts index 89a22c214d0e6..c0d681e60a442 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/common/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/common/index.ts @@ -6,7 +6,7 @@ */ import { getOr } from 'lodash/fp'; -import { NetworkKpiHistogramData } from '../../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkKpiHistogramData } from '../../../../../../../common/search_strategy/security_solution/network'; export const getIpFilter = () => [ { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/index.ts index f2952c1c4c2e7..110b5fb8b7ae4 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/index.ts @@ -6,13 +6,13 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkKpiQueries, NetworkKpiDnsStrategyResponse, NetworkKpiDnsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildDnsQuery } from './query.network_kpi_dns.dsl'; export const networkKpiDns: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts index 8d27f7d289d03..30f0fe405e122 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkKpiDnsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkKpiDnsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; const getDnsQueryFilter = () => [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/index.ts index 2a18bf3b5de86..bbaa2dfc6d620 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/index.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { - FactoryQueryTypes, - NetworkKpiQueries, -} from '../../../../../../common/search_strategy/security_solution'; +import type { FactoryQueryTypes } from '../../../../../../common/search_strategy/security_solution'; +import { NetworkKpiQueries } from '../../../../../../common/search_strategy/security_solution'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { networkKpiDns } from './dns'; import { networkKpiNetworkEvents } from './network_events'; import { networkKpiTlsHandshakes } from './tls_handshakes'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/index.ts index e198a98735883..dd4570c259116 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/index.ts @@ -6,13 +6,13 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkKpiQueries, NetworkKpiNetworkEventsStrategyResponse, NetworkKpiNetworkEventsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildNetworkEventsQuery } from './query.network_kpi_network_events.dsl'; export const networkKpiNetworkEvents: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts index 4d5ca88fe383a..4d996e7438688 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkKpiNetworkEventsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkKpiNetworkEventsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; import { getIpFilter } from '../common'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/index.ts index 1eb3ca9e12581..9e90f088ecd5e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/index.ts @@ -6,13 +6,13 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkKpiQueries, NetworkKpiTlsHandshakesStrategyResponse, NetworkKpiTlsHandshakesRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildTlsHandshakeQuery } from './query.network_kpi_tls_handshakes.dsl'; export const networkKpiTlsHandshakes: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts index eae7f7a29ce72..6c60ddeb89a14 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkKpiTlsHandshakesRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkKpiTlsHandshakesRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; import { getIpFilter } from '../common'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/index.ts index 7c26be3260a00..f03629d92c7e0 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/index.ts @@ -8,13 +8,13 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkKpiQueries, NetworkKpiUniqueFlowsStrategyResponse, NetworkKpiUniqueFlowsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildUniqueFlowsQuery } from './query.network_kpi_unique_flows.dsl'; export const networkKpiUniqueFlows: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts index 3cb04caf5afe5..c713ecd6a1c07 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NetworkKpiUniqueFlowsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkKpiUniqueFlowsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/network'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; import { getIpFilter } from '../common'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/index.ts index ae1d3b337af81..bef9505d5283f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/index.ts @@ -8,13 +8,13 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkKpiQueries, NetworkKpiUniquePrivateIpsStrategyResponse, NetworkKpiUniquePrivateIpsRequestOptions, } from '../../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { formatHistogramData } from '../common'; import { buildUniquePrivateIpsQuery } from './query.network_kpi_unique_private_ips.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts index c915cd4fb58d6..97e4619cdd9c4 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { NetworkKpiUniquePrivateIpsRequestOptions, UniquePrivateAttributeQuery, } from '../../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts index c2e433e12a379..7f1865e658843 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts @@ -7,10 +7,8 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { - NetworkOverviewRequestOptions, - NetworkQueries, -} from '../../../../../../../common/search_strategy'; +import type { NetworkOverviewRequestOptions } from '../../../../../../../common/search_strategy'; +import { NetworkQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: NetworkOverviewRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/index.ts index 0909c3248689e..6fd27fa4dea46 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/index.ts @@ -8,14 +8,14 @@ import { get, getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkQueries, NetworkOverviewStrategyResponse, NetworkOverviewRequestOptions, OverviewNetworkHit, } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildOverviewNetworkQuery } from './query.overview_network.dsl'; export const networkOverview: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts index c67b11ab42ece..95b7d41ee440a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts @@ -7,7 +7,7 @@ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { NetworkOverviewRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkOverviewRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; export const buildOverviewNetworkQuery = ({ filterQuery, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts index 1a27c980f8ea2..9957534bccc2e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts @@ -7,12 +7,12 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { NetworkTlsRequestOptions } from '../../../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkQueries, NetworkTlsFields, - NetworkTlsRequestOptions, } from '../../../../../../../common/search_strategy'; export const mockOptions: NetworkTlsRequestOptions = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/helpers.ts index 50beaddec701b..dc7921696b8e7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/helpers.ts @@ -8,7 +8,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkTlsBuckets, NetworkTlsEdges, } from '../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/index.ts index 9c1dd0a0f303b..1dd07133d1d0c 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/index.ts @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkTlsStrategyResponse, NetworkQueries, NetworkTlsRequestOptions, @@ -18,7 +18,7 @@ import { } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getNetworkTlsEdges } from './helpers'; import { buildNetworkTlsQuery } from './query.tls_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts index 297643fe56952..9801cc7c0361f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts @@ -8,12 +8,12 @@ import { assertUnreachable } from '../../../../../../common/utility_types'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { +import type { Direction, NetworkTlsRequestOptions, - NetworkTlsFields, SortField, } from '../../../../../../common/search_strategy'; +import { NetworkTlsFields } from '../../../../../../common/search_strategy'; const getAggs = (querySize: number, sort: SortField) => ({ count: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts index 3bed0bd26260d..81802dd4aed9d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts @@ -7,11 +7,11 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { NetworkTopCountriesRequestOptions } from '../../../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkQueries, - NetworkTopCountriesRequestOptions, NetworkTopTablesFields, } from '../../../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/helpers.ts index 4d86918171b59..cc5f2a44783ee 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/helpers.ts @@ -8,7 +8,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkTopCountriesBuckets, NetworkTopCountriesEdges, NetworkTopCountriesRequestOptions, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/index.ts index 72b608735e249..cde9fb4bb44eb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/index.ts @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkTopCountriesStrategyResponse, NetworkQueries, NetworkTopCountriesRequestOptions, @@ -18,7 +18,7 @@ import { } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getTopCountriesEdges } from './helpers'; import { buildTopCountriesQuery } from './query.top_countries_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts index 463d3c9b11bd2..9df7726427038 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts @@ -7,13 +7,15 @@ import { createQueryFilterClauses } from '../../../../../utils/build_query'; import { assertUnreachable } from '../../../../../../common/utility_types'; -import { +import type { Direction, - FlowTargetSourceDest, - NetworkTopTablesFields, NetworkTopCountriesRequestOptions, SortField, } from '../../../../../../common/search_strategy'; +import { + FlowTargetSourceDest, + NetworkTopTablesFields, +} from '../../../../../../common/search_strategy'; const getCountAgg = (flowTarget: FlowTargetSourceDest) => ({ top_countries_count: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts index dc550bfe6c260..f915d21664e4f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts @@ -7,12 +7,14 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { + NetworkTopNFlowRequestOptions, + NetworkTopNFlowStrategyResponse, +} from '../../../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkQueries, - NetworkTopNFlowRequestOptions, - NetworkTopNFlowStrategyResponse, NetworkTopTablesFields, } from '../../../../../../../common/search_strategy'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/helpers.ts index bd7d8d9bd0b58..7c2abcf5bb344 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/helpers.ts @@ -9,16 +9,18 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { assertUnreachable } from '../../../../../../common/utility_types'; -import { +import type { Direction, GeoItem, SortField, NetworkTopNFlowBuckets, NetworkTopNFlowEdges, NetworkTopNFlowRequestOptions, + AutonomousSystemItem, +} from '../../../../../../common/search_strategy'; +import { NetworkTopTablesFields, FlowTargetSourceDest, - AutonomousSystemItem, } from '../../../../../../common/search_strategy'; import { getOppositeField } from '../helpers'; import { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/index.ts index 59a2ea962ba93..3a6a5176f726f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/index.ts @@ -10,7 +10,7 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkTopNFlowStrategyResponse, NetworkQueries, NetworkTopNFlowRequestOptions, @@ -18,7 +18,7 @@ import { } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getTopNFlowEdges } from './helpers'; import { buildTopNFlowQuery } from './query.top_n_flow_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts index 0b2653dbd113b..e3cb06ac2ced1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { SortField, FlowTargetSourceDest, NetworkTopTablesFields, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts index 7f791d547f0fb..6d7faf096d021 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts @@ -7,12 +7,12 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { NetworkUsersRequestOptions } from '../../../../../../../common/search_strategy'; import { Direction, FlowTargetSourceDest, NetworkQueries, NetworkUsersFields, - NetworkUsersRequestOptions, } from '../../../../../../../common/search_strategy'; export const mockOptions: NetworkUsersRequestOptions = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/helpers.ts index baf22028dae68..849a439a5b353 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/helpers.ts @@ -7,7 +7,7 @@ import { get, getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { NetworkUsersBucketsItem, NetworkUsersEdges, } from '../../../../../../common/search_strategy/security_solution/network'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.test.ts index a36d8dcb8ec97..e2b169e2acf73 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.test.ts @@ -6,7 +6,7 @@ */ import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { NetworkUsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; +import type { NetworkUsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/network'; import * as buildQuery from './query.users_network.dsl'; import { networkUsers } from '.'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.ts index ccbfb68757cd9..17340c5c1ed0d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/index.ts @@ -10,14 +10,14 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { NetworkUsersStrategyResponse, NetworkQueries, NetworkUsersRequestOptions, } from '../../../../../../common/search_strategy/security_solution/network'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { getUsersEdges } from './helpers'; import { buildUsersQuery } from './query.users_network.dsl'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts index 0c35c967c2ac5..3adab346d7063 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts @@ -6,12 +6,12 @@ */ import { assertUnreachable } from '../../../../../../common/utility_types'; -import { +import type { Direction, SortField, NetworkUsersRequestOptions, - NetworkUsersFields, } from '../../../../../../common/search_strategy'; +import { NetworkUsersFields } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; export const buildUsersQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/index.ts index 53eef7121517b..d010628e7fa22 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/index.ts @@ -6,8 +6,8 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { SecuritySolutionFactory } from '../../types'; -import { +import type { SecuritySolutionFactory } from '../../types'; +import type { RiskScoreRequestOptions, RiskScoreStrategyResponse, RiskQueries, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/query.risk_score.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/query.risk_score.dsl.ts index b6e17f6532546..069a3e01cdbc1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/query.risk_score.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/all/query.risk_score.dsl.ts @@ -5,13 +5,12 @@ * 2.0. */ -import { Sort } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { - Direction, +import type { Sort } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { RiskScoreRequestOptions, - RiskScoreFields, RiskScoreSortField, } from '../../../../../../common/search_strategy'; +import { Direction, RiskScoreFields } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; export const QUERY_SIZE = 10; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/index.ts index 73f022c4e5c46..f6e36ad4ba29d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { FactoryQueryTypes, RiskQueries } from '../../../../../common/search_strategy'; -import { SecuritySolutionFactory } from '../types'; +import type { FactoryQueryTypes } from '../../../../../common/search_strategy'; +import { RiskQueries } from '../../../../../common/search_strategy'; +import type { SecuritySolutionFactory } from '../types'; import { riskScore } from './all'; import { kpiRiskScore } from './kpi'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/__mocks__/index.ts index 89723ab180fcf..94830d71e6337 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/__mocks__/index.ts @@ -5,10 +5,8 @@ * 2.0. */ -import { - KpiRiskScoreRequestOptions, - RiskQueries, -} from '../../../../../../../common/search_strategy'; +import type { KpiRiskScoreRequestOptions } from '../../../../../../../common/search_strategy'; +import { RiskQueries } from '../../../../../../../common/search_strategy'; export const mockOptions: KpiRiskScoreRequestOptions = { defaultIndex: [ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/index.ts index c1b4a1f25e8de..6e3901e66892e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/index.ts @@ -12,8 +12,8 @@ import type { KpiRiskScoreRequestOptions, KpiRiskScoreStrategyResponse, RiskQueries, + RiskSeverity, } from '../../../../../../common/search_strategy'; -import { RiskSeverity } from '../../../../../../common/search_strategy'; import { inspectStringifyObject } from '../../../../../utils/build_query'; import type { SecuritySolutionFactory } from '../../types'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/query.kpi_risk_score.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/query.kpi_risk_score.dsl.ts index 259f64af2592a..ace0cece7c981 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/query.kpi_risk_score.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/risk_score/kpi/query.kpi_risk_score.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { KpiRiskScoreRequestOptions } from '../../../../../../common/search_strategy'; +import type { KpiRiskScoreRequestOptions } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; export const buildKpiRiskScoreQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/__mocks__/index.ts index 346c8845751ce..48c58a031db4a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/__mocks__/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { Direction } from '../../../../../../../common/search_strategy'; import { UsersQueries } from '../../../../../../../common/search_strategy/security_solution/users'; -import { UsersRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/all'; +import type { UsersRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/all'; import { UsersFields } from '../../../../../../../common/search_strategy/security_solution/users/common'; export const mockOptions: UsersRequestOptions = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.test.ts index 5d7562e1e0a7f..7ac81811ff903 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.test.ts @@ -10,7 +10,7 @@ import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants import * as buildQuery from './query.all_users.dsl'; import { allUsers } from '.'; import { mockOptions, mockSearchStrategyResponse } from './__mocks__'; -import { UsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/all'; +import type { UsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/all'; describe('allHosts search strategy', () => { const buildAllHostsQuery = jest.spyOn(buildQuery, 'buildUsersQuery'); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.ts index 9c62e55cc0bb1..254cc9f06879f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/index.ts @@ -11,14 +11,14 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildUsersQuery } from './query.all_users.dsl'; -import { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; -import { +import type { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; +import type { UsersRequestOptions, UsersStrategyResponse, } from '../../../../../../common/search_strategy/security_solution/users/all'; -import { AllUsersAggEsItem } from '../../../../../../common/search_strategy/security_solution/users/common'; +import type { AllUsersAggEsItem } from '../../../../../../common/search_strategy/security_solution/users/common'; export const allUsers: SecuritySolutionFactory = { buildDsl: (options: UsersRequestOptions) => { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/query.all_users.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/query.all_users.dsl.ts index d7f8f7e50abe1..56b90a2972c3e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/query.all_users.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/all/query.all_users.dsl.ts @@ -6,13 +6,11 @@ */ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { Direction } from '../../../../../../common/search_strategy'; +import type { Direction } from '../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../utils/build_query'; -import { UsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/all'; -import { - SortUsersField, - UsersFields, -} from '../../../../../../common/search_strategy/security_solution/users/common'; +import type { UsersRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/all'; +import type { SortUsersField } from '../../../../../../common/search_strategy/security_solution/users/common'; +import { UsersFields } from '../../../../../../common/search_strategy/security_solution/users/common'; import { assertUnreachable } from '../../../../../../common/utility_types'; export const buildUsersQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/__mocks__/index.ts index 028ee4e4ba1b9..500e5bca6bca2 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/__mocks__/index.ts @@ -6,9 +6,11 @@ */ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { +import type { UserAuthenticationsRequestOptions, AuthenticationHit, +} from '../../../../../../../common/search_strategy'; +import { Direction, UsersQueries, AuthStackByField, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/dsl/query.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/dsl/query.dsl.ts index 3c32ae3f85944..46d4b8c7a8b59 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/dsl/query.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/dsl/query.dsl.ts @@ -6,7 +6,7 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { UserAuthenticationsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/authentications'; +import type { UserAuthenticationsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/authentications'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; import { authenticationsFields } from '../helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.test.ts index a8eea076ae1be..4004b09a1942b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AuthenticationsEdges } from '../../../../../../common/search_strategy'; +import type { AuthenticationsEdges } from '../../../../../../common/search_strategy'; import { formatAuthenticationData } from './helpers'; import { mockHit } from './__mocks__'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.ts index 46c0a83a3b572..60cd570478488 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/helpers.ts @@ -9,7 +9,7 @@ import { get, getOr, isEmpty } from 'lodash/fp'; import { set } from '@elastic/safer-lodash-set/fp'; import { toObjectArrayOfStrings } from '../../../../../../common/utils/to_array'; import { sourceFieldsMap, hostFieldsMap } from '../../../../../../common/ecs/ecs_fields'; -import { +import type { AuthenticationsEdges, AuthenticationHit, AuthenticationBucket, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.test.tsx b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.test.tsx index e4342cf266474..3ad509e420757 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.test.tsx @@ -14,7 +14,7 @@ import { mockSearchStrategyResponse, formattedSearchStrategyResponse, } from './__mocks__'; -import { UserAuthenticationsRequestOptions } from '../../../../../../common/search_strategy'; +import type { UserAuthenticationsRequestOptions } from '../../../../../../common/search_strategy'; describe('authentications search strategy', () => { const buildAuthenticationQuery = jest.spyOn(buildQuery, 'buildQuery'); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.tsx b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.tsx index f2483b78dc3ef..0024444247fa4 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.tsx +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/authentications/index.tsx @@ -10,16 +10,16 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { DEFAULT_MAX_TABLE_QUERY_SIZE } from '../../../../../../common/constants'; -import { +import type { AuthenticationHit, AuthenticationsEdges, UserAuthenticationsRequestOptions, UserAuthenticationsStrategyResponse, } from '../../../../../../common/search_strategy'; -import { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; +import type { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildQuery as buildAuthenticationQuery } from './dsl/query.dsl'; import { formatAuthenticationData, getHits } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/__mocks__/index.ts index 5b54ffaf8dff8..5ec7aeea9e117 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/__mocks__/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IEsSearchResponse } from '@kbn/data-plugin/common'; +import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { UsersQueries } from '../../../../../../../common/search_strategy/security_solution/users'; -import { UserDetailsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/details'; +import type { UserDetailsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/users/details'; export const mockOptions: UserDetailsRequestOptions = { defaultIndex: ['test_indices*'], diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helper.test.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helper.test.ts index 520e24d188d6d..b8d6b442483b3 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helper.test.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helper.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UserAggEsItem } from '../../../../../../common/search_strategy/security_solution/users/common'; +import type { UserAggEsItem } from '../../../../../../common/search_strategy/security_solution/users/common'; import { fieldNameToAggField, formatUserItem } from './helpers'; describe('helpers', () => { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helpers.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helpers.ts index 72b876014e2c7..cf18f08476fcd 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helpers.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/helpers.ts @@ -7,7 +7,7 @@ import { set } from '@elastic/safer-lodash-set/fp'; import { get, has } from 'lodash/fp'; -import { +import type { UserAggEsItem, UserBuckets, UserItem, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/index.ts index 26705965ea67e..c57c5a21f6c77 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/index.ts @@ -8,11 +8,11 @@ import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { inspectStringifyObject } from '../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../types'; +import type { SecuritySolutionFactory } from '../../types'; import { buildUserDetailsQuery } from './query.user_details.dsl'; -import { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; -import { +import type { UsersQueries } from '../../../../../../common/search_strategy/security_solution/users'; +import type { UserDetailsRequestOptions, UserDetailsStrategyResponse, } from '../../../../../../common/search_strategy/security_solution/users/details'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/query.user_details.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/query.user_details.dsl.ts index c8e015de5bdf9..93c3624b8597d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/query.user_details.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/details/query.user_details.dsl.ts @@ -6,7 +6,7 @@ */ import type { ISearchRequestParams } from '@kbn/data-plugin/common'; -import { UserDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/details'; +import type { UserDetailsRequestOptions } from '../../../../../../common/search_strategy/security_solution/users/details'; import { buildFieldsTermAggregation } from '../../hosts/details/helpers'; import { USER_FIELDS } from './helpers'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/index.ts index 86023c1190770..a4f33213f73ab 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution'; +import type { FactoryQueryTypes } from '../../../../../common/search_strategy/security_solution'; import { UsersQueries } from '../../../../../common/search_strategy/security_solution/users'; -import { SecuritySolutionFactory } from '../types'; +import type { SecuritySolutionFactory } from '../types'; import { allUsers } from './all'; import { authentications } from './authentications'; import { userDetails } from './details'; diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/index.ts index 41f572f5a2ee1..245b5aa82d0db 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/index.ts @@ -9,9 +9,9 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildUsersKpiAuthenticationsQuery } from './query.users_kpi_authentications.dsl'; -import { +import type { UsersKpiAuthenticationsRequestOptions, UsersKpiAuthenticationsStrategyResponse, UsersQueries, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/query.users_kpi_authentications.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/query.users_kpi_authentications.dsl.ts index a74d4cb7f13b6..fd087dbb17eff 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/query.users_kpi_authentications.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/authentications/query.users_kpi_authentications.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UsersKpiAuthenticationsRequestOptions } from '../../../../../../../common/search_strategy'; +import type { UsersKpiAuthenticationsRequestOptions } from '../../../../../../../common/search_strategy'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; export const buildUsersKpiAuthenticationsQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/index.ts index d47a5d96870c1..2b9b34d6315c2 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/index.ts @@ -14,15 +14,15 @@ import { getOr } from 'lodash/fp'; import type { IEsSearchResponse } from '@kbn/data-plugin/common'; -import { UsersQueries } from '../../../../../../../common/search_strategy/security_solution/users'; -import { +import type { UsersQueries } from '../../../../../../../common/search_strategy/security_solution/users'; +import type { TotalUsersKpiRequestOptions, TotalUsersKpiStrategyResponse, } from '../../../../../../../common/search_strategy/security_solution/users/kpi/total_users'; import { inspectStringifyObject } from '../../../../../../utils/build_query'; import { formatGeneralHistogramData } from '../../../hosts/kpi'; -import { SecuritySolutionFactory } from '../../../types'; +import type { SecuritySolutionFactory } from '../../../types'; import { buildTotalUsersKpiQuery } from './query.build_total_users_kpi.dsl'; export const totalUsersKpi: SecuritySolutionFactory = { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/query.build_total_users_kpi.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/query.build_total_users_kpi.dsl.ts index d86763e4cd3f6..7c5f2619e7f12 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/query.build_total_users_kpi.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/users/kpi/total_users/query.build_total_users_kpi.dsl.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostsKpiHostsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; +import type { HostsKpiHostsRequestOptions } from '../../../../../../../common/search_strategy/security_solution/hosts'; import { createQueryFilterClauses } from '../../../../../../utils/build_query'; export const buildTotalUsersKpiQuery = ({ diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/index.ts index 47b6b82c3792c..faee7d6b6d8f3 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/index.ts @@ -6,17 +6,18 @@ */ import { map, mergeMap } from 'rxjs/operators'; -import { ISearchStrategy, PluginStart, shimHitsTotal } from '@kbn/data-plugin/server'; +import type { ISearchStrategy, PluginStart } from '@kbn/data-plugin/server'; +import { shimHitsTotal } from '@kbn/data-plugin/server'; import { ENHANCED_ES_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; -import { KibanaRequest } from '@kbn/core/server'; -import { +import type { KibanaRequest } from '@kbn/core/server'; +import type { FactoryQueryTypes, StrategyResponseType, StrategyRequestType, } from '../../../common/search_strategy/security_solution'; import { securitySolutionFactory } from './factory'; -import { SecuritySolutionFactory } from './factory/types'; -import { EndpointAppContext } from '../../endpoint/types'; +import type { SecuritySolutionFactory } from './factory/types'; +import type { EndpointAppContext } from '../../endpoint/types'; function isObj(req: unknown): req is Record { return typeof req === 'object' && req !== null; diff --git a/x-pack/plugins/security_solution/server/types.ts b/x-pack/plugins/security_solution/server/types.ts index 3f27cb1cb5926..7e9a29b4dd0b5 100644 --- a/x-pack/plugins/security_solution/server/types.ts +++ b/x-pack/plugins/security_solution/server/types.ts @@ -19,11 +19,11 @@ import type { ListsApiRequestHandlerContext, ExceptionListClient } from '@kbn/li import type { IRuleDataService } from '@kbn/rule-registry-plugin/server'; import { AppClient } from './client'; -import { ConfigType } from './config'; -import { IRuleExecutionLogForRoutes } from './lib/detection_engine/rule_execution_log'; -import { FrameworkRequest } from './lib/framework'; -import { EndpointAuthz } from '../common/endpoint/types/authz'; -import { +import type { ConfigType } from './config'; +import type { IRuleExecutionLogForRoutes } from './lib/detection_engine/rule_execution_log'; +import type { FrameworkRequest } from './lib/framework'; +import type { EndpointAuthz } from '../common/endpoint/types/authz'; +import type { EndpointInternalFleetServicesInterface, EndpointScopedFleetServicesInterface, } from './endpoint/services/fleet'; diff --git a/x-pack/plugins/security_solution/server/ui_settings.ts b/x-pack/plugins/security_solution/server/ui_settings.ts index 07d0a38e6d5a8..33e3accaf5d93 100644 --- a/x-pack/plugins/security_solution/server/ui_settings.ts +++ b/x-pack/plugins/security_solution/server/ui_settings.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; -import { CoreSetup, UiSettingsParams } from '@kbn/core/server'; +import type { CoreSetup, UiSettingsParams } from '@kbn/core/server'; import { APP_ID, DEFAULT_ANOMALY_SCORE, @@ -34,7 +34,7 @@ import { ENABLE_CCS_READ_WARNING_SETTING, SHOW_RELATED_INTEGRATIONS_SETTING, } from '../common/constants'; -import { ExperimentalFeatures } from '../common/experimental_features'; +import type { ExperimentalFeatures } from '../common/experimental_features'; type SettingsConfig = Record>; diff --git a/x-pack/plugins/security_solution/server/usage/detections/rules/get_metrics.mocks.ts b/x-pack/plugins/security_solution/server/usage/detections/rules/get_metrics.mocks.ts index 14663cad3787c..129d2b32d0b3d 100644 --- a/x-pack/plugins/security_solution/server/usage/detections/rules/get_metrics.mocks.ts +++ b/x-pack/plugins/security_solution/server/usage/detections/rules/get_metrics.mocks.ts @@ -7,7 +7,8 @@ import type { SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import type { SavedObjectsFindResponse } from '@kbn/core/server'; -import { CommentAttributes, CommentType } from '@kbn/cases-plugin/common/api/cases/comment'; +import type { CommentAttributes } from '@kbn/cases-plugin/common/api/cases/comment'; +import { CommentType } from '@kbn/cases-plugin/common/api/cases/comment'; import type { AlertAggs, EventLogTypeStatusAggs } from '../../types'; import type { EventLogStatusMetric, SingleEventLogStatusMetric } from './types'; diff --git a/x-pack/plugins/security_solution/server/usage/index.ts b/x-pack/plugins/security_solution/server/usage/index.ts index 2982ae92a5bbe..fad6f9616bf41 100644 --- a/x-pack/plugins/security_solution/server/usage/index.ts +++ b/x-pack/plugins/security_solution/server/usage/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CollectorDependencies } from './types'; +import type { CollectorDependencies } from './types'; import { registerCollector } from './collector'; export type InitUsageCollectors = (deps: CollectorDependencies) => void; diff --git a/x-pack/plugins/security_solution/server/usage/queries/utils/get_search_for_elastic_rules.ts b/x-pack/plugins/security_solution/server/usage/queries/utils/get_search_for_elastic_rules.ts index 30dc61499b17f..c2624fedb6e60 100644 --- a/x-pack/plugins/security_solution/server/usage/queries/utils/get_search_for_elastic_rules.ts +++ b/x-pack/plugins/security_solution/server/usage/queries/utils/get_search_for_elastic_rules.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { AggregationsAggregationContainer, SearchRequest, } from '@elastic/elasticsearch/lib/api/types'; diff --git a/x-pack/plugins/security_solution/server/utils/build_query/filters.ts b/x-pack/plugins/security_solution/server/utils/build_query/filters.ts index a1d1590bae1ce..dfc5bb5a92d36 100644 --- a/x-pack/plugins/security_solution/server/utils/build_query/filters.ts +++ b/x-pack/plugins/security_solution/server/utils/build_query/filters.ts @@ -7,7 +7,7 @@ import { isEmpty, isString } from 'lodash/fp'; -import { ESQuery } from '../../../common/typed_json'; +import type { ESQuery } from '../../../common/typed_json'; export const createQueryFilterClauses = (filterQuery: ESQuery | string | undefined) => !isEmpty(filterQuery) ? [isString(filterQuery) ? JSON.parse(filterQuery) : filterQuery] : []; diff --git a/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts index 6d1dceb482332..65f73e2636a4f 100644 --- a/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts +++ b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.test.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { RouteValidationResultFactory } from '@kbn/core/server'; +import type { RouteValidationResultFactory } from '@kbn/core/server'; import { buildRouteValidation, buildRouteValidationWithExcess } from './route_validation'; diff --git a/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts index 8b54738d2d05b..57692b515a230 100644 --- a/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts +++ b/x-pack/plugins/security_solution/server/utils/build_validation/route_validation.ts @@ -7,14 +7,15 @@ import { fold } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -import * as rt from 'io-ts'; +import type * as rt from 'io-ts'; import { exactCheck, formatErrors } from '@kbn/securitysolution-io-ts-utils'; -import { +import type { RouteValidationFunction, RouteValidationResultFactory, RouteValidationError, } from '@kbn/core/server'; -import { excess, GenericIntersectionC } from '../runtime_types'; +import type { GenericIntersectionC } from '../runtime_types'; +import { excess } from '../runtime_types'; type RequestValidationResult = | { diff --git a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts index a47beea25810f..67d583169f1b4 100644 --- a/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts +++ b/x-pack/plugins/security_solution/server/utils/read_stream/create_stream_from_ndjson.ts @@ -9,7 +9,7 @@ import { Transform } from 'stream'; import { has, isString } from 'lodash/fp'; import { createMapStream, createFilterStream } from '@kbn/utils'; -import { ImportRulesSchema } from '../../../common/detection_engine/schemas/request/import_rules_schema'; +import type { ImportRulesSchema } from '../../../common/detection_engine/schemas/request/import_rules_schema'; export interface RulesObjectsExportResultDetails { /** number of successfully exported objects */ diff --git a/x-pack/plugins/security_solution/server/utils/serialized_query.ts b/x-pack/plugins/security_solution/server/utils/serialized_query.ts index 0c53de4b37f8a..b94bced6cb05d 100644 --- a/x-pack/plugins/security_solution/server/utils/serialized_query.ts +++ b/x-pack/plugins/security_solution/server/utils/serialized_query.ts @@ -7,7 +7,7 @@ import { isEmpty, isPlainObject, isString } from 'lodash/fp'; -import { JsonObject } from '@kbn/utility-types'; +import type { JsonObject } from '@kbn/utility-types'; export const parseFilterQuery = (filterQuery: string): JsonObject => { try { diff --git a/x-pack/plugins/security_solution/server/utils/with_security_span.ts b/x-pack/plugins/security_solution/server/utils/with_security_span.ts index b0ce360cda68d..58787dc45d09b 100644 --- a/x-pack/plugins/security_solution/server/utils/with_security_span.ts +++ b/x-pack/plugins/security_solution/server/utils/with_security_span.ts @@ -4,8 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { SpanOptions, withSpan } from '@kbn/apm-utils'; -import agent from 'elastic-apm-node'; +import type { SpanOptions } from '@kbn/apm-utils'; +import { withSpan } from '@kbn/apm-utils'; +import type agent from 'elastic-apm-node'; import { APP_ID } from '../../common/constants'; type Span = Exclude; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx index 6942a7708db78..dfd1e17def3e7 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.test.tsx @@ -192,4 +192,24 @@ describe('health check', () => { `"https://www.elastic.co/guide/en/kibana/mocked-test-branch/alerting-setup.html#alerting-prerequisites"` ); }); + + it('renders children and no warnings if error thrown getting alerting health', async () => { + useKibanaMock().services.http.get = jest + .fn() + // result from triggers_actions_ui health + .mockResolvedValueOnce({ isAlertsAvailable: true }) + // result from alerting health + .mockRejectedValueOnce(new Error('for example, not authorized for rules / 403 response')); + const { queryByText } = render( + + +

{'should render'}

+ + + ); + await act(async () => { + // wait for useEffect to run + }); + expect(queryByText('should render')).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx index 402911a5e86bc..fa5c6656d5082 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/health_check.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Option, none, some, fold } from 'fp-ts/lib/Option'; +import { Option, none, some, fold, isSome } from 'fp-ts/lib/Option'; import { pipe } from 'fp-ts/lib/pipeable'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -14,7 +14,8 @@ import { EuiLink, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { EuiEmptyPrompt } from '@elastic/eui'; -import { DocLinksStart } from '@kbn/core/public'; +import { DocLinksStart, HttpSetup } from '@kbn/core/public'; +import { AlertingFrameworkHealth } from '@kbn/alerting-plugin/common'; import './health_check.scss'; import { useHealthContext } from '../context/health_context'; import { useKibana } from '../../common/lib/kibana'; @@ -52,12 +53,22 @@ export const HealthCheck: React.FunctionComponent = ({ hasPermanentEncryptionKey: false, }; if (healthStatus.isRulesAvailable) { - const alertingHealthResult = await alertingFrameworkHealth({ http }); - healthStatus.isSufficientlySecure = alertingHealthResult.isSufficientlySecure; - healthStatus.hasPermanentEncryptionKey = alertingHealthResult.hasPermanentEncryptionKey; + // Get the framework health, but if not available, do NOT cause the + // framework health errors/toasts to appear, since the state is + // actually unknown. These also need to be set to clear the busy + // indicator. + const alertingHealthResult = await getAlertingFrameworkHealth(http); + if (isSome(alertingHealthResult)) { + healthStatus.isSufficientlySecure = alertingHealthResult.value.isSufficientlySecure; + healthStatus.hasPermanentEncryptionKey = + alertingHealthResult.value.hasPermanentEncryptionKey; + } else { + healthStatus.isSufficientlySecure = true; + healthStatus.hasPermanentEncryptionKey = true; + } + setAlertingHealth(some(healthStatus)); } - setAlertingHealth(some(healthStatus)); setLoadingHealthCheck(false); })(); }, [http, setLoadingHealthCheck]); @@ -93,6 +104,19 @@ export const HealthCheck: React.FunctionComponent = ({ ); }; +// Return as an Option, returning none if error occurred getting health. +// Currently, alerting health returns a 403 if the user is not authorized +// for rules. +async function getAlertingFrameworkHealth( + http: HttpSetup +): Promise> { + try { + return some(await alertingFrameworkHealth({ http })); + } catch (err) { + return none; + } +} + interface PromptErrorProps { docLinks: DocLinksStart; className?: string; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx index 5d47820646053..4e858151e5db1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx @@ -70,6 +70,10 @@ export type RuleDetailsProps = { refreshToken?: number; } & Pick; +const ruleDetailStyle = { + minWidth: 0, +}; + export const RuleDetails: React.FunctionComponent = ({ rule, ruleType, @@ -507,7 +511,7 @@ export const RuleDetails: React.FunctionComponent = ({ )} - + { // Loading expect(wrapper.find(EuiSuperDatePicker).props().isLoading).toBeTruthy(); - // Verify the initial columns are rendered - RULE_EXECUTION_DEFAULT_INITIAL_VISIBLE_COLUMNS.forEach((column) => { - expect(wrapper.find(`[data-test-subj="dataGridHeaderCell-${column}"]`).exists()).toBeTruthy(); - }); - - // No data initially - expect(wrapper.find('[data-gridcell-column-id="timestamp"]').length).toEqual(1); - // Let the load resolve await act(async () => { await nextTick(); wrapper.update(); }); + // Verify the initial columns are rendered + RULE_EXECUTION_DEFAULT_INITIAL_VISIBLE_COLUMNS.forEach((column) => { + expect(wrapper.find(`[data-test-subj="dataGridHeaderCell-${column}"]`).exists()).toBeTruthy(); + }); + expect(wrapper.find(EuiSuperDatePicker).props().isLoading).toBeFalsy(); expect(wrapper.find(RuleEventLogListStatusFilter).exists()).toBeTruthy(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx index 20e31e17f2d1e..5ec8a7c793231 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_event_log_list.tsx @@ -23,6 +23,7 @@ import { useKibana } from '../../../../common/lib/kibana'; import { RULE_EXECUTION_DEFAULT_INITIAL_VISIBLE_COLUMNS } from '../../../constants'; import { RuleEventLogListStatusFilter } from './rule_event_log_list_status_filter'; import { RuleEventLogDataGrid } from './rule_event_log_data_grid'; +import { CenterJustifiedSpinner } from '../../../components/center_justified_spinner'; import { RefineSearchPrompt } from '../refine_search_prompt'; import { LoadExecutionLogAggregationsProps } from '../../../lib/rule_api'; @@ -55,6 +56,8 @@ const updateButtonProps = { const MAX_RESULTS = 1000; +const ruleEventListContainerStyle = { minHeight: 400 }; + export type RuleEventLogListProps = { rule: Rule; localStorageKey?: string; @@ -72,7 +75,7 @@ export const RuleEventLogList = (props: RuleEventLogListProps) => { const { uiSettings, notifications } = useKibana().services; // Data grid states - const [logs, setLogs] = useState([]); + const [logs, setLogs] = useState(); const [visibleColumns, setVisibleColumns] = useState(() => { return ( JSON.parse(localStorage.getItem(localStorageKey) ?? 'null') || @@ -195,6 +198,30 @@ export const RuleEventLogList = (props: RuleEventLogListProps) => { [setPagination, setFilter] ); + const renderList = () => { + if (!logs) { + return ; + } + return ( + <> + {isLoading && ( + + )} + + + ); + }; + useEffect(() => { loadEventLogs(); // eslint-disable-next-line react-hooks/exhaustive-deps @@ -213,7 +240,7 @@ export const RuleEventLogList = (props: RuleEventLogListProps) => { }, [localStorageKey, visibleColumns]); return ( -
+
@@ -235,20 +262,7 @@ export const RuleEventLogList = (props: RuleEventLogListProps) => { - {isLoading && ( - - )} - + {renderList()} {isOnLastPage && ( ; +export type FtrProviderContext = GenericFtrProviderContext<{}, {}>; diff --git a/x-pack/test/fleet_packages/tests/index.ts b/x-pack/test/fleet_packages/tests/index.ts new file mode 100644 index 0000000000000..3a89a146a8473 --- /dev/null +++ b/x-pack/test/fleet_packages/tests/index.ts @@ -0,0 +1,14 @@ +/* + * 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 { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('Fleet packages test', function () { + loadTestFile(require.resolve('./install_all')); + }); +} diff --git a/x-pack/test/fleet_packages/tests/install_all.ts b/x-pack/test/fleet_packages/tests/install_all.ts new file mode 100644 index 0000000000000..f3b769f141c4a --- /dev/null +++ b/x-pack/test/fleet_packages/tests/install_all.ts @@ -0,0 +1,64 @@ +/* + * 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. + */ + +/* + * 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 { FtrProviderContext } from '../../api_integration/ftr_provider_context'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const logger = getService('log'); + + function installPackage( + name: string, + version: string + ): Promise<{ name: string; success: boolean; error?: any }> { + return supertest + .post(`/api/fleet/epm/packages/${name}/${version}`) + .set('kbn-xsrf', 'xxx') + .send({ force: true }) + .expect(200) + .then(() => { + return { name, success: true }; + }) + .catch((error) => { + return { name, success: false, error }; + }); + } + + describe('install all fleet packages', function () { + this.timeout(1000 * 60 * 60); // 1 hour + it('should work and install all packages', async () => { + const { + body: { items: packages }, + } = await supertest.get('/api/fleet/epm/packages').expect(200); + const allResults = []; + for (const pkg of packages) { + const pkgName = `${pkg.name}@${pkg.version}`; + const res = await installPackage(pkg.name, pkg.version); + allResults.push(res); + if (!res.success) { + logger.info(`❌ ${pkgName} failed: ${res?.error?.message}`); + } else { + logger.info(`✅ ${pkgName}`); + } + } + const failedInstall = allResults.filter((res) => res.success === false); + if (failedInstall.length) { + throw new Error( + `Some package installe failed: ${failedInstall.map((res) => res.name).join(', ')}` + ); + } + }); + }); +} diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts index 28a072b785c26..4769f01e8d4f0 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts @@ -35,6 +35,21 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); + describe('Loads the app with actions but not alerting privilege', () => { + before(async () => { + await security.testUser.setRoles(['only_actions_role']); + }); + after(async () => { + await security.testUser.restoreDefaults(); + }); + + it('Loads the Alerts page but with error', async () => { + await pageObjects.common.navigateToApp('triggersActions'); + const headingText = await pageObjects.triggersActionsUI.getRulesListTitle(); + expect(headingText).to.be('No permissions to create rules'); + }); + }); + describe('Loads the app', () => { before(async () => { await pageObjects.common.navigateToApp('triggersActions'); diff --git a/x-pack/test/functional_with_es_ssl/config.ts b/x-pack/test/functional_with_es_ssl/config.ts index 9f5cdb168e2d8..4ff76dbed91e5 100644 --- a/x-pack/test/functional_with_es_ssl/config.ts +++ b/x-pack/test/functional_with_es_ssl/config.ts @@ -120,6 +120,16 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { }, ], }, + only_actions_role: { + kibana: [ + { + feature: { + actions: ['all'], + }, + spaces: ['*'], + }, + ], + }, discover_alert: { kibana: [ { diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index f330a24e218ba..2b17eb48a2afc 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -48,6 +48,10 @@ export function TriggersActionsPageProvider({ getService }: FtrProviderContext) await createBtn.click(); } }, + async getRulesListTitle() { + const noPermissionsTitle = await find.byCssSelector('[data-test-subj="rulesList"] .euiTitle'); + return await noPermissionsTitle.getVisibleText(); + }, async clickCreateConnectorButton() { const createBtn = await testSubjects.find('createActionButton'); const createBtnIsVisible = await createBtn.isDisplayed(); diff --git a/yarn.lock b/yarn.lock index cfe594249eda6..2ae773c067b63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3228,6 +3228,18 @@ version "0.0.0" uid "" +"@kbn/core-preboot-server-internal@link:bazel-bin/packages/core/preboot/core-preboot-server-internal": + version "0.0.0" + uid "" + +"@kbn/core-preboot-server-mocks@link:bazel-bin/packages/core/preboot/core-preboot-server-mocks": + version "0.0.0" + uid "" + +"@kbn/core-preboot-server@link:bazel-bin/packages/core/preboot/core-preboot-server": + version "0.0.0" + uid "" + "@kbn/core-theme-browser-internal@link:bazel-bin/packages/core/theme/core-theme-browser-internal": version "0.0.0" uid "" @@ -6779,6 +6791,18 @@ version "0.0.0" uid "" +"@types/kbn__core-preboot-server-internal@link:bazel-bin/packages/core/preboot/core-preboot-server-internal/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-preboot-server-mocks@link:bazel-bin/packages/core/preboot/core-preboot-server-mocks/npm_module_types": + version "0.0.0" + uid "" + +"@types/kbn__core-preboot-server@link:bazel-bin/packages/core/preboot/core-preboot-server/npm_module_types": + version "0.0.0" + uid "" + "@types/kbn__core-public-internal-base@link:bazel-bin/packages/core/public/internal-base/npm_module_types": version "0.0.0" uid ""