From 24c036836ea1de55f2ddc2fcf97418ff0699d0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 13 Jul 2022 10:16:55 +0200 Subject: [PATCH] feat: add student discount requested event --- .../src/Domain/Event/StudentDiscountRequestedEvent.ts | 8 ++++++++ .../Domain/Event/StudentDiscountRequestedEventPayload.ts | 5 +++++ packages/domain-events/src/Domain/index.ts | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 packages/domain-events/src/Domain/Event/StudentDiscountRequestedEvent.ts create mode 100644 packages/domain-events/src/Domain/Event/StudentDiscountRequestedEventPayload.ts diff --git a/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEvent.ts b/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEvent.ts new file mode 100644 index 000000000..d4cd3123f --- /dev/null +++ b/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEvent.ts @@ -0,0 +1,8 @@ +import { DomainEventInterface } from './DomainEventInterface' + +import { StudentDiscountRequestedEventPayload } from './StudentDiscountRequestedEventPayload' + +export interface StudentDiscountRequestedEvent extends DomainEventInterface { + type: 'STUDENT_DISCOUNT_REQUESTED' + payload: StudentDiscountRequestedEventPayload +} diff --git a/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEventPayload.ts b/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEventPayload.ts new file mode 100644 index 000000000..264c4bee3 --- /dev/null +++ b/packages/domain-events/src/Domain/Event/StudentDiscountRequestedEventPayload.ts @@ -0,0 +1,5 @@ +export interface StudentDiscountRequestedEventPayload { + studentEmail: string + userEmail: string + adminApprovalLink: string +} diff --git a/packages/domain-events/src/Domain/index.ts b/packages/domain-events/src/Domain/index.ts index a79b600f7..baf7c8fbb 100644 --- a/packages/domain-events/src/Domain/index.ts +++ b/packages/domain-events/src/Domain/index.ts @@ -54,6 +54,8 @@ export * from './Event/SharedSubscriptionInvitationCanceledEvent' export * from './Event/SharedSubscriptionInvitationCanceledEventPayload' export * from './Event/SharedSubscriptionInvitationCreatedEvent' export * from './Event/SharedSubscriptionInvitationCreatedEventPayload' +export * from './Event/StudentDiscountRequestedEvent' +export * from './Event/StudentDiscountRequestedEventPayload' export * from './Event/SubscriptionCancelledEvent' export * from './Event/SubscriptionCancelledEventPayload' export * from './Event/SubscriptionPurchasedEvent'