diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client_interface.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client_interface.ts index 54d9055f1874d..cb65b42d50b69 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client_interface.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client_interface.ts @@ -107,15 +107,14 @@ export interface RunningStatusChangeArgs { newStatus: RuleExecutionStatus.running; } -export interface StatusChangeArgsWithMessage { - newStatus: Exclude; - metrics?: MetricsArgs; - message: string; -} /** * Information about the status change event. */ -export type StatusChangeArgs = RunningStatusChangeArgs | StatusChangeArgsWithMessage; +export interface StatusChangeArgs { + newStatus: RuleExecutionStatus; + message?: string; + metrics?: MetricsArgs; +} export interface MetricsArgs { searchDurations?: string[]; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts index ce91f9cd1ee79..457412dd01501 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts @@ -39,7 +39,7 @@ import { throwAuthzError } from '../../../../machine_learning/validation'; import { buildRouteValidation } from '../../../../../utils/build_validation/route_validation'; import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import type { RuleExecutionContext, StatusChangeArgsWithMessage } from '../../../rule_monitoring'; +import type { RuleExecutionContext, StatusChangeArgs } from '../../../rule_monitoring'; import type { ConfigType } from '../../../../../config'; import { alertInstanceFactoryStub } from '../../../signals/preview/alert_instance_factory_stub'; @@ -123,7 +123,7 @@ export const previewRulesRoute = async ( const spaceId = siemClient.getSpaceId(); const previewId = uuidv4(); const username = security?.authc.getCurrentUser(request)?.username; - const loggedStatusChanges: Array = []; + const loggedStatusChanges: Array = []; const previewRuleExecutionLogger = createPreviewRuleExecutionLogger(loggedStatusChanges); const runState: Record = {}; const logs: RulePreviewLogs[] = [];