From c347582ffb4a27512148b7d125c7eef276477554 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Tue, 28 Jan 2025 08:49:39 +0100 Subject: [PATCH] SKA: Fix outdated eslint rules (#206961) ## Summary Some eslint rules' paths were outdated after the SKA relocations. This PR aims at fixing them. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .eslintignore | 3 - .eslintrc.js | 56 +- .../private/url_forwarding/public/index.ts | 3 +- .../plugins/shared/charts/public/index.ts | 21 +- .../plugins/shared/data/common/index.ts | 490 +++++++++++++++++- .../plugins/shared/dev_tools/public/index.ts | 5 +- .../plugins/shared/esql/common/index.ts | 2 +- .../shared/expression_error/common/index.ts | 2 +- .../shared/expression_image/common/index.ts | 11 +- .../shared/expression_metric/common/index.ts | 12 +- .../expression_repeat_image/common/index.ts | 12 +- .../expression_reveal_image/common/index.ts | 4 +- .../plugins/shared/inspector/public/index.ts | 7 +- .../shared/visualizations/common/index.ts | 178 ++++++- .../connector_types/system_log_example.ts | 5 +- .../private/snapshot_restore/common/index.ts | 16 +- .../plugins/shared/actions/common/index.ts | 71 ++- .../plugins/shared/actions/common/types.ts | 8 - .../shared/actions/server/constants/plugin.ts | 1 + .../axios_utils_connection.test.ts | 1 + .../axios_utils_proxy.test.ts | 1 + .../lib/ensure_sufficient_license.test.ts | 1 + .../actions/server/lib/mustache_renderer.ts | 1 + .../shared/actions/server/plugin.test.ts | 2 + .../plugins/shared/actions/server/types.ts | 1 + .../alerting/common/constants/plugin.ts | 1 + .../plugins/shared/alerting/common/index.ts | 174 ++++++- .../lib/alert_conflict_resolver.ts | 1 + .../alerts_service/alerts_service.test.ts | 3 + .../lib/retry_transient_es_errors.test.ts | 4 + .../methods/bulk_edit/bulk_edit_rules.test.ts | 2 + .../alerting/server/lib/monitoring.test.ts | 1 + .../server/lib/rule_execution_status.test.ts | 1 + .../shared/alerting/server/plugin.test.ts | 1 + .../server/rules_client/common/index.ts | 28 +- .../alerting/server/rules_client/tests/lib.ts | 1 + .../saved_objects/migrations/8.6/index.ts | 1 + .../action_scheduler/test_fixtures.ts | 1 + .../alerting/server/test_utils/index.ts | 2 + .../shared/dashboard_enhanced/common/index.ts | 3 +- .../public/components/common/index.ts | 4 +- .../server/es/cluster_client_adapter.test.ts | 1 + .../server/es/cluster_client_adapter.ts | 1 + .../shared/index_management/common/index.ts | 29 +- .../shared/logs_shared/common/index.ts | 35 +- .../application/jobs/new_job/common/index.ts | 26 +- .../shared/rule_registry/server/index.ts | 46 +- .../common/build_sorted_events_query.test.ts | 18 +- .../expression/es_query_expression.test.tsx | 3 + .../es_query/expression/expression.test.tsx | 2 + .../public/rule_types/es_query/util.test.ts | 2 + .../es_query/rule_type_params.test.ts | 1 + .../get_entities_and_generate_alerts.test.ts | 1 + .../geo_containment/lib/transform_results.ts | 1 + .../index_threshold/rule_type_params.test.ts | 2 + .../connector_types/cases_webhook/index.ts | 2 +- .../connector_types/d3security/index.ts | 5 +- .../server/connector_types/email/index.ts | 2 +- .../connector_types/email/send_email.ts | 1 + .../server/connector_types/es_index/index.ts | 12 +- .../server/connector_types/gemini/index.ts | 2 +- .../connector_types/inference/helpers.ts | 2 + .../server/connector_types/inference/index.ts | 2 +- .../inference/inference.test.ts | 1 + .../server/connector_types/jira/index.ts | 2 +- .../server/connector_types/jira/types.ts | 2 + .../server/connector_types/lib/mocks.ts | 2 + .../connector_types/lib/servicenow/types.ts | 2 + .../microsoft_defender_endpoint/mocks.ts | 1 + .../server/connector_types/pagerduty/index.ts | 2 +- .../server/connector_types/resilient/types.ts | 2 + .../connector_types/sentinelone/mocks.ts | 1 + .../connector_types/server_log/index.ts | 2 +- .../connector_types/servicenow_itom/index.ts | 5 +- .../connector_types/servicenow_itsm/index.ts | 2 +- .../connector_types/servicenow_sir/index.ts | 2 +- .../server/connector_types/slack/index.ts | 2 +- .../server/connector_types/slack_api/index.ts | 2 +- .../server/connector_types/swimlane/index.ts | 2 +- .../server/connector_types/swimlane/types.ts | 2 + .../server/connector_types/teams/index.ts | 2 +- .../server/connector_types/thehive/index.ts | 2 +- .../server/connector_types/torq/index.ts | 3 +- .../connector_types/webhook/index.test.ts | 2 + .../server/connector_types/webhook/index.ts | 2 +- .../server/connector_types/xmatters/index.ts | 5 +- .../server/queries/task_claiming.test.ts | 2 + .../task_manager/server/routes/health.test.ts | 2 + .../server/saved_objects/migrations.ts | 2 + .../shared/task_manager/server/task.ts | 2 + .../task_claimers/strategy_mget.test.ts | 2 + .../strategy_update_by_query.test.ts | 2 + .../server/task_running/task_runner.test.ts | 1 + .../task_manager/server/task_store.test.ts | 1 + .../triggers_actions_ui/common/index.ts | 39 +- .../sections/rule_form/rule_form.tsx | 2 +- .../server/data/lib/core_query_types.test.ts | 1 + .../server/data/lib/time_series_query.ts | 1 + .../server/data/lib/time_series_types.test.ts | 1 + .../server/data/routes/indices.ts | 1 + .../use_error_group_list_data.tsx | 2 +- .../crashes_overview.tsx | 1 + .../errors_overview.tsx | 1 + .../use_mobile_statistics_fetcher.ts | 1 + .../app/service_inventory/index.tsx | 2 + .../index.tsx | 2 + .../transaction_details/top_errors/index.tsx | 2 + .../shared/transactions_table/index.tsx | 1 + .../apm/public/hooks/use_fetcher.test.tsx | 2 + .../public/hooks/use_progressive_fetcher.tsx | 2 + .../use_transaction_trace_samples_fetcher.ts | 1 + .../embeddable/use_app_data_view.ts | 1 + .../plugins/observability/public/index.ts | 31 +- .../components/sections/apm/apm_section.tsx | 1 + .../components/sections/logs/logs_section.tsx | 1 + .../sections/metrics/metrics_section.tsx | 1 + .../sections/uptime/uptime_section.tsx | 1 + .../components/sections/ux/ux_section.tsx | 1 + .../plugins/observability/server/index.ts | 15 +- .../server/rule_connector/index.ts | 2 +- .../auto_detect/use_onboarding_flow.tsx | 1 + .../custom_logs/install_elastic_agent.tsx | 4 + .../public/hooks/use_es_search.ts | 1 + .../public/hooks/use_time_range_async.ts | 1 + .../components/condition_editor/index.tsx | 1 + .../components/entity_detail_view/index.tsx | 1 + .../management_bottom_bar/index.tsx | 9 +- .../dashboard_table.tsx | 5 +- .../add_processor_button.tsx | 6 +- .../flyout/danger_zone.tsx | 6 +- .../dissect/dissect_append_separator.tsx | 6 +- .../dissect/dissect_pattern_definition.tsx | 7 +- .../flyout/grok/grok_patterns_editor.tsx | 9 +- .../stream_detail_enrichment/flyout/index.tsx | 2 + .../flyout/processor_field_selector.tsx | 7 +- .../flyout/processor_flyout_template.tsx | 6 +- .../flyout/processor_outcome_preview.tsx | 1 + .../flyout/processor_type_selector.tsx | 14 +- .../hooks/use_processing_simulator.ts | 1 + .../processors_list.tsx | 1 + .../stream_detail_overview/index.tsx | 2 + .../stream_detail_routing/index.tsx | 2 + .../field_parent.tsx | 1 + .../flyout/children_affected_callout.tsx | 5 +- .../public/components/streams_list/index.tsx | 17 +- .../public/hooks/use_streams_app_fetch.ts | 1 + .../common/components/monitor_inspect.tsx | 1 + .../result_details_successful.tsx | 1 + .../hooks/use_monitor_save.tsx | 1 + .../use_recently_viewed_monitors.ts | 1 + .../components/settings/policy_link.tsx | 1 + .../private_locations/policy_hosts.tsx | 6 +- .../project_api_keys/project_api_keys.tsx | 1 + .../last_successful_screenshot.tsx | 1 + .../hooks/use_browser_run_once_monitors.ts | 1 + .../ping_timestamp/use_in_progress_image.ts | 1 + .../alerts/alerts_containers/use_snap_shot.ts | 1 + .../integration_deprecation/index.tsx | 1 + .../overview/snapshot/use_snap_shot.ts | 1 + .../synthetics/check_steps/stderr_logs.tsx | 1 + .../step_expanded_row/step_screenshots.tsx | 1 + .../synthetics/step_screenshot_display.tsx | 1 + .../contexts/uptime_data_view_context.tsx | 1 + .../ux/public/hooks/use_static_data_view.ts | 1 + .../api/entity_analytics/common/index.ts | 11 +- .../common/api/entity_analytics/index.ts | 2 +- .../security_solution/risk_score/all/index.ts | 9 +- .../public/entity_analytics/common/index.ts | 11 +- 168 files changed, 1506 insertions(+), 185 deletions(-) diff --git a/.eslintignore b/.eslintignore index 5c8308a172916..9372e8a470901 100644 --- a/.eslintignore +++ b/.eslintignore @@ -20,7 +20,6 @@ snapshots.js !.buildkite # plugin overrides -/src/core/lib/kbn_internal_native_observable /src/platform/plugins/shared/data/common/es_query/kuery/ast/_generated_/** /x-pack/platform/plugins/private/canvas/canvas_plugin /x-pack/platform/plugins/private/canvas/shareable_runtime/build @@ -33,10 +32,8 @@ snapshots.js /packages/kbn-eslint-config /packages/kbn-plugin-generator/template /packages/kbn-generate/templates -/packages/kbn-pm/dist /packages/kbn-test/src/functional_test_runner/__tests__/fixtures/ /packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/ -/packages/kbn-ui-framework/dist /src/platform/packages/shared/kbn-flot-charts/lib /src/platform/packages/shared/kbn-monaco/src/**/antlr /src/platform/packages/shared/kbn-esql-ast/src/**/antlr diff --git a/.eslintrc.js b/.eslintrc.js index 3e9edd40c0f93..a6268f698e40b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -320,6 +320,10 @@ module.exports = { 'src/**/*.{js,mjs,ts,tsx}', 'x-pack/**/*.{js,mjs,ts,tsx}', 'packages/**/*.{js,mjs,ts,tsx}', + 'src/platform/packages/**/*.{js,mjs,ts,tsx}', + 'src/core/packages/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/packages/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/*/packages/**/*.{js,mjs,ts,tsx}', ], plugins: ['formatjs'], rules: { @@ -924,7 +928,7 @@ module.exports = { 'x-pack/solutions/observability/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}', 'x-pack/solutions/observability/plugins/ux/**/*.{js,mjs,ts,tsx}', 'x-pack/solutions/observability/plugins/slo/**/*.{js,mjs,ts,tsx}', - 'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/packages/**/*.{js,mjs,ts,tsx}', ], rules: { 'no-console': ['warn', { allow: ['error'] }], @@ -944,7 +948,7 @@ module.exports = { 'x-pack/solutions/observability/plugins/observability/**/*.stories.*', 'x-pack/solutions/observability/plugins/exploratory_view/**/*.stories.*', 'x-pack/solutions/observability/plugins/slo/**/*.stories.*', - 'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/packages/**/*.{js,mjs,ts,tsx}', ], rules: { 'react/function-component-definition': [ @@ -958,9 +962,10 @@ module.exports = { }, { files: [ - 'x-pack/plugins/observability_solution/**/*.{ts,tsx}', - 'x-pack/plugins/{streams,streams_app}/**/*.{ts,tsx}', - 'x-pack/packages/observability/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/observability_solution/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/{streams,streams_app}/**/*.{ts,tsx}', + 'x-pack/solutions/observability/packages/**/*.{ts,tsx}', ], rules: { 'react-hooks/exhaustive-deps': [ @@ -975,17 +980,17 @@ module.exports = { { files: [ 'x-pack/platform/plugins/shared/aiops/**/*.tsx', - 'x-pack/plugins/observability_solution/**/*.tsx', - 'x-pack/plugins/{streams,streams_app}/**/*.{ts,tsx}', - 'src/plugins/ai_assistant_management/**/*.tsx', - 'x-pack/packages/observability/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/observability_solution/**/*.{ts,tsx}', + 'x-pack/solutions/observability/plugins/**/*.{ts,tsx}', + 'src/platform/plugins/shared/ai_assistant_management/**/*.tsx', + 'x-pack/solutions/observability/packages/**/*.{ts,tsx}', ], rules: { '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error', }, }, { - files: ['x-pack/plugins/search*/**/*.tsx', 'x-pack/packages/search/**/*.tsx'], + files: ['x-pack/solutions/search/**/*.tsx'], rules: { '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'warn', }, @@ -994,7 +999,7 @@ module.exports = { files: [ 'x-pack/solutions/observability/plugins/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', 'x-pack/solutions/observability/packages/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', - 'src/plugins/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', + 'src/platform/plugins/shared/ai_assistant_management/**/!(*.stories.tsx|*.test.tsx|*.storybook_decorator.tsx|*.mock.tsx)', ], rules: { '@kbn/i18n/strings_should_be_translated_with_i18n': 'warn', @@ -1097,8 +1102,8 @@ module.exports = { 'x-pack/platform/plugins/private/data_visualizer/**/*.{js,mjs,ts,tsx}', 'x-pack/platform/plugins/shared/ml/**/*.{js,mjs,ts,tsx}', 'x-pack/platform/plugins/private/transform/**/*.{js,mjs,ts,tsx}', - 'x-pack/packages/private/ml/**/*.{js,mjs,ts,tsx}', - 'x-pack/packages/shared/ml/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/packages/shared/ml/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/packages/private/ml/**/*.{js,mjs,ts,tsx}', ], rules: { '@typescript-eslint/consistent-type-imports': 'error', @@ -1568,7 +1573,11 @@ module.exports = { { // typescript for front and back end files: [ - 'x-pack/plugins/{alerting,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/alerting/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/stack_alerts/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/actions/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/task_manager/**/*.{ts,tsx}', + 'x-pack/platform/plugins/shared/event_log/**/*.{ts,tsx}', ], rules: { '@typescript-eslint/no-explicit-any': 'error', @@ -1576,7 +1585,10 @@ module.exports = { }, { // typescript only for back end - files: ['x-pack/plugins/{stack_connectors,triggers_actions_ui}/server/**/*.ts'], + files: [ + 'x-pack/platform/plugins/shared/stack_connectors/server/**/*.ts', + 'x-pack/platform/plugins/shared/triggers_actions_ui/server/**/*.ts', + ], rules: { '@typescript-eslint/no-explicit-any': 'error', }, @@ -1708,7 +1720,7 @@ module.exports = { // All files files: [ 'x-pack/solutions/search/plugins/serverless_search/**/*.{ts,tsx}', - 'packages/kbn-search-*', + 'x-pack/solutions/search/packages/kbn-search-*', ], rules: { '@kbn/telemetry/event_generating_elements_should_be_instrumented': 'error', @@ -1872,7 +1884,8 @@ module.exports = { 'x-pack/test/encrypted_saved_objects_api_integration/**/*.{js,mjs,ts,tsx}', 'x-pack/platform/plugins/shared/security/**/*.{js,mjs,ts,tsx}', - 'x-pack/packages/security/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/packages/private/security/**/*.{js,mjs,ts,tsx}', + 'x-pack/platform/packages/shared/security/**/*.{js,mjs,ts,tsx}', 'x-pack/test/security_api_integration/**/*.{js,mjs,ts,tsx}', 'x-pack/test/security_functional/**/*.{js,mjs,ts,tsx}', @@ -1927,7 +1940,6 @@ module.exports = { { files: [ 'src/platform/packages/shared/kbn-analytics/**', - // 'packages/kbn-telemetry-tools/**', 'src/platform/plugins/private/kibana_usage_collection/**', 'src/platform/plugins/shared/usage_collection/**', 'src/platform/plugins/shared/telemetry/**', @@ -1948,7 +1960,6 @@ module.exports = { 'x-pack/platform/plugins/shared/global_search/**', 'x-pack/platform/plugins/shared/cloud/**', 'src/platform/packages/shared/kbn-config-schema', - 'src/plugins/status_page/**', 'src/platform/plugins/shared/saved_objects_management/**', 'src/platform/packages/shared/kbn-analytics/**', 'packages/kbn-telemetry-tools/**', @@ -1973,10 +1984,9 @@ module.exports = { { files: [ 'src/core/{server,public,common}/index.ts', - 'src/plugins/*/{server,public,common}/index.ts', - 'src/plugins/*/*/{server,public,common}/index.ts', - 'x-pack/plugins/*/{server,public,common}/index.ts', - 'x-pack/plugins/*/*/{server,public,common}/index.ts', + 'src/platform/plugins/**/{server,public,common}/index.ts', + 'x-pack/platform/plugins/**/{server,public,common}/index.ts', + 'x-pack/solutions/*/plugins/**/{server,public,common}/index.ts', ], rules: { '@kbn/eslint/no_export_all': 'error', diff --git a/src/platform/plugins/private/url_forwarding/public/index.ts b/src/platform/plugins/private/url_forwarding/public/index.ts index 8da437d81dbf4..2217eda274a70 100644 --- a/src/platform/plugins/private/url_forwarding/public/index.ts +++ b/src/platform/plugins/private/url_forwarding/public/index.ts @@ -13,4 +13,5 @@ import { UrlForwardingPlugin } from './plugin'; export const plugin = () => new UrlForwardingPlugin(); -export * from './plugin'; +export type { ForwardDefinition, UrlForwardingSetup, UrlForwardingStart } from './plugin'; +export { UrlForwardingPlugin } from './plugin'; diff --git a/src/platform/plugins/shared/charts/public/index.ts b/src/platform/plugins/shared/charts/public/index.ts index dd223e50a4e19..29a20b51b3b9a 100644 --- a/src/platform/plugins/shared/charts/public/index.ts +++ b/src/platform/plugins/shared/charts/public/index.ts @@ -20,9 +20,24 @@ export const plugin = () => new ChartsPlugin(); export type { ChartsPluginSetup, ChartsPluginStart } from './plugin'; -export * from './static'; -export * from './services/palettes/lighten_color'; -export * from './services/palettes/decrease_opacity'; +export { + createColorPalette, + seedColors, + CurrentTime, + EmptyPlaceholder, + useCommonChartStyles, + Endzones, + getAdjustedInterval, + renderEndzoneTooltip, + Warnings, + ColorPickerLazy, + ColorPicker, + LegendToggleLazy, + LegendToggle, + MULTILAYER_TIME_AXIS_STYLE, +} from './static'; +export { lightenColor } from './services/palettes/lighten_color'; +export { decreaseOpacity } from './services/palettes/decrease_opacity'; export { useActiveCursor } from './services/active_cursor'; export interface ClickTriggerEvent { diff --git a/src/platform/plugins/shared/data/common/index.ts b/src/platform/plugins/shared/data/common/index.ts index f802d0560f70f..816196191dec8 100644 --- a/src/platform/plugins/shared/data/common/index.ts +++ b/src/platform/plugins/shared/data/common/index.ts @@ -32,7 +32,495 @@ export { textBasedQueryStateToExpressionAst, } from './query'; export type { QueryState } from './query'; -export * from './search'; +export type { + AggConfigSerialized, + AggConfigOptions, + IAggConfig, + AggConfigsOptions, + CreateAggConfigParams, + GenericBucket, + IAggConfigs, + AggGroupName, + AggTypeConfig, + IAggType, + AggTypesDependencies, + AggTypesRegistrySetup, + AggTypesRegistryStart, + AggsCommonSetupDependencies, + AggsCommonStartDependencies, + IBucketAggConfig, + BucketAggParam, + CalculateBoundsFn, + IBucketDateHistogramAggConfig, + AggParamsDateHistogram, + AggParamsDateRange, + AggParamsFilter, + FiltersBucketAggDependencies, + AggParamsFilters, + AggParamsGeoTile, + AutoBounds, + HistogramBucketAggDependencies, + IBucketHistogramAggConfig, + AggParamsHistogram, + AggParamsIpPrefix, + AggParamsIpRange, + CidrMaskIpRangeAggKey, + RangeIpRangeAggKey, + IpRangeKey, + RangeBucketAggDependencies, + AggParamsRange, + AggParamsSignificantTerms, + AggParamsSignificantText, + CommonAggParamsTerms, + AggParamsTermsSerialized, + AggParamsTerms, + AggParamsMultiTermsSerialized, + AggParamsMultiTerms, + AggParamsRareTerms, + AggParamsSampler, + AggParamsDiversifiedSampler, + AggParamsTimeSeries, + AggParamsAvg, + AggParamsBucketAvgSerialized, + AggParamsBucketAvg, + AggParamsBucketMaxSerialized, + AggParamsBucketMax, + AggParamsBucketMinSerialized, + AggParamsBucketMin, + AggParamsBucketSumSerialized, + AggParamsBucketSum, + AggParamsFilteredMetricSerialized, + AggParamsFilteredMetric, + FiltersMetricAggDependencies, + AggParamsCardinality, + AggParamsValueCount, + AggParamsCount, + CommonAggParamsCumulativeSum, + AggParamsCumulativeSumSerialized, + AggParamsCumulativeSum, + CommonAggParamsDerivative, + AggParamsDerivativeSerialized, + AggParamsDerivative, + AggParamsGeoBounds, + AggParamsGeoCentroid, + AggParamsMax, + AggParamsMedian, + AggParamsSinglePercentile, + IMetricAggConfig, + MetricAggParam, + IMetricAggType, + AggParamsMin, + CommonAggParamsMovingAvg, + AggParamsMovingAvgSerialized, + AggParamsMovingAvg, + AggParamsPercentileRanks, + IPercentileRanksAggConfig, + PercentileRanksMetricAggDependencies, + AggParamsPercentiles, + IPercentileAggConfig, + AggParamsRate, + AggParamsSinglePercentileRank, + CommonAggParamsSerialDiff, + AggParamsSerialDiffSerialized, + AggParamsSerialDiff, + AggParamsStdDeviation, + IStdDevAggConfig, + AggParamsSum, + BaseAggParamsTopHit, + AggParamsTopHitSerialized, + AggParamsTopHit, + BaseAggParamsTopMetrics, + AggParamsTopMetricsSerialized, + AggParamsTopMetrics, + FieldTypes, + FilterFieldFn, + IFieldParamType, + OptionedValueProp, + AggParam, + AggParamOption, + IpPrefixKey, + AggsCommonSetup, + AggsCommonStart, + AggsStart, + BaseAggParams, + AggExpressionType, + AggExpressionFunctionArgs, + AggParamsMapping, + AggFunctionsMapping, + ParsedInterval, + REASON_ID_TYPES, + Cidr, + CidrOutput, + ExpressionFunctionCidr, + DateRange, + DateRangeOutput, + ExpressionFunctionDateRange, + ExtendedBounds, + ExtendedBoundsOutput, + ExpressionFunctionExtendedBounds, + GeoBoundingBox, + GeoBoundingBoxOutput, + ExpressionFunctionGeoBoundingBox, + GeoPoint, + GeoPointOutput, + ExpressionFunctionGeoPoint, + IpPrefix, + IpPrefixOutput, + ExpressionFunctionIpPrefix, + IpRange, + IpRangeOutput, + ExpressionFunctionIpRange, + ExpressionFunctionKibana, + ExpressionFunctionKibanaContext, + ExpressionFunctionKql, + ExpressionFunctionLucene, + NumericalRange, + NumericalRangeOutput, + ExpressionFunctionNumericalRange, + QueryFilter, + QueryFilterOutput, + ExpressionFunctionQueryFilter, + ExpressionValueSearchContext, + KibanaQueryOutput, + KibanaFilter, + KibanaField, + KIBANA_CONTEXT_NAME, + KibanaContext, + EsaggsExpressionFunctionDefinition, + EsaggsStartDependencies, + RequestHandlerParams, + KibanaRange, + ExpressionFunctionRange, + ExpressionFunctionField, + ExpressionFunctionPhraseFilter, + ExpressionFunctionExistsFilter, + ExpressionFunctionRangeFilter, + ExpressionFunctionRemoveFilter, + ExpressionFunctionSelectFilter, + ExpressionFunctionKibanaFilter, + KibanaTimerangeOutput, + ExpressionFunctionKibanaTimerange, + EsRawResponse, + EsRawResponseExpressionTypeDefinition, + EqlRawResponse, + SearchTypes, + TotalValue, + BaseHit, + EqlSequence, + EqlSearchResponse, + EqlRawResponseExpressionTypeDefinition, + EsdslExpressionFunctionDefinition, + EqlExpressionFunctionDefinition, + EsqlExpressionFunctionDefinition, + SearchRequest, + FetchHandlers, + SearchError, + SearchSourceDependencies, + ISearchSource, + ISearchStartSearchSource, + SortDirectionFormat, + SortDirectionNumeric, + EsQuerySortValue, + SearchFieldValue, + SearchSourceFields, + SerializedSearchSourceFields, + SearchSourceOptions, + IInspectorInfo, + SearchSourceSearchOptions, + SearchSessionSavedObjectAttributes, + SearchSessionRequestInfo, + SearchSessionRequestStatus, + SearchSessionStatusResponse, + SearchSessionsFindResponse, + EqlRequestParams, + EqlSearchStrategyRequest, + EqlSearchStrategyResponse, + IAsyncSearchOptions, + SqlRequestParams, + SqlSearchStrategyRequest, + SqlSearchStrategyResponse, +} from './search'; +export { + AggConfig, + AggConfigs, + AggGroupNames, + AggGroupLabels, + AggType, + getAggTypes, + getAggTypesFunctions, + AggTypesRegistry, + aggsRequiredUiSettings, + AggsCommonService, + autoInterval, + isAutoInterval, + intervalOptions, + BucketAggType, + isBucketAggType, + BUCKET_TYPES, + aggDateHistogramFnName, + aggDateHistogram, + isDateHistogramBucketAggConfig, + getDateHistogramBucketAgg, + aggDateRangeFnName, + aggDateRange, + getDateRangeBucketAgg, + aggFilterFnName, + aggFilter, + getFilterBucketAgg, + aggFiltersFnName, + aggFilters, + getFiltersBucketAgg, + aggGeoTileFnName, + aggGeoTile, + getGeoTitleBucketAgg, + aggHistogramFnName, + aggHistogram, + getHistogramBucketAgg, + aggIpPrefixFnName, + aggIpPrefix, + getIpPrefixBucketAgg, + aggIpRangeFnName, + aggIpRange, + IP_RANGE_TYPES, + getIpRangeBucketAgg, + CidrMask, + convertDateRangeToString, + convertIPRangeToString, + boundsDescendingRaw, + calcAutoIntervalNear, + calcAutoIntervalLessThan, + TimeBuckets, + isType, + isNumberType, + isStringType, + isStringOrNumberType, + migrateIncludeExcludeFormat, + aggRangeFnName, + aggRange, + getRangeBucketAgg, + aggSignificantTermsFnName, + aggSignificantTerms, + getSignificantTermsBucketAgg, + aggSignificantTextFnName, + aggSignificantText, + getSignificantTextBucketAgg, + aggTermsFnName, + aggTerms, + termsAggFilter, + getTermsBucketAgg, + MultiFieldKey, + isMultiFieldKey, + MULTI_FIELD_KEY_SEPARATOR, + aggMultiTermsFnName, + aggMultiTerms, + getMultiTermsBucketAgg, + aggRareTermsFnName, + aggRareTerms, + getRareTermsBucketAgg, + aggSamplerFnName, + aggSampler, + SAMPLER_AGG_NAME, + getSamplerBucketAgg, + aggDiversifiedSamplerFnName, + aggDiversifiedSampler, + DIVERSIFIED_SAMPLER_AGG_NAME, + getDiversifiedSamplerBucketAgg, + getTimeSeriesBucketAgg, + aggTimeSeriesFnName, + aggTimeSeries, + SHARD_DELAY_AGG_NAME, + aggAvgFnName, + aggAvg, + getAvgMetricAgg, + aggBucketAvgFnName, + aggBucketAvg, + getBucketAvgMetricAgg, + aggBucketMaxFnName, + aggBucketMax, + getBucketMaxMetricAgg, + aggBucketMinFnName, + aggBucketMin, + getBucketMinMetricAgg, + aggBucketSumFnName, + aggBucketSum, + getBucketSumMetricAgg, + aggFilteredMetricFnName, + aggFilteredMetric, + getFilteredMetricAgg, + aggCardinalityFnName, + aggCardinality, + getCardinalityMetricAgg, + aggValueCountFnName, + aggValueCount, + getValueCountMetricAgg, + getCountMetricAgg, + aggCountFnName, + aggCount, + aggCumulativeSumFnName, + aggCumulativeSum, + getCumulativeSumMetricAgg, + aggDerivativeFnName, + aggDerivative, + getDerivativeMetricAgg, + aggGeoBoundsFnName, + aggGeoBounds, + getGeoBoundsMetricAgg, + aggGeoCentroidFnName, + aggGeoCentroid, + getGeoCentroidMetricAgg, + parentPipelineType, + parentPipelineAggHelper, + siblingPipelineType, + siblingPipelineAggHelper, + aggMaxFnName, + aggMax, + getMaxMetricAgg, + aggMedianFnName, + aggMedian, + getMedianMetricAgg, + aggSinglePercentileFnName, + aggSinglePercentile, + getSinglePercentileMetricAgg, + MetricAggType, + isMetricAggType, + METRIC_TYPES, + aggMinFnName, + aggMin, + getMinMetricAgg, + aggMovingAvgFnName, + aggMovingAvg, + getMovingAvgMetricAgg, + aggPercentileRanksFnName, + aggPercentileRanks, + getPercentileRanksMetricAgg, + aggPercentilesFnName, + aggPercentiles, + getPercentilesMetricAgg, + aggRateFnName, + aggRate, + getRateMetricAgg, + aggSinglePercentileRankFnName, + aggSinglePercentileRank, + getSinglePercentileRankMetricAgg, + aggSerialDiffFnName, + aggSerialDiff, + getSerialDiffMetricAgg, + aggStdDeviationFnName, + aggStdDeviation, + getStdDeviationMetricAgg, + aggSumFnName, + aggSum, + getSumMetricAgg, + aggTopHitFnName, + aggTopHit, + getTopHitMetricAgg, + getTopMetricsMetricAgg, + aggTopMetricsFnName, + aggTopMetrics, + AggParamType, + BaseParamType, + FieldParamType, + JsonParamType, + OptionedParamType, + StringParamType, + getCalculateAutoTimeExpression, + dateHistogramInterval, + InvalidEsCalendarIntervalError, + InvalidEsIntervalFormatError, + isValidEsInterval, + isValidInterval, + splitStringInterval, + parseInterval, + parseEsInterval, + toAbsoluteDates, + getAggsFormats, + IpAddress, + propFilter, + inferTimeZone, + parseTimeShift, + isAbsoluteTimeShift, + REASON_IDS, + parseAbsoluteTimeShift, + validateAbsoluteTimeShift, + cidrFunction, + cidrToAst, + dateRangeFunction, + dateRangeToAst, + extendedBoundsFunction, + extendedBoundsToAst, + geoBoundingBoxFunction, + geoBoundingBoxToAst, + geoPointFunction, + geoPointToAst, + ipPrefixFunction, + ipPrefixToAst, + ipRangeFunction, + ipRangeToAst, + kibana, + kqlFunction, + luceneFunction, + numericalRangeFunction, + numericalRangeToAst, + queryFilterFunction, + queryFilterToAst, + queryToAst, + aggregateQueryToAst, + timerangeToAst, + getEsaggsMeta, + handleEsaggsRequest, + functionWrapper, + adaptToExpressionValueFilter, + rangeFunction, + fieldFunction, + phraseFilterFunction, + existsFilterFunction, + rangeFilterFunction, + removeFilterFunction, + selectFilterFunction, + kibanaFilterFunction, + filtersToAst, + kibanaTimerangeFunction, + esRawResponse, + eqlRawResponse, + getEsdslFn, + getEqlFn, + getEsqlFn, + createSearchSource, + injectReferences, + extractReferences, + parseSearchSourceJSON, + getResponseInspectorStats, + getSearchParamsFromRequest, + getEsPreference, + RequestFailure, + searchSourceRequiredUiSettings, + SearchSource, + SearchSourceService, + SortDirection, + isSerializedSearchSource, + queryToFields, + tabifyDocs, + flattenHit, + tabifyAggResponse, + tabifyGetColumns, + isAbortResponse, + isRunningResponse, + getUserTimeZone, + SearchSessionStatus, + SearchStatus, + SEARCH_SESSION_TYPE, + SEARCH_SESSIONS_TABLE_ID, + pollSearch, + ES_SEARCH_STRATEGY, + getTotalLoaded, + shimHitsTotal, + EQL_SEARCH_STRATEGY, + ENHANCED_ES_SEARCH_STRATEGY, + SQL_SEARCH_STRATEGY, + ESQL_SEARCH_STRATEGY, + ESQL_ASYNC_SEARCH_STRATEGY, + ESQL_TABLE_TYPE, +} from './search'; export type { RefreshInterval, TimeRangeBounds, diff --git a/src/platform/plugins/shared/dev_tools/public/index.ts b/src/platform/plugins/shared/dev_tools/public/index.ts index 800e6f46df24f..9c3425f7274af 100644 --- a/src/platform/plugins/shared/dev_tools/public/index.ts +++ b/src/platform/plugins/shared/dev_tools/public/index.ts @@ -10,8 +10,9 @@ // TODO: https://github.com/elastic/kibana/issues/110892 import { DevToolsPlugin } from './plugin'; -export * from './plugin'; -export * from '../common/constants'; +export type { DevToolsSetup } from './plugin'; +export { DevToolsPlugin } from './plugin'; +export { DEV_TOOLS_FEATURE_ID, ENABLE_PERSISTENT_CONSOLE_UI_SETTING_ID } from '../common/constants'; export function plugin() { return new DevToolsPlugin(); diff --git a/src/platform/plugins/shared/esql/common/index.ts b/src/platform/plugins/shared/esql/common/index.ts index 9b6ee5bbc44a7..e06ede972ab9a 100644 --- a/src/platform/plugins/shared/esql/common/index.ts +++ b/src/platform/plugins/shared/esql/common/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export type * from './types'; +export type { JoinIndicesAutocompleteResult, JoinIndexAutocompleteItem } from './types'; diff --git a/src/platform/plugins/shared/expression_error/common/index.ts b/src/platform/plugins/shared/expression_error/common/index.ts index 3748ba396ee62..ddd19134dd8b8 100755 --- a/src/platform/plugins/shared/expression_error/common/index.ts +++ b/src/platform/plugins/shared/expression_error/common/index.ts @@ -9,4 +9,4 @@ // TODO: https://github.com/elastic/kibana/issues/110893 -export * from './constants'; +export { PLUGIN_ID, PLUGIN_NAME, JSON } from './constants'; diff --git a/src/platform/plugins/shared/expression_image/common/index.ts b/src/platform/plugins/shared/expression_image/common/index.ts index 5b93b57a2f393..653b27a05aa36 100755 --- a/src/platform/plugins/shared/expression_image/common/index.ts +++ b/src/platform/plugins/shared/expression_image/common/index.ts @@ -9,5 +9,12 @@ // TODO: https://github.com/elastic/kibana/issues/110893 -export * from './constants'; -export * from './types'; +export { PLUGIN_ID, PLUGIN_NAME, CONTEXT, BASE64, URL } from './constants'; +export type { + Return, + ExpressionImageFunction, + OriginString, + ImageRendererConfig, + NodeDimensions, +} from './types'; +export { ImageMode } from './types'; diff --git a/src/platform/plugins/shared/expression_metric/common/index.ts b/src/platform/plugins/shared/expression_metric/common/index.ts index f537c7bcdd198..1a21d11bafd36 100755 --- a/src/platform/plugins/shared/expression_metric/common/index.ts +++ b/src/platform/plugins/shared/expression_metric/common/index.ts @@ -9,6 +9,12 @@ // TODO: https://github.com/elastic/kibana/issues/110893 -export * from './constants'; -export * from './types'; -export * from './expression_functions'; +export { PLUGIN_ID, PLUGIN_NAME, FONT_FAMILY, FONT_WEIGHT, CSS, NUMERALJS } from './constants'; +export type { + Input, + Arguments, + ExpressionMetricFunction, + MetricRendererConfig, + NodeDimensions, +} from './types'; +export { functions, metricFunction } from './expression_functions'; diff --git a/src/platform/plugins/shared/expression_repeat_image/common/index.ts b/src/platform/plugins/shared/expression_repeat_image/common/index.ts index f537c7bcdd198..317000c0eb00e 100755 --- a/src/platform/plugins/shared/expression_repeat_image/common/index.ts +++ b/src/platform/plugins/shared/expression_repeat_image/common/index.ts @@ -9,6 +9,12 @@ // TODO: https://github.com/elastic/kibana/issues/110893 -export * from './constants'; -export * from './types'; -export * from './expression_functions'; +export { PLUGIN_ID, PLUGIN_NAME, CONTEXT, BASE64, URL } from './constants'; +export type { + Return, + ExpressionRepeatImageFunction, + OriginString, + RepeatImageRendererConfig, + NodeDimensions, +} from './types'; +export { functions, repeatImageFunction } from './expression_functions'; diff --git a/src/platform/plugins/shared/expression_reveal_image/common/index.ts b/src/platform/plugins/shared/expression_reveal_image/common/index.ts index 2f52906fa3bba..7b5e9eed3ff6c 100755 --- a/src/platform/plugins/shared/expression_reveal_image/common/index.ts +++ b/src/platform/plugins/shared/expression_reveal_image/common/index.ts @@ -9,5 +9,5 @@ // TODO: https://github.com/elastic/kibana/issues/110893 -export * from './constants'; -export * from './expression_functions'; +export { PLUGIN_ID, PLUGIN_NAME, BASE64, URL } from './constants'; +export { functions, revealImageFunction } from './expression_functions'; diff --git a/src/platform/plugins/shared/inspector/public/index.ts b/src/platform/plugins/shared/inspector/public/index.ts index 3a77dc27f42d7..cfc04ceddf216 100644 --- a/src/platform/plugins/shared/inspector/public/index.ts +++ b/src/platform/plugins/shared/inspector/public/index.ts @@ -32,4 +32,9 @@ export { } from './adapters/has_inspector_adapters'; export { InspectorPublicPlugin as Plugin } from './plugin'; export type { Setup, Start } from './plugin'; -export * from './types'; +export type { + InspectorViewProps, + InspectorViewDescription, + InspectorOptions, + InspectorSession, +} from './types'; diff --git a/src/platform/plugins/shared/visualizations/common/index.ts b/src/platform/plugins/shared/visualizations/common/index.ts index 353adcef8603f..be2bc11134d6e 100644 --- a/src/platform/plugins/shared/visualizations/common/index.ts +++ b/src/platform/plugins/shared/visualizations/common/index.ts @@ -10,10 +10,180 @@ // TODO: https://github.com/elastic/kibana/issues/110891 /** @public types */ -export * from './types'; -export * from './utils'; -export * from './expression_functions'; -export * from './convert_to_lens'; +export type { + VisParams, + SavedVisState, + VisualizationSavedObjectAttributes, + VisualizationSavedObject, + SerializedVisData, + SerializedVis, + SupportedAggregation, + GenericSchemaConfig, + SchemaConfig, +} from './types'; +export type { Dimension, PaletteConfig } from './utils'; +export { + prepareLogTable, + findAccessor, + findAccessorOrFail, + getAccessorByDimension, + validateAccessor, + getColumnByAccessor, + isVisDimension, + getAccessor, + getFormatByAccessor, + getStopsWithColorsFromRanges, +} from './utils'; +export type { + Arguments, + ExpressionValueVisDimension, + ExpressionFunctionVisDimension, +} from './expression_functions'; +export { range, visDimension } from './expression_functions'; +export type { + AggBasedColumn, + DataType, + TimeScaleUnit, + SortingHint, + FilterQuery, + Filter, + Range, + NumberValueFormat, + MinMax, + BasicFullPercentageModeConfig, + BasicPercentageModeConfig, + PercentageModeConfigWithMinMax, + PercentageModeConfig, + RangeMode, + FormatParams, + FiltersParams, + TermsParams, + DateHistogramParams, + RangeParams, + MinParams, + MaxParams, + AvgParams, + SumParams, + MedianParams, + StandardDeviationParams, + CardinalityParams, + CumulativeSumParams, + CounterRateParams, + DerivativeParams, + CountParams, + PercentileParams, + PercentileRanksParams, + LastValueParams, + MovingAverageParams, + FormulaParams, + StaticValueParams, + TimeScaleParams, + Operation, + OperationWithSourceField, + OperationWithReferences, + BaseColumn, + ColumnWithSourceField, + ColumnWithReferences, + FiltersColumn, + RangeColumn, + TermsColumn, + DateHistogramColumn, + MinColumn, + MaxColumn, + AvgColumn, + SumColumn, + MedianColumn, + StandardDeviationColumn, + CardinalityColumn, + PercentileColumn, + PercentileRanksColumn, + CountColumn, + LastValueColumn, + CumulativeSumColumn, + CounterRateColumn, + DerivativeColumn, + MovingAverageColumn, + FormulaColumn, + StaticValueColumn, + AnyColumnWithSourceField, + AnyColumnWithReferences, + Column, + GenericColumnWithMeta, + ColumnWithMeta, + Layer, + NavigateToLensContext, + ChartShapes, + CollapseFunction, + FillType, + SeriesType, + YAxisMode, + XYCurveType, + PartitionChartType, + CategoryDisplayType, + NumberDisplayType, + LegendDisplayType, + LayerType, + GaugeColorMode, + GaugeShape, + GaugeLabelMajorMode, + GaugeCentralMajorMode, + GaugeTicksPosition, + AxisExtentConfig, + YConfig, + XYDataLayerConfig, + XYReferenceLineLayerConfig, + EventAnnotationConfig, + XYAnnotationsLayerConfig, + XYLayerConfig, + AxesSettingsConfig, + LabelsOrientationConfig, + LegendConfig, + XYConfiguration, + SortingState, + PagingState, + ColumnState, + TableVisConfiguration, + MetricVisConfiguration, + PartitionLayerState, + PartitionVisConfiguration, + GaugeVisConfiguration, + HeatmapLegendConfig, + HeatmapGridConfig, + HeatmapArguments, + HeatmapLayerState, + Palette, + HeatmapConfiguration, + TagcloudVisConfiguration, + Configuration, +} from './convert_to_lens'; +export { + LENS_GAUGE_ID, + GROUP_ID, + OperationsWithSourceField, + OperationsWithReferences, + Operations, + PartitionChartTypes, + CategoryDisplayTypes, + NumberDisplayTypes, + LegendDisplayTypes, + LayerTypes, + XYCurveTypes, + YAxisModes, + SeriesTypes, + FillTypes, + RANGE_MODES, + GaugeShapes, + GaugeTicksPositions, + GaugeLabelMajorModes, + GaugeCentralMajorModes, + GaugeColorModes, + CollapseFunctions, + isAnnotationsLayer, + getIndexPatternIds, + isFieldValid, + isCollapseFunction, + excludeMetaFromColumn, +} from './convert_to_lens'; export { convertToSchemaConfig } from './vis_schemas'; export { diff --git a/x-pack/examples/triggers_actions_ui_example/server/connector_types/system_log_example.ts b/x-pack/examples/triggers_actions_ui_example/server/connector_types/system_log_example.ts index 1451b8525fda4..aacf3c88a45ab 100644 --- a/x-pack/examples/triggers_actions_ui_example/server/connector_types/system_log_example.ts +++ b/x-pack/examples/triggers_actions_ui_example/server/connector_types/system_log_example.ts @@ -14,10 +14,7 @@ import type { ActionTypeExecutorOptions as ConnectorTypeExecutorOptions, ActionTypeExecutorResult as ConnectorTypeExecutorResult, } from '@kbn/actions-plugin/server/types'; -import { - AlertingConnectorFeatureId, - UptimeConnectorFeatureId, -} from '@kbn/actions-plugin/common/connector_feature_config'; +import { AlertingConnectorFeatureId, UptimeConnectorFeatureId } from '@kbn/actions-plugin/common'; import { ConnectorAdapter } from '@kbn/alerting-plugin/server'; // see: https://en.wikipedia.org/wiki/Unicode_control_characters diff --git a/x-pack/platform/plugins/private/snapshot_restore/common/index.ts b/x-pack/platform/plugins/private/snapshot_restore/common/index.ts index 4607eb0da935f..21e518dd9bc00 100644 --- a/x-pack/platform/plugins/private/snapshot_restore/common/index.ts +++ b/x-pack/platform/plugins/private/snapshot_restore/common/index.ts @@ -7,4 +7,18 @@ // TODO: https://github.com/elastic/kibana/issues/110892 -export * from './constants'; +export { + PLUGIN, + MAJOR_VERSION, + API_BASE_PATH, + REPOSITORY_TYPES, + ON_PREM_REPOSITORY_TYPES, + MODULE_REPOSITORY_TYPES, + PLUGIN_REPOSITORY_TYPES, + REPOSITORY_PLUGINS_MAP, + APP_REQUIRED_CLUSTER_PRIVILEGES, + APP_RESTORE_INDEX_PRIVILEGES, + APP_SLM_CLUSTER_PRIVILEGES, + TIME_UNITS, + FEATURE_STATES_NONE_OPTION, +} from './constants'; diff --git a/x-pack/platform/plugins/shared/actions/common/index.ts b/x-pack/platform/plugins/shared/actions/common/index.ts index a28939f9e56aa..633dda448856d 100644 --- a/x-pack/platform/plugins/shared/actions/common/index.ts +++ b/x-pack/platform/plugins/shared/actions/common/index.ts @@ -7,14 +7,69 @@ // TODO: https://github.com/elastic/kibana/issues/110895 -export * from './types'; -export * from './alert_history_schema'; -export * from './rewrite_request_case'; -export * from './mustache_template'; -export * from './validate_email_addresses'; -export * from './connector_feature_config'; -export * from './execution_log_types'; -export * from './validate_empty_strings'; +export type { + SubFeature, + ActionType, + ValidatedEmail, + ActionTypeExecutorResult, + ActionTypeExecutorRawResult, + ActionsPublicConfigType, +} from './types'; +export { InvalidEmailReason, isActionTypeExecutorResult } from './types'; +export { + ALERT_HISTORY_PREFIX, + AlertHistoryDefaultIndexName, + AlertHistoryEsIndexConnectorId, + buildAlertHistoryDocument, + AlertHistoryDocumentTemplate, +} from './alert_history_schema'; +export type { + AsApiContract, + RewriteRequestCase, + RewriteResponseCase, +} from './rewrite_request_case'; +export { + MustacheInEmailRegExp, + hasMustacheTemplate, + withoutMustacheTemplate, +} from './mustache_template'; +export type { ValidateEmailAddressesOptions } from './validate_email_addresses'; +export { + validateEmailAddressesAsAlwaysValid, + validateEmailAddresses, + invalidEmailsAsMessage, +} from './validate_email_addresses'; +export { + AlertingConnectorFeatureId, + CasesConnectorFeatureId, + UptimeConnectorFeatureId, + SecurityConnectorFeatureId, + GenerativeAIForSecurityConnectorFeatureId, + GenerativeAIForObservabilityConnectorFeatureId, + GenerativeAIForSearchPlaygroundConnectorFeatureId, + EndpointSecurityConnectorFeatureId, + AlertingConnectorFeature, + CasesConnectorFeature, + UptimeConnectorFeature, + SecuritySolutionFeature, + GenerativeAIForSecurityFeature, + GenerativeAIForObservabilityFeature, + GenerativeAIForSearchPlaygroundFeature, + EndpointSecurityConnectorFeature, + areValidFeatures, + getConnectorFeatureName, + getConnectorCompatibility, +} from './connector_feature_config'; +export type { + IExecutionLog, + IExecutionLogResult, + GetGlobalExecutionLogParams, + GetGlobalExecutionKPIParams, + IExecutionKPIResult, + ExecutionLogSortFields, +} from './execution_log_types'; +export { EMPTY_EXECUTION_KPI_RESULT, executionLogSortableColumns } from './execution_log_types'; +export { validateEmptyStrings } from './validate_empty_strings'; export const BASE_ACTION_API_PATH = '/api/actions'; export const INTERNAL_BASE_ACTION_API_PATH = '/internal/actions'; diff --git a/x-pack/platform/plugins/shared/actions/common/types.ts b/x-pack/platform/plugins/shared/actions/common/types.ts index 153d529f76c5c..508202b9fe9a4 100644 --- a/x-pack/platform/plugins/shared/actions/common/types.ts +++ b/x-pack/platform/plugins/shared/actions/common/types.ts @@ -9,14 +9,6 @@ import { SUB_FEATURE } from '@kbn/actions-types'; import { LicenseType } from '@kbn/licensing-plugin/common/types'; import { TaskErrorSource } from '@kbn/task-manager-plugin/common'; -export { - AlertingConnectorFeatureId, - CasesConnectorFeatureId, - UptimeConnectorFeatureId, - SecurityConnectorFeatureId, - GenerativeAIForSecurityConnectorFeatureId, -} from './connector_feature_config'; - export type SubFeature = keyof typeof SUB_FEATURE; export interface ActionType { diff --git a/x-pack/platform/plugins/shared/actions/server/constants/plugin.ts b/x-pack/platform/plugins/shared/actions/server/constants/plugin.ts index f385e2e435259..e2a691ecb41ad 100644 --- a/x-pack/platform/plugins/shared/actions/server/constants/plugin.ts +++ b/x-pack/platform/plugins/shared/actions/server/constants/plugin.ts @@ -11,6 +11,7 @@ export const PLUGIN = { ID: 'actions', MINIMUM_LICENSE_REQUIRED: 'basic' as LicenseType, // TODO: supposed to be changed up on requirements + // eslint-disable-next-line @typescript-eslint/no-explicit-any getI18nName: (i18n: any): string => i18n.translate('xpack.actions.appName', { defaultMessage: 'Actions', diff --git a/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_connection.test.ts b/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_connection.test.ts index f7eb05ba1caaf..e19e147fdbe14 100644 --- a/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_connection.test.ts +++ b/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_connection.test.ts @@ -62,6 +62,7 @@ const AuthB64 = Buffer.from(Auth).toString('base64'); describe('axios connections', () => { let testServer: http.Server | https.Server | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any let savedAxiosDefaultsAdapter: any; beforeEach(() => { diff --git a/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_proxy.test.ts b/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_proxy.test.ts index 6d5e98ee236ce..719c973189b73 100644 --- a/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_proxy.test.ts +++ b/x-pack/platform/plugins/shared/actions/server/integration_tests/axios_utils_proxy.test.ts @@ -49,6 +49,7 @@ const ServerResponse = 'A unique response returned by the server!'; describe('axios connections', () => { let testServer: http.Server | https.Server | null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any let savedAxiosDefaultsAdapter: any; beforeEach(() => { diff --git a/x-pack/platform/plugins/shared/actions/server/lib/ensure_sufficient_license.test.ts b/x-pack/platform/plugins/shared/actions/server/lib/ensure_sufficient_license.test.ts index 88c5bad62ee8f..27f87d611cd43 100644 --- a/x-pack/platform/plugins/shared/actions/server/lib/ensure_sufficient_license.test.ts +++ b/x-pack/platform/plugins/shared/actions/server/lib/ensure_sufficient_license.test.ts @@ -66,6 +66,7 @@ describe('ensureSufficientLicense()', () => { ...sampleActionType, // we're faking an invalid value, this requires stripping the typing + // eslint-disable-next-line @typescript-eslint/no-explicit-any minimumLicenseRequired: 'foo' as any, }) ).toThrowErrorMatchingInlineSnapshot(`"\\"foo\\" is not a valid license type"`); diff --git a/x-pack/platform/plugins/shared/actions/server/lib/mustache_renderer.ts b/x-pack/platform/plugins/shared/actions/server/lib/mustache_renderer.ts index 2489391a0985d..2eca7f13aba30 100644 --- a/x-pack/platform/plugins/shared/actions/server/lib/mustache_renderer.ts +++ b/x-pack/platform/plugins/shared/actions/server/lib/mustache_renderer.ts @@ -114,6 +114,7 @@ function addToStringDeep(object: unknown): void { if (Array.isArray(object)) { // instead, add an asJSON() + // eslint-disable-next-line @typescript-eslint/no-explicit-any (object as any).asJSON = () => JSON.stringify(object); object.forEach((element) => addToStringDeep(element)); return; diff --git a/x-pack/platform/plugins/shared/actions/server/plugin.test.ts b/x-pack/platform/plugins/shared/actions/server/plugin.test.ts index 2b127b68ba9a6..604d5a855c3a5 100644 --- a/x-pack/platform/plugins/shared/actions/server/plugin.test.ts +++ b/x-pack/platform/plugins/shared/actions/server/plugin.test.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import moment from 'moment'; import { schema, ByteSizeValue } from '@kbn/config-schema'; import { PluginInitializerContext, RequestHandlerContext } from '@kbn/core/server'; diff --git a/x-pack/platform/plugins/shared/actions/server/types.ts b/x-pack/platform/plugins/shared/actions/server/types.ts index 84647700257cf..3a2655c3de97b 100644 --- a/x-pack/platform/plugins/shared/actions/server/types.ts +++ b/x-pack/platform/plugins/shared/actions/server/types.ts @@ -234,6 +234,7 @@ export interface ActionTaskParams extends SavedObjectAttributes { actionId: string; // Saved Objects won't allow us to enforce unknown rather than any + // eslint-disable-next-line @typescript-eslint/no-explicit-any params: Record; apiKey?: string; executionId?: string; diff --git a/x-pack/platform/plugins/shared/alerting/common/constants/plugin.ts b/x-pack/platform/plugins/shared/alerting/common/constants/plugin.ts index d9d578de08ac0..35b56a768f0cc 100644 --- a/x-pack/platform/plugins/shared/alerting/common/constants/plugin.ts +++ b/x-pack/platform/plugins/shared/alerting/common/constants/plugin.ts @@ -12,6 +12,7 @@ export const PLUGIN = { MINIMUM_LICENSE_REQUIRED: 'basic' as LicenseType, // TODO: supposed to be changed up on requirements // all plugins seem to use getI18nName with any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getI18nName: (i18n: any): string => i18n.translate('xpack.alerting.appName', { defaultMessage: 'Alerting', diff --git a/x-pack/platform/plugins/shared/alerting/common/index.ts b/x-pack/platform/plugins/shared/alerting/common/index.ts index 0740858784a2c..86819cfe0e571 100644 --- a/x-pack/platform/plugins/shared/alerting/common/index.ts +++ b/x-pack/platform/plugins/shared/alerting/common/index.ts @@ -7,10 +7,90 @@ // TODO: https://github.com/elastic/kibana/issues/110895 -export * from './rule'; -export * from './rules_settings'; -export * from './rule_type'; -export * from './lib'; +export type { + ActionVariable, + Rule, + SanitizedRule, + RuleTypeParams, + RuleActionParams, + RuleActionParam, + IntervalSchedule, + RuleActionFrequency, + AlertsFilterTimeframe, + AlertsFilter, + RuleAction, + RuleSystemAction, + MappedParamsProperties, + MappedParams, + RuleExecutionStatuses, + RuleLastRunOutcomes, + RuleExecutionStatus, + RuleMonitoringHistory, + RuleMonitoringCalculatedMetrics, + RuleMonitoringLastRun, + RuleMonitoring, + RuleLastRun, + AlertDelay, + SanitizedAlertsFilter, + SanitizedRuleAction, + AlertsHealth, + AlertingFrameworkHealth, + ResolvedSanitizedRule, + RuleTypeState, + RuleTypeMetaData, + RuleAlertData, + RuleAlertingOutcome, + RuleActionAlertsFilterProperty, + RuleActionKey, + RuleSystemActionKey, + SanitizedRuleConfig, + RuleMonitoringLastRunMetrics, +} from './rule'; +export { + RuleExecutionStatusValues, + RuleLastRunOutcomeValues, + RuleExecutionStatusErrorReasons, + RuleExecutionStatusWarningReasons, + HealthStatus, + RuleLastRunOutcomeOrderMap, +} from './rule'; +export type { + RulesSettingsModificationMetadata, + RulesSettingsFlappingProperties, + RulesSettingsQueryDelayProperties, + RuleSpecificFlappingProperties, + RulesSettingsFlapping, + RulesSettingsQueryDelay, + RulesSettingsProperties, + RulesSettings, +} from './rules_settings'; +export { + MIN_LOOK_BACK_WINDOW, + MAX_LOOK_BACK_WINDOW, + MIN_STATUS_CHANGE_THRESHOLD, + MAX_STATUS_CHANGE_THRESHOLD, + MIN_QUERY_DELAY, + MAX_QUERY_DELAY, + RULES_SETTINGS_FEATURE_ID, + ALL_FLAPPING_SETTINGS_SUB_FEATURE_ID, + READ_FLAPPING_SETTINGS_SUB_FEATURE_ID, + ALL_QUERY_DELAY_SETTINGS_SUB_FEATURE_ID, + READ_QUERY_DELAY_SETTINGS_SUB_FEATURE_ID, + API_PRIVILEGES, + RULES_SETTINGS_SAVED_OBJECT_TYPE, + RULES_SETTINGS_FLAPPING_SAVED_OBJECT_ID, + RULES_SETTINGS_QUERY_DELAY_SAVED_OBJECT_ID, + DEFAULT_LOOK_BACK_WINDOW, + DEFAULT_STATUS_CHANGE_THRESHOLD, + DEFAULT_QUERY_DELAY, + DEFAULT_SERVERLESS_QUERY_DELAY, + DEFAULT_FLAPPING_SETTINGS, + DISABLE_FLAPPING_SETTINGS, + DEFAULT_QUERY_DELAY_SETTINGS, + DEFAULT_SERVERLESS_QUERY_DELAY_SETTINGS, +} from './rules_settings'; +export type { RuleType, ActionGroup, ActionGroupIdsOf } from './rule_type'; +export { validateBackfillSchedule } from './lib'; export type { ThrottledActions, LastScheduledActions, @@ -23,22 +103,76 @@ export type { RuleTaskState, RuleTaskParams, } from '@kbn/alerting-state-types'; -export type { AlertingFrameworkHealth, Flapping } from '@kbn/alerting-types'; -export * from './alert_summary'; -export * from './builtin_action_groups'; -export * from './bulk_edit'; -export * from './disabled_action_groups'; -export * from './rule_notify_when_type'; -export * from './parse_duration'; -export * from './execution_log_types'; -export * from './rule_snooze_type'; -export * from './rrule_type'; -export * from './rule_tags_aggregation'; -export * from './iso_weekdays'; -export * from './saved_objects/rules/mappings'; -export * from './rule_circuit_breaker_error_message'; -export * from './maintenance_window_scoped_query_error_message'; -export * from './action_ref_prefix'; +export type { + RuleStatusValues, + AlertStatusValues, + ExecutionDuration, + AlertSummary, + AlertStatus, +} from './alert_summary'; +export type { + ReservedActionGroups, + WithoutReservedActionGroups, + RecoveredActionGroupId, + DefaultActionGroupId, +} from './builtin_action_groups'; +export { getBuiltinActionGroups, RecoveredActionGroup } from './builtin_action_groups'; +export type { BulkEditSkipReason, BulkActionSkipResult } from './bulk_edit'; +export { + DisabledActionTypeIdsForActionGroup, + isActionGroupDisabledForActionTypeId, +} from './disabled_action_groups'; +export type { RuleNotifyWhenType } from './rule_notify_when_type'; +export { + validateNotifyWhenType, + RuleNotifyWhenTypeValues, + RuleNotifyWhen, +} from './rule_notify_when_type'; +export { + parseDuration, + formatDuration, + convertDurationToFrequency, + getDurationNumberInItsUnit, + getDurationUnitValue, + validateDurationSchema, +} from './parse_duration'; +export type { + ExecutionLogSortFields, + ActionErrorLogSortFields, + IExecutionLog, + IExecutionErrors, + IExecutionErrorsResult, + IExecutionLogResult, + IExecutionKPIResult, +} from './execution_log_types'; +export { + executionLogSortableColumns, + actionErrorLogSortableColumns, + EMPTY_EXECUTION_KPI_RESULT, +} from './execution_log_types'; +export type { RuleSnoozeSchedule, RuleSnooze } from './rule_snooze_type'; +export type { RRuleParams, RRuleRecord } from './rrule_type'; +export type { + RuleTagsAggregationOptions, + RuleTagsAggregationFormattedResult, + RuleTagsAggregationResult, +} from './rule_tags_aggregation'; +export { getRuleTagsAggregation, formatRuleTagsAggregationResult } from './rule_tags_aggregation'; +export type { IsoWeekday } from './iso_weekdays'; +export { ISO_WEEKDAYS } from './iso_weekdays'; +export { alertMappings } from './saved_objects/rules/mappings'; +export { + getRuleCircuitBreakerErrorMessage, + parseRuleCircuitBreakerErrorMessage, +} from './rule_circuit_breaker_error_message'; +export { + getScopedQueryErrorMessage, + isScopedQueryError, +} from './maintenance_window_scoped_query_error_message'; +export { + preconfiguredConnectorActionRefPrefix, + systemConnectorActionRefPrefix, +} from './action_ref_prefix'; export type { MaintenanceWindowModificationMetadata, diff --git a/x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/alert_conflict_resolver.ts b/x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/alert_conflict_resolver.ts index aa7aab6feda3c..549ddd747c902 100644 --- a/x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/alert_conflict_resolver.ts +++ b/x-pack/platform/plugins/shared/alerting/server/alerts_client/lib/alert_conflict_resolver.ts @@ -161,6 +161,7 @@ async function refreshFieldsInDocs( // @ts-expect-error @elastic/elasticsearch _source is not in the type! const freshDoc = freshResponse._source; + // eslint-disable-next-line @typescript-eslint/no-explicit-any const conflictDoc = conflictRequest.doc as Record; if (!freshDoc || !conflictDoc) continue; diff --git a/x-pack/platform/plugins/shared/alerting/server/alerts_service/alerts_service.test.ts b/x-pack/platform/plugins/shared/alerting/server/alerts_service/alerts_service.test.ts index abf1d3d6c4307..71285471c363e 100644 --- a/x-pack/platform/plugins/shared/alerting/server/alerts_service/alerts_service.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/alerts_service/alerts_service.test.ts @@ -2080,11 +2080,13 @@ describe('Alerts Service', () => { // leverage the outcome of the first retry expect( logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any (calls: any[]) => calls[0] === `Retrying resource initialization for context "test"` ).length ).toEqual(1); expect( logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any (calls: any[]) => calls[0] === `Resource installation for "test" succeeded after retry` ).length @@ -2157,6 +2159,7 @@ describe('Alerts Service', () => { // Should only log the retry once because the second and third retries should be throttled expect( logger.info.mock.calls.filter( + // eslint-disable-next-line @typescript-eslint/no-explicit-any (calls: any[]) => calls[0] === `Retrying resource initialization for context "test"` ).length ).toEqual(1); diff --git a/x-pack/platform/plugins/shared/alerting/server/alerts_service/lib/retry_transient_es_errors.test.ts b/x-pack/platform/plugins/shared/alerting/server/alerts_service/lib/retry_transient_es_errors.test.ts index 3a59b07556f9b..d6800264b6eb3 100644 --- a/x-pack/platform/plugins/shared/alerting/server/alerts_service/lib/retry_transient_es_errors.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/alerts_service/lib/retry_transient_es_errors.test.ts @@ -67,15 +67,19 @@ describe('retryTransientErrors', () => { new EsErrors.NoLivingConnectionsError('no living connection', { warnings: [], + // eslint-disable-next-line @typescript-eslint/no-explicit-any meta: {} as any, }), new EsErrors.ConnectionError('no connection'), new EsErrors.TimeoutError('timeout'), + // eslint-disable-next-line @typescript-eslint/no-explicit-any new EsErrors.ResponseError({ statusCode: 503, meta: {} as any, warnings: [] }), + // eslint-disable-next-line @typescript-eslint/no-explicit-any new EsErrors.ResponseError({ statusCode: 408, meta: {} as any, warnings: [] }), + // eslint-disable-next-line @typescript-eslint/no-explicit-any new EsErrors.ResponseError({ statusCode: 410, meta: {} as any, warnings: [] }), ]; diff --git a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts index 1762a5152286f..45d6fbc0a1eba 100644 --- a/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { schema } from '@kbn/config-schema'; import { omit } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; diff --git a/x-pack/platform/plugins/shared/alerting/server/lib/monitoring.test.ts b/x-pack/platform/plugins/shared/alerting/server/lib/monitoring.test.ts index 8fc4e9f231139..210620ba21001 100644 --- a/x-pack/platform/plugins/shared/alerting/server/lib/monitoring.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/lib/monitoring.test.ts @@ -162,6 +162,7 @@ describe('convertMonitoringFromRawAndVerify', () => { debug: mockLoggerDebug, }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any const result = convertMonitoringFromRawAndVerify(mockLogger as any, '123', monitoring); expect(mockLoggerDebug).toHaveBeenCalledWith( 'invalid monitoring last_run.timestamp "invalid" in raw rule 123' diff --git a/x-pack/platform/plugins/shared/alerting/server/lib/rule_execution_status.test.ts b/x-pack/platform/plugins/shared/alerting/server/lib/rule_execution_status.test.ts index a9bd4f263ee01..bad1ba413f782 100644 --- a/x-pack/platform/plugins/shared/alerting/server/lib/rule_execution_status.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/lib/rule_execution_status.test.ts @@ -444,6 +444,7 @@ describe('RuleExecutionStatus', () => { }); }); +// eslint-disable-next-line @typescript-eslint/no-explicit-any function checkDateIsNearNow(date: any) { expect(date instanceof Date).toBe(true); // allow for lots of slop in the time difference diff --git a/x-pack/platform/plugins/shared/alerting/server/plugin.test.ts b/x-pack/platform/plugins/shared/alerting/server/plugin.test.ts index d9d7feab2227e..bfc8b3ef8b7b8 100644 --- a/x-pack/platform/plugins/shared/alerting/server/plugin.test.ts +++ b/x-pack/platform/plugins/shared/alerting/server/plugin.test.ts @@ -185,6 +185,7 @@ describe('Alerting Plugin', () => { setup.registerType({ ...sampleRuleType, + // eslint-disable-next-line @typescript-eslint/no-explicit-any minimumLicenseRequired: 'foo' as any, }) ).toThrowErrorMatchingInlineSnapshot(`"\\"foo\\" is not a valid license type"`); diff --git a/x-pack/platform/plugins/shared/alerting/server/rules_client/common/index.ts b/x-pack/platform/plugins/shared/alerting/server/rules_client/common/index.ts index 6f8835d0c7260..a695e0a8bd6e9 100644 --- a/x-pack/platform/plugins/shared/alerting/server/rules_client/common/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/rules_client/common/index.ts @@ -12,14 +12,36 @@ export { retryIfBulkOperationConflicts } from './retry_if_bulk_operation_conflic export { applyBulkEditOperation } from './apply_bulk_edit_operation'; export { buildKueryNodeFilter } from './build_kuery_node_filter'; export { generateAPIKeyName } from './generate_api_key_name'; -export * from './mapped_params_utils'; +export { + MAPPED_PARAMS_PROPERTIES, + getMappedParams, + getModifiedFilter, + getModifiedField, + getModifiedSearchFields, + getModifiedValue, + getModifiedSearch, + modifyFilterKueryNode, +} from './mapped_params_utils'; export { apiKeyAsAlertAttributes, apiKeyAsRuleDomainProperties, } from './api_key_as_alert_attributes'; -export * from './inject_references'; +export { injectReferencesIntoActions, injectReferencesIntoParams } from './inject_references'; export { parseDate } from './parse_date'; export { includeFieldsRequiredForAuthentication } from './include_fields_required_for_authentication'; export { getAndValidateCommonBulkOptions } from './get_and_validate_common_bulk_options'; -export * from './snooze_utils'; +export { + getSnoozeAttributes, + getBulkSnooze, + getUnsnoozeAttributes, + getBulkUnsnooze, + clearUnscheduledSnoozeAttributes, + clearUnscheduledSnooze, + clearScheduledSnoozesAttributesById, + clearScheduledSnoozesById, + clearCurrentActiveSnoozeAttributes, + clearCurrentActiveSnooze, + verifySnoozeAttributeScheduleLimit, + verifySnoozeScheduleLimit, +} from './snooze_utils'; export { tryToRemoveTasks } from './try_to_remove_tasks'; diff --git a/x-pack/platform/plugins/shared/alerting/server/rules_client/tests/lib.ts b/x-pack/platform/plugins/shared/alerting/server/rules_client/tests/lib.ts index d1ed758c021e6..2a97b7deab05c 100644 --- a/x-pack/platform/plugins/shared/alerting/server/rules_client/tests/lib.ts +++ b/x-pack/platform/plugins/shared/alerting/server/rules_client/tests/lib.ts @@ -24,6 +24,7 @@ export function setGlobalDate() { // A version of date that responds to `new Date(null|undefined)` and `Date.now()` // by returning a fixed date, otherwise should be same as Date. + // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).Date = class Date { constructor(...args: unknown[]) { // sometimes the ctor has no args, sometimes has a single `null` arg diff --git a/x-pack/platform/plugins/shared/alerting/server/saved_objects/migrations/8.6/index.ts b/x-pack/platform/plugins/shared/alerting/server/saved_objects/migrations/8.6/index.ts index 5c42e2f65b52e..b3d362fc4dd77 100644 --- a/x-pack/platform/plugins/shared/alerting/server/saved_objects/migrations/8.6/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/saved_objects/migrations/8.6/index.ts @@ -60,6 +60,7 @@ const getMonitoring = (attributes: RawRule) => { const { lastExecutionDate, lastDuration } = executionStatus; + // eslint-disable-next-line @typescript-eslint/no-explicit-any const monitoringExecution = (monitoring as any).execution; return { diff --git a/x-pack/platform/plugins/shared/alerting/server/task_runner/action_scheduler/test_fixtures.ts b/x-pack/platform/plugins/shared/alerting/server/task_runner/action_scheduler/test_fixtures.ts index 1ae9c6336f141..07c34c83cba3f 100644 --- a/x-pack/platform/plugins/shared/alerting/server/task_runner/action_scheduler/test_fixtures.ts +++ b/x-pack/platform/plugins/shared/alerting/server/task_runner/action_scheduler/test_fixtures.ts @@ -178,6 +178,7 @@ export const getDefaultSchedulerContext = < alertingEventLoggerMock: jest.Mocked, actionsClientMock: jest.Mocked>, + // eslint-disable-next-line @typescript-eslint/no-explicit-any alertsClientMock: jest.Mocked ) => ({ rule: getRule(), diff --git a/x-pack/platform/plugins/shared/alerting/server/test_utils/index.ts b/x-pack/platform/plugins/shared/alerting/server/test_utils/index.ts index fe2cf8ee0bc07..c8b0c98eb7f4a 100644 --- a/x-pack/platform/plugins/shared/alerting/server/test_utils/index.ts +++ b/x-pack/platform/plugins/shared/alerting/server/test_utils/index.ts @@ -28,6 +28,7 @@ export function resolvable(): Promise & Resolvable { // Used to convert a raw Rule's UUID to something that can be used // to compare with a jest snapshot. +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function alertWithAnyUUID(rawAlert: Record): Record { if (!rawAlert?.meta?.uuid) return rawAlert; @@ -37,6 +38,7 @@ export function alertWithAnyUUID(rawAlert: Record): Record ): Record { const newAlerts: Record = {}; diff --git a/x-pack/platform/plugins/shared/dashboard_enhanced/common/index.ts b/x-pack/platform/plugins/shared/dashboard_enhanced/common/index.ts index 35d241f19a443..855eb95c4d175 100644 --- a/x-pack/platform/plugins/shared/dashboard_enhanced/common/index.ts +++ b/x-pack/platform/plugins/shared/dashboard_enhanced/common/index.ts @@ -7,4 +7,5 @@ // TODO: https://github.com/elastic/kibana/issues/110897 -export * from './drilldowns'; +export type { DashboardDrilldownConfig } from './drilldowns'; +export { createExtract, createInject, EMBEDDABLE_TO_DASHBOARD_DRILLDOWN } from './drilldowns'; diff --git a/x-pack/platform/plugins/shared/dataset_quality/public/components/common/index.ts b/x-pack/platform/plugins/shared/dataset_quality/public/components/common/index.ts index 3769cbedb6c0a..6131f7d57de51 100644 --- a/x-pack/platform/plugins/shared/dataset_quality/public/components/common/index.ts +++ b/x-pack/platform/plugins/shared/dataset_quality/public/components/common/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export * from './integration_icon'; -export * from './insufficient_privileges'; +export { IntegrationIcon } from './integration_icon'; +export { PrivilegesWarningIconWrapper } from './insufficient_privileges'; diff --git a/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.test.ts b/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.test.ts index 1d8105d2be49b..5944155430b90 100644 --- a/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.test.ts +++ b/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.test.ts @@ -627,6 +627,7 @@ describe('createDataStream', () => { test(`shouldn't throw when an error of type resource_already_exists_exception is thrown`, async () => { // ElasticsearchError can be a bit random in shape, we need an any here + // eslint-disable-next-line @typescript-eslint/no-explicit-any const err = new Error('Already exists') as any; err.body = { error: { diff --git a/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.ts b/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.ts index 1eb0f482e1d0b..7076336c0c760 100644 --- a/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.ts +++ b/x-pack/platform/plugins/shared/event_log/server/es/cluster_client_adapter.ts @@ -93,6 +93,7 @@ type GetQueryBodyWithAuthFilterOpts = }) | AggregateEventsWithAuthFilter; +// eslint-disable-next-line @typescript-eslint/no-explicit-any type AliasAny = any; const LEGACY_ID_CUTOFF_VERSION = '8.0.0'; diff --git a/x-pack/platform/plugins/shared/index_management/common/index.ts b/x-pack/platform/plugins/shared/index_management/common/index.ts index 61bdeb6007ef6..d16be3b4ccc05 100644 --- a/x-pack/platform/plugins/shared/index_management/common/index.ts +++ b/x-pack/platform/plugins/shared/index_management/common/index.ts @@ -11,4 +11,31 @@ export { API_BASE_PATH, INTERNAL_API_BASE_PATH, BASE_PATH, MAJOR_VERSION } from export { getTemplateParameter, splitSizeAndUnits } from './lib'; -export * from './types'; +export type { + Aliases, + Index, + IndexSettings, + IndexSettingsResponse, + Mappings, + TemplateSerialized, + TemplateDeserialized, + TemplateType, + TemplateFromEs, + TemplateListItem, + LegacyTemplateSerialized, + EnhancedDataStreamFromEs, + Health, + DataStream, + DataStreamIndex, + DataRetention, + IndexMode, + ComponentTemplateSerialized, + ComponentTemplateDeserialized, + ComponentTemplateFromEs, + ComponentTemplateListItem, + ComponentTemplateDatastreams, + ComponentTemplateMeta, + FieldItem, + IndexWithFields, + FieldFromIndicesRequest, +} from './types'; diff --git a/x-pack/platform/plugins/shared/logs_shared/common/index.ts b/x-pack/platform/plugins/shared/logs_shared/common/index.ts index fab9fa213790d..dd3abb9d11b66 100644 --- a/x-pack/platform/plugins/shared/logs_shared/common/index.ts +++ b/x-pack/platform/plugins/shared/logs_shared/common/index.ts @@ -43,7 +43,40 @@ export { ResolveLogViewError, } from './log_views/errors'; -export * from './log_entry'; +export type { + LogEntryTime, + LogMessageConstantPart, + LogMessageFieldPart, + LogMessagePart, + LogTimestampColumn, + LogFieldColumn, + LogMessageColumn, + LogColumn, + LogEntryContext, + LogEntryField, + LogEntry, + LogEntryCursor, + LogEntryBeforeCursor, + LogEntryAfterCursor, + LogEntryAroundCursor, +} from './log_entry'; +export { + logMessageConstantPartRT, + logMessageFieldPartRT, + logMessagePartRT, + logTimestampColumnRT, + logFieldColumnRT, + logMessageColumnRT, + logColumnRT, + logEntryContextRT, + logEntryFieldRT, + logEntryRT, + logEntryCursorRT, + logEntryBeforeCursorRT, + logEntryAfterCursorRT, + logEntryAroundCursorRT, + getLogEntryCursorFromHit, +} from './log_entry'; export { convertISODateToNanoPrecision } from './utils'; diff --git a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/common/index.ts b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/common/index.ts index d94035b20cb43..4f9ff3cba360f 100644 --- a/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/common/index.ts +++ b/x-pack/platform/plugins/shared/ml/public/application/jobs/new_job/common/index.ts @@ -5,6 +5,26 @@ * 2.0. */ -export * from './index_pattern_context'; -export * from './job_creator'; -export * from './job_runner'; +export type { IndexPatternContextValue } from './index_pattern_context'; +export { IndexPatternContext } from './index_pattern_context'; +export type { JobCreatorType } from './job_creator'; +export { + JobCreator, + SingleMetricJobCreator, + MultiMetricJobCreator, + PopulationJobCreator, + AdvancedJobCreator, + CategorizationJobCreator, + RareJobCreator, + GeoJobCreator, + isSingleMetricJobCreator, + isMultiMetricJobCreator, + isPopulationJobCreator, + isAdvancedJobCreator, + isCategorizationJobCreator, + isRareJobCreator, + isGeoJobCreator, + jobCreatorFactory, +} from './job_creator'; +export type { ProgressSubscriber } from './job_runner'; +export { JobRunner } from './job_runner'; diff --git a/x-pack/platform/plugins/shared/rule_registry/server/index.ts b/x-pack/platform/plugins/shared/rule_registry/server/index.ts index 46a7193284405..fc4726871e880 100644 --- a/x-pack/platform/plugins/shared/rule_registry/server/index.ts +++ b/x-pack/platform/plugins/shared/rule_registry/server/index.ts @@ -10,22 +10,52 @@ import { PluginInitializerContext } from '@kbn/core/server'; export type { RuleRegistryPluginSetupContract, RuleRegistryPluginStartContract } from './plugin'; -export type { IRuleDataService, RuleDataPluginService } from './rule_data_plugin_service'; -export { RuleDataClient } from './rule_data_client'; -export type { IRuleDataClient } from './rule_data_client/types'; export type { RacRequestHandlerContext, RacApiRequestHandlerContext, AlertTypeWithExecutor, } from './types'; -export * from './config'; -export * from './rule_data_plugin_service'; -export * from './rule_data_client'; -export * from './alert_data_client/audit_events'; +export type { RuleRegistryPluginConfig } from './config'; +export { config, INDEX_PREFIX } from './config'; +export type { + IRuleDataService, + RuleDataPluginService, + IndexOptions, + Settings, + Mappings, + Version, + Meta, + ComponentTemplateOptions, + IndexTemplateOptions, + IlmPolicyOptions, +} from './rule_data_plugin_service'; +export { + RuleDataService, + Dataset, + RuleDataWriteDisabledError, + RuleDataWriterInitializationError, +} from './rule_data_plugin_service'; +export type { RuleDataClientConstructorOptions, WaitResult } from './rule_data_client'; +export type { IRuleDataClient, IRuleDataReader, IRuleDataWriter } from './rule_data_client/types'; +export { RuleDataClient } from './rule_data_client'; +export type { AlertAuditEventParams } from './alert_data_client/audit_events'; +export { + AlertAuditAction, + operationAlertAuditActionMap, + alertAuditEvent, +} from './alert_data_client/audit_events'; export { createPersistenceRuleTypeWrapper } from './utils/create_persistence_rule_type_wrapper'; -export * from './utils/persistence_types'; +export type { + PersistenceAlertService, + SuppressedAlertService, + SuppressedAlertServiceResult, + PersistenceAlertServiceResult, + PersistenceServices, + PersistenceAlertType, + CreatePersistenceRuleTypeWrapper, +} from './utils/persistence_types'; export type { AlertsClient } from './alert_data_client/alerts_client'; export const plugin = async (initContext: PluginInitializerContext) => { diff --git a/x-pack/platform/plugins/shared/stack_alerts/common/build_sorted_events_query.test.ts b/x-pack/platform/plugins/shared/stack_alerts/common/build_sorted_events_query.test.ts index fa2a6ebf3c4ec..0aa94e319b430 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/common/build_sorted_events_query.test.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/common/build_sorted_events_query.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { buildSortedEventsQuery, BuildSortedEventsQuery } from './build_sorted_events_query'; +import { buildSortedEventsQuery, type BuildSortedEventsQuery } from './build_sorted_events_query'; import type { Writable } from '@kbn/utility-types'; const DefaultQuery: Writable> = { @@ -18,13 +18,13 @@ const DefaultQuery: Writable> = { }; describe('buildSortedEventsQuery', () => { - let query: any; + let query: Partial; beforeEach(() => { query = { ...DefaultQuery }; }); test('it builds a filter with given date range', () => { - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -73,7 +73,7 @@ describe('buildSortedEventsQuery', () => { test('it does not include searchAfterSortId if it is an empty string', () => { query.searchAfterSortId = ''; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -123,7 +123,7 @@ describe('buildSortedEventsQuery', () => { test('it includes searchAfterSortId if it is a valid string', () => { const sortId = '123456789012'; query.searchAfterSortId = sortId; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -174,7 +174,7 @@ describe('buildSortedEventsQuery', () => { test('it includes searchAfterSortId if it is a valid number', () => { const sortId = 123456789012; query.searchAfterSortId = sortId; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -230,7 +230,7 @@ describe('buildSortedEventsQuery', () => { }, }, }; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -286,7 +286,7 @@ describe('buildSortedEventsQuery', () => { test('it uses sortOrder if specified', () => { query.sortOrder = 'desc'; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, @@ -335,7 +335,7 @@ describe('buildSortedEventsQuery', () => { test('it uses track_total_hits if specified', () => { query.track_total_hits = true; - expect(buildSortedEventsQuery(query)).toEqual({ + expect(buildSortedEventsQuery(query as BuildSortedEventsQuery)).toEqual({ allow_no_indices: true, index: ['index-name'], size: 100, diff --git a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/es_query_expression.test.tsx b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/es_query_expression.test.tsx index 30854c1e5a2d1..45447d58726f4 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/es_query_expression.test.tsx +++ b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/es_query_expression.test.tsx @@ -31,9 +31,11 @@ jest.mock('@kbn/kibana-react-plugin/public', () => { jest.mock('@kbn/code-editor', () => ({ // Mocking CodeEditor + // eslint-disable-next-line @typescript-eslint/no-explicit-any CodeEditor: (props: any) => ( { props.onChange(syntheticEvent.jsonString); }} @@ -98,6 +100,7 @@ jest.mock('@kbn/triggers-actions-ui-plugin/public', () => { const createDataPluginMock = () => { const dataMock = dataPluginMock.createStartContract() as DataPublicPluginStart & { + // eslint-disable-next-line @typescript-eslint/no-explicit-any search: ISearchStart & { search: jest.MockedFunction }; }; return dataMock; diff --git a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/expression.test.tsx b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/expression.test.tsx index 61be0eb0d6a32..6635c4c4cacf6 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/expression.test.tsx +++ b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/expression/expression.test.tsx @@ -34,9 +34,11 @@ jest.mock('@kbn/code-editor', () => { ...original, // Mocking CodeEditor + // eslint-disable-next-line @typescript-eslint/no-explicit-any CodeEditor: (props: any) => ( { props.onChange(syntheticEvent.jsonString); }} diff --git a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/util.test.ts b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/util.test.ts index af39efd4b799c..f2d6e6abe250f 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/util.test.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/public/rule_types/es_query/util.test.ts @@ -185,11 +185,13 @@ describe('Es Query utils', () => { }); test('should return an empty array if raw runtime fields are malformed JSON', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const rawFields: any = null; expect(convertRawRuntimeFieldtoFieldOption(rawFields)).toEqual([]); }); test('should not return FieldOption if raw runtime fields do not include the type', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const rawFields: any = { day_of_week: { test: 'keyword', diff --git a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/es_query/rule_type_params.test.ts b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/es_query/rule_type_params.test.ts index 08ebf72059044..1d7583f0e5ef7 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/es_query/rule_type_params.test.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/es_query/rule_type_params.test.ts @@ -28,6 +28,7 @@ const DefaultParams: Writable> = { }; describe('ruleType Params validate()', () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any let params: any; beforeEach(() => { params = { ...DefaultParams }; diff --git a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/get_entities_and_generate_alerts.test.ts b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/get_entities_and_generate_alerts.test.ts index c6be3503d93f0..c434e4ee30efb 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/get_entities_and_generate_alerts.test.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/get_entities_and_generate_alerts.test.ts @@ -23,6 +23,7 @@ describe('getEntitiesAndGenerateAlerts', () => { instanceId: id, }); }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; beforeEach(() => { diff --git a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts index 4a40e20ed4774..af5e20b9f9b02 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts @@ -10,6 +10,7 @@ import type { GeoContainmentAlertInstanceState } from '../types'; // Flatten agg results and get latest locations for each entity export function transformResults( + // eslint-disable-next-line @typescript-eslint/no-explicit-any results: any, dateField: string, geoField: string diff --git a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/index_threshold/rule_type_params.test.ts b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/index_threshold/rule_type_params.test.ts index b0047064f8f82..c4dd8f2149255 100644 --- a/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/index_threshold/rule_type_params.test.ts +++ b/x-pack/platform/plugins/shared/stack_alerts/server/rule_types/index_threshold/rule_type_params.test.ts @@ -25,6 +25,7 @@ const DefaultParams: Writable> = { describe('ruleType Params validate()', () => { runTests(ParamsSchema, DefaultParams); + // eslint-disable-next-line @typescript-eslint/no-explicit-any let params: any; beforeEach(() => { params = { ...DefaultParams }; @@ -80,6 +81,7 @@ describe('ruleType Params validate()', () => { }); export function runTests(schema: ObjectType, defaultTypeParams: Record): void { + // eslint-disable-next-line @typescript-eslint/no-explicit-any let params: any; const CoreDefaultParams: Writable> = { diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/cases_webhook/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/cases_webhook/index.ts index ccd777634ec37..7afe695b74e8f 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/cases_webhook/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/cases_webhook/index.ts @@ -10,7 +10,7 @@ import type { ActionTypeExecutorOptions as ConnectorTypeExecutorOptions, ActionTypeExecutorResult as ConnectorTypeExecutorResult, } from '@kbn/actions-plugin/server/types'; -import { CasesConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config'; +import { CasesConnectorFeatureId } from '@kbn/actions-plugin/common'; import { CasesWebhookActionParamsType, CasesWebhookExecutorResultData, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/d3security/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/d3security/index.ts index 4e98938335808..e1509162eb279 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/d3security/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/d3security/index.ts @@ -9,11 +9,8 @@ import { SubActionConnectorType, ValidatorType, } from '@kbn/actions-plugin/server/sub_action_framework/types'; -import { - AlertingConnectorFeatureId, - SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; import { urlAllowListValidator } from '@kbn/actions-plugin/server'; +import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { D3SecurityConfigSchema, D3SecuritySecretsSchema } from '../../../common/d3security/schema'; import { renderParameterTemplates } from './render'; import { D3SecurityConnector } from './d3security'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/index.ts index 3a1d01732eb7d..6a6f5444312a9 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/index.ts @@ -21,7 +21,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/connector_feature_config'; +} from '@kbn/actions-plugin/common'; import { withoutMustacheTemplate } from '@kbn/actions-plugin/common'; import { renderMustacheObject, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/send_email.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/send_email.ts index 3c9b2c8ceea68..6f196938df570 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/send_email.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/email/send_email.ts @@ -237,6 +237,7 @@ function getTransportConfig( ) { const { service, host, port, secure, user, password } = transport; + // eslint-disable-next-line @typescript-eslint/no-explicit-any const transportConfig: Record = {}; const proxySettings = configurationUtilities.getProxySettings(); const generalSSLSettings = configurationUtilities.getSSLSettings(); diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/es_index/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/es_index/index.ts index 915a66568c20e..9dd6a4c71ae21 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/es_index/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/es_index/index.ts @@ -8,24 +8,22 @@ import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; import { schema, TypeOf } from '@kbn/config-schema'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import type { ActionType as ConnectorType, ActionTypeExecutorOptions as ConnectorTypeExecutorOptions, ActionTypeExecutorResult as ConnectorTypeExecutorResult, } from '@kbn/actions-plugin/server/types'; import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer'; -import { - AlertingConnectorFeatureId, - UptimeConnectorFeatureId, - SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; import { AlertHistoryEsIndexConnectorId, ALERT_HISTORY_PREFIX, buildAlertHistoryDocument, + AlertingConnectorFeatureId, + UptimeConnectorFeatureId, + SecurityConnectorFeatureId, } from '@kbn/actions-plugin/common'; -import { +import type { BulkOperationType, BulkResponseItem, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/gemini/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/gemini/index.ts index d8add7df88177..6029c3f75c183 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/gemini/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/gemini/index.ts @@ -17,7 +17,7 @@ import { import { urlAllowListValidator } from '@kbn/actions-plugin/server'; import { ValidatorServices } from '@kbn/actions-plugin/server/types'; import { assertURL } from '@kbn/actions-plugin/server/sub_action_framework/helpers/validators'; -import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config'; +import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { GEMINI_CONNECTOR_ID, GEMINI_TITLE } from '../../../common/gemini/constants'; import { ConfigSchema, SecretsSchema } from '../../../common/gemini/schema'; import { Config, Secrets } from '../../../common/gemini/types'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/helpers.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/helpers.ts index fe198b5f4f550..58c7e1d97acad 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/helpers.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/helpers.ts @@ -94,6 +94,7 @@ export function chunksIntoMessage(obs$: Observable) }, ], object: 'chat.completion', + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any ), last(), @@ -102,6 +103,7 @@ export function chunksIntoMessage(obs$: Observable) if (concatenatedChunk.choices[0].message.content === '') { concatenatedChunk.choices[0].message.content = null; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any concatenatedChunk.choices[0].message.tool_calls?.forEach((toolCall: any) => { if (toolCall.function?.arguments?.trim() === '') { toolCall.function.arguments = '{}'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/index.ts index d781cd6b90891..2cdad7d23197a 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/index.ts @@ -15,7 +15,7 @@ import { GenerativeAIForSecurityConnectorFeatureId, } from '@kbn/actions-plugin/common'; import { ValidatorServices } from '@kbn/actions-plugin/server/types'; -import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config'; +import { GenerativeAIForObservabilityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { InferenceTaskType } from '@elastic/elasticsearch/lib/api/types'; import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/inference.test.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/inference.test.ts index d032c56773e32..5284009189c51 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/inference.test.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/inference/inference.test.ts @@ -237,6 +237,7 @@ describe('InferenceConnector', () => { }); streamMock.complete(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any mockEsClient.inference.inference.mockResolvedValue(streamMock.transform as any); }; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/index.ts index 1481ab8601fa6..08360bdb16b38 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/index.ts @@ -17,7 +17,7 @@ import { CasesConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { validate } from './validators'; import { ExternalIncidentServiceConfigurationSchema, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/types.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/types.ts index 3c043cfdce0fe..117aab796d36a 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/types.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/jira/types.ts @@ -36,7 +36,9 @@ export interface ExternalServiceCredentials { } export interface ExternalServiceValidation { + // eslint-disable-next-line @typescript-eslint/no-explicit-any config: (configObject: any, validatorServices: ValidatorServices) => void; + // eslint-disable-next-line @typescript-eslint/no-explicit-any secrets: (secrets: any, validatorServices: ValidatorServices) => void; } diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/mocks.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/mocks.ts index ee2c2e7e23b4c..e49f95e9af89b 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/mocks.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/mocks.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { AxiosResponse } from 'axios'; import { SubActionConnector } from '@kbn/actions-plugin/server'; import { SubActionRequestParams } from '@kbn/actions-plugin/server/sub_action_framework/types'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/servicenow/types.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/servicenow/types.ts index 3d52a888edb92..7cecf0bcddb46 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/servicenow/types.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/lib/servicenow/types.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { AxiosError, AxiosInstance, AxiosResponse } from 'axios'; import { TypeOf } from '@kbn/config-schema'; import { Logger } from '@kbn/core/server'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/microsoft_defender_endpoint/mocks.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/microsoft_defender_endpoint/mocks.ts index f29065d890181..cda0072cfa17b 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/microsoft_defender_endpoint/mocks.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/microsoft_defender_endpoint/mocks.ts @@ -28,6 +28,7 @@ import { export interface CreateMicrosoftDefenderConnectorMockResponse { options: ServiceParams; + // eslint-disable-next-line @typescript-eslint/no-explicit-any apiMock: { [msApiRoute: string]: (...args: any) => any | Promise }; instanceMock: ConnectorInstanceMock; usageCollector: ConnectorUsageCollector; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/pagerduty/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/pagerduty/index.ts index 15d72d78a511b..e0b56bbb369ca 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/pagerduty/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/pagerduty/index.ts @@ -19,7 +19,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { postPagerduty } from './post_pagerduty'; import { convertTimestamp } from '../lib/convert_timestamp'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/resilient/types.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/resilient/types.ts index a48d6668aa2c5..47f23532dce16 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/resilient/types.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/resilient/types.ts @@ -21,7 +21,9 @@ export interface ExternalServiceCredentials { } export interface ExternalServiceValidation { + // eslint-disable-next-line @typescript-eslint/no-explicit-any config: (configObject: any, validatorServices: ValidatorServices) => void; + // eslint-disable-next-line @typescript-eslint/no-explicit-any secrets: (secrets: any, validatorServices: ValidatorServices) => void; } diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/sentinelone/mocks.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/sentinelone/mocks.ts index fb4dd05c01b2a..3012f37f13241 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/sentinelone/mocks.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/sentinelone/mocks.ts @@ -170,6 +170,7 @@ class SentinelOneConnectorTestClass extends SentinelOneConnector { downloadRemoteScriptResults: Readable.from(['test']), }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any public requestSpy = jest.fn(async ({ url }: SubActionRequestParams) => { const response = createAxiosResponseMock({}); diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/server_log/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/server_log/index.ts index 0275b2bdc2f3f..d0c9f616ee1d8 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/server_log/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/server_log/index.ts @@ -18,7 +18,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/connector_feature_config'; +} from '@kbn/actions-plugin/common'; import { withoutControlCharacters } from '../lib/string_utils'; export type ServerLogConnectorType = ConnectorType<{}, {}, ActionParamsType>; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itom/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itom/index.ts index d32f52cd698ee..37b013bca258e 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itom/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itom/index.ts @@ -12,10 +12,7 @@ import type { ActionTypeExecutorOptions as ConnectorTypeExecutorOptions, ActionTypeExecutorResult as ConnectorTypeExecutorResult, } from '@kbn/actions-plugin/server/types'; -import { - AlertingConnectorFeatureId, - SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { validate } from '../lib/servicenow/validators'; import { ExecutorParamsSchemaITOM, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itsm/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itsm/index.ts index 6ab6bc389ac7a..6b00e2975f2fd 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itsm/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_itsm/index.ts @@ -18,7 +18,7 @@ import { CasesConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { validate } from '../lib/servicenow/validators'; import { ExecutorParamsSchemaITSM, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_sir/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_sir/index.ts index 8d842c6e6fccf..4b21b93817711 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_sir/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/servicenow_sir/index.ts @@ -17,7 +17,7 @@ import { AlertingConnectorFeatureId, CasesConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { validate } from '../lib/servicenow/validators'; import { ExecutorParamsSchemaSIR, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack/index.ts index 5ba6318f79a07..7ecd5f7a4ee26 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack/index.ts @@ -25,7 +25,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer'; import { getCustomAgents } from '@kbn/actions-plugin/server/lib/get_custom_agents'; import { TaskErrorSource } from '@kbn/task-manager-plugin/common'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack_api/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack_api/index.ts index b816a1b014678..9009f3101ee1a 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack_api/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/slack_api/index.ts @@ -10,7 +10,7 @@ import { UptimeConnectorFeatureId, AlertingConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { Logger } from '@kbn/core/server'; import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer'; import type { ValidatorServices } from '@kbn/actions-plugin/server/types'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/index.ts index bbe53e86e068e..95f4252cda948 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/index.ts @@ -15,7 +15,7 @@ import { AlertingConnectorFeatureId, CasesConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { SwimlaneExecutorResultData, SwimlanePublicConfigurationType, diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/types.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/types.ts index b2af67e332b7b..57f48cf9d2e68 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/types.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/swimlane/types.ts @@ -29,7 +29,9 @@ export interface ExternalServiceCredentials { } export interface ExternalServiceValidation { + // eslint-disable-next-line @typescript-eslint/no-explicit-any config: (configObject: any, validatorServices: ValidatorServices) => void; + // eslint-disable-next-line @typescript-eslint/no-explicit-any secrets: (secrets: any, validatorServices: ValidatorServices) => void; } diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/teams/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/teams/index.ts index 9ab0fe4d428d7..1062277cc1afa 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/teams/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/teams/index.ts @@ -23,7 +23,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { getRetryAfterIntervalFromHeaders } from '../lib/http_response_retry_header'; import { isOk, promiseResult, Result } from '../lib/result_type'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/thehive/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/thehive/index.ts index 50860dd8a9fab..4621c635c8dae 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/thehive/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/thehive/index.ts @@ -14,7 +14,7 @@ import { SecurityConnectorFeatureId, UptimeConnectorFeatureId, CasesConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { urlAllowListValidator } from '@kbn/actions-plugin/server'; import { TheHiveConnector } from './thehive'; import { diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/torq/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/torq/index.ts index b60237dd7991e..b757e4b9344c1 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/torq/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/torq/index.ts @@ -17,11 +17,10 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, - ActionTypeExecutorResult, } from '@kbn/actions-plugin/common'; import { renderMustacheObject } from '@kbn/actions-plugin/server/lib/mustache_renderer'; import { request } from '@kbn/actions-plugin/server/lib/axios_utils'; -import { ValidatorServices } from '@kbn/actions-plugin/server/types'; +import { ActionTypeExecutorResult, ValidatorServices } from '@kbn/actions-plugin/server/types'; import { getRetryAfterIntervalFromHeaders } from '../lib/http_response_retry_header'; import { promiseResult, isOk, Result } from '../lib/result_type'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.test.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.test.ts index 2a8940afd95ff..4758b855eb213 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.test.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.test.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { ConnectorUsageCollector, Services } from '@kbn/actions-plugin/server/types'; import { validateConfig, validateParams, validateSecrets } from '@kbn/actions-plugin/server/lib'; import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.ts index f7c7fd4f6d61e..21a01b2f80591 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/webhook/index.ts @@ -21,7 +21,7 @@ import { AlertingConnectorFeatureId, UptimeConnectorFeatureId, SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +} from '@kbn/actions-plugin/common'; import { renderMustacheString } from '@kbn/actions-plugin/server/lib/mustache_renderer'; import { combineHeadersWithBasicAuthHeader } from '@kbn/actions-plugin/server/lib'; diff --git a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/xmatters/index.ts b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/xmatters/index.ts index ad189bda9defb..d9ccadc5a1b86 100644 --- a/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/xmatters/index.ts +++ b/x-pack/platform/plugins/shared/stack_connectors/server/connector_types/xmatters/index.ts @@ -14,10 +14,7 @@ import { ActionTypeExecutorResult as ConnectorTypeExecutorResult, ValidatorServices, } from '@kbn/actions-plugin/server/types'; -import { - AlertingConnectorFeatureId, - SecurityConnectorFeatureId, -} from '@kbn/actions-plugin/common/types'; +import { AlertingConnectorFeatureId, SecurityConnectorFeatureId } from '@kbn/actions-plugin/common'; import { postXmatters } from './post_xmatters'; export type XmattersConnectorType = ConnectorType< diff --git a/x-pack/platform/plugins/shared/task_manager/server/queries/task_claiming.test.ts b/x-pack/platform/plugins/shared/task_manager/server/queries/task_claiming.test.ts index 5a20a709b3c5b..2b168195cbc40 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/queries/task_claiming.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/queries/task_claiming.test.ts @@ -37,6 +37,7 @@ beforeEach(() => jest.clearAllMocks()); const mockedDate = new Date('2019-02-12T21:01:22.479Z'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).Date = class Date { constructor() { return mockedDate; @@ -72,6 +73,7 @@ describe('TaskClaiming', () => { jest .spyOn(apm, 'startTransaction') + // eslint-disable-next-line @typescript-eslint/no-explicit-any .mockImplementation(() => mockApmTrans as any); }); diff --git a/x-pack/platform/plugins/shared/task_manager/server/routes/health.test.ts b/x-pack/platform/plugins/shared/task_manager/server/routes/health.test.ts index ebae45d2fa21a..112864019fe71 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/routes/health.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/routes/health.test.ts @@ -36,9 +36,11 @@ const { summarizeMonitoringStats } = jest.requireMock('../monitoring'); const mockUsageCountersSetup = usageCountersServiceMock.createSetupContract(); const mockUsageCounter = mockUsageCountersSetup.createUsageCounter('test'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any const createMockClusterClient = (response: any) => { const mockScopedClusterClient = elasticsearchServiceMock.createScopedClusterClient(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any mockScopedClusterClient.asCurrentUser.security.hasPrivileges.mockResponse(response as any); const mockClusterClient = elasticsearchServiceMock.createClusterClient(); diff --git a/x-pack/platform/plugins/shared/task_manager/server/saved_objects/migrations.ts b/x-pack/platform/plugins/shared/task_manager/server/saved_objects/migrations.ts index d4043da90d5f1..83bd683fdba0f 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/saved_objects/migrations.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/saved_objects/migrations.ts @@ -98,6 +98,7 @@ function alertingTaskLegacyIdToSavedObjectIds( params: JSON.stringify({ ...params, alertId: newId, + // eslint-disable-next-line @typescript-eslint/no-explicit-any }) as any, }, }; @@ -127,6 +128,7 @@ function actionsTasksLegacyIdToSavedObjectIds( params: JSON.stringify({ ...params, actionTaskParamsId: newId, + // eslint-disable-next-line @typescript-eslint/no-explicit-any }) as any, }, }; diff --git a/x-pack/platform/plugins/shared/task_manager/server/task.ts b/x-pack/platform/plugins/shared/task_manager/server/task.ts index 78cbea8cd0345..ebd17dd8ee513 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task.ts @@ -5,6 +5,8 @@ * 2.0. */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + import { ObjectType, schema, TypeOf } from '@kbn/config-schema'; import { isNumber } from 'lodash'; import { isErr, tryAsResult } from './lib/result_type'; diff --git a/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_mget.test.ts b/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_mget.test.ts index 3eee0219e45c3..0a94d9ed9aade 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_mget.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_mget.test.ts @@ -63,6 +63,7 @@ beforeEach(() => jest.clearAllMocks()); const mockedDate = new Date('2019-02-12T21:01:22.479Z'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).Date = class Date { constructor() { return mockedDate; @@ -123,6 +124,7 @@ describe('TaskClaiming', () => { jest .spyOn(apm, 'startTransaction') + // eslint-disable-next-line @typescript-eslint/no-explicit-any .mockImplementation(() => mockApmTrans as any); jest.spyOn(taskPartitioner, 'getPartitions').mockResolvedValue([1, 3]); }); diff --git a/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_update_by_query.test.ts b/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_update_by_query.test.ts index 967fc4a9fce2e..5b2fb8eb8e7b9 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_update_by_query.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task_claimers/strategy_update_by_query.test.ts @@ -54,6 +54,7 @@ beforeEach(() => jest.clearAllMocks()); const mockedDate = new Date('2019-02-12T21:01:22.479Z'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).Date = class Date { constructor() { return mockedDate; @@ -89,6 +90,7 @@ describe('TaskClaiming', () => { jest .spyOn(apm, 'startTransaction') + // eslint-disable-next-line @typescript-eslint/no-explicit-any .mockImplementation(() => mockApmTrans as any); }); diff --git a/x-pack/platform/plugins/shared/task_manager/server/task_running/task_runner.test.ts b/x-pack/platform/plugins/shared/task_manager/server/task_running/task_runner.test.ts index 04e8b2a775759..b4dcd0fd11088 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task_running/task_runner.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task_running/task_runner.test.ts @@ -89,6 +89,7 @@ describe('TaskManagerRunner', () => { jest .spyOn(apm, 'startTransaction') + // eslint-disable-next-line @typescript-eslint/no-explicit-any .mockImplementation(() => mockApmTrans as any); }); test('makes calls to APM as expected when task markedAsRunning is success', async () => { diff --git a/x-pack/platform/plugins/shared/task_manager/server/task_store.test.ts b/x-pack/platform/plugins/shared/task_manager/server/task_store.test.ts index a195baeb893ac..c6a18b73ed31a 100644 --- a/x-pack/platform/plugins/shared/task_manager/server/task_store.test.ts +++ b/x-pack/platform/plugins/shared/task_manager/server/task_store.test.ts @@ -65,6 +65,7 @@ beforeEach(() => { const mockedDate = new Date('2019-02-12T21:01:22.479Z'); +// eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).Date = class Date { constructor() { return mockedDate; diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/common/index.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/common/index.ts index ca09e13b2a61e..578743c078e9b 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/common/index.ts +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/common/index.ts @@ -7,8 +7,39 @@ // TODO: https://github.com/elastic/kibana/issues/110895 -export * from './data'; +export type { + DateRange, + DateRangeInfo, + GetDateRangeInfoParams, + BuildAggregationOpts, + ParsedAggregationGroup, + ParsedAggregationResults, + TimeSeriesResult, + TimeSeriesResultRow, + MetricResult, +} from './data'; +export { + MAX_INTERVALS, + getDateRangeInfo, + getTooManyIntervalsErrorMessage, + getDateStartAfterDateEndErrorMessage, + BUCKET_SELECTOR_PATH_NAME, + BUCKET_SELECTOR_FIELD, + DEFAULT_GROUPS, + MAX_SOURCE_FIELDS_TO_COPY, + isCountAggregation, + isGroupAggregation, + buildAggregation, + UngroupedGroupId, + parseAggregationResults, +} from './data'; export const BASE_TRIGGERS_ACTIONS_UI_API_PATH = '/internal/triggers_actions_ui'; -export * from './parse_interval'; -export * from './experimental_features'; -export * from './normalized_field_types'; +export { INTERVAL_STRING_RE, parseInterval } from './parse_interval'; +export type { ExperimentalFeatures } from './experimental_features'; +export { + allowedExperimentalValues, + parseExperimentalConfigValue, + isValidExperimentalValue, + getExperimentalAllowedValues, +} from './experimental_features'; +export { NORMALIZED_FIELD_TYPES } from './normalized_field_types'; diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx b/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx index b0817d054b643..4e6c5279e0716 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx @@ -62,11 +62,11 @@ import { isActionGroupDisabledForActionTypeId, RuleActionAlertsFilterProperty, RuleActionKey, - Flapping, } from '@kbn/alerting-plugin/common'; import { AlertingConnectorFeatureId } from '@kbn/actions-plugin/common'; import { AlertConsumers } from '@kbn/rule-data-utils'; import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '@kbn/alerts-ui-shared/src/common/constants/rule_flapping'; +import type { Flapping } from '@kbn/alerting-types'; import { RuleReducerAction, InitialRule } from './rule_reducer'; import { RuleTypeModel, diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/core_query_types.test.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/core_query_types.test.ts index a44fea1922d53..0289223f525c8 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/core_query_types.test.ts +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/core_query_types.test.ts @@ -23,6 +23,7 @@ const DefaultParams: Writable> = { }; export function runTests(schema: ObjectType, defaultTypeParams: Record): void { + // eslint-disable-next-line @typescript-eslint/no-explicit-any let params: any; describe('coreQueryTypes', () => { diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_query.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_query.ts index a07c15f11ad0a..2e73bb60d2382 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_query.ts +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_query.ts @@ -64,6 +64,7 @@ export async function timeSeriesQuery( // core query // Constructing a typesafe ES query in JS is problematic, use any escapehatch for now + // eslint-disable-next-line @typescript-eslint/no-explicit-any const esQuery: any = { index, body: { diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_types.test.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_types.test.ts index c41ddfd97eccb..d44d824011357 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_types.test.ts +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/lib/time_series_types.test.ts @@ -22,6 +22,7 @@ const DefaultParams: Writable> = { describe('TimeSeriesParams validate()', () => { runTests(TimeSeriesQuerySchema, DefaultParams); + // eslint-disable-next-line @typescript-eslint/no-explicit-any let params: any; beforeEach(() => { params = { ...DefaultParams }; diff --git a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/routes/indices.ts b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/routes/indices.ts index 8dbe0d8626a5c..282092f2a25aa 100644 --- a/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/routes/indices.ts +++ b/x-pack/platform/plugins/shared/triggers_actions_ui/server/data/routes/indices.ts @@ -121,6 +121,7 @@ async function getIndicesFromPattern( const response = await esClient.search(params); // TODO: Investigate when the status field might appear here, type suggests it shouldn't ever happen + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((response as any).status === 404 || !response.aggregations) { return []; } diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx index dead54d084936..9136c8ffdd816 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx @@ -108,7 +108,7 @@ export function useErrorGroupListData({ } }, // only fetches agg results when main statistics are ready - + // eslint-disable-next-line react-hooks/exhaustive-deps [mainStatistics.requestId, renderedItems, comparisonEnabled, offset], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx index 93b2f60bdcf0a..b90b81a1ce2d6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx @@ -166,6 +166,7 @@ export function MobileCrashesOverview() { }, // only fetches agg results when requestId changes + // eslint-disable-next-line react-hooks/exhaustive-deps [requestId], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx index e5e28f7003961..4c21030c3e789 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx @@ -164,6 +164,7 @@ export function MobileErrorsOverview() { }, // only fetches agg results when requestId changes + // eslint-disable-next-line react-hooks/exhaustive-deps [requestId], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts index 36855749f8317..cd9c1d07846b1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/use_mobile_statistics_fetcher.ts @@ -95,6 +95,7 @@ export function useMobileStatisticsFetcher({ }, // only fetches agg results when requestId changes + // eslint-disable-next-line react-hooks/exhaustive-deps [requestId], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx index d2f08d7ca6b99..1f6af49e6850f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx @@ -93,6 +93,7 @@ function useServicesMainStatisticsFetcher(searchQuery: string | undefined) { } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [ environment, kuery, @@ -168,6 +169,7 @@ function useServicesDetailedStatisticsFetcher({ }, // only fetches detailed statistics when requestId is invalidated by main statistics api call or offset is changed + // eslint-disable-next-line react-hooks/exhaustive-deps [mainStatisticsData.requestId, renderedItems, offset, comparisonEnabled], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx index 3f37453b8edaf..8997f9c80555e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx @@ -117,6 +117,7 @@ export function ServiceOverviewInstancesChartAndTable({ }); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [ environment, kuery, @@ -184,6 +185,7 @@ export function ServiceOverviewInstancesChartAndTable({ }, // only fetches detailed statistics when requestId is invalidated by main statistics api call + // eslint-disable-next-line react-hooks/exhaustive-deps [requestId], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx index 7f6d167151a2d..a9e9a31f76887 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx @@ -86,6 +86,7 @@ export function TopErrors() { } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [ environment, kuery, @@ -132,6 +133,7 @@ export function TopErrors() { }, // only fetches agg results when requestId changes + // eslint-disable-next-line react-hooks/exhaustive-deps [requestId], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx index 08b4f51446873..4db1ab4d4a0e3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx @@ -369,6 +369,7 @@ function useTableData({ }, // only fetches detailed statistics when `currentPageItems` is updated. + // eslint-disable-next-line react-hooks/exhaustive-deps [mainStatistics.requestId, currentPageItems, offset, comparisonEnabled], { preservePreviousData: false } ); diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx index d6224c18d679a..e8710659c1f73 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx @@ -143,6 +143,7 @@ describe('useFetcher', () => { }); it('should show "first response" while loading "second response"', async () => { + // eslint-disable-next-line react-hooks/exhaustive-deps const hook = renderHook(({ callback, args }) => useFetcher(callback, args), { initialProps: { callback: () => Promise.resolve('first response'), @@ -211,6 +212,7 @@ describe('useFetcher', () => { args: ['a'], }; + // eslint-disable-next-line react-hooks/exhaustive-deps const hook = renderHook(({ callback, args }) => useFetcher(callback, args), { initialProps, wrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx index 174b9f58701c6..3b1a68022cc09 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx @@ -97,6 +97,7 @@ export function useProgressiveFetcher( return callback(clientWithProbability(regularCallApmApi, sampledProbability)); }, + // eslint-disable-next-line react-hooks/exhaustive-deps dependencies, options ); @@ -106,6 +107,7 @@ export function useProgressiveFetcher( return callback(clientWithProbability(regularCallApmApi, 1)); }, + // eslint-disable-next-line react-hooks/exhaustive-deps dependencies ); diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts index 4b1cca65ba33d..6f7a3be57af7a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_trace_samples_fetcher.ts @@ -61,6 +61,7 @@ export function useTransactionTraceSamplesFetcher({ }, // the samples should not be refetched if the transactionId or traceId changes + // eslint-disable-next-line react-hooks/exhaustive-deps [ environment, kuery, diff --git a/x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts b/x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts index e7441ef0c45cd..f4b73e16fbc4a 100644 --- a/x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts +++ b/x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts @@ -45,6 +45,7 @@ export const useAppDataView = ({ setDataViews((prevState) => ({ ...(prevState ?? {}), [seriesDataType]: indPattern })); } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataViewTitle, seriesDataType, JSON.stringify(series)]); return { dataViews, loading: loading && !dataViews[seriesDataType] }; diff --git a/x-pack/solutions/observability/plugins/observability/public/index.ts b/x-pack/solutions/observability/plugins/observability/public/index.ts index fa0189dc1df14..89a02ec5a4f4b 100644 --- a/x-pack/solutions/observability/plugins/observability/public/index.ts +++ b/x-pack/solutions/observability/plugins/observability/public/index.ts @@ -58,7 +58,36 @@ export { DatePicker } from './pages/overview/components/date_picker'; export const LazyAlertsFlyout = lazy(() => import('./components/alerts_flyout/alerts_flyout')); -export * from './typings'; +export type { + Stat, + Coordinates, + Series, + FetchDataParams, + HasDataParams, + HasDataResponse, + UXHasDataResponse, + SyntheticsHasDataResponse, + APMHasDataResponse, + InfraMetricsHasDataResponse, + InfraLogsHasDataResponse, + FetchData, + HasData, + ObservabilityFetchDataPlugins, + DataHandler, + FetchDataResponse, + LogsFetchDataResponse, + StringOrNull, + NumberOrNull, + MetricsFetchDataSeries, + MetricsFetchDataResponse, + UptimeFetchDataResponse, + ApmFetchDataResponse, + UxFetchDataResponse, + UniversalProfilingDataResponse, + ObservabilityFetchDataResponse, + ObservabilityHasDataResponse, + Subset, +} from './typings'; import { TopAlert } from './typings/alerts'; export type { TopAlert }; import type { AlertDetailsAppSectionProps } from './pages/alert_details/types'; diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/apm/apm_section.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/apm/apm_section.tsx index 196e9cd6bd901..d472449f2e9d1 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/apm/apm_section.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/apm/apm_section.tsx @@ -73,6 +73,7 @@ export function APMSection({ bucketSize }: Props) { }, // `forceUpdate` and `lastUpdated` should trigger a reload + // eslint-disable-next-line react-hooks/exhaustive-deps [bucketSize, relativeStart, relativeEnd, absoluteStart, absoluteEnd, forceUpdate, lastUpdated] ); diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/logs/logs_section.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/logs/logs_section.tsx index 9e46b01037a65..0e8e85212e084 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/logs/logs_section.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/logs/logs_section.tsx @@ -73,6 +73,7 @@ export function LogsSection({ bucketSize }: Props) { // `forceUpdate` and `lastUpdated` trigger a reload + // eslint-disable-next-line react-hooks/exhaustive-deps [bucketSize, relativeStart, relativeEnd, absoluteStart, absoluteEnd, forceUpdate, lastUpdated] ); diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/metrics/metrics_section.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/metrics/metrics_section.tsx index e943d99fbaa43..99d526a66facd 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/metrics/metrics_section.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/metrics/metrics_section.tsx @@ -67,6 +67,7 @@ export function MetricsSection({ bucketSize }: Props) { }); } // `forceUpdate` and `lastUpdated` should trigger a reload + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ bucketSize, relativeStart, diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/uptime/uptime_section.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/uptime/uptime_section.tsx index b59a051e48d50..71fdbb9e58d02 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/uptime/uptime_section.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/uptime/uptime_section.tsx @@ -66,6 +66,7 @@ export function UptimeSection({ bucketSize }: Props) { }, // `forceUpdate` and `lastUpdated` should trigger a reload + // eslint-disable-next-line react-hooks/exhaustive-deps [ bucketSize, relativeStart, diff --git a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/ux/ux_section.tsx b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/ux/ux_section.tsx index 4267d4ad9872c..3e3a0ef105285 100644 --- a/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/ux/ux_section.tsx +++ b/x-pack/solutions/observability/plugins/observability/public/pages/overview/components/sections/ux/ux_section.tsx @@ -65,6 +65,7 @@ export function UXSection({ bucketSize }: Props) { }, // `forceUpdate` and `lastUpdated` should trigger a reload + // eslint-disable-next-line react-hooks/exhaustive-deps [ bucketSize, relativeStart, diff --git a/x-pack/solutions/observability/plugins/observability/server/index.ts b/x-pack/solutions/observability/plugins/observability/server/index.ts index 913b52e7eb6fb..72554a030e485 100644 --- a/x-pack/solutions/observability/plugins/observability/server/index.ts +++ b/x-pack/solutions/observability/plugins/observability/server/index.ts @@ -31,7 +31,20 @@ export { export { getParsedFilterQuery } from './utils/get_parsed_filtered_query'; export { getInspectResponse } from '../common/utils/get_inspect_response'; -export * from './types'; +export type { + ObservabilityRouteCreateOptions, + ObservabilityRouteHandlerResources, + AbstractObservabilityServerRouteRepository, + ObservabilityServerRouteRepository, + APIEndpoint, + ObservabilityAPIReturnType, + ObservabilityRequestHandlerContext, + ObservabilityPluginRouter, +} from './types'; +export { + metricsExplorerViewSavedObjectAttributesRT, + metricsExplorerViewSavedObjectRT, +} from './types'; const configSchema = schema.object({ annotations: schema.object({ diff --git a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/rule_connector/index.ts b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/rule_connector/index.ts index 1f5a097f8f7cd..7ad9d78889461 100644 --- a/x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/rule_connector/index.ts +++ b/x-pack/solutions/observability/plugins/observability_ai_assistant_app/server/rule_connector/index.ts @@ -11,7 +11,7 @@ import dedent from 'dedent'; import { i18n } from '@kbn/i18n'; import { schema, TypeOf } from '@kbn/config-schema'; import { KibanaRequest, Logger } from '@kbn/core/server'; -import { AlertingConnectorFeatureId } from '@kbn/actions-plugin/common/connector_feature_config'; +import { AlertingConnectorFeatureId } from '@kbn/actions-plugin/common'; import type { ActionType as ConnectorType, ActionTypeExecutorOptions as ConnectorTypeExecutorOptions, diff --git a/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/auto_detect/use_onboarding_flow.tsx b/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/auto_detect/use_onboarding_flow.tsx index c6aae1f3e959e..7bdde9c618d26 100644 --- a/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/auto_detect/use_onboarding_flow.tsx +++ b/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/auto_detect/use_onboarding_flow.tsx @@ -101,6 +101,7 @@ export function useOnboardingFlow() { ), }; }); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [installedIntegrations.length]); useInterval( diff --git a/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx b/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx index ae07e39cf7c8d..31edab45a735d 100644 --- a/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx +++ b/x-pack/solutions/observability/plugins/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx @@ -69,6 +69,7 @@ export function InstallElasticAgent() { return callApi('GET /internal/observability_onboarding/logs/setup/privileges'); } // FIXME: Dario could not find a reasonable fix for getState() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const { data: setup } = useFetcher((callApi) => { @@ -103,6 +104,7 @@ export function InstallElasticAgent() { }, // FIXME: Dario could not find a reasonable fix for getState() + // eslint-disable-next-line react-hooks/exhaustive-deps [monitoringRole?.hasPrivileges] ); @@ -132,6 +134,7 @@ export function InstallElasticAgent() { }); } // FIXME: Dario could not find a reasonable fix for getState() + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const { apiKeyEncoded, onboardingId } = installShipperSetup ?? getState(); @@ -149,6 +152,7 @@ export function InstallElasticAgent() { }, // FIXME: Dario could not find a reasonable fix for succesfullySavedOnboardingState + // eslint-disable-next-line react-hooks/exhaustive-deps [apiKeyEncoded, onboardingId, succesfullySavedOnboardingState] ); diff --git a/x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_es_search.ts b/x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_es_search.ts index 6baa8f87ddab9..1560df88c7873 100644 --- a/x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_es_search.ts +++ b/x-pack/solutions/observability/plugins/observability_shared/public/hooks/use_es_search.ts @@ -110,6 +110,7 @@ export const useEsSearch = { const { timeRangeId } = useTimeRangeContext(); + // eslint-disable-next-line react-hooks/exhaustive-deps return useAsync(fn, dependencies.concat(timeRangeId)); }; diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/condition_editor/index.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/condition_editor/index.tsx index a3c6d564eefca..a095db7cdeb62 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/condition_editor/index.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/condition_editor/index.tsx @@ -84,6 +84,7 @@ export function ConditionForm(props: { })} > props.onConditionChange({ never: {} })} disabled={props.condition === undefined} diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/entity_detail_view/index.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/entity_detail_view/index.tsx index dbfe2b1016eee..725942e264d65 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/entity_detail_view/index.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/entity_detail_view/index.tsx @@ -155,6 +155,7 @@ function LifecycleBadge({ lifecycle }: { lifecycle: IngestStreamLifecycle }) { return ( - + {i18n.translate('xpack.streams.streamDetailView.managementTab.bottomBar.cancel', { defaultMessage: 'Cancel changes', })} ( - + {label} ), diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/add_processor_button.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/add_processor_button.tsx index 34219c9b83781..d671b107cc239 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/add_processor_button.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/add_processor_button.tsx @@ -12,7 +12,11 @@ import { i18n } from '@kbn/i18n'; export function AddProcessorButton(props: EuiButtonPropsForButton) { return ( - + {i18n.translate( 'xpack.streams.streamDetailView.managementTab.enrichmentEmptyPrompt.addProcessorAction', { defaultMessage: 'Add a processor' } diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/danger_zone.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/danger_zone.tsx index 5f8d44d0d8962..3bec4c48d2912 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/danger_zone.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/danger_zone.tsx @@ -46,7 +46,11 @@ const DeleteProcessorButton = ({ onDeleteProcessor }: DeleteProcessorButtonProps return ( <> - + {i18n.translate( 'xpack.streams.streamDetailView.managementTab.enrichment.processorFlyout.dangerAreaTitle', { defaultMessage: 'Delete processor' } diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_append_separator.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_append_separator.tsx index dc6bf2dbb39cb..7951636a5b59e 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_append_separator.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_append_separator.tsx @@ -30,7 +30,11 @@ export const DissectAppendSeparator = () => { } fullWidth > - + ); }; diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_pattern_definition.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_pattern_definition.tsx index cb4e3559e480a..679bb99b34004 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_pattern_definition.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/dissect/dissect_pattern_definition.tsx @@ -42,7 +42,12 @@ export const DissectPatternDefinition = () => { defaultMessage="Pattern used to dissect the specified field. The pattern is defined by the parts of the string to discard. Use a {keyModifier} to alter the dissection behavior." values={{ keyModifier: ( - + {i18n.translate( 'xpack.streams.streamDetailView.managementTab.enrichment.processorFlyout.dissectPatternDefinitionsLink', { defaultMessage: 'key modifier' } diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/grok/grok_patterns_editor.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/grok/grok_patterns_editor.tsx index eb51b54eda5c8..78a4f735adcef 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/grok/grok_patterns_editor.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/grok/grok_patterns_editor.tsx @@ -84,7 +84,12 @@ export const GrokPatternsEditor = () => { ))} - + {i18n.translate( 'xpack.streams.streamDetailView.managementTab.enrichment.processorFlyout.grokEditor.addPattern', { defaultMessage: 'Add pattern' } @@ -140,6 +145,7 @@ const DraggablePatternInput = ({ {onRemove && ( onRemove(idx)} diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/index.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/index.tsx index 728842133d24a..0e3452d22cdaa 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/index.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/index.tsx @@ -91,6 +91,7 @@ export function AddProcessorFlyout({ )} confirmButton={ @@ -177,6 +178,7 @@ export function EditProcessorFlyout({ } confirmButton={ diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_field_selector.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_field_selector.tsx index 4486fdfa84700..ec9e5019fd800 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_field_selector.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_field_selector.tsx @@ -38,7 +38,12 @@ export const ProcessorFieldSelector = () => { isInvalid={invalid} error={error?.message} > - + ); }; diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_flyout_template.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_flyout_template.tsx index b20df887fd223..8f9de6117b4ae 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_flyout_template.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_flyout_template.tsx @@ -48,7 +48,11 @@ export function ProcessorFlyoutTemplate({ {children} - + {i18n.translate( 'xpack.streams.streamDetailView.managementTab.enrichment.processorFlyout.cancel', { defaultMessage: 'Cancel' } diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_outcome_preview.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_outcome_preview.tsx index 167675bead535..9bf657d654daa 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_outcome_preview.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/flyout/processor_outcome_preview.tsx @@ -124,6 +124,7 @@ export const ProcessorOutcomePreview = ({ + {i18n.translate('xpack.streams.availableProcessors.dissectLinkLabel', { defaultMessage: 'dissect', })} @@ -96,7 +101,12 @@ const availableProcessors: TAvailableProcessors = { defaultMessage="Uses {grokLink} expressions to extract matches from a field." values={{ grokLink: ( - + {i18n.translate('xpack.streams.availableProcessors.grokLinkLabel', { defaultMessage: 'grok', })} diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/hooks/use_processing_simulator.ts b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/hooks/use_processing_simulator.ts index c68bd578ea0f7..18abbbfd5b217 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/hooks/use_processing_simulator.ts +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/hooks/use_processing_simulator.ts @@ -85,6 +85,7 @@ export const useProcessingSimulator = ({ }, }); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [definition, streamsRepositoryClient, start, end, serializedCondition], { disableToastOnError: true } ); diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/processors_list.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/processors_list.tsx index 87af1a1085fbc..0849bf8616ae1 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/processors_list.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_enrichment/processors_list.tsx @@ -82,6 +82,7 @@ const ProcessorListItem = ({ { return ( - + {stream.destination} ); diff --git a/x-pack/solutions/observability/plugins/streams_app/public/components/streams_list/index.tsx b/x-pack/solutions/observability/plugins/streams_app/public/components/streams_list/index.tsx index dc35e6a47895c..e30988bac32c4 100644 --- a/x-pack/solutions/observability/plugins/streams_app/public/components/streams_list/index.tsx +++ b/x-pack/solutions/observability/plugins/streams_app/public/components/streams_list/index.tsx @@ -120,6 +120,7 @@ export function StreamsList({ {Object.keys(collapsed).length === 0 ? ( @@ -131,7 +132,12 @@ export function StreamsList({ })} ) : ( - setCollapsed({})} size="s"> + setCollapsed({})} + size="s" + > {i18n.translate('xpack.streams.streamsTable.expandAll', { defaultMessage: 'Expand all', })} @@ -237,7 +243,11 @@ function StreamNode({ )} - + {node.name} {node.type === 'root' && ( @@ -263,6 +273,7 @@ function StreamNode({ })} > { } // FIXME: Dario couldn't find a solution for monitorFields // which is not memoized downstream + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isInspecting, hideParams]); let flyout; diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx index a0e6d2ca6d29f..25f0ed0843472 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx @@ -39,6 +39,7 @@ export const ResultDetailsSuccessful = ({ }); // FIXME: Dario is not sure what step._id is being used for, // so he'll leave it in place + // eslint-disable-next-line react-hooks/exhaustive-deps }, [timestamp, monitorId, stepIndex, location, step._id]); const { currentStep } = useJourneySteps( diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx index b9359b0357844..4bd8b503a247c 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx @@ -44,6 +44,7 @@ export const useMonitorSave = ({ monitorData }: { monitorData?: SyntheticsMonito } // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [monitorData]); useEffect(() => { diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts index 6e9e8decd7e6c..0988e6c2aefc5 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts @@ -94,6 +94,7 @@ export const useRecentlyViewedMonitors = () => { } // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [monitorQueryId]); return useMemo( diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/policy_link.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/policy_link.tsx index 782c8ebd34f67..3918e20bccabd 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/policy_link.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/policy_link.tsx @@ -26,6 +26,7 @@ export const PolicyLink = ({ name }: { name: string }) => { return ilmLocator?.getLocation({ page: 'policy_edit', policyName: name }); // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [name]); if (!data) { diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/policy_hosts.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/policy_hosts.tsx index f5743479015b1..42f6a463e228f 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/policy_hosts.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/private_locations/policy_hosts.tsx @@ -104,7 +104,11 @@ export const PolicyHostsField = ({ privateLocations }: { privateLocations: Priva fullWidth label={POLICY_HOST_LABEL} labelAppend={ - + {i18n.translate('xpack.synthetics.policyHostsField.createButtonEmptyLabel', { defaultMessage: 'Create policy', })} diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx index 07d0b83c15e51..4a8752e8b9926 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx @@ -40,6 +40,7 @@ export const ProjectAPIKeys = () => { return null; // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [loadAPIKey, canUsePublicLocations]); useEffect(() => { diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx index dfd7d3db11007..cde0cb93fed11 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx @@ -37,6 +37,7 @@ export const LastSuccessfulScreenshot = ({ }); // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [step._id, step['@timestamp']]); return ( diff --git a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts index 553278f180bdf..c5b11dc272233 100644 --- a/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts +++ b/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts @@ -189,6 +189,7 @@ export const useBrowserRunOnceMonitors = ({ return Promise.resolve(null); // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Synthetics folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [checkGroupCheckSum, setCheckGroupResults, lastRefresh]); // Whenever a new found document is fetched, update lastUpdated diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts index 9d3e14431f6bb..bc85b45857c23 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts @@ -45,6 +45,7 @@ export const useInProgressImage = ({ if (hasIntersected && !hasImage) return getJourneyScreenshot(imgPath); // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [hasIntersected, imgPath, skippedStep, retryLoading]); useEffect(() => { diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts index 99f5aae823777..4cb66b619fa86 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts @@ -27,6 +27,7 @@ export const useSnapShotCount = ({ query, filters }: { query: string; filters?: // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps [esKuery, query] ); diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx index 629fa01a034a4..ac7e20db41b17 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx @@ -28,6 +28,7 @@ export const IntegrationDeprecation = () => { return undefined; // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [monitorList.isLoaded]); const hasIntegrationMonitors = !loading && data && data.hasIntegrationMonitors; const [shouldShowNotice, setShouldShowNotice] = useState( diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts index af14d8f78289d..3f578613bbe85 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts @@ -25,6 +25,7 @@ export const useSnapShotCount = () => { // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps [dateRangeStart, dateRangeEnd, esKuery, lastRefresh, query] ); diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx index af4c1ed3915ac..7eab37d2b9afe 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx @@ -92,6 +92,7 @@ export const StdErrorLogs = ({ return ''; // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [checkGroup, timestamp]); const search = { diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx index 6af149efe453f..606019c99429d 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx @@ -42,6 +42,7 @@ export const StepScreenshots = ({ step }: Props) => { } // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [step._id, step['@timestamp']]); const lastSuccessfulCheck: Ping | undefined = data; diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx index 8c158c86fd05b..de493a00867fd 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx @@ -138,6 +138,7 @@ export const StepScreenshotDisplay: FC = ({ } // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [basePath, checkGroup, imgSrc, stepIndex, isScreenshotRef, lastRefresh]); const refDimensions = useMemo(() => { diff --git a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx index e3fb9f4b3bb3b..7abbdf3fde8c8 100644 --- a/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx +++ b/x-pack/solutions/observability/plugins/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx @@ -28,6 +28,7 @@ export const UptimeDataViewContextProvider: FC< } // FIXME: Dario thinks there is a better way to do this but // he's getting tired and maybe the Uptime folks can fix it + // eslint-disable-next-line react-hooks/exhaustive-deps }, [heartbeatIndices, indexStatus?.indexExists]); return ; diff --git a/x-pack/solutions/observability/plugins/ux/public/hooks/use_static_data_view.ts b/x-pack/solutions/observability/plugins/ux/public/hooks/use_static_data_view.ts index be4a382b8ad56..51ebe9e4c28bf 100644 --- a/x-pack/solutions/observability/plugins/ux/public/hooks/use_static_data_view.ts +++ b/x-pack/solutions/observability/plugins/ux/public/hooks/use_static_data_view.ts @@ -12,6 +12,7 @@ export function useStaticDataView() { const { exploratoryView } = useKibanaServices(); const { data, loading } = useFetcher(async () => { return exploratoryView.getAppDataView('ux'); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return { diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/index.ts index 9e607aedc5f83..36c96929b2f28 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/common/index.ts @@ -5,4 +5,13 @@ * 2.0. */ -export * from './common.gen'; +export type { + EntityAnalyticsPrivileges, + EntityRiskLevels, + EntityRiskScoreRecord, + RiskScoreInput, + EntityAfterKey, + RiskScoreWeights, + TaskManagerUnavailableResponse, +} from './common.gen'; +export { AfterKeys, RiskScoreWeight, EntityRiskLevelsEnum } from './common.gen'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/index.ts b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/index.ts index a1eebaae906ce..2daaa2a3810b4 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/api/entity_analytics/index.ts @@ -8,4 +8,4 @@ export * from './asset_criticality'; export * from './risk_engine'; export * from './entity_store'; -export { EntityAnalyticsPrivileges } from './common'; +export type { EntityAnalyticsPrivileges } from './common'; diff --git a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts index 5a145f8c25281..9f31484a430ab 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/search_strategy/security_solution/risk_score/all/index.ts @@ -8,8 +8,11 @@ import type { IEsSearchResponse } from '@kbn/search-types'; import { EntityIdentifierFields, EntityType } from '../../../../entity_analytics/types'; -import { EntityRiskLevels, EntityRiskLevelsEnum } from '../../../../api/entity_analytics/common'; -import type { EntityRiskScoreRecord } from '../../../../api/entity_analytics/common'; +import { EntityRiskLevelsEnum } from '../../../../api/entity_analytics/common'; +import type { + EntityRiskScoreRecord, + EntityRiskLevels, +} from '../../../../api/entity_analytics/common'; import type { Inspect, Maybe, SortField } from '../../../common'; export interface RiskScoreStrategyResponse extends IEsSearchResponse { @@ -23,7 +26,7 @@ export interface RiskStats extends EntityRiskScoreRecord { multipliers: string[]; } -export const RiskSeverity = EntityRiskLevels.enum; +export const RiskSeverity = EntityRiskLevelsEnum; export type RiskSeverity = EntityRiskLevels; export type EntityRiskScore = { diff --git a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/common/index.ts b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/common/index.ts index 354e46ff63074..336cd5154bc26 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/common/index.ts +++ b/x-pack/solutions/security/plugins/security_solution/public/entity_analytics/common/index.ts @@ -6,4 +6,13 @@ */ export { userHasRiskEngineReadPermissions } from './user_has_risk_engine_read_permissions'; -export * from './utils'; +export type { SnakeToCamelCase } from './utils'; +export { + RISK_SCORE_RANGES, + SEVERITY_UI_SORT_ORDER, + RISK_SEVERITY_COLOUR, + UserRiskScoreQueryId, + HostRiskScoreQueryId, + formatRiskScore, + FIRST_RECORD_PAGINATION, +} from './utils';