From 2542cf6f9a40c3a5eb4e11ead3cbbc25afefae48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Wed, 7 Dec 2022 07:12:21 +0100 Subject: [PATCH] fix(auth): remove not needed event from factory --- .../src/Domain/Event/DomainEventFactory.ts | 24 ------------------- .../Event/DomainEventFactoryInterface.ts | 10 -------- 2 files changed, 34 deletions(-) diff --git a/packages/auth/src/Domain/Event/DomainEventFactory.ts b/packages/auth/src/Domain/Event/DomainEventFactory.ts index 56837a506..9f630787c 100644 --- a/packages/auth/src/Domain/Event/DomainEventFactory.ts +++ b/packages/auth/src/Domain/Event/DomainEventFactory.ts @@ -21,7 +21,6 @@ import { ExitDiscountApplyRequestedEvent, UserContentSizeRecalculationRequestedEvent, MuteEmailsSettingChangedEvent, - EmailSubscriptionSyncRequestedEvent, } from '@standardnotes/domain-events' import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates' import { TimerInterface } from '@standardnotes/time' @@ -34,29 +33,6 @@ import { DomainEventFactoryInterface } from './DomainEventFactoryInterface' export class DomainEventFactory implements DomainEventFactoryInterface { constructor(@inject(TYPES.Timer) private timer: TimerInterface) {} - createEmailSubscriptionSyncRequestedEvent(dto: { - username: string - userUuid: string - subscriptionPlanName: string | null - muteFailedBackupsEmails: boolean - muteFailedCloudBackupsEmails: boolean - muteMarketingEmails: boolean - muteSignInEmails: boolean - }): EmailSubscriptionSyncRequestedEvent { - return { - type: 'EMAIL_SUBSCRIPTION_SYNC_REQUESTED', - createdAt: this.timer.getUTCDate(), - meta: { - correlation: { - userIdentifier: dto.userUuid, - userIdentifierType: 'uuid', - }, - origin: DomainEventService.Auth, - }, - payload: dto, - } - } - createMuteEmailsSettingChangedEvent(dto: { username: string mute: boolean diff --git a/packages/auth/src/Domain/Event/DomainEventFactoryInterface.ts b/packages/auth/src/Domain/Event/DomainEventFactoryInterface.ts index 1765263a2..48db562a9 100644 --- a/packages/auth/src/Domain/Event/DomainEventFactoryInterface.ts +++ b/packages/auth/src/Domain/Event/DomainEventFactoryInterface.ts @@ -19,7 +19,6 @@ import { ExitDiscountApplyRequestedEvent, UserContentSizeRecalculationRequestedEvent, MuteEmailsSettingChangedEvent, - EmailSubscriptionSyncRequestedEvent, } from '@standardnotes/domain-events' import { InviteeIdentifierType } from '../SharedSubscription/InviteeIdentifierType' @@ -98,13 +97,4 @@ export interface DomainEventFactoryInterface { mute: boolean emailSubscriptionRejectionLevel: string }): MuteEmailsSettingChangedEvent - createEmailSubscriptionSyncRequestedEvent(dto: { - username: string - userUuid: string - subscriptionPlanName: string | null - muteFailedBackupsEmails: boolean - muteFailedCloudBackupsEmails: boolean - muteMarketingEmails: boolean - muteSignInEmails: boolean - }): EmailSubscriptionSyncRequestedEvent }