-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial schema sketch for email templates #6868
base: master
Are you sure you want to change the base?
Conversation
97adb84
to
4b2c5f9
Compare
4b2c5f9
to
ffd98d0
Compare
create type ext::auth::EmailTemplate extending cfg::ConfigObject { | ||
create required property subject: std::str { | ||
create annotation std::description := | ||
"Subject of the email."; | ||
}; | ||
create required property html: std::str { | ||
create annotation std::description := | ||
"Body of the email."; | ||
}; | ||
create required property plain_text: std::str { | ||
create annotation std::description := | ||
"Body of the email in plain text."; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elprans I wanted to check and see if this is what you had in mind based on our discussion earlier today:
create type ext::auth::EmailTemplate extending cfg::ConfigObject { | |
create required property subject: std::str { | |
create annotation std::description := | |
"Subject of the email."; | |
}; | |
create required property html: std::str { | |
create annotation std::description := | |
"Body of the email."; | |
}; | |
create required property plain_text: std::str { | |
create annotation std::description := | |
"Body of the email in plain text."; | |
}; | |
}; | |
create type ext::auth::EmailTemplate extending cfg::ConfigObject { | |
create required property purpose: std::str { | |
create constraint exclusive; | |
}; | |
create required property subject: std::str { | |
create annotation std::description := | |
"Subject of the email."; | |
}; | |
create required property html: std::str { | |
create annotation std::description := | |
"Body of the email."; | |
}; | |
create required property plain_text: std::str { | |
create annotation std::description := | |
"Body of the email in plain text."; | |
}; | |
}; |
And then adding multi email_templates: ext::auth::EmailTemplate;
to the existing AuthConfig
object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One advantage of the original link approach is that we can populate some default and make them required
for robustness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought about default
here, but I was wondering if a huge blob of HTML is really something we want to have in the schema. Also might be nice to have the default HTML be something that we "upgrade" over time without having to require a schema change.
Some discussion points:
SMTPConfig
to these templates somehow?SMTPConfig
if you have any of the email factors enabled? 🤔