Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
madirey committed Nov 2, 2021
1 parent a596ab3 commit 521c152
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions x-pack/plugins/cases/common/ui/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,19 @@ export interface SignalEcs {
threshold_result?: unknown;
}

type SearchTypes = string | number | boolean | object | SearchTypes[] | undefined;
export type SignalEcsAAD = Exclude<SignalEcs, 'rule' | 'status'> & {
rule?: Exclude<RuleEcs, 'id'> & { uuid: string[] };
building_block_type?: string[];
workflow_status?: string[];
};

export interface Ecs {
_id: string;
_index?: string;
signal?: SignalEcs;
kibana?: SearchTypes;
kibana?: {
alert: SignalEcsAAD;
};
}

export type CaseActionConnector = ActionConnector;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FieldMap } from '../../../../../../rule_registry/common/field_map';
import { FieldMap } from '../../../rule_registry/common/field_map';

export const alertsFieldMap: FieldMap = {
'kibana.alert.ancestors': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
formatTimelineResultToModel,
} from '../../../timelines/components/open_timeline/helpers';
import { convertKueryToElasticSearchQuery } from '../../../common/lib/keury';
import { getField } from '../../../helpers';
import {
replaceTemplateFieldFromQuery,
replaceTemplateFieldFromMatchFilters,
Expand All @@ -59,7 +60,6 @@ import {
QueryOperator,
} from '../../../timelines/components/timeline/data_providers/data_provider';
import { getTimelineTemplate } from '../../../timelines/containers/api';
import { getField } from '../../../helpers';

export const getUpdateAlertsQuery = (eventIds: Readonly<string[]>) => {
return {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/public/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const racFieldMappings: Record<string, string> = {
};

/*
* @deprecated This functionality should be removed when support for signal.* is no longer
* Deprecation notice: This functionality should be removed when support for signal.* is no longer
* supported.
*
* Selectively returns the AAD field value (kibana.alert.*) or the legacy field value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import {
WrapHits,
WrapSequences,
} from '../signals/types';
import { AlertsFieldMap, RulesFieldMap } from './field_maps';
import { ExperimentalFeatures } from '../../../../common/experimental_features';
import { IEventLogService } from '../../../../../event_log/server';
import { AlertsFieldMap, RulesFieldMap } from '../../../../common/field_maps';

export interface SecurityAlertTypeReturnValue<TState extends AlertTypeState> {
bulkCreateTimes: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
};

return {
testFiles: [require.resolve(`../${name}/tests/attach_to_case`)],
testFiles: [require.resolve(`../${name}/tests/`)],
servers,
services,
junit: {
Expand Down

0 comments on commit 521c152

Please sign in to comment.