@vrplatform/email 1.0.2-stage.371 → 1.0.2-stage.435

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.
@@ -3,4 +3,6 @@ export declare const getDefaultInviteOwnerEmailData: (mode: "tag" | "text", args
3
3
  appName: string;
4
4
  signInLink: string;
5
5
  }) => ActionEmailData;
6
- export declare const InviteOwnerEmailTemplate: (props: ActionEmailTemplateProps) => import("react").JSX.Element;
6
+ export declare const InviteOwnerEmailTemplate: ({ ownerAccessRole, ...props }: ActionEmailTemplateProps & {
7
+ ownerAccessRole?: "admin" | "viewer";
8
+ }) => import("react").JSX.Element;
@@ -7,18 +7,22 @@ const components_1 = require("../components");
7
7
  const getDefaultInviteOwnerEmailData = (mode, args) => {
8
8
  const signInLink = mode === 'tag' ? extensions_1.EMAIL_ACTION_LINK_COMPONENT : args.signInLink;
9
9
  return {
10
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
10
+ 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>`,
11
11
  bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,
12
12
  buttonText: 'Accept Invitation',
13
- header: 'Welcome to the team!',
14
- shortDescription: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
13
+ header: 'Welcome to your Owner Portal!',
14
+ shortDescription: 'Set up your Owner Portal access using your invitation.',
15
15
  href: args.signInLink,
16
- subject: `You are invited to join your team on ${args.appName}`,
16
+ subject: `Your invitation to the ${args.appName} Owner Portal`,
17
17
  };
18
18
  };
19
19
  exports.getDefaultInviteOwnerEmailData = getDefaultInviteOwnerEmailData;
20
- const InviteOwnerEmailTemplate = (props) => {
21
- return (0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props });
20
+ const InviteOwnerEmailTemplate = ({ ownerAccessRole = 'admin', ...props }) => {
21
+ return ((0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props, data: {
22
+ ...props.data,
23
+ // Add guidance at render time so saved custom templates receive it too.
24
+ 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>`,
25
+ } }));
22
26
  };
23
27
  exports.InviteOwnerEmailTemplate = InviteOwnerEmailTemplate;
24
28
  //# sourceMappingURL=InviteOwnerEmailTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC;IAEjE,OAAO;QACL,OAAO,EAAE,oCAAoC,IAAI,CAAC,OAAO,0BAA0B,IAAI,CAAC,OAAO,4DAA4D;QAC3J,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EACd,6GAA6G;QAC/G,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,8BAA8B,kCAoBzC;AAEK,MAAM,wBAAwB,GAAG,CAAC,KAA+B,EAAE,EAAE;IAC1E,OAAO,uBAAC,gCAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,wBAAwB,4BAEnC","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 join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</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 the team!',\n shortDescription:\n 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = (props: ActionEmailTemplateProps) => {\n return <ActionEmailTemplate {...props} />;\n};\n"]}
1
+ {"version":3,"file":"InviteOwnerEmailTemplate.js","sourceRoot":"src/","sources":["templates/InviteOwnerEmailTemplate.tsx"],"names":[],"mappings":";;;;AAAA,8CAA4D;AAC5D,8CAIuB;AAEhB,MAAM,8BAA8B,GAAG,CAC5C,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,wCAA2B,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;AAnBW,QAAA,8BAA8B,kCAmBzC;AAEK,MAAM,wBAAwB,GAAG,CAAC,EACvC,eAAe,GAAG,OAAO,EACzB,GAAG,KAAK,EAGT,EAAE,EAAE;IACH,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,mYAAmY,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kCAAkC,sCAAsC;SAC3hB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,wBAAwB,4BAgBnC","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"]}
@@ -9,18 +9,22 @@ const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
9
9
  ? extensions_1.EMAIL_ACTION_LINK_COMPONENT
10
10
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
11
11
  return {
12
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
12
+ bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
13
13
  bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
14
14
  buttonText: 'Accept Invitation',
15
15
  header: 'Welcome to the team!',
16
- shortDescription: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
16
+ shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
17
17
  href: args.signInLink,
18
18
  subject: `You are invited to join your team on ${args.appName}`,
19
19
  };
20
20
  };
21
21
  exports.getDefaultInvitePropertyManagerEmailData = getDefaultInvitePropertyManagerEmailData;
22
22
  const InvitePmEmailTemplate = (props) => {
23
- return ((0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props, tenant: {
23
+ return ((0, jsx_runtime_1.jsx)(components_1.ActionEmailTemplate, { ...props, data: {
24
+ ...props.data,
25
+ // Add guidance at render time so saved custom templates receive it too.
26
+ 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>`,
27
+ }, tenant: {
24
28
  logo: undefined,
25
29
  name: props.tenant.name,
26
30
  } }));
@@ -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,0BAA0B,IAAI,CAAC,OAAO,4DAA4D;QAC3J,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EACd,6GAA6G;QAC/G,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,wCAAwC,4CAsBnD;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,uBAAC,gCAAmB,OACd,KAAK,EACT,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,qBAAqB,yBAUhC","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>To start using ${args.appName}, accept the invitation and verify your email address.</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:\n 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',\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 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,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"]}
@@ -3,4 +3,6 @@ export declare const getDefaultInviteOwnerEmailData: (mode: "tag" | "text", args
3
3
  appName: string;
4
4
  signInLink: string;
5
5
  }) => ActionEmailData;
6
- export declare const InviteOwnerEmailTemplate: (props: ActionEmailTemplateProps) => import("react").JSX.Element;
6
+ export declare const InviteOwnerEmailTemplate: ({ ownerAccessRole, ...props }: ActionEmailTemplateProps & {
7
+ ownerAccessRole?: "admin" | "viewer";
8
+ }) => import("react").JSX.Element;
@@ -4,16 +4,20 @@ import { ActionEmailTemplate, } from '../components';
4
4
  export const getDefaultInviteOwnerEmailData = (mode, args) => {
5
5
  const signInLink = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;
6
6
  return {
7
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
7
+ 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>`,
8
8
  bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,
9
9
  buttonText: 'Accept Invitation',
10
- header: 'Welcome to the team!',
11
- shortDescription: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
10
+ header: 'Welcome to your Owner Portal!',
11
+ shortDescription: 'Set up your Owner Portal access using your invitation.',
12
12
  href: args.signInLink,
13
- subject: `You are invited to join your team on ${args.appName}`,
13
+ subject: `Your invitation to the ${args.appName} Owner Portal`,
14
14
  };
15
15
  };
16
- export const InviteOwnerEmailTemplate = (props) => {
17
- return _jsx(ActionEmailTemplate, { ...props });
16
+ export const InviteOwnerEmailTemplate = ({ ownerAccessRole = 'admin', ...props }) => {
17
+ return (_jsx(ActionEmailTemplate, { ...props, data: {
18
+ ...props.data,
19
+ // Add guidance at render time so saved custom templates receive it too.
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>`,
21
+ } }));
18
22
  };
19
23
  //# sourceMappingURL=InviteOwnerEmailTemplate.js.map
@@ -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,oCAAoC,IAAI,CAAC,OAAO,0BAA0B,IAAI,CAAC,OAAO,4DAA4D;QAC3J,OAAO,EAAE,wGAAwG,UAAU,MAAM;QACjI,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EACd,6GAA6G;QAC/G,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAA+B,EAAE,EAAE;IAC1E,OAAO,KAAC,mBAAmB,OAAK,KAAK,GAAI,CAAC;AAC5C,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 join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</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 the team!',\n shortDescription:\n 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InviteOwnerEmailTemplate = (props: ActionEmailTemplateProps) => {\n return <ActionEmailTemplate {...props} />;\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,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"]}
@@ -6,17 +6,21 @@ export const getDefaultInvitePropertyManagerEmailData = (mode, args) => {
6
6
  ? EMAIL_ACTION_LINK_COMPONENT
7
7
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
8
8
  return {
9
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
9
+ bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
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: 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
13
+ shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
14
14
  href: args.signInLink,
15
15
  subject: `You are invited to join your team on ${args.appName}`,
16
16
  };
17
17
  };
18
18
  export const InvitePmEmailTemplate = (props) => {
19
- return (_jsx(ActionEmailTemplate, { ...props, tenant: {
19
+ return (_jsx(ActionEmailTemplate, { ...props, data: {
20
+ ...props.data,
21
+ // Add guidance at render time so saved custom templates receive it too.
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: {
20
24
  logo: undefined,
21
25
  name: props.tenant.name,
22
26
  } }));
@@ -1 +1 @@
1
- {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,oCAAoC,IAAI,CAAC,OAAO,0BAA0B,IAAI,CAAC,OAAO,4DAA4D;QAC3J,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EACd,6GAA6G;QAC/G,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</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:\n 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',\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 tenant={{\n logo: undefined,\n name: props.tenant.name,\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"InvitePmEmailTemplate.js","sourceRoot":"src/","sources":["templates/InvitePmEmailTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAEL,mBAAmB,GAEpB,MAAM,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,IAAoB,EACpB,IAGC,EACgB,EAAE;IACnB,MAAM,UAAU,GACd,IAAI,KAAK,KAAK;QACZ,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,YAAY,IAAI,CAAC,UAAU,qBAAqB,IAAI,CAAC,UAAU,MAAM,CAAC;IAE5E,OAAO;QACL,OAAO,EAAE,oCAAoC,IAAI,CAAC,OAAO,qEAAqE;QAC9H,OAAO,EAAE,qFAAqF,UAAU,MAAM;QAC9G,UAAU,EAAE,mBAAmB;QAC/B,MAAM,EAAE,sBAAsB;QAC9B,gBAAgB,EAAE,+CAA+C,IAAI,CAAC,OAAO,GAAG;QAChF,IAAI,EAAE,IAAI,CAAC,UAAU;QACrB,OAAO,EAAE,wCAAwC,IAAI,CAAC,OAAO,EAAE;KAChE,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE;IACvE,OAAO,CACL,KAAC,mBAAmB,OACd,KAAK,EACT,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,IAAI;YACb,wEAAwE;YACxE,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,6aAA6a;SAC5c,EACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACxB,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions';\nimport {\n type ActionEmailData,\n ActionEmailTemplate,\n type ActionEmailTemplateProps,\n} from '../components';\n\nexport const getDefaultInvitePropertyManagerEmailData = (\n mode: 'tag' | 'text',\n args: {\n appName: string;\n signInLink: string;\n }\n): ActionEmailData => {\n const signInLink =\n mode === 'tag'\n ? EMAIL_ACTION_LINK_COMPONENT\n : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;\n\n return {\n bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,\n bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,\n buttonText: 'Accept Invitation',\n header: 'Welcome to the team!',\n shortDescription: `Accept your invitation to join your team on ${args.appName}.`,\n href: args.signInLink,\n subject: `You are invited to join your team on ${args.appName}`,\n };\n};\n\nexport const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {\n return (\n <ActionEmailTemplate\n {...props}\n data={{\n ...props.data,\n // Add guidance at render time so saved custom templates receive it too.\n bodyTwo: `${props.data.bodyTwo}<hr style=\"width:100%;border:none;border-top:1px solid #eaeaea;margin:24px 0\" /><p>This invitation link is for one-time setup of your team access and expires after 7 days. Sign up using the exact email address this invitation was sent to.</p><p>If your invitation expires before setup is complete, contact your team administrator for a new invitation.</p><p>For questions about team access, contact your team administrator.</p>`,\n }}\n tenant={{\n logo: undefined,\n name: props.tenant.name,\n }}\n />\n );\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vrplatform/email",
3
- "version": "1.0.2-stage.371",
3
+ "version": "1.0.2-stage.435",
4
4
  "description": "VRTrust transactional email templates and Postmark transport",
5
5
  "license": "ISC",
6
6
  "main": "build/main/index.js",
@@ -16,17 +16,30 @@ export const getDefaultInviteOwnerEmailData = (
16
16
  mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink;
17
17
 
18
18
  return {
19
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
19
+ 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>`,
20
20
  bodyTwo: `<p>If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}</p>`,
21
21
  buttonText: 'Accept Invitation',
22
- header: 'Welcome to the team!',
23
- shortDescription:
24
- 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
22
+ header: 'Welcome to your Owner Portal!',
23
+ shortDescription: 'Set up your Owner Portal access using your invitation.',
25
24
  href: args.signInLink,
26
- subject: `You are invited to join your team on ${args.appName}`,
25
+ subject: `Your invitation to the ${args.appName} Owner Portal`,
27
26
  };
28
27
  };
29
28
 
30
- export const InviteOwnerEmailTemplate = (props: ActionEmailTemplateProps) => {
31
- return <ActionEmailTemplate {...props} />;
29
+ export const InviteOwnerEmailTemplate = ({
30
+ ownerAccessRole = 'admin',
31
+ ...props
32
+ }: ActionEmailTemplateProps & {
33
+ ownerAccessRole?: 'admin' | 'viewer';
34
+ }) => {
35
+ return (
36
+ <ActionEmailTemplate
37
+ {...props}
38
+ data={{
39
+ ...props.data,
40
+ // Add guidance at render time so saved custom templates receive it too.
41
+ 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>`,
42
+ }}
43
+ />
44
+ );
32
45
  };
@@ -18,12 +18,11 @@ export const getDefaultInvitePropertyManagerEmailData = (
18
18
  : `<a href='${args.signInLink}' target='_blank'>${args.signInLink}</a>`;
19
19
 
20
20
  return {
21
- bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>To start using ${args.appName}, accept the invitation and verify your email address.</p>`,
21
+ bodyOne: `<p>You are invited to join us on ${args.appName}.</p><p>Accept the invitation below to set up your team access.</p>`,
22
22
  bodyTwo: `<p>If you have any trouble with the button, you can use the following link below: ${signInLink}</p>`,
23
23
  buttonText: 'Accept Invitation',
24
24
  header: 'Welcome to the team!',
25
- shortDescription:
26
- 'You have been invited to join the team. To start using VRPlatform, verify your email address at link below.',
25
+ shortDescription: `Accept your invitation to join your team on ${args.appName}.`,
27
26
  href: args.signInLink,
28
27
  subject: `You are invited to join your team on ${args.appName}`,
29
28
  };
@@ -33,6 +32,11 @@ export const InvitePmEmailTemplate = (props: ActionEmailTemplateProps) => {
33
32
  return (
34
33
  <ActionEmailTemplate
35
34
  {...props}
35
+ data={{
36
+ ...props.data,
37
+ // Add guidance at render time so saved custom templates receive it too.
38
+ 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>`,
39
+ }}
36
40
  tenant={{
37
41
  logo: undefined,
38
42
  name: props.tenant.name,