diff --git a/app/preview/TemplateParams.scala b/app/preview/TemplateParams.scala index 2c13e8ebc..9d0c93039 100644 --- a/app/preview/TemplateParams.scala +++ b/app/preview/TemplateParams.scala @@ -1614,6 +1614,15 @@ object TemplateParams2 { "applicationname" -> "Test-Hipp-App", "creatorusername" -> "Test-Hipp-Member" ), + "hipp_application_created" -> Map( + "applicationname" -> "Test-Hipp-App" + ), + "hipp_application_deleted" -> Map( + "applicationname" -> "Test-Hipp-App" + ), + "hipp_application_deleted_team" -> Map( + "applicationname" -> "Test-Hipp-App" + ), "chargeable_return_submit" -> Map( "first_name" -> "FirstName", "last_name" -> "SecondName", diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.html new file mode 100644 index 000000000..d6138e613 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.html @@ -0,0 +1,22 @@ +@* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@(params: Map[String, Any]) +@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "You have created an application in The API Hub"){ +
You have created @params("applicationname") in The API Hub.
+To access the application, visit /api-hub on the MDTP admin network.
+From HMRC The API Hub
+} diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.txt b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.txt new file mode 100644 index 000000000..c250099b8 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationCreated.scala.txt @@ -0,0 +1,4 @@ +@(params: Map[String, Any]) +You have created @{params("applicationname")} in The API Hub. +To access the application, visit /api-hub on the MDTP admin network. +From HMRC The API Hub \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.html new file mode 100644 index 000000000..16d7905f5 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.html @@ -0,0 +1,22 @@ +@* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@(params: Map[String, Any]) +@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "You have deleted an application from The API Hub"){ +You have deleted @params("applicationname") from The API Hub.
+This application has been removed from The API Hub.
+From HMRC The API Hub
+} diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.txt b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.txt new file mode 100644 index 000000000..f6035bb1a --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeleted.scala.txt @@ -0,0 +1,4 @@ +@(params: Map[String, Any]) +You have deleted @{params("applicationname")} from The API Hub. +This application has been removed from The API Hub. +From HMRC The API Hub \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.html b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.html new file mode 100644 index 000000000..193fa5b60 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.html @@ -0,0 +1,23 @@ +@* + * Copyright 2023 HM Revenue & Customs + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *@ + +@(params: Map[String, Any]) +@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Application deleted from The API Hub"){ +The application @params("applicationname") has been deleted from The API Hub, all application details have been permanently deleted.
+Any associated credentials will no longer work.
+This application cannot be restored.
+From HMRC The API Hub
+} diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.txt b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.txt new file mode 100644 index 000000000..4a033e378 --- /dev/null +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/ApplicationDeletedTeam.scala.txt @@ -0,0 +1,5 @@ +@(params: Map[String, Any]) +The application @{params("applicationname")} has been deleted from The API Hub, all application details have been permanently deleted. +Any associated credentials will no longer work. +This application cannot be restored. +From HMRC The API Hub \ No newline at end of file diff --git a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/HippTemplates.scala b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/HippTemplates.scala index 74962f4fc..636812520 100644 --- a/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/HippTemplates.scala +++ b/app/uk/gov/hmrc/hmrcemailrenderer/templates/hipp/HippTemplates.scala @@ -40,6 +40,33 @@ object HippTemplates { plainTemplate = txt.RemoveTeamMember.f, htmlTemplate = html.RemoveTeamMember.f, priority = Some(MessagePriority.Urgent) + ), + MessageTemplate.create( + templateId = "hipp_application_created", + fromAddress = FromAddress.noReply("Do not reply"), + service = Hipp, + subject = "You have created an application in The API Hub", + plainTemplate = txt.ApplicationCreated.f, + htmlTemplate = html.ApplicationCreated.f, + priority = Some(MessagePriority.Urgent) + ), + MessageTemplate.create( + templateId = "hipp_application_deleted", + fromAddress = FromAddress.noReply("Do not reply"), + service = Hipp, + subject = "You have deleted an application from The API Hub", + plainTemplate = txt.ApplicationDeleted.f, + htmlTemplate = html.ApplicationDeleted.f, + priority = Some(MessagePriority.Urgent) + ), + MessageTemplate.create( + templateId = "hipp_application_deleted_team", + fromAddress = FromAddress.noReply("Do not reply"), + service = Hipp, + subject = "Application deleted from The API Hub", + plainTemplate = txt.ApplicationDeletedTeam.f, + htmlTemplate = html.ApplicationDeletedTeam.f, + priority = Some(MessagePriority.Urgent) ) ) } diff --git a/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala b/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala index 551cc2649..86ee17d6e 100644 --- a/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala +++ b/test/uk/gov/hmrc/hmrcemailrenderer/templates/TemplateLocatorSpec.scala @@ -977,6 +977,9 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti "ecl_amend_registration_submitted_cy", "hipp_add_team_member_to_app_email", "hipp_remove_team_member_from_app_email", + "hipp_application_created", + "hipp_application_deleted", + "hipp_application_deleted_team", "newMessageAlert_LPP4", "newMessageAlert_LPP4_cy", "newMessageAlert_LPi1",