MCP Server 2.0 (#452)
* MCP Server 2.0 - Updated application version from 2.23.14 to 2.24.0 in package.json. - MCP Server improved with new features - Migrated functionality from Dev Tools to MCP Server - Improved getMonitoringProvider not to crash application when misconfigured
This commit is contained in:
committed by
GitHub
parent
059408a70a
commit
f3ac595d06
39
packages/email-templates/src/registry.ts
Normal file
39
packages/email-templates/src/registry.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { renderAccountDeleteEmail } from './emails/account-delete.email';
|
||||
import { renderInviteEmail } from './emails/invite.email';
|
||||
import { renderOtpEmail } from './emails/otp.email';
|
||||
|
||||
/**
|
||||
* Registry of email template renderers.
|
||||
*
|
||||
* This is used to render email templates dynamically. Ex. list all available email templates in the MCP server.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const { html, subject } = await renderAccountDeleteEmail({
|
||||
* userDisplayName: 'John Doe',
|
||||
* productName: 'My SaaS App',
|
||||
* });
|
||||
*
|
||||
* await mailer.sendEmail({
|
||||
* to: 'user@example.com',
|
||||
* from: 'noreply@yourdomain.com',
|
||||
* subject,
|
||||
* html,
|
||||
* });
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* const { html, subject } = await renderAccountDeleteEmail({
|
||||
* userDisplayName: 'John Doe',
|
||||
* productName: 'My SaaS App',
|
||||
* });
|
||||
*
|
||||
*/
|
||||
export const EMAIL_TEMPLATE_RENDERERS = {
|
||||
'account-delete-email': renderAccountDeleteEmail,
|
||||
'invite-email': renderInviteEmail,
|
||||
'otp-email': renderOtpEmail,
|
||||
};
|
||||
|
||||
export type EmailTemplateRenderer =
|
||||
(typeof EMAIL_TEMPLATE_RENDERERS)[keyof typeof EMAIL_TEMPLATE_RENDERERS];
|
||||
Reference in New Issue
Block a user