@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,147 +1,230 @@
1
1
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <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;">
2
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml"
3
+ style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
3
4
 
4
5
  <head>
5
- <meta name="viewport" content="width=device-width" />
6
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7
- <title>New email from TileDesk</title>
8
-
9
- <style type="text/css">
10
- img {
11
- max-width: 100%;
12
- margin-left:16px;
13
- text-align:center !important;
6
+ <meta name="viewport" content="width=device-width" />
7
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
+ <title>New email from Tiledesk</title>
9
+
10
+ <style type="text/css">
11
+ img {
12
+ max-width: 100%;
13
+ margin-left: 16px;
14
+ text-align: center !important;
15
+ }
16
+
17
+ img.CToWUd {
18
+ margin-bottom: 16px;
19
+ max-width: 200px !important;
20
+ width: 200px !important;
21
+ min-width: 200px !important;
22
+ outline: none;
23
+ text-decoration: none;
24
+ border: none;
25
+ height: auto;
26
+ margin-left: 0px;
27
+ }
28
+
29
+ body {
30
+ -webkit-font-smoothing: antialiased;
31
+ -webkit-text-size-adjust: none;
32
+ width: 100% !important;
33
+ height: 100%;
34
+ line-height: 1.6em;
35
+ }
36
+
37
+ body {
38
+ background-color: #f6f6f6;
39
+ }
40
+
41
+ @media only screen and (max-width: 640px) {
42
+ body {
43
+ padding: 0 !important;
14
44
  }
15
- img.CToWUd {
16
- margin-bottom: 16px;
17
- max-width: 200px !important;
18
- width: 200px !important;
19
- min-width: 200px !important;
20
- outline: none;
21
- text-decoration: none;
22
- border: none;
23
- height: auto;
24
- margin-left: 0px;
45
+
46
+ h1 {
47
+ font-weight: 800 !important;
48
+ margin: 20px 0 5px !important;
49
+ text-align: center !important;
25
50
  }
26
- body {
27
- -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
51
+
52
+ h2 {
53
+ font-weight: 800 !important;
54
+ margin: 20px 0 5px !important;
28
55
  }
29
- body {
30
- background-color: #f6f6f6;
56
+
57
+ h3 {
58
+ font-weight: 800 !important;
59
+ margin: 20px 0 5px !important;
60
+ }
61
+
62
+ h4 {
63
+ font-weight: 800 !important;
64
+ margin: 20px 0 5px !important;
65
+ }
66
+
67
+ h1 {
68
+ font-size: 22px !important;
69
+ }
70
+
71
+ h2 {
72
+ font-size: 18px !important;
73
+ }
74
+
75
+ h3 {
76
+ font-size: 16px !important;
77
+ }
78
+
79
+ .container {
80
+ padding: 0 !important;
81
+ width: 100% !important;
82
+ }
83
+
84
+ .content {
85
+ padding: 0 !important;
31
86
  }
32
87
 
33
- @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
- }
88
+ .content-wrap {
89
+ padding: 10px !important;
71
90
  }
72
- </style>
73
- </head>
74
-
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">
76
-
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;">
82
-
83
- <div style="text-align:center">
84
- <a href="http://www.tiledesk.com" style="color:#2daae1;font-weight:bold;text-decoration:none;word-break:break-word" target="_blank">
85
- <img src="https://tiledesk.com/wp-content/uploads/2023/01/tiledesk_log_email_200.png" class="CToWUd">
86
- </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;">
91
+
92
+ .invoice {
93
+ width: 100% !important;
94
+ }
95
+ }
96
+ </style>
97
+ </head>
98
+
99
+ <body itemscope itemtype="http://schema.org/EmailMessage"
100
+ 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;"
101
+ bgcolor="#f6f6f6">
102
+
103
+ <table class="body-wrap"
104
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;"
105
+ bgcolor="#f6f6f6">
106
+ <tr
107
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
108
+ <td
109
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
110
+ valign="top"></td>
111
+ <td class="container" width="600"
112
+ 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;"
113
+ valign="top">
114
+ <div class="content"
115
+ 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;">
116
+
117
+
118
+ <div style="text-align:center">
119
+ <!--
120
+ <a href="http://www.tiledesk.com"
121
+ style="color:#2daae1;font-weight:bold;text-decoration:none;word-break:break-word" target="_blank">
122
+ <img src="https://tiledesk.com/wp-content/uploads/2023/01/tiledesk_log_email_200.png" class="CToWUd">
123
+ </a>
124
+ -->
125
+ </div>
126
+ <table class="main" width="100%" cellpadding="0" cellspacing="0"
127
+ 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;"
128
+ bgcolor="#fff">
129
+
130
+ <!-- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
91
131
 
92
132
  </tr> -->
93
133
 
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;">
97
-
98
-
99
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
100
-
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;" valign="top">
102
- <h2 style="text-align: center; letter-spacing: 1px; font-weight: 400; line-height:24px ">
103
- {{currentUserFirstname}} {{currentUserLastname}} has invited you to the TileDesk project <strong> {{projectName}}</strong>
104
- </h2>
105
-
106
- <br> <br><strong style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">Hi {{invitedUserFirstname}} {{invitedUserLastname}},</strong>
107
-
108
- <br> <br>
109
- I invited you to take on the role of {{invitedUserRole}} of the TileDesk <strong> {{projectName}}</strong> project
110
-
111
-
112
- <div style="text-align: center;">
113
- <br><br>
114
- <a href="{{baseScope.baseUrl}}/#/project/{{id_project}}/home" style=" background-color: #ff8574 !important; border: none; color: white; padding: 12px 30px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; font-weight: 600; letter-spacing: 1px; margin: 4px 2px; cursor: pointer;">
115
- GO TO THE PROJECT
116
- </a>
117
- </div>
118
-
119
- <br><br> Team TileDesk
120
- </td>
121
- </tr>
122
-
123
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
124
- <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;" valign="top">
125
- </td>
126
- </tr>
127
- </table>
134
+ <tr
135
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
136
+ <td class="content-wrap"
137
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;"
138
+ valign="top">
139
+ <table width="100%" cellpadding="0" cellspacing="0"
140
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
141
+
142
+
143
+ <tr
144
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
145
+
146
+ <td class="content-block"
147
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
148
+ valign="top">
149
+ <h2 style="text-align: center; letter-spacing: 1px; font-weight: 400; line-height:24px ">
150
+ {{currentUserFirstname}} {{currentUserLastname}} has invited you to the Tiledesk project
151
+ <strong> {{projectName}}</strong>
152
+ </h2>
153
+
154
+ <br> <br><strong
155
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">Hi
156
+ {{invitedUserFirstname}} {{invitedUserLastname}},</strong>
157
+
158
+ <br> <br>
159
+ I invited you to take on the role of {{invitedUserRole}} of the Tiledesk <strong>
160
+ {{projectName}}</strong> project
161
+
162
+
163
+ <div style="text-align: center;">
164
+ <br><br>
165
+ <a href="{{baseScope.baseUrl}}/#/project/{{id_project}}/home"
166
+ style=" background-color: #ff8574 !important; border: none; color: white; padding: 12px 30px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; font-weight: 600; letter-spacing: 1px; margin: 4px 2px; cursor: pointer;">
167
+ GO TO THE PROJECT
168
+ </a>
169
+ </div>
170
+
171
+ <br><br> The Tiledesk Team
172
+ </td>
173
+ </tr>
174
+
175
+ <tr
176
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
177
+ <td class="content-block"
178
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
179
+ valign="top">
180
+ </td>
181
+ </tr>
182
+ </table>
183
+ </td>
184
+ </tr>
185
+
186
+ <tr>
187
+ <td>
188
+ <hr style="width:94%;height:1px;border:none;background-color: #cacaca;">
189
+
190
+ <div style="display: flex; padding: 20px 18px; color: #888888;">
191
+ <span>Powered by </span>
192
+ <span style="display: flex;"><img
193
+ src="https://panel.tiledesk.com/v3/dashboard/assets/img/logos/tiledesk-solo_logo_new_gray.svg"
194
+ width="18" height="auto" style="margin-left: 6px;" /></span>
195
+ <span style="font-weight: bold; margin-left: 2px;">Tiledesk</span>
196
+ </div>
197
+
198
+ </td>
199
+ </tr>
200
+
201
+
202
+ </table>
203
+ <div class="footer"
204
+ 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;">
205
+ <table width="100%"
206
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
207
+ <tr
208
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
209
+ <td class="aligncenter content-block"
210
+ 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;"
211
+ align="center" valign="top">
212
+ <span><a href="http://www.tiledesk.com"
213
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;">
214
+ Tiledesk.com </a></span>
215
+ <br><span><a href="%unsubscribe_url%"
216
+ 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>
128
217
  </td>
129
218
  </tr>
130
219
  </table>
131
- <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;">
132
- <table width="100%" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
133
- <tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
134
- <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;" align="center" valign="top">
135
- <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>
136
- <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>
137
- </td>
138
- </tr>
139
- </table>
140
- </div>
141
220
  </div>
142
- </td>
143
- <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>
144
- </tr>
145
- </table>
146
- </body>
221
+ </div>
222
+ </td>
223
+ <td
224
+ style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;"
225
+ valign="top"></td>
226
+ </tr>
227
+ </table>
228
+ </body>
229
+
147
230
  </html>