From ad1d6a3972d6589c02582052fd26374524d7bbae Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Fri, 18 Dec 2020 10:30:42 -0500 Subject: [PATCH 1/2] Deprecate callCluster in alerts and actions services --- x-pack/plugins/actions/server/types.ts | 3 +++ x-pack/plugins/alerts/server/types.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/x-pack/plugins/actions/server/types.ts b/x-pack/plugins/actions/server/types.ts index b311a602212c..1caae8166e1a 100644 --- a/x-pack/plugins/actions/server/types.ts +++ b/x-pack/plugins/actions/server/types.ts @@ -31,6 +31,9 @@ export type ActionTypeSecrets = Record; export type ActionTypeParams = Record; export interface Services { + /** + * @deprecated use `scopedClusterClient` + */ callCluster: ILegacyScopedClusterClient['callAsCurrentUser']; savedObjectsClient: SavedObjectsClientContract; scopedClusterClient: ElasticsearchClient; diff --git a/x-pack/plugins/alerts/server/types.ts b/x-pack/plugins/alerts/server/types.ts index 8704068c3e51..166372ec7c08 100644 --- a/x-pack/plugins/alerts/server/types.ts +++ b/x-pack/plugins/alerts/server/types.ts @@ -47,6 +47,9 @@ declare module 'src/core/server' { } export interface Services { + /** + * @deprecated use `scopedClusterClient` + */ callCluster: ILegacyScopedClusterClient['callAsCurrentUser']; savedObjectsClient: SavedObjectsClientContract; scopedClusterClient: ElasticsearchClient; From f75c2738e1ceb27956ce6f00dcd64f7c5beee343 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Fri, 18 Dec 2020 10:37:17 -0500 Subject: [PATCH 2/2] Update deprecation comment --- x-pack/plugins/actions/server/types.ts | 2 +- x-pack/plugins/alerts/server/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/actions/server/types.ts b/x-pack/plugins/actions/server/types.ts index 1caae8166e1a..81d6c3550a53 100644 --- a/x-pack/plugins/actions/server/types.ts +++ b/x-pack/plugins/actions/server/types.ts @@ -32,7 +32,7 @@ export type ActionTypeParams = Record; export interface Services { /** - * @deprecated use `scopedClusterClient` + * @deprecated Use `scopedClusterClient` instead. */ callCluster: ILegacyScopedClusterClient['callAsCurrentUser']; savedObjectsClient: SavedObjectsClientContract; diff --git a/x-pack/plugins/alerts/server/types.ts b/x-pack/plugins/alerts/server/types.ts index 166372ec7c08..e9fd6b82d581 100644 --- a/x-pack/plugins/alerts/server/types.ts +++ b/x-pack/plugins/alerts/server/types.ts @@ -48,7 +48,7 @@ declare module 'src/core/server' { export interface Services { /** - * @deprecated use `scopedClusterClient` + * @deprecated Use `scopedClusterClient` instead. */ callCluster: ILegacyScopedClusterClient['callAsCurrentUser']; savedObjectsClient: SavedObjectsClientContract;