From e8dcba78f958b124748c0aa14c8f14699bb61b07 Mon Sep 17 00:00:00 2001 From: Candace Park Date: Thu, 23 Sep 2021 12:55:20 -0400 Subject: [PATCH 1/2] remove updatedflow boolean --- .../common/endpoint/schema/trusted_apps.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts index 6e99db7e1ed0b..4b04f15682777 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/trusted_apps.ts @@ -124,7 +124,7 @@ const EntriesSchema = schema.conditional( ) ); -const getTrustedAppForOsScheme = (forUpdateFlow: boolean = false) => +const getTrustedAppForOsScheme = () => schema.object({ name: schema.string({ minLength: 1, maxLength: 256 }), description: schema.maybe(schema.string({ minLength: 0, maxLength: 256, defaultValue: '' })), @@ -143,7 +143,7 @@ const getTrustedAppForOsScheme = (forUpdateFlow: boolean = false) => }), ]), entries: EntriesSchema, - ...(forUpdateFlow ? { version: schema.maybe(schema.string()) } : {}), + version: schema.maybe(schema.string()), }); export const PostTrustedAppCreateRequestSchema = { @@ -154,5 +154,5 @@ export const PutTrustedAppUpdateRequestSchema = { params: schema.object({ id: schema.string(), }), - body: getTrustedAppForOsScheme(true), + body: getTrustedAppForOsScheme(), }; From 2a2d2487f48608047bcf3a8ef67a7485d7aa7e06 Mon Sep 17 00:00:00 2001 From: Candace Park Date: Tue, 2 Nov 2021 16:30:11 -0400 Subject: [PATCH 2/2] remove ts ignores for security solution mgmt --- .../server/endpoint/routes/trusted_apps/service.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts index d62c1ecd8c577..7a4b2372ece8f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/trusted_apps/service.ts @@ -256,10 +256,8 @@ export const updateTrustedApp = async ( try { updatedTrustedAppExceptionItem = await exceptionsListClient.updateExceptionListItem( - // @ts-ignore 4.3.5 upgrade updatedTrustedAppToUpdateExceptionListItemOptions( currentTrustedAppExceptionItem, - // @ts-ignore 4.3.5 upgrade updatedTrustedApp ) );