@@ -18,7 +18,6 @@ import { UserActionUsernameWithAvatar } from '../avatar_username';
1818import { AlertCommentEvent } from './alert_event' ;
1919import { UserActionCopyLink } from '../copy_link' ;
2020import { UserActionShowAlert } from './show_alert' ;
21- import { Ecs } from '../../../containers/types' ;
2221
2322type BuilderArgs = Pick <
2423 UserActionBuilderArgs ,
@@ -49,7 +48,7 @@ export const createAlertAttachmentUserActionBuilder = ({
4948 return [ ] ;
5049 }
5150
52- const alertField : Ecs | undefined = alertData [ alertId ] ;
51+ const alertField : unknown | undefined = alertData [ alertId ] ;
5352 const ruleId = getRuleId ( comment , alertField ) ;
5453 const ruleName = getRuleName ( comment , alertField ) ;
5554
@@ -101,15 +100,15 @@ const getFirstItem = (items?: string | string[] | null): string | null => {
101100 return Array . isArray ( items ) ? items [ 0 ] : items ?? null ;
102101} ;
103102
104- export const getRuleId = ( comment : BuilderArgs [ 'comment' ] , alertData ?: Ecs ) : string | null =>
103+ export const getRuleId = ( comment : BuilderArgs [ 'comment' ] , alertData ?: unknown ) : string | null =>
105104 getRuleField ( {
106105 commentRuleField : comment ?. rule ?. id ,
107106 alertData,
108107 signalRuleFieldPath : 'signal.rule.id' ,
109108 kibanaAlertFieldPath : ALERT_RULE_UUID ,
110109 } ) ;
111110
112- export const getRuleName = ( comment : BuilderArgs [ 'comment' ] , alertData ?: Ecs ) : string | null =>
111+ export const getRuleName = ( comment : BuilderArgs [ 'comment' ] , alertData ?: unknown ) : string | null =>
113112 getRuleField ( {
114113 commentRuleField : comment ?. rule ?. name ,
115114 alertData,
@@ -124,7 +123,7 @@ const getRuleField = ({
124123 kibanaAlertFieldPath,
125124} : {
126125 commentRuleField : string | string [ ] | null | undefined ;
127- alertData : Ecs | undefined ;
126+ alertData : unknown | undefined ;
128127 signalRuleFieldPath : string ;
129128 kibanaAlertFieldPath : string ;
130129} ) : string | null => {
0 commit comments