improvement: address feedback

This commit is contained in:
Scott Wilson
2025-05-02 11:08:41 -07:00
parent 66fbcc6806
commit c7e707f20a
32 changed files with 65 additions and 123 deletions
+1 -1
View File
@@ -71,6 +71,7 @@ import { TIdentityTokenAuthServiceFactory } from "@app/services/identity-token-a
import { TIdentityUaServiceFactory } from "@app/services/identity-ua/identity-ua-service"; import { TIdentityUaServiceFactory } from "@app/services/identity-ua/identity-ua-service";
import { TIntegrationServiceFactory } from "@app/services/integration/integration-service"; import { TIntegrationServiceFactory } from "@app/services/integration/integration-service";
import { TIntegrationAuthServiceFactory } from "@app/services/integration-auth/integration-auth-service"; import { TIntegrationAuthServiceFactory } from "@app/services/integration-auth/integration-auth-service";
import { TMicrosoftTeamsServiceFactory } from "@app/services/microsoft-teams/microsoft-teams-service";
import { TOrgRoleServiceFactory } from "@app/services/org/org-role-service"; import { TOrgRoleServiceFactory } from "@app/services/org/org-role-service";
import { TOrgServiceFactory } from "@app/services/org/org-service"; import { TOrgServiceFactory } from "@app/services/org/org-service";
import { TOrgAdminServiceFactory } from "@app/services/org-admin/org-admin-service"; import { TOrgAdminServiceFactory } from "@app/services/org-admin/org-admin-service";
@@ -100,7 +101,6 @@ import { TUserServiceFactory } from "@app/services/user/user-service";
import { TUserEngagementServiceFactory } from "@app/services/user-engagement/user-engagement-service"; import { TUserEngagementServiceFactory } from "@app/services/user-engagement/user-engagement-service";
import { TWebhookServiceFactory } from "@app/services/webhook/webhook-service"; import { TWebhookServiceFactory } from "@app/services/webhook/webhook-service";
import { TWorkflowIntegrationServiceFactory } from "@app/services/workflow-integration/workflow-integration-service"; import { TWorkflowIntegrationServiceFactory } from "@app/services/workflow-integration/workflow-integration-service";
import { TMicrosoftTeamsServiceFactory } from "@app/services/microsoft-teams/microsoft-teams-service";
declare module "@fastify/request-context" { declare module "@fastify/request-context" {
interface RequestContextData { interface RequestContextData {
+1 -1
View File
@@ -26,6 +26,7 @@ import { registerIdentityUaRouter } from "./identity-universal-auth-router";
import { registerIntegrationAuthRouter } from "./integration-auth-router"; import { registerIntegrationAuthRouter } from "./integration-auth-router";
import { registerIntegrationRouter } from "./integration-router"; import { registerIntegrationRouter } from "./integration-router";
import { registerInviteOrgRouter } from "./invite-org-router"; import { registerInviteOrgRouter } from "./invite-org-router";
import { registerMicrosoftTeamsRouter } from "./microsoft-teams-router";
import { registerOrgAdminRouter } from "./org-admin-router"; import { registerOrgAdminRouter } from "./org-admin-router";
import { registerOrgRouter } from "./organization-router"; import { registerOrgRouter } from "./organization-router";
import { registerPasswordRouter } from "./password-router"; import { registerPasswordRouter } from "./password-router";
@@ -47,7 +48,6 @@ import { registerUserEngagementRouter } from "./user-engagement-router";
import { registerUserRouter } from "./user-router"; import { registerUserRouter } from "./user-router";
import { registerWebhookRouter } from "./webhook-router"; import { registerWebhookRouter } from "./webhook-router";
import { registerWorkflowIntegrationRouter } from "./workflow-integration-router"; import { registerWorkflowIntegrationRouter } from "./workflow-integration-router";
import { registerMicrosoftTeamsRouter } from "./microsoft-teams-router";
export const registerV1Routes = async (server: FastifyZodProvider) => { export const registerV1Routes = async (server: FastifyZodProvider) => {
await server.register(registerSsoRouter, { prefix: "/sso" }); await server.register(registerSsoRouter, { prefix: "/sso" });
@@ -15,7 +15,7 @@ export const EmailMfaTemplate = ({ code, siteUrl, isCloud }: EmailMfaTemplatePro
<strong>MFA required</strong> <strong>MFA required</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text>Enter the MFA code below in the browser where you started sign-in.</Text> <Text>Enter the MFA code shown below in the browser where you started sign-in.</Text>
<Text className="text-[24px] mt-[16px]"> <Text className="text-[24px] mt-[16px]">
<strong>{code}</strong> <strong>{code}</strong>
</Text> </Text>
@@ -26,7 +26,7 @@ export const EmailMfaTemplate = ({ code, siteUrl, isCloud }: EmailMfaTemplatePro
{isCloud ? ( {isCloud ? (
<> <>
Contact us at{" "} Contact us at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link>{" "} </Link>{" "}
immediately immediately
@@ -12,14 +12,14 @@ export const EmailVerificationTemplate = ({ code, siteUrl, isCloud }: EmailVerif
return ( return (
<BaseEmailWrapper <BaseEmailWrapper
title="Confirm Your Email Address" title="Confirm Your Email Address"
preview="Verify your email address to get continue with Infisical." preview="Verify your email address to continue with Infisical."
siteUrl={siteUrl} siteUrl={siteUrl}
> >
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
<strong>Confirm your email address</strong> <strong>Confirm your email address</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text>Enter the confirmation code below in the browser window requiring confirmation.</Text> <Text>Enter the confirmation code shown below in the browser window requiring confirmation.</Text>
<Text className="text-[24px] mt-[16px]"> <Text className="text-[24px] mt-[16px]">
<strong>{code}</strong> <strong>{code}</strong>
</Text> </Text>
@@ -30,7 +30,7 @@ export const EmailVerificationTemplate = ({ code, siteUrl, isCloud }: EmailVerif
{isCloud ? ( {isCloud ? (
<> <>
Email us at{" "} Email us at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
</> </>
@@ -21,7 +21,7 @@ export const ExternalImportFailedTemplate = ({ error, siteUrl, provider }: Exter
</Text> </Text>
<Text className="text-black text-[14px] leading-[24px]"> <Text className="text-black text-[14px] leading-[24px]">
If your issue persists, you can contact the Infisical team at{" "} If your issue persists, you can contact the Infisical team at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
. .
@@ -26,5 +26,6 @@ export const ExternalImportStartedTemplate = ({ siteUrl, provider }: ExternalImp
export default ExternalImportStartedTemplate; export default ExternalImportStartedTemplate;
ExternalImportStartedTemplate.PreviewProps = { ExternalImportStartedTemplate.PreviewProps = {
provider: "EnvKey" provider: "EnvKey",
siteUrl: "https://infisical.com"
} as ExternalImportStartedTemplateProps; } as ExternalImportStartedTemplateProps;
@@ -24,7 +24,7 @@ export const IntegrationSyncFailedTemplate = ({
return ( return (
<BaseEmailWrapper <BaseEmailWrapper
title="Integration Sync Failed" title="Integration Sync Failed"
preview="An integration sync has error has occurred." preview="An integration sync error has occurred."
siteUrl={siteUrl} siteUrl={siteUrl}
> >
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
@@ -42,7 +42,7 @@ export const NewDeviceLoginTemplate = ({
<Text className="mb-[0px]"> <Text className="mb-[0px]">
If you believe that this login is suspicious, please contact{" "} If you believe that this login is suspicious, please contact{" "}
{isCloud ? ( {isCloud ? (
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
) : ( ) : (
@@ -24,7 +24,7 @@ export const OrgAdminBreakglassAccessTemplate = ({
siteUrl={siteUrl} siteUrl={siteUrl}
> >
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
The organization admin <strong>{email}</strong> has bypassed enforced SSO login. The organization admin <strong>{email}</strong> has bypassed enforced SSO login
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[24px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[24px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50">
<strong className="text-[14px]">Timestamp</strong> <strong className="text-[14px]">Timestamp</strong>
@@ -53,5 +53,5 @@ OrgAdminBreakglassAccessTemplate.PreviewProps = {
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15",
timestamp: "Tue Apr 29 2025 23:03:27 GMT+0000 (Coordinated Universal Time)", timestamp: "Tue Apr 29 2025 23:03:27 GMT+0000 (Coordinated Universal Time)",
siteUrl: "https://infisical.com", siteUrl: "https://infisical.com",
email: "[email protected]" email: "august@infisical.com"
} as OrgAdminBreakglassAccessTemplateProps; } as OrgAdminBreakglassAccessTemplateProps;
@@ -36,5 +36,6 @@ export default OrgAdminProjectGrantAccessTemplate;
OrgAdminProjectGrantAccessTemplate.PreviewProps = { OrgAdminProjectGrantAccessTemplate.PreviewProps = {
email: "[email protected]", email: "[email protected]",
projectName: "Example Project" projectName: "Example Project",
siteUrl: "https://infisical.com"
} as OrgAdminProjectGrantAccessTemplateProps; } as OrgAdminProjectGrantAccessTemplateProps;
@@ -47,7 +47,7 @@ export const OrganizationInvitationTemplate = ({
</Section> </Section>
<Section className="text-center mt-[28px]"> <Section className="text-center mt-[28px]">
<Button <Button
href={`${callback_url}?token=${token}${metadata ? `&metadata=${metadata}` : ""}&to=${email}&organization_id=${organizationId}`} href={`${callback_url}?token=${token}${metadata ? `&metadata=${metadata}` : ""}&to=${encodeURIComponent(email)}&organization_id=${organizationId}`}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
Accept Invite Accept Invite
@@ -71,5 +71,7 @@ OrganizationInvitationTemplate.PreviewProps = {
inviterUsername: "[email protected]", inviterUsername: "[email protected]",
email: "[email protected]", email: "[email protected]",
siteUrl: "https://infisical.com", siteUrl: "https://infisical.com",
callback_url: "https://app.infisical.com" callback_url: "https://app.infisical.com",
token: "preview-token",
organizationId: "1ae1c2c7-8068-461c-b15e-421737868a6a"
} as OrganizationInvitationTemplateProps; } as OrganizationInvitationTemplateProps;
@@ -27,7 +27,7 @@ export const PasswordResetTemplate = ({ email, isCloud, siteUrl, callback_url, t
{isCloud ? ( {isCloud ? (
<> <>
us immediately at{" "} us immediately at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
</> </>
@@ -39,7 +39,7 @@ export const PasswordResetTemplate = ({ email, isCloud, siteUrl, callback_url, t
</Section> </Section>
<Section className="text-center mt-[28px]"> <Section className="text-center mt-[28px]">
<Button <Button
href={`${callback_url}?token=${token}&to=${email}`} href={`${callback_url}?token=${token}&to=${encodeURIComponent(email)}`}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
Reset Password Reset Password
@@ -54,5 +54,7 @@ export default PasswordResetTemplate;
PasswordResetTemplate.PreviewProps = { PasswordResetTemplate.PreviewProps = {
email: "[email protected]", email: "[email protected]",
callback_url: "https://app.infisical.com", callback_url: "https://app.infisical.com",
isCloud: true isCloud: true,
token: "preview-token",
siteUrl: "https://infisical.com"
} as PasswordResetTemplateProps; } as PasswordResetTemplateProps;
@@ -26,7 +26,7 @@ export const PasswordSetupTemplate = ({ email, isCloud, siteUrl, callback_url, t
{isCloud ? ( {isCloud ? (
<> <>
us immediately at{" "} us immediately at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
</> </>
@@ -38,7 +38,7 @@ export const PasswordSetupTemplate = ({ email, isCloud, siteUrl, callback_url, t
</Section> </Section>
<Section className="text-center mt-[28px]"> <Section className="text-center mt-[28px]">
<Button <Button
href={`${callback_url}?token=${token}&to=${email}`} href={`${callback_url}?token=${token}&to=${encodeURIComponent(email)}`}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
Set Up Password Set Up Password
@@ -53,5 +53,7 @@ export default PasswordSetupTemplate;
PasswordSetupTemplate.PreviewProps = { PasswordSetupTemplate.PreviewProps = {
email: "[email protected]", email: "[email protected]",
callback_url: "https://app.infisical.com", callback_url: "https://app.infisical.com",
isCloud: true isCloud: true,
siteUrl: "https://infisical.com",
token: "preview-token"
} as PasswordSetupTemplateProps; } as PasswordSetupTemplateProps;
@@ -61,8 +61,9 @@ export default PkiExpirationAlertTemplate;
PkiExpirationAlertTemplate.PreviewProps = { PkiExpirationAlertTemplate.PreviewProps = {
alertBeforeDays: 5, alertBeforeDays: 5,
items: [ items: [
{ type: "CA", friendlyName: "Example CA", serialNumber: "1234567890", expiryDate: "2022-01-01" }, { type: "CA", friendlyName: "Example CA", serialNumber: "1234567890", expiryDate: "2032-01-01" },
{ type: "Certificate", friendlyName: "Example Certificate", serialNumber: "1234567890", expiryDate: "2022-01-01" } { type: "Certificate", friendlyName: "Example Certificate", serialNumber: "2345678901", expiryDate: "2032-01-01" }
], ],
alertName: "My PKI Alert" alertName: "My PKI Alert",
siteUrl: "https://infisical.com"
} as PkiExpirationAlertTemplateProps; } as PkiExpirationAlertTemplateProps;
@@ -8,7 +8,6 @@ interface ProjectAccessRequestTemplateProps extends Omit<BaseEmailWrapperProps,
requesterName: string; requesterName: string;
requesterEmail: string; requesterEmail: string;
orgName: string; orgName: string;
environment: string;
note: string; note: string;
callback_url: string; callback_url: string;
} }
@@ -64,5 +63,6 @@ ProjectAccessRequestTemplate.PreviewProps = {
orgName: "Example Org", orgName: "Example Org",
siteUrl: "https://infisical.com", siteUrl: "https://infisical.com",
projectName: "Example Project", projectName: "Example Project",
note: "I need access to the project for the new initiative for HR." note: "I need access to the project for the new initiative for HR.",
callback_url: "https://infisical.com"
} as ProjectAccessRequestTemplateProps; } as ProjectAccessRequestTemplateProps;
@@ -16,7 +16,7 @@ export const ProjectInvitationTemplate = ({ callback_url, workspaceName, siteUrl
siteUrl={siteUrl} siteUrl={siteUrl}
> >
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
You've been invited to join a new project on Infisical You've been invited to join a project on Infisical
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-black text-[14px] leading-[24px]"> <Text className="text-black text-[14px] leading-[24px]">
@@ -26,7 +26,7 @@ export const ScimUserProvisionedTemplate = ({
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border text-center border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-black text-[14px] leading-[24px]"> <Text className="text-black text-[14px] leading-[24px]">
You've been invited you to collaborate on <strong>{organizationName}</strong>. You've been invited to collaborate on <strong>{organizationName}</strong>.
</Text> </Text>
</Section> </Section>
<Section className="text-center mt-[28px]"> <Section className="text-center mt-[28px]">
@@ -25,10 +25,10 @@ export const SecretApprovalRequestNeedsReviewTemplate = ({
siteUrl={siteUrl} siteUrl={siteUrl}
> >
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
A secret approval request for the project <strong>{projectName}</strong> requires review. A secret approval request for the project <strong>{projectName}</strong> requires review
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-14px">Hello {firstName},</Text> <Text className="text-[14px]">Hello {firstName},</Text>
<Text className="text-black text-[14px] leading-[24px]"> <Text className="text-black text-[14px] leading-[24px]">
You have a new secret change request pending your review for the project <strong>{projectName}</strong> in the You have a new secret change request pending your review for the project <strong>{projectName}</strong> in the
organization <strong>{organizationName}</strong>. organization <strong>{organizationName}</strong>.
@@ -62,7 +62,7 @@ export const SecretLeakIncidentTemplate = ({
</Section> </Section>
<Section className="text-center mt-[28px]"> <Section className="text-center mt-[28px]">
<Button <Button
href={`${siteUrl}/secret-scanning`} href={`${siteUrl}/organization/secret-scanning`}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
View Leaked Secrets View Leaked Secrets
@@ -18,7 +18,7 @@ export const SecretReminderTemplate = ({
return ( return (
<BaseEmailWrapper title="Secret Reminder" preview="You have a new secret reminder." siteUrl={siteUrl}> <BaseEmailWrapper title="Secret Reminder" preview="You have a new secret reminder." siteUrl={siteUrl}>
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
Secret Reminder <strong>Secret Reminder</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[8px] pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[8px] pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-[14px]"> <Text className="text-[14px]">
@@ -3,7 +3,7 @@ import React from "react";
import { BaseEmailWrapper, BaseEmailWrapperProps } from "./BaseEmailWrapper"; import { BaseEmailWrapper, BaseEmailWrapperProps } from "./BaseEmailWrapper";
interface ShareSecretTemplateProps extends Omit<BaseEmailWrapperProps, "title" | "preview" | "children"> { interface SecretRequestCompletedTemplateProps extends Omit<BaseEmailWrapperProps, "title" | "preview" | "children"> {
name?: string; name?: string;
respondentUsername: string; respondentUsername: string;
secretRequestUrl: string; secretRequestUrl: string;
@@ -14,14 +14,14 @@ export const SecretRequestCompletedTemplate = ({
siteUrl, siteUrl,
respondentUsername, respondentUsername,
secretRequestUrl secretRequestUrl
}: ShareSecretTemplateProps) => { }: SecretRequestCompletedTemplateProps) => {
return ( return (
<BaseEmailWrapper title="Shared Secret" preview="A secret has been shared with you." siteUrl={siteUrl}> <BaseEmailWrapper title="Shared Secret" preview="A secret has been shared with you." siteUrl={siteUrl}>
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
<strong>A secret has been shared with you</strong> <strong>A secret has been shared with you</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] text-center pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] text-center pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-14px"> <Text className="text-[14px]">
{respondentUsername ? <strong>{respondentUsername}</strong> : "Someone"} shared a secret{" "} {respondentUsername ? <strong>{respondentUsername}</strong> : "Someone"} shared a secret{" "}
{name && ( {name && (
<> <>
@@ -50,4 +50,4 @@ SecretRequestCompletedTemplate.PreviewProps = {
siteUrl: "https://infisical.com", siteUrl: "https://infisical.com",
secretRequestUrl: "https://infisical.com", secretRequestUrl: "https://infisical.com",
name: "API_TOKEN" name: "API_TOKEN"
} as ShareSecretTemplateProps; } as SecretRequestCompletedTemplateProps;
@@ -26,7 +26,7 @@ export const SecretRotationFailedTemplate = ({
return ( return (
<BaseEmailWrapper title="Secret Rotation Failed" preview="A secret rotation failed." siteUrl={siteUrl}> <BaseEmailWrapper title="Secret Rotation Failed" preview="A secret rotation failed." siteUrl={siteUrl}>
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
Your <strong>{rotationType}</strong> Rotation <strong>{rotationName}</strong> failed to rotate Your <strong>{rotationType}</strong> rotation <strong>{rotationName}</strong> failed to rotate
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[26px] pb-[4px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[26px] pb-[4px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<strong>Name</strong> <strong>Name</strong>
@@ -47,7 +47,7 @@ export const SecretRotationFailedTemplate = ({
href={`${rotationUrl}?search=${rotationName}&secretPath=${secretPath}`} href={`${rotationUrl}?search=${rotationName}&secretPath=${secretPath}`}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
View in Infiscal View in Infisical
</Button> </Button>
</Section> </Section>
</BaseEmailWrapper> </BaseEmailWrapper>
@@ -26,7 +26,7 @@ export const SecretSyncFailedTemplate = ({
return ( return (
<BaseEmailWrapper title="Secret Sync Failed" preview="A secret sync failed." siteUrl={siteUrl}> <BaseEmailWrapper title="Secret Sync Failed" preview="A secret sync failed." siteUrl={siteUrl}>
<Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0"> <Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">
Your <strong>{syncDestination}</strong> Sync <strong>{syncName}</strong> failed to sync Your <strong>{syncDestination}</strong> sync <strong>{syncName}</strong> failed to complete
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[26px] pb-[4px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[26px] pb-[4px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<strong>Name</strong> <strong>Name</strong>
@@ -59,7 +59,7 @@ export const SecretSyncFailedTemplate = ({
href={syncUrl} href={syncUrl}
className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium" className="rounded-md p-3 px-[28px] my-[8px] text-center text-[16px] bg-[#EBF852] border-solid border border-[#d1e309] text-black font-medium"
> >
View in Infiscal View in Infisical
</Button> </Button>
</Section> </Section>
</BaseEmailWrapper> </BaseEmailWrapper>
@@ -25,7 +25,7 @@ export const ServiceTokenExpiryNoticeTemplate = ({
<strong>Service token expiry notice</strong> <strong>Service token expiry notice</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-14px"> <Text className="text-[14px]">
Your service token <strong>{tokenName}</strong> for the project <strong>{projectName}</strong> will expire Your service token <strong>{tokenName}</strong> for the project <strong>{projectName}</strong> will expire
within 24 hours. within 24 hours.
</Text> </Text>
@@ -19,7 +19,7 @@ export const SignupEmailVerificationTemplate = ({ code, siteUrl, isCloud }: Sign
<strong>Confirm your email address</strong> <strong>Confirm your email address</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[8px] text-center pb-[8px] text-[14px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text>Enter the confirmation code below in the browser where you started sign-up.</Text> <Text>Enter the confirmation code shown below in the browser where you started sign-up.</Text>
<Text className="text-[24px] mt-[16px]"> <Text className="text-[24px] mt-[16px]">
<strong>{code}</strong> <strong>{code}</strong>
</Text> </Text>
@@ -30,7 +30,7 @@ export const SignupEmailVerificationTemplate = ({ code, siteUrl, isCloud }: Sign
{isCloud ? ( {isCloud ? (
<> <>
Email us at{" "} Email us at{" "}
<Link href={`mailto:[email protected]`} className="text-slate-700 no-underline"> <Link href="mailto:[email protected]" className="text-slate-700 no-underline">
support@infisical.com support@infisical.com
</Link> </Link>
</> </>
@@ -19,7 +19,7 @@ export const UnlockAccountTemplate = ({ token, siteUrl, callback_url }: UnlockAc
<strong>Unlock your Infisical account</strong> <strong>Unlock your Infisical account</strong>
</Heading> </Heading>
<Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"> <Section className="px-[24px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50">
<Text className="text-14px"> <Text className="text-[14px]">
Your account has been temporarily locked due to multiple failed login attempts. Your account has been temporarily locked due to multiple failed login attempts.
</Text> </Text>
<Text>If these attempts were not made by you, reset your password immediately.</Text> <Text>If these attempts were not made by you, reset your password immediately.</Text>
@@ -41,6 +41,5 @@ export default UnlockAccountTemplate;
UnlockAccountTemplate.PreviewProps = { UnlockAccountTemplate.PreviewProps = {
callback_url: "Example Project", callback_url: "Example Project",
siteUrl: "https://infisical.com", siteUrl: "https://infisical.com",
url: "https://infisical.com", token: "preview-token"
token: "Example Token"
} as UnlockAccountTemplateProps; } as UnlockAccountTemplateProps;
@@ -9,7 +9,6 @@ export * from "./NewDeviceLoginTemplate";
export * from "./OrgAdminBreakglassAccessTemplate"; export * from "./OrgAdminBreakglassAccessTemplate";
export * from "./OrgAdminProjectGrantAccessTemplate"; export * from "./OrgAdminProjectGrantAccessTemplate";
export * from "./OrganizationInvitationTemplate"; export * from "./OrganizationInvitationTemplate";
export * from "./OrganizationInvitationTemplate";
export * from "./PasswordResetTemplate"; export * from "./PasswordResetTemplate";
export * from "./PasswordSetupTemplate"; export * from "./PasswordSetupTemplate";
export * from "./PkiExpirationAlertTemplate"; export * from "./PkiExpirationAlertTemplate";
+1 -9
View File
@@ -1,5 +1,4 @@
import { render } from "@react-email/components"; import { render } from "@react-email/components";
import handlebars from "handlebars";
import { createTransport } from "nodemailer"; import { createTransport } from "nodemailer";
import SMTPTransport from "nodemailer/lib/smtp-transport"; import SMTPTransport from "nodemailer/lib/smtp-transport";
import React from "react"; import React from "react";
@@ -80,7 +79,7 @@ export enum SmtpTemplates {
export enum SmtpHost { export enum SmtpHost {
Sendgrid = "smtp.sendgrid.net", Sendgrid = "smtp.sendgrid.net",
Mailgun = "smtp.mailgun.org", Mailgun = "smtp.mailgun.org",
SocketLabs = "smtp.sockerlabs.com", SocketLabs = "smtp.socketlabs.com",
Zohomail = "smtp.zoho.com", Zohomail = "smtp.zoho.com",
Gmail = "smtp.gmail.com", Gmail = "smtp.gmail.com",
Office365 = "smtp.office365.com" Office365 = "smtp.office365.com"
@@ -121,13 +120,6 @@ export const smtpServiceFactory = (cfg: TSmtpConfig) => {
const smtp = createTransport(cfg); const smtp = createTransport(cfg);
const isSmtpOn = Boolean(cfg.host); const isSmtpOn = Boolean(cfg.host);
handlebars.registerHelper("emailFooter", () => {
const { SITE_URL } = getConfig();
return new handlebars.SafeString(
`<p style="font-size: 12px;">Email sent via Infisical at <a href="${SITE_URL}">${SITE_URL}</a></p>`
);
});
const sendMail = async ({ substitutions, recipients, template, subjectLine }: TSmtpSendMail) => { const sendMail = async ({ substitutions, recipients, template, subjectLine }: TSmtpSendMail) => {
const appCfg = getConfig(); const appCfg = getConfig();
@@ -1,22 +0,0 @@
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Import failed</title>
</head>
<body>
<h2>An import from {{provider}} to Infisical has failed</h2>
<p>An import from
{{provider}}
to Infisical has failed due to unforeseen circumstances. Please re-try your import, and if the issue persists, you
can contact the Infisical team at [email protected].
</p>
<p>Error: {{error}}</p>
{{emailFooter}}
</body>
</html>
@@ -1,19 +0,0 @@
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Import in progress</title>
</head>
<body>
<h2>An import from {{provider}} to Infisical is in progress</h2>
<p>An import from
{{provider}}
to Infisical is in progress. The import process may take up to 30 minutes, and you will receive once the import
has finished or if it fails.</p>
{{emailFooter}}
</body>
</html>
@@ -1,16 +0,0 @@
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Import successful</title>
</head>
<body>
<h2>An import from {{provider}} to Infisical was successful</h2>
<p>An import from {{provider}} was successful. Your data is now available in Infisical.</p>
{{emailFooter}}
</body>
</html>
+1 -1
View File
@@ -26,7 +26,7 @@
"paths": { "paths": {
"@app/*": ["./src/*"] "@app/*": ["./src/*"]
}, },
"jsx": "react" "jsx": "react-jsx"
}, },
"include": ["src/**/*", "scripts/**/*", "e2e-test/**/*", "./.eslintrc.js", "./tsup.config.js"], "include": ["src/**/*", "scripts/**/*", "e2e-test/**/*", "./.eslintrc.js", "./tsup.config.js"],
"exclude": ["node_modules"] "exclude": ["node_modules"]