From 4fe928224d07a8bd5ffb929d3c5c0285a5382ba7 Mon Sep 17 00:00:00 2001 From: Steph Milovic <stephanie.milovic@elastic.co> Date: Thu, 5 Nov 2020 13:03:29 -0700 Subject: [PATCH] fix types --- .../server/builtin_action_types/jira/mocks.ts | 15 +++++++++++++- .../builtin_action_types/jira/service.ts | 20 +++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/actions/server/builtin_action_types/jira/mocks.ts b/x-pack/plugins/actions/server/builtin_action_types/jira/mocks.ts index 660c82dc38b84..87a0f156a0c2a 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/jira/mocks.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/jira/mocks.ts @@ -73,7 +73,20 @@ const createMock = (): jest.Mocked<ExternalService> => { key: 'RJ-107', title: 'Test title', })), - getFields: jest.fn().mockImplementation(() => jiraCommonFields), + getFields: jest.fn().mockImplementation(() => ({ + description: { + allowedValues: [], + defaultValue: {}, + required: true, + schema: { type: 'string' }, + }, + summary: { + allowedValues: [], + defaultValue: {}, + required: true, + schema: { type: 'string' }, + }, + })), }; service.createComment.mockImplementationOnce(() => diff --git a/x-pack/plugins/actions/server/builtin_action_types/jira/service.ts b/x-pack/plugins/actions/server/builtin_action_types/jira/service.ts index 5f583d31a70e7..b3c5bb4a84de5 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/jira/service.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/jira/service.ts @@ -8,22 +8,20 @@ import axios from 'axios'; import { Logger } from '../../../../../../src/core/server'; import { - ExternalServiceCredentials, - ExternalService, - CreateIncidentParams, - UpdateIncidentParams, - JiraPublicConfigurationType, - JiraSecretConfigurationType, - Fields, CreateCommentParams, - Incident, - ResponseError, + CreateIncidentParams, + ExternalService, ExternalServiceCommentResponse, + ExternalServiceCredentials, ExternalServiceIncidentResponse, - ExternalServiceFields, + Fields, FieldSchema, - GetFieldsByIssueTypeResponse, GetCommonFieldsResponse, + Incident, + JiraPublicConfigurationType, + JiraSecretConfigurationType, + ResponseError, + UpdateIncidentParams, } from './types'; import * as i18n from './translations';