Skip to content

Commit

Permalink
[TECH] Ajouter le template d'email pour la suppression de compte (PIX…
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Nov 14, 2024
2 parents 43e8e3f + 4281f5f commit 710bc0d
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 6 deletions.
7 changes: 7 additions & 0 deletions api/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
13 changes: 7 additions & 6 deletions api/src/shared/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
19 changes: 19 additions & 0 deletions api/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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:",
Expand Down
19 changes: 19 additions & 0 deletions api/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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:",
Expand Down
19 changes: 19 additions & 0 deletions api/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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 :",
Expand Down
19 changes: 19 additions & 0 deletions api/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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:",
Expand Down

0 comments on commit 710bc0d

Please sign in to comment.