@Darjusch Let's work on this branch to sync on potential changes to the email service <-> mongodb communication.
The email service works as follows:
We use react-email to generate good-looking HTML templates that we can fill with custom data. (e.g. First Name on "Hello ${firstName},".
We have lambda functions for the individual email templates in the src/functions/ folder.
These templates are rendered with the provided props through react-email/render.
The props are retrieved on the lambda handler by deconstructing the event.
You can test this behaviour in the Lambda GUI by creating a test event and providing an Event JSON with the necessary props.
These are the current interfaces for the Event JSON's:
sendSingleKitaNotificationsEmail
{
to: string; // email recipient
props: {
kitaName: string; // name of the kita the notifications are turned on for, e.g. "Kita Rosengarten"
consentId: string; // consent to send email (row uuid)
};
}
sendAreaNotificationsEmail
{
to: string; // email recipient
props: {
areaDescription: string; // description of the area notifications are turned on for, e.g. "Kollwitzkiez"
consentId: string;
}
}
@Darjusch Let's work on this branch to sync on potential changes to the email service <-> mongodb communication.
The email service works as follows:
react-email
to generate good-looking HTML templates that we can fill with custom data. (e.g. First Name on "Hello ${firstName},".src/functions/
folder.react-email/render
.event
.These are the current interfaces for the Event JSON's:
sendSingleKitaNotificationsEmail
sendAreaNotificationsEmail
sendServiceSignupEmail
These properties are required for a successful run of the lambda functions.