feat: sns webhook

feat: text content type handler
feat: email blocking table
This commit is contained in:
2025-05-16 18:19:14 +05:30
parent 30f51618fe
commit 205e423b56
11 changed files with 383 additions and 16 deletions
View File
+153
View File
@@ -0,0 +1,153 @@
otpTemplate = {
"TemplateName": "sendOTP",
"SubjectPart": "Your OTP for login is {{otp}}",
"HtmlPart": """
<html>
<head>
<meta charset="UTF-8" />
<title>One-Time Passcode</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f5;
color: #333333;
}
.container {
max-width: 600px;
margin: 30px auto;
background: #ffffff;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.header {
background-color: rgb(70, 45, 24);
color: #ffffff;
padding: 20px;
position: relative;
height: 60px;
}
.logo {
max-height: 40px;
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
}
.header h1 {
margin: 0;
font-size: 20px;
font-weight: normal;
text-align: center;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
}
.content {
padding: 20px 30px;
}
.otp-code {
font-size: 28px;
font-weight: bold;
text-align: center;
letter-spacing: 5px;
margin: 25px 0;
color: rgb(70, 45, 24);
}
.otp-box {
background: #f9fafb;
border-left: 4px solid rgb(70, 45, 24);
padding: 20px;
border-radius: 4px;
margin: 20px 0;
}
.security-notice {
font-size: 13px;
background-color: #fef9c3;
border-left: 4px solid #eab308;
padding: 12px;
margin: 20px 0;
border-radius: 4px;
}
.closing {
margin-top: 25px;
font-size: 14px;
}
.footer {
padding: 15px 30px;
background: #f4f4f5;
font-size: 12px;
color: #666666;
text-align: center;
}
@media screen and (max-width: 480px) {
.content {
padding: 15px;
}
.header,
.footer {
padding: 15px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<img
src="https://firebasestorage.googleapis.com/v0/b/mansupport-australia.firebasestorage.app/o/Frame%20427320968.png?alt=media&token=9651f57d-aafd-450d-a0b0-1898504f5aac"
alt="Company Logo" class="logo" />
<h1>One-Time Passcode</h1>
</div>
<div class="content">
<p>Dear User,</p>
<p>Thank you for your account verification request. Please use the following one-time passcode to complete the
authentication process:</p>
<div class="otp-box">
<div class="otp-code">{{otp}}</div>
</div>
<div class="security-notice">
<strong>Security Notice:</strong> For your security, please do not share this code with anyone. Team 24x7 AIHR
representatives will never ask for your OTP.
</div>
<p>If you did not request this verification, please disregard this message and consider changing your password.
</p>
<div class="closing">
Regards,<br />
Team 24x7 AIHR
</div>
</div>
<div class="footer">
This is a system-generated email. Please do not reply.<br />
&copy; 2025 Team 24x7 AIHR Pty Ltd. All rights reserved.
</div>
</div>
</body>
</html>
""",
"TextPart": "Dear User, Thank you for using our service. To complete your authentication, please use the following one-time password (OTP): OTP: {{otp}} This OTP is valid for 15 minutes. Do not share this OTP with anyone for security reasons. If you did not request this OTP, please ignore this email. Thank you, Team 24x7 AIHR"
}