gemcap-be-common 1.3.18 → 1.3.19
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 +1 -1
- package/public/emails/black_feather/signature-new-business.html +48 -0
- package/public/emails/gemcap/signature-new-business.html +74 -0
- package/public/emails/signature-new-business.html +48 -0
- package/services/borrowers.service.d.ts +2 -2
- package/services/nodemailer.service.d.ts +3 -1
- package/services/nodemailer.service.js +12 -3
- package/services/nodemailer.service.ts +13 -3
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<br>
|
|
2
|
+
<p>Regards,</p>
|
|
3
|
+
<br>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr>
|
|
8
|
+
<td>
|
|
9
|
+
<table>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr>
|
|
12
|
+
<td></td>
|
|
13
|
+
</tr>
|
|
14
|
+
<tr>
|
|
15
|
+
<td></td>
|
|
16
|
+
</tr>
|
|
17
|
+
<tr>
|
|
18
|
+
<td><span style="color: #321900; font-weight: bold">New business</span></td>
|
|
19
|
+
</tr>
|
|
20
|
+
</tbody>
|
|
21
|
+
</table>
|
|
22
|
+
|
|
23
|
+
<table>
|
|
24
|
+
<tbody>
|
|
25
|
+
<tr>
|
|
26
|
+
<td><span style="color: #7d7f85; font-weight: bold">e:</span></td>
|
|
27
|
+
<td> newbusiness@blackfeatherfunding.com</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
|
|
32
|
+
<table>
|
|
33
|
+
<tbody>
|
|
34
|
+
<tr>
|
|
35
|
+
<td><span style="color: #7d7f85; font-weight: bold">The Lighter way to do Lending ™</span></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td><span style="color: #7d7f85; font-weight: bold">2222 N Alamo St San Antonio, TX 78215</span></td>
|
|
39
|
+
</tr>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</td>
|
|
43
|
+
<td>
|
|
44
|
+
<img src="https://black-feather-public.s3.us-east-2.amazonaws.com/logo.png" alt="My Image">
|
|
45
|
+
</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<br>
|
|
2
|
+
<p>Regards,</p>
|
|
3
|
+
<br>
|
|
4
|
+
|
|
5
|
+
<table style="width:385.3pt;border-collapse:collapse" width="514" cellspacing="0" cellpadding="0" border="0">
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr>
|
|
8
|
+
<td rowspan="7" style="width:120.55pt;border:none;border-right:solid #ff5f00 3.0pt;padding:0in 5.4pt 0in 5.4pt"
|
|
9
|
+
width="161" valign="top">
|
|
10
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:26.0pt;color:#321900">GemCap</span></b><b><span
|
|
11
|
+
style="font-size:10.0pt;color:#4b2300">
|
|
12
|
+
<u></u><u></u></span></b></p>
|
|
13
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><span style="font-size:12.0pt;color:#ff5f00">We finance</span><span
|
|
14
|
+
style="font-size:12.0pt">
|
|
15
|
+
<span style="color:#321900">Stuff ™</span></span><span style="font-size:10.0pt;color:#301a07"><u></u><u></u></span></p>
|
|
16
|
+
</td>
|
|
17
|
+
<td colspan="2" style="width:264.75pt;padding:0in 5.4pt 0in 5.4pt" width="353" valign="top">
|
|
18
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:14.0pt;color:#321900">Finance Department</span></b><b><span
|
|
19
|
+
style="font-size:10.0pt;color:#321900"><u></u><u></u></span></b></p>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr>
|
|
23
|
+
<td colspan="2" style="width:264.75pt;padding:0in 5.4pt 0in 5.4pt" width="353" valign="top">
|
|
24
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span
|
|
25
|
+
style="font-size:1.0pt;color:#321900"><u></u> <u></u></span></b></p>
|
|
26
|
+
</td>
|
|
27
|
+
</tr>
|
|
28
|
+
<tr>
|
|
29
|
+
<td colspan="2" style="width:264.75pt;padding:0in 5.4pt 0in 5.4pt" width="353" valign="top">
|
|
30
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:10.0pt;color:#321900"><u></u><u></u></span></b>
|
|
31
|
+
</p>
|
|
32
|
+
</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<td style="width:37.8pt;padding:0in 5.4pt 0in 5.4pt" width="50" valign="top">
|
|
36
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:10.0pt;color:#ff5f00"><u></u><u></u></span></b>
|
|
37
|
+
</p>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="width:226.95pt;padding:0in 5.4pt 0in 5.4pt" width="303" valign="top">
|
|
40
|
+
<p class="MsoNormal"><span style="font-size:10.0pt;color:#321900"><u></u><u></u></span></p>
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
<tr>
|
|
44
|
+
<td style="width:37.8pt;padding:0in 5.4pt 0in 5.4pt" width="50" valign="top">
|
|
45
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:10.0pt;color:#ff5f00">e:<u></u><u></u></span></b>
|
|
46
|
+
</p>
|
|
47
|
+
</td>
|
|
48
|
+
<td style="width:226.95pt;padding:0in 5.4pt 0in 5.4pt" width="303" valign="top">
|
|
49
|
+
<p class="MsoNormal"><span style="font-size:10.0pt"><a
|
|
50
|
+
href="mailto:smills@gemcapsolutions.com"
|
|
51
|
+
target="_blank"><span style="color:#0563c1">finance@gemcapsolutions.com</span></a><span
|
|
52
|
+
style="color:#301a07"><u></u><u></u></span></span></p>
|
|
53
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><span
|
|
54
|
+
style="font-size:4.0pt"><u></u> <u></u></span></p>
|
|
55
|
+
</td>
|
|
56
|
+
</tr>
|
|
57
|
+
<tr style="height:3.5pt">
|
|
58
|
+
<td style="width:37.8pt;padding:0in 5.4pt 0in 5.4pt;height:3.5pt" width="50" valign="top">
|
|
59
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:10.0pt;color:#ff5f00"><u></u> <u></u></span></b>
|
|
60
|
+
</p>
|
|
61
|
+
</td>
|
|
62
|
+
<td style="width:226.95pt;padding:0in 5.4pt 0in 5.4pt;height:3.5pt" width="303" valign="top">
|
|
63
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><span
|
|
64
|
+
style="font-size:4.0pt"><u></u> <u></u></span></p>
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr style="height:12.15pt">
|
|
68
|
+
<td colspan="2" style="width:264.75pt;padding:0in 5.4pt 0in 5.4pt;height:12.15pt" width="353" valign="top">
|
|
69
|
+
<p class="MsoNormal" style="margin-left:15.8pt;text-indent:.15pt"><b><span style="font-size:10.0pt;color:#ff5f00">9901 I.H. 10 West, Suite 800, San Antonio, TX 78230</span></b><b><span
|
|
70
|
+
style="font-size:10.0pt"><u></u><u></u></span></b></p>
|
|
71
|
+
</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</tbody>
|
|
74
|
+
</table>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<br>
|
|
2
|
+
<p>Regards,</p>
|
|
3
|
+
<br>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr>
|
|
8
|
+
<td>
|
|
9
|
+
<table>
|
|
10
|
+
<tbody>
|
|
11
|
+
<tr>
|
|
12
|
+
<td></td>
|
|
13
|
+
</tr>
|
|
14
|
+
<tr>
|
|
15
|
+
<td></td>
|
|
16
|
+
</tr>
|
|
17
|
+
<tr>
|
|
18
|
+
<td><span style="color: #321900; font-weight: bold">New business</span></td>
|
|
19
|
+
</tr>
|
|
20
|
+
</tbody>
|
|
21
|
+
</table>
|
|
22
|
+
|
|
23
|
+
<table>
|
|
24
|
+
<tbody>
|
|
25
|
+
<tr>
|
|
26
|
+
<td><span style="color: #7d7f85; font-weight: bold">e:</span></td>
|
|
27
|
+
<td> newbusiness@blackfeatherfunding.com</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
|
|
32
|
+
<table>
|
|
33
|
+
<tbody>
|
|
34
|
+
<tr>
|
|
35
|
+
<td><span style="color: #7d7f85; font-weight: bold">The Lighter way to do Lending ™</span></td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td><span style="color: #7d7f85; font-weight: bold">2222 N Alamo St San Antonio, TX 78215</span></td>
|
|
39
|
+
</tr>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</td>
|
|
43
|
+
<td>
|
|
44
|
+
<img src="https://black-feather-public.s3.us-east-2.amazonaws.com/logo.png" alt="My Image">
|
|
45
|
+
</td>
|
|
46
|
+
</tr>
|
|
47
|
+
</tbody>
|
|
48
|
+
</table>
|
|
@@ -83,10 +83,10 @@ export declare class BorrowerService {
|
|
|
83
83
|
getBorrowerCodesMap(): Promise<Map<string, string>>;
|
|
84
84
|
getBorrowerStatementDetails(borrowers: IBorrowerDocument[]): Promise<{
|
|
85
85
|
[x: number]: {
|
|
86
|
-
SELECTED_PERIOD?: boolean;
|
|
87
|
-
ENTIRE_LOAN?: boolean;
|
|
88
86
|
LAST_MONTH?: boolean;
|
|
89
87
|
CURRENT_MONTH?: boolean;
|
|
88
|
+
ENTIRE_LOAN?: boolean;
|
|
89
|
+
SELECTED_PERIOD?: boolean;
|
|
90
90
|
TERM_LOAN?: boolean;
|
|
91
91
|
};
|
|
92
92
|
}>;
|
|
@@ -16,7 +16,8 @@ export declare enum ESenderType {
|
|
|
16
16
|
REGULAR = 0,
|
|
17
17
|
FINANCIAL = 1,
|
|
18
18
|
FINANCIAL_ONLY = 2,
|
|
19
|
-
GOAT = 3
|
|
19
|
+
GOAT = 3,
|
|
20
|
+
NEW_BUSINESS = 4
|
|
20
21
|
}
|
|
21
22
|
type EmailWithItems = IEmail & {
|
|
22
23
|
recipientName: string;
|
|
@@ -35,6 +36,7 @@ interface INodemailerServiceConfig {
|
|
|
35
36
|
appTitle: string;
|
|
36
37
|
sender: string;
|
|
37
38
|
senderFinancial: string;
|
|
39
|
+
senderNewBusiness: string;
|
|
38
40
|
hiddenRecipient: string[];
|
|
39
41
|
mailerConfig: {
|
|
40
42
|
host: string;
|
|
@@ -41,6 +41,7 @@ var ESenderType;
|
|
|
41
41
|
ESenderType[ESenderType["FINANCIAL"] = 1] = "FINANCIAL";
|
|
42
42
|
ESenderType[ESenderType["FINANCIAL_ONLY"] = 2] = "FINANCIAL_ONLY";
|
|
43
43
|
ESenderType[ESenderType["GOAT"] = 3] = "GOAT";
|
|
44
|
+
ESenderType[ESenderType["NEW_BUSINESS"] = 4] = "NEW_BUSINESS";
|
|
44
45
|
})(ESenderType || (exports.ESenderType = ESenderType = {}));
|
|
45
46
|
const getSenderSignatureFileName = (senderType) => {
|
|
46
47
|
switch (senderType) {
|
|
@@ -50,6 +51,8 @@ const getSenderSignatureFileName = (senderType) => {
|
|
|
50
51
|
return 'signature-financial.html';
|
|
51
52
|
case ESenderType.FINANCIAL_ONLY:
|
|
52
53
|
return 'signature-financial-only.html';
|
|
54
|
+
case ESenderType.NEW_BUSINESS:
|
|
55
|
+
return 'signature-new-business.html';
|
|
53
56
|
case ESenderType.GOAT:
|
|
54
57
|
return 'signature-goat.html';
|
|
55
58
|
default:
|
|
@@ -87,6 +90,10 @@ class NodemailerService {
|
|
|
87
90
|
senderName: `${this.config.appTitle} Finance Department`,
|
|
88
91
|
senderEmail: this.config.senderFinancial,
|
|
89
92
|
},
|
|
93
|
+
[ESenderType.NEW_BUSINESS]: {
|
|
94
|
+
senderName: `${this.config.appTitle} New Business`,
|
|
95
|
+
senderEmail: this.config.senderNewBusiness,
|
|
96
|
+
},
|
|
90
97
|
};
|
|
91
98
|
this.transporter = nodemailer_1.default.createTransport(this.config.mailerConfig);
|
|
92
99
|
}
|
|
@@ -96,6 +103,8 @@ class NodemailerService {
|
|
|
96
103
|
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
97
104
|
case ESenderType.FINANCIAL:
|
|
98
105
|
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
106
|
+
case ESenderType.NEW_BUSINESS:
|
|
107
|
+
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
99
108
|
default:
|
|
100
109
|
return `"${this.config.appTitle}>" <${this.config.sender}>`;
|
|
101
110
|
}
|
|
@@ -635,16 +644,16 @@ class NodemailerService {
|
|
|
635
644
|
async sendProspectForm(email, replacements) {
|
|
636
645
|
const textPath = path_1.default.resolve(__dirname, '../public/emails', 'prospect-form.html');
|
|
637
646
|
const text = await fs.promises.readFile(textPath, 'utf8');
|
|
638
|
-
const signature = await this.getSignatureAsync(ESenderType.
|
|
647
|
+
const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
|
|
639
648
|
const replacedData = text
|
|
640
649
|
.replaceAll('${LINK}', replacements.link)
|
|
641
650
|
.replaceAll('${CONTACT_NAME}', replacements.contactName)
|
|
642
651
|
.replace('${signature}', signature);
|
|
643
652
|
try {
|
|
644
653
|
this.transporter.sendMail({
|
|
645
|
-
from: this.getSender(ESenderType.
|
|
654
|
+
from: this.getSender(ESenderType.NEW_BUSINESS),
|
|
646
655
|
to: [...this.config.hiddenRecipient, ...email.addresses],
|
|
647
|
-
cc: this.getSender(ESenderType.
|
|
656
|
+
cc: this.getSender(ESenderType.NEW_BUSINESS),
|
|
648
657
|
subject: email.subject,
|
|
649
658
|
text: replacedData,
|
|
650
659
|
html: replacedData,
|
|
@@ -28,6 +28,7 @@ export enum ESenderType {
|
|
|
28
28
|
FINANCIAL,
|
|
29
29
|
FINANCIAL_ONLY,
|
|
30
30
|
GOAT,
|
|
31
|
+
NEW_BUSINESS
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
type EmailWithItems = IEmail & {
|
|
@@ -49,6 +50,8 @@ const getSenderSignatureFileName = (senderType: ESenderType) => {
|
|
|
49
50
|
return 'signature-financial.html';
|
|
50
51
|
case ESenderType.FINANCIAL_ONLY:
|
|
51
52
|
return 'signature-financial-only.html';
|
|
53
|
+
case ESenderType.NEW_BUSINESS:
|
|
54
|
+
return 'signature-new-business.html';
|
|
52
55
|
case ESenderType.GOAT:
|
|
53
56
|
return 'signature-goat.html';
|
|
54
57
|
default:
|
|
@@ -60,6 +63,7 @@ interface INodemailerServiceConfig {
|
|
|
60
63
|
appTitle: string;
|
|
61
64
|
sender: string;
|
|
62
65
|
senderFinancial: string;
|
|
66
|
+
senderNewBusiness: string;
|
|
63
67
|
hiddenRecipient: string[];
|
|
64
68
|
mailerConfig: {
|
|
65
69
|
host: string,
|
|
@@ -98,6 +102,10 @@ export class NodemailerService {
|
|
|
98
102
|
senderName: `${this.config.appTitle} Finance Department`,
|
|
99
103
|
senderEmail: this.config.senderFinancial,
|
|
100
104
|
},
|
|
105
|
+
[ESenderType.NEW_BUSINESS]: {
|
|
106
|
+
senderName: `${this.config.appTitle} New Business`,
|
|
107
|
+
senderEmail: this.config.senderNewBusiness,
|
|
108
|
+
},
|
|
101
109
|
};
|
|
102
110
|
this.transporter = nodemailer.createTransport(this.config.mailerConfig);
|
|
103
111
|
}
|
|
@@ -108,6 +116,8 @@ export class NodemailerService {
|
|
|
108
116
|
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
109
117
|
case ESenderType.FINANCIAL:
|
|
110
118
|
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
119
|
+
case ESenderType.NEW_BUSINESS:
|
|
120
|
+
return `${this.senders[senderType].senderName} <${this.senders[senderType].senderEmail}>`;
|
|
111
121
|
default:
|
|
112
122
|
return `"${this.config.appTitle}>" <${this.config.sender}>`;
|
|
113
123
|
}
|
|
@@ -717,16 +727,16 @@ export class NodemailerService {
|
|
|
717
727
|
async sendProspectForm(email: Partial<IEmail>, replacements: { link: string, contactName: string }) {
|
|
718
728
|
const textPath = path.resolve(__dirname, '../public/emails', 'prospect-form.html');
|
|
719
729
|
const text = await fs.promises.readFile(textPath, 'utf8');
|
|
720
|
-
const signature = await this.getSignatureAsync(ESenderType.
|
|
730
|
+
const signature = await this.getSignatureAsync(ESenderType.NEW_BUSINESS);
|
|
721
731
|
const replacedData = text
|
|
722
732
|
.replaceAll('${LINK}', replacements.link)
|
|
723
733
|
.replaceAll('${CONTACT_NAME}', replacements.contactName)
|
|
724
734
|
.replace('${signature}', signature);
|
|
725
735
|
try {
|
|
726
736
|
this.transporter.sendMail({
|
|
727
|
-
from: this.getSender(ESenderType.
|
|
737
|
+
from: this.getSender(ESenderType.NEW_BUSINESS),
|
|
728
738
|
to: [...this.config.hiddenRecipient, ...email.addresses],
|
|
729
|
-
cc: this.getSender(ESenderType.
|
|
739
|
+
cc: this.getSender(ESenderType.NEW_BUSINESS),
|
|
730
740
|
subject: email.subject,
|
|
731
741
|
text: replacedData,
|
|
732
742
|
html: replacedData,
|