@vrplatform/email 1.0.2-stage.445 → 1.0.2-stage.44505332089
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/components/ActionEmailTemplate.d.ts +3 -1
- package/build/main/components/ActionEmailTemplate.js +9 -13
- package/build/main/components/ActionEmailTemplate.js.map +1 -1
- package/build/main/components/Button.js.map +1 -1
- package/build/main/components/EmailContainer.d.ts +4 -1
- package/build/main/components/EmailContainer.js +4 -3
- package/build/main/components/EmailContainer.js.map +1 -1
- package/build/main/components/EmailHeading.d.ts +8 -0
- package/build/main/components/EmailHeading.js +21 -0
- package/build/main/components/EmailHeading.js.map +1 -0
- package/build/main/components/index.d.ts +1 -0
- package/build/main/components/index.js +1 -0
- package/build/main/components/index.js.map +1 -1
- package/build/main/components/utils/parse-email-html.js +13 -4
- package/build/main/components/utils/parse-email-html.js.map +1 -1
- package/build/main/const.d.ts +4 -4
- package/build/main/index.d.ts +1 -1
- package/build/main/index.js +2 -3
- package/build/main/index.js.map +1 -1
- package/build/main/render.d.ts +2 -0
- package/build/main/render.js +24 -0
- package/build/main/render.js.map +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js +15 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/main/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/main/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/main/templates/InvitePmEmailTemplate.js +4 -7
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +38 -3
- package/build/main/templates/OwnerStatementEmailTemplate.js +138 -10
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
- 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/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
- package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js +22 -0
- package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
- package/build/main/templates/Tax1099EmailTemplate.d.ts +13 -0
- package/build/main/templates/Tax1099EmailTemplate.js +61 -0
- package/build/main/templates/Tax1099EmailTemplate.js.map +1 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js +12 -0
- package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js +12 -0
- package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/main/templates/TenantDeletionEmailTemplate.js +2 -6
- package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/main/templates/TenantSuspensionEmailTemplate.js +2 -6
- package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/main/templates/YearEndStatementEmailTemplate.d.ts +23 -0
- package/build/main/templates/YearEndStatementEmailTemplate.js +37 -0
- package/build/main/templates/YearEndStatementEmailTemplate.js.map +1 -0
- package/build/main/templates/index.d.ts +10 -0
- package/build/main/templates/index.js +12 -0
- package/build/main/templates/index.js.map +1 -1
- package/build/main/theme.js.map +1 -1
- package/build/main/types.d.ts +3 -0
- package/build/main/types.js.map +1 -1
- package/build/main/utils/find-postmark-email.d.ts +8 -0
- package/build/main/utils/find-postmark-email.js +88 -0
- package/build/main/utils/find-postmark-email.js.map +1 -0
- package/build/main/utils/index.d.ts +1 -0
- package/build/main/utils/index.js +1 -0
- package/build/main/utils/index.js.map +1 -1
- package/build/main/utils/send-email.d.ts +28 -3
- package/build/main/utils/send-email.js +142 -22
- package/build/main/utils/send-email.js.map +1 -1
- package/build/module/components/ActionEmailTemplate.d.ts +3 -1
- package/build/module/components/ActionEmailTemplate.js +9 -13
- package/build/module/components/ActionEmailTemplate.js.map +1 -1
- package/build/module/components/EmailContainer.d.ts +4 -1
- package/build/module/components/EmailContainer.js +5 -4
- package/build/module/components/EmailContainer.js.map +1 -1
- package/build/module/components/EmailHeading.d.ts +8 -0
- package/build/module/components/EmailHeading.js +17 -0
- package/build/module/components/EmailHeading.js.map +1 -0
- package/build/module/components/index.d.ts +1 -0
- package/build/module/components/index.js +1 -0
- package/build/module/components/index.js.map +1 -1
- package/build/module/components/utils/parse-email-html.js +13 -4
- package/build/module/components/utils/parse-email-html.js.map +1 -1
- package/build/module/const.d.ts +4 -4
- package/build/module/index.d.ts +1 -1
- package/build/module/index.js +1 -1
- package/build/module/index.js.map +1 -1
- package/build/module/render.d.ts +2 -0
- package/build/module/render.js +20 -0
- package/build/module/render.js.map +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js +11 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/module/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/module/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/module/templates/InvitePmEmailTemplate.js +4 -7
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +38 -3
- package/build/module/templates/OwnerStatementEmailTemplate.js +137 -10
- package/build/module/templates/OwnerStatementEmailTemplate.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/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
- package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js +18 -0
- package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
- package/build/module/templates/Tax1099EmailTemplate.d.ts +13 -0
- package/build/module/templates/Tax1099EmailTemplate.js +56 -0
- package/build/module/templates/Tax1099EmailTemplate.js.map +1 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js +8 -0
- package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js +8 -0
- package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js +8 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/module/templates/TenantDeletionEmailTemplate.js +3 -7
- package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/module/templates/TenantSuspensionEmailTemplate.js +3 -7
- package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/module/templates/YearEndStatementEmailTemplate.d.ts +23 -0
- package/build/module/templates/YearEndStatementEmailTemplate.js +32 -0
- package/build/module/templates/YearEndStatementEmailTemplate.js.map +1 -0
- package/build/module/templates/index.d.ts +10 -0
- package/build/module/templates/index.js +12 -0
- package/build/module/templates/index.js.map +1 -1
- package/build/module/types.d.ts +3 -0
- package/build/module/types.js.map +1 -1
- package/build/module/utils/find-postmark-email.d.ts +8 -0
- package/build/module/utils/find-postmark-email.js +52 -0
- package/build/module/utils/find-postmark-email.js.map +1 -0
- package/build/module/utils/index.d.ts +1 -0
- package/build/module/utils/index.js +1 -0
- package/build/module/utils/index.js.map +1 -1
- package/build/module/utils/send-email.d.ts +28 -3
- package/build/module/utils/send-email.js +108 -22
- package/build/module/utils/send-email.js.map +1 -1
- package/package.json +8 -7
- package/src/components/ActionEmailTemplate.tsx +14 -16
- package/src/components/EmailContainer.tsx +20 -4
- package/src/components/EmailHeading.tsx +36 -0
- package/src/components/index.ts +1 -0
- package/src/components/utils/parse-email-html.ts +20 -6
- package/src/index.ts +1 -1
- package/src/render.ts +24 -0
- package/src/templates/BankAccountChangedEmailTemplate.tsx +53 -0
- package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +55 -0
- package/src/templates/BankDetailsRequestEmailTemplate.tsx +63 -0
- package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
- package/src/templates/InvitePmEmailTemplate.tsx +5 -7
- package/src/templates/OwnerStatementEmailTemplate.tsx +324 -14
- package/src/templates/SecondFactorResetEmailTemplate.tsx +71 -0
- package/src/templates/Tax1099ConsentWithdrawnEmailTemplate.tsx +56 -0
- package/src/templates/Tax1099EmailTemplate.tsx +100 -0
- package/src/templates/TeamApiTokenCreatedEmailTemplate.tsx +50 -0
- package/src/templates/TeamInviteOutsideDomainEmailTemplate.tsx +52 -0
- package/src/templates/TeamRoleGrantedEmailTemplate.tsx +54 -0
- package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
- package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
- package/src/templates/YearEndStatementEmailTemplate.tsx +66 -0
- package/src/templates/index.ts +14 -0
- package/src/types.ts +3 -0
- package/src/utils/find-postmark-email.ts +80 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/send-email.ts +184 -28
|
@@ -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"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type TeamRoleGrantedEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
member: string;
|
|
6
|
+
roles: string;
|
|
7
|
+
grantedAt: string;
|
|
8
|
+
grantedBy: string | null;
|
|
9
|
+
partnerName: string | null;
|
|
10
|
+
href: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TeamRoleGrantedEmailTemplate: ({ mode, tenant, member, roles, grantedAt, grantedBy, partnerName, href, }: TeamRoleGrantedEmailTemplateProps) => 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 TeamRoleGrantedEmailTemplate = ({ mode, tenant, member, roles, grantedAt, grantedBy, partnerName, href, }) => (_jsxs(EmailContainer, { title: `${member} received ${roles}`, shortDescription: `${member} received ${roles} on ${tenant.name}.`, tenant: tenant, mode: mode, children: [_jsxs(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: ["New ", roles, " on your team"] }), _jsxs(Text, { children: [_jsx("b", { children: member }), " received ", _jsx("b", { children: roles }), " on ", tenant.name, " on ", grantedAt, grantedBy ? ` from ${grantedBy}` : '', partnerName ? `, acting through your partner ${partnerName}` : '', "."] }), _jsx(Text, { children: "If you did not expect this change, review the team members and remove the role." }), _jsx(Button, { href: href, mode: mode, label: "Review team members", themeColors: THEME_COLORS.vrplatform })] }));
|
|
8
|
+
//# sourceMappingURL=TeamRoleGrantedEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamRoleGrantedEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamRoleGrantedEmailTemplate.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;AAcxC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAC3C,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,IAAI,GAC8B,EAAE,EAAE,CAAC,CACvC,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,MAAM,aAAa,KAAK,EAAE,EACpC,gBAAgB,EAAE,GAAG,MAAM,aAAa,KAAK,OAAO,MAAM,CAAC,IAAI,GAAG,EAClE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,MAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,qBAChE,KAAK,qBACF,EACV,MAAC,IAAI,eACH,sBAAI,MAAM,GAAK,gBAAU,sBAAI,KAAK,GAAK,UAAK,MAAM,CAAC,IAAI,UAAM,SAAS,EACrE,SAAS,CAAC,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EACrC,WAAW,CAAC,CAAC,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,SAC7D,EACP,KAAC,IAAI,kGAGE,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 TeamRoleGrantedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n member: string;\n roles: string;\n grantedAt: string;\n grantedBy: string | null;\n partnerName: string | null;\n href: string;\n};\n\nexport const TeamRoleGrantedEmailTemplate = ({\n mode,\n tenant,\n member,\n roles,\n grantedAt,\n grantedBy,\n partnerName,\n href,\n}: TeamRoleGrantedEmailTemplateProps) => (\n <EmailContainer\n title={`${member} received ${roles}`}\n shortDescription={`${member} received ${roles} on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n New {roles} on your team\n </Heading>\n <Text>\n <b>{member}</b> received <b>{roles}</b> on {tenant.name} on {grantedAt}\n {grantedBy ? ` from ${grantedBy}` : ''}\n {partnerName ? `, acting through your partner ${partnerName}` : ''}.\n </Text>\n <Text>\n If you did not expect this change, review the team members and remove the\n role.\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,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantDeletionEmailTemplate = ({ tenant, mode, user, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Team Account Deletion Notification', shortDescription: "We're reaching out to inform you that your VRPlatform team has been deleted.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team deleted", themeColors: THEME_COLORS.vrplatform, children: "Your team was deleted" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
13
9
|
};
|
|
14
10
|
export const TenantDeletionEmail = (props) => {
|
|
15
11
|
return _jsx(TenantDeletionEmailTemplate, { ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,MAAM,EACN,IAAI,EACJ,IAAI,GAC6B,EAAE,EAAE;IACrC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,oCAAoC,EAC3C,gBAAgB,EACd,8EAA8E,EAEhF,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,cAAc,EACtB,WAAW,EAAE,YAAY,CAAC,UAAU,sCAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,mEAC6C,MAAM,CAAC,IAAI,oHAGtD,EACP,yBACE,uBACE,MAAC,IAAI,eACH,oCAAgB,8EAEX,GACJ,EACL,uBACE,MAAC,IAAI,eACH,wCAAoB,wEAEf,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,4CAAwB,uFAEnB,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,sCAAkB,gGAEb,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,uCAAmB,+FAEd,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,8CAA0B,+EAErB,GACJ,IACF,EACL,KAAC,IAAI,4GAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAuC,EACvC,EAAE;IACF,OAAO,KAAC,2BAA2B,OAAK,KAAK,GAAI,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantDeletionEmailTemplateProps = {\n tenant: EmailBaseProps['tenant'];\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n};\n\nexport const TenantDeletionEmailTemplate = ({\n tenant,\n mode,\n user,\n}: TenantDeletionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Team Account Deletion Notification'}\n shortDescription={\n \"We're reaching out to inform you that your VRPlatform team has been deleted.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team deleted\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team was deleted\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We wanted to inform you that the team account \"{tenant.name}\" has been\n deleted. This action has resulted in the removal of the following data\n associated with the team:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Payments:</b> All payment records linked to the team have been\n permanently deleted.\n </Text>\n </li>\n <li>\n <Text>\n <b>Reservations:</b> Any reservations made under this team account\n have been erased.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Statements:</b> All statements generated for owners within\n this team are no longer accessible.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Data:</b> Personal and transactional data of the owners\n connected to this team have been removed.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Connections:</b> Any established connections or integrations\n related to this team have been terminated.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Other Related Data:</b> All other data associated with this team\n has been permanently deleted.\n </Text>\n </li>\n </ul>\n <Text>\n If you have any questions or need further assistance, please don't\n hesitate to reach out.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n\nexport const TenantDeletionEmail = (\n props: TenantDeletionEmailTemplateProps\n) => {\n return <TenantDeletionEmailTemplate {...props} />;\n};\n"]}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantSuspensionEmailTemplate = ({ mode, user, tenant, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Action Required: Your VRPlatform Account Access', shortDescription: "We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team suspended", themeColors: THEME_COLORS.vrplatform, children: "Your team access is suspended" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
13
9
|
fontWeight: 'bold',
|
|
14
10
|
}, children: "Next Steps to Regain Access:" }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Immediate Action:" }), " To adress this and help you regain access to your account, please contact our support team at your earliest convenience. We're here to assist you with the necessary steps to restore your services."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Contact Information:" }), " You can reach us by emailing support@vrplatform.app. Our dedicated team is ready to support you in resolving this matter promptly."] }) })] }), _jsx(Text, { children: "Thank you for your prompt attention to this important matter. We value your partnership and are here to support you every step of the way." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
15
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,IAAI,EACJ,IAAI,EACJ,MAAM,GAC6B,EAAE,EAAE;IACvC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,iDAAiD,EACxD,gBAAgB,EACd,sGAAsG,EAExG,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,gBAAgB,EACxB,WAAW,EAAE,YAAY,CAAC,UAAU,8CAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,yFACoE,GAAG,EAC1E,sBAAI,MAAM,CAAC,IAAI,GAAK,iNAIf,EACP,KAAC,IAAI,sSAKE,EACP,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,UAAU,EAAE,MAAM;iBACnB,6CAGI,EACP,yBACE,uBACE,MAAC,IAAI,eACH,4CAAwB,6MAInB,GACJ,EACL,uBACE,MAAC,IAAI,eACH,+CAA2B,2IAGtB,GACJ,IACF,EACL,KAAC,IAAI,6JAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantSuspensionEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: Omit<EmailBaseProps['tenant'], 'logo'>;\n};\n\nexport const TenantSuspensionEmailTemplate = ({\n mode,\n user,\n tenant,\n}: TenantSuspensionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Action Required: Your VRPlatform Account Access'}\n shortDescription={\n \"We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team suspended\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team access is suspended\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We're reaching out to inform you that as of today, access to your team{' '}\n <b>{tenant.name}</b> has been temporarily suspended. This includes\n access to features such as accounting automations, owner statements,\n management commissions and the owner portal (including portal access for\n all owners).\n </Text>\n <Text>\n At VRPlatform, we take the security and functionality of our platform\n seriously, ensuring that our partners have the best possible experience.\n This step, though necessary, is intended to be temporary and is part of\n our commitment to maintain the highest standards of service.\n </Text>\n <Text\n style={{\n fontWeight: 'bold',\n }}\n >\n Next Steps to Regain Access:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Immediate Action:</b> To adress this and help you regain access\n to your account, please contact our support team at your earliest\n convenience. We're here to assist you with the necessary steps to\n restore your services.\n </Text>\n </li>\n <li>\n <Text>\n <b>Contact Information:</b> You can reach us by emailing\n support@vrplatform.app. Our dedicated team is ready to support you\n in resolving this matter promptly.\n </Text>\n </li>\n </ul>\n <Text>\n Thank you for your prompt attention to this important matter. We value\n your partnership and are here to support you every step of the way.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ActionEmailData, ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
|
|
2
|
+
/**
|
|
3
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
4
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
5
|
+
* in the owner portal. Settings > Emails shows it; its text is fixed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getDefaultYearEndStatementEmailData: (mode: 'tag' | 'text', args: {
|
|
8
|
+
appName: string;
|
|
9
|
+
href: string;
|
|
10
|
+
userName: string;
|
|
11
|
+
/** The fiscal year, such as `2025`. */
|
|
12
|
+
year: string;
|
|
13
|
+
/** The months it covers, such as `Jan 2025 - Dec 2025`. */
|
|
14
|
+
period: string;
|
|
15
|
+
}) => ActionEmailData;
|
|
16
|
+
export declare const YearEndStatementEmailTemplate: ({ period, listings, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
|
|
17
|
+
/** The months the statement covers, such as `Jan 2025 - Dec 2025`. */
|
|
18
|
+
period: string;
|
|
19
|
+
/** The owner's listings in the year, such as `Lake House, Casita`. */
|
|
20
|
+
listings?: string;
|
|
21
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
22
|
+
renewHref?: string;
|
|
23
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
|
|
2
|
+
import { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';
|
|
3
|
+
/**
|
|
4
|
+
* Default text of the `yearEndStatement` email: an owner's year-end statement
|
|
5
|
+
* of a fiscal year is published. Owners open it by a no-login link, viewers
|
|
6
|
+
* in the owner portal. Settings > Emails shows it; its text is fixed.
|
|
7
|
+
*/
|
|
8
|
+
export const getDefaultYearEndStatementEmailData = (mode, args) => {
|
|
9
|
+
const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;
|
|
10
|
+
const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;
|
|
11
|
+
const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
|
|
12
|
+
return {
|
|
13
|
+
subject: mode === 'tag'
|
|
14
|
+
? 'Your year-end statement is ready'
|
|
15
|
+
: `Your ${args.year} year-end statement`,
|
|
16
|
+
shortDescription: mode === 'tag'
|
|
17
|
+
? 'Your year-end statement is ready to view.'
|
|
18
|
+
: `Your ${args.year} year-end statement is ready to view.`,
|
|
19
|
+
header: 'Your year-end statement is ready',
|
|
20
|
+
bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,
|
|
21
|
+
buttonText: 'View year-end statement',
|
|
22
|
+
bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`,
|
|
23
|
+
href: args.href,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export const YearEndStatementEmailTemplate = ({ period, listings, ...props }) => OwnerStatementEmailTemplate({
|
|
27
|
+
...props,
|
|
28
|
+
listing: undefined,
|
|
29
|
+
month: period,
|
|
30
|
+
yearEnd: { listings },
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=YearEndStatementEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearEndStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/YearEndStatementEmailTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CACjD,IAAoB,EACpB,IAQC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,MAAM,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACnE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,OAAO;QACL,OAAO,EACL,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,kCAAkC;YACpC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,qBAAqB;QAC5C,gBAAgB,EACd,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,2CAA2C;YAC7C,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,uCAAuC;QAC9D,MAAM,EAAE,kCAAkC;QAC1C,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,CAAC,OAAO,0CAA0C,MAAM,oFAAoF;QACrL,UAAU,EAAE,yBAAyB;QACrC,OAAO,EAAE,yGAAyG,IAAI,MAAM;QAC5H,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EAQT,EAAE,EAAE,CACH,2BAA2B,CAAC;IAC1B,GAAG,KAAK;IACR,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,EAAE,QAAQ,EAAE;CACtB,CAAC,CAAC","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { OwnerStatementEmailTemplate } from './OwnerStatementEmailTemplate';\n\n/**\n * Default text of the `yearEndStatement` email: an owner's year-end statement\n * of a fiscal year is published. Owners open it by a no-login link, viewers\n * in the owner portal. Settings > Emails shows it; its text is fixed.\n */\nexport const getDefaultYearEndStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n href: string;\n userName: string;\n /** The fiscal year, such as `2025`. */\n year: string;\n /** The months it covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n }\n): ActionEmailData => {\n const href = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.href;\n const period = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.period;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n return {\n subject:\n mode === 'tag'\n ? 'Your year-end statement is ready'\n : `Your ${args.year} year-end statement`,\n shortDescription:\n mode === 'tag'\n ? 'Your year-end statement is ready to view.'\n : `Your ${args.year} year-end statement is ready to view.`,\n header: 'Your year-end statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your year-end statement for ${period}. It sums up your owner statements of the year. Open it with the button below.</p>`,\n buttonText: 'View year-end statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${href}</p>`,\n href: args.href,\n };\n};\n\nexport const YearEndStatementEmailTemplate = ({\n period,\n listings,\n ...props\n}: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {\n /** The months the statement covers, such as `Jan 2025 - Dec 2025`. */\n period: string;\n /** The owner's listings in the year, such as `Lake House, Casita`. */\n listings?: string;\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n}) =>\n OwnerStatementEmailTemplate({\n ...props,\n listing: undefined,\n month: period,\n yearEnd: { listings },\n });\n"]}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
export * from './SecondFactorResetEmailTemplate';
|
|
2
|
+
export * from './TeamApiTokenCreatedEmailTemplate';
|
|
3
|
+
export * from './TeamInviteOutsideDomainEmailTemplate';
|
|
4
|
+
export * from './TeamRoleGrantedEmailTemplate';
|
|
1
5
|
export * from './TenantSuspensionEmailTemplate';
|
|
2
6
|
export * from './TenantDeletionEmailTemplate';
|
|
3
7
|
export * from './OwnerStatementEmailTemplate';
|
|
8
|
+
export * from './YearEndStatementEmailTemplate';
|
|
9
|
+
export * from './BankAccountChangedEmailTemplate';
|
|
10
|
+
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
11
|
+
export * from './BankDetailsRequestEmailTemplate';
|
|
12
|
+
export * from './Tax1099ConsentWithdrawnEmailTemplate';
|
|
13
|
+
export * from './Tax1099EmailTemplate';
|
|
4
14
|
export * from './InviteOwnerEmailTemplate';
|
|
5
15
|
export * from './InvitePmEmailTemplate';
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
// Teams
|
|
2
|
+
export * from './SecondFactorResetEmailTemplate';
|
|
3
|
+
export * from './TeamApiTokenCreatedEmailTemplate';
|
|
4
|
+
export * from './TeamInviteOutsideDomainEmailTemplate';
|
|
5
|
+
export * from './TeamRoleGrantedEmailTemplate';
|
|
2
6
|
export * from './TenantSuspensionEmailTemplate';
|
|
3
7
|
export * from './TenantDeletionEmailTemplate';
|
|
4
8
|
// Owner Statements
|
|
5
9
|
export * from './OwnerStatementEmailTemplate';
|
|
10
|
+
export * from './YearEndStatementEmailTemplate';
|
|
11
|
+
// Payment setup
|
|
12
|
+
export * from './BankAccountChangedEmailTemplate';
|
|
13
|
+
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
14
|
+
export * from './BankDetailsRequestEmailTemplate';
|
|
15
|
+
// 1099s
|
|
16
|
+
export * from './Tax1099ConsentWithdrawnEmailTemplate';
|
|
17
|
+
export * from './Tax1099EmailTemplate';
|
|
6
18
|
// Invitations
|
|
7
19
|
export * from './InviteOwnerEmailTemplate';
|
|
8
20
|
export * from './InvitePmEmailTemplate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;
|
|
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;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,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';\nexport * from './YearEndStatementEmailTemplate';\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/build/module/types.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ export type EmailBaseProps = {
|
|
|
2
2
|
mode: 'edit' | 'preview' | 'send';
|
|
3
3
|
tenant: {
|
|
4
4
|
name: string;
|
|
5
|
+
showPlatformBranding?: boolean;
|
|
5
6
|
logo: string | undefined | null;
|
|
6
7
|
};
|
|
7
8
|
listing: string | undefined;
|
|
8
9
|
month: string | undefined;
|
|
10
|
+
/** Opt-out link shown below the email body */
|
|
11
|
+
unsubscribeHref?: string;
|
|
9
12
|
user: {
|
|
10
13
|
firstName: string | undefined;
|
|
11
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["export type EmailBaseProps = {\n mode: 'edit' | 'preview' | 'send';\n tenant: {\n name: string;\n logo: string | undefined | null;\n };\n listing: string | undefined;\n month: string | undefined;\n user: {\n firstName: string | undefined;\n };\n themeColors: readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n ];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["export type EmailBaseProps = {\n mode: 'edit' | 'preview' | 'send';\n tenant: {\n name: string;\n showPlatformBranding?: boolean;\n logo: string | undefined | null;\n };\n listing: string | undefined;\n month: string | undefined;\n /** Opt-out link shown below the email body */\n unsubscribeHref?: string;\n user: {\n firstName: string | undefined;\n };\n themeColors: readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n ];\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function findPostmarkEmail(deliveryId: string, options: {
|
|
2
|
+
fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
postmarkToken?: string;
|
|
4
|
+
}): Promise<{
|
|
5
|
+
httpStatus: number;
|
|
6
|
+
messageId: string;
|
|
7
|
+
submittedAt: string;
|
|
8
|
+
} | undefined>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { day } from '@vrplatform/utils';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
import { EmailDeliveryError } from './send-email';
|
|
4
|
+
const postmarkMessagesResponseSchema = z.object({
|
|
5
|
+
TotalCount: z.number().int().nonnegative(),
|
|
6
|
+
Messages: z.array(z.object({
|
|
7
|
+
MessageID: z.string().min(1),
|
|
8
|
+
ReceivedAt: z.string().refine((value) => day(value).isValid()),
|
|
9
|
+
Metadata: z.object({ deliveryId: z.string() }).passthrough(),
|
|
10
|
+
})),
|
|
11
|
+
});
|
|
12
|
+
export async function findPostmarkEmail(deliveryId, options) {
|
|
13
|
+
if (!options.postmarkToken) {
|
|
14
|
+
throw new EmailDeliveryError('Postmark is not configured', undefined, false, false);
|
|
15
|
+
}
|
|
16
|
+
const url = new URL('https://api.postmarkapp.com/messages/outbound');
|
|
17
|
+
url.searchParams.set('count', '1');
|
|
18
|
+
url.searchParams.set('offset', '0');
|
|
19
|
+
url.searchParams.set('messagestream', 'outbound');
|
|
20
|
+
url.searchParams.set('metadata_deliveryId', deliveryId);
|
|
21
|
+
const response = await (options.fetch ?? fetch)(url, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: 'application/json',
|
|
25
|
+
'X-Postmark-Server-Token': options.postmarkToken,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const providerResponse = await response.json().catch(() => ({}));
|
|
29
|
+
if (!response.ok) {
|
|
30
|
+
throw new EmailDeliveryError('Postmark message lookup failed', {
|
|
31
|
+
provider: 'postmark',
|
|
32
|
+
providerCategory: 'rejected',
|
|
33
|
+
httpStatus: response.status,
|
|
34
|
+
}, false, response.status === 429 || response.status >= 500);
|
|
35
|
+
}
|
|
36
|
+
const result = postmarkMessagesResponseSchema.safeParse(providerResponse);
|
|
37
|
+
if (!result.success) {
|
|
38
|
+
throw new EmailDeliveryError('Postmark returned an invalid response');
|
|
39
|
+
}
|
|
40
|
+
if (result.data.TotalCount === 0)
|
|
41
|
+
return undefined;
|
|
42
|
+
const message = result.data.Messages.find(({ Metadata }) => Metadata.deliveryId === deliveryId);
|
|
43
|
+
if (!message) {
|
|
44
|
+
throw new EmailDeliveryError('Postmark returned an invalid response');
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
httpStatus: response.status,
|
|
48
|
+
messageId: message.MessageID,
|
|
49
|
+
submittedAt: message.ReceivedAt,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=find-postmark-email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-postmark-email.js","sourceRoot":"src/","sources":["utils/find-postmark-email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC1C,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,MAAM,CAAC;QACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QAC9D,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;KAC7D,CAAC,CACH;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,UAAkB,EAClB,OAMC;IAED,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3B,MAAM,IAAI,kBAAkB,CAC1B,4BAA4B,EAC5B,SAAS,EACT,KAAK,EACL,KAAK,CACN,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,+CAA+C,CAAC,CAAC;IACrE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACnC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACpC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IAClD,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,GAAG,EAAE;QACnD,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,yBAAyB,EAAE,OAAO,CAAC,aAAa;SACjD;KACF,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAY,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAE1E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,kBAAkB,CAC1B,gCAAgC,EAChC;YACE,QAAQ,EAAE,UAAU;YACpB,gBAAgB,EAAE,UAAU;YAC5B,UAAU,EAAE,QAAQ,CAAC,MAAM;SAC5B,EACD,KAAK,EACL,QAAQ,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,CAClD,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,8BAA8B,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC1E,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,kBAAkB,CAAC,uCAAuC,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAEnD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CACvC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,KAAK,UAAU,CACrD,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,kBAAkB,CAAC,uCAAuC,CAAC,CAAC;IACxE,CAAC;IAED,OAAO;QACL,UAAU,EAAE,QAAQ,CAAC,MAAM;QAC3B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,OAAO,CAAC,UAAU;KAChC,CAAC;AACJ,CAAC","sourcesContent":["import { day } from '@vrplatform/utils';\nimport * as z from 'zod';\nimport { EmailDeliveryError } from './send-email';\n\nconst postmarkMessagesResponseSchema = z.object({\n TotalCount: z.number().int().nonnegative(),\n Messages: z.array(\n z.object({\n MessageID: z.string().min(1),\n ReceivedAt: z.string().refine((value) => day(value).isValid()),\n Metadata: z.object({ deliveryId: z.string() }).passthrough(),\n })\n ),\n});\n\nexport async function findPostmarkEmail(\n deliveryId: string,\n options: {\n fetch?: (\n input: string | URL | Request,\n init?: RequestInit\n ) => Promise<Response>;\n postmarkToken?: string;\n }\n) {\n if (!options.postmarkToken) {\n throw new EmailDeliveryError(\n 'Postmark is not configured',\n undefined,\n false,\n false\n );\n }\n\n const url = new URL('https://api.postmarkapp.com/messages/outbound');\n url.searchParams.set('count', '1');\n url.searchParams.set('offset', '0');\n url.searchParams.set('messagestream', 'outbound');\n url.searchParams.set('metadata_deliveryId', deliveryId);\n const response = await (options.fetch ?? fetch)(url, {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n 'X-Postmark-Server-Token': options.postmarkToken,\n },\n });\n const providerResponse: unknown = await response.json().catch(() => ({}));\n\n if (!response.ok) {\n throw new EmailDeliveryError(\n 'Postmark message lookup failed',\n {\n provider: 'postmark',\n providerCategory: 'rejected',\n httpStatus: response.status,\n },\n false,\n response.status === 429 || response.status >= 500\n );\n }\n\n const result = postmarkMessagesResponseSchema.safeParse(providerResponse);\n if (!result.success) {\n throw new EmailDeliveryError('Postmark returned an invalid response');\n }\n if (result.data.TotalCount === 0) return undefined;\n\n const message = result.data.Messages.find(\n ({ Metadata }) => Metadata.deliveryId === deliveryId\n );\n if (!message) {\n throw new EmailDeliveryError('Postmark returned an invalid response');\n }\n\n return {\n httpStatus: response.status,\n messageId: message.MessageID,\n submittedAt: message.ReceivedAt,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './send-email';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC","sourcesContent":["export * from './find-postmark-email';\nexport * from './send-email';\n"]}
|
|
@@ -1,17 +1,42 @@
|
|
|
1
|
+
type EmailDeliveryFailureDetails = {
|
|
2
|
+
httpStatus: number;
|
|
3
|
+
postmarkErrorCode?: number;
|
|
4
|
+
provider: 'postmark';
|
|
5
|
+
providerCategory: 'inactiveRecipient' | 'rejected';
|
|
6
|
+
};
|
|
7
|
+
type EmailDeliveryErrorDetails = EmailDeliveryFailureDetails | {
|
|
8
|
+
failureCount: number;
|
|
9
|
+
failures: EmailDeliveryFailureDetails[];
|
|
10
|
+
};
|
|
1
11
|
export declare class EmailDeliveryError extends Error {
|
|
2
|
-
readonly details?:
|
|
12
|
+
readonly details?: EmailDeliveryErrorDetails | undefined;
|
|
3
13
|
readonly expected: boolean;
|
|
4
|
-
|
|
14
|
+
readonly retryable: boolean;
|
|
15
|
+
constructor(message: string, details?: EmailDeliveryErrorDetails | undefined, expected?: boolean, retryable?: boolean);
|
|
5
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Formats a verified sender address with a display name for the From header.
|
|
19
|
+
* Registrations store bare addresses; recipients should still see the company
|
|
20
|
+
* name the way they see `VRPlatform <notifications@vrplatform.app>`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatSenderIdentity(name: string | null | undefined, address: string): string;
|
|
6
23
|
export declare function sendEmail(data: {
|
|
7
24
|
to: string;
|
|
8
25
|
subject: string;
|
|
9
26
|
text: string;
|
|
10
27
|
html: string;
|
|
11
28
|
replyTo?: string;
|
|
29
|
+
tag?: string;
|
|
30
|
+
metadata?: Record<string, string>;
|
|
31
|
+
from?: string;
|
|
32
|
+
headers?: Record<string, string>;
|
|
12
33
|
}, options: {
|
|
13
34
|
fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
14
35
|
postmarkToken?: string;
|
|
15
36
|
}): Promise<{
|
|
16
|
-
|
|
37
|
+
httpStatus: number;
|
|
38
|
+
messageId: string;
|
|
39
|
+
submittedAt: string;
|
|
17
40
|
}>;
|
|
41
|
+
export declare function settleEmailDeliveries(deliveries: Promise<unknown>[]): Promise<void>;
|
|
42
|
+
export {};
|