From 4f0ac7a73c260fe5b9c33ee65249ec9ba754d7aa Mon Sep 17 00:00:00 2001 From: Ashokaditya Date: Thu, 22 Dec 2022 11:07:52 +0100 Subject: [PATCH] Revert "correctly name types and update class methods" This reverts commit 1314d9532f11bcd4544f2dd85ecfefb9066ae829. --- .../fleet/endpoint_fleet_services_factory.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts b/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts index f8979f52c91f0..807a04e716fc8 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/fleet/endpoint_fleet_services_factory.ts @@ -48,7 +48,7 @@ export class EndpointFleetServicesFactory implements EndpointFleetServicesFactor packages: packageService.asScoped(req), packagePolicy, - asScoped: this.asScoped.bind(this), + asInternal: this.asInternalUser.bind(this), }; } @@ -66,7 +66,7 @@ export class EndpointFleetServicesFactory implements EndpointFleetServicesFactor packages: packageService.asInternalUser, packagePolicy, - asInternal: this.asInternalUser.bind(this), + asScoped: this.asScoped.bind(this), internalReadonlySoClient: createInternalReadonlySoClient(this.savedObjectsStart), }; } @@ -82,20 +82,21 @@ export interface EndpointFleetServicesInterface { packagePolicy: PackagePolicyClient; } -export interface EndpointInternalFleetServicesInterface extends EndpointFleetServicesInterface { +export interface EndpointScopedFleetServicesInterface extends EndpointFleetServicesInterface { /** * get internal fleet services instance */ asInternal: EndpointFleetServicesFactoryInterface['asInternalUser']; - /** - * An internal SO client (readonly) that can be used with the Fleet services that require it - */ - internalReadonlySoClient: SavedObjectsClientContract; } -export interface EndpointScopedFleetServicesInterface extends EndpointFleetServicesInterface { +export interface EndpointInternalFleetServicesInterface extends EndpointFleetServicesInterface { /** * get scoped endpoint fleet services instance */ asScoped: EndpointFleetServicesFactoryInterface['asScoped']; + + /** + * An internal SO client (readonly) that can be used with the Fleet services that require it + */ + internalReadonlySoClient: SavedObjectsClientContract; }