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