gemcap-be-common 1.3.21 → 1.3.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,20 @@
1
+ <html lang="en">
2
+ <body>
3
+
4
+ <p>Dear ${CONTACT_NAME}</p>
5
+
6
+ <p>Thank you for applying to Black Feather! We hope we can help you with your financing needs.
7
+ For us to consider your application, you are requested to complete as much as possible of the form via the link
8
+ below.</p>
9
+
10
+ <a href="${LINK}">${LINK}</a>
11
+
12
+ <p>We look forward to receiving your due diligence information and working with you. Once we have your application
13
+ details and reviewed your information will get back to you with an answer as soon as possible.</p>
14
+
15
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being processed.</p>
16
+
17
+ ${signature}
18
+
19
+ </body>
20
+ </html>
@@ -3,12 +3,13 @@
3
3
 
4
4
  <p>Dear ${CONTACT_NAME}</p>
5
5
 
6
- <p>You are requested to review your application${HAS_EMPTY_FIELDS}${FILE_INFO}.</p>
6
+ <p>Here’s a reminder on your loan application. Please submit your due diligence so that we can continue with your
7
+ application. We have not received anything from you against the following sections:</p>
7
8
 
8
9
  <a href="${LINK}">${LINK}</a>
9
10
 
10
- <p>We look forward to receiving your due diligence information and working with you. Failure to provide due diligence on
11
- a timely basis will result in delays to your loan application being processed.</p>
11
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being
12
+ processed.</p>
12
13
 
13
14
  ${signature}
14
15
 
@@ -0,0 +1,19 @@
1
+ <html lang="en">
2
+ <body>
3
+
4
+ <p>Dear ${CONTACT_NAME}</p>
5
+
6
+ <p>Thank you for executing the Letter of Interest! We are excited to work with you.</p>
7
+
8
+ <p>You are requested to complete as much as possible of the form via the link below.</p>
9
+
10
+ <a href="${LINK}">${LINK}</a>
11
+
12
+ <p>It is important that you provide as much information as possible. You can submit in multiple stages.</p>
13
+
14
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being processed.</p>
15
+
16
+ ${signature}
17
+
18
+ </body>
19
+ </html>
@@ -1,6 +1,5 @@
1
1
  <br>
2
2
  <p>Regards,</p>
3
- <br>
4
3
 
5
4
  <table>
6
5
  <tbody>
@@ -0,0 +1,20 @@
1
+ <html lang="en">
2
+ <body>
3
+
4
+ <p>Dear ${CONTACT_NAME}</p>
5
+
6
+ <p>Thank you for applying to Black Feather! We hope we can help you with your financing needs.
7
+ For us to consider your application, you are requested to complete as much as possible of the form via the link
8
+ below.</p>
9
+
10
+ <a href="${LINK}">${LINK}</a>
11
+
12
+ <p>We look forward to receiving your due diligence information and working with you. Once we have your application
13
+ details and reviewed your information will get back to you with an answer as soon as possible.</p>
14
+
15
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being processed.</p>
16
+
17
+ ${signature}
18
+
19
+ </body>
20
+ </html>
@@ -3,12 +3,13 @@
3
3
 
4
4
  <p>Dear ${CONTACT_NAME}</p>
5
5
 
6
- <p>You are requested to review your application${HAS_EMPTY_FIELDS}${FILE_INFO}.</p>
6
+ <p>Here’s a reminder on your loan application. Please submit your due diligence so that we can continue with your
7
+ application. We have not received anything from you against the following sections:</p>
7
8
 
8
9
  <a href="${LINK}">${LINK}</a>
9
10
 
10
- <p>We look forward to receiving your due diligence information and working with you. Failure to provide due diligence on
11
- a timely basis will result in delays to your loan application being processed.</p>
11
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being
12
+ processed.</p>
12
13
 
13
14
  ${signature}
14
15
 
@@ -0,0 +1,19 @@
1
+ <html lang="en">
2
+ <body>
3
+
4
+ <p>Dear ${CONTACT_NAME}</p>
5
+
6
+ <p>Thank you for executing the Letter of Interest! We are excited to work with you.</p>
7
+
8
+ <p>You are requested to complete as much as possible of the form via the link below.</p>
9
+
10
+ <a href="${LINK}">${LINK}</a>
11
+
12
+ <p>It is important that you provide as much information as possible. You can submit in multiple stages.</p>
13
+
14
+ <p>Failure to provide due diligence on a timely basis will result in delays to your loan application being processed.</p>
15
+
16
+ ${signature}
17
+
18
+ </body>
19
+ </html>
@@ -1,6 +1,5 @@
1
1
  <br>
2
2
  <p>Regards,</p>
3
- <br>
4
3
 
5
4
  <table>
6
5
  <tbody>
@@ -87,7 +87,7 @@ export declare class NodemailerService {
87
87
  sendProspectForm(email: Partial<IEmail>, replacements: {
88
88
  link: string;
89
89
  contactName: string;
90
- }): Promise<void>;
90
+ }, stage: 'one' | 'two'): Promise<void>;
91
91
  sendProspectReminder(email: Partial<IEmail>, replacements: {
92
92
  link: string;
93
93
  contactName: string;
@@ -641,8 +641,9 @@ class NodemailerService {
641
641
  this.sentryService.catchErrorBySentry(null, e);
642
642
  }
643
643
  }
644
- async sendProspectForm(email, replacements) {
645
- const textPath = path_1.default.resolve(__dirname, '../public/emails', 'prospect-form.html');
644
+ async sendProspectForm(email, replacements, stage) {
645
+ const stageTemplate = stage === 'one' ? 'prospect-form-one' : 'prospect-form-two';
646
+ const textPath = path_1.default.resolve(__dirname, '../public/emails', `${stageTemplate}.html`);
646
647
  const text = await fs.promises.readFile(textPath, 'utf8');
647
648
  const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
648
649
  const replacedData = text
@@ -668,7 +669,7 @@ class NodemailerService {
668
669
  async sendProspectReminder(email, replacements) {
669
670
  const textPath = path_1.default.resolve(__dirname, '../public/emails', 'prospect-form-reminder.html');
670
671
  const text = await fs.promises.readFile(textPath, 'utf8');
671
- const signature = await this.getSignatureAsync(ESenderType.FINANCIAL_ONLY);
672
+ const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
672
673
  const fileInfo = replacements.requiredGroups.length > 0
673
674
  ? ` and upload missing documents under the following sections: ${replacements.requiredGroups.join(', ')}`
674
675
  : '';
@@ -680,9 +681,9 @@ class NodemailerService {
680
681
  .replace('${signature}', signature);
681
682
  try {
682
683
  this.transporter.sendMail({
683
- from: this.getSender(ESenderType.FINANCIAL),
684
+ from: this.getSender(ESenderType.NEW_BUSINESS),
684
685
  to: [...this.config.hiddenRecipient, ...email.addresses],
685
- cc: this.getSender(ESenderType.FINANCIAL),
686
+ cc: this.getSender(ESenderType.NEW_BUSINESS),
686
687
  subject: email.subject,
687
688
  text: replacedData,
688
689
  html: replacedData,
@@ -724,8 +724,9 @@ export class NodemailerService {
724
724
  }
725
725
  }
726
726
 
727
- async sendProspectForm(email: Partial<IEmail>, replacements: { link: string, contactName: string }) {
728
- const textPath = path.resolve(__dirname, '../public/emails', 'prospect-form.html');
727
+ async sendProspectForm(email: Partial<IEmail>, replacements: { link: string, contactName: string }, stage: 'one' | 'two') {
728
+ const stageTemplate = stage === 'one' ? 'prospect-form-one' : 'prospect-form-two';
729
+ const textPath = path.resolve(__dirname, '../public/emails', `${stageTemplate}.html`);
729
730
  const text = await fs.promises.readFile(textPath, 'utf8');
730
731
  const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
731
732
  const replacedData = text
@@ -756,7 +757,7 @@ export class NodemailerService {
756
757
  }) {
757
758
  const textPath = path.resolve(__dirname, '../public/emails', 'prospect-form-reminder.html');
758
759
  const text = await fs.promises.readFile(textPath, 'utf8');
759
- const signature = await this.getSignatureAsync(ESenderType.FINANCIAL_ONLY);
760
+ const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
760
761
  const fileInfo = replacements.requiredGroups.length > 0
761
762
  ? ` and upload missing documents under the following sections: ${replacements.requiredGroups.join(', ')}`
762
763
  : '';
@@ -768,9 +769,9 @@ export class NodemailerService {
768
769
  .replace('${signature}', signature);
769
770
  try {
770
771
  this.transporter.sendMail({
771
- from: this.getSender(ESenderType.FINANCIAL),
772
+ from: this.getSender(ESenderType.NEW_BUSINESS),
772
773
  to: [...this.config.hiddenRecipient, ...email.addresses],
773
- cc: this.getSender(ESenderType.FINANCIAL),
774
+ cc: this.getSender(ESenderType.NEW_BUSINESS),
774
775
  subject: email.subject,
775
776
  text: replacedData,
776
777
  html: replacedData,