@platform-x/hep-notification-client 1.3.0 → 1.3.2
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/README.md +7 -7
- package/dist/jest-setup.js +28 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/src/common/controllers/common_controller.js +72 -0
- package/dist/src/common/controllers/common_controller.js.map +1 -0
- package/dist/src/common/controllers/index.js +29 -0
- package/dist/src/common/controllers/index.js.map +1 -0
- package/dist/src/common/middleware/commonMiddleware.js +141 -0
- package/dist/src/common/middleware/commonMiddleware.js.map +1 -0
- package/dist/src/common/service/requestService.js +79 -1
- package/dist/src/common/service/requestService.js.map +1 -0
- package/dist/src/common/service/twilioService.js +3 -11
- package/dist/src/common/service/twilioService.js.map +1 -0
- package/dist/src/common/util/commonUtil.js +119 -1
- package/dist/src/common/util/commonUtil.js.map +1 -0
- package/dist/src/common/util/constants.js +18 -0
- package/dist/src/common/util/constants.js.map +1 -0
- package/dist/src/common/util/errorHandler.js +4 -6
- package/dist/src/common/util/errorHandler.js.map +1 -0
- package/dist/src/common/util/httpCodes.js +26 -0
- package/dist/src/common/util/httpCodes.js.map +1 -0
- package/dist/src/common/util/logger.js +1 -1
- package/dist/src/common/util/logger.js.map +1 -0
- package/dist/src/common/util/requestTracer.js +18 -1
- package/dist/src/common/util/requestTracer.js.map +1 -0
- package/dist/src/common/util/solrConnector.js.map +1 -0
- package/dist/src/config/index.js +49 -4
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/platform-x/app.js +35 -0
- package/dist/src/platform-x/app.js.map +1 -0
- package/dist/src/platform-x/constants/index.js +2 -14
- package/dist/src/platform-x/constants/index.js.map +1 -0
- package/dist/src/platform-x/constants/style.js +98 -98
- package/dist/src/platform-x/constants/style.js.map +1 -0
- package/dist/src/platform-x/controllers/cronController.js +399 -0
- package/dist/src/platform-x/controllers/cronController.js.map +1 -0
- package/dist/src/platform-x/controllers/fileUploadController.js +76 -0
- package/dist/src/platform-x/controllers/fileUploadController.js.map +1 -0
- package/dist/src/platform-x/controllers/graphRESTControllers.js +183 -0
- package/dist/src/platform-x/controllers/graphRESTControllers.js.map +1 -0
- package/dist/src/platform-x/controllers/index.js +30 -0
- package/dist/src/platform-x/controllers/index.js.map +1 -0
- package/dist/src/platform-x/controllers/siteDomainController.js +74 -0
- package/dist/src/platform-x/controllers/siteDomainController.js.map +1 -0
- package/dist/src/platform-x/dataSource/emailDataSource.js.map +1 -0
- package/dist/src/platform-x/database/connection.js +3 -6
- package/dist/src/platform-x/database/connection.js.map +1 -0
- package/dist/src/platform-x/database/dao/formBuilder.dao.js +1 -1
- package/dist/src/platform-x/database/dao/formBuilder.dao.js.map +1 -0
- package/dist/src/platform-x/database/dao/siteDomain.dao.js +73 -0
- package/dist/src/platform-x/database/dao/siteDomain.dao.js.map +1 -0
- package/dist/src/platform-x/database/index.js.map +1 -0
- package/dist/src/platform-x/{interface/interface.js → database/interfaces/site_domain.interface.js} +1 -1
- package/dist/src/platform-x/database/interfaces/site_domain.interface.js.map +1 -0
- package/dist/src/platform-x/database/models/formBuilder.model.js.map +1 -0
- package/dist/src/platform-x/database/models/site_domains.model.js +51 -0
- package/dist/src/platform-x/database/models/site_domains.model.js.map +1 -0
- package/dist/src/platform-x/routes/index.js +19 -0
- package/dist/src/platform-x/routes/index.js.map +1 -0
- package/dist/src/platform-x/services/cron.services.js +117 -0
- package/dist/src/platform-x/services/cron.services.js.map +1 -0
- package/dist/src/platform-x/util/emailHandler.js +53 -137
- package/dist/src/platform-x/util/emailHandler.js.map +1 -0
- package/dist/src/platform-x/util/emailTemplate.js +63 -60
- package/dist/src/platform-x/util/emailTemplate.js.map +1 -0
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.js +2 -0
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.js.map +1 -0
- package/dist/src/server.js +38 -0
- package/dist/src/server.js.map +1 -0
- package/dist/swagger.json +247 -0
- package/dist/test/controllers/common_controller.spec.js +79 -0
- package/dist/test/controllers/common_controller.spec.js.map +1 -0
- package/dist/test/middleware/commonMiddleware.spec.js +88 -0
- package/dist/test/middleware/commonMiddleware.spec.js.map +1 -0
- package/dist/test/platform-x/controllers/graphRESTControllers.spec.js +195 -0
- package/dist/test/platform-x/controllers/graphRESTControllers.spec.js.map +1 -0
- package/dist/test/platform-x/datasource/emailDataSource.spec.js +81 -0
- package/dist/test/platform-x/datasource/emailDataSource.spec.js.map +1 -0
- package/dist/test/platform-x/util/emailHandler.spec.js +474 -0
- package/dist/test/platform-x/util/emailHandler.spec.js.map +1 -0
- package/dist/test/platform-x/util/solr-data-source/SolrHttpDataSource.spec.js +80 -0
- package/dist/test/platform-x/util/solr-data-source/SolrHttpDataSource.spec.js.map +1 -0
- package/dist/test/services/requestService.spec.js +108 -0
- package/dist/test/services/requestService.spec.js.map +1 -0
- package/dist/test/services/requestServiceGet.spec.js +43 -0
- package/dist/test/services/requestServiceGet.spec.js.map +1 -0
- package/dist/test/src/common/service/twilioService.spec.js +65 -0
- package/dist/test/src/common/service/twilioService.spec.js.map +1 -0
- package/dist/test/util/commonUtil.spec.js +110 -0
- package/dist/test/util/commonUtil.spec.js.map +1 -0
- package/dist/test/util/logger.spec.js +51 -0
- package/dist/test/util/logger.spec.js.map +1 -0
- package/dist/test/util/requestTracer.spec.js +64 -0
- package/dist/test/util/requestTracer.spec.js.map +1 -0
- package/dist/test/util/solrconnector.spec.js +145 -0
- package/dist/test/util/solrconnector.spec.js.map +1 -0
- package/package.json +66 -62
- package/postman_collection/HEP_Environment.postman_environment.json +44 -44
- package/postman_collection/hep-notification.postman_collection.json +55 -55
- package/reports/output.jtl +1 -1
- package/reports/scripts/jmeter_sendgrid.js +34 -34
- package/reports/scripts/newman_sendgrid.js +40 -40
- package/reports/scripts/sendgrid.js +40 -40
- package/reports/scripts/trivy_sendgrid.js +40 -40
- package/src/common/service/requestService.ts +87 -0
- package/{dist/src/common/service/secretKeyManager.services.js → src/common/service/secretKeyManager.services.ts} +1 -2
- package/src/common/service/twilioService.ts +58 -0
- package/src/common/util/commonUtil.ts +39 -0
- package/src/common/util/errorHandler.ts +120 -0
- package/src/common/util/logger.ts +215 -0
- package/src/common/util/requestTracer.ts +10 -0
- package/src/common/util/solrConnector.ts +319 -0
- package/src/config/index.ts +35 -0
- package/src/index.ts +34 -0
- package/src/platform-x/constants/index.ts +20 -0
- package/src/platform-x/constants/style.ts +99 -0
- package/src/platform-x/dataSource/emailDataSource.ts +34 -0
- package/src/platform-x/database/connection.ts +47 -0
- package/src/platform-x/database/dao/formBuilder.dao.ts +33 -0
- package/src/platform-x/database/index.ts +7 -0
- package/src/platform-x/database/models/formBuilder.model.ts +23 -0
- package/src/platform-x/util/emailHandler.ts +580 -0
- package/src/platform-x/util/emailTemplate.ts +66 -0
- package/src/platform-x/util/solr-data-source/SolrHttpDataSource.ts +97 -0
- package/{dist → src}/templates/orderPlaced.ejs +172 -172
- package/{dist → src}/templates/orderPlaced.html +189 -189
- package/tsconfig.json +73 -0
- package/dist/src/common/service/requestService.d.ts +0 -26
- package/dist/src/common/service/secretKeyManager.services.d.ts +0 -0
- package/dist/src/common/service/twilioService.d.ts +0 -19
- package/dist/src/common/util/commonUtil.d.ts +0 -22
- package/dist/src/common/util/errorHandler.d.ts +0 -44
- package/dist/src/common/util/logger.d.ts +0 -68
- package/dist/src/common/util/requestTracer.d.ts +0 -2
- package/dist/src/common/util/secretKeyManager.d.ts +0 -7
- package/dist/src/common/util/secretKeyManager.js +0 -58
- package/dist/src/common/util/solrConnector.d.ts +0 -35
- package/dist/src/config/index.d.ts +0 -30
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +0 -20
- package/dist/src/platform-x/constants/index.d.ts +0 -18
- package/dist/src/platform-x/constants/style.d.ts +0 -1
- package/dist/src/platform-x/dataSource/emailDataSource.d.ts +0 -5
- package/dist/src/platform-x/database/connection.d.ts +0 -8
- package/dist/src/platform-x/database/dao/formBuilder.dao.d.ts +0 -9
- package/dist/src/platform-x/database/index.d.ts +0 -7
- package/dist/src/platform-x/database/models/formBuilder.model.d.ts +0 -34
- package/dist/src/platform-x/interface/interface.d.ts +0 -4
- package/dist/src/platform-x/util/emailHandler.d.ts +0 -62
- package/dist/src/platform-x/util/emailTemplate.d.ts +0 -4
- package/dist/src/platform-x/util/solr-data-source/SolrHttpDataSource.d.ts +0 -26
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
2
|
-
<tbody>
|
|
3
|
-
<tr>
|
|
4
|
-
<td width="100%">
|
|
5
|
-
<div style="max-width:600px;Margin:0 auto">
|
|
6
|
-
<table align="center" cellpadding="0" cellspacing="0"
|
|
7
|
-
style="border-spacing:0;font-family:gt-eesti,ArialMT,Helvetica,Arial,sans-serif;Margin:0 auto;padding:24px;width:100%;max-width:500px">
|
|
8
|
-
<tbody>
|
|
9
|
-
<tr>
|
|
10
|
-
<td>
|
|
11
|
-
<table style="margin-bottom:40px;width:100%" width="100%">
|
|
12
|
-
<tbody>
|
|
13
|
-
<tr>
|
|
14
|
-
<td>
|
|
15
|
-
<a href="http://8link.in/?ref=mail"
|
|
16
|
-
style="font-family:Helvetica,Arial,sans-serif;color:#0086bf" target="_blank">
|
|
17
|
-
<img src="http://8link.in/assets/mail/logo.png" style="display:block" alt="8link"
|
|
18
|
-
width="200" height="65" />
|
|
19
|
-
</a>
|
|
20
|
-
</td>
|
|
21
|
-
</tr>
|
|
22
|
-
</tbody>
|
|
23
|
-
</table>
|
|
24
|
-
</td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td style="text-align:justify;word-break:break-word">
|
|
28
|
-
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
29
|
-
<tbody>
|
|
30
|
-
<tr>
|
|
31
|
-
<td>
|
|
32
|
-
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
33
|
-
<tbody>
|
|
34
|
-
<tr>
|
|
35
|
-
<td>
|
|
36
|
-
<strong style="font-family:Helvetica,Arial,sans-serif;color:#234567">Hi <%= userName
|
|
37
|
-
%>, </strong>
|
|
38
|
-
|
|
39
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
40
|
-
Your Order <%= orderNumber %> has been placed sucessfully
|
|
41
|
-
</p>
|
|
42
|
-
</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr>
|
|
45
|
-
<td>
|
|
46
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
47
|
-
Address Details <%= completeAddressStr %>
|
|
48
|
-
</p>
|
|
49
|
-
</td>
|
|
50
|
-
</tr>
|
|
51
|
-
<tr>
|
|
52
|
-
<td>
|
|
53
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
54
|
-
Tax Calculated on your order is <%= total_tax %>
|
|
55
|
-
</p>
|
|
56
|
-
</td>
|
|
57
|
-
</tr>
|
|
58
|
-
</tbody>
|
|
59
|
-
</table>
|
|
60
|
-
</td>
|
|
61
|
-
</tr>
|
|
62
|
-
</tbody>
|
|
63
|
-
</table>
|
|
64
|
-
</td>
|
|
65
|
-
</tr>
|
|
66
|
-
<tr>
|
|
67
|
-
<td>
|
|
68
|
-
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
69
|
-
<tbody>
|
|
70
|
-
<tr>
|
|
71
|
-
<td>
|
|
72
|
-
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
73
|
-
<tbody>
|
|
74
|
-
<tr> Package Details</tr>
|
|
75
|
-
<tr>
|
|
76
|
-
<td>
|
|
77
|
-
Item Name
|
|
78
|
-
</td>
|
|
79
|
-
<td>
|
|
80
|
-
Price
|
|
81
|
-
</td>
|
|
82
|
-
<td>
|
|
83
|
-
Quantity
|
|
84
|
-
</td>
|
|
85
|
-
<!-- <td>
|
|
86
|
-
Colour
|
|
87
|
-
</td>
|
|
88
|
-
<td>
|
|
89
|
-
Size
|
|
90
|
-
</td> -->
|
|
91
|
-
<td>
|
|
92
|
-
Brand
|
|
93
|
-
</td>
|
|
94
|
-
</tr>
|
|
95
|
-
<!-- <% for (var key in data) { %>
|
|
96
|
-
<h3>
|
|
97
|
-
<%= data[key].ecomx_en_name %>
|
|
98
|
-
</h3>
|
|
99
|
-
<h3>
|
|
100
|
-
<%= data[key].ecomx_quantity %>
|
|
101
|
-
</h3>
|
|
102
|
-
<h3>
|
|
103
|
-
<%= data[key].ecomx_attributes_size %>
|
|
104
|
-
</h3>
|
|
105
|
-
<% } %> -->
|
|
106
|
-
<% for (var key in data) { %>
|
|
107
|
-
<tr>
|
|
108
|
-
<td>
|
|
109
|
-
<%= data[key].ecomx_en_name %>
|
|
110
|
-
</td>
|
|
111
|
-
<td>
|
|
112
|
-
<%= data[key].total_price %>
|
|
113
|
-
<%= data[key].ecomx_currency_code %>
|
|
114
|
-
</td>
|
|
115
|
-
<td>
|
|
116
|
-
<%= data[key].ecomx_quantity %>
|
|
117
|
-
</td>
|
|
118
|
-
<!-- <td>
|
|
119
|
-
<%= data[key].ecomx_attributes_colour %>
|
|
120
|
-
</td>
|
|
121
|
-
<td>
|
|
122
|
-
<%= data[key].ecomx_attributes_size %>
|
|
123
|
-
</td> -->
|
|
124
|
-
<td>
|
|
125
|
-
<%= data[key].ecomx_attributes_brand %>
|
|
126
|
-
</td>
|
|
127
|
-
</tr>
|
|
128
|
-
<% } %>
|
|
129
|
-
</tbody>
|
|
130
|
-
</table>
|
|
131
|
-
</td>
|
|
132
|
-
</tr>
|
|
133
|
-
</tbody>
|
|
134
|
-
</table>
|
|
135
|
-
</td>
|
|
136
|
-
</tr>
|
|
137
|
-
<tr>
|
|
138
|
-
<td style="text-align:center">
|
|
139
|
-
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
140
|
-
Order total <%= total_price %>
|
|
141
|
-
</p>
|
|
142
|
-
</td>
|
|
143
|
-
</tr>
|
|
144
|
-
<tr>
|
|
145
|
-
<td>
|
|
146
|
-
<table width="100%" style="margin-bottom:20px;width:100%">
|
|
147
|
-
<tbody>
|
|
148
|
-
<tr>
|
|
149
|
-
<td width="100%">
|
|
150
|
-
<div style="width:100%;height:1px;background-color:#ddd" color="#DDD" width="100%"></div>
|
|
151
|
-
</td>
|
|
152
|
-
</tr>
|
|
153
|
-
</tbody>
|
|
154
|
-
</table>
|
|
155
|
-
</td>
|
|
156
|
-
</tr>
|
|
157
|
-
|
|
158
|
-
<tr>
|
|
159
|
-
<td style="text-align:center">
|
|
160
|
-
<img src="http://8link.in/assets/mail/icon.png" alt="8link_icon"
|
|
161
|
-
style="display:block;width:29px;height:auto;margin-left:auto;margin-right:auto;margin-bottom:10px"
|
|
162
|
-
height="auto" />
|
|
163
|
-
</td>
|
|
164
|
-
</tr>
|
|
165
|
-
<tr>
|
|
166
|
-
<td style="text-align:center">
|
|
167
|
-
<table style="max-width:100%;width:100%;text-align:center;font-family:ArialMT,Arial,sans-serif"
|
|
168
|
-
cellspacing="0" cellpadding="0">
|
|
169
|
-
<tbody>
|
|
170
|
-
<tr>
|
|
171
|
-
<td style="text-align:center">
|
|
172
|
-
<p
|
|
173
|
-
style="font-size:10px;color:#708c91;text-align:center;padding:0;margin-top:10px;margin-bottom:2px">
|
|
174
|
-
This email was sent to you by
|
|
175
|
-
Platofrm X (Do not reply)
|
|
176
|
-
</p>
|
|
177
|
-
</td>
|
|
178
|
-
</tr>
|
|
179
|
-
</tbody>
|
|
180
|
-
</table>
|
|
181
|
-
</td>
|
|
182
|
-
</tr>
|
|
183
|
-
|
|
184
|
-
</tbody>
|
|
185
|
-
</table>
|
|
186
|
-
</div>
|
|
187
|
-
</td>
|
|
188
|
-
</tr>
|
|
189
|
-
</tbody>
|
|
1
|
+
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
2
|
+
<tbody>
|
|
3
|
+
<tr>
|
|
4
|
+
<td width="100%">
|
|
5
|
+
<div style="max-width:600px;Margin:0 auto">
|
|
6
|
+
<table align="center" cellpadding="0" cellspacing="0"
|
|
7
|
+
style="border-spacing:0;font-family:gt-eesti,ArialMT,Helvetica,Arial,sans-serif;Margin:0 auto;padding:24px;width:100%;max-width:500px">
|
|
8
|
+
<tbody>
|
|
9
|
+
<tr>
|
|
10
|
+
<td>
|
|
11
|
+
<table style="margin-bottom:40px;width:100%" width="100%">
|
|
12
|
+
<tbody>
|
|
13
|
+
<tr>
|
|
14
|
+
<td>
|
|
15
|
+
<a href="http://8link.in/?ref=mail"
|
|
16
|
+
style="font-family:Helvetica,Arial,sans-serif;color:#0086bf" target="_blank">
|
|
17
|
+
<img src="http://8link.in/assets/mail/logo.png" style="display:block" alt="8link"
|
|
18
|
+
width="200" height="65" />
|
|
19
|
+
</a>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
24
|
+
</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr>
|
|
27
|
+
<td style="text-align:justify;word-break:break-word">
|
|
28
|
+
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
29
|
+
<tbody>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>
|
|
32
|
+
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
33
|
+
<tbody>
|
|
34
|
+
<tr>
|
|
35
|
+
<td>
|
|
36
|
+
<strong style="font-family:Helvetica,Arial,sans-serif;color:#234567">Hi <%= userName
|
|
37
|
+
%>, </strong>
|
|
38
|
+
|
|
39
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
40
|
+
Your Order <%= orderNumber %> has been placed sucessfully
|
|
41
|
+
</p>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td>
|
|
46
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
47
|
+
Address Details <%= completeAddressStr %>
|
|
48
|
+
</p>
|
|
49
|
+
</td>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr>
|
|
52
|
+
<td>
|
|
53
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
54
|
+
Tax Calculated on your order is <%= total_tax %>
|
|
55
|
+
</p>
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
</tbody>
|
|
59
|
+
</table>
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>
|
|
68
|
+
<table style="margin-bottom:20px;width:100%" width="100%">
|
|
69
|
+
<tbody>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>
|
|
72
|
+
<table style="width:100%;margin-bottom:20px" width="100%" cellpadding="0" cellspacing="0">
|
|
73
|
+
<tbody>
|
|
74
|
+
<tr> Package Details</tr>
|
|
75
|
+
<tr>
|
|
76
|
+
<td>
|
|
77
|
+
Item Name
|
|
78
|
+
</td>
|
|
79
|
+
<td>
|
|
80
|
+
Price
|
|
81
|
+
</td>
|
|
82
|
+
<td>
|
|
83
|
+
Quantity
|
|
84
|
+
</td>
|
|
85
|
+
<!-- <td>
|
|
86
|
+
Colour
|
|
87
|
+
</td>
|
|
88
|
+
<td>
|
|
89
|
+
Size
|
|
90
|
+
</td> -->
|
|
91
|
+
<td>
|
|
92
|
+
Brand
|
|
93
|
+
</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<!-- <% for (var key in data) { %>
|
|
96
|
+
<h3>
|
|
97
|
+
<%= data[key].ecomx_en_name %>
|
|
98
|
+
</h3>
|
|
99
|
+
<h3>
|
|
100
|
+
<%= data[key].ecomx_quantity %>
|
|
101
|
+
</h3>
|
|
102
|
+
<h3>
|
|
103
|
+
<%= data[key].ecomx_attributes_size %>
|
|
104
|
+
</h3>
|
|
105
|
+
<% } %> -->
|
|
106
|
+
<% for (var key in data) { %>
|
|
107
|
+
<tr>
|
|
108
|
+
<td>
|
|
109
|
+
<%= data[key].ecomx_en_name %>
|
|
110
|
+
</td>
|
|
111
|
+
<td>
|
|
112
|
+
<%= data[key].total_price %>
|
|
113
|
+
<%= data[key].ecomx_currency_code %>
|
|
114
|
+
</td>
|
|
115
|
+
<td>
|
|
116
|
+
<%= data[key].ecomx_quantity %>
|
|
117
|
+
</td>
|
|
118
|
+
<!-- <td>
|
|
119
|
+
<%= data[key].ecomx_attributes_colour %>
|
|
120
|
+
</td>
|
|
121
|
+
<td>
|
|
122
|
+
<%= data[key].ecomx_attributes_size %>
|
|
123
|
+
</td> -->
|
|
124
|
+
<td>
|
|
125
|
+
<%= data[key].ecomx_attributes_brand %>
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<% } %>
|
|
129
|
+
</tbody>
|
|
130
|
+
</table>
|
|
131
|
+
</td>
|
|
132
|
+
</tr>
|
|
133
|
+
</tbody>
|
|
134
|
+
</table>
|
|
135
|
+
</td>
|
|
136
|
+
</tr>
|
|
137
|
+
<tr>
|
|
138
|
+
<td style="text-align:center">
|
|
139
|
+
<p style="font-size:26px;line-height:30px;color:#054752;word-break:normal">
|
|
140
|
+
Order total <%= total_price %>
|
|
141
|
+
</p>
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
<tr>
|
|
145
|
+
<td>
|
|
146
|
+
<table width="100%" style="margin-bottom:20px;width:100%">
|
|
147
|
+
<tbody>
|
|
148
|
+
<tr>
|
|
149
|
+
<td width="100%">
|
|
150
|
+
<div style="width:100%;height:1px;background-color:#ddd" color="#DDD" width="100%"></div>
|
|
151
|
+
</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
</td>
|
|
156
|
+
</tr>
|
|
157
|
+
|
|
158
|
+
<tr>
|
|
159
|
+
<td style="text-align:center">
|
|
160
|
+
<img src="http://8link.in/assets/mail/icon.png" alt="8link_icon"
|
|
161
|
+
style="display:block;width:29px;height:auto;margin-left:auto;margin-right:auto;margin-bottom:10px"
|
|
162
|
+
height="auto" />
|
|
163
|
+
</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td style="text-align:center">
|
|
167
|
+
<table style="max-width:100%;width:100%;text-align:center;font-family:ArialMT,Arial,sans-serif"
|
|
168
|
+
cellspacing="0" cellpadding="0">
|
|
169
|
+
<tbody>
|
|
170
|
+
<tr>
|
|
171
|
+
<td style="text-align:center">
|
|
172
|
+
<p
|
|
173
|
+
style="font-size:10px;color:#708c91;text-align:center;padding:0;margin-top:10px;margin-bottom:2px">
|
|
174
|
+
This email was sent to you by
|
|
175
|
+
Platofrm X (Do not reply)
|
|
176
|
+
</p>
|
|
177
|
+
</td>
|
|
178
|
+
</tr>
|
|
179
|
+
</tbody>
|
|
180
|
+
</table>
|
|
181
|
+
</td>
|
|
182
|
+
</tr>
|
|
183
|
+
|
|
184
|
+
</tbody>
|
|
185
|
+
</table>
|
|
186
|
+
</div>
|
|
187
|
+
</td>
|
|
188
|
+
</tr>
|
|
189
|
+
</tbody>
|
|
190
190
|
</table>
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Basic Options */
|
|
6
|
+
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
+
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
|
|
8
|
+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
+
"lib": ["es6"], /* Specify library files to be included in the compilation. */
|
|
10
|
+
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
|
+
// "checkJs": true, /* Report errors in .js files. */
|
|
12
|
+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
13
|
+
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
|
+
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
15
|
+
"sourceMap": true, /* Generates corresponding '.map' file. */
|
|
16
|
+
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
17
|
+
"outDir": "dist", /* Redirect output structure to the directory. */
|
|
18
|
+
"rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
19
|
+
// "composite": true, /* Enable project compilation */
|
|
20
|
+
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
21
|
+
// "removeComments": true, /* Do not emit comments to output. */
|
|
22
|
+
// "noEmit": true, /* Do not emit outputs. */
|
|
23
|
+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
24
|
+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
25
|
+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
26
|
+
|
|
27
|
+
/* Strict Type-Checking Options */
|
|
28
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
29
|
+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
30
|
+
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
31
|
+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
32
|
+
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
33
|
+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
34
|
+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
35
|
+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
36
|
+
|
|
37
|
+
/* Additional Checks */
|
|
38
|
+
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
39
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
40
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
41
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
42
|
+
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
43
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
|
|
44
|
+
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
|
|
45
|
+
|
|
46
|
+
/* Module Resolution Options */
|
|
47
|
+
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
48
|
+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
49
|
+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
50
|
+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
51
|
+
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
52
|
+
"types": ["node"], /* Type declaration files to be included in compilation. */
|
|
53
|
+
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
54
|
+
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
55
|
+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
56
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
57
|
+
|
|
58
|
+
/* Source Map Options */
|
|
59
|
+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
60
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
62
|
+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
63
|
+
|
|
64
|
+
/* Experimental Options */
|
|
65
|
+
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
66
|
+
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
67
|
+
|
|
68
|
+
/* Advanced Options */
|
|
69
|
+
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
70
|
+
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
|
|
71
|
+
"resolveJsonModule": true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
interface RequestHandlerPostOptions {
|
|
2
|
-
url: string;
|
|
3
|
-
body: any;
|
|
4
|
-
options?: any;
|
|
5
|
-
}
|
|
6
|
-
interface RequestHandlerGetOptions {
|
|
7
|
-
url: string;
|
|
8
|
-
options?: any;
|
|
9
|
-
}
|
|
10
|
-
export declare class HttpRequestHandler {
|
|
11
|
-
private requestTimeout;
|
|
12
|
-
constructor();
|
|
13
|
-
/**
|
|
14
|
-
* post - handler to do post api calls
|
|
15
|
-
* @param requestConfig
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
post(requestConfig: RequestHandlerPostOptions): Promise<any>;
|
|
19
|
-
/**
|
|
20
|
-
* get - handler to do get api calls
|
|
21
|
-
* @param requestConfig
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
get(requestConfig: RequestHandlerGetOptions): Promise<any>;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
File without changes
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class TwilioService {
|
|
2
|
-
private client;
|
|
3
|
-
private senderNumber;
|
|
4
|
-
/**
|
|
5
|
-
* Constructor to initialize Twilio client and sender number
|
|
6
|
-
* @param accountSid - Twilio Account SID
|
|
7
|
-
* @param authToken - Twilio Auth Token
|
|
8
|
-
* @param senderNumber - Twilio Sender Phone Number
|
|
9
|
-
*/
|
|
10
|
-
private constructor();
|
|
11
|
-
static TwilioClassObject(): Promise<TwilioService>;
|
|
12
|
-
/**
|
|
13
|
-
* Send an SMS using Twilio
|
|
14
|
-
* @param to - Recipient's phone number
|
|
15
|
-
* @param message - Message content
|
|
16
|
-
* @returns Promise resolving with the Twilio response
|
|
17
|
-
*/
|
|
18
|
-
sendSMS(to: string, message: string): Promise<import("twilio/lib/rest/api/v2010/account/message").MessageInstance>;
|
|
19
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate a phone number for format and length
|
|
3
|
-
* @param phoneNumber
|
|
4
|
-
* @returns
|
|
5
|
-
*/
|
|
6
|
-
export declare const validatePhoneNumber: (phoneNumber: string) => boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Validate a message for length and content
|
|
9
|
-
* @param message
|
|
10
|
-
* @returns
|
|
11
|
-
*/
|
|
12
|
-
export declare const validateMessage: (message: string) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Validate both phone number and message
|
|
15
|
-
* @param phoneNumber
|
|
16
|
-
* @param message
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare const validate: (phoneNumber: string, message: string) => {
|
|
20
|
-
valid: boolean;
|
|
21
|
-
errors: any;
|
|
22
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export declare const enum HTTP_STATUS_CODE {
|
|
2
|
-
INTERNAL_SERVER_ERROR = 500
|
|
3
|
-
}
|
|
4
|
-
export declare const HTTP_STATUS_MAP: Map<number, string>;
|
|
5
|
-
export declare const enum HTTP_STATUS_TYPE {
|
|
6
|
-
INTERNAL_SERVER_ERROR = "Internal Server Error"
|
|
7
|
-
}
|
|
8
|
-
export declare class CommonErrorTemplate extends Error {
|
|
9
|
-
code: number;
|
|
10
|
-
type: string;
|
|
11
|
-
constructor(msg: string, code?: number);
|
|
12
|
-
toJSON(): {
|
|
13
|
-
code: number;
|
|
14
|
-
type: string;
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare class ApiError extends CommonErrorTemplate {
|
|
19
|
-
constructor(msg: string, code?: number);
|
|
20
|
-
}
|
|
21
|
-
export declare class SolrError extends CommonErrorTemplate {
|
|
22
|
-
constructor(msg: string, code?: number);
|
|
23
|
-
}
|
|
24
|
-
export declare class CustomError {
|
|
25
|
-
code: number | undefined;
|
|
26
|
-
type: string | undefined;
|
|
27
|
-
message: string | undefined;
|
|
28
|
-
stack: string | undefined;
|
|
29
|
-
errorObj: Error | undefined | null;
|
|
30
|
-
constructor(errObj?: any, code?: number, type?: string, message?: string, stack?: string);
|
|
31
|
-
toJSON(): {
|
|
32
|
-
code: number | undefined;
|
|
33
|
-
type: string | undefined;
|
|
34
|
-
message: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* errorMapper - to map error object to custom error
|
|
39
|
-
*/
|
|
40
|
-
export declare const errorMapper: (err: any, statusCode?: number, type?: string) => any;
|
|
41
|
-
/**
|
|
42
|
-
* throwError - to throw custome error
|
|
43
|
-
*/
|
|
44
|
-
export declare const throwError: (err: any, statusCode?: number, type?: string) => never;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export interface payLoadInterface {
|
|
2
|
-
statusCode?: number;
|
|
3
|
-
data?: any;
|
|
4
|
-
}
|
|
5
|
-
export interface LoggerInterface {
|
|
6
|
-
info(message: string, method: string): void;
|
|
7
|
-
warn(message: string, method: string, payload?: object): void;
|
|
8
|
-
error(message: string, method: string, payload?: object): void;
|
|
9
|
-
debug(message: string, method: string, payload?: object): void;
|
|
10
|
-
}
|
|
11
|
-
export declare class LoggerClass implements LoggerInterface {
|
|
12
|
-
private logger;
|
|
13
|
-
private infoLevel;
|
|
14
|
-
private debugLevel;
|
|
15
|
-
private errorLevel;
|
|
16
|
-
private warnLevel;
|
|
17
|
-
private blockedKeywords;
|
|
18
|
-
constructor();
|
|
19
|
-
/**
|
|
20
|
-
* It's written to handle JSON.circular error
|
|
21
|
-
* @param obj
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
customstringify(obj: any): string;
|
|
25
|
-
/**
|
|
26
|
-
* for info log
|
|
27
|
-
* @param message
|
|
28
|
-
* @param payload
|
|
29
|
-
* @param method
|
|
30
|
-
* @returns
|
|
31
|
-
*/
|
|
32
|
-
info(message: string, method: string): void;
|
|
33
|
-
/**
|
|
34
|
-
* for warn log
|
|
35
|
-
* @param message
|
|
36
|
-
* @param payload
|
|
37
|
-
* @param method
|
|
38
|
-
* @returns
|
|
39
|
-
*/
|
|
40
|
-
warn(message: string, method: string, payload?: any): void;
|
|
41
|
-
/**
|
|
42
|
-
* for error log
|
|
43
|
-
* @param message
|
|
44
|
-
* @param payload
|
|
45
|
-
* @param method
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
error(message: string, method: string, payload?: any): void;
|
|
49
|
-
/**
|
|
50
|
-
* for debug log
|
|
51
|
-
* @param message
|
|
52
|
-
* @param payload
|
|
53
|
-
* @param method
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
debug(message: string, method: string, payload?: any): void;
|
|
57
|
-
/**
|
|
58
|
-
* to map log levels and handle from config
|
|
59
|
-
*/
|
|
60
|
-
private mapLogLevels;
|
|
61
|
-
/**
|
|
62
|
-
* to sanitize logs from unwanted fields to be shown
|
|
63
|
-
* @param request
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
private sanitizeLog;
|
|
67
|
-
}
|
|
68
|
-
export declare const Logger: LoggerClass;
|