1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

feat: update feature completed payload to have boolean instead of string (#7855)

For easy gitar integration, we need to have boolean in the event
payload.
We might rethink it when we add variants, but currently enabled with
variants is not used.
This commit is contained in:
Jaanus Sellin 2024-08-13 12:43:49 +03:00 committed by GitHub
parent 17e2102f0e
commit bbdb5e635b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -186,7 +186,7 @@ export class FeatureLifecycleService {
new FeatureCompletedEvent({
project: projectId,
featureName: feature,
data: status,
data: { ...status, kept: status.status === 'kept' },
auditUser,
}),
);

View File

@ -8,9 +8,9 @@ import type {
} from './model';
import type { IApiToken } from './models/api-token';
import type { IAuditUser, IUserWithRootRole } from './user';
import type { FeatureLifecycleCompletedSchema } from '../openapi';
import type { ITagType } from '../features/tag-type/tag-type-store-type';
import type { IFeatureAndTag } from './stores/feature-tag-store';
import type { FeatureLifecycleCompletedSchema } from '../openapi';
export const APPLICATION_CREATED = 'application-created' as const;
@ -749,13 +749,13 @@ export class FeatureTagImport extends BaseEvent {
export class FeatureCompletedEvent extends BaseEvent {
readonly featureName: string;
readonly data: FeatureLifecycleCompletedSchema;
readonly data: FeatureLifecycleCompletedSchema & { kept: boolean };
readonly project: string;
constructor(p: {
project: string;
featureName: string;
data: FeatureLifecycleCompletedSchema;
data: FeatureLifecycleCompletedSchema & { kept: boolean };
auditUser: IAuditUser;
}) {
super(FEATURE_COMPLETED, p.auditUser);