2025-11-24 01:00:50 +01:00
|
|
|
/**
|
|
|
|
|
* Auto-import all email definitions to register them in the registry
|
|
|
|
|
*
|
|
|
|
|
* When this module is imported, all emails are automatically registered
|
|
|
|
|
* and available for use with the send() function.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Import all email definitions (side effect: registers them)
|
|
|
|
|
export * from './forgot-password';
|
|
|
|
|
export * from './welcome';
|
|
|
|
|
export * from './verify-email';
|
|
|
|
|
export * from './on-password-reset';
|
2025-12-02 09:54:38 +01:00
|
|
|
export * from './invite-teacher';
|
2025-11-24 01:00:50 +01:00
|
|
|
|
|
|
|
|
// Import types for schema mapping (must be after exports to avoid circular dependency)
|
|
|
|
|
import type { forgotPasswordEmail } from './forgot-password';
|
2025-12-02 09:54:38 +01:00
|
|
|
import type { inviteTeacherEmail } from './invite-teacher';
|
2025-11-24 01:00:50 +01:00
|
|
|
import type { onPasswordResetEmail } from './on-password-reset';
|
|
|
|
|
import type { verifyEmailEmail } from './verify-email';
|
|
|
|
|
import type { welcomeEmail } from './welcome';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Type mapping that maps each EmailId to its corresponding Zod schema type
|
|
|
|
|
* This is used for compile-time type inference in sendEmail()
|
|
|
|
|
*
|
|
|
|
|
* **Important**: When adding a new email, add its schema mapping here!
|
|
|
|
|
*/
|
|
|
|
|
export type EmailSchemas = {
|
|
|
|
|
forgotPassword: typeof forgotPasswordEmail.template.schema;
|
|
|
|
|
welcome: typeof welcomeEmail.template.schema;
|
|
|
|
|
verifyEmail: typeof verifyEmailEmail.template.schema;
|
|
|
|
|
onPasswordReset: typeof onPasswordResetEmail.template.schema;
|
2025-12-02 09:54:38 +01:00
|
|
|
inviteTeacher: typeof inviteTeacherEmail.template.schema;
|
2025-11-24 01:00:50 +01:00
|
|
|
};
|