diff --git a/api/sample.env b/api/sample.env index 2edb938dd5c..bf5178cceab 100644 --- a/api/sample.env +++ b/api/sample.env @@ -261,6 +261,13 @@ MAILING_PROVIDER=mailpit # default: none # BREVO_TARGET_PROFILE_NOT_CERTIFIABLE_TEMPLATE_ID= +# ID of the template used to notify the user about its account deletion +# +# presence: required only if emailing is enabled and provider is Brevo +# type: Number +# default: none +# BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID= + # String for links in emails redirect to a specific domain when user comes from french domain # diff --git a/api/src/shared/config.js b/api/src/shared/config.js index 13ec9ce74cb..f3c8975ac4b 100644 --- a/api/src/shared/config.js +++ b/api/src/shared/config.js @@ -276,15 +276,16 @@ const configuration = (function () { apiKey: process.env.BREVO_API_KEY, templates: { accountCreationTemplateId: process.env.BREVO_ACCOUNT_CREATION_TEMPLATE_ID, - organizationInvitationTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_TEMPLATE_ID, - organizationInvitationScoTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_SCO_TEMPLATE_ID, + accountRecoveryTemplateId: process.env.BREVO_ACCOUNT_RECOVERY_TEMPLATE_ID, + acquiredCleaResultTemplateId: process.env.BREVO_CLEA_ACQUIRED_RESULT_TEMPLATE_ID, certificationCenterInvitationTemplateId: process.env.BREVO_CERTIFICATION_CENTER_INVITATION_TEMPLATE_ID, - passwordResetTemplateId: process.env.BREVO_PASSWORD_RESET_TEMPLATE_ID, certificationResultTemplateId: process.env.BREVO_CERTIFICATION_RESULT_TEMPLATE_ID, - accountRecoveryTemplateId: process.env.BREVO_ACCOUNT_RECOVERY_TEMPLATE_ID, - emailVerificationCodeTemplateId: process.env.BREVO_EMAIL_VERIFICATION_CODE_TEMPLATE_ID, cpfEmailTemplateId: process.env.BREVO_CPF_TEMPLATE_ID, - acquiredCleaResultTemplateId: process.env.BREVO_CLEA_ACQUIRED_RESULT_TEMPLATE_ID, + emailVerificationCodeTemplateId: process.env.BREVO_EMAIL_VERIFICATION_CODE_TEMPLATE_ID, + organizationInvitationTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_TEMPLATE_ID, + organizationInvitationScoTemplateId: process.env.BREVO_ORGANIZATION_INVITATION_SCO_TEMPLATE_ID, + passwordResetTemplateId: process.env.BREVO_PASSWORD_RESET_TEMPLATE_ID, + selfAccountDeletionTemplateId: process.env.BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID, targetProfileNotCertifiableTemplateId: process.env.BREVO_TARGET_PROFILE_NOT_CERTIFIABLE_TEMPLATE_ID, }, }, diff --git a/api/src/shared/infrastructure/validate-environment-variables.js b/api/src/shared/infrastructure/validate-environment-variables.js index 07b59c4e7a3..6523da85ef3 100644 --- a/api/src/shared/infrastructure/validate-environment-variables.js +++ b/api/src/shared/infrastructure/validate-environment-variables.js @@ -8,6 +8,7 @@ const schema = Joi.object({ BREVO_ORGANIZATION_INVITATION_SCO_TEMPLATE_ID: Joi.number().optional(), BREVO_ORGANIZATION_INVITATION_TEMPLATE_ID: Joi.number().optional(), BREVO_PASSWORD_RESET_TEMPLATE_ID: Joi.number().optional(), + BREVO_SELF_ACCOUNT_DELETION_TEMPLATE_ID: Joi.number().optional(), CONTAINER_VERSION: Joi.string().optional(), CPF_EXPORTS_STORAGE_ACCESS_KEY_ID: Joi.string().optional(), CPF_EXPORTS_STORAGE_BUCKET_NAME: Joi.string().optional(), diff --git a/api/translations/en.json b/api/translations/en.json index a7194451939..b31968a7f87 100644 --- a/api/translations/en.json +++ b/api/translations/en.json @@ -213,6 +213,14 @@ "REJECTED_AUTOMATICALLY_COMMENT": "The candidate did not answer correctly to more than 50% of the questions asked, this invalidated his entire certification, and therefore resulted in a score of 0 pix" } }, + "common": { + "email": { + "contactUs": "contact us here", + "doNotAnswer": "This is an automated email message, please do not reply.", + "moreOn": "More on", + "pixPresentation": "Pix is the online service to assess, develop and certify your digital skills." + } + }, "csv-import-values": { "sup-organization-learner": { "diplomas": { @@ -375,6 +383,17 @@ }, "subject": "Pix password reset request" }, + "self-account-deletion-email": { + "params": { + "hello": "Hello {firstName},", + "requestConfirmation": "Following your request, we can confirm that your Pix account and personal data have been deleted.", + "seeYouSoon": "We hope to see you soon for new digital adventures.", + "signing": "The Pix team", + "title": "Deleting your account", + "warning": "If you are not the source of this request, please contact support." + }, + "subject": "Deleting your account" + }, "verification-code-email": { "body": { "context": "You’ve requested to change the email address linked to your account. To continue, enter the following verification code on Pix:", diff --git a/api/translations/es.json b/api/translations/es.json index a408bb9af0d..cb685061b08 100644 --- a/api/translations/es.json +++ b/api/translations/es.json @@ -227,6 +227,14 @@ "REJECTED_AUTOMATICALLY_COMMENT": "El candidato respondió incorrectamente a más del 50% de las preguntas, lo que invalidó toda su certificación y le supuso una puntuación de 0 píxeles." } }, + "common": { + "email": { + "contactUs": "contact us here", + "doNotAnswer": "This is an automated email message, please do not reply.", + "moreOn": "More on", + "pixPresentation": "Pix is the online service to assess, develop and certify your digital skills." + } + }, "csv-import-values": { "sup-organization-learner": { "diplomas": { @@ -387,6 +395,17 @@ }, "subject": "Solicitud de restablecimiento de la contraseña Pix" }, + "self-account-deletion-email": { + "params": { + "hello": "Hello {firstName},", + "requestConfirmation": "Following your request, we can confirm that your Pix account and personal data have been deleted.", + "seeYouSoon": "We hope to see you soon for new digital adventures.", + "signing": "The Pix team", + "title": "Deleting your account", + "warning": "If you are not the source of this request, please contact support." + }, + "subject": "Deleting your account" + }, "verification-code-email": { "body": { "context": "Deseas cambiar la dirección de correo electrónico de tu cuenta. Para continuar, introduce el siguiente código en Pix:", diff --git a/api/translations/fr.json b/api/translations/fr.json index 766beb9d76e..9ed7536bf3e 100644 --- a/api/translations/fr.json +++ b/api/translations/fr.json @@ -227,6 +227,14 @@ "REJECTED_AUTOMATICALLY_COMMENT": "Le candidat a répondu faux à plus de 50% des questions posées, cela a invalidé l'ensemble de sa certification, et a donc entraîné un score de 0 pix" } }, + "common": { + "email": { + "contactUs": "contactez-nous ici", + "doNotAnswer": "Ceci est un e-mail automatique, merci de ne pas y répondre", + "moreOn": "En savoir plus sur", + "pixPresentation": "Pix est le service public en ligne pour évaluer, développer et certifier ses compétences numériques." + } + }, "csv-import-values": { "sup-organization-learner": { "diplomas": { @@ -389,6 +397,17 @@ }, "subject": "Demande de réinitialisation de mot de passe Pix" }, + "self-account-deletion-email": { + "params": { + "hello": "Bonjour {firstName},", + "requestConfirmation": "Suite à votre demande, nous vous confirmons la suppression de votre compte Pix ainsi que de vos données personnelles.", + "seeYouSoon": "Nous espérons vous retrouver bientôt pour de nouvelles aventures numériques.", + "signing": "L'équipe Pix", + "title": "Suppression de votre compte", + "warning": "Si vous n'êtes pas à l’origine de cette demande, merci de contacter le support." + }, + "subject": "Suppression de votre compte" + }, "verification-code-email": { "body": { "context": "Vous souhaitez faire une modification de votre adresse e-mail sur votre compte. Pour continuer, entrez le code suivant sur Pix :", diff --git a/api/translations/nl.json b/api/translations/nl.json index fcd3f147501..06e2fabac7c 100644 --- a/api/translations/nl.json +++ b/api/translations/nl.json @@ -227,6 +227,14 @@ "REJECTED_AUTOMATICALLY_COMMENT": "De kandidaat beantwoordde meer dan 50% van de vragen fout, waardoor zijn hele certificering ongeldig werd en hij een score van 0 pix kreeg." } }, + "common": { + "email": { + "contactUs": "contact us here", + "doNotAnswer": "This is an automated email message, please do not reply.", + "moreOn": "More on", + "pixPresentation": "Pix is the online service to assess, develop and certify your digital skills." + } + }, "csv-import-values": { "sup-organization-learner": { "diplomas": { @@ -379,6 +387,17 @@ }, "subject": "Verzoek instellen nieuw wachtwoord Pix" }, + "self-account-deletion-email": { + "params": { + "hello": "Hello {firstName},", + "requestConfirmation": "Following your request, we can confirm that your Pix account and personal data have been deleted.", + "seeYouSoon": "We hope to see you soon for new digital adventures.", + "signing": "The Pix team", + "title": "Deleting your account", + "warning": "If you are not the source of this request, please contact support." + }, + "subject": "Deleting your account" + }, "verification-code-email": { "body": { "context": "Je wilt je e-mailadres op je account wijzigen. Voer de volgende code in bij Pix om verder te gaan:",