@tiledesk/tiledesk-server 2.4.7 → 2.4.9

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.
Files changed (38) hide show
  1. package/.circleci/config.yml +1 -1
  2. package/app.js +11 -0
  3. package/config/email.js +1 -1
  4. package/event/botEvent.js +12 -2
  5. package/middleware/has-role.js +6 -0
  6. package/middleware/passport.js +1 -0
  7. package/models/auth.js +9 -1
  8. package/models/faq_kb.js +4 -0
  9. package/models/lead.js +5 -0
  10. package/models/user.js +3 -0
  11. package/package.json +3 -3
  12. package/public/wstest/index.html +5 -41
  13. package/pubmodules/apps/listener.js +3 -3
  14. package/pubmodules/queue/reconnect.js +24 -0
  15. package/pubmodules/queue/reconnectFanout.js +17 -0
  16. package/routes/auth.js +44 -3
  17. package/routes/faq_kb.js +42 -0
  18. package/routes/images.js +3 -1
  19. package/routes/lead.js +51 -0
  20. package/routes/project.js +12 -0
  21. package/routes/users.js +2 -0
  22. package/services/emailService.js +2 -2
  23. package/services/trainingService.js +7 -2
  24. package/template/email/assignedEmailMessage.html +253 -149
  25. package/template/email/assignedRequest.html +273 -173
  26. package/template/email/beenInvitedExistingUser.html +213 -130
  27. package/template/email/beenInvitedNewUser.html +200 -119
  28. package/template/email/emailDirect.html +207 -114
  29. package/template/email/newMessage.html +250 -157
  30. package/template/email/newMessageFollower.html +351 -225
  31. package/template/email/passwordChanged.html +178 -96
  32. package/template/email/pooledEmailMessage.html +250 -151
  33. package/template/email/pooledRequest.html +270 -164
  34. package/template/email/resetPassword.html +201 -115
  35. package/template/email/sendTranscript.html +299 -197
  36. package/template/email/ticket.html +263 -160
  37. package/template/email/verify.html +208 -126
  38. package/websocket/webSocketServer.js +70 -3
@@ -1,17 +1,21 @@
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml"
5
+ style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
1
6
 
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
4
7
  <head>
5
8
  <meta name="viewport" content="width=device-width" />
6
9
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7
- <title>New email from TileDesk</title>
10
+ <title>New email from Tiledesk</title>
8
11
 
9
12
  <style type="text/css">
10
13
  img {
11
14
  max-width: 100%;
12
- margin-left:16px;
13
- text-align:center !important;
15
+ margin-left: 16px;
16
+ text-align: center !important;
14
17
  }
18
+
15
19
  img.CToWUd {
16
20
  margin-bottom: 16px;
17
21
  max-width: 200px !important;
@@ -23,119 +27,197 @@
23
27
  height: auto;
24
28
  margin-left: 0px;
25
29
  }
30
+
26
31
  body {
27
- -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
32
+ -webkit-font-smoothing: antialiased;
33
+ -webkit-text-size-adjust: none;
34
+ width: 100% !important;
35
+ height: 100%;
36
+ line-height: 1.6em;
28
37
  }
38
+
29
39
  body {
30
- background-color: #f6f6f6;
40
+ background-color: #f6f6f6;
31
41
  }
32
42
 
33
43
  @media only screen and (max-width: 640px) {
34
- body {
35
- padding: 0 !important;
36
- }
37
- h1 {
38
- font-weight: 800 !important; margin: 20px 0 5px !important;
39
- text-align:center !important;
40
- }
41
- h2 {
42
- font-weight: 800 !important; margin: 20px 0 5px !important;
43
- }
44
- h3 {
45
- font-weight: 800 !important; margin: 20px 0 5px !important;
46
- }
47
- h4 {
48
- font-weight: 800 !important; margin: 20px 0 5px !important;
49
- }
50
- h1 {
51
- font-size: 22px !important;
52
- }
53
- h2 {
54
- font-size: 18px !important;
55
- }
56
- h3 {
57
- font-size: 16px !important;
58
- }
59
- .container {
60
- padding: 0 !important; width: 100% !important;
61
- }
62
- .content {
63
- padding: 0 !important;
64
- }
65
- .content-wrap {
66
- padding: 10px !important;
67
- }
68
- .invoice {
69
- width: 100% !important;
70
- }
44
+ body {
45
+ padding: 0 !important;
46
+ }
47
+
48
+ h1 {
49
+ font-weight: 800 !important;
50
+ margin: 20px 0 5px !important;
51
+ text-align: center !important;
52
+ }
53
+
54
+ h2 {
55
+ font-weight: 800 !important;
56
+ margin: 20px 0 5px !important;
57
+ }
58
+
59
+ h3 {
60
+ font-weight: 800 !important;
61
+ margin: 20px 0 5px !important;
62
+ }
63
+
64
+ h4 {
65
+ font-weight: 800 !important;
66
+ margin: 20px 0 5px !important;
67
+ }
68
+
69
+ h1 {
70
+ font-size: 22px !important;
71
+ }
72
+
73
+ h2 {
74
+ font-size: 18px !important;
75
+ }
76
+
77
+ h3 {
78
+ font-size: 16px !important;
79
+ }
80
+
81
+ .container {
82
+ padding: 0 !important;
83
+ width: 100% !important;
84
+ }
85
+
86
+ .content {
87
+ padding: 0 !important;
88
+ }
89
+
90
+ .content-wrap {
91
+ padding: 10px !important;
92
+ }
93
+
94
+ .invoice {
95
+ width: 100% !important;
96
+ }
71
97
  }
72
98
  </style>
73
- </head>
99
+ </head>
74
100
 
75
- <body itemscope itemtype="http://schema.org/EmailMessage" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
101
+ <body itemscope itemtype="http://schema.org/EmailMessage"
102
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;"
103
+ bgcolor="#f6f6f6">
76
104
 
77
- <table class="body-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;" bgcolor="#f6f6f6">
78
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
79
- <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
80
- <td class="container" width="600" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;" valign="top">
81
- <div class="content" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
105
+ <table class="body-wrap"
106
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;"
107
+ bgcolor="#f6f6f6">
108
+ <tr
109
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
110
+ <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
111
+ valign="top"></td>
112
+ <td class="container" width="600"
113
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;"
114
+ valign="top">
115
+ <div class="content"
116
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;">
82
117
 
83
- <div style="text-align:center">
118
+ <div style="text-align:center">
119
+ <!--
84
120
  <a href="http://www.tiledesk.com" style="color:#2daae1;font-weight:bold;text-decoration:none;word-break:break-word" target="_blank">
85
121
  <img src="https://tiledesk.com/wp-content/uploads/2023/01/tiledesk_log_email_200.png" class="CToWUd">
86
122
  </a>
87
- </div>
88
- <table class="main" width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;" bgcolor="#fff">
89
-
90
- <!-- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
123
+ -->
124
+ </div>
125
+ <table class="main" width="100%" cellpadding="0" cellspacing="0"
126
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;"
127
+ bgcolor="#fff">
128
+
129
+ <!-- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
91
130
 
92
131
  </tr> -->
93
132
 
94
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
95
- <td class="content-wrap" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;" valign="top">
96
- <table width="100%" cellpadding="0" cellspacing="0" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
133
+ <tr
134
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
135
+ <td class="content-wrap"
136
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;"
137
+ valign="top">
138
+ <table width="100%" cellpadding="0" cellspacing="0"
139
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
97
140
 
98
141
 
99
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
142
+ <tr
143
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
144
+
145
+ <td class="content-block"
146
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;"
147
+ valign="top">
148
+ <h2 style="text-align: center; letter-spacing: 1px; ">
149
+ Your password has been changed
150
+ </h2>
151
+
152
+ <br>
153
+ <br<strong
154
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
155
+ Hi {{userFirstname}} {{userLastname}},</strong>
156
+
157
+ <br> <br>
158
+ The password of your Tiledesk account {{to}} was just changed.
159
+ <br><br>If this was you, then you can safely ignore this email.
160
+ <br><br>If this wasn't you please contact <a
161
+ href="mailto:info@tiledesk.com">our support
162
+ team</a>
163
+
164
+ <br><br> The Tiledesk Team
165
+ </td>
166
+ </tr>
167
+
168
+ <tr
169
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
170
+ <td class="content-block"
171
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;"
172
+ valign="top">
173
+ </td>
174
+ </tr>
175
+ </table>
176
+ </td>
177
+ </tr>
178
+
179
+ <tr>
180
+ <td>
181
+ <hr style="width:94%;height:1px;border:none;background-color: #cacaca;">
182
+
183
+ <div style="display: flex; padding: 20px 18px; color: #888888;">
184
+ <span>Powered by </span>
185
+ <span style="display: flex;"><img
186
+ src="https://panel.tiledesk.com/v3/dashboard/assets/img/logos/tiledesk-solo_logo_new_gray.svg"
187
+ width="18" height="auto" style="margin-left: 6px;" /></span>
188
+ <span style="font-weight: bold; margin-left: 2px;">Tiledesk</span>
189
+ </div>
190
+
191
+ </td>
192
+ </tr>
193
+
100
194
 
101
- <td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
102
- <h2 style="text-align: center; letter-spacing: 1px; ">
103
- Your password has been changed
104
- </h2>
105
195
 
106
- <br> <br<strong style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">Hi {{userFirstname}} {{userLastname}},</strong>
107
-
108
- <br> <br>
109
- The password of your TileDesk account {{to}} was just changed.
110
- <br><br>If this was you, then you can safely ignore this email.
111
- <br><br>If this wasn't you please contact <a href="mailto:info@tiledesk.com">our support team</a>
112
-
113
- <br><br> Team TileDesk
114
- </td>
115
- </tr>
116
-
117
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
118
- <td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
119
- </td>
120
- </tr>
121
196
  </table>
122
- </td>
123
- </tr>
124
- </table>
125
- <div class="footer" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
126
- <table width="100%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
127
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
128
- <td class="aligncenter content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;" align="center" valign="top">
129
- <span><a href="http://www.tiledesk.com" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;" > Tiledesk.com </a></span>
130
- <br><span><a href="%unsubscribe_url%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">Unsubscribe</a></span>
131
- </td>
132
- </tr>
133
- </table>
134
- </div>
135
- </div>
136
- </td>
137
- <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;" valign="top"></td>
197
+ <div class="footer"
198
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;">
199
+ <table width="100%"
200
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
201
+ <tr
202
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
203
+ <td class="aligncenter content-block"
204
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;"
205
+ align="center" valign="top">
206
+ <span><a href="http://www.tiledesk.com"
207
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">
208
+ Tiledesk.com </a></span>
209
+ <br><span><a href="%unsubscribe_url%"
210
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">Unsubscribe</a></span>
211
+ </td>
212
+ </tr>
213
+ </table>
214
+ </div>
215
+ </div>
216
+ </td>
217
+ <td style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
218
+ valign="top"></td>
138
219
  </tr>
139
220
  </table>
140
- </body>
221
+ </body>
222
+
141
223
  </html>