@vrplatform/email 1.0.2-43698123618 → 1.0.2-44075979560

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.
Files changed (43) hide show
  1. package/build/main/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
  2. package/build/main/templates/SecondFactorResetEmailTemplate.js +19 -0
  3. package/build/main/templates/SecondFactorResetEmailTemplate.js.map +1 -0
  4. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
  5. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js +22 -0
  6. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
  7. package/build/main/templates/Tax1099EmailTemplate.d.ts +13 -0
  8. package/build/main/templates/Tax1099EmailTemplate.js +61 -0
  9. package/build/main/templates/Tax1099EmailTemplate.js.map +1 -0
  10. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
  11. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js +12 -0
  12. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
  13. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
  14. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js +12 -0
  15. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
  16. package/build/main/templates/index.d.ts +5 -0
  17. package/build/main/templates/index.js +6 -0
  18. package/build/main/templates/index.js.map +1 -1
  19. package/build/module/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
  20. package/build/module/templates/SecondFactorResetEmailTemplate.js +15 -0
  21. package/build/module/templates/SecondFactorResetEmailTemplate.js.map +1 -0
  22. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
  23. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js +18 -0
  24. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
  25. package/build/module/templates/Tax1099EmailTemplate.d.ts +13 -0
  26. package/build/module/templates/Tax1099EmailTemplate.js +56 -0
  27. package/build/module/templates/Tax1099EmailTemplate.js.map +1 -0
  28. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
  29. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js +8 -0
  30. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
  31. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
  32. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js +8 -0
  33. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
  34. package/build/module/templates/index.d.ts +5 -0
  35. package/build/module/templates/index.js +6 -0
  36. package/build/module/templates/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/templates/SecondFactorResetEmailTemplate.tsx +71 -0
  39. package/src/templates/Tax1099ConsentWithdrawnEmailTemplate.tsx +56 -0
  40. package/src/templates/Tax1099EmailTemplate.tsx +100 -0
  41. package/src/templates/TeamApiTokenCreatedEmailTemplate.tsx +50 -0
  42. package/src/templates/TeamInviteOutsideDomainEmailTemplate.tsx +52 -0
  43. package/src/templates/index.ts +7 -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"]}
@@ -0,0 +1,9 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export declare const Tax1099ConsentWithdrawnEmailTemplate: ({ mode, user, tenant, withdrawnAt, address, }: {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ /** When the owner withdrew; the withdrawal takes effect that day. */
7
+ withdrawnAt: string;
8
+ address: string | null;
9
+ }) => import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tax1099ConsentWithdrawnEmailTemplate = 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 components_1 = require("../components");
8
+ // PRO-20639: the written confirmation the IRS requires when an owner
9
+ // withdraws consent to get 1099s by email. Fixed text; teams can't edit it.
10
+ const Tax1099ConsentWithdrawnEmailTemplate = ({ mode, user, tenant, withdrawnAt, address, }) => {
11
+ // The team stores no time zone. Pacific time keeps an evening withdrawal
12
+ // anywhere in the mainland US on the day the owner made it.
13
+ const effectiveOn = new Intl.DateTimeFormat('en-US', {
14
+ timeZone: 'America/Los_Angeles',
15
+ month: 'long',
16
+ day: 'numeric',
17
+ year: 'numeric',
18
+ }).format(new Date(withdrawnAt));
19
+ return ((0, jsx_runtime_1.jsxs)(components_1.EmailContainer, { title: "You withdrew your consent to get 1099s by email", shortDescription: `From ${effectiveOn}, ${tenant.name} mails your 1099s.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["You withdrew your consent to get your 1099s from ", (0, jsx_runtime_1.jsx)("b", { children: tenant.name }), " by email only. The withdrawal takes effect on ", (0, jsx_runtime_1.jsx)("b", { children: effectiveOn }), "."] }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["From that date, ", tenant.name, " mails your 1099s to", ' ', address || 'the address on Tax info in your owner portal', ", with a copy by email. Each 1099 also stays in Tax Statements in your owner portal."] }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["To get your 1099s by email only again, give your consent on Tax info in your owner portal. If you did not make this change, contact", ' ', tenant.name, " right away."] })] }));
20
+ };
21
+ exports.Tax1099ConsentWithdrawnEmailTemplate = Tax1099ConsentWithdrawnEmailTemplate;
22
+ //# sourceMappingURL=Tax1099ConsentWithdrawnEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099ConsentWithdrawnEmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099ConsentWithdrawnEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,8CAA+C;AAG/C,qEAAqE;AACrE,4EAA4E;AACrE,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,OAAO,GAQR,EAAE,EAAE;IACH,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACnD,QAAQ,EAAE,qBAAqB;QAC/B,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACjC,OAAO,CACL,wBAAC,2BAAc,IACb,KAAK,EAAC,iDAAiD,EACvD,gBAAgB,EAAE,QAAQ,WAAW,KAAK,MAAM,CAAC,IAAI,oBAAoB,EACzE,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,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAC/C,EACV,wBAAC,WAAI,oEAC8C,wCAAI,MAAM,CAAC,IAAI,GAAK,qDAC1B,wCAAI,WAAW,GAAK,SAC1D,EACP,wBAAC,WAAI,mCACc,MAAM,CAAC,IAAI,0BAAsB,GAAG,EACpD,OAAO,IAAI,8CAA8C,4FAErD,EACP,wBAAC,WAAI,sJAEyD,GAAG,EAC9D,MAAM,CAAC,IAAI,oBACP,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,oCAAoC,GAApC,oCAAoC,CAgD/C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components';\nimport type { EmailBaseProps } from '../types';\n\n// PRO-20639: the written confirmation the IRS requires when an owner\n// withdraws consent to get 1099s by email. Fixed text; teams can't edit it.\nexport const Tax1099ConsentWithdrawnEmailTemplate = ({\n mode,\n user,\n tenant,\n withdrawnAt,\n address,\n}: {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n /** When the owner withdrew; the withdrawal takes effect that day. */\n withdrawnAt: string;\n address: string | null;\n}) => {\n // The team stores no time zone. Pacific time keeps an evening withdrawal\n // anywhere in the mainland US on the day the owner made it.\n const effectiveOn = new Intl.DateTimeFormat('en-US', {\n timeZone: 'America/Los_Angeles',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n }).format(new Date(withdrawnAt));\n return (\n <EmailContainer\n title=\"You withdrew your consent to get 1099s by email\"\n shortDescription={`From ${effectiveOn}, ${tenant.name} mails your 1099s.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}\n </Heading>\n <Text>\n You withdrew your consent to get your 1099s from <b>{tenant.name}</b> by\n email only. The withdrawal takes effect on <b>{effectiveOn}</b>.\n </Text>\n <Text>\n From that date, {tenant.name} mails your 1099s to{' '}\n {address || 'the address on Tax info in your owner portal'}, with a copy\n by email. Each 1099 also stays in Tax Statements in your owner portal.\n </Text>\n <Text>\n To get your 1099s by email only again, give your consent on Tax info in\n your owner portal. If you did not make this change, contact{' '}\n {tenant.name} right away.\n </Text>\n </EmailContainer>\n );\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
+ type Tax1099EmailType = 'taxInfoRequest' | 'emailDeliveryRequest' | 'tax1099Ready' | 'tax1099Corrected';
3
+ export declare const getDefaultTax1099EmailData: (type: Tax1099EmailType, mode: 'tag' | 'text', args: {
4
+ teamName: string;
5
+ href: string;
6
+ userName: string;
7
+ taxYear: string;
8
+ }) => ActionEmailData;
9
+ export declare const Tax1099EmailTemplate: ({ type, taxYear, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
10
+ type: Tax1099EmailType;
11
+ taxYear: string;
12
+ }) => import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tax1099EmailTemplate = exports.getDefaultTax1099EmailData = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const extensions_1 = require("../extensions");
6
+ const components_1 = require("../components");
7
+ // PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date
8
+ // token renders the tax year. Subject and preview text are plain text without
9
+ // tokens, so they name no year.
10
+ const getDefaultTax1099EmailData = (type, mode, args) => {
11
+ const href = mode === 'tag' ? extensions_1.EMAIL_ACTION_LINK_COMPONENT : args.href;
12
+ const userName = mode === 'tag' ? extensions_1.EMAIL_USER_NAME_COMPONENT : args.userName;
13
+ const taxYear = mode === 'tag' ? extensions_1.EMAIL_DATE_COMPONENT : args.taxYear;
14
+ const team = args.teamName;
15
+ const linkLine = `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`;
16
+ if (type === 'taxInfoRequest')
17
+ return {
18
+ subject: `${team} needs your tax info`,
19
+ shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,
20
+ header: 'Complete your tax info',
21
+ bodyOne: `<p>Hi ${userName},</p><p>${team} needs your tax ID to send your ${taxYear} 1099. Add it on Tax info in your owner portal.</p>`,
22
+ buttonText: 'Complete tax info',
23
+ bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,
24
+ href: args.href,
25
+ };
26
+ if (type === 'emailDeliveryRequest')
27
+ return {
28
+ subject: `Get your 1099s from ${team} by email`,
29
+ shortDescription: 'Confirm in your owner portal that you want your 1099s by email only.',
30
+ header: 'Get your 1099s by email',
31
+ bodyOne: `<p>Hi ${userName},</p><p>${team} asks whether you want your 1099s by email only, without a paper copy by mail. You then get an email when your 1099 is ready, and it stays in Tax Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,
32
+ buttonText: 'Choose 1099 delivery',
33
+ bodyTwo: linkLine,
34
+ href: args.href,
35
+ };
36
+ if (type === 'tax1099Ready')
37
+ return {
38
+ subject: `Your 1099 from ${team} is ready`,
39
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
40
+ header: 'Your 1099 is ready',
41
+ bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is in Tax Statements in your owner portal. You can download and print it there.</p>`,
42
+ buttonText: 'Open Tax Statements',
43
+ bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,
44
+ href: args.href,
45
+ };
46
+ return {
47
+ subject: `Your corrected 1099 from ${team}`,
48
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
49
+ header: 'Your 1099 was corrected',
50
+ bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is in Tax Statements in your owner portal.</p>`,
51
+ buttonText: 'Open Tax Statements',
52
+ bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,
53
+ href: args.href,
54
+ };
55
+ };
56
+ exports.getDefaultTax1099EmailData = getDefaultTax1099EmailData;
57
+ const Tax1099EmailTemplate = ({ type, taxYear, ...props }) => ((0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props, listing: undefined, month: taxYear, eyebrow: type === 'taxInfoRequest' || type === 'emailDeliveryRequest'
58
+ ? 'Tax info'
59
+ : 'Tax statements' }));
60
+ exports.Tax1099EmailTemplate = Tax1099EmailTemplate;
61
+ //# sourceMappingURL=Tax1099EmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099EmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099EmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAIuB;AACvB,8CAIuB;AAQvB,6EAA6E;AAC7E,8EAA8E;AAC9E,gCAAgC;AACzB,MAAM,0BAA0B,GAAG,CACxC,IAAsB,EACtB,IAAoB,EACpB,IAKC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,sCAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,iCAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACrE,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC3B,MAAM,QAAQ,GAAG,yGAAyG,IAAI,MAAM,CAAC;IAErI,IAAI,IAAI,KAAK,gBAAgB;QAC3B,OAAO;YACL,OAAO,EAAE,GAAG,IAAI,sBAAsB;YACtC,gBAAgB,EAAE,2CAA2C,IAAI,sBAAsB;YACvF,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,mCAAmC,OAAO,qDAAqD;YACxI,UAAU,EAAE,mBAAmB;YAC/B,OAAO,EAAE,mFAAmF,IAAI,4BAA4B,QAAQ,EAAE;YACtI,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,IAAI,IAAI,KAAK,sBAAsB;QACjC,OAAO;YACL,OAAO,EAAE,uBAAuB,IAAI,WAAW;YAC/C,gBAAgB,EACd,sEAAsE;YACxE,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,6OAA6O;YACtR,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,IAAI,IAAI,KAAK,cAAc;QACzB,OAAO;YACL,OAAO,EAAE,kBAAkB,IAAI,WAAW;YAC1C,gBAAgB,EAAE,iDAAiD;YACnE,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,SAAS,QAAQ,gBAAgB,OAAO,cAAc,IAAI,sFAAsF;YACzJ,UAAU,EAAE,qBAAqB;YACjC,OAAO,EAAE,yEAAyE,QAAQ,EAAE;YAC5F,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,OAAO;QACL,OAAO,EAAE,4BAA4B,IAAI,EAAE;QAC3C,gBAAgB,EAAE,iDAAiD;QACnE,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,sBAAsB,OAAO,+FAA+F;QACrK,UAAU,EAAE,qBAAqB;QACjC,OAAO,EAAE,mFAAmF,QAAQ,EAAE;QACtG,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC,CAAC;AA3DW,QAAA,0BAA0B,GAA1B,0BAA0B,CA2DrC;AAEK,MAAM,oBAAoB,GAAG,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EAIT,EAAE,EAAE,CAAC,CACJ,uBAAC,gCAAmB,OACd,KAAK,EACT,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,EACd,OAAO,EACL,IAAI,KAAK,gBAAgB,IAAI,IAAI,KAAK,sBAAsB;QAC1D,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,gBAAgB,GAEtB,CACH,CAAC;AAlBW,QAAA,oBAAoB,GAApB,oBAAoB,CAkB/B","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\ntype Tax1099EmailType =\n | 'taxInfoRequest'\n | 'emailDeliveryRequest'\n | 'tax1099Ready'\n | 'tax1099Corrected';\n\n// PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date\n// token renders the tax year. Subject and preview text are plain text without\n// tokens, so they name no year.\nexport const getDefaultTax1099EmailData = (\n type: Tax1099EmailType,\n mode: 'tag' | 'text',\n args: {\n teamName: string;\n href: string;\n userName: string;\n taxYear: string;\n }\n): ActionEmailData => {\n const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n const taxYear = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.taxYear;\n const team = args.teamName;\n const linkLine = `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${href}</p>`;\n\n if (type === 'taxInfoRequest')\n return {\n subject: `${team} needs your tax info`,\n shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,\n header: 'Complete your tax info',\n bodyOne: `<p>Hi ${userName},</p><p>${team} needs your tax ID to send your ${taxYear} 1099. Add it on Tax info in your owner portal.</p>`,\n buttonText: 'Complete tax info',\n bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,\n href: args.href,\n };\n\n if (type === 'emailDeliveryRequest')\n return {\n subject: `Get your 1099s from ${team} by email`,\n shortDescription:\n 'Confirm in your owner portal that you want your 1099s by email only.',\n header: 'Get your 1099s by email',\n bodyOne: `<p>Hi ${userName},</p><p>${team} asks whether you want your 1099s by email only, without a paper copy by mail. You then get an email when your 1099 is ready, and it stays in Tax Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,\n buttonText: 'Choose 1099 delivery',\n bodyTwo: linkLine,\n href: args.href,\n };\n\n if (type === 'tax1099Ready')\n return {\n subject: `Your 1099 from ${team} is ready`,\n shortDescription: 'Open it in Tax Statements in your owner portal.',\n header: 'Your 1099 is ready',\n bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is in Tax Statements in your owner portal. You can download and print it there.</p>`,\n buttonText: 'Open Tax Statements',\n bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,\n href: args.href,\n };\n\n return {\n subject: `Your corrected 1099 from ${team}`,\n shortDescription: 'Open it in Tax Statements in your owner portal.',\n header: 'Your 1099 was corrected',\n bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is in Tax Statements in your owner portal.</p>`,\n buttonText: 'Open Tax Statements',\n bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,\n href: args.href,\n };\n};\n\nexport const Tax1099EmailTemplate = ({\n type,\n taxYear,\n ...props\n}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {\n type: Tax1099EmailType;\n taxYear: string;\n}) => (\n <ActionEmailTemplate\n {...props}\n listing={undefined}\n month={taxYear}\n eyebrow={\n type === 'taxInfoRequest' || type === 'emailDeliveryRequest'\n ? 'Tax info'\n : 'Tax statements'\n }\n />\n);\n"]}
@@ -0,0 +1,10 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamApiTokenCreatedEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ hint: string;
6
+ createdAt: string;
7
+ createdBy: string | null;
8
+ href: string;
9
+ };
10
+ export declare const TeamApiTokenCreatedEmailTemplate: ({ mode, tenant, hint, createdAt, createdBy, href, }: TeamApiTokenCreatedEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamApiTokenCreatedEmailTemplate = 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 Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const theme_1 = require("../theme");
10
+ const TeamApiTokenCreatedEmailTemplate = ({ mode, tenant, hint, createdAt, createdBy, href, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `New API key on ${tenant.name}`, shortDescription: `An API key ending in ${hint} was created on ${tenant.name}.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "New API key on your team" }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["An API key ending in ", (0, jsx_runtime_1.jsx)("b", { children: hint }), " was created on ", tenant.name, " on", ' ', createdAt, createdBy ? ` by ${createdBy}` : '', ". Anyone holding it can read and change your team's data."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you did not expect this key, revoke it and review the team members." }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Review API keys", themeColors: theme_1.THEME_COLORS.vrplatform })] }));
11
+ exports.TeamApiTokenCreatedEmailTemplate = TeamApiTokenCreatedEmailTemplate;
12
+ //# sourceMappingURL=TeamApiTokenCreatedEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamApiTokenCreatedEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamApiTokenCreatedEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iDAA8C;AAC9C,iEAA8D;AAC9D,oCAAwC;AAYjC,MAAM,gCAAgC,GAAG,CAAC,EAC/C,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,SAAS,EACT,SAAS,EACT,IAAI,GACkC,EAAE,EAAE,CAAC,CAC3C,wBAAC,+BAAc,IACb,KAAK,EAAE,kBAAkB,MAAM,CAAC,IAAI,EAAE,EACtC,gBAAgB,EAAE,wBAAwB,IAAI,mBAAmB,MAAM,CAAC,IAAI,GAAG,EAC/E,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,yCAE7D,EACV,wBAAC,WAAI,wCACkB,wCAAI,IAAI,GAAK,sBAAiB,MAAM,CAAC,IAAI,SAAK,GAAG,EACrE,SAAS,EACT,SAAS,CAAC,CAAC,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,iEAE/B,EACP,uBAAC,WAAI,yFAEE,EACP,uBAAC,eAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,EACvB,WAAW,EAAE,oBAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC;AAjCW,QAAA,gCAAgC,GAAhC,gCAAgC,CAiC3C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamApiTokenCreatedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n hint: string;\n createdAt: string;\n createdBy: string | null;\n href: string;\n};\n\nexport const TeamApiTokenCreatedEmailTemplate = ({\n mode,\n tenant,\n hint,\n createdAt,\n createdBy,\n href,\n}: TeamApiTokenCreatedEmailTemplateProps) => (\n <EmailContainer\n title={`New API key on ${tenant.name}`}\n shortDescription={`An API key ending in ${hint} was created on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n New API key on your team\n </Heading>\n <Text>\n An API key ending in <b>{hint}</b> was created on {tenant.name} on{' '}\n {createdAt}\n {createdBy ? ` by ${createdBy}` : ''}. Anyone holding it can read and\n change your team's data.\n </Text>\n <Text>\n If you did not expect this key, revoke it and review the team members.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review API keys\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -0,0 +1,11 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamInviteOutsideDomainEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ invitedEmail: string;
6
+ invitedBy: string | null;
7
+ invitedAt: string;
8
+ roles: string;
9
+ href: string;
10
+ };
11
+ export declare const TeamInviteOutsideDomainEmailTemplate: ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }: TeamInviteOutsideDomainEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamInviteOutsideDomainEmailTemplate = 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 Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const theme_1 = require("../theme");
10
+ const TeamInviteOutsideDomainEmailTemplate = ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `${invitedEmail} was invited to ${tenant.name}`, shortDescription: `${invitedEmail} was invited to ${tenant.name} with an outside email address.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "A new member was invited" }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: [invitedBy ?? 'An API key', " invited ", (0, jsx_runtime_1.jsx)("b", { children: invitedEmail }), " to ", tenant.name, ' ', "as ", (0, jsx_runtime_1.jsx)("b", { children: roles }), " on ", invitedAt, ". The address is outside the email domains of your team and your accounting partner, or it is a free-mail address."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you do not know this person, remove the member and check who invited them." }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Review team members", themeColors: theme_1.THEME_COLORS.vrplatform })] }));
11
+ exports.TeamInviteOutsideDomainEmailTemplate = TeamInviteOutsideDomainEmailTemplate;
12
+ //# sourceMappingURL=TeamInviteOutsideDomainEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamInviteOutsideDomainEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamInviteOutsideDomainEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iDAA8C;AAC9C,iEAA8D;AAC9D,oCAAwC;AAajC,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,GACsC,EAAE,EAAE,CAAC,CAC/C,wBAAC,+BAAc,IACb,KAAK,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,EAAE,EACtD,gBAAgB,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,iCAAiC,EAChG,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,yCAE7D,EACV,wBAAC,WAAI,eACF,SAAS,IAAI,YAAY,eAAU,wCAAI,YAAY,GAAK,UAAK,MAAM,CAAC,IAAI,EAAE,GAAG,SAC3E,wCAAI,KAAK,GAAK,UAAK,SAAS,0HAE1B,EACP,uBAAC,WAAI,gGAGE,EACP,uBAAC,eAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,qBAAqB,EAC3B,WAAW,EAAE,oBAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC;AAlCW,QAAA,oCAAoC,GAApC,oCAAoC,CAkC/C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamInviteOutsideDomainEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n invitedEmail: string;\n invitedBy: string | null;\n invitedAt: string;\n roles: string;\n href: string;\n};\n\nexport const TeamInviteOutsideDomainEmailTemplate = ({\n mode,\n tenant,\n invitedEmail,\n invitedBy,\n invitedAt,\n roles,\n href,\n}: TeamInviteOutsideDomainEmailTemplateProps) => (\n <EmailContainer\n title={`${invitedEmail} was invited to ${tenant.name}`}\n shortDescription={`${invitedEmail} was invited to ${tenant.name} with an outside email address.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n A new member was invited\n </Heading>\n <Text>\n {invitedBy ?? 'An API key'} invited <b>{invitedEmail}</b> to {tenant.name}{' '}\n as <b>{roles}</b> on {invitedAt}. The address is outside the email domains\n of your team and your accounting partner, or it is a free-mail address.\n </Text>\n <Text>\n If you do not know this person, remove the member and check who invited\n them.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review team members\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -1,3 +1,6 @@
1
+ export * from './SecondFactorResetEmailTemplate';
2
+ export * from './TeamApiTokenCreatedEmailTemplate';
3
+ export * from './TeamInviteOutsideDomainEmailTemplate';
1
4
  export * from './TeamRoleGrantedEmailTemplate';
2
5
  export * from './TenantSuspensionEmailTemplate';
3
6
  export * from './TenantDeletionEmailTemplate';
@@ -5,5 +8,7 @@ export * from './OwnerStatementEmailTemplate';
5
8
  export * from './BankAccountChangedEmailTemplate';
6
9
  export * from './BankAccountChangedTeamAdminEmailTemplate';
7
10
  export * from './BankDetailsRequestEmailTemplate';
11
+ export * from './Tax1099ConsentWithdrawnEmailTemplate';
12
+ export * from './Tax1099EmailTemplate';
8
13
  export * from './InviteOwnerEmailTemplate';
9
14
  export * from './InvitePmEmailTemplate';
@@ -15,6 +15,9 @@ 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);
19
+ __exportStar(require("./TeamApiTokenCreatedEmailTemplate"), exports);
20
+ __exportStar(require("./TeamInviteOutsideDomainEmailTemplate"), exports);
18
21
  __exportStar(require("./TeamRoleGrantedEmailTemplate"), exports);
19
22
  __exportStar(require("./TenantSuspensionEmailTemplate"), exports);
20
23
  __exportStar(require("./TenantDeletionEmailTemplate"), exports);
@@ -24,6 +27,9 @@ __exportStar(require("./OwnerStatementEmailTemplate"), exports);
24
27
  __exportStar(require("./BankAccountChangedEmailTemplate"), exports);
25
28
  __exportStar(require("./BankAccountChangedTeamAdminEmailTemplate"), exports);
26
29
  __exportStar(require("./BankDetailsRequestEmailTemplate"), exports);
30
+ // 1099s
31
+ __exportStar(require("./Tax1099ConsentWithdrawnEmailTemplate"), exports);
32
+ __exportStar(require("./Tax1099EmailTemplate"), exports);
27
33
  // Invitations
28
34
  __exportStar(require("./InviteOwnerEmailTemplate"), exports);
29
35
  __exportStar(require("./InvitePmEmailTemplate"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\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// 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,yEAAuD;AACvD,iEAA+C;AAC/C,kEAAgD;AAChD,gEAA8C;AAE9C,mBAAmB;AACnB,gEAA8C;AAE9C,gBAAgB;AAChB,oEAAkD;AAClD,6EAA2D;AAC3D,oEAAkD;AAElD,QAAQ;AACR,yEAAuD;AACvD,yDAAuC;AAEvC,cAAc;AACd,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamInviteOutsideDomainEmailTemplate';\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 './Tax1099ConsentWithdrawnEmailTemplate';\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"]}
@@ -0,0 +1,9 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export declare const Tax1099ConsentWithdrawnEmailTemplate: ({ mode, user, tenant, withdrawnAt, address, }: {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ /** When the owner withdrew; the withdrawal takes effect that day. */
7
+ withdrawnAt: string;
8
+ address: string | null;
9
+ }) => import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { 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';
5
+ // PRO-20639: the written confirmation the IRS requires when an owner
6
+ // withdraws consent to get 1099s by email. Fixed text; teams can't edit it.
7
+ export const Tax1099ConsentWithdrawnEmailTemplate = ({ mode, user, tenant, withdrawnAt, address, }) => {
8
+ // The team stores no time zone. Pacific time keeps an evening withdrawal
9
+ // anywhere in the mainland US on the day the owner made it.
10
+ const effectiveOn = new Intl.DateTimeFormat('en-US', {
11
+ timeZone: 'America/Los_Angeles',
12
+ month: 'long',
13
+ day: 'numeric',
14
+ year: 'numeric',
15
+ }).format(new Date(withdrawnAt));
16
+ return (_jsxs(EmailContainer, { title: "You withdrew your consent to get 1099s by email", shortDescription: `From ${effectiveOn}, ${tenant.name} mails your 1099s.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["You withdrew your consent to get your 1099s from ", _jsx("b", { children: tenant.name }), " by email only. The withdrawal takes effect on ", _jsx("b", { children: effectiveOn }), "."] }), _jsxs(Text, { children: ["From that date, ", tenant.name, " mails your 1099s to", ' ', address || 'the address on Tax info in your owner portal', ", with a copy by email. Each 1099 also stays in Tax Statements in your owner portal."] }), _jsxs(Text, { children: ["To get your 1099s by email only again, give your consent on Tax info in your owner portal. If you did not make this change, contact", ' ', tenant.name, " right away."] })] }));
17
+ };
18
+ //# sourceMappingURL=Tax1099ConsentWithdrawnEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099ConsentWithdrawnEmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099ConsentWithdrawnEmailTemplate.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,eAAe,CAAC;AAG/C,qEAAqE;AACrE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,OAAO,GAQR,EAAE,EAAE;IACH,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACnD,QAAQ,EAAE,qBAAqB;QAC/B,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACjC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAC,iDAAiD,EACvD,gBAAgB,EAAE,QAAQ,WAAW,KAAK,MAAM,CAAC,IAAI,oBAAoB,EACzE,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,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAC/C,EACV,MAAC,IAAI,oEAC8C,sBAAI,MAAM,CAAC,IAAI,GAAK,qDAC1B,sBAAI,WAAW,GAAK,SAC1D,EACP,MAAC,IAAI,mCACc,MAAM,CAAC,IAAI,0BAAsB,GAAG,EACpD,OAAO,IAAI,8CAA8C,4FAErD,EACP,MAAC,IAAI,sJAEyD,GAAG,EAC9D,MAAM,CAAC,IAAI,oBACP,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components';\nimport type { EmailBaseProps } from '../types';\n\n// PRO-20639: the written confirmation the IRS requires when an owner\n// withdraws consent to get 1099s by email. Fixed text; teams can't edit it.\nexport const Tax1099ConsentWithdrawnEmailTemplate = ({\n mode,\n user,\n tenant,\n withdrawnAt,\n address,\n}: {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n /** When the owner withdrew; the withdrawal takes effect that day. */\n withdrawnAt: string;\n address: string | null;\n}) => {\n // The team stores no time zone. Pacific time keeps an evening withdrawal\n // anywhere in the mainland US on the day the owner made it.\n const effectiveOn = new Intl.DateTimeFormat('en-US', {\n timeZone: 'America/Los_Angeles',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n }).format(new Date(withdrawnAt));\n return (\n <EmailContainer\n title=\"You withdrew your consent to get 1099s by email\"\n shortDescription={`From ${effectiveOn}, ${tenant.name} mails your 1099s.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}\n </Heading>\n <Text>\n You withdrew your consent to get your 1099s from <b>{tenant.name}</b> by\n email only. The withdrawal takes effect on <b>{effectiveOn}</b>.\n </Text>\n <Text>\n From that date, {tenant.name} mails your 1099s to{' '}\n {address || 'the address on Tax info in your owner portal'}, with a copy\n by email. Each 1099 also stays in Tax Statements in your owner portal.\n </Text>\n <Text>\n To get your 1099s by email only again, give your consent on Tax info in\n your owner portal. If you did not make this change, contact{' '}\n {tenant.name} right away.\n </Text>\n </EmailContainer>\n );\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
+ type Tax1099EmailType = 'taxInfoRequest' | 'emailDeliveryRequest' | 'tax1099Ready' | 'tax1099Corrected';
3
+ export declare const getDefaultTax1099EmailData: (type: Tax1099EmailType, mode: 'tag' | 'text', args: {
4
+ teamName: string;
5
+ href: string;
6
+ userName: string;
7
+ taxYear: string;
8
+ }) => ActionEmailData;
9
+ export declare const Tax1099EmailTemplate: ({ type, taxYear, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
10
+ type: Tax1099EmailType;
11
+ taxYear: string;
12
+ }) => import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
3
+ import { ActionEmailTemplate, } from '../components';
4
+ // PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date
5
+ // token renders the tax year. Subject and preview text are plain text without
6
+ // tokens, so they name no year.
7
+ export const getDefaultTax1099EmailData = (type, mode, args) => {
8
+ const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
9
+ const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
10
+ const taxYear = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.taxYear;
11
+ const team = args.teamName;
12
+ const linkLine = `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`;
13
+ if (type === 'taxInfoRequest')
14
+ return {
15
+ subject: `${team} needs your tax info`,
16
+ shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,
17
+ header: 'Complete your tax info',
18
+ bodyOne: `<p>Hi ${userName},</p><p>${team} needs your tax ID to send your ${taxYear} 1099. Add it on Tax info in your owner portal.</p>`,
19
+ buttonText: 'Complete tax info',
20
+ bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,
21
+ href: args.href,
22
+ };
23
+ if (type === 'emailDeliveryRequest')
24
+ return {
25
+ subject: `Get your 1099s from ${team} by email`,
26
+ shortDescription: 'Confirm in your owner portal that you want your 1099s by email only.',
27
+ header: 'Get your 1099s by email',
28
+ bodyOne: `<p>Hi ${userName},</p><p>${team} asks whether you want your 1099s by email only, without a paper copy by mail. You then get an email when your 1099 is ready, and it stays in Tax Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,
29
+ buttonText: 'Choose 1099 delivery',
30
+ bodyTwo: linkLine,
31
+ href: args.href,
32
+ };
33
+ if (type === 'tax1099Ready')
34
+ return {
35
+ subject: `Your 1099 from ${team} is ready`,
36
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
37
+ header: 'Your 1099 is ready',
38
+ bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is in Tax Statements in your owner portal. You can download and print it there.</p>`,
39
+ buttonText: 'Open Tax Statements',
40
+ bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,
41
+ href: args.href,
42
+ };
43
+ return {
44
+ subject: `Your corrected 1099 from ${team}`,
45
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
46
+ header: 'Your 1099 was corrected',
47
+ bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is in Tax Statements in your owner portal.</p>`,
48
+ buttonText: 'Open Tax Statements',
49
+ bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,
50
+ href: args.href,
51
+ };
52
+ };
53
+ export const Tax1099EmailTemplate = ({ type, taxYear, ...props }) => (_jsx(ActionEmailTemplate, { ...props, listing: undefined, month: taxYear, eyebrow: type === 'taxInfoRequest' || type === 'emailDeliveryRequest'
54
+ ? 'Tax info'
55
+ : 'Tax statements' }));
56
+ //# sourceMappingURL=Tax1099EmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099EmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099EmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAQvB,6EAA6E;AAC7E,8EAA8E;AAC9E,gCAAgC;AAChC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAAsB,EACtB,IAAoB,EACpB,IAKC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACrE,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC3B,MAAM,QAAQ,GAAG,yGAAyG,IAAI,MAAM,CAAC;IAErI,IAAI,IAAI,KAAK,gBAAgB;QAC3B,OAAO;YACL,OAAO,EAAE,GAAG,IAAI,sBAAsB;YACtC,gBAAgB,EAAE,2CAA2C,IAAI,sBAAsB;YACvF,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,mCAAmC,OAAO,qDAAqD;YACxI,UAAU,EAAE,mBAAmB;YAC/B,OAAO,EAAE,mFAAmF,IAAI,4BAA4B,QAAQ,EAAE;YACtI,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,IAAI,IAAI,KAAK,sBAAsB;QACjC,OAAO;YACL,OAAO,EAAE,uBAAuB,IAAI,WAAW;YAC/C,gBAAgB,EACd,sEAAsE;YACxE,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,6OAA6O;YACtR,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,QAAQ;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,IAAI,IAAI,KAAK,cAAc;QACzB,OAAO;YACL,OAAO,EAAE,kBAAkB,IAAI,WAAW;YAC1C,gBAAgB,EAAE,iDAAiD;YACnE,MAAM,EAAE,oBAAoB;YAC5B,OAAO,EAAE,SAAS,QAAQ,gBAAgB,OAAO,cAAc,IAAI,sFAAsF;YACzJ,UAAU,EAAE,qBAAqB;YACjC,OAAO,EAAE,yEAAyE,QAAQ,EAAE;YAC5F,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IAEJ,OAAO;QACL,OAAO,EAAE,4BAA4B,IAAI,EAAE;QAC3C,gBAAgB,EAAE,iDAAiD;QACnE,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,sBAAsB,OAAO,+FAA+F;QACrK,UAAU,EAAE,qBAAqB;QACjC,OAAO,EAAE,mFAAmF,QAAQ,EAAE;QACtG,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EAIT,EAAE,EAAE,CAAC,CACJ,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,EACd,OAAO,EACL,IAAI,KAAK,gBAAgB,IAAI,IAAI,KAAK,sBAAsB;QAC1D,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,gBAAgB,GAEtB,CACH,CAAC","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\ntype Tax1099EmailType =\n | 'taxInfoRequest'\n | 'emailDeliveryRequest'\n | 'tax1099Ready'\n | 'tax1099Corrected';\n\n// PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date\n// token renders the tax year. Subject and preview text are plain text without\n// tokens, so they name no year.\nexport const getDefaultTax1099EmailData = (\n type: Tax1099EmailType,\n mode: 'tag' | 'text',\n args: {\n teamName: string;\n href: string;\n userName: string;\n taxYear: string;\n }\n): ActionEmailData => {\n const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n const taxYear = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.taxYear;\n const team = args.teamName;\n const linkLine = `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${href}</p>`;\n\n if (type === 'taxInfoRequest')\n return {\n subject: `${team} needs your tax info`,\n shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,\n header: 'Complete your tax info',\n bodyOne: `<p>Hi ${userName},</p><p>${team} needs your tax ID to send your ${taxYear} 1099. Add it on Tax info in your owner portal.</p>`,\n buttonText: 'Complete tax info',\n bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,\n href: args.href,\n };\n\n if (type === 'emailDeliveryRequest')\n return {\n subject: `Get your 1099s from ${team} by email`,\n shortDescription:\n 'Confirm in your owner portal that you want your 1099s by email only.',\n header: 'Get your 1099s by email',\n bodyOne: `<p>Hi ${userName},</p><p>${team} asks whether you want your 1099s by email only, without a paper copy by mail. You then get an email when your 1099 is ready, and it stays in Tax Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,\n buttonText: 'Choose 1099 delivery',\n bodyTwo: linkLine,\n href: args.href,\n };\n\n if (type === 'tax1099Ready')\n return {\n subject: `Your 1099 from ${team} is ready`,\n shortDescription: 'Open it in Tax Statements in your owner portal.',\n header: 'Your 1099 is ready',\n bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is in Tax Statements in your owner portal. You can download and print it there.</p>`,\n buttonText: 'Open Tax Statements',\n bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,\n href: args.href,\n };\n\n return {\n subject: `Your corrected 1099 from ${team}`,\n shortDescription: 'Open it in Tax Statements in your owner portal.',\n header: 'Your 1099 was corrected',\n bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is in Tax Statements in your owner portal.</p>`,\n buttonText: 'Open Tax Statements',\n bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,\n href: args.href,\n };\n};\n\nexport const Tax1099EmailTemplate = ({\n type,\n taxYear,\n ...props\n}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {\n type: Tax1099EmailType;\n taxYear: string;\n}) => (\n <ActionEmailTemplate\n {...props}\n listing={undefined}\n month={taxYear}\n eyebrow={\n type === 'taxInfoRequest' || type === 'emailDeliveryRequest'\n ? 'Tax info'\n : 'Tax statements'\n }\n />\n);\n"]}
@@ -0,0 +1,10 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamApiTokenCreatedEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ hint: string;
6
+ createdAt: string;
7
+ createdBy: string | null;
8
+ href: string;
9
+ };
10
+ export declare const TeamApiTokenCreatedEmailTemplate: ({ mode, tenant, hint, createdAt, createdBy, href, }: TeamApiTokenCreatedEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { 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 { Button } from '../components/Button';
5
+ import { EmailContainer } from '../components/EmailContainer';
6
+ import { THEME_COLORS } from '../theme';
7
+ export const TeamApiTokenCreatedEmailTemplate = ({ mode, tenant, hint, createdAt, createdBy, href, }) => (_jsxs(EmailContainer, { title: `New API key on ${tenant.name}`, shortDescription: `An API key ending in ${hint} was created on ${tenant.name}.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "New API key on your team" }), _jsxs(Text, { children: ["An API key ending in ", _jsx("b", { children: hint }), " was created on ", tenant.name, " on", ' ', createdAt, createdBy ? ` by ${createdBy}` : '', ". Anyone holding it can read and change your team's data."] }), _jsx(Text, { children: "If you did not expect this key, revoke it and review the team members." }), _jsx(Button, { href: href, mode: mode, label: "Review API keys", themeColors: THEME_COLORS.vrplatform })] }));
8
+ //# sourceMappingURL=TeamApiTokenCreatedEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamApiTokenCreatedEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamApiTokenCreatedEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAYxC,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,EAC/C,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,SAAS,EACT,SAAS,EACT,IAAI,GACkC,EAAE,EAAE,CAAC,CAC3C,MAAC,cAAc,IACb,KAAK,EAAE,kBAAkB,MAAM,CAAC,IAAI,EAAE,EACtC,gBAAgB,EAAE,wBAAwB,IAAI,mBAAmB,MAAM,CAAC,IAAI,GAAG,EAC/E,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,yCAE7D,EACV,MAAC,IAAI,wCACkB,sBAAI,IAAI,GAAK,sBAAiB,MAAM,CAAC,IAAI,SAAK,GAAG,EACrE,SAAS,EACT,SAAS,CAAC,CAAC,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,iEAE/B,EACP,KAAC,IAAI,yFAEE,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,EACvB,WAAW,EAAE,YAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamApiTokenCreatedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n hint: string;\n createdAt: string;\n createdBy: string | null;\n href: string;\n};\n\nexport const TeamApiTokenCreatedEmailTemplate = ({\n mode,\n tenant,\n hint,\n createdAt,\n createdBy,\n href,\n}: TeamApiTokenCreatedEmailTemplateProps) => (\n <EmailContainer\n title={`New API key on ${tenant.name}`}\n shortDescription={`An API key ending in ${hint} was created on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n New API key on your team\n </Heading>\n <Text>\n An API key ending in <b>{hint}</b> was created on {tenant.name} on{' '}\n {createdAt}\n {createdBy ? ` by ${createdBy}` : ''}. Anyone holding it can read and\n change your team's data.\n </Text>\n <Text>\n If you did not expect this key, revoke it and review the team members.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review API keys\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -0,0 +1,11 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamInviteOutsideDomainEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ invitedEmail: string;
6
+ invitedBy: string | null;
7
+ invitedAt: string;
8
+ roles: string;
9
+ href: string;
10
+ };
11
+ export declare const TeamInviteOutsideDomainEmailTemplate: ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }: TeamInviteOutsideDomainEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { 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 { Button } from '../components/Button';
5
+ import { EmailContainer } from '../components/EmailContainer';
6
+ import { THEME_COLORS } from '../theme';
7
+ export const TeamInviteOutsideDomainEmailTemplate = ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }) => (_jsxs(EmailContainer, { title: `${invitedEmail} was invited to ${tenant.name}`, shortDescription: `${invitedEmail} was invited to ${tenant.name} with an outside email address.`, tenant: tenant, mode: mode, children: [_jsx(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "A new member was invited" }), _jsxs(Text, { children: [invitedBy ?? 'An API key', " invited ", _jsx("b", { children: invitedEmail }), " to ", tenant.name, ' ', "as ", _jsx("b", { children: roles }), " on ", invitedAt, ". The address is outside the email domains of your team and your accounting partner, or it is a free-mail address."] }), _jsx(Text, { children: "If you do not know this person, remove the member and check who invited them." }), _jsx(Button, { href: href, mode: mode, label: "Review team members", themeColors: THEME_COLORS.vrplatform })] }));
8
+ //# sourceMappingURL=TeamInviteOutsideDomainEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamInviteOutsideDomainEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamInviteOutsideDomainEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAaxC,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,GACsC,EAAE,EAAE,CAAC,CAC/C,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,EAAE,EACtD,gBAAgB,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,iCAAiC,EAChG,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,yCAE7D,EACV,MAAC,IAAI,eACF,SAAS,IAAI,YAAY,eAAU,sBAAI,YAAY,GAAK,UAAK,MAAM,CAAC,IAAI,EAAE,GAAG,SAC3E,sBAAI,KAAK,GAAK,UAAK,SAAS,0HAE1B,EACP,KAAC,IAAI,gGAGE,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,qBAAqB,EAC3B,WAAW,EAAE,YAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamInviteOutsideDomainEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n invitedEmail: string;\n invitedBy: string | null;\n invitedAt: string;\n roles: string;\n href: string;\n};\n\nexport const TeamInviteOutsideDomainEmailTemplate = ({\n mode,\n tenant,\n invitedEmail,\n invitedBy,\n invitedAt,\n roles,\n href,\n}: TeamInviteOutsideDomainEmailTemplateProps) => (\n <EmailContainer\n title={`${invitedEmail} was invited to ${tenant.name}`}\n shortDescription={`${invitedEmail} was invited to ${tenant.name} with an outside email address.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n A new member was invited\n </Heading>\n <Text>\n {invitedBy ?? 'An API key'} invited <b>{invitedEmail}</b> to {tenant.name}{' '}\n as <b>{roles}</b> on {invitedAt}. The address is outside the email domains\n of your team and your accounting partner, or it is a free-mail address.\n </Text>\n <Text>\n If you do not know this person, remove the member and check who invited\n them.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review team members\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -1,3 +1,6 @@
1
+ export * from './SecondFactorResetEmailTemplate';
2
+ export * from './TeamApiTokenCreatedEmailTemplate';
3
+ export * from './TeamInviteOutsideDomainEmailTemplate';
1
4
  export * from './TeamRoleGrantedEmailTemplate';
2
5
  export * from './TenantSuspensionEmailTemplate';
3
6
  export * from './TenantDeletionEmailTemplate';
@@ -5,5 +8,7 @@ export * from './OwnerStatementEmailTemplate';
5
8
  export * from './BankAccountChangedEmailTemplate';
6
9
  export * from './BankAccountChangedTeamAdminEmailTemplate';
7
10
  export * from './BankDetailsRequestEmailTemplate';
11
+ export * from './Tax1099ConsentWithdrawnEmailTemplate';
12
+ export * from './Tax1099EmailTemplate';
8
13
  export * from './InviteOwnerEmailTemplate';
9
14
  export * from './InvitePmEmailTemplate';
@@ -1,4 +1,7 @@
1
1
  // Teams
2
+ export * from './SecondFactorResetEmailTemplate';
3
+ export * from './TeamApiTokenCreatedEmailTemplate';
4
+ export * from './TeamInviteOutsideDomainEmailTemplate';
2
5
  export * from './TeamRoleGrantedEmailTemplate';
3
6
  export * from './TenantSuspensionEmailTemplate';
4
7
  export * from './TenantDeletionEmailTemplate';
@@ -8,6 +11,9 @@ export * from './OwnerStatementEmailTemplate';
8
11
  export * from './BankAccountChangedEmailTemplate';
9
12
  export * from './BankAccountChangedTeamAdminEmailTemplate';
10
13
  export * from './BankDetailsRequestEmailTemplate';
14
+ // 1099s
15
+ export * from './Tax1099ConsentWithdrawnEmailTemplate';
16
+ export * from './Tax1099EmailTemplate';
11
17
  // Invitations
12
18
  export * from './InviteOwnerEmailTemplate';
13
19
  export * from './InvitePmEmailTemplate';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,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,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\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// 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,wCAAwC,CAAC;AACvD,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,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AAEvC,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './SecondFactorResetEmailTemplate';\nexport * from './TeamApiTokenCreatedEmailTemplate';\nexport * from './TeamInviteOutsideDomainEmailTemplate';\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 './Tax1099ConsentWithdrawnEmailTemplate';\nexport * from './Tax1099EmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrplatform/email",
3
- "version": "1.0.2-43698123618",
3
+ "version": "1.0.2-44075979560",
4
4
  "description": "VRTrust transactional email templates and Postmark transport",
5
5
  "license": "ISC",
6
6
  "main": "build/main/index.js",
@@ -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
+ };
@@ -0,0 +1,56 @@
1
+ import { Heading } from '@react-email/heading';
2
+ import { Text } from '@react-email/text';
3
+ import { EmailContainer } from '../components';
4
+ import type { EmailBaseProps } from '../types';
5
+
6
+ // PRO-20639: the written confirmation the IRS requires when an owner
7
+ // withdraws consent to get 1099s by email. Fixed text; teams can't edit it.
8
+ export const Tax1099ConsentWithdrawnEmailTemplate = ({
9
+ mode,
10
+ user,
11
+ tenant,
12
+ withdrawnAt,
13
+ address,
14
+ }: {
15
+ mode: EmailBaseProps['mode'];
16
+ user: EmailBaseProps['user'];
17
+ tenant: EmailBaseProps['tenant'];
18
+ /** When the owner withdrew; the withdrawal takes effect that day. */
19
+ withdrawnAt: string;
20
+ address: string | null;
21
+ }) => {
22
+ // The team stores no time zone. Pacific time keeps an evening withdrawal
23
+ // anywhere in the mainland US on the day the owner made it.
24
+ const effectiveOn = new Intl.DateTimeFormat('en-US', {
25
+ timeZone: 'America/Los_Angeles',
26
+ month: 'long',
27
+ day: 'numeric',
28
+ year: 'numeric',
29
+ }).format(new Date(withdrawnAt));
30
+ return (
31
+ <EmailContainer
32
+ title="You withdrew your consent to get 1099s by email"
33
+ shortDescription={`From ${effectiveOn}, ${tenant.name} mails your 1099s.`}
34
+ tenant={tenant}
35
+ mode={mode}
36
+ >
37
+ <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
38
+ {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}
39
+ </Heading>
40
+ <Text>
41
+ You withdrew your consent to get your 1099s from <b>{tenant.name}</b> by
42
+ email only. The withdrawal takes effect on <b>{effectiveOn}</b>.
43
+ </Text>
44
+ <Text>
45
+ From that date, {tenant.name} mails your 1099s to{' '}
46
+ {address || 'the address on Tax info in your owner portal'}, with a copy
47
+ by email. Each 1099 also stays in Tax Statements in your owner portal.
48
+ </Text>
49
+ <Text>
50
+ To get your 1099s by email only again, give your consent on Tax info in
51
+ your owner portal. If you did not make this change, contact{' '}
52
+ {tenant.name} right away.
53
+ </Text>
54
+ </EmailContainer>
55
+ );
56
+ };
@@ -0,0 +1,100 @@
1
+ import {
2
+ EMAIL_ACTION_LINK_COMPONENT,
3
+ EMAIL_DATE_COMPONENT,
4
+ EMAIL_USER_NAME_COMPONENT,
5
+ } from '../extensions';
6
+ import {
7
+ type ActionEmailData,
8
+ ActionEmailTemplate,
9
+ type ActionEmailTemplateProps,
10
+ } from '../components';
11
+
12
+ type Tax1099EmailType =
13
+ | 'taxInfoRequest'
14
+ | 'emailDeliveryRequest'
15
+ | 'tax1099Ready'
16
+ | 'tax1099Corrected';
17
+
18
+ // PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date
19
+ // token renders the tax year. Subject and preview text are plain text without
20
+ // tokens, so they name no year.
21
+ export const getDefaultTax1099EmailData = (
22
+ type: Tax1099EmailType,
23
+ mode: 'tag' | 'text',
24
+ args: {
25
+ teamName: string;
26
+ href: string;
27
+ userName: string;
28
+ taxYear: string;
29
+ }
30
+ ): ActionEmailData => {
31
+ const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
32
+ const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
33
+ const taxYear = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.taxYear;
34
+ const team = args.teamName;
35
+ const linkLine = `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`;
36
+
37
+ if (type === 'taxInfoRequest')
38
+ return {
39
+ subject: `${team} needs your tax info`,
40
+ shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,
41
+ header: 'Complete your tax info',
42
+ bodyOne: `<p>Hi ${userName},</p><p>${team} needs your tax ID to send your ${taxYear} 1099. Add it on Tax info in your owner portal.</p>`,
43
+ buttonText: 'Complete tax info',
44
+ bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,
45
+ href: args.href,
46
+ };
47
+
48
+ if (type === 'emailDeliveryRequest')
49
+ return {
50
+ subject: `Get your 1099s from ${team} by email`,
51
+ shortDescription:
52
+ 'Confirm in your owner portal that you want your 1099s by email only.',
53
+ header: 'Get your 1099s by email',
54
+ bodyOne: `<p>Hi ${userName},</p><p>${team} asks whether you want your 1099s by email only, without a paper copy by mail. You then get an email when your 1099 is ready, and it stays in Tax Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,
55
+ buttonText: 'Choose 1099 delivery',
56
+ bodyTwo: linkLine,
57
+ href: args.href,
58
+ };
59
+
60
+ if (type === 'tax1099Ready')
61
+ return {
62
+ subject: `Your 1099 from ${team} is ready`,
63
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
64
+ header: 'Your 1099 is ready',
65
+ bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is in Tax Statements in your owner portal. You can download and print it there.</p>`,
66
+ buttonText: 'Open Tax Statements',
67
+ bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,
68
+ href: args.href,
69
+ };
70
+
71
+ return {
72
+ subject: `Your corrected 1099 from ${team}`,
73
+ shortDescription: 'Open it in Tax Statements in your owner portal.',
74
+ header: 'Your 1099 was corrected',
75
+ bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is in Tax Statements in your owner portal.</p>`,
76
+ buttonText: 'Open Tax Statements',
77
+ bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,
78
+ href: args.href,
79
+ };
80
+ };
81
+
82
+ export const Tax1099EmailTemplate = ({
83
+ type,
84
+ taxYear,
85
+ ...props
86
+ }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
87
+ type: Tax1099EmailType;
88
+ taxYear: string;
89
+ }) => (
90
+ <ActionEmailTemplate
91
+ {...props}
92
+ listing={undefined}
93
+ month={taxYear}
94
+ eyebrow={
95
+ type === 'taxInfoRequest' || type === 'emailDeliveryRequest'
96
+ ? 'Tax info'
97
+ : 'Tax statements'
98
+ }
99
+ />
100
+ );
@@ -0,0 +1,50 @@
1
+ import { Heading } from '@react-email/heading';
2
+ import { Text } from '@react-email/text';
3
+ import { Button } from '../components/Button';
4
+ import { EmailContainer } from '../components/EmailContainer';
5
+ import { THEME_COLORS } from '../theme';
6
+ import type { EmailBaseProps } from '../types';
7
+
8
+ export type TeamApiTokenCreatedEmailTemplateProps = {
9
+ mode: EmailBaseProps['mode'];
10
+ tenant: EmailBaseProps['tenant'];
11
+ hint: string;
12
+ createdAt: string;
13
+ createdBy: string | null;
14
+ href: string;
15
+ };
16
+
17
+ export const TeamApiTokenCreatedEmailTemplate = ({
18
+ mode,
19
+ tenant,
20
+ hint,
21
+ createdAt,
22
+ createdBy,
23
+ href,
24
+ }: TeamApiTokenCreatedEmailTemplateProps) => (
25
+ <EmailContainer
26
+ title={`New API key on ${tenant.name}`}
27
+ shortDescription={`An API key ending in ${hint} was created on ${tenant.name}.`}
28
+ tenant={tenant}
29
+ mode={mode}
30
+ >
31
+ <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
32
+ New API key on your team
33
+ </Heading>
34
+ <Text>
35
+ An API key ending in <b>{hint}</b> was created on {tenant.name} on{' '}
36
+ {createdAt}
37
+ {createdBy ? ` by ${createdBy}` : ''}. Anyone holding it can read and
38
+ change your team's data.
39
+ </Text>
40
+ <Text>
41
+ If you did not expect this key, revoke it and review the team members.
42
+ </Text>
43
+ <Button
44
+ href={href}
45
+ mode={mode}
46
+ label="Review API keys"
47
+ themeColors={THEME_COLORS.vrplatform!}
48
+ />
49
+ </EmailContainer>
50
+ );
@@ -0,0 +1,52 @@
1
+ import { Heading } from '@react-email/heading';
2
+ import { Text } from '@react-email/text';
3
+ import { Button } from '../components/Button';
4
+ import { EmailContainer } from '../components/EmailContainer';
5
+ import { THEME_COLORS } from '../theme';
6
+ import type { EmailBaseProps } from '../types';
7
+
8
+ export type TeamInviteOutsideDomainEmailTemplateProps = {
9
+ mode: EmailBaseProps['mode'];
10
+ tenant: EmailBaseProps['tenant'];
11
+ invitedEmail: string;
12
+ invitedBy: string | null;
13
+ invitedAt: string;
14
+ roles: string;
15
+ href: string;
16
+ };
17
+
18
+ export const TeamInviteOutsideDomainEmailTemplate = ({
19
+ mode,
20
+ tenant,
21
+ invitedEmail,
22
+ invitedBy,
23
+ invitedAt,
24
+ roles,
25
+ href,
26
+ }: TeamInviteOutsideDomainEmailTemplateProps) => (
27
+ <EmailContainer
28
+ title={`${invitedEmail} was invited to ${tenant.name}`}
29
+ shortDescription={`${invitedEmail} was invited to ${tenant.name} with an outside email address.`}
30
+ tenant={tenant}
31
+ mode={mode}
32
+ >
33
+ <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>
34
+ A new member was invited
35
+ </Heading>
36
+ <Text>
37
+ {invitedBy ?? 'An API key'} invited <b>{invitedEmail}</b> to {tenant.name}{' '}
38
+ as <b>{roles}</b> on {invitedAt}. The address is outside the email domains
39
+ of your team and your accounting partner, or it is a free-mail address.
40
+ </Text>
41
+ <Text>
42
+ If you do not know this person, remove the member and check who invited
43
+ them.
44
+ </Text>
45
+ <Button
46
+ href={href}
47
+ mode={mode}
48
+ label="Review team members"
49
+ themeColors={THEME_COLORS.vrplatform!}
50
+ />
51
+ </EmailContainer>
52
+ );
@@ -1,4 +1,7 @@
1
1
  // Teams
2
+ export * from './SecondFactorResetEmailTemplate';
3
+ export * from './TeamApiTokenCreatedEmailTemplate';
4
+ export * from './TeamInviteOutsideDomainEmailTemplate';
2
5
  export * from './TeamRoleGrantedEmailTemplate';
3
6
  export * from './TenantSuspensionEmailTemplate';
4
7
  export * from './TenantDeletionEmailTemplate';
@@ -11,6 +14,10 @@ export * from './BankAccountChangedEmailTemplate';
11
14
  export * from './BankAccountChangedTeamAdminEmailTemplate';
12
15
  export * from './BankDetailsRequestEmailTemplate';
13
16
 
17
+ // 1099s
18
+ export * from './Tax1099ConsentWithdrawnEmailTemplate';
19
+ export * from './Tax1099EmailTemplate';
20
+
14
21
  // Invitations
15
22
  export * from './InviteOwnerEmailTemplate';
16
23
  export * from './InvitePmEmailTemplate';