@vrplatform/email 1.0.2-454 → 1.0.2-46615499325

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 (186) hide show
  1. package/build/main/components/ActionEmailTemplate.d.ts +3 -1
  2. package/build/main/components/ActionEmailTemplate.js +9 -13
  3. package/build/main/components/ActionEmailTemplate.js.map +1 -1
  4. package/build/main/components/Button.js.map +1 -1
  5. package/build/main/components/EmailContainer.d.ts +4 -1
  6. package/build/main/components/EmailContainer.js +4 -3
  7. package/build/main/components/EmailContainer.js.map +1 -1
  8. package/build/main/components/EmailHeading.d.ts +8 -0
  9. package/build/main/components/EmailHeading.js +21 -0
  10. package/build/main/components/EmailHeading.js.map +1 -0
  11. package/build/main/components/index.d.ts +1 -0
  12. package/build/main/components/index.js +1 -0
  13. package/build/main/components/index.js.map +1 -1
  14. package/build/main/components/utils/parse-email-html.js +13 -4
  15. package/build/main/components/utils/parse-email-html.js.map +1 -1
  16. package/build/main/const.d.ts +4 -4
  17. package/build/main/index.d.ts +1 -1
  18. package/build/main/index.js +2 -3
  19. package/build/main/index.js.map +1 -1
  20. package/build/main/render.d.ts +2 -0
  21. package/build/main/render.js +24 -0
  22. package/build/main/render.js.map +1 -0
  23. package/build/main/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
  24. package/build/main/templates/BankAccountChangedEmailTemplate.js +12 -0
  25. package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -0
  26. package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
  27. package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +12 -0
  28. package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
  29. package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
  30. package/build/main/templates/BankDetailsRequestEmailTemplate.js +15 -0
  31. package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
  32. package/build/main/templates/InviteOwnerEmailTemplate.d.ts +2 -2
  33. package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
  34. package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
  35. package/build/main/templates/InvitePmEmailTemplate.d.ts +2 -1
  36. package/build/main/templates/InvitePmEmailTemplate.js +4 -7
  37. package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
  38. package/build/main/templates/OwnerStatementEmailTemplate.d.ts +41 -3
  39. package/build/main/templates/OwnerStatementEmailTemplate.js +147 -10
  40. package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
  41. package/build/main/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
  42. package/build/main/templates/SecondFactorResetEmailTemplate.js +19 -0
  43. package/build/main/templates/SecondFactorResetEmailTemplate.js.map +1 -0
  44. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
  45. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js +22 -0
  46. package/build/main/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
  47. package/build/main/templates/Tax1099EmailTemplate.d.ts +15 -0
  48. package/build/main/templates/Tax1099EmailTemplate.js +64 -0
  49. package/build/main/templates/Tax1099EmailTemplate.js.map +1 -0
  50. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
  51. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js +12 -0
  52. package/build/main/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
  53. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
  54. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js +12 -0
  55. package/build/main/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
  56. package/build/main/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
  57. package/build/main/templates/TeamRoleGrantedEmailTemplate.js +12 -0
  58. package/build/main/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
  59. package/build/main/templates/TenantDeletionEmailTemplate.js +2 -6
  60. package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
  61. package/build/main/templates/TenantSuspensionEmailTemplate.js +2 -6
  62. package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
  63. package/build/main/templates/YearEndStatementEmailTemplate.d.ts +23 -0
  64. package/build/main/templates/YearEndStatementEmailTemplate.js +37 -0
  65. package/build/main/templates/YearEndStatementEmailTemplate.js.map +1 -0
  66. package/build/main/templates/index.d.ts +10 -0
  67. package/build/main/templates/index.js +12 -0
  68. package/build/main/templates/index.js.map +1 -1
  69. package/build/main/theme.js.map +1 -1
  70. package/build/main/types.d.ts +3 -0
  71. package/build/main/types.js.map +1 -1
  72. package/build/main/utils/find-postmark-email.d.ts +8 -0
  73. package/build/main/utils/find-postmark-email.js +88 -0
  74. package/build/main/utils/find-postmark-email.js.map +1 -0
  75. package/build/main/utils/index.d.ts +1 -0
  76. package/build/main/utils/index.js +1 -0
  77. package/build/main/utils/index.js.map +1 -1
  78. package/build/main/utils/send-email.d.ts +28 -3
  79. package/build/main/utils/send-email.js +142 -22
  80. package/build/main/utils/send-email.js.map +1 -1
  81. package/build/module/components/ActionEmailTemplate.d.ts +3 -1
  82. package/build/module/components/ActionEmailTemplate.js +9 -13
  83. package/build/module/components/ActionEmailTemplate.js.map +1 -1
  84. package/build/module/components/EmailContainer.d.ts +4 -1
  85. package/build/module/components/EmailContainer.js +5 -4
  86. package/build/module/components/EmailContainer.js.map +1 -1
  87. package/build/module/components/EmailHeading.d.ts +8 -0
  88. package/build/module/components/EmailHeading.js +17 -0
  89. package/build/module/components/EmailHeading.js.map +1 -0
  90. package/build/module/components/index.d.ts +1 -0
  91. package/build/module/components/index.js +1 -0
  92. package/build/module/components/index.js.map +1 -1
  93. package/build/module/components/utils/parse-email-html.js +13 -4
  94. package/build/module/components/utils/parse-email-html.js.map +1 -1
  95. package/build/module/const.d.ts +4 -4
  96. package/build/module/index.d.ts +1 -1
  97. package/build/module/index.js +1 -1
  98. package/build/module/index.js.map +1 -1
  99. package/build/module/render.d.ts +2 -0
  100. package/build/module/render.js +20 -0
  101. package/build/module/render.js.map +1 -0
  102. package/build/module/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
  103. package/build/module/templates/BankAccountChangedEmailTemplate.js +8 -0
  104. package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -0
  105. package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
  106. package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +8 -0
  107. package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
  108. package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
  109. package/build/module/templates/BankDetailsRequestEmailTemplate.js +11 -0
  110. package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
  111. package/build/module/templates/InviteOwnerEmailTemplate.d.ts +2 -2
  112. package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
  113. package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
  114. package/build/module/templates/InvitePmEmailTemplate.d.ts +2 -1
  115. package/build/module/templates/InvitePmEmailTemplate.js +4 -7
  116. package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
  117. package/build/module/templates/OwnerStatementEmailTemplate.d.ts +41 -3
  118. package/build/module/templates/OwnerStatementEmailTemplate.js +146 -10
  119. package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
  120. package/build/module/templates/SecondFactorResetEmailTemplate.d.ts +11 -0
  121. package/build/module/templates/SecondFactorResetEmailTemplate.js +15 -0
  122. package/build/module/templates/SecondFactorResetEmailTemplate.js.map +1 -0
  123. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.d.ts +9 -0
  124. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js +18 -0
  125. package/build/module/templates/Tax1099ConsentWithdrawnEmailTemplate.js.map +1 -0
  126. package/build/module/templates/Tax1099EmailTemplate.d.ts +15 -0
  127. package/build/module/templates/Tax1099EmailTemplate.js +59 -0
  128. package/build/module/templates/Tax1099EmailTemplate.js.map +1 -0
  129. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.d.ts +10 -0
  130. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js +8 -0
  131. package/build/module/templates/TeamApiTokenCreatedEmailTemplate.js.map +1 -0
  132. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.d.ts +11 -0
  133. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js +8 -0
  134. package/build/module/templates/TeamInviteOutsideDomainEmailTemplate.js.map +1 -0
  135. package/build/module/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
  136. package/build/module/templates/TeamRoleGrantedEmailTemplate.js +8 -0
  137. package/build/module/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
  138. package/build/module/templates/TenantDeletionEmailTemplate.js +3 -7
  139. package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
  140. package/build/module/templates/TenantSuspensionEmailTemplate.js +3 -7
  141. package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
  142. package/build/module/templates/YearEndStatementEmailTemplate.d.ts +23 -0
  143. package/build/module/templates/YearEndStatementEmailTemplate.js +32 -0
  144. package/build/module/templates/YearEndStatementEmailTemplate.js.map +1 -0
  145. package/build/module/templates/index.d.ts +10 -0
  146. package/build/module/templates/index.js +12 -0
  147. package/build/module/templates/index.js.map +1 -1
  148. package/build/module/types.d.ts +3 -0
  149. package/build/module/types.js.map +1 -1
  150. package/build/module/utils/find-postmark-email.d.ts +8 -0
  151. package/build/module/utils/find-postmark-email.js +52 -0
  152. package/build/module/utils/find-postmark-email.js.map +1 -0
  153. package/build/module/utils/index.d.ts +1 -0
  154. package/build/module/utils/index.js +1 -0
  155. package/build/module/utils/index.js.map +1 -1
  156. package/build/module/utils/send-email.d.ts +28 -3
  157. package/build/module/utils/send-email.js +108 -22
  158. package/build/module/utils/send-email.js.map +1 -1
  159. package/package.json +8 -7
  160. package/src/components/ActionEmailTemplate.tsx +14 -16
  161. package/src/components/EmailContainer.tsx +20 -4
  162. package/src/components/EmailHeading.tsx +36 -0
  163. package/src/components/index.ts +1 -0
  164. package/src/components/utils/parse-email-html.ts +20 -6
  165. package/src/index.ts +1 -1
  166. package/src/render.ts +24 -0
  167. package/src/templates/BankAccountChangedEmailTemplate.tsx +53 -0
  168. package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +55 -0
  169. package/src/templates/BankDetailsRequestEmailTemplate.tsx +63 -0
  170. package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
  171. package/src/templates/InvitePmEmailTemplate.tsx +5 -7
  172. package/src/templates/OwnerStatementEmailTemplate.tsx +336 -14
  173. package/src/templates/SecondFactorResetEmailTemplate.tsx +71 -0
  174. package/src/templates/Tax1099ConsentWithdrawnEmailTemplate.tsx +57 -0
  175. package/src/templates/Tax1099EmailTemplate.tsx +106 -0
  176. package/src/templates/TeamApiTokenCreatedEmailTemplate.tsx +50 -0
  177. package/src/templates/TeamInviteOutsideDomainEmailTemplate.tsx +52 -0
  178. package/src/templates/TeamRoleGrantedEmailTemplate.tsx +54 -0
  179. package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
  180. package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
  181. package/src/templates/YearEndStatementEmailTemplate.tsx +66 -0
  182. package/src/templates/index.ts +14 -0
  183. package/src/types.ts +3 -0
  184. package/src/utils/find-postmark-email.ts +80 -0
  185. package/src/utils/index.ts +1 -0
  186. package/src/utils/send-email.ts +184 -28
@@ -0,0 +1,17 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type BankAccountChangedTeamAdminEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ contact: {
6
+ name: string;
7
+ type: 'owner' | 'vendor';
8
+ };
9
+ bankAccount: {
10
+ last4: string;
11
+ changedOn: string;
12
+ changedBy: string | null;
13
+ added: boolean;
14
+ };
15
+ href: string;
16
+ };
17
+ export declare const BankAccountChangedTeamAdminEmailTemplate: ({ mode, tenant, contact, bankAccount, href, }: BankAccountChangedTeamAdminEmailTemplateProps) => 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 BankAccountChangedTeamAdminEmailTemplate = ({ mode, tenant, contact, bankAccount, href, }) => (_jsxs(EmailContainer, { title: `Bank details ${bankAccount.added ? 'added' : 'changed'} for ${contact.name}`, shortDescription: `Future payments to ${contact.name} go to the account ending in ${bankAccount.last4}.`, tenant: tenant, mode: mode, children: [_jsxs(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: ["Bank details ", bankAccount.added ? 'added' : 'changed'] }), _jsxs(Text, { children: ["The bank account of ", contact.type, " ", _jsx("b", { children: contact.name }), " was", ' ', bankAccount.added ? 'added' : 'changed', " on ", bankAccount.changedOn, bankAccount.changedBy ? ` by ${bankAccount.changedBy}` : '', ". Future payments go to the account ending in ", _jsx("b", { children: bankAccount.last4 }), "."] }), _jsxs(Text, { children: ["If you did not expect this change, confirm it with ", contact.name, " by phone before the next payment."] }), _jsx(Button, { href: href, mode: mode, label: "Review payment setup", themeColors: THEME_COLORS.vrplatform })] }));
8
+ //# sourceMappingURL=BankAccountChangedTeamAdminEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BankAccountChangedTeamAdminEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankAccountChangedTeamAdminEmailTemplate.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,sBAA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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 BankAccountChangedTeamAdminEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n contact: { name: string; type: 'owner' | 'vendor' };\n // Added: the contact had no bank account before.\n bankAccount: {\n last4: string;\n changedOn: string;\n changedBy: string | null;\n added: boolean;\n };\n href: string;\n};\n\nexport const BankAccountChangedTeamAdminEmailTemplate = ({\n mode,\n tenant,\n contact,\n bankAccount,\n href,\n}: BankAccountChangedTeamAdminEmailTemplateProps) => (\n <EmailContainer\n title={`Bank details ${bankAccount.added ? 'added' : 'changed'} for ${contact.name}`}\n shortDescription={`Future payments to ${contact.name} go to the account ending in ${bankAccount.last4}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n Bank details {bankAccount.added ? 'added' : 'changed'}\n </Heading>\n <Text>\n The bank account of {contact.type} <b>{contact.name}</b> was{' '}\n {bankAccount.added ? 'added' : 'changed'} on {bankAccount.changedOn}\n {bankAccount.changedBy ? ` by ${bankAccount.changedBy}` : ''}. Future\n payments go to the account ending in <b>{bankAccount.last4}</b>.\n </Text>\n <Text>\n If you did not expect this change, confirm it with {contact.name} by phone\n before the next payment.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review payment setup\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -0,0 +1,17 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type BankDetailsRequestEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ payeeName: string;
7
+ themeColors: EmailBaseProps['themeColors'];
8
+ href: string;
9
+ form: {
10
+ type: 'ownerPortal';
11
+ setsUpLogin: boolean;
12
+ } | {
13
+ type: 'oneTime';
14
+ expiresOn: string;
15
+ };
16
+ };
17
+ export declare const BankDetailsRequestEmailTemplate: ({ mode, user, tenant, payeeName, themeColors, href, form, }: BankDetailsRequestEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,11 @@
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
+ export const BankDetailsRequestEmailTemplate = ({ mode, user, tenant, payeeName, themeColors, href, form, }) => (_jsxs(EmailContainer, { title: `${tenant.name} needs payout details for ${payeeName}`, shortDescription: `Add the bank account ${tenant.name} pays you to.`, 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: [_jsx("b", { children: tenant.name }), " needs the bank account to send your payments to. Use the button below to add it. Never send bank details by email."] }), _jsx(Text, { children: form.type === 'oneTime'
7
+ ? `The link works once and expires on ${form.expiresOn}.`
8
+ : form.setsUpLogin
9
+ ? 'You will set up your owner portal login first, then add your bank details.'
10
+ : 'Sign in to your owner portal to add your bank details.' }), _jsx(Button, { href: href, mode: mode, label: "Add bank details", themeColors: themeColors }), _jsxs(Text, { children: ["If you did not expect this request, contact ", tenant.name, " before you enter any details."] })] }));
11
+ //# sourceMappingURL=BankDetailsRequestEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BankDetailsRequestEmailTemplate.js","sourceRoot":"src/","sources":["templates/BankDetailsRequestEmailTemplate.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;AAmB9D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,EACT,WAAW,EACX,IAAI,EACJ,IAAI,GACiC,EAAE,EAAE,CAAC,CAC1C,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,MAAM,CAAC,IAAI,6BAA6B,SAAS,EAAE,EAC7D,gBAAgB,EAAE,wBAAwB,MAAM,CAAC,IAAI,eAAe,EACpE,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,eACH,sBAAI,MAAM,CAAC,IAAI,GAAK,2HAEf,EACP,KAAC,IAAI,cACF,IAAI,CAAC,IAAI,KAAK,SAAS;gBACtB,CAAC,CAAC,sCAAsC,IAAI,CAAC,SAAS,GAAG;gBACzD,CAAC,CAAC,IAAI,CAAC,WAAW;oBAChB,CAAC,CAAC,4EAA4E;oBAC9E,CAAC,CAAC,wDAAwD,GACzD,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,kBAAkB,EACxB,WAAW,EAAE,WAAW,GACxB,EACF,MAAC,IAAI,+DAC0C,MAAM,CAAC,IAAI,sCAEnD,IACQ,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 type { EmailBaseProps } from '../types';\n\nexport type BankDetailsRequestEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n // The owner or vendor asked, so requests to different payees do not thread\n // together.\n payeeName: string;\n themeColors: EmailBaseProps['themeColors'];\n href: string;\n // Owners enter their details in the owner portal; vendors in a one-time\n // form that expires.\n form:\n | { type: 'ownerPortal'; setsUpLogin: boolean }\n | { type: 'oneTime'; expiresOn: string };\n};\n\nexport const BankDetailsRequestEmailTemplate = ({\n mode,\n user,\n tenant,\n payeeName,\n themeColors,\n href,\n form,\n}: BankDetailsRequestEmailTemplateProps) => (\n <EmailContainer\n title={`${tenant.name} needs payout details for ${payeeName}`}\n shortDescription={`Add the bank account ${tenant.name} pays you to.`}\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 <b>{tenant.name}</b> needs the bank account to send your payments to. Use\n the button below to add it. Never send bank details by email.\n </Text>\n <Text>\n {form.type === 'oneTime'\n ? `The link works once and expires on ${form.expiresOn}.`\n : form.setsUpLogin\n ? 'You will set up your owner portal login first, then add your bank details.'\n : 'Sign in to your owner portal to add your bank details.'}\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Add bank details\"\n themeColors={themeColors}\n />\n <Text>\n If you did not expect this request, contact {tenant.name} before you enter\n any details.\n </Text>\n </EmailContainer>\n);\n"]}
@@ -1,8 +1,8 @@
1
1
  import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
- export declare const getDefaultInviteOwnerEmailData: (mode: "tag" | "text", args: {
2
+ export declare const getDefaultInviteOwnerEmailData: (mode: 'tag' | 'text', args: {
3
3
  appName: string;
4
4
  signInLink: string;
5
5
  }) => ActionEmailData;
6
6
  export declare const InviteOwnerEmailTemplate: ({ ownerAccessRole, ...props }: ActionEmailTemplateProps & {
7
- ownerAccessRole?: "admin" | "viewer";
7
+ ownerAccessRole?: 'admin' | 'viewer';
8
8
  }) => import("react").JSX.Element;
@@ -14,7 +14,7 @@ export const getDefaultInviteOwnerEmailData = (mode, args) => {
14
14
  };
15
15
  };
16
16
  export const InviteOwnerEmailTemplate = ({ ownerAccessRole = 'admin', ...props }) => {
17
- return (_jsx(ActionEmailTemplate, { ...props, data: {
17
+ return (_jsx(ActionEmailTemplate, { ...props, eyebrow: "Owner Portal invitation", data: {
18
18
  ...props.data,
19
19
  // Add guidance at render time so saved custom templates receive it too.
20
20
  bodyTwo: `${props.data.bodyTwo}<hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,
@@ -1 +1 @@
1
- {"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,qDAAqD,IAAI,CAAC,OAAO,gEAAgE;QAC1I,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,+BAA+B;QACvC,gBAAgB,EAAE,wDAAwD;QAC1E,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,0BAA0B,IAAI,CAAC,OAAO,eAAe;KAC/D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,yBAAyB,EACjC,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInviteOwnerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;\n\n return {\n bodyOne: `<p>You are invited to access your Owner Portal on ${args.appName}.</p><p>Accept the invitation below to set up your access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to your Owner Portal!',\n shortDescription: 'Set up your Owner Portal access using your invitation.',\n href: args.signInLink,\n subject: `Your invitation to the ${args.appName} Owner Portal`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = ({\n ownerAccessRole = 'admin',\n ...props\n}: ActionEmailTemplateProps & {\n ownerAccessRole?: 'admin' | 'viewer';\n}) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Owner Portal invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your property manager for a new invitation.</p><p>For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.</p>`,\n }}\n />\n );\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
- export declare const getDefaultInvitePropertyManagerEmailData: (mode: "tag" | "text", args: {
2
+ export declare const getDefaultInvitePropertyManagerEmailData: (mode: 'tag' | 'text', args: {
3
3
  appName: string;
4
4
  signInLink: string;
5
+ teamName: string;
5
6
  }) => ActionEmailData;
6
7
  export declare const InvitePmEmailTemplate: (props: ActionEmailTemplateProps) => import("react").JSX.Element;
@@ -6,23 +6,20 @@ export const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
6
6
  ? EMAIL_ACTION_LINK_COMPONENT
7
7
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
8
8
  return {
9
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
9
+ bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
10
10
  bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
11
11
  buttonText: 'Accept Invitation',
12
12
  header: 'Welcome to the team!',
13
- shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
13
+ shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
14
14
  href: args.signInLink,
15
- subject: `You are invited to join your team on ${args.appName}`,
15
+ subject: `You are invited to join ${args.teamName} on ${args.appName}`,
16
16
  };
17
17
  };
18
18
  export const InvitePmEmailTemplate = (props) => {
19
- return (_jsx(ActionEmailTemplate, { ...props, data: {
19
+ return (_jsx(ActionEmailTemplate, { ...props, eyebrow: "Team invitation", data: {
20
20
  ...props.data,
21
21
  // Add guidance at render time so saved custom templates receive it too.
22
22
  bodyTwo: `${props.data.bodyTwo}<hr style="width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,
23
- }, tenant: {
24
- logo: undefined,
25
- name: props.tenant.name,
26
23
  } }));
27
24
  };
28
25
  //# sourceMappingURL=InvitePmEmailTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,oCAAoC,IAAI,CAAC,OAAO,qEAAqE;QAC9H,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,+CAA+C,IAAI,CAAC,OAAO,GAAG;QAChF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,EACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join your team on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n tenant={{\n logo: undefined,\n name: props.tenant.name,\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,8BAA8B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,qEAAqE;QAC5I,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,kCAAkC,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,GAAG;QACvF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,2BAA2B,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,OAAO,EAAE;KACvE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n teamName: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join ${args.teamName} on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join ${args.teamName} on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n eyebrow=\"Team invitation\"\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n />\n );\n};\n"]}
@@ -1,9 +1,47 @@
1
- import { type ActionEmailData, type ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
2
- export declare const getDefaultOwnerStatementEmailData: (mode: "tag" | "text", args: {
1
+ import type { ActionEmailData, ActionEmailTemplateProps } from '../components/ActionEmailTemplate';
2
+ export declare const getDefaultOwnerStatementEmailData: (mode: 'tag' | 'text', args: {
3
3
  appName: string;
4
4
  ownerStatementHref: string;
5
5
  listingName: string;
6
6
  userName: string;
7
7
  month: string;
8
8
  }) => ActionEmailData;
9
- export declare const OwnerStatementEmailTemplate: (props: ActionEmailTemplateProps) => import("react").JSX.Element;
9
+ /**
10
+ * Subject and text of the emails about an owner payment, which a team's saved
11
+ * statement template does not change: the receipt once Stripe has the money,
12
+ * and the failed-payment email.
13
+ */
14
+ export declare const getOwnerPaymentEmailData: (kind: 'received' | 'failed', args: {
15
+ appName: string;
16
+ ownerStatementHref: string;
17
+ listingName: string;
18
+ userName: string;
19
+ month: string;
20
+ }) => ActionEmailData;
21
+ export declare const OwnerStatementEmailTemplate: ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, payment, yearEnd, }: ActionEmailTemplateProps & {
22
+ /** Requests a new no-login link once the emailed one has expired. */
23
+ renewHref?: string;
24
+ /**
25
+ * A year-end statement: its eyebrow, the Fiscal year (`month`) and Listings
26
+ * rows, and the link opening only the year-end statement.
27
+ */
28
+ yearEnd?: {
29
+ listings?: string;
30
+ };
31
+ /**
32
+ * The owner payment block: what is due with the pay button, a reserve
33
+ * top-up due when the balance end is not negative, a payment received, or a
34
+ * payment that failed.
35
+ */
36
+ payment?: {
37
+ kind: 'due' | 'reserveTopUp' | 'received' | 'failed';
38
+ /** Formatted amount, such as `$1,284.50`. */
39
+ amount: string;
40
+ /** Short lines under the amount, such as `Please pay by Oct 16, 2026`. */
41
+ details: string[];
42
+ /** Opens the payment page. */
43
+ payHref?: string;
44
+ /** How the owner can pay on the payment page. */
45
+ methods?: ('ach' | 'card')[];
46
+ };
47
+ }) => import("react").JSX.Element;
@@ -1,22 +1,158 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Text } from '@react-email/text';
2
3
  import { EMAIL_ACTION_LINK_COMPONENT, EMAIL_DATE_COMPONENT, EMAIL_LISTING_COMPONENT, EMAIL_USER_NAME_COMPONENT, } from '../extensions';
3
- import { ActionEmailTemplate, } from '../components/ActionEmailTemplate';
4
+ import { Button } from '../components/Button';
5
+ import { EmailContainer } from '../components/EmailContainer';
6
+ import { EmailHeading } from '../components/EmailHeading';
7
+ import { parseEmailHtml } from '../components/utils';
4
8
  export const getDefaultOwnerStatementEmailData = (mode, args) => {
5
9
  const ownerStatementHref = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
6
10
  const listingName = mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;
7
11
  const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;
8
12
  const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;
13
+ // Owners open the statement by link without a login and viewers log in to
14
+ // the owner portal, so the text names neither. Subject and preview text are
15
+ // plain text without tokens, so a saved template must not keep the editor's
16
+ // sample month and listing.
9
17
  return {
10
- subject: 'Owner statement was published',
11
- shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,
12
- header: 'Owner statement was published',
13
- bodyOne: `<p>Hi ${userName},<p>Your ${month} owner statement for property ${listingName} is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,
14
- buttonText: 'View Owner statement',
15
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
18
+ subject: mode === 'tag'
19
+ ? 'Your owner statement is ready'
20
+ : `Your ${args.month} owner statement for ${args.listingName}`,
21
+ shortDescription: mode === 'tag'
22
+ ? 'Your owner statement is ready to view.'
23
+ : `Your ${args.month} statement for ${args.listingName} is ready to view.`,
24
+ header: 'Your owner statement is ready',
25
+ bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,
26
+ buttonText: 'View statement',
27
+ bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
16
28
  href: args.ownerStatementHref,
17
29
  };
18
30
  };
19
- export const OwnerStatementEmailTemplate = (props) => {
20
- return _jsx(ActionEmailTemplate, { ...props });
31
+ /**
32
+ * Subject and text of the emails about an owner payment, which a team's saved
33
+ * statement template does not change: the receipt once Stripe has the money,
34
+ * and the failed-payment email.
35
+ */
36
+ export const getOwnerPaymentEmailData = (kind, args) => ({
37
+ subject: kind === 'received'
38
+ ? `Payment received for your ${args.month} statement for ${args.listingName}`
39
+ : `Your payment for the ${args.month} statement for ${args.listingName} failed`,
40
+ shortDescription: kind === 'received'
41
+ ? `${args.appName} received your payment.`
42
+ : 'Your bank did not complete your payment.',
43
+ header: kind === 'received' ? 'Payment received' : 'Your payment failed',
44
+ bodyOne: kind === 'received'
45
+ ? `<p>Hi ${args.userName},</p><p>${args.appName} received your payment for your ${args.month} owner statement for ${args.listingName}. Thank you.</p>`
46
+ : `<p>Hi ${args.userName},</p><p>Your bank did not complete your payment for your ${args.month} owner statement for ${args.listingName}. Pay again with the button below.</p>`,
47
+ buttonText: 'View statement',
48
+ bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${args.ownerStatementHref}</p>`,
49
+ href: args.ownerStatementHref,
50
+ });
51
+ const mutedColor = '#737373';
52
+ const borderColor = '#e5e7eb';
53
+ const paymentColors = {
54
+ due: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },
55
+ reserveTopUp: { background: '#eff6ff', border: '#bfdbfe', text: '#1e40af' },
56
+ failed: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },
57
+ received: { background: '#f0fdf4', border: '#bbf7d0', text: '#166534' },
58
+ };
59
+ export const OwnerStatementEmailTemplate = ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, payment, yearEnd, }) => {
60
+ const parse = (html) => parseEmailHtml(html, {
61
+ href: data.href,
62
+ userName: user.firstName || '',
63
+ date: month || '',
64
+ listingName: listing || '',
65
+ });
66
+ return (_jsxs(EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [_jsx(EmailHeading, { eyebrow: yearEnd ? 'Year-end statement' : 'Owner statement', themeColors: themeColors, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && (_jsx(Text, { style: {
67
+ padding: '16px 20px',
68
+ backgroundColor: '#f8f9fa',
69
+ borderLeft: `3px solid ${themeColors[8]}`,
70
+ borderRadius: '4px',
71
+ margin: '0 0 32px',
72
+ whiteSpace: 'pre-line',
73
+ }, children: data.banner.trim() })), _jsx("div", {
74
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
75
+ dangerouslySetInnerHTML: { __html: parse(data.bodyOne) } }), (listing || month || yearEnd?.listings) && (_jsx("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, width: "100%", style: {
76
+ border: `1px solid ${borderColor}`,
77
+ borderRadius: '8px',
78
+ borderCollapse: 'separate',
79
+ margin: '24px 0 0',
80
+ }, children: _jsx("tbody", { children: (yearEnd
81
+ ? [
82
+ ['Fiscal year', month],
83
+ ['Listings', yearEnd.listings],
84
+ ]
85
+ : [
86
+ ['Property', listing],
87
+ ['Statement', month],
88
+ ]).map(([label, value], index) => value ? (_jsxs("tr", { children: [_jsx("td", { style: {
89
+ padding: '14px 20px',
90
+ color: mutedColor,
91
+ fontSize: 14,
92
+ borderTop: index ? `1px solid ${borderColor}` : 'none',
93
+ }, children: label }), _jsx("td", { style: {
94
+ padding: '14px 20px',
95
+ fontSize: 14,
96
+ fontWeight: 600,
97
+ textAlign: 'right',
98
+ borderTop: index ? `1px solid ${borderColor}` : 'none',
99
+ }, children: value })] }, label)) : null) }) })), payment && (_jsxs("div", { "data-testid": "owner-payment-block", style: {
100
+ padding: '24px 20px',
101
+ backgroundColor: paymentColors[payment.kind].background,
102
+ border: `1px solid ${paymentColors[payment.kind].border}`,
103
+ borderRadius: '8px',
104
+ margin: '24px 0 0',
105
+ textAlign: 'center',
106
+ }, children: [_jsx(Text, { style: {
107
+ color: paymentColors[payment.kind].text,
108
+ fontSize: 14,
109
+ fontWeight: 600,
110
+ margin: 0,
111
+ }, children: payment.kind === 'due'
112
+ ? 'Balance due'
113
+ : payment.kind === 'reserveTopUp'
114
+ ? 'Reserve top-up due'
115
+ : payment.kind === 'received'
116
+ ? 'Payment received'
117
+ : 'Payment failed' }), _jsx(Text, { style: {
118
+ color: paymentColors[payment.kind].text,
119
+ fontSize: 32,
120
+ fontWeight: 700,
121
+ lineHeight: '40px',
122
+ margin: '8px 0',
123
+ }, children: payment.amount }), payment.details.map((detail) => (_jsx(Text, { style: {
124
+ color: paymentColors[payment.kind].text,
125
+ fontSize: 14,
126
+ margin: '4px 0 0',
127
+ }, children: detail }, detail))), payment.payHref && (_jsxs(_Fragment, { children: [_jsx(Button, { href: payment.payHref, mode: mode, "data-testid": "pay-owner-balance-button", label: payment.kind === 'failed'
128
+ ? 'Pay again'
129
+ : payment.kind === 'reserveTopUp'
130
+ ? 'Pay balance'
131
+ : 'Pay Deficit Balance', themeColors: themeColors, style: { marginTop: '20px', marginBottom: '12px' } }), _jsx(Text, { style: { color: mutedColor, fontSize: 12, margin: 0 }, children: !payment.methods?.includes('card')
132
+ ? 'Bank transfer (ACH), secured by Stripe'
133
+ : payment.methods.includes('ach')
134
+ ? 'Bank transfer (ACH) or card, secured by Stripe'
135
+ : 'Card, secured by Stripe' })] }))] })), _jsx(Button, { href: data.href, mode: mode, "data-testid": "view-owner-statement-button", label: data.buttonText?.trim() || 'View statement', themeColors: themeColors, style: {
136
+ marginTop: '24px',
137
+ marginBottom: '32px',
138
+ ...(payment?.payHref && {
139
+ background: '#ffffff',
140
+ border: `1px solid ${themeColors[8]}`,
141
+ color: themeColors[8],
142
+ }),
143
+ } }), renewHref && (_jsxs("div", { style: {
144
+ padding: '20px',
145
+ backgroundColor: '#f8f9fa',
146
+ borderRadius: '8px',
147
+ marginBottom: '32px',
148
+ }, children: [_jsx(Text, { style: { fontWeight: 600, margin: '0 0 4px' }, children: "Link expired?" }), _jsxs(Text, { style: { color: mutedColor, fontSize: 14, margin: 0 }, children: ["For your security, this link opens only this", ' ', yearEnd ? 'year-end statement' : 'statement', " and works for 7 days. After that, request a new one and we'll email it to this address."] }), _jsx(Button, { href: renewHref, mode: mode, "data-testid": "renew-owner-statement-link-button", label: "Send me a new link", themeColors: themeColors, style: {
149
+ background: '#ffffff',
150
+ border: `1px solid ${themeColors[8]}`,
151
+ color: themeColors[8],
152
+ marginTop: '16px',
153
+ marginBottom: 0,
154
+ } })] })), _jsx("div", {
155
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
156
+ dangerouslySetInnerHTML: { __html: parse(data.bodyTwo) } })] }));
21
157
  };
22
158
  //# sourceMappingURL=OwnerStatementEmailTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2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AIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n return {\n subject: 'Owner statement was published',\n shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,\n header: 'Owner statement was published',\n bodyOne: `<p>Hi ${userName},<p>Your ${month} owner statement for property ${listingName} is ready for your review on ${args.appName}.</p><p>To access your statement, please click the button below:</p>`,\n buttonText: 'View Owner statement',\n bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\nexport const OwnerStatementEmailTemplate = (\n props: ActionEmailTemplateProps\n) => {\n return <ActionEmailTemplate {...props} />;\n};\n"]}
1
+ {"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,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KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;qBACtB,CAAC;iBACH,GACD,EAED,SAAS,IAAI,CACZ,eACE,KAAK,EAAE;oBACL,OAAO,EAAE,MAAM;oBACf,eAAe,EAAE,SAAS;oBAC1B,YAAY,EAAE,KAAK;oBACnB,YAAY,EAAE,MAAM;iBACrB,aAED,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,8BAE5C,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,6DACZ,GAAG,EAC/C,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,WAAW,gGAExC,EACP,KAAC,MAAM,IACL,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,IAAI,iBACE,mCAAmC,EAC/C,KAAK,EAAC,oBAAoB,EAC1B,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE;4BACL,UAAU,EAAE,SAAS;4BACrB,MAAM,EAAE,aAAa,WAAW,CAAC,CAAC,CAAC,EAAE;4BACrC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;4BACrB,SAAS,EAAE,MAAM;4BACjB,YAAY,EAAE,CAAC;yBAChB,GACD,IACE,CACP,EAED;gBACE,6FAA6F;gBAC7F,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GACxD,IACa,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport type {\n ActionEmailData,\n ActionEmailTemplateProps,\n} from '../components/ActionEmailTemplate';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { EmailHeading } from '../components/EmailHeading';\nimport { parseEmailHtml } from '../components/utils';\n\nexport const getDefaultOwnerStatementEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => {\n const ownerStatementHref =\n mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;\n\n const listingName =\n mode === 'tag' ? EMAIL_LISTING_COMPONENT : args.listingName;\n const month = mode === 'tag' ? EMAIL_DATE_COMPONENT : args.month;\n const userName = mode === 'tag' ? EMAIL_USER_NAME_COMPONENT : args.userName;\n\n // Owners open the statement by link without a login and viewers log in to\n // the owner portal, so the text names neither. Subject and preview text are\n // plain text without tokens, so a saved template must not keep the editor's\n // sample month and listing.\n return {\n subject:\n mode === 'tag'\n ? 'Your owner statement is ready'\n : `Your ${args.month} owner statement for ${args.listingName}`,\n shortDescription:\n mode === 'tag'\n ? 'Your owner statement is ready to view.'\n : `Your ${args.month} statement for ${args.listingName} is ready to view.`,\n header: 'Your owner statement is ready',\n bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,\n buttonText: 'View statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n };\n};\n\n/**\n * Subject and text of the emails about an owner payment, which a team's saved\n * statement template does not change: the receipt once Stripe has the money,\n * and the failed-payment email.\n */\nexport const getOwnerPaymentEmailData = (\n kind: 'received' | 'failed',\n args: {\n appName: string;\n ownerStatementHref: string;\n listingName: string;\n userName: string;\n month: string;\n }\n): ActionEmailData => ({\n subject:\n kind === 'received'\n ? `Payment received for your ${args.month} statement for ${args.listingName}`\n : `Your payment for the ${args.month} statement for ${args.listingName} failed`,\n shortDescription:\n kind === 'received'\n ? `${args.appName} received your payment.`\n : 'Your bank did not complete your payment.',\n header: kind === 'received' ? 'Payment received' : 'Your payment failed',\n bodyOne:\n kind === 'received'\n ? `<p>Hi ${args.userName},</p><p>${args.appName} received your payment for your ${args.month} owner statement for ${args.listingName}. Thank you.</p>`\n : `<p>Hi ${args.userName},</p><p>Your bank did not complete your payment for your ${args.month} owner statement for ${args.listingName}. Pay again with the button below.</p>`,\n buttonText: 'View statement',\n bodyTwo: `<p style=\"color:#737373;font-size:13px\">If the button doesn't work, copy this link into your browser: ${args.ownerStatementHref}</p>`,\n href: args.ownerStatementHref,\n});\n\nconst mutedColor = '#737373';\nconst borderColor = '#e5e7eb';\nconst paymentColors = {\n due: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },\n reserveTopUp: { background: '#eff6ff', border: '#bfdbfe', text: '#1e40af' },\n failed: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },\n received: { background: '#f0fdf4', border: '#bbf7d0', text: '#166534' },\n};\n\nexport const OwnerStatementEmailTemplate = ({\n data,\n tenant,\n themeColors,\n mode,\n user,\n listing,\n month,\n unsubscribeHref,\n renewHref,\n payment,\n yearEnd,\n}: ActionEmailTemplateProps & {\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\n /**\n * A year-end statement: its eyebrow, the Fiscal year (`month`) and Listings\n * rows, and the link opening only the year-end statement.\n */\n yearEnd?: { listings?: string };\n /**\n * The owner payment block: what is due with the pay button, a reserve\n * top-up due when the balance end is not negative, a payment received, or a\n * payment that failed.\n */\n payment?: {\n kind: 'due' | 'reserveTopUp' | 'received' | 'failed';\n /** Formatted amount, such as `$1,284.50`. */\n amount: string;\n /** Short lines under the amount, such as `Please pay by Oct 16, 2026`. */\n details: string[];\n /** Opens the payment page. */\n payHref?: string;\n /** How the owner can pay on the payment page. */\n methods?: ('ach' | 'card')[];\n };\n}) => {\n const parse = (html: string) =>\n parseEmailHtml(html, {\n href: data.href,\n userName: user.firstName || '',\n date: month || '',\n listingName: listing || '',\n });\n\n return (\n <EmailContainer\n title={data.subject}\n shortDescription={data.shortDescription}\n tenant={tenant}\n mode={mode}\n unsubscribeHref={unsubscribeHref}\n >\n <EmailHeading\n eyebrow={yearEnd ? 'Year-end statement' : 'Owner statement'}\n themeColors={themeColors}\n >\n {data.header?.trim() || 'Your owner statement is ready'}\n </EmailHeading>\n\n {data.banner?.trim() && (\n <Text\n style={{\n padding: '16px 20px',\n backgroundColor: '#f8f9fa',\n borderLeft: `3px solid ${themeColors[8]}`,\n borderRadius: '4px',\n margin: '0 0 32px',\n whiteSpace: 'pre-line',\n }}\n >\n {data.banner.trim()}\n </Text>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyOne) }}\n />\n\n {(listing || month || yearEnd?.listings) && (\n <table\n role=\"presentation\"\n cellPadding={0}\n cellSpacing={0}\n width=\"100%\"\n style={{\n border: `1px solid ${borderColor}`,\n borderRadius: '8px',\n borderCollapse: 'separate',\n margin: '24px 0 0',\n }}\n >\n <tbody>\n {(yearEnd\n ? [\n ['Fiscal year', month],\n ['Listings', yearEnd.listings],\n ]\n : [\n ['Property', listing],\n ['Statement', month],\n ]\n ).map(([label, value], index) =>\n value ? (\n <tr key={label}>\n <td\n style={{\n padding: '14px 20px',\n color: mutedColor,\n fontSize: 14,\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {label}\n </td>\n <td\n style={{\n padding: '14px 20px',\n fontSize: 14,\n fontWeight: 600,\n textAlign: 'right',\n borderTop: index ? `1px solid ${borderColor}` : 'none',\n }}\n >\n {value}\n </td>\n </tr>\n ) : null\n )}\n </tbody>\n </table>\n )}\n\n {payment && (\n <div\n data-testid=\"owner-payment-block\"\n style={{\n padding: '24px 20px',\n backgroundColor: paymentColors[payment.kind].background,\n border: `1px solid ${paymentColors[payment.kind].border}`,\n borderRadius: '8px',\n margin: '24px 0 0',\n textAlign: 'center',\n }}\n >\n <Text\n style={{\n color: paymentColors[payment.kind].text,\n fontSize: 14,\n fontWeight: 600,\n margin: 0,\n }}\n >\n {payment.kind === 'due'\n ? 'Balance due'\n : payment.kind === 'reserveTopUp'\n ? 'Reserve top-up due'\n : payment.kind === 'received'\n ? 'Payment received'\n : 'Payment failed'}\n </Text>\n <Text\n style={{\n color: paymentColors[payment.kind].text,\n fontSize: 32,\n fontWeight: 700,\n lineHeight: '40px',\n margin: '8px 0',\n }}\n >\n {payment.amount}\n </Text>\n {payment.details.map((detail) => (\n <Text\n key={detail}\n style={{\n color: paymentColors[payment.kind].text,\n fontSize: 14,\n margin: '4px 0 0',\n }}\n >\n {detail}\n </Text>\n ))}\n {payment.payHref && (\n <>\n <Button\n href={payment.payHref}\n mode={mode}\n data-testid=\"pay-owner-balance-button\"\n label={\n payment.kind === 'failed'\n ? 'Pay again'\n : payment.kind === 'reserveTopUp'\n ? 'Pay balance'\n : 'Pay Deficit Balance'\n }\n themeColors={themeColors}\n style={{ marginTop: '20px', marginBottom: '12px' }}\n />\n <Text style={{ color: mutedColor, fontSize: 12, margin: 0 }}>\n {!payment.methods?.includes('card')\n ? 'Bank transfer (ACH), secured by Stripe'\n : payment.methods.includes('ach')\n ? 'Bank transfer (ACH) or card, secured by Stripe'\n : 'Card, secured by Stripe'}\n </Text>\n </>\n )}\n </div>\n )}\n\n <Button\n href={data.href}\n mode={mode}\n data-testid=\"view-owner-statement-button\"\n label={data.buttonText?.trim() || 'View statement'}\n themeColors={themeColors}\n style={{\n marginTop: '24px',\n marginBottom: '32px',\n ...(payment?.payHref && {\n background: '#ffffff',\n border: `1px solid ${themeColors[8]}`,\n color: themeColors[8],\n }),\n }}\n />\n\n {renewHref && (\n <div\n style={{\n padding: '20px',\n backgroundColor: '#f8f9fa',\n borderRadius: '8px',\n marginBottom: '32px',\n }}\n >\n <Text style={{ fontWeight: 600, margin: '0 0 4px' }}>\n Link expired?\n </Text>\n <Text style={{ color: mutedColor, fontSize: 14, margin: 0 }}>\n For your security, this link opens only this{' '}\n {yearEnd ? 'year-end statement' : 'statement'} and works for 7 days.\n After that, request a new one and we'll email it to this address.\n </Text>\n <Button\n href={renewHref}\n mode={mode}\n data-testid=\"renew-owner-statement-link-button\"\n label=\"Send me a new link\"\n themeColors={themeColors}\n style={{\n background: '#ffffff',\n border: `1px solid ${themeColors[8]}`,\n color: themeColors[8],\n marginTop: '16px',\n marginBottom: 0,\n }}\n />\n </div>\n )}\n\n <div\n // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml\n dangerouslySetInnerHTML={{ __html: parse(data.bodyTwo) }}\n />\n </EmailContainer>\n );\n};\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 on the 1099s tab of 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,yGAGrD,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 on the 1099s tab of Statements in your\n 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,15 @@
1
+ import { type ActionEmailData, type ActionEmailTemplateProps } from '../components';
2
+ /** The owner portal page of the 1099s tab, which 1099 Ready and Corrected 1099 open. */
3
+ export declare const OWNER_PORTAL_1099S_PATH = "/statements/1099s";
4
+ type Tax1099EmailType = 'taxInfoRequest' | 'emailDeliveryRequest' | 'tax1099Ready' | 'tax1099Corrected';
5
+ export declare const getDefaultTax1099EmailData: (type: Tax1099EmailType, mode: 'tag' | 'text', args: {
6
+ teamName: string;
7
+ href: string;
8
+ userName: string;
9
+ taxYear: string;
10
+ }) => ActionEmailData;
11
+ export declare const Tax1099EmailTemplate: ({ type, taxYear, ...props }: Omit<ActionEmailTemplateProps, 'listing' | 'month'> & {
12
+ type: Tax1099EmailType;
13
+ taxYear: string;
14
+ }) => import("react").JSX.Element;
15
+ export {};