mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-06 01:15:28 +02:00
chore: add release plan events (#8715)
Adds new release plan events. These will be triggered by the new release plans API.
This commit is contained in:
parent
d42c10b0fe
commit
11d264541d
@ -210,6 +210,12 @@ export const RELEASE_PLAN_TEMPLATE_UPDATED =
|
|||||||
'release-plan-template-updated' as const;
|
'release-plan-template-updated' as const;
|
||||||
export const RELEASE_PLAN_TEMPLATE_DELETED =
|
export const RELEASE_PLAN_TEMPLATE_DELETED =
|
||||||
'release-plan-template-deleted' as const;
|
'release-plan-template-deleted' as const;
|
||||||
|
|
||||||
|
export const RELEASE_PLAN_ADDED = 'release-plan-added' as const;
|
||||||
|
export const RELEASE_PLAN_REMOVED = 'release-plan-removed' as const;
|
||||||
|
export const RELEASE_PLAN_MILESTONE_STARTED =
|
||||||
|
'release-plan-milestone-started' as const;
|
||||||
|
|
||||||
export const USER_PREFERENCE_UPDATED = 'user-preference-updated' as const;
|
export const USER_PREFERENCE_UPDATED = 'user-preference-updated' as const;
|
||||||
|
|
||||||
export const IEventTypes = [
|
export const IEventTypes = [
|
||||||
@ -362,6 +368,9 @@ export const IEventTypes = [
|
|||||||
RELEASE_PLAN_TEMPLATE_CREATED,
|
RELEASE_PLAN_TEMPLATE_CREATED,
|
||||||
RELEASE_PLAN_TEMPLATE_UPDATED,
|
RELEASE_PLAN_TEMPLATE_UPDATED,
|
||||||
RELEASE_PLAN_TEMPLATE_DELETED,
|
RELEASE_PLAN_TEMPLATE_DELETED,
|
||||||
|
RELEASE_PLAN_ADDED,
|
||||||
|
RELEASE_PLAN_REMOVED,
|
||||||
|
RELEASE_PLAN_MILESTONE_STARTED,
|
||||||
USER_PREFERENCE_UPDATED,
|
USER_PREFERENCE_UPDATED,
|
||||||
] as const;
|
] as const;
|
||||||
export type IEventType = (typeof IEventTypes)[number];
|
export type IEventType = (typeof IEventTypes)[number];
|
||||||
@ -2057,6 +2066,42 @@ export class ReleasePlanTemplateDeletedEvent extends BaseEvent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ReleasePlanAddedEvent extends BaseEvent {
|
||||||
|
readonly data: any;
|
||||||
|
constructor(eventData: {
|
||||||
|
data: any;
|
||||||
|
auditUser: IAuditUser;
|
||||||
|
}) {
|
||||||
|
super(RELEASE_PLAN_ADDED, eventData.auditUser);
|
||||||
|
this.data = eventData.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReleasePlanRemovedEvent extends BaseEvent {
|
||||||
|
readonly preData: any;
|
||||||
|
constructor(eventData: {
|
||||||
|
preData: any;
|
||||||
|
auditUser: IAuditUser;
|
||||||
|
}) {
|
||||||
|
super(RELEASE_PLAN_REMOVED, eventData.auditUser);
|
||||||
|
this.preData = eventData.preData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ReleasePlanMilestoneStartedEvent extends BaseEvent {
|
||||||
|
readonly preData: any;
|
||||||
|
readonly data: any;
|
||||||
|
constructor(eventData: {
|
||||||
|
preData: any;
|
||||||
|
data: any;
|
||||||
|
auditUser: IAuditUser;
|
||||||
|
}) {
|
||||||
|
super(RELEASE_PLAN_MILESTONE_STARTED, eventData.auditUser);
|
||||||
|
this.preData = eventData.preData;
|
||||||
|
this.data = eventData.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface IUserEventData
|
interface IUserEventData
|
||||||
extends Pick<
|
extends Pick<
|
||||||
IUserWithRootRole,
|
IUserWithRootRole,
|
||||||
|
Loading…
Reference in New Issue
Block a user