@vrplatform/email 1.0.2-434 → 1.0.2-43579466270
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main/components/ActionEmailTemplate.d.ts +3 -1
- package/build/main/components/ActionEmailTemplate.js +9 -13
- package/build/main/components/ActionEmailTemplate.js.map +1 -1
- package/build/main/components/Button.js.map +1 -1
- package/build/main/components/EmailContainer.d.ts +4 -1
- package/build/main/components/EmailContainer.js +4 -3
- package/build/main/components/EmailContainer.js.map +1 -1
- package/build/main/components/EmailHeading.d.ts +8 -0
- package/build/main/components/EmailHeading.js +21 -0
- package/build/main/components/EmailHeading.js.map +1 -0
- package/build/main/components/index.d.ts +1 -0
- package/build/main/components/index.js +1 -0
- package/build/main/components/index.js.map +1 -1
- package/build/main/components/utils/parse-email-html.js +13 -4
- package/build/main/components/utils/parse-email-html.js.map +1 -1
- package/build/main/const.d.ts +4 -4
- package/build/main/index.d.ts +1 -1
- package/build/main/index.js +2 -3
- package/build/main/index.js.map +1 -1
- package/build/main/render.d.ts +2 -0
- package/build/main/render.js +24 -0
- package/build/main/render.js.map +1 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js +12 -0
- package/build/main/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js +15 -0
- package/build/main/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/main/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/main/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/main/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/main/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/main/templates/InvitePmEmailTemplate.js +4 -7
- package/build/main/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/main/templates/OwnerStatementEmailTemplate.d.ts +6 -3
- package/build/main/templates/OwnerStatementEmailTemplate.js +70 -9
- package/build/main/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/main/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js +12 -0
- package/build/main/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/main/templates/TenantDeletionEmailTemplate.js +2 -6
- package/build/main/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/main/templates/TenantSuspensionEmailTemplate.js +2 -6
- package/build/main/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/main/templates/index.d.ts +4 -0
- package/build/main/templates/index.js +5 -0
- package/build/main/templates/index.js.map +1 -1
- package/build/main/theme.js.map +1 -1
- package/build/main/types.d.ts +3 -0
- package/build/main/types.js.map +1 -1
- package/build/main/utils/find-postmark-email.d.ts +8 -0
- package/build/main/utils/find-postmark-email.js +88 -0
- package/build/main/utils/find-postmark-email.js.map +1 -0
- package/build/main/utils/index.d.ts +1 -0
- package/build/main/utils/index.js +1 -0
- package/build/main/utils/index.js.map +1 -1
- package/build/main/utils/send-email.d.ts +28 -3
- package/build/main/utils/send-email.js +142 -22
- package/build/main/utils/send-email.js.map +1 -1
- package/build/module/components/ActionEmailTemplate.d.ts +3 -1
- package/build/module/components/ActionEmailTemplate.js +9 -13
- package/build/module/components/ActionEmailTemplate.js.map +1 -1
- package/build/module/components/EmailContainer.d.ts +4 -1
- package/build/module/components/EmailContainer.js +5 -4
- package/build/module/components/EmailContainer.js.map +1 -1
- package/build/module/components/EmailHeading.d.ts +8 -0
- package/build/module/components/EmailHeading.js +17 -0
- package/build/module/components/EmailHeading.js.map +1 -0
- package/build/module/components/index.d.ts +1 -0
- package/build/module/components/index.js +1 -0
- package/build/module/components/index.js.map +1 -1
- package/build/module/components/utils/parse-email-html.js +13 -4
- package/build/module/components/utils/parse-email-html.js.map +1 -1
- package/build/module/const.d.ts +4 -4
- package/build/module/index.d.ts +1 -1
- package/build/module/index.js +1 -1
- package/build/module/index.js.map +1 -1
- package/build/module/render.d.ts +2 -0
- package/build/module/render.js +20 -0
- package/build/module/render.js.map +1 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.d.ts +12 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedEmailTemplate.js.map +1 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js +8 -0
- package/build/module/templates/BankAccountChangedTeamAdminEmailTemplate.js.map +1 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.d.ts +17 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js +11 -0
- package/build/module/templates/BankDetailsRequestEmailTemplate.js.map +1 -0
- package/build/module/templates/InviteOwnerEmailTemplate.d.ts +2 -2
- package/build/module/templates/InviteOwnerEmailTemplate.js +1 -1
- package/build/module/templates/InviteOwnerEmailTemplate.js.map +1 -1
- package/build/module/templates/InvitePmEmailTemplate.d.ts +2 -1
- package/build/module/templates/InvitePmEmailTemplate.js +4 -7
- package/build/module/templates/InvitePmEmailTemplate.js.map +1 -1
- package/build/module/templates/OwnerStatementEmailTemplate.d.ts +6 -3
- package/build/module/templates/OwnerStatementEmailTemplate.js +71 -10
- package/build/module/templates/OwnerStatementEmailTemplate.js.map +1 -1
- package/build/module/templates/TeamRoleGrantedEmailTemplate.d.ts +12 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js +8 -0
- package/build/module/templates/TeamRoleGrantedEmailTemplate.js.map +1 -0
- package/build/module/templates/TenantDeletionEmailTemplate.js +3 -7
- package/build/module/templates/TenantDeletionEmailTemplate.js.map +1 -1
- package/build/module/templates/TenantSuspensionEmailTemplate.js +3 -7
- package/build/module/templates/TenantSuspensionEmailTemplate.js.map +1 -1
- package/build/module/templates/index.d.ts +4 -0
- package/build/module/templates/index.js +5 -0
- package/build/module/templates/index.js.map +1 -1
- package/build/module/types.d.ts +3 -0
- package/build/module/types.js.map +1 -1
- package/build/module/utils/find-postmark-email.d.ts +8 -0
- package/build/module/utils/find-postmark-email.js +52 -0
- package/build/module/utils/find-postmark-email.js.map +1 -0
- package/build/module/utils/index.d.ts +1 -0
- package/build/module/utils/index.js +1 -0
- package/build/module/utils/index.js.map +1 -1
- package/build/module/utils/send-email.d.ts +28 -3
- package/build/module/utils/send-email.js +108 -22
- package/build/module/utils/send-email.js.map +1 -1
- package/package.json +8 -7
- package/src/components/ActionEmailTemplate.tsx +14 -16
- package/src/components/EmailContainer.tsx +20 -4
- package/src/components/EmailHeading.tsx +36 -0
- package/src/components/index.ts +1 -0
- package/src/components/utils/parse-email-html.ts +20 -6
- package/src/index.ts +1 -1
- package/src/render.ts +24 -0
- package/src/templates/BankAccountChangedEmailTemplate.tsx +53 -0
- package/src/templates/BankAccountChangedTeamAdminEmailTemplate.tsx +55 -0
- package/src/templates/BankDetailsRequestEmailTemplate.tsx +63 -0
- package/src/templates/InviteOwnerEmailTemplate.tsx +1 -0
- package/src/templates/InvitePmEmailTemplate.tsx +5 -7
- package/src/templates/OwnerStatementEmailTemplate.tsx +178 -14
- package/src/templates/TeamRoleGrantedEmailTemplate.tsx +54 -0
- package/src/templates/TenantDeletionEmailTemplate.tsx +9 -10
- package/src/templates/TenantSuspensionEmailTemplate.tsx +9 -10
- package/src/templates/index.ts +6 -0
- package/src/types.ts +3 -0
- package/src/utils/find-postmark-email.ts +80 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/send-email.ts +184 -28
|
@@ -0,0 +1,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,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAiBxC,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,EACvD,IAAI,EACJ,MAAM,EACN,OAAO,EACP,WAAW,EACX,IAAI,GAC0C,EAAE,EAAE,CAAC,CACnD,MAAC,cAAc,IACb,KAAK,EAAE,gBAAgB,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,QAAQ,OAAO,CAAC,IAAI,EAAE,EACpF,gBAAgB,EAAE,sBAAsB,OAAO,CAAC,IAAI,gCAAgC,WAAW,CAAC,KAAK,GAAG,EACxG,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,MAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,8BACvD,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAC7C,EACV,MAAC,IAAI,uCACkB,OAAO,CAAC,IAAI,OAAE,sBAAI,OAAO,CAAC,IAAI,GAAK,UAAK,GAAG,EAC/D,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,UAAM,WAAW,CAAC,SAAS,EAClE,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,oDACvB,sBAAI,WAAW,CAAC,KAAK,GAAK,SAC1D,EACP,MAAC,IAAI,sEACiD,OAAO,CAAC,IAAI,0CAE3D,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,sBAAsB,EAC5B,WAAW,EAAE,YAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type 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:
|
|
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?:
|
|
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:
|
|
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
|
|
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
|
|
13
|
+
shortDescription: `Accept your invitation to join ${args.teamName} on ${args.appName}.`,
|
|
14
14
|
href: args.signInLink,
|
|
15
|
-
subject: `You are invited to join
|
|
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,
|
|
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,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getDefaultOwnerStatementEmailData: (mode:
|
|
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: (
|
|
9
|
+
export declare const OwnerStatementEmailTemplate: ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, }: ActionEmailTemplateProps & {
|
|
10
|
+
/** Requests a new no-login link once the emailed one has expired. */
|
|
11
|
+
renewHref?: string;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,22 +1,83 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { 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 {
|
|
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:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
20
|
-
|
|
31
|
+
const mutedColor = '#737373';
|
|
32
|
+
const borderColor = '#e5e7eb';
|
|
33
|
+
export const OwnerStatementEmailTemplate = ({ data, tenant, themeColors, mode, user, listing, month, unsubscribeHref, renewHref, }) => {
|
|
34
|
+
const parse = (html) => parseEmailHtml(html, {
|
|
35
|
+
href: data.href,
|
|
36
|
+
userName: user.firstName || '',
|
|
37
|
+
date: month || '',
|
|
38
|
+
listingName: listing || '',
|
|
39
|
+
});
|
|
40
|
+
return (_jsxs(EmailContainer, { title: data.subject, shortDescription: data.shortDescription, tenant: tenant, mode: mode, unsubscribeHref: unsubscribeHref, children: [_jsx(EmailHeading, { eyebrow: "Owner statement", themeColors: themeColors, children: data.header?.trim() || 'Your owner statement is ready' }), data.banner?.trim() && (_jsx(Text, { style: {
|
|
41
|
+
padding: '16px 20px',
|
|
42
|
+
backgroundColor: '#f8f9fa',
|
|
43
|
+
borderLeft: `3px solid ${themeColors[8]}`,
|
|
44
|
+
borderRadius: '4px',
|
|
45
|
+
margin: '0 0 32px',
|
|
46
|
+
whiteSpace: 'pre-line',
|
|
47
|
+
}, children: data.banner.trim() })), _jsx("div", {
|
|
48
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
|
|
49
|
+
dangerouslySetInnerHTML: { __html: parse(data.bodyOne) } }), (listing || month) && (_jsx("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, width: "100%", style: {
|
|
50
|
+
border: `1px solid ${borderColor}`,
|
|
51
|
+
borderRadius: '8px',
|
|
52
|
+
borderCollapse: 'separate',
|
|
53
|
+
margin: '24px 0 0',
|
|
54
|
+
}, children: _jsx("tbody", { children: [
|
|
55
|
+
['Property', listing],
|
|
56
|
+
['Statement', month],
|
|
57
|
+
].map(([label, value], index) => value ? (_jsxs("tr", { children: [_jsx("td", { style: {
|
|
58
|
+
padding: '14px 20px',
|
|
59
|
+
color: mutedColor,
|
|
60
|
+
fontSize: 14,
|
|
61
|
+
borderTop: index ? `1px solid ${borderColor}` : 'none',
|
|
62
|
+
}, children: label }), _jsx("td", { style: {
|
|
63
|
+
padding: '14px 20px',
|
|
64
|
+
fontSize: 14,
|
|
65
|
+
fontWeight: 600,
|
|
66
|
+
textAlign: 'right',
|
|
67
|
+
borderTop: index ? `1px solid ${borderColor}` : 'none',
|
|
68
|
+
}, children: value })] }, label)) : null) }) })), _jsx(Button, { href: data.href, mode: mode, "data-testid": "view-owner-statement-button", label: data.buttonText?.trim() || 'View statement', themeColors: themeColors, style: { marginTop: '24px', marginBottom: '32px' } }), renewHref && (_jsxs("div", { style: {
|
|
69
|
+
padding: '20px',
|
|
70
|
+
backgroundColor: '#f8f9fa',
|
|
71
|
+
borderRadius: '8px',
|
|
72
|
+
marginBottom: '32px',
|
|
73
|
+
}, children: [_jsx(Text, { style: { fontWeight: 600, margin: '0 0 4px' }, children: "Link expired?" }), _jsx(Text, { style: { color: mutedColor, fontSize: 14, margin: 0 }, children: "For your security, this link opens only this 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: {
|
|
74
|
+
background: '#ffffff',
|
|
75
|
+
border: `1px solid ${themeColors[8]}`,
|
|
76
|
+
color: themeColors[8],
|
|
77
|
+
marginTop: '16px',
|
|
78
|
+
marginBottom: 0,
|
|
79
|
+
} })] })), _jsx("div", {
|
|
80
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: values are escaped by parseEmailHtml
|
|
81
|
+
dangerouslySetInnerHTML: { __html: parse(data.bodyTwo) } })] }));
|
|
21
82
|
};
|
|
22
83
|
//# sourceMappingURL=OwnerStatementEmailTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerStatementEmailTemplate.js","sourceRoot":"src/","sources":["templates/OwnerStatementEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,mBAAmB,GAEpB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,IAAoB,EACpB,IAMC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,WAAW,GACf,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,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;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAA+B,EAC/B,EAAE;IACF,OAAO,KAAC,mBAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC","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/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,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,IAAoB,EACpB,IAMC,EACgB,EAAE;IACnB,MAAM,kBAAkB,GACtB,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAEzE,MAAM,WAAW,GACf,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;IACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IAE5E,0EAA0E;IAC1E,4EAA4E;IAC5E,4EAA4E;IAC5E,4BAA4B;IAC5B,OAAO;QACL,OAAO,EACL,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,+BAA+B;YACjC,CAAC,CAAC,QAAQ,IAAI,CAAC,KAAK,wBAAwB,IAAI,CAAC,WAAW,EAAE;QAClE,gBAAgB,EACd,IAAI,KAAK,KAAK;YACZ,CAAC,CAAC,wCAAwC;YAC1C,CAAC,CAAC,QAAQ,IAAI,CAAC,KAAK,kBAAkB,IAAI,CAAC,WAAW,oBAAoB;QAC9E,MAAM,EAAE,+BAA+B;QACvC,OAAO,EAAE,SAAS,QAAQ,WAAW,IAAI,CAAC,OAAO,mBAAmB,KAAK,wBAAwB,WAAW,sCAAsC;QAClJ,UAAU,EAAE,gBAAgB;QAC5B,OAAO,EAAE,yGAAyG,kBAAkB,MAAM;QAC1I,IAAI,EAAE,IAAI,CAAC,kBAAkB;KAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,SAAS,GAIV,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CAC7B,cAAc,CAAC,IAAI,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,QAAQ,EAAE,IAAI,CAAC,SAAS,IAAI,EAAE;QAC9B,IAAI,EAAE,KAAK,IAAI,EAAE;QACjB,WAAW,EAAE,OAAO,IAAI,EAAE;KAC3B,CAAC,CAAC;IAEL,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,eAAe,aAEhC,KAAC,YAAY,IAAC,OAAO,EAAC,iBAAiB,EAAC,WAAW,EAAE,WAAW,YAC7D,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,+BAA+B,GAC1C,EAEd,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CACtB,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,OAAO,EAAE,WAAW;oBACpB,eAAe,EAAE,SAAS;oBAC1B,UAAU,EAAE,aAAa,WAAW,CAAC,CAAC,CAAC,EAAE;oBACzC,YAAY,EAAE,KAAK;oBACnB,MAAM,EAAE,UAAU;oBAClB,UAAU,EAAE,UAAU;iBACvB,YAEA,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,GACd,CACR,EAED;gBACE,6FAA6F;gBAC7F,uBAAuB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,GACxD,EAED,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,CACrB,gBACE,IAAI,EAAC,cAAc,EACnB,WAAW,EAAE,CAAC,EACd,WAAW,EAAE,CAAC,EACd,KAAK,EAAC,MAAM,EACZ,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa,WAAW,EAAE;oBAClC,YAAY,EAAE,KAAK;oBACnB,cAAc,EAAE,UAAU;oBAC1B,MAAM,EAAE,UAAU;iBACnB,YAED,0BACG;wBACC,CAAC,UAAU,EAAE,OAAO,CAAC;wBACrB,CAAC,WAAW,EAAE,KAAK,CAAC;qBACrB,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,CAC9B,KAAK,CAAC,CAAC,CAAC,CACN,yBACE,aACE,KAAK,EAAE;oCACL,OAAO,EAAE,WAAW;oCACpB,KAAK,EAAE,UAAU;oCACjB,QAAQ,EAAE,EAAE;oCACZ,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,aAAa,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM;iCACvD,YAEA,KAAK,GACH,EACL,aACE,KAAK,EAAE;oCACL,OAAO,EAAE,WAAW;oCACpB,QAAQ,EAAE,EAAE;oCACZ,UAAU,EAAE,GAAG;oCACf,SAAS,EAAE,OAAO;oCAClB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,aAAa,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM;iCACvD,YAEA,KAAK,GACH,KArBE,KAAK,CAsBT,CACN,CAAC,CAAC,CAAC,IAAI,CACT,GACK,GACF,CACT,EAED,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,iBACE,6BAA6B,EACzC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,gBAAgB,EAClD,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAClD,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,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,+JAIpD,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\nconst mutedColor = '#737373';\nconst borderColor = '#e5e7eb';\n\nexport const OwnerStatementEmailTemplate = ({\n data,\n tenant,\n themeColors,\n mode,\n user,\n listing,\n month,\n unsubscribeHref,\n renewHref,\n}: ActionEmailTemplateProps & {\n /** Requests a new no-login link once the emailed one has expired. */\n renewHref?: string;\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 eyebrow=\"Owner statement\" themeColors={themeColors}>\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) && (\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 {[\n ['Property', listing],\n ['Statement', month],\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 <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={{ marginTop: '24px', marginBottom: '32px' }}\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 statement and works for\n 7 days. After that, request a new one and we'll email it to this\n 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,12 @@
|
|
|
1
|
+
import type { EmailBaseProps } from '../types';
|
|
2
|
+
export type TeamRoleGrantedEmailTemplateProps = {
|
|
3
|
+
mode: EmailBaseProps['mode'];
|
|
4
|
+
tenant: EmailBaseProps['tenant'];
|
|
5
|
+
member: string;
|
|
6
|
+
roles: string;
|
|
7
|
+
grantedAt: string;
|
|
8
|
+
grantedBy: string | null;
|
|
9
|
+
partnerName: string | null;
|
|
10
|
+
href: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const TeamRoleGrantedEmailTemplate: ({ mode, tenant, member, roles, grantedAt, grantedBy, partnerName, href, }: TeamRoleGrantedEmailTemplateProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading } from '@react-email/heading';
|
|
3
|
+
import { Text } from '@react-email/text';
|
|
4
|
+
import { Button } from '../components/Button';
|
|
5
|
+
import { EmailContainer } from '../components/EmailContainer';
|
|
6
|
+
import { THEME_COLORS } from '../theme';
|
|
7
|
+
export const TeamRoleGrantedEmailTemplate = ({ mode, tenant, member, roles, grantedAt, grantedBy, partnerName, href, }) => (_jsxs(EmailContainer, { title: `${member} received ${roles}`, shortDescription: `${member} received ${roles} on ${tenant.name}.`, tenant: tenant, mode: mode, children: [_jsxs(Heading, { style: { fontSize: 28, fontWeight: 600, marginBottom: '50px' }, children: ["New ", roles, " on your team"] }), _jsxs(Text, { children: [_jsx("b", { children: member }), " received ", _jsx("b", { children: roles }), " on ", tenant.name, " on ", grantedAt, grantedBy ? ` from ${grantedBy}` : '', partnerName ? `, acting through your partner ${partnerName}` : '', "."] }), _jsx(Text, { children: "If you did not expect this change, review the team members and remove the role." }), _jsx(Button, { href: href, mode: mode, label: "Review team members", themeColors: THEME_COLORS.vrplatform })] }));
|
|
8
|
+
//# sourceMappingURL=TeamRoleGrantedEmailTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TeamRoleGrantedEmailTemplate.js","sourceRoot":"src/","sources":["templates/TeamRoleGrantedEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAcxC,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAC3C,IAAI,EACJ,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,IAAI,GAC8B,EAAE,EAAE,CAAC,CACvC,MAAC,cAAc,IACb,KAAK,EAAE,GAAG,MAAM,aAAa,KAAK,EAAE,EACpC,gBAAgB,EAAE,GAAG,MAAM,aAAa,KAAK,OAAO,MAAM,CAAC,IAAI,GAAG,EAClE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,aAEV,MAAC,OAAO,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,qBAChE,KAAK,qBACF,EACV,MAAC,IAAI,eACH,sBAAI,MAAM,GAAK,gBAAU,sBAAI,KAAK,GAAK,UAAK,MAAM,CAAC,IAAI,UAAM,SAAS,EACrE,SAAS,CAAC,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EACrC,WAAW,CAAC,CAAC,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,SAC7D,EACP,KAAC,IAAI,kGAGE,EACP,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAC,qBAAqB,EAC3B,WAAW,EAAE,YAAY,CAAC,UAAW,GACrC,IACa,CAClB,CAAC","sourcesContent":["import { Heading } from '@react-email/heading';\nimport { Text } from '@react-email/text';\nimport { Button } from '../components/Button';\nimport { EmailContainer } from '../components/EmailContainer';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TeamRoleGrantedEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n tenant: EmailBaseProps['tenant'];\n member: string;\n roles: string;\n grantedAt: string;\n grantedBy: string | null;\n partnerName: string | null;\n href: string;\n};\n\nexport const TeamRoleGrantedEmailTemplate = ({\n mode,\n tenant,\n member,\n roles,\n grantedAt,\n grantedBy,\n partnerName,\n href,\n}: TeamRoleGrantedEmailTemplateProps) => (\n <EmailContainer\n title={`${member} received ${roles}`}\n shortDescription={`${member} received ${roles} on ${tenant.name}.`}\n tenant={tenant}\n mode={mode}\n >\n <Heading style={{ fontSize: 28, fontWeight: 600, marginBottom: '50px' }}>\n New {roles} on your team\n </Heading>\n <Text>\n <b>{member}</b> received <b>{roles}</b> on {tenant.name} on {grantedAt}\n {grantedBy ? ` from ${grantedBy}` : ''}\n {partnerName ? `, acting through your partner ${partnerName}` : ''}.\n </Text>\n <Text>\n If you did not expect this change, review the team members and remove the\n role.\n </Text>\n <Button\n href={href}\n mode={mode}\n label=\"Review team members\"\n themeColors={THEME_COLORS.vrplatform!}\n />\n </EmailContainer>\n);\n"]}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantDeletionEmailTemplate = ({ tenant, mode, user, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Team Account Deletion Notification', shortDescription: "We're reaching out to inform you that your VRPlatform team has been deleted.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team deleted", themeColors: THEME_COLORS.vrplatform, children: "Your team was deleted" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We wanted to inform you that the team account \"", tenant.name, "\" has been deleted. This action has resulted in the removal of the following data associated with the team:"] }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Payments:" }), " All payment records linked to the team have been permanently deleted."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Reservations:" }), " Any reservations made under this team account have been erased."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Statements:" }), " All statements generated for owners within this team are no longer accessible."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Owner Data:" }), " Personal and transactional data of the owners connected to this team have been removed."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Connections:" }), " Any established connections or integrations related to this team have been terminated."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Other Related Data:" }), " All other data associated with this team has been permanently deleted."] }) })] }), _jsx(Text, { children: "If you have any questions or need further assistance, please don't hesitate to reach out." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
13
9
|
};
|
|
14
10
|
export const TenantDeletionEmail = (props) => {
|
|
15
11
|
return _jsx(TenantDeletionEmailTemplate, { ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantDeletionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantDeletionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,MAAM,EACN,IAAI,EACJ,IAAI,GAC6B,EAAE,EAAE;IACrC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,oCAAoC,EAC3C,gBAAgB,EACd,8EAA8E,EAEhF,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,cAAc,EACtB,WAAW,EAAE,YAAY,CAAC,UAAU,sCAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,mEAC6C,MAAM,CAAC,IAAI,oHAGtD,EACP,yBACE,uBACE,MAAC,IAAI,eACH,oCAAgB,8EAEX,GACJ,EACL,uBACE,MAAC,IAAI,eACH,wCAAoB,wEAEf,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,4CAAwB,uFAEnB,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,sCAAkB,gGAEb,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,uCAAmB,+FAEd,GACJ,EAEL,uBACE,MAAC,IAAI,eACH,8CAA0B,+EAErB,GACJ,IACF,EACL,KAAC,IAAI,4GAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAuC,EACvC,EAAE;IACF,OAAO,KAAC,2BAA2B,OAAK,KAAK,GAAI,CAAC;AACpD,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantDeletionEmailTemplateProps = {\n tenant: EmailBaseProps['tenant'];\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n};\n\nexport const TenantDeletionEmailTemplate = ({\n tenant,\n mode,\n user,\n}: TenantDeletionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Team Account Deletion Notification'}\n shortDescription={\n \"We're reaching out to inform you that your VRPlatform team has been deleted.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team deleted\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team was deleted\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We wanted to inform you that the team account \"{tenant.name}\" has been\n deleted. This action has resulted in the removal of the following data\n associated with the team:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Payments:</b> All payment records linked to the team have been\n permanently deleted.\n </Text>\n </li>\n <li>\n <Text>\n <b>Reservations:</b> Any reservations made under this team account\n have been erased.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Statements:</b> All statements generated for owners within\n this team are no longer accessible.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Owner Data:</b> Personal and transactional data of the owners\n connected to this team have been removed.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Connections:</b> Any established connections or integrations\n related to this team have been terminated.\n </Text>\n </li>\n\n <li>\n <Text>\n <b>Other Related Data:</b> All other data associated with this team\n has been permanently deleted.\n </Text>\n </li>\n </ul>\n <Text>\n If you have any questions or need further assistance, please don't\n hesitate to reach out.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n\nexport const TenantDeletionEmail = (\n props: TenantDeletionEmailTemplateProps\n) => {\n return <TenantDeletionEmailTemplate {...props} />;\n};\n"]}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading } from '@react-email/heading';
|
|
3
2
|
import { Text } from '@react-email/text';
|
|
4
|
-
import { EmailContainer } from '../components';
|
|
3
|
+
import { EmailContainer, EmailHeading } from '../components';
|
|
4
|
+
import { THEME_COLORS } from '../theme';
|
|
5
5
|
export const TenantSuspensionEmailTemplate = ({ mode, user, tenant, }) => {
|
|
6
6
|
return (_jsxs(EmailContainer, { title: 'Action Required: Your VRPlatform Account Access', shortDescription: "We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.", tenant: {
|
|
7
7
|
logo: undefined,
|
|
8
|
-
}, mode: mode, children: [_jsx(
|
|
9
|
-
fontSize: 28,
|
|
10
|
-
fontWeight: 600,
|
|
11
|
-
marginBottom: '50px',
|
|
12
|
-
}, children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
8
|
+
}, mode: mode, children: [_jsx(EmailHeading, { eyebrow: "Team suspended", themeColors: THEME_COLORS.vrplatform, children: "Your team access is suspended" }), _jsx(Text, { children: user.firstName ? `Dear ${user.firstName},` : 'Hi there,' }), _jsxs(Text, { children: ["We're reaching out to inform you that as of today, access to your team", ' ', _jsx("b", { children: tenant.name }), " has been temporarily suspended. This includes access to features such as accounting automations, owner statements, management commissions and the owner portal (including portal access for all owners)."] }), _jsx(Text, { children: "At VRPlatform, we take the security and functionality of our platform seriously, ensuring that our partners have the best possible experience. This step, though necessary, is intended to be temporary and is part of our commitment to maintain the highest standards of service." }), _jsx(Text, { style: {
|
|
13
9
|
fontWeight: 'bold',
|
|
14
10
|
}, children: "Next Steps to Regain Access:" }), _jsxs("ul", { children: [_jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Immediate Action:" }), " To adress this and help you regain access to your account, please contact our support team at your earliest convenience. We're here to assist you with the necessary steps to restore your services."] }) }), _jsx("li", { children: _jsxs(Text, { children: [_jsx("b", { children: "Contact Information:" }), " You can reach us by emailing support@vrplatform.app. Our dedicated team is ready to support you in resolving this matter promptly."] }) })] }), _jsx(Text, { children: "Thank you for your prompt attention to this important matter. We value your partnership and are here to support you every step of the way." }), _jsxs(Text, { children: ["Best regards,", _jsx("br", {}), "The VRPlatform Team"] })] }));
|
|
15
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"TenantSuspensionEmailTemplate.js","sourceRoot":"src/","sources":["templates/TenantSuspensionEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AASxC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,IAAI,EACJ,IAAI,EACJ,MAAM,GAC6B,EAAE,EAAE;IACvC,OAAO,CACL,MAAC,cAAc,IACb,KAAK,EAAE,iDAAiD,EACxD,gBAAgB,EACd,sGAAsG,EAExG,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;SAChB,EACD,IAAI,EAAE,IAAI,aAEV,KAAC,YAAY,IACX,OAAO,EAAC,gBAAgB,EACxB,WAAW,EAAE,YAAY,CAAC,UAAU,8CAGvB,EAEf,KAAC,IAAI,cAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,WAAW,GAAQ,EAEvE,MAAC,IAAI,yFACoE,GAAG,EAC1E,sBAAI,MAAM,CAAC,IAAI,GAAK,iNAIf,EACP,KAAC,IAAI,sSAKE,EACP,KAAC,IAAI,IACH,KAAK,EAAE;oBACL,UAAU,EAAE,MAAM;iBACnB,6CAGI,EACP,yBACE,uBACE,MAAC,IAAI,eACH,4CAAwB,6MAInB,GACJ,EACL,uBACE,MAAC,IAAI,eACH,+CAA2B,2IAGtB,GACJ,IACF,EACL,KAAC,IAAI,6JAGE,EACP,MAAC,IAAI,gCAEH,cAAM,2BAED,IACQ,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Text } from '@react-email/text';\nimport { EmailContainer, EmailHeading } from '../components';\nimport { THEME_COLORS } from '../theme';\nimport type { EmailBaseProps } from '../types';\n\nexport type TenantSuspensionEmailTemplateProps = {\n mode: EmailBaseProps['mode'];\n user: EmailBaseProps['user'];\n tenant: Omit<EmailBaseProps['tenant'], 'logo'>;\n};\n\nexport const TenantSuspensionEmailTemplate = ({\n mode,\n user,\n tenant,\n}: TenantSuspensionEmailTemplateProps) => {\n return (\n <EmailContainer\n title={'Action Required: Your VRPlatform Account Access'}\n shortDescription={\n \"We're reaching out to inform you that access to your VRPlatform team has been temporarily suspended.\"\n }\n tenant={{\n logo: undefined,\n }}\n mode={mode}\n >\n <EmailHeading\n eyebrow=\"Team suspended\"\n themeColors={THEME_COLORS.vrplatform}\n >\n Your team access is suspended\n </EmailHeading>\n\n <Text>{user.firstName ? `Dear ${user.firstName},` : 'Hi there,'}</Text>\n\n <Text>\n We're reaching out to inform you that as of today, access to your team{' '}\n <b>{tenant.name}</b> has been temporarily suspended. This includes\n access to features such as accounting automations, owner statements,\n management commissions and the owner portal (including portal access for\n all owners).\n </Text>\n <Text>\n At VRPlatform, we take the security and functionality of our platform\n seriously, ensuring that our partners have the best possible experience.\n This step, though necessary, is intended to be temporary and is part of\n our commitment to maintain the highest standards of service.\n </Text>\n <Text\n style={{\n fontWeight: 'bold',\n }}\n >\n Next Steps to Regain Access:\n </Text>\n <ul>\n <li>\n <Text>\n <b>Immediate Action:</b> To adress this and help you regain access\n to your account, please contact our support team at your earliest\n convenience. We're here to assist you with the necessary steps to\n restore your services.\n </Text>\n </li>\n <li>\n <Text>\n <b>Contact Information:</b> You can reach us by emailing\n support@vrplatform.app. Our dedicated team is ready to support you\n in resolving this matter promptly.\n </Text>\n </li>\n </ul>\n <Text>\n Thank you for your prompt attention to this important matter. We value\n your partnership and are here to support you every step of the way.\n </Text>\n <Text>\n Best regards,\n <br />\n The VRPlatform Team\n </Text>\n </EmailContainer>\n );\n};\n"]}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export * from './TeamRoleGrantedEmailTemplate';
|
|
1
2
|
export * from './TenantSuspensionEmailTemplate';
|
|
2
3
|
export * from './TenantDeletionEmailTemplate';
|
|
3
4
|
export * from './OwnerStatementEmailTemplate';
|
|
5
|
+
export * from './BankAccountChangedEmailTemplate';
|
|
6
|
+
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
7
|
+
export * from './BankDetailsRequestEmailTemplate';
|
|
4
8
|
export * from './InviteOwnerEmailTemplate';
|
|
5
9
|
export * from './InvitePmEmailTemplate';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// Teams
|
|
2
|
+
export * from './TeamRoleGrantedEmailTemplate';
|
|
2
3
|
export * from './TenantSuspensionEmailTemplate';
|
|
3
4
|
export * from './TenantDeletionEmailTemplate';
|
|
4
5
|
// Owner Statements
|
|
5
6
|
export * from './OwnerStatementEmailTemplate';
|
|
7
|
+
// Payment setup
|
|
8
|
+
export * from './BankAccountChangedEmailTemplate';
|
|
9
|
+
export * from './BankAccountChangedTeamAdminEmailTemplate';
|
|
10
|
+
export * from './BankDetailsRequestEmailTemplate';
|
|
6
11
|
// Invitations
|
|
7
12
|
export * from './InviteOwnerEmailTemplate';
|
|
8
13
|
export * from './InvitePmEmailTemplate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["templates/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,mBAAmB;AACnB,cAAc,+BAA+B,CAAC;AAE9C,gBAAgB;AAChB,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,mCAAmC,CAAC;AAElD,cAAc;AACd,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC","sourcesContent":["// Teams\nexport * from './TeamRoleGrantedEmailTemplate';\nexport * from './TenantSuspensionEmailTemplate';\nexport * from './TenantDeletionEmailTemplate';\n\n// Owner Statements\nexport * from './OwnerStatementEmailTemplate';\n\n// Payment setup\nexport * from './BankAccountChangedEmailTemplate';\nexport * from './BankAccountChangedTeamAdminEmailTemplate';\nexport * from './BankDetailsRequestEmailTemplate';\n\n// Invitations\nexport * from './InviteOwnerEmailTemplate';\nexport * from './InvitePmEmailTemplate';\n"]}
|
package/build/module/types.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ export type EmailBaseProps = {
|
|
|
2
2
|
mode: 'edit' | 'preview' | 'send';
|
|
3
3
|
tenant: {
|
|
4
4
|
name: string;
|
|
5
|
+
showPlatformBranding?: boolean;
|
|
5
6
|
logo: string | undefined | null;
|
|
6
7
|
};
|
|
7
8
|
listing: string | undefined;
|
|
8
9
|
month: string | undefined;
|
|
10
|
+
/** Opt-out link shown below the email body */
|
|
11
|
+
unsubscribeHref?: string;
|
|
9
12
|
user: {
|
|
10
13
|
firstName: string | undefined;
|
|
11
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["export type EmailBaseProps = {\n mode: 'edit' | 'preview' | 'send';\n tenant: {\n name: string;\n logo: string | undefined | null;\n };\n listing: string | undefined;\n month: string | undefined;\n user: {\n firstName: string | undefined;\n };\n themeColors: readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n ];\n};\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["export type EmailBaseProps = {\n mode: 'edit' | 'preview' | 'send';\n tenant: {\n name: string;\n showPlatformBranding?: boolean;\n logo: string | undefined | null;\n };\n listing: string | undefined;\n month: string | undefined;\n /** Opt-out link shown below the email body */\n unsubscribeHref?: string;\n user: {\n firstName: string | undefined;\n };\n themeColors: readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n ];\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function findPostmarkEmail(deliveryId: string, options: {
|
|
2
|
+
fetch?: (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
postmarkToken?: string;
|
|
4
|
+
}): Promise<{
|
|
5
|
+
httpStatus: number;
|
|
6
|
+
messageId: string;
|
|
7
|
+
submittedAt: string;
|
|
8
|
+
} | undefined>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { day } from '@vrplatform/utils';
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
import { EmailDeliveryError } from './send-email';
|
|
4
|
+
const postmarkMessagesResponseSchema = z.object({
|
|
5
|
+
TotalCount: z.number().int().nonnegative(),
|
|
6
|
+
Messages: z.array(z.object({
|
|
7
|
+
MessageID: z.string().min(1),
|
|
8
|
+
ReceivedAt: z.string().refine((value) => day(value).isValid()),
|
|
9
|
+
Metadata: z.object({ deliveryId: z.string() }).passthrough(),
|
|
10
|
+
})),
|
|
11
|
+
});
|
|
12
|
+
export async function findPostmarkEmail(deliveryId, options) {
|
|
13
|
+
if (!options.postmarkToken) {
|
|
14
|
+
throw new EmailDeliveryError('Postmark is not configured', undefined, false, false);
|
|
15
|
+
}
|
|
16
|
+
const url = new URL('https://api.postmarkapp.com/messages/outbound');
|
|
17
|
+
url.searchParams.set('count', '1');
|
|
18
|
+
url.searchParams.set('offset', '0');
|
|
19
|
+
url.searchParams.set('messagestream', 'outbound');
|
|
20
|
+
url.searchParams.set('metadata_deliveryId', deliveryId);
|
|
21
|
+
const response = await (options.fetch ?? fetch)(url, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
headers: {
|
|
24
|
+
Accept: 'application/json',
|
|
25
|
+
'X-Postmark-Server-Token': options.postmarkToken,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const providerResponse = await response.json().catch(() => ({}));
|
|
29
|
+
if (!response.ok) {
|
|
30
|
+
throw new EmailDeliveryError('Postmark message lookup failed', {
|
|
31
|
+
provider: 'postmark',
|
|
32
|
+
providerCategory: 'rejected',
|
|
33
|
+
httpStatus: response.status,
|
|
34
|
+
}, false, response.status === 429 || response.status >= 500);
|
|
35
|
+
}
|
|
36
|
+
const result = postmarkMessagesResponseSchema.safeParse(providerResponse);
|
|
37
|
+
if (!result.success) {
|
|
38
|
+
throw new EmailDeliveryError('Postmark returned an invalid response');
|
|
39
|
+
}
|
|
40
|
+
if (result.data.TotalCount === 0)
|
|
41
|
+
return undefined;
|
|
42
|
+
const message = result.data.Messages.find(({ Metadata }) => Metadata.deliveryId === deliveryId);
|
|
43
|
+
if (!message) {
|
|
44
|
+
throw new EmailDeliveryError('Postmark returned an invalid response');
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
httpStatus: response.status,
|
|
48
|
+
messageId: message.MessageID,
|
|
49
|
+
submittedAt: message.ReceivedAt,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=find-postmark-email.js.map
|