diff --git a/plugins/events-node/api-report.md b/plugins/events-node/api-report.md index a735007e3b..9ebaf1a536 100644 --- a/plugins/events-node/api-report.md +++ b/plugins/events-node/api-report.md @@ -23,10 +23,10 @@ export class DefaultEventsService implements EventsService { lifecycle: LifecycleService; }, ): EventsService; - // @deprecated (undocumented) - publish(_params: EventParams): Promise; - // @deprecated (undocumented) - subscribe(_options: EventsServiceSubscribeOptions): Promise; + // (undocumented) + publish(params: EventParams): Promise; + // (undocumented) + subscribe(options: EventsServiceSubscribeOptions): Promise; } // @public @deprecated diff --git a/plugins/events-node/src/api/DefaultEventsService.ts b/plugins/events-node/src/api/DefaultEventsService.ts index 5a2712fc89..9e2509539a 100644 --- a/plugins/events-node/src/api/DefaultEventsService.ts +++ b/plugins/events-node/src/api/DefaultEventsService.ts @@ -23,7 +23,7 @@ import { import { EventParams } from './EventParams'; import { EventsService, EventsServiceSubscribeOptions } from './EventsService'; import { DefaultApiClient } from '../generated'; -import { NotImplementedError, ResponseError } from '@backstage/errors'; +import { ResponseError } from '@backstage/errors'; const POLL_BACKOFF_START_MS = 1_000; const POLL_BACKOFF_MAX_MS = 60_000; @@ -386,13 +386,11 @@ export class DefaultEventsService implements EventsService { return service; } - /** @deprecated this method should not be called */ - async publish(_params: EventParams): Promise { - throw new NotImplementedError(); + async publish(params: EventParams): Promise { + await this.localBus.publish(params); } - /** @deprecated this method should not be called */ - async subscribe(_options: EventsServiceSubscribeOptions): Promise { - throw new NotImplementedError(); + async subscribe(options: EventsServiceSubscribeOptions): Promise { + this.localBus.subscribe(options); } }