Packages@robojs/auth
TemplateConfig
Type Alias: TemplateConfig
type TemplateConfig =
| {
html: TemplateValue<string | undefined>;
react: ReactTemplateRenderer;
subject: TemplateValue<string>;
text: TemplateValue<string | undefined>;
}
| {
templateId: string;
variables: (ctx) => Record<string, unknown>;
};Describes how automated emails are rendered or composed—either via inline content (subject/html/text/React) or a provider-managed template id.
- Inline mode: supply
subjectplushtml,text, and/orreact - Provider mode: supply
templateIdplus optionalvariables
Examples
{ subject: ctx => `Welcome ${ctx.user.name}`, react: WelcomeEmail }{ templateId: 'd-reset', variables: ctx => ({ link: ctx.links?.resetPassword }) }