@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
@@ -1 +1 @@
1
- {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,wCAA2B;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;AArBW,QAAA,wCAAwC,4CAqBnD;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,uBAAC,gCAAmB,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;AAfW,QAAA,qBAAqB,yBAehC","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,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAIC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,wCAA2B;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;AAtBW,QAAA,wCAAwC,GAAxC,wCAAwC,CAsBnD;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,uBAAC,gCAAmB,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;AAZW,QAAA,qBAAqB,GAArB,qBAAqB,CAYhC","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,27 +1,164 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OwnerStatementEmailTemplate = exports.getDefaultOwnerStatementEmailData = void 0;
3
+ exports.OwnerStatementEmailTemplate = exports.getOwnerPaymentEmailData = exports.getDefaultOwnerStatementEmailData = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const text_1 = require("@react-email/text");
5
6
  const extensions_1 = require("../extensions");
6
- const ActionEmailTemplate_1 = require("../components/ActionEmailTemplate");
7
+ const Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const EmailHeading_1 = require("../components/EmailHeading");
10
+ const utils_1 = require("../components/utils");
7
11
  const getDefaultOwnerStatementEmailData = (mode, args) => {
8
12
  const ownerStatementHref = mode === 'tag' ? extensions_1.EMAIL_ACTION_LINK_COMPONENT : args.ownerStatementHref;
9
13
  const listingName = mode === 'tag' ? extensions_1.EMAIL_LISTING_COMPONENT : args.listingName;
10
14
  const month = mode === 'tag' ? extensions_1.EMAIL_DATE_COMPONENT : args.month;
11
15
  const userName = mode === 'tag' ? extensions_1.EMAIL_USER_NAME_COMPONENT : args.userName;
16
+ // Owners open the statement by link without a login and viewers log in to
17
+ // the owner portal, so the text names neither. Subject and preview text are
18
+ // plain text without tokens, so a saved template must not keep the editor's
19
+ // sample month and listing.
12
20
  return {
13
- subject: 'Owner statement was published',
14
- shortDescription: `An owner statement is ready for you. Log in to ${args.appName} now to view it.`,
15
- header: 'Owner statement was published',
16
- 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>`,
17
- buttonText: 'View Owner statement',
18
- bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${ownerStatementHref}</p>`,
21
+ subject: mode === 'tag'
22
+ ? 'Your owner statement is ready'
23
+ : `Your ${args.month} owner statement for ${args.listingName}`,
24
+ shortDescription: mode === 'tag'
25
+ ? 'Your owner statement is ready to view.'
26
+ : `Your ${args.month} statement for ${args.listingName} is ready to view.`,
27
+ header: 'Your owner statement is ready',
28
+ bodyOne: `<p>Hi ${userName},</p><p>${args.appName} published your ${month} owner statement for ${listingName}. Open it with the button below.</p>`,
29
+ buttonText: 'View statement',
30
+ bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${ownerStatementHref}</p>`,
19
31
  href: args.ownerStatementHref,
20
32
  };
21
33
  };
22
34
  exports.getDefaultOwnerStatementEmailData = getDefaultOwnerStatementEmailData;
23
- const OwnerStatementEmailTemplate = (props) => {
24
- return (0, jsx_runtime_1.jsx)(ActionEmailTemplate_1.ActionEmailTemplate, { ...props });
35
+ /**
36
+ * Subject and text of the emails about an owner payment, which a team's saved
37
+ * statement template does not change: the receipt once Stripe has the money,
38
+ * and the failed-payment email.
39
+ */
40
+ const getOwnerPaymentEmailData = (kind, args) => ({
41
+ subject: kind === 'received'
42
+ ? `Payment received for your ${args.month} statement for ${args.listingName}`
43
+ : `Your payment for the ${args.month} statement for ${args.listingName} failed`,
44
+ shortDescription: kind === 'received'
45
+ ? `${args.appName} received your payment.`
46
+ : 'Your bank did not complete your payment.',
47
+ header: kind === 'received' ? 'Payment received' : 'Your payment failed',
48
+ bodyOne: kind === 'received'
49
+ ? `<p>Hi ${args.userName},</p><p>${args.appName} received your payment for your ${args.month} owner statement for ${args.listingName}. Thank you.</p>`
50
+ : `<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>`,
51
+ buttonText: 'View statement',
52
+ bodyTwo: `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${args.ownerStatementHref}</p>`,
53
+ href: args.ownerStatementHref,
54
+ });
55
+ exports.getOwnerPaymentEmailData = getOwnerPaymentEmailData;
56
+ const mutedColor = '#737373';
57
+ const borderColor = '#e5e7eb';
58
+ const paymentColors = {
59
+ due: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },
60
+ reserveTopUp: { background: '#eff6ff', border: '#bfdbfe', text: '#1e40af' },
61
+ failed: { background: '#fef2f2', border: '#fecaca', text: '#991b1b' },
62
+ received: { background: '#f0fdf4', border: '#bbf7d0', text: '#166534' },
63
+ };
64
+ const OwnerStatementEmailTemplate = ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, payment, yearEnd, }) => {
65
+ const parse = (html) => (0, utils_1.parseEmailHtml)(html, {
66
+ href: data.href,
67
+ userName: user.firstName || '',
68
+ date: month || '',
69
+ listingName: listing || '',
70
+ });
71
+ return ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [(0, jsx_runtime_1.jsx)(EmailHeading_1.EmailHeading, { eyebrow: yearEnd ? 'Year-end statement' : 'Owner statement', themeColors: themeColors, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && ((0, jsx_runtime_1.jsx)(text_1.Text, { style: {
72
+ padding: '16px 20px',
73
+ backgroundColor: '#f8f9fa',
74
+ borderLeft: `3px solid ${themeColors[8]}`,
75
+ borderRadius: '4px',
76
+ margin: '0 0 32px',
77
+ whiteSpace: 'pre-line',
78
+ }, children: data.banner.trim() })), (0, jsx_runtime_1.jsx)("div", {
79
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
80
+ dangerouslySetInnerHTML: { __html: parse(data.bodyOne) } }), (listing || month || yearEnd?.listings) && ((0, jsx_runtime_1.jsx)("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, width: "100%", style: {
81
+ border: `1px solid ${borderColor}`,
82
+ borderRadius: '8px',
83
+ borderCollapse: 'separate',
84
+ margin: '24px 0 0',
85
+ }, children: (0, jsx_runtime_1.jsx)("tbody", { children: (yearEnd
86
+ ? [
87
+ ['Fiscal year', month],
88
+ ['Listings', yearEnd.listings],
89
+ ]
90
+ : [
91
+ ['Property', listing],
92
+ ['Statement', month],
93
+ ]).map(([label, value], index) => value ? ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { style: {
94
+ padding: '14px 20px',
95
+ color: mutedColor,
96
+ fontSize: 14,
97
+ borderTop: index ? `1px solid ${borderColor}` : 'none',
98
+ }, children: label }), (0, jsx_runtime_1.jsx)("td", { style: {
99
+ padding: '14px 20px',
100
+ fontSize: 14,
101
+ fontWeight: 600,
102
+ textAlign: 'right',
103
+ borderTop: index ? `1px solid ${borderColor}` : 'none',
104
+ }, children: value })] }, label)) : null) }) })), payment && ((0, jsx_runtime_1.jsxs)("div", { "data-testid": "owner-payment-block", style: {
105
+ padding: '24px 20px',
106
+ backgroundColor: paymentColors[payment.kind].background,
107
+ border: `1px solid ${paymentColors[payment.kind].border}`,
108
+ borderRadius: '8px',
109
+ margin: '24px 0 0',
110
+ textAlign: 'center',
111
+ }, children: [(0, jsx_runtime_1.jsx)(text_1.Text, { style: {
112
+ color: paymentColors[payment.kind].text,
113
+ fontSize: 14,
114
+ fontWeight: 600,
115
+ margin: 0,
116
+ }, children: payment.kind === 'due'
117
+ ? 'Balance due'
118
+ : payment.kind === 'reserveTopUp'
119
+ ? 'Reserve top-up due'
120
+ : payment.kind === 'received'
121
+ ? 'Payment received'
122
+ : 'Payment failed' }), (0, jsx_runtime_1.jsx)(text_1.Text, { style: {
123
+ color: paymentColors[payment.kind].text,
124
+ fontSize: 32,
125
+ fontWeight: 700,
126
+ lineHeight: '40px',
127
+ margin: '8px 0',
128
+ }, children: payment.amount }), payment.details.map((detail) => ((0, jsx_runtime_1.jsx)(text_1.Text, { style: {
129
+ color: paymentColors[payment.kind].text,
130
+ fontSize: 14,
131
+ margin: '4px 0 0',
132
+ }, children: detail }, detail))), payment.payHref && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { href: payment.payHref, mode: mode, "data-testid": "pay-owner-balance-button", label: payment.kind === 'failed'
133
+ ? 'Pay again'
134
+ : payment.kind === 'reserveTopUp'
135
+ ? 'Pay balance'
136
+ : 'Pay Deficit Balance', themeColors: themeColors, style: { marginTop: '20px', marginBottom: '12px' } }), (0, jsx_runtime_1.jsx)(text_1.Text, { style: { color: mutedColor, fontSize: 12, margin: 0 }, children: !payment.methods?.includes('card')
137
+ ? 'Bank transfer (ACH), secured by Stripe'
138
+ : payment.methods.includes('ach')
139
+ ? 'Bank transfer (ACH) or card, secured by Stripe'
140
+ : 'Card, secured by Stripe' })] }))] })), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: data.href, mode: mode, "data-testid": "view-owner-statement-button", label: data.buttonText?.trim() || 'View statement', themeColors: themeColors, style: {
141
+ marginTop: '24px',
142
+ marginBottom: '32px',
143
+ ...(payment?.payHref && {
144
+ background: '#ffffff',
145
+ border: `1px solid ${themeColors[8]}`,
146
+ color: themeColors[8],
147
+ }),
148
+ } }), renewHref && ((0, jsx_runtime_1.jsxs)("div", { style: {
149
+ padding: '20px',
150
+ backgroundColor: '#f8f9fa',
151
+ borderRadius: '8px',
152
+ marginBottom: '32px',
153
+ }, children: [(0, jsx_runtime_1.jsx)(text_1.Text, { style: { fontWeight: 600, margin: '0 0 4px' }, children: "Link expired?" }), (0, jsx_runtime_1.jsxs)(text_1.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."] }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: renewHref, mode: mode, "data-testid": "renew-owner-statement-link-button", label: "Send me a new link", themeColors: themeColors, style: {
154
+ background: '#ffffff',
155
+ border: `1px solid ${themeColors[8]}`,
156
+ color: themeColors[8],
157
+ marginTop: '16px',
158
+ marginBottom: 0,
159
+ } })] })), (0, jsx_runtime_1.jsx)("div", {
160
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
161
+ dangerouslySetInnerHTML: { __html: parse(data.bodyTwo) } })] }));
25
162
  };
26
163
  exports.OwnerStatementEmailTemplate = OwnerStatementEmailTemplate;
27
164
  //# sourceMappingURL=OwnerStatementEmailTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAKuB;AACvB,2EAI2C;AAEpC,MAAM,iCAAiC,GAAG,CAC/C,IAAoB,EACpB,IAMC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,WAAW,GACf,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oCAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,iCAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,sCAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,+BAA+B;QACxC,gBAAgB,EAAE,kDAAkD,IAAI,CAAC,OAAO,kBAAkB;QAClG,MAAM,EAAE,+BAA+B;QACvC,OAAO,EAAE,SAAS,QAAQ,YAAY,KAAK,iCAAiC,WAAW,gCAAgC,IAAI,CAAC,OAAO,sEAAsE;QACzM,UAAU,EAAE,sBAAsB;QAClC,OAAO,EAAE,wGAAwG,kBAAkB,MAAM;QACzI,IAAI,EAAE,IAAI,CAAC,kBAAkB;KAC9B,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,iCAAiC,qCA2B5C;AAEK,MAAM,2BAA2B,GAAG,CACzC,KAA+B,EAC/B,EAAE;IACF,OAAO,uBAAC,yCAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC;AAJW,QAAA,2BAA2B,+BAItC","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_LISTING_COMPONENT,\n EMAIL_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/OwnerSt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\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,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SecondFactorResetEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const EmailContainer_1 = require("../components/EmailContainer");
8
+ const SecondFactorResetEmailTemplate = ({ mode, tenant, audience, user, initiator, approvedBy, resetAt, }) => {
9
+ const by = initiator === 'support'
10
+ ? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`
11
+ : (approvedBy ?? 'a team admin');
12
+ return ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: audience === 'admin'
13
+ ? `Two-step verification reset for ${user}`
14
+ : 'Your two-step verification was reset', shortDescription: `Two-step verification was reset on ${tenant.name}.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: audience === 'admin'
15
+ ? `Two-step verification reset for ${user}`
16
+ : 'Your two-step verification was reset' }), audience === 'admin' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["The authenticator app and the backup codes of ", (0, jsx_runtime_1.jsx)("b", { children: user }), " were removed on ", resetAt, " by ", by, ". ", user, " is signed out everywhere and sets up two-step verification again at the next sign-in."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you did not expect this reset, contact VRPlatform support right away." })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["Your authenticator app and your backup codes for ", tenant.name, " were removed on ", resetAt, " by ", by, ". You are signed out everywhere."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "Sign in again and set up two-step verification. If you did not ask for this reset, contact VRPlatform support right away." })] }))] }));
17
+ };
18
+ exports.SecondFactorResetEmailTemplate = SecondFactorResetEmailTemplate;
19
+ //# sourceMappingURL=SecondFactorResetEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecondFactorResetEmailTemplate.js","sourceRoot":"src/","sources":["templates/SecondFactorResetEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iEAA8D;AAavD,MAAM,8BAA8B,GAAG,CAAC,EAC7C,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,UAAU,EACV,OAAO,GAC6B,EAAE,EAAE;IACxC,MAAM,EAAE,GACN,SAAS,KAAK,SAAS;QACrB,CAAC,CAAC,qBAAqB,UAAU,CAAC,CAAC,CAAC,iBAAiB,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;QACxE,CAAC,CAAC,CAAC,UAAU,IAAI,cAAc,CAAC,CAAC;IACrC,OAAO,CACL,wBAAC,+BAAc,IACb,KAAK,EACH,QAAQ,KAAK,OAAO;YAClB,CAAC,CAAC,mCAAmC,IAAI,EAAE;YAC3C,CAAC,CAAC,sCAAsC,EAE5C,gBAAgB,EAAE,sCAAsC,MAAM,CAAC,IAAI,GAAG,EACtE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,QAAQ,KAAK,OAAO;oBACnB,CAAC,CAAC,mCAAmC,IAAI,EAAE;oBAC3C,CAAC,CAAC,sCAAsC,GAClC,EACT,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CACtB,6DACE,wBAAC,WAAI,iEAC2C,wCAAI,IAAI,GAAK,uBAC/C,OAAO,UAAM,EAAE,QAAI,IAAI,8FAE9B,EACP,uBAAC,WAAI,2FAGE,IACN,CACJ,CAAC,CAAC,CAAC,CACF,6DACE,wBAAC,WAAI,oEAC+C,MAAM,CAAC,IAAI,uBACjD,OAAO,UAAM,EAAE,wCACtB,EACP,uBAAC,WAAI,4IAGE,IACN,CACJ,IACc,CAClB,CAAC;AACJ,CAAC,CAAC;AAvDW,QAAA,8BAA8B,GAA9B,8BAA8B,CAuDzC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components/EmailContainer';\nimport type { EmailBaseProps } from '../types';\n\nexport type SecondFactorResetEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n audience: 'admin' | 'user';\n user: string;\n initiator: 'support' | 'teamAdmin';\n approvedBy: string | null;\n resetAt: string;\n};\n\nexport const SecondFactorResetEmailTemplate = ({\n mode,\n tenant,\n audience,\n user,\n initiator,\n approvedBy,\n resetAt,\n}: SecondFactorResetEmailTemplateProps) => {\n const by =\n initiator === 'support'\n ? `VRPlatform support${approvedBy ? `, approved by ${approvedBy}` : ''}`\n : (approvedBy ?? 'a team admin');\n return (\n <EmailContainer\n title={\n audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'\n }\n shortDescription={`Two-step verification was reset on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {audience === 'admin'\n ? `Two-step verification reset for ${user}`\n : 'Your two-step verification was reset'}\n </Heading>\n {audience === 'admin' ? (\n <>\n <Text>\n The authenticator app and the backup codes of <b>{user}</b> were\n removed on {resetAt} by {by}. {user} is signed out everywhere and\n sets up two-step verification again at the next sign-in.\n </Text>\n <Text>\n If you did not expect this reset, contact VRPlatform support right\n away.\n </Text>\n </>\n ) : (\n <>\n <Text>\n Your authenticator app and your backup codes for {tenant.name} were\n removed on {resetAt} by {by}. You are signed out everywhere.\n </Text>\n <Text>\n Sign in again and set up two-step verification. If you did not ask\n for this reset, contact VRPlatform support right away.\n </Text>\n </>\n )}\n </EmailContainer>\n );\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export declare const Tax1099ConsentWithdrawnEmailTemplate: ({ mode, user, tenant, withdrawnAt, address, }: {
3
+ mode: EmailBaseProps['mode'];
4
+ user: EmailBaseProps['user'];
5
+ tenant: EmailBaseProps['tenant'];
6
+ /** When the owner withdrew; the withdrawal takes effect that day. */
7
+ withdrawnAt: string;
8
+ address: string | null;
9
+ }) => import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tax1099ConsentWithdrawnEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const components_1 = require("../components");
8
+ // PRO-20639: the written confirmation the IRS requires when an owner
9
+ // withdraws consent to get 1099s by email. Fixed text; teams can't edit it.
10
+ const Tax1099ConsentWithdrawnEmailTemplate = ({ mode, user, tenant, withdrawnAt, address, }) => {
11
+ // The team stores no time zone. Pacific time keeps an evening withdrawal
12
+ // anywhere in the mainland US on the day the owner made it.
13
+ const effectiveOn = new Intl.DateTimeFormat('en-US', {
14
+ timeZone: 'America/Los_Angeles',
15
+ month: 'long',
16
+ day: 'numeric',
17
+ year: 'numeric',
18
+ }).format(new Date(withdrawnAt));
19
+ return ((0, jsx_runtime_1.jsxs)(components_1.EmailContainer, { title: "You withdrew your consent to get 1099s by email", shortDescription: `From ${effectiveOn}, ${tenant.name} mails your 1099s.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: user.firstName ? `Hi ${user.firstName},` : 'Hi there,' }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["You withdrew your consent to get your 1099s from ", (0, jsx_runtime_1.jsx)("b", { children: tenant.name }), " by email only. The withdrawal takes effect on ", (0, jsx_runtime_1.jsx)("b", { children: effectiveOn }), "."] }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["From that date, ", tenant.name, " mails your 1099s to", ' ', address || 'the address on Tax info in your owner portal', ", with a copy by email. Each 1099 also stays on the 1099s tab of Statements in your owner portal."] }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["To get your 1099s by email only again, give your consent on Tax info in your owner portal. If you did not make this change, contact", ' ', tenant.name, " right away."] })] }));
20
+ };
21
+ exports.Tax1099ConsentWithdrawnEmailTemplate = Tax1099ConsentWithdrawnEmailTemplate;
22
+ //# sourceMappingURL=Tax1099ConsentWithdrawnEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099ConsentWithdrawnEmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099ConsentWithdrawnEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,8CAA+C;AAG/C,qEAAqE;AACrE,4EAA4E;AACrE,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,EACX,OAAO,GAQR,EAAE,EAAE;IACH,yEAAyE;IACzE,4DAA4D;IAC5D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACnD,QAAQ,EAAE,qBAAqB;QAC/B,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACjC,OAAO,CACL,wBAAC,2BAAc,IACb,KAAK,EAAC,iDAAiD,EACvD,gBAAgB,EAAE,QAAQ,WAAW,KAAK,MAAM,CAAC,IAAI,oBAAoB,EACzE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,YACpE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAC/C,EACV,wBAAC,WAAI,oEAC8C,wCAAI,MAAM,CAAC,IAAI,GAAK,qDAC1B,wCAAI,WAAW,GAAK,SAC1D,EACP,wBAAC,WAAI,mCACc,MAAM,CAAC,IAAI,0BAAsB,GAAG,EACpD,OAAO,IAAI,8CAA8C,yGAGrD,EACP,wBAAC,WAAI,sJAEyD,GAAG,EAC9D,MAAM,CAAC,IAAI,oBACP,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,oCAAoC,GAApC,oCAAoC,CAiD/C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { EmailContainer } from '../components';\nimport type { EmailBaseProps } from '../types';\n\n// PRO-20639: the written confirmation the IRS requires when an owner\n// withdraws consent to get 1099s by email. Fixed text; teams can't edit it.\nexport const Tax1099ConsentWithdrawnEmailTemplate = ({\n mode,\n user,\n tenant,\n withdrawnAt,\n address,\n}: {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: EmailBaseProps['tenant'];\n /** When the owner withdrew; the withdrawal takes effect that day. */\n withdrawnAt: string;\n address: string | null;\n}) => {\n // The team stores no time zone. Pacific time keeps an evening withdrawal\n // anywhere in the mainland US on the day the owner made it.\n const effectiveOn = new Intl.DateTimeFormat('en-US', {\n timeZone: 'America/Los_Angeles',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n }).format(new Date(withdrawnAt));\n return (\n <EmailContainer\n title=\"You withdrew your consent to get 1099s by email\"\n shortDescription={`From ${effectiveOn}, ${tenant.name} mails your 1099s.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n {user.firstName ? `Hi ${user.firstName},` : 'Hi there,'}\n </Heading>\n <Text>\n You withdrew your consent to get your 1099s from <b>{tenant.name}</b> by\n email only. The withdrawal takes effect on <b>{effectiveOn}</b>.\n </Text>\n <Text>\n From that date, {tenant.name} mails your 1099s to{' '}\n {address || 'the address on Tax info in your owner portal'}, with a copy\n by email. Each 1099 also stays 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 {};
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tax1099EmailTemplate = exports.getDefaultTax1099EmailData = exports.OWNER_PORTAL_1099S_PATH = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const extensions_1 = require("../extensions");
6
+ const components_1 = require("../components");
7
+ /** The owner portal page of the 1099s tab, which 1099 Ready and Corrected 1099 open. */
8
+ exports.OWNER_PORTAL_1099S_PATH = '/statements/1099s';
9
+ // PRO-20621: the 1099 owner emails teams edit in Settings > Emails. The date
10
+ // token renders the tax year. 1099s live on the owner portal's 1099s tab of
11
+ // Statements (PRO-20629), not in Tax Statements (PRO-21278). Subject and preview text are plain text without
12
+ // tokens, so they name no year.
13
+ const getDefaultTax1099EmailData = (type, mode, args) => {
14
+ const href = mode === 'tag' ? extensions_1.EMAIL_ACTION_LINK_COMPONENT : args.href;
15
+ const userName = mode === 'tag' ? extensions_1.EMAIL_USER_NAME_COMPONENT : args.userName;
16
+ const taxYear = mode === 'tag' ? extensions_1.EMAIL_DATE_COMPONENT : args.taxYear;
17
+ const team = args.teamName;
18
+ const linkLine = `<p style="color:#737373;font-size:13px">If the button doesn't work, copy this link into your browser: ${href}</p>`;
19
+ if (type === 'taxInfoRequest')
20
+ return {
21
+ subject: `${team} needs your tax info`,
22
+ shortDescription: `Add your tax ID in your owner portal so ${team} can send your 1099.`,
23
+ header: 'Complete your tax info',
24
+ 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>`,
25
+ buttonText: 'Complete tax info',
26
+ bodyTwo: `<p>Never send your tax ID by email. If you did not expect this request, contact ${team} before you enter it.</p>${linkLine}`,
27
+ href: args.href,
28
+ };
29
+ if (type === 'emailDeliveryRequest')
30
+ return {
31
+ subject: `Get your 1099s from ${team} by email`,
32
+ shortDescription: 'Confirm in your owner portal that you want your 1099s by email only.',
33
+ header: 'Get your 1099s by email',
34
+ 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 on the 1099s tab of Statements in your owner portal.</p><p>Nothing changes until you confirm on Tax info.</p>`,
35
+ buttonText: 'Choose 1099 delivery',
36
+ bodyTwo: linkLine,
37
+ href: args.href,
38
+ };
39
+ if (type === 'tax1099Ready')
40
+ return {
41
+ subject: `Your 1099 from ${team} is ready`,
42
+ shortDescription: 'Open it on the 1099s tab of Statements in your owner portal.',
43
+ header: 'Your 1099 is ready',
44
+ bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is on the 1099s tab of Statements in your owner portal. You can download and print it there.</p>`,
45
+ buttonText: 'Open 1099s',
46
+ bodyTwo: `<p>If you get your 1099 by mail too, the paper copy is on its way.</p>${linkLine}`,
47
+ href: args.href,
48
+ };
49
+ return {
50
+ subject: `Your corrected 1099 from ${team}`,
51
+ shortDescription: 'Open it on the 1099s tab of Statements in your owner portal.',
52
+ header: 'Your 1099 was corrected',
53
+ bodyOne: `<p>Hi ${userName},</p><p>${team} filed a corrected ${taxYear} 1099 for you. It replaces the earlier one and is on the 1099s tab of Statements in your owner portal.</p>`,
54
+ buttonText: 'Open 1099s',
55
+ bodyTwo: `<p>If you get your 1099 by mail too, the corrected paper copy is on its way.</p>${linkLine}`,
56
+ href: args.href,
57
+ };
58
+ };
59
+ exports.getDefaultTax1099EmailData = getDefaultTax1099EmailData;
60
+ const Tax1099EmailTemplate = ({ type, taxYear, ...props }) => ((0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props, listing: undefined, month: taxYear, eyebrow: type === 'taxInfoRequest' || type === 'emailDeliveryRequest'
61
+ ? 'Tax info'
62
+ : '1099s' }));
63
+ exports.Tax1099EmailTemplate = Tax1099EmailTemplate;
64
+ //# sourceMappingURL=Tax1099EmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tax1099EmailTemplate.js","sourceRoot":"src/","sources":["templates/Tax1099EmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAIuB;AACvB,8CAIuB;AAEvB,wFAAwF;AAC3E,QAAA,uBAAuB,GAAG,mBAAmB,CAAC;AAQ3D,6EAA6E;AAC7E,4EAA4E;AAC5E,6GAA6G;AAC7G,gCAAgC;AACzB,MAAM,0BAA0B,GAAG,CACxC,IAAsB,EACtB,IAAoB,EACpB,IAKC,EACgB,EAAE;IACnB,MAAM,IAAI,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IACtE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,sCAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,iCAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACrE,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC3B,MAAM,QAAQ,GAAG,yGAAyG,IAAI,MAAM,CAAC;IAErI,IAAI,IAAI,KAAK,gBAA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DW,QAAA,0BAA0B,GAA1B,0BAA0B,CA6DrC;AAEK,MAAM,oBAAoB,GAAG,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EAIT,EAAE,EAAE,CAAC,CACJ,uBAAC,gCAAmB,OACd,KAAK,EACT,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,OAAO,EACd,OAAO,EACL,IAAI,KAAK,gBAAgB,IAAI,IAAI,KAAK,sBAAsB;QAC1D,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,OAAO,GAEb,CACH,CAAC;AAlBW,QAAA,oBAAoB,GAApB,oBAAoB,CAkB/B","sourcesContent":["import {\n EMAIL_ACTION_LINK_COMPONENT,\n EMAIL_DATE_COMPONENT,\n EMAIL_USER_NAME_COMPONENT,\n} from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\n/** The owner portal page of the 1099s tab, which 1099 Ready and Corrected 1099 open. */\nexport const OWNER_PORTAL_1099S_PATH = '/statements/1099s';\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. 1099s live on the owner portal's 1099s tab of\n// Statements (PRO-20629), not in Tax Statements (PRO-21278). 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 on the 1099s tab of 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:\n 'Open it on the 1099s tab of Statements in your owner portal.',\n header: 'Your 1099 is ready',\n bodyOne: `<p>Hi ${userName},</p><p>Your ${taxYear} 1099 from ${team} is on the 1099s tab of Statements in your owner portal. You can download and print it there.</p>`,\n buttonText: 'Open 1099s',\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:\n 'Open it on the 1099s tab of 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 on the 1099s tab of Statements in your owner portal.</p>`,\n buttonText: 'Open 1099s',\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 : '1099s'\n }\n />\n);\n"]}
@@ -0,0 +1,10 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamApiTokenCreatedEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ hint: string;
6
+ createdAt: string;
7
+ createdBy: string | null;
8
+ href: string;
9
+ };
10
+ export declare const TeamApiTokenCreatedEmailTemplate: ({ mode, tenant, hint, createdAt, createdBy, href, }: TeamApiTokenCreatedEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamApiTokenCreatedEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const theme_1 = require("../theme");
10
+ const TeamApiTokenCreatedEmailTemplate = ({ mode, tenant, hint, createdAt, createdBy, href, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `New API key on ${tenant.name}`, shortDescription: `An API key ending in ${hint} was created on ${tenant.name}.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "New API key on your team" }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: ["An API key ending in ", (0, jsx_runtime_1.jsx)("b", { children: hint }), " was created on ", tenant.name, " on", ' ', createdAt, createdBy ? ` by ${createdBy}` : '', ". Anyone holding it can read and change your team's data."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you did not expect this key, revoke it and review the team members." }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Review API keys", themeColors: theme_1.THEME_COLORS.vrplatform })] }));
11
+ exports.TeamApiTokenCreatedEmailTemplate = TeamApiTokenCreatedEmailTemplate;
12
+ //# sourceMappingURL=TeamApiTokenCreatedEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamApiTokenCreatedEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamApiTokenCreatedEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iDAA8C;AAC9C,iEAA8D;AAC9D,oCAAwC;AAYjC,MAAM,gCAAgC,GAAG,CAAC,EAC/C,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,SAAS,EACT,SAAS,EACT,IAAI,GACkC,EAAE,EAAE,CAAC,CAC3C,wBAAC,+BAAc,IACb,KAAK,EAAE,kBAAkB,MAAM,CAAC,IAAI,EAAE,EACtC,gBAAgB,EAAE,wBAAwB,IAAI,mBAAmB,MAAM,CAAC,IAAI,GAAG,EAC/E,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,yCAE7D,EACV,wBAAC,WAAI,wCACkB,wCAAI,IAAI,GAAK,sBAAiB,MAAM,CAAC,IAAI,SAAK,GAAG,EACrE,SAAS,EACT,SAAS,CAAC,CAAC,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,iEAE/B,EACP,uBAAC,WAAI,yFAEE,EACP,uBAAC,eAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,iBAAiB,EACvB,WAAW,EAAE,oBAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC;AAjCW,QAAA,gCAAgC,GAAhC,gCAAgC,CAiC3C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamApiTokenCreatedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n hint: string;\n createdAt: string;\n createdBy: string | null;\n href: string;\n};\n\nexport const TeamApiTokenCreatedEmailTemplate = ({\n mode,\n tenant,\n hint,\n createdAt,\n createdBy,\n href,\n}: TeamApiTokenCreatedEmailTemplateProps) => (\n <EmailContainer\n title={`New API key on ${tenant.name}`}\n shortDescription={`An API key ending in ${hint} was created on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n New API key on your team\n </Heading>\n <Text>\n An API key ending in <b>{hint}</b> was created on {tenant.name} on{' '}\n {createdAt}\n {createdBy ? ` by ${createdBy}` : ''}. Anyone holding it can read and\n change your team's data.\n </Text>\n <Text>\n If you did not expect this key, revoke it and review the team members.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review API keys\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -0,0 +1,11 @@
1
+ import type { EmailBaseProps } from '../types';
2
+ export type TeamInviteOutsideDomainEmailTemplateProps = {
3
+ mode: EmailBaseProps['mode'];
4
+ tenant: EmailBaseProps['tenant'];
5
+ invitedEmail: string;
6
+ invitedBy: string | null;
7
+ invitedAt: string;
8
+ roles: string;
9
+ href: string;
10
+ };
11
+ export declare const TeamInviteOutsideDomainEmailTemplate: ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }: TeamInviteOutsideDomainEmailTemplateProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamInviteOutsideDomainEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const theme_1 = require("../theme");
10
+ const TeamInviteOutsideDomainEmailTemplate = ({ mode, tenant, invitedEmail, invitedBy, invitedAt, roles, href, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `${invitedEmail} was invited to ${tenant.name}`, shortDescription: `${invitedEmail} was invited to ${tenant.name} with an outside email address.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsx)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: "A new member was invited" }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: [invitedBy ?? 'An API key', " invited ", (0, jsx_runtime_1.jsx)("b", { children: invitedEmail }), " to ", tenant.name, ' ', "as ", (0, jsx_runtime_1.jsx)("b", { children: roles }), " on ", invitedAt, ". The address is outside the email domains of your team and your accounting partner, or it is a free-mail address."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you do not know this person, remove the member and check who invited them." }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Review team members", themeColors: theme_1.THEME_COLORS.vrplatform })] }));
11
+ exports.TeamInviteOutsideDomainEmailTemplate = TeamInviteOutsideDomainEmailTemplate;
12
+ //# sourceMappingURL=TeamInviteOutsideDomainEmailTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamInviteOutsideDomainEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamInviteOutsideDomainEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,kDAA+C;AAC/C,4CAAyC;AACzC,iDAA8C;AAC9C,iEAA8D;AAC9D,oCAAwC;AAajC,MAAM,oCAAoC,GAAG,CAAC,EACnD,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,GACsC,EAAE,EAAE,CAAC,CAC/C,wBAAC,+BAAc,IACb,KAAK,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,EAAE,EACtD,gBAAgB,EAAE,GAAG,YAAY,mBAAmB,MAAM,CAAC,IAAI,iCAAiC,EAChG,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,uBAAC,iBAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,yCAE7D,EACV,wBAAC,WAAI,eACF,SAAS,IAAI,YAAY,eAAU,wCAAI,YAAY,GAAK,UAAK,MAAM,CAAC,IAAI,EAAE,GAAG,SAC3E,wCAAI,KAAK,GAAK,UAAK,SAAS,0HAE1B,EACP,uBAAC,WAAI,gGAGE,EACP,uBAAC,eAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,qBAAqB,EAC3B,WAAW,EAAE,oBAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC;AAlCW,QAAA,oCAAoC,GAApC,oCAAoC,CAkC/C","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamInviteOutsideDomainEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n invitedEmail: string;\n invitedBy: string | null;\n invitedAt: string;\n roles: string;\n href: string;\n};\n\nexport const TeamInviteOutsideDomainEmailTemplate = ({\n mode,\n tenant,\n invitedEmail,\n invitedBy,\n invitedAt,\n roles,\n href,\n}: TeamInviteOutsideDomainEmailTemplateProps) => (\n <EmailContainer\n title={`${invitedEmail} was invited to ${tenant.name}`}\n shortDescription={`${invitedEmail} was invited to ${tenant.name} with an outside email address.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n A new member was invited\n </Heading>\n <Text>\n {invitedBy ?? 'An API key'} invited <b>{invitedEmail}</b> to {tenant.name}{' '}\n as <b>{roles}</b> on {invitedAt}. The address is outside the email domains\n of your team and your accounting partner, or it is a free-mail address.\n </Text>\n <Text>\n If you do not know this person, remove the member and check who invited\n them.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review team members\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
@@ -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,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamRoleGrantedEmailTemplate = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const heading_1 = require("@react-email/heading");
6
+ const text_1 = require("@react-email/text");
7
+ const Button_1 = require("../components/Button");
8
+ const EmailContainer_1 = require("../components/EmailContainer");
9
+ const theme_1 = require("../theme");
10
+ const TeamRoleGrantedEmailTemplate = ({ mode, tenant, member, roles, grantedAt, grantedBy, partnerName, href, }) => ((0, jsx_runtime_1.jsxs)(EmailContainer_1.EmailContainer, { title: `${member} received ${roles}`, shortDescription: `${member} received ${roles} on ${tenant.name}.`, tenant: tenant, mode: mode, children: [(0, jsx_runtime_1.jsxs)(heading_1.Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: ["New ", roles, " on your team"] }), (0, jsx_runtime_1.jsxs)(text_1.Text, { children: [(0, jsx_runtime_1.jsx)("b", { children: member }), " received ", (0, jsx_runtime_1.jsx)("b", { children: roles }), " on ", tenant.name, " on ", grantedAt, grantedBy ? ` from ${grantedBy}` : '', partnerName ? `, acting through your partner ${partnerName}` : '', "."] }), (0, jsx_runtime_1.jsx)(text_1.Text, { children: "If you did not expect this change, review the team members and remove the role." }), (0, jsx_runtime_1.jsx)(Button_1.Button, { href: href, mode: mode, label: "Review team members", themeColors: theme_1.THEME_COLORS.vrplatform })] }));
11
+ exports.TeamRoleGrantedEmailTemplate = TeamRoleGrantedEmailTemplate;
12
+ //# sourceMappingURL=TeamRoleGrantedEmailTemplate.js.map