feat(web): send test email button (#10011)

* feat(web): test email button

* openapi

* UI button

* Show notification

* pr feedback

* remove jobs

* send email directly from repository and add feedback

* avoid sending many emails

* linter

* pr feedback

* lint

* lint

* lint
This commit is contained in:
Alex
2024-06-07 11:34:09 -05:00
committed by GitHub
parent d5f3d98dfc
commit 9ac2ac2fcb
15 changed files with 380 additions and 17 deletions

View File

@@ -26,6 +26,8 @@ export type SmtpOptions = {
};
export enum EmailTemplate {
TEST_EMAIL = 'test',
// AUTH
WELCOME = 'welcome',
RESET_PASSWORD = 'reset-password',
@@ -39,6 +41,10 @@ interface BaseEmailProps {
baseUrl: string;
}
export interface TestEmailProps extends BaseEmailProps {
displayName: string;
}
export interface WelcomeEmailProps extends BaseEmailProps {
displayName: string;
username: string;
@@ -61,6 +67,10 @@ export interface AlbumUpdateEmailProps extends BaseEmailProps {
}
export type EmailRenderRequest =
| {
template: EmailTemplate.TEST_EMAIL;
data: TestEmailProps;
}
| {
template: EmailTemplate.WELCOME;
data: WelcomeEmailProps;