mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
feat: webhook data for completed (#7043)
Now we post status and statusValue with webhook.
This commit is contained in:
parent
fddb78380e
commit
dac3f4a186
@ -183,6 +183,7 @@ export class FeatureLifecycleService extends EventEmitter {
|
|||||||
await this.eventService.storeEvent(
|
await this.eventService.storeEvent(
|
||||||
new FeatureCompletedEvent({
|
new FeatureCompletedEvent({
|
||||||
featureName: feature,
|
featureName: feature,
|
||||||
|
data: status,
|
||||||
auditUser,
|
auditUser,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import type { FeatureToggle, IStrategyConfig, ITag, IVariant } from './model';
|
import type { FeatureToggle, IStrategyConfig, ITag, IVariant } from './model';
|
||||||
import type { IApiToken } from './models/api-token';
|
import type { IApiToken } from './models/api-token';
|
||||||
import type { IAuditUser, IUserWithRootRole } from './user';
|
import type { IAuditUser, IUserWithRootRole } from './user';
|
||||||
|
import type { FeatureLifecycleCompletedSchema } from '../openapi';
|
||||||
|
|
||||||
export const APPLICATION_CREATED = 'application-created' as const;
|
export const APPLICATION_CREATED = 'application-created' as const;
|
||||||
|
|
||||||
@ -634,14 +635,17 @@ export class FeatureCreatedEvent extends BaseEvent {
|
|||||||
|
|
||||||
export class FeatureCompletedEvent extends BaseEvent {
|
export class FeatureCompletedEvent extends BaseEvent {
|
||||||
readonly featureName: string;
|
readonly featureName: string;
|
||||||
|
readonly data: FeatureLifecycleCompletedSchema;
|
||||||
|
|
||||||
constructor(p: {
|
constructor(p: {
|
||||||
featureName: string;
|
featureName: string;
|
||||||
|
data: FeatureLifecycleCompletedSchema;
|
||||||
auditUser: IAuditUser;
|
auditUser: IAuditUser;
|
||||||
}) {
|
}) {
|
||||||
super(FEATURE_COMPLETED, p.auditUser);
|
super(FEATURE_COMPLETED, p.auditUser);
|
||||||
const { featureName } = p;
|
const { featureName, data } = p;
|
||||||
this.featureName = featureName;
|
this.featureName = featureName;
|
||||||
|
this.data = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user