From de05a62dcbdf84d06b993cc44390a20b6492b31a Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Wed, 26 Apr 2023 11:19:03 +0300 Subject: [PATCH] Fix types --- x-pack/plugins/cases/public/components/description/index.tsx | 4 ++-- .../public/management/cypress/tasks/api_fixtures.ts | 4 ++-- .../timelines/components/flyout/add_to_case_button/index.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/cases/public/components/description/index.tsx b/x-pack/plugins/cases/public/components/description/index.tsx index 6ebbf8edd6f45..6373f1fb7ec6e 100644 --- a/x-pack/plugins/cases/public/components/description/index.tsx +++ b/x-pack/plugins/cases/public/components/description/index.tsx @@ -22,13 +22,13 @@ import * as i18n from '../user_actions/translations'; import { useCasesContext } from '../cases_context/use_cases_context'; import { useLensDraftComment } from '../markdown_editor/plugins/lens/use_lens_draft_comment'; import { EditableMarkdown, ScrollableMarkdown } from '../markdown_editor'; -import type { Case } from '../../containers/types'; +import type { CaseUI } from '../../containers/types'; import type { OnUpdateFields } from '../case_view/types'; import { schema } from './schema'; const DESCRIPTION_ID = 'description'; export interface DescriptionProps { - caseData: Case; + caseData: CaseUI; isLoadingDescription: boolean; onUpdateField: ({ key, value, onSuccess, onError }: OnUpdateFields) => void; } diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/api_fixtures.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/api_fixtures.ts index 3b8b7cfae6340..708c10ac3cc4d 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/api_fixtures.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/api_fixtures.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { CaseResponse } from '@kbn/cases-plugin/common'; +import type { Case } from '@kbn/cases-plugin/common'; import type { RuleResponse } from '../../../../common/detection_engine/rule_schema'; import { request } from './common'; @@ -69,7 +69,7 @@ export const loadRule = (includeResponseActions = true) => }).then((response) => response.body); export const loadCase = (owner: string) => - request({ + request({ method: 'POST', url: '/api/cases', body: { diff --git a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx index 5da2a90ce14e4..508f0ffb63a4b 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/flyout/add_to_case_button/index.tsx @@ -10,7 +10,7 @@ import { EuiButton, EuiContextMenuPanel, EuiContextMenuItem, EuiPopover } from ' import React, { useCallback, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; -import type { Case } from '@kbn/cases-plugin/common'; +import type { CaseUI } from '@kbn/cases-plugin/common'; import { APP_ID, APP_UI_ID } from '../../../../../common/constants'; import { timelineSelectors } from '../../../store/timeline'; import { setInsertTimeline, showTimeline } from '../../../store/timeline/actions'; @@ -49,7 +49,7 @@ const AddToCaseButtonComponent: React.FC = ({ timelineId }) => { const [isCaseModalOpen, openCaseModal] = useState(false); const onRowClick = useCallback( - async (theCase?: Case) => { + async (theCase?: CaseUI) => { openCaseModal(false); await navigateToApp(APP_UI_ID, { deepLinkId: SecurityPageName.case,