diff --git a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts index 0664522875..ff976d6e8d 100644 --- a/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts +++ b/src/lib/features/feature-lifecycle/feature-lifecycle-service.ts @@ -183,6 +183,7 @@ export class FeatureLifecycleService extends EventEmitter { await this.eventService.storeEvent( new FeatureCompletedEvent({ featureName: feature, + data: status, auditUser, }), ); diff --git a/src/lib/types/events.ts b/src/lib/types/events.ts index 5bb12f6685..296e9b20fa 100644 --- a/src/lib/types/events.ts +++ b/src/lib/types/events.ts @@ -1,6 +1,7 @@ import type { FeatureToggle, IStrategyConfig, ITag, IVariant } from './model'; import type { IApiToken } from './models/api-token'; import type { IAuditUser, IUserWithRootRole } from './user'; +import type { FeatureLifecycleCompletedSchema } from '../openapi'; export const APPLICATION_CREATED = 'application-created' as const; @@ -634,14 +635,17 @@ export class FeatureCreatedEvent extends BaseEvent { export class FeatureCompletedEvent extends BaseEvent { readonly featureName: string; + readonly data: FeatureLifecycleCompletedSchema; constructor(p: { featureName: string; + data: FeatureLifecycleCompletedSchema; auditUser: IAuditUser; }) { super(FEATURE_COMPLETED, p.auditUser); - const { featureName } = p; + const { featureName, data } = p; this.featureName = featureName; + this.data = data; } }