@vrplatform/email 1.0.2-stage.43250811764 → 1.0.2-stage.43289315799
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
- package/build/main/templates/SecondFactorResetEmailTemplate.js +19 -0
- package/build/main/templates/SecondFactorResetEmailTemplate.js.map +1 -0
- package/build/main/templates/index.d.ts +1 -0
- package/build/main/templates/index.js +1 -0
- package/build/main/templates/index.js.map +1 -1
- package/build/module/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
- package/build/module/templates/SecondFactorResetEmailTemplate.js +15 -0
- package/build/module/templates/SecondFactorResetEmailTemplate.js.map +1 -0
- package/build/module/templates/index.d.ts +1 -0
- package/build/module/templates/index.js +1 -0
- package/build/module/templates/index.js.map +1 -1
- package/package.json +1 -1
- package/src/templates/SecondFactorResetEmailTemplate.tsx +71 -0
- package/src/templates/index.ts +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type SecondFactorResetEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
audience: 'admin' | 'user';
|
|
6
|
+
user: string;
|
|
7
|
+
initiator: 'support' | 'teamAdmin';
|
|
8
|
+
approvedBy: string | null;
|
|
9
|
+
resetAt: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SecondFactorResetEmailTemplate: ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }: SecondFactorResetEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecondFactorResetEmailTemplate = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const heading_1 = require("@react-email/heading");
|
|
6
|
+
const text_1 = require("@react-email/text");
|
|
7
|
+
const EmailContainer_1 = require("../components/EmailContainer");
|
|
8
|
+
const SecondFactorResetEmailTemplate = ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }) => {
|
|
9
|
+
const by = initiator === 'support'
|
|
10
|
+
? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`
|
|
11
|
+
: (approvedBy ?? 'a team admin');
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: audience === 'admin'
|
|
13
|
+
? `Two-step verification reset for ${user}`
|
|
14
|
+
: 'Your two-step verification was reset', shortDescription: `Two-step verification was reset on ${tenant.name}.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: audience === 'admin'
|
|
15
|
+
? `Two-step verification reset for ${user}`
|
|
16
|
+
: 'Your two-step verification was reset' }), audience === 'admin' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["The authenticator app and the backup codes of ", (0, jsx_runtime_1.jsx)("b", { children: user }), " were removed on ", resetAt, " by ", by, ". ", user, " is signed out everywhere and sets up two-step verification again at the next sign-in."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you did not expect this reset, contact VRPlatform support right away." })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["Your authenticator app and your backup codes for ", tenant.name, " were removed on ", resetAt, " by ", by, ". You are signed out everywhere."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "Sign in again and set up two-step verification. If you did not ask for this reset, contact VRPlatform support right away." })] }))] }));
|
|
17
|
+
};
|
|
18
|
+
exports.SecondFactorResetEmailTemplate = SecondFactorResetEmailTemplate;
|
|
19
|
+
//# sourceMappingURL=SecondFactorResetEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondFactorResetEmailTemplate.js","sourceRoot":"src/","sources":["templates/SecondFactorResetEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iEAA8D;AAavD,MAAM,8BAA8B,GAAG,CAAC,EAC7C,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,UAAU,EACV,OAAO,GAC6B,EAAE,EAAE;IACxC,MAAM,EAAE,GACN,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,qBAAqB,UAAU,CAAC,CAAC,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QACxE,CAAC,CAAC,CAAC,UAAU,IAAI,cAAc,CAAC,CAAC;IACrC,OAAO,CACL,wBAAC,+BAAc,IACb,KAAK,EACH,QAAQ,KAAK,OAAO;YAClB,CAAC,CAAC,mCAAmC,IAAI,EAAE;YAC3C,CAAC,CAAC,sCAAsC,EAE5C,gBAAgB,EAAE,sCAAsC,MAAM,CAAC,IAAI,GAAG,EACtE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,QAAQ,KAAK,OAAO;oBACnB,CAAC,CAAC,mCAAmC,IAAI,EAAE;oBAC3C,CAAC,CAAC,sCAAsC,GAClC,EACT,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CACtB,6DACE,wBAAC,WAAI,iEAC2C,wCAAI,IAAI,GAAK,uBAC/C,OAAO,UAAM,EAAE,QAAI,IAAI,8FAE9B,EACP,uBAAC,WAAI,2FAGE,IACN,CACJ,CAAC,CAAC,CAAC,CACF,6DACE,wBAAC,WAAI,oEAC+C,MAAM,CAAC,IAAI,uBACjD,OAAO,UAAM,EAAE,wCACtB,EACP,uBAAC,WAAI,4IAGE,IACN,CACJ,IACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,8BAA8B,GAA9B,8BAA8B,CAuDzC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components/EmailContainer';\nimport type { EmailBaseProps } from '../types';\n\nexport type SecondFactorResetEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n audience: 'admin' | 'user';\n user: string;\n initiator: 'support' | 'teamAdmin';\n approvedBy: string | null;\n resetAt: string;\n};\n\nexport const SecondFactorResetEmailTemplate = ({\n mode,\n tenant,\n audience,\n user,\n initiator,\n approvedBy,\n resetAt,\n}: SecondFactorResetEmailTemplateProps) => {\n const by =\n initiator === 'support'\n ? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`\n : (approvedBy ?? 'a team admin');\n return (\n <EmailContainer\n title={\n audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'\n }\n shortDescription={`Two-step verification was reset on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'}\n </Heading>\n {audience === 'admin' ? (\n <>\n <Text>\n The authenticator app and the backup codes of <b>{user}</b> were\n removed on {resetAt} by {by}. {user} is signed out everywhere and\n sets up two-step verification again at the next sign-in.\n </Text>\n <Text>\n If you did not expect this reset, contact VRPlatform support right\n away.\n </Text>\n </>\n ) : (\n <>\n <Text>\n Your authenticator app and your backup codes for {tenant.name} were\n removed on {resetAt} by {by}. You are signed out everywhere.\n </Text>\n <Text>\n Sign in again and set up two-step verification. If you did not ask\n for this reset, contact VRPlatform support right away.\n </Text>\n </>\n )}\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
// Teams
|
|
18
|
+
__exportStar(require("./SecondFactorResetEmailTemplate"), exports);
|
|
18
19
|
__exportStar(require("./TeamApiTokenCreatedEmailTemplate"), exports);
|
|
19
20
|
__exportStar(require("./TeamRoleGrantedEmailTemplate"), exports);
|
|
20
21
|
__exportStar(require("./TenantSuspensionEmailTemplate"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,qEAAmD;AACnD,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,QAAQ;AACR,yDAAuC;AAEvC,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,mEAAiD;AACjD,qEAAmD;AACnD,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,QAAQ;AACR,yDAAuC;AAEvC,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type SecondFactorResetEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
audience: 'admin' | 'user';
|
|
6
|
+
user: string;
|
|
7
|
+
initiator: 'support' | 'teamAdmin';
|
|
8
|
+
approvedBy: string | null;
|
|
9
|
+
resetAt: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const SecondFactorResetEmailTemplate: ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }: SecondFactorResetEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
5
|
+
export const SecondFactorResetEmailTemplate = ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }) => {
|
|
6
|
+
const by = initiator === 'support'
|
|
7
|
+
? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`
|
|
8
|
+
: (approvedBy ?? 'a team admin');
|
|
9
|
+
return (_jsxs(EmailContainer, { title: audience === 'admin'
|
|
10
|
+
? `Two-step verification reset for ${user}`
|
|
11
|
+
: 'Your two-step verification was reset', shortDescription: `Two-step verification was reset on ${tenant.name}.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: audience === 'admin'
|
|
12
|
+
? `Two-step verification reset for ${user}`
|
|
13
|
+
: 'Your two-step verification was reset' }), audience === 'admin' ? (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["The authenticator app and the backup codes of ", _jsx("b", { children: user }), " were removed on ", resetAt, " by ", by, ". ", user, " is signed out everywhere and sets up two-step verification again at the next sign-in."] }), _jsx(Text, { children: "If you did not expect this reset, contact VRPlatform support right away." })] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: ["Your authenticator app and your backup codes for ", tenant.name, " were removed on ", resetAt, " by ", by, ". You are signed out everywhere."] }), _jsx(Text, { children: "Sign in again and set up two-step verification. If you did not ask for this reset, contact VRPlatform support right away." })] }))] }));
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=SecondFactorResetEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecondFactorResetEmailTemplate.js","sourceRoot":"src/","sources":["templates/SecondFactorResetEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAa9D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC7C,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,UAAU,EACV,OAAO,GAC6B,EAAE,EAAE;IACxC,MAAM,EAAE,GACN,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,qBAAqB,UAAU,CAAC,CAAC,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QACxE,CAAC,CAAC,CAAC,UAAU,IAAI,cAAc,CAAC,CAAC;IACrC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EACH,QAAQ,KAAK,OAAO;YAClB,CAAC,CAAC,mCAAmC,IAAI,EAAE;YAC3C,CAAC,CAAC,sCAAsC,EAE5C,gBAAgB,EAAE,sCAAsC,MAAM,CAAC,IAAI,GAAG,EACtE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,KAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,QAAQ,KAAK,OAAO;oBACnB,CAAC,CAAC,mCAAmC,IAAI,EAAE;oBAC3C,CAAC,CAAC,sCAAsC,GAClC,EACT,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CACtB,8BACE,MAAC,IAAI,iEAC2C,sBAAI,IAAI,GAAK,uBAC/C,OAAO,UAAM,EAAE,QAAI,IAAI,8FAE9B,EACP,KAAC,IAAI,2FAGE,IACN,CACJ,CAAC,CAAC,CAAC,CACF,8BACE,MAAC,IAAI,oEAC+C,MAAM,CAAC,IAAI,uBACjD,OAAO,UAAM,EAAE,wCACtB,EACP,KAAC,IAAI,4IAGE,IACN,CACJ,IACc,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components/EmailContainer';\nimport type { EmailBaseProps } from '../types';\n\nexport type SecondFactorResetEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n audience: 'admin' | 'user';\n user: string;\n initiator: 'support' | 'teamAdmin';\n approvedBy: string | null;\n resetAt: string;\n};\n\nexport const SecondFactorResetEmailTemplate = ({\n mode,\n tenant,\n audience,\n user,\n initiator,\n approvedBy,\n resetAt,\n}: SecondFactorResetEmailTemplateProps) => {\n const by =\n initiator === 'support'\n ? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`\n : (approvedBy ?? 'a team admin');\n return (\n <EmailContainer\n title={\n audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'\n }\n shortDescription={`Two-step verification was reset on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'}\n </Heading>\n {audience === 'admin' ? (\n <>\n <Text>\n The authenticator app and the backup codes of <b>{user}</b> were\n removed on {resetAt} by {by}. {user} is signed out everywhere and\n sets up two-step verification again at the next sign-in.\n </Text>\n <Text>\n If you did not expect this reset, contact VRPlatform support right\n away.\n </Text>\n </>\n ) : (\n <>\n <Text>\n Your authenticator app and your backup codes for {tenant.name} were\n removed on {resetAt} by {by}. You are signed out everywhere.\n </Text>\n <Text>\n Sign in again and set up two-step verification. If you did not ask\n for this reset, contact VRPlatform support right away.\n </Text>\n </>\n )}\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAElD,QAAQ;AACR,cAAc,wBAAwB,CAAC;AAEvC,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAElD,QAAQ;AACR,cAAc,wBAAwB,CAAC;AAEvC,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// 1099s\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Heading } from '@react-email/heading';
|
|
2
|
+
import { Text } from '@react-email/text';
|
|
3
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
4
|
+
import type { EmailBaseProps } from '../types';
|
|
5
|
+
|
|
6
|
+
export type SecondFactorResetEmailTemplateProps = {
|
|
7
|
+
mode: EmailBaseProps['mode'];
|
|
8
|
+
tenant: EmailBaseProps['tenant'];
|
|
9
|
+
audience: 'admin' | 'user';
|
|
10
|
+
user: string;
|
|
11
|
+
initiator: 'support' | 'teamAdmin';
|
|
12
|
+
approvedBy: string | null;
|
|
13
|
+
resetAt: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const SecondFactorResetEmailTemplate = ({
|
|
17
|
+
mode,
|
|
18
|
+
tenant,
|
|
19
|
+
audience,
|
|
20
|
+
user,
|
|
21
|
+
initiator,
|
|
22
|
+
approvedBy,
|
|
23
|
+
resetAt,
|
|
24
|
+
}: SecondFactorResetEmailTemplateProps) => {
|
|
25
|
+
const by =
|
|
26
|
+
initiator === 'support'
|
|
27
|
+
? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`
|
|
28
|
+
: (approvedBy ?? 'a team admin');
|
|
29
|
+
return (
|
|
30
|
+
<EmailContainer
|
|
31
|
+
title={
|
|
32
|
+
audience === 'admin'
|
|
33
|
+
? `Two-step verification reset for ${user}`
|
|
34
|
+
: 'Your two-step verification was reset'
|
|
35
|
+
}
|
|
36
|
+
shortDescription={`Two-step verification was reset on ${tenant.name}.`}
|
|
37
|
+
tenant={tenant}
|
|
38
|
+
mode={mode}
|
|
39
|
+
>
|
|
40
|
+
<Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
|
|
41
|
+
{audience === 'admin'
|
|
42
|
+
? `Two-step verification reset for ${user}`
|
|
43
|
+
: 'Your two-step verification was reset'}
|
|
44
|
+
</Heading>
|
|
45
|
+
{audience === 'admin' ? (
|
|
46
|
+
<>
|
|
47
|
+
<Text>
|
|
48
|
+
The authenticator app and the backup codes of <b>{user}</b> were
|
|
49
|
+
removed on {resetAt} by {by}. {user} is signed out everywhere and
|
|
50
|
+
sets up two-step verification again at the next sign-in.
|
|
51
|
+
</Text>
|
|
52
|
+
<Text>
|
|
53
|
+
If you did not expect this reset, contact VRPlatform support right
|
|
54
|
+
away.
|
|
55
|
+
</Text>
|
|
56
|
+
</>
|
|
57
|
+
) : (
|
|
58
|
+
<>
|
|
59
|
+
<Text>
|
|
60
|
+
Your authenticator app and your backup codes for {tenant.name} were
|
|
61
|
+
removed on {resetAt} by {by}. You are signed out everywhere.
|
|
62
|
+
</Text>
|
|
63
|
+
<Text>
|
|
64
|
+
Sign in again and set up two-step verification. If you did not ask
|
|
65
|
+
for this reset, contact VRPlatform support right away.
|
|
66
|
+
</Text>
|
|
67
|
+
</>
|
|
68
|
+
)}
|
|
69
|
+
</EmailContainer>
|
|
70
|
+
);
|
|
71
|
+
};
|