-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
100 additions
and
19 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
migrations/1719224595366-seedNotificationTypeForSendEmailConfirmation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
import { NOTIFICATION_CATEGORY } from '../src/types/general'; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
import { NotificationType, SCHEMA_VALIDATORS_NAMES } from '../src/entities/notificationType'; | ||
import { NOTIFICATIONS_EVENT_NAMES } from '../src/types/notifications'; | ||
|
||
const EmailConfirmationNotificationType = [ | ||
{ | ||
name: NOTIFICATIONS_EVENT_NAMES.SEND_EMAIL_CONFIRMATION, | ||
description: NOTIFICATIONS_EVENT_NAMES.SEND_EMAIL_CONFIRMATION, | ||
microService: MICRO_SERVICES.givethio, | ||
category: NOTIFICATION_CATEGORY.ORTTO, | ||
schemaValidator: SCHEMA_VALIDATORS_NAMES.SEND_EMAIL_CONFIRMATION, | ||
} | ||
] | ||
|
||
export class seedNotificationTypeForSendEmailConfirmation1719224595366 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.manager.save(NotificationType, EmailConfirmationNotificationType); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM notification_type WHERE "name" = 'Send email confirmation';`, | ||
); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
migrations/1719410008992-seedNotificationTypeForOnboardingGuide.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
import { NotificationType, SCHEMA_VALIDATORS_NAMES } from '../src/entities/notificationType'; | ||
import { NOTIFICATION_CATEGORY, NOTIFICATION_TYPE_NAMES } from '../src/types/general'; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
|
||
const OnboardingNotificationType = [ | ||
{ | ||
name: NOTIFICATION_TYPE_NAMES.SUBSCRIBE_ONBOARDING, | ||
description: NOTIFICATION_TYPE_NAMES.SUBSCRIBE_ONBOARDING, | ||
microService: MICRO_SERVICES.givethio, | ||
category: NOTIFICATION_CATEGORY.ORTTO, | ||
schemaValidator: SCHEMA_VALIDATORS_NAMES.SUBSCRIBE_ONBOARDING, | ||
} | ||
] | ||
|
||
export class seedNotificationTypeForOnboardingGuide1719410008992 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.manager.save(NotificationType, OnboardingNotificationType); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM notification_type WHERE "name" = 'Subscribe onboarding';`, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters