-
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.
Merge pull request #107 from Giveth/Release
Release 2.3.0
- Loading branch information
Showing
21 changed files
with
1,049 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"opRetro": { | ||
"projectId": "0xe434930e189c807b137ff0d8e2fa6a95eaa57dde574143a02ca0d7fb31a40bea" | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
migrations/1718888344202-seedNotificationTypeForNotifyRewardAmount.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, NOTIFICATION_TYPE_NAMES } from '../src/types/general'; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
import { NotificationType, SCHEMA_VALIDATORS_NAMES } from '../src/entities/notificationType'; | ||
|
||
const NotifyRewardAmountNotificationType = [ | ||
{ | ||
name: NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT, | ||
description: NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT, | ||
microService: MICRO_SERVICES.givethio, | ||
category: NOTIFICATION_CATEGORY.GENERAL, | ||
schemaValidator: SCHEMA_VALIDATORS_NAMES.NOTIFY_REWARD_AMOUNT, | ||
title: "Notify reward report", | ||
} | ||
] | ||
|
||
export class seedNotificationTypeForNotifyRewardAmount1718888344202 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.manager.save(NotificationType, NotifyRewardAmountNotificationType); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`DELETE FROM notification_type WHERE "name" = ${NOTIFICATION_TYPE_NAMES.NOTIFY_REWARD_AMOUNT};`, | ||
); | ||
} | ||
} |
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';`, | ||
); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
migrations/1720553769343-changeMicroserviceAndCategoryOfNotifyRewardNotificationType.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,23 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
import { MICRO_SERVICES } from '../src/utils/utils'; | ||
import { NOTIFICATION_CATEGORY } from '../src/types/general'; | ||
|
||
export class changeMicroserviceAndCategoryOfNotifyRewardNotificationType1720553769343 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
UPDATE notification_type | ||
SET "microService" = '${MICRO_SERVICES.notifyReward}', | ||
category = '${NOTIFICATION_CATEGORY.ORTTO}' | ||
WHERE name = 'Notify reward amount'; | ||
`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
UPDATE notification_type | ||
SET "microService" = '${MICRO_SERVICES.givethio}', | ||
categoty = '${NOTIFICATION_CATEGORY.GENERAL}' | ||
WHERE name = 'Notify reward amount'; | ||
`); | ||
} | ||
} |
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" | ||
|
||
export class seedThirdPartyForNotifyReward1720828190666 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
if ( | ||
process.env.NODE_ENV === 'test' || | ||
process.env.NODE_ENV === 'development' | ||
) { | ||
// Create third part record for notifyreward in development and test ENVs | ||
await queryRunner.query(` | ||
INSERT INTO third_party( | ||
"microService", secret, "isActive") | ||
VALUES | ||
('notifyreward', 'secret', true) | ||
; | ||
`); | ||
} | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(` | ||
DELETE FROM third_party | ||
WHERE "microService" = 'notifyreward'; | ||
`); | ||
} | ||
|
||
} |
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
Oops, something went wrong.