Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Apr 2, 2021
1 parent f8a6b42 commit 3266b39
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
15 changes: 15 additions & 0 deletions x-pack/plugins/alerting/server/alerts_client/tests/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,23 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
{
group: 'default',
id: '1',
params: {
foo: true,
},
actionTypeId: 'test',
},
{
group: 'default',
id: '2',
params: {
foo: true,
},
actionTypeId: 'test2',
},
],
},
Expand Down Expand Up @@ -435,6 +438,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -604,6 +608,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -727,6 +732,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -856,6 +862,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -964,20 +971,23 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
{
group: 'default',
id: '1',
params: {
foo: true,
},
actionTypeId: 'test',
},
{
group: 'default',
id: '2',
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -1026,6 +1036,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -1148,6 +1159,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -1180,6 +1192,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -1217,6 +1230,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down Expand Up @@ -1253,6 +1267,7 @@ describe('update()', () => {
params: {
foo: true,
},
actionTypeId: 'test',
},
],
},
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/alerting/server/routes/create_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ const rewriteBodyReqActions: RewriteRequestCase<AlertAction> = ({
const rewriteBodyReq: RewriteRequestCase<CreateOptions<AlertTypeParams>['data']> = ({
rule_type_id: alertTypeId,
notify_when: notifyWhen,
actions,
...rest
}) => ({
...rest,
alertTypeId,
notifyWhen,
actions,
});
const rewriteBodyRes: RewriteResponseCase<SanitizedAlert<AlertTypeParams>> = ({
actions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { HttpSetup } from 'kibana/public';
import { AlertAggregations } from '../../../types';
import { INTERNAL_BASE_ALERTING_API_PATH } from '../../constants';
import { mapFiltersToKql } from './mapFiltersToKql';
import { mapFiltersToKql } from './map_filters_to_kql';
import { RewriteRequestCase } from '../../../../../actions/common';

const rewriteBodyRes: RewriteRequestCase<AlertAggregations> = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

export { alertingFrameworkHealth } from './health';
export { mapFiltersToKql } from './mapFiltersToKql';
export { mapFiltersToKql } from './map_filters_to_kql';
export { loadAlertAggregations } from './aggregate';
export { createAlert } from './create';
export { deleteAlerts } from './delete';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { mapFiltersToKql } from './mapFiltersToKql';
import { mapFiltersToKql } from './map_filters_to_kql';

describe('mapFiltersToKql', () => {
beforeEach(() => jest.resetAllMocks());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { HttpSetup } from 'kibana/public';
import { BASE_ALERTING_API_PATH } from '../../constants';
import { Alert, Pagination, Sorting } from '../../../types';
import { AsApiContract } from '../../../../../actions/common';
import { mapFiltersToKql } from './mapFiltersToKql';
import { mapFiltersToKql } from './map_filters_to_kql';
import {
transformAction,
transformExecutionStatus,
Expand Down

0 comments on commit 3266b39

Please sign in to comment.