@heliyos/heliyos-api-core 1.0.57 → 1.0.59

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.
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -61,58 +60,98 @@
61
60
  }
62
61
 
63
62
  .section {
64
- margin: 24px 0;
65
- padding: 20px;
66
- background-color: #f5f2e9;
67
- border-radius: 8px;
68
- border-left: 4px solid #7c3aed;
63
+ margin: 20px 0;
64
+ padding: 0;
65
+ background-color: transparent;
66
+ border-radius: 0;
67
+ border-left: none;
69
68
  }
70
69
 
71
70
  .section-header {
72
71
  display: flex;
73
72
  justify-content: space-between;
74
73
  align-items: center;
75
- margin-bottom: 16px;
74
+ margin-bottom: 12px;
75
+ padding-bottom: 8px;
76
+ border-bottom: 1px solid #e5e7eb;
76
77
  }
77
78
 
78
79
  .section-title {
79
- font-size: 18px;
80
+ font-size: 16px;
80
81
  font-weight: bold;
81
- color: #0e0d0c;
82
+ color: #111827;
82
83
  margin: 0;
83
84
  }
84
85
 
85
86
  .section-count {
86
- background-color: #7c3aed;
87
- color: #ffffff;
88
- padding: 4px 12px;
89
- border-radius: 12px;
90
- font-size: 12px;
87
+ background-color: #f3f0ff;
88
+ color: #7c3aed;
89
+ padding: 2px 8px;
90
+ border-radius: 4px;
91
+ font-size: 11px;
91
92
  font-weight: bold;
92
93
  }
93
94
 
94
95
  .section-content {
95
- color: #2c2721;
96
- line-height: 1.8;
96
+ color: #374151;
97
97
  }
98
98
 
99
99
  .item {
100
- margin: 12px 0;
101
- padding: 12px;
102
- background-color: #ffffff;
103
- border-radius: 6px;
104
- border-left: 2px solid #ebe7db;
100
+ margin: 0;
101
+ padding: 12px 0;
102
+ background-color: transparent;
103
+ border-radius: 0;
104
+ border: none;
105
+ border-bottom: 1px solid #f3f4f6;
106
+ }
107
+
108
+ .item:last-child {
109
+ border-bottom: none;
105
110
  }
106
111
 
107
112
  .item-title {
108
- font-weight: bold;
109
- color: #0e0d0c;
110
- margin-bottom: 4px;
113
+ font-weight: 600;
114
+ color: #111827;
115
+ font-size: 14px;
116
+ margin-bottom: 2px;
111
117
  }
112
118
 
113
119
  .item-meta {
114
- font-size: 13px;
115
- color: #5c5545;
120
+ font-size: 12px;
121
+ color: #6b7280;
122
+ }
123
+
124
+ .item-details {
125
+ margin-top: 8px;
126
+ background-color: #f9fafb;
127
+ border-radius: 6px;
128
+ padding: 8px 12px;
129
+ }
130
+
131
+ .detail-table {
132
+ width: 100%;
133
+ border-collapse: collapse;
134
+ }
135
+
136
+ .detail-cell {
137
+ padding-right: 12px;
138
+ vertical-align: top;
139
+ }
140
+
141
+ .detail-label {
142
+ font-size: 10px;
143
+ color: #6b7280;
144
+ text-transform: uppercase;
145
+ font-weight: bold;
146
+ }
147
+
148
+ .detail-value {
149
+ font-size: 12px;
150
+ color: #374151;
151
+ }
152
+
153
+ .item-link {
154
+ margin-top: 10px;
116
155
  }
117
156
 
118
157
  .org-summary-box {
@@ -162,15 +201,15 @@
162
201
  }
163
202
 
164
203
  .footer {
165
- background-color: #ebe7db;
204
+ background-color: #7c3aed;
166
205
  padding: 20px;
167
206
  text-align: center;
168
207
  font-size: 12px;
169
- color: #5c5545;
208
+ color: #ffffff;
170
209
  }
171
210
 
172
211
  .footer a {
173
- color: #1c6bba;
212
+ color: #ffffff;
174
213
  text-decoration: none;
175
214
  }
176
215
 
@@ -191,7 +230,7 @@
191
230
  </div>
192
231
  <div class="content">
193
232
  <div class="greeting">
194
- Hello,<br>
233
+ Hello {{first_name}},<br>
195
234
  Here's your daily summary of activities in your Heliyos workspace.
196
235
  </div>
197
236
 
@@ -211,8 +250,38 @@
211
250
  <div class="section-content">
212
251
  {{#each tasks}}
213
252
  <div class="item">
214
- <div class="item-title">{{this.title}}</div>
215
- <div class="item-meta">{{this.type}} • {{this.actor}} • {{this.time}}</div>
253
+ <table style="width: 100%; border-collapse: collapse;">
254
+ <tr>
255
+ <td>
256
+ <div class="item-title">{{this.title}}</div>
257
+ <div class="item-meta">
258
+ <span style="color: #7c3aed; font-weight: 600;">{{this.type}}</span> • {{this.actor}}
259
+ </div>
260
+ </td>
261
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
262
+ {{this.time}}
263
+ </td>
264
+ </tr>
265
+ </table>
266
+ {{#if this.details}}
267
+ <div class="item-details">
268
+ <table class="detail-table">
269
+ <tr>
270
+ {{#each this.details}}
271
+ <td class="detail-cell">
272
+ <div class="detail-label">{{this.label}}</div>
273
+ <div class="detail-value">{{this.value}}</div>
274
+ </td>
275
+ {{/each}}
276
+ </tr>
277
+ </table>
278
+ </div>
279
+ {{/if}}
280
+ {{#if this.view_url}}
281
+ <div style="margin-top: 6px;">
282
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
283
+ </div>
284
+ {{/if}}
216
285
  </div>
217
286
  {{/each}}
218
287
  </div>
@@ -231,8 +300,38 @@
231
300
  <div class="section-content">
232
301
  {{#each deals}}
233
302
  <div class="item">
234
- <div class="item-title">{{this.title}}</div>
235
- <div class="item-meta">{{this.type}} • {{this.actor}} • {{this.time}}</div>
303
+ <table style="width: 100%; border-collapse: collapse;">
304
+ <tr>
305
+ <td>
306
+ <div class="item-title">{{this.title}}</div>
307
+ <div class="item-meta">
308
+ <span style="color: #7c3aed; font-weight: 600;">{{this.type}}</span> • {{this.actor}}
309
+ </div>
310
+ </td>
311
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
312
+ {{this.time}}
313
+ </td>
314
+ </tr>
315
+ </table>
316
+ {{#if this.details}}
317
+ <div class="item-details">
318
+ <table class="detail-table">
319
+ <tr>
320
+ {{#each this.details}}
321
+ <td class="detail-cell">
322
+ <div class="detail-label">{{this.label}}</div>
323
+ <div class="detail-value">{{this.value}}</div>
324
+ </td>
325
+ {{/each}}
326
+ </tr>
327
+ </table>
328
+ </div>
329
+ {{/if}}
330
+ {{#if this.view_url}}
331
+ <div style="margin-top: 6px;">
332
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
333
+ </div>
334
+ {{/if}}
236
335
  </div>
237
336
  {{/each}}
238
337
  </div>
@@ -251,8 +350,38 @@
251
350
  <div class="section-content">
252
351
  {{#each approvals}}
253
352
  <div class="item">
254
- <div class="item-title">{{this.title}}</div>
255
- <div class="item-meta">{{this.status}} • {{this.actor}} • {{this.time}}</div>
353
+ <table style="width: 100%; border-collapse: collapse;">
354
+ <tr>
355
+ <td>
356
+ <div class="item-title">{{this.title}}</div>
357
+ <div class="item-meta">
358
+ <span style="color: #7c3aed; font-weight: 600;">{{this.status}}</span> • {{this.actor}}
359
+ </div>
360
+ </td>
361
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
362
+ {{this.time}}
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ {{#if this.details}}
367
+ <div class="item-details">
368
+ <table class="detail-table">
369
+ <tr>
370
+ {{#each this.details}}
371
+ <td class="detail-cell">
372
+ <div class="detail-label">{{this.label}}</div>
373
+ <div class="detail-value">{{this.value}}</div>
374
+ </td>
375
+ {{/each}}
376
+ </tr>
377
+ </table>
378
+ </div>
379
+ {{/if}}
380
+ {{#if this.view_url}}
381
+ <div style="margin-top: 6px;">
382
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
383
+ </div>
384
+ {{/if}}
256
385
  </div>
257
386
  {{/each}}
258
387
  </div>
@@ -271,8 +400,35 @@
271
400
  <div class="section-content">
272
401
  {{#each leadsets}}
273
402
  <div class="item">
274
- <div class="item-title">{{this.title}}</div>
275
- <div class="item-meta">{{this.records_count}} records available • {{this.time}}</div>
403
+ <table style="width: 100%; border-collapse: collapse;">
404
+ <tr>
405
+ <td>
406
+ <div class="item-title">{{this.title}}</div>
407
+ <div class="item-meta">
408
+ <span style="color: #7c3aed; font-weight: 600;">{{this.records_count}} records</span> • {{this.time}}
409
+ </div>
410
+ </td>
411
+ </tr>
412
+ </table>
413
+ {{#if this.details}}
414
+ <div class="item-details">
415
+ <table class="detail-table">
416
+ <tr>
417
+ {{#each this.details}}
418
+ <td class="detail-cell">
419
+ <div class="detail-label">{{this.label}}</div>
420
+ <div class="detail-value">{{this.value}}</div>
421
+ </td>
422
+ {{/each}}
423
+ </tr>
424
+ </table>
425
+ </div>
426
+ {{/if}}
427
+ {{#if this.view_url}}
428
+ <div style="margin-top: 6px;">
429
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
430
+ </div>
431
+ {{/if}}
276
432
  </div>
277
433
  {{/each}}
278
434
  </div>
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -41,44 +40,68 @@
41
40
  }
42
41
 
43
42
  .event-card {
44
- background-color: #f5f2e9;
45
- border-left: 4px solid #7c3aed;
43
+ background-color: #ffffff;
44
+ border: 1px solid #e5e7eb;
46
45
  border-radius: 8px;
47
- padding: 20px;
48
- margin: 20px 0;
46
+ padding: 16px;
47
+ margin: 16px 0;
49
48
  }
50
49
 
51
50
  .event-badge {
52
51
  display: inline-block;
53
- background-color: #7c3aed;
54
- color: #ffffff;
55
- padding: 6px 12px;
56
- border-radius: 20px;
57
- font-size: 12px;
52
+ background-color: #f3f0ff;
53
+ color: #7c3aed;
54
+ padding: 4px 8px;
55
+ border-radius: 4px;
56
+ font-size: 11px;
58
57
  font-weight: bold;
59
58
  text-transform: uppercase;
60
- margin-bottom: 12px;
59
+ margin-bottom: 8px;
61
60
  }
62
61
 
63
62
  .event-title {
64
- font-size: 20px;
63
+ font-size: 18px;
65
64
  font-weight: bold;
66
- color: #0e0d0c;
67
- margin: 10px 0;
65
+ color: #111827;
66
+ margin: 0 0 12px 0;
68
67
  }
69
68
 
70
- .event-summary {
71
- color: #2c2721;
72
- margin: 12px 0;
73
- line-height: 1.6;
69
+ .event-details {
70
+ margin-top: 12px;
71
+ background-color: #f9fafb;
72
+ border-radius: 6px;
73
+ padding: 12px;
74
+ }
75
+
76
+ .detail-table {
77
+ width: 100%;
78
+ border-collapse: collapse;
79
+ }
80
+
81
+ .detail-label {
82
+ font-size: 11px;
83
+ color: #6b7280;
84
+ text-transform: uppercase;
85
+ font-weight: bold;
86
+ margin-bottom: 2px;
87
+ }
88
+
89
+ .detail-value {
90
+ font-size: 13px;
91
+ color: #111827;
92
+ }
93
+
94
+ .detail-cell {
95
+ padding-right: 16px;
96
+ vertical-align: top;
74
97
  }
75
98
 
76
99
  .event-meta {
77
100
  margin-top: 16px;
78
- padding-top: 16px;
79
- border-top: 1px solid #ebe7db;
80
- font-size: 14px;
81
- color: #5c5545;
101
+ padding-top: 12px;
102
+ border-top: 1px solid #f3f4f6;
103
+ font-size: 12px;
104
+ color: #6b7280;
82
105
  }
83
106
 
84
107
  .event-meta strong {
@@ -107,15 +130,15 @@
107
130
  }
108
131
 
109
132
  .footer {
110
- background-color: #ebe7db;
133
+ background-color: #7c3aed;
111
134
  padding: 20px;
112
135
  text-align: center;
113
136
  font-size: 12px;
114
- color: #5c5545;
137
+ color: #ffffff;
115
138
  }
116
139
 
117
140
  .footer a {
118
- color: #1c6bba;
141
+ color: #ffffff;
119
142
  text-decoration: none;
120
143
  }
121
144
  </style>
@@ -127,16 +150,28 @@
127
150
  <img src="https://assets.heliyos.ai/heliyos-logo-white.png" alt="Heliyos AI">
128
151
  </div>
129
152
  <div class="content">
130
- <p>Hello,</p>
153
+ <p>Hello {{first_name}},</p>
131
154
  <p>You have a new update in your Heliyos workspace:</p>
132
155
 
133
156
  <div class="event-card">
134
157
  <div class="event-badge">{{event_type_label}}</div>
135
158
  <div class="event-title">{{object_name}}</div>
136
- <div class="event-summary">{{summary}}</div>
159
+ {{#if details}}
160
+ <div class="event-details">
161
+ <table class="detail-table">
162
+ <tr>
163
+ {{#each details}}
164
+ <td class="detail-cell">
165
+ <div class="detail-label">{{this.label}}</div>
166
+ <div class="detail-value">{{this.value}}</div>
167
+ </td>
168
+ {{/each}}
169
+ </tr>
170
+ </table>
171
+ </div>
172
+ {{/if}}
137
173
  <div class="event-meta">
138
- <strong>By:</strong> {{actor_name}}<br>
139
- <strong>When:</strong> {{timestamp}}
174
+ <strong>By:</strong> {{actor_name}}<strong>When:</strong> {{timestamp}}
140
175
  </div>
141
176
  </div>
142
177
 
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -80,7 +79,7 @@
80
79
  </div>
81
80
  <div class="content">
82
81
  <h2 style="margin-top: 0; color: #0e0d0c;">Confirm Your Email Address</h2>
83
- <p>Hello,</p>
82
+ <p>Hello {{first_name}},</p>
84
83
  <p>Thank you for signing up for Heliyos AI! To complete your registration and verify your email address, please click the
85
84
  button below:</p>
86
85
  <p style="text-align: center;">
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
package/dist/resend.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare const resendSendEmail: (to: string[], templateId: string, dynamicTemplateData: object, subject: string) => Promise<import("resend").CreateEmailResponse>;
1
+ export declare const resendSendEmail: (to: string[], templateId: string, dynamicTemplateData: object, subject: string) => Promise<import("resend").CreateEmailResponse | {
2
+ data: any;
3
+ error: Error;
4
+ }>;
package/dist/resend.js CHANGED
@@ -12,17 +12,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.resendSendEmail = void 0;
13
13
  const resend_1 = require("resend");
14
14
  const email_1 = require("./email");
15
+ const mongoose_1 = require("./mongoose");
16
+ const logger_1 = require("./logger");
15
17
  // eslint-disable-next-line import/prefer-default-export
16
18
  const resendSendEmail = (to, templateId, dynamicTemplateData, subject) => __awaiter(void 0, void 0, void 0, function* () {
17
19
  const resend = new resend_1.Resend(process.env.RESEND_API_KEY);
18
20
  const from = process.env.RESEND_FROM_RECIPIENT || "";
19
- const message = {
20
- to,
21
- from,
22
- subject,
23
- html: (0, email_1.getEmailTemplate)(templateId, dynamicTemplateData),
24
- };
25
- const response = yield resend.emails.send(message);
26
- return response;
21
+ // If there are multiple recipients, we send individual emails to ensure personalized salutations
22
+ const sendIndividualEmail = (email) => __awaiter(void 0, void 0, void 0, function* () {
23
+ let firstName = dynamicTemplateData.first_name ||
24
+ dynamicTemplateData.firstName;
25
+ // Try to extract from fullName if available in data but firstName isn't
26
+ if (!firstName && dynamicTemplateData.fullName) {
27
+ firstName = dynamicTemplateData.fullName.split(" ")[0];
28
+ }
29
+ else if (!firstName && dynamicTemplateData.name) {
30
+ firstName = dynamicTemplateData.name.split(" ")[0];
31
+ }
32
+ if (!firstName) {
33
+ try {
34
+ // Access the User model if it's already registered on the connection
35
+ const UserModel = mongoose_1.mongooseConnection.models.User;
36
+ if (UserModel) {
37
+ const user = yield UserModel.findOne({ email })
38
+ .select("firstName")
39
+ .lean();
40
+ if (user && user.firstName) {
41
+ firstName = user.firstName;
42
+ }
43
+ }
44
+ // If still no firstName, use the part before @ as requested
45
+ if (!firstName) {
46
+ firstName = email.split("@")[0];
47
+ }
48
+ }
49
+ catch (error) {
50
+ // Fallback to email prefix on any error
51
+ firstName = email.split("@")[0];
52
+ }
53
+ }
54
+ const message = {
55
+ to: [email],
56
+ from,
57
+ subject,
58
+ html: (0, email_1.getEmailTemplate)(templateId, Object.assign(Object.assign({}, dynamicTemplateData), { first_name: firstName,
59
+ // For templates that might still use fullName or name
60
+ fullName: dynamicTemplateData.fullName || firstName, name: dynamicTemplateData.name || firstName })),
61
+ };
62
+ return resend.emails.send(message);
63
+ });
64
+ try {
65
+ if (to.length > 1) {
66
+ // Send emails in parallel but return the first response or a combined summary
67
+ const responses = yield Promise.all(to.map(sendIndividualEmail));
68
+ return responses[0];
69
+ }
70
+ else if (to.length === 1) {
71
+ return yield sendIndividualEmail(to[0]);
72
+ }
73
+ return { data: null, error: new Error("No recipients provided") };
74
+ }
75
+ catch (error) {
76
+ logger_1.logger.error("Error in resendSendEmail:", error);
77
+ throw error;
78
+ }
27
79
  });
28
80
  exports.resendSendEmail = resendSendEmail;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heliyos/heliyos-api-core",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "Heliyos's core api functions and middlewares. Its a private package hosted on npm.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -61,58 +60,98 @@
61
60
  }
62
61
 
63
62
  .section {
64
- margin: 24px 0;
65
- padding: 20px;
66
- background-color: #f5f2e9;
67
- border-radius: 8px;
68
- border-left: 4px solid #7c3aed;
63
+ margin: 20px 0;
64
+ padding: 0;
65
+ background-color: transparent;
66
+ border-radius: 0;
67
+ border-left: none;
69
68
  }
70
69
 
71
70
  .section-header {
72
71
  display: flex;
73
72
  justify-content: space-between;
74
73
  align-items: center;
75
- margin-bottom: 16px;
74
+ margin-bottom: 12px;
75
+ padding-bottom: 8px;
76
+ border-bottom: 1px solid #e5e7eb;
76
77
  }
77
78
 
78
79
  .section-title {
79
- font-size: 18px;
80
+ font-size: 16px;
80
81
  font-weight: bold;
81
- color: #0e0d0c;
82
+ color: #111827;
82
83
  margin: 0;
83
84
  }
84
85
 
85
86
  .section-count {
86
- background-color: #7c3aed;
87
- color: #ffffff;
88
- padding: 4px 12px;
89
- border-radius: 12px;
90
- font-size: 12px;
87
+ background-color: #f3f0ff;
88
+ color: #7c3aed;
89
+ padding: 2px 8px;
90
+ border-radius: 4px;
91
+ font-size: 11px;
91
92
  font-weight: bold;
92
93
  }
93
94
 
94
95
  .section-content {
95
- color: #2c2721;
96
- line-height: 1.8;
96
+ color: #374151;
97
97
  }
98
98
 
99
99
  .item {
100
- margin: 12px 0;
101
- padding: 12px;
102
- background-color: #ffffff;
103
- border-radius: 6px;
104
- border-left: 2px solid #ebe7db;
100
+ margin: 0;
101
+ padding: 12px 0;
102
+ background-color: transparent;
103
+ border-radius: 0;
104
+ border: none;
105
+ border-bottom: 1px solid #f3f4f6;
106
+ }
107
+
108
+ .item:last-child {
109
+ border-bottom: none;
105
110
  }
106
111
 
107
112
  .item-title {
108
- font-weight: bold;
109
- color: #0e0d0c;
110
- margin-bottom: 4px;
113
+ font-weight: 600;
114
+ color: #111827;
115
+ font-size: 14px;
116
+ margin-bottom: 2px;
111
117
  }
112
118
 
113
119
  .item-meta {
114
- font-size: 13px;
115
- color: #5c5545;
120
+ font-size: 12px;
121
+ color: #6b7280;
122
+ }
123
+
124
+ .item-details {
125
+ margin-top: 8px;
126
+ background-color: #f9fafb;
127
+ border-radius: 6px;
128
+ padding: 8px 12px;
129
+ }
130
+
131
+ .detail-table {
132
+ width: 100%;
133
+ border-collapse: collapse;
134
+ }
135
+
136
+ .detail-cell {
137
+ padding-right: 12px;
138
+ vertical-align: top;
139
+ }
140
+
141
+ .detail-label {
142
+ font-size: 10px;
143
+ color: #6b7280;
144
+ text-transform: uppercase;
145
+ font-weight: bold;
146
+ }
147
+
148
+ .detail-value {
149
+ font-size: 12px;
150
+ color: #374151;
151
+ }
152
+
153
+ .item-link {
154
+ margin-top: 10px;
116
155
  }
117
156
 
118
157
  .org-summary-box {
@@ -162,15 +201,15 @@
162
201
  }
163
202
 
164
203
  .footer {
165
- background-color: #ebe7db;
204
+ background-color: #7c3aed;
166
205
  padding: 20px;
167
206
  text-align: center;
168
207
  font-size: 12px;
169
- color: #5c5545;
208
+ color: #ffffff;
170
209
  }
171
210
 
172
211
  .footer a {
173
- color: #1c6bba;
212
+ color: #ffffff;
174
213
  text-decoration: none;
175
214
  }
176
215
 
@@ -191,7 +230,7 @@
191
230
  </div>
192
231
  <div class="content">
193
232
  <div class="greeting">
194
- Hello,<br>
233
+ Hello {{first_name}},<br>
195
234
  Here's your daily summary of activities in your Heliyos workspace.
196
235
  </div>
197
236
 
@@ -211,8 +250,38 @@
211
250
  <div class="section-content">
212
251
  {{#each tasks}}
213
252
  <div class="item">
214
- <div class="item-title">{{this.title}}</div>
215
- <div class="item-meta">{{this.type}} • {{this.actor}} • {{this.time}}</div>
253
+ <table style="width: 100%; border-collapse: collapse;">
254
+ <tr>
255
+ <td>
256
+ <div class="item-title">{{this.title}}</div>
257
+ <div class="item-meta">
258
+ <span style="color: #7c3aed; font-weight: 600;">{{this.type}}</span> • {{this.actor}}
259
+ </div>
260
+ </td>
261
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
262
+ {{this.time}}
263
+ </td>
264
+ </tr>
265
+ </table>
266
+ {{#if this.details}}
267
+ <div class="item-details">
268
+ <table class="detail-table">
269
+ <tr>
270
+ {{#each this.details}}
271
+ <td class="detail-cell">
272
+ <div class="detail-label">{{this.label}}</div>
273
+ <div class="detail-value">{{this.value}}</div>
274
+ </td>
275
+ {{/each}}
276
+ </tr>
277
+ </table>
278
+ </div>
279
+ {{/if}}
280
+ {{#if this.view_url}}
281
+ <div style="margin-top: 6px;">
282
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
283
+ </div>
284
+ {{/if}}
216
285
  </div>
217
286
  {{/each}}
218
287
  </div>
@@ -231,8 +300,38 @@
231
300
  <div class="section-content">
232
301
  {{#each deals}}
233
302
  <div class="item">
234
- <div class="item-title">{{this.title}}</div>
235
- <div class="item-meta">{{this.type}} • {{this.actor}} • {{this.time}}</div>
303
+ <table style="width: 100%; border-collapse: collapse;">
304
+ <tr>
305
+ <td>
306
+ <div class="item-title">{{this.title}}</div>
307
+ <div class="item-meta">
308
+ <span style="color: #7c3aed; font-weight: 600;">{{this.type}}</span> • {{this.actor}}
309
+ </div>
310
+ </td>
311
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
312
+ {{this.time}}
313
+ </td>
314
+ </tr>
315
+ </table>
316
+ {{#if this.details}}
317
+ <div class="item-details">
318
+ <table class="detail-table">
319
+ <tr>
320
+ {{#each this.details}}
321
+ <td class="detail-cell">
322
+ <div class="detail-label">{{this.label}}</div>
323
+ <div class="detail-value">{{this.value}}</div>
324
+ </td>
325
+ {{/each}}
326
+ </tr>
327
+ </table>
328
+ </div>
329
+ {{/if}}
330
+ {{#if this.view_url}}
331
+ <div style="margin-top: 6px;">
332
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
333
+ </div>
334
+ {{/if}}
236
335
  </div>
237
336
  {{/each}}
238
337
  </div>
@@ -251,8 +350,38 @@
251
350
  <div class="section-content">
252
351
  {{#each approvals}}
253
352
  <div class="item">
254
- <div class="item-title">{{this.title}}</div>
255
- <div class="item-meta">{{this.status}} • {{this.actor}} • {{this.time}}</div>
353
+ <table style="width: 100%; border-collapse: collapse;">
354
+ <tr>
355
+ <td>
356
+ <div class="item-title">{{this.title}}</div>
357
+ <div class="item-meta">
358
+ <span style="color: #7c3aed; font-weight: 600;">{{this.status}}</span> • {{this.actor}}
359
+ </div>
360
+ </td>
361
+ <td style="text-align: right; vertical-align: top; font-size: 11px; color: #9ca3af;">
362
+ {{this.time}}
363
+ </td>
364
+ </tr>
365
+ </table>
366
+ {{#if this.details}}
367
+ <div class="item-details">
368
+ <table class="detail-table">
369
+ <tr>
370
+ {{#each this.details}}
371
+ <td class="detail-cell">
372
+ <div class="detail-label">{{this.label}}</div>
373
+ <div class="detail-value">{{this.value}}</div>
374
+ </td>
375
+ {{/each}}
376
+ </tr>
377
+ </table>
378
+ </div>
379
+ {{/if}}
380
+ {{#if this.view_url}}
381
+ <div style="margin-top: 6px;">
382
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
383
+ </div>
384
+ {{/if}}
256
385
  </div>
257
386
  {{/each}}
258
387
  </div>
@@ -271,8 +400,35 @@
271
400
  <div class="section-content">
272
401
  {{#each leadsets}}
273
402
  <div class="item">
274
- <div class="item-title">{{this.title}}</div>
275
- <div class="item-meta">{{this.records_count}} records available • {{this.time}}</div>
403
+ <table style="width: 100%; border-collapse: collapse;">
404
+ <tr>
405
+ <td>
406
+ <div class="item-title">{{this.title}}</div>
407
+ <div class="item-meta">
408
+ <span style="color: #7c3aed; font-weight: 600;">{{this.records_count}} records</span> • {{this.time}}
409
+ </div>
410
+ </td>
411
+ </tr>
412
+ </table>
413
+ {{#if this.details}}
414
+ <div class="item-details">
415
+ <table class="detail-table">
416
+ <tr>
417
+ {{#each this.details}}
418
+ <td class="detail-cell">
419
+ <div class="detail-label">{{this.label}}</div>
420
+ <div class="detail-value">{{this.value}}</div>
421
+ </td>
422
+ {{/each}}
423
+ </tr>
424
+ </table>
425
+ </div>
426
+ {{/if}}
427
+ {{#if this.view_url}}
428
+ <div style="margin-top: 6px;">
429
+ <a href="{{this.view_url}}" style="font-size: 11px; color: #7c3aed; text-decoration: none; font-weight: bold;">View Details →</a>
430
+ </div>
431
+ {{/if}}
276
432
  </div>
277
433
  {{/each}}
278
434
  </div>
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -41,44 +40,68 @@
41
40
  }
42
41
 
43
42
  .event-card {
44
- background-color: #f5f2e9;
45
- border-left: 4px solid #7c3aed;
43
+ background-color: #ffffff;
44
+ border: 1px solid #e5e7eb;
46
45
  border-radius: 8px;
47
- padding: 20px;
48
- margin: 20px 0;
46
+ padding: 16px;
47
+ margin: 16px 0;
49
48
  }
50
49
 
51
50
  .event-badge {
52
51
  display: inline-block;
53
- background-color: #7c3aed;
54
- color: #ffffff;
55
- padding: 6px 12px;
56
- border-radius: 20px;
57
- font-size: 12px;
52
+ background-color: #f3f0ff;
53
+ color: #7c3aed;
54
+ padding: 4px 8px;
55
+ border-radius: 4px;
56
+ font-size: 11px;
58
57
  font-weight: bold;
59
58
  text-transform: uppercase;
60
- margin-bottom: 12px;
59
+ margin-bottom: 8px;
61
60
  }
62
61
 
63
62
  .event-title {
64
- font-size: 20px;
63
+ font-size: 18px;
65
64
  font-weight: bold;
66
- color: #0e0d0c;
67
- margin: 10px 0;
65
+ color: #111827;
66
+ margin: 0 0 12px 0;
68
67
  }
69
68
 
70
- .event-summary {
71
- color: #2c2721;
72
- margin: 12px 0;
73
- line-height: 1.6;
69
+ .event-details {
70
+ margin-top: 12px;
71
+ background-color: #f9fafb;
72
+ border-radius: 6px;
73
+ padding: 12px;
74
+ }
75
+
76
+ .detail-table {
77
+ width: 100%;
78
+ border-collapse: collapse;
79
+ }
80
+
81
+ .detail-label {
82
+ font-size: 11px;
83
+ color: #6b7280;
84
+ text-transform: uppercase;
85
+ font-weight: bold;
86
+ margin-bottom: 2px;
87
+ }
88
+
89
+ .detail-value {
90
+ font-size: 13px;
91
+ color: #111827;
92
+ }
93
+
94
+ .detail-cell {
95
+ padding-right: 16px;
96
+ vertical-align: top;
74
97
  }
75
98
 
76
99
  .event-meta {
77
100
  margin-top: 16px;
78
- padding-top: 16px;
79
- border-top: 1px solid #ebe7db;
80
- font-size: 14px;
81
- color: #5c5545;
101
+ padding-top: 12px;
102
+ border-top: 1px solid #f3f4f6;
103
+ font-size: 12px;
104
+ color: #6b7280;
82
105
  }
83
106
 
84
107
  .event-meta strong {
@@ -107,15 +130,15 @@
107
130
  }
108
131
 
109
132
  .footer {
110
- background-color: #ebe7db;
133
+ background-color: #7c3aed;
111
134
  padding: 20px;
112
135
  text-align: center;
113
136
  font-size: 12px;
114
- color: #5c5545;
137
+ color: #ffffff;
115
138
  }
116
139
 
117
140
  .footer a {
118
- color: #1c6bba;
141
+ color: #ffffff;
119
142
  text-decoration: none;
120
143
  }
121
144
  </style>
@@ -127,16 +150,28 @@
127
150
  <img src="https://assets.heliyos.ai/heliyos-logo-white.png" alt="Heliyos AI">
128
151
  </div>
129
152
  <div class="content">
130
- <p>Hello,</p>
153
+ <p>Hello {{first_name}},</p>
131
154
  <p>You have a new update in your Heliyos workspace:</p>
132
155
 
133
156
  <div class="event-card">
134
157
  <div class="event-badge">{{event_type_label}}</div>
135
158
  <div class="event-title">{{object_name}}</div>
136
- <div class="event-summary">{{summary}}</div>
159
+ {{#if details}}
160
+ <div class="event-details">
161
+ <table class="detail-table">
162
+ <tr>
163
+ {{#each details}}
164
+ <td class="detail-cell">
165
+ <div class="detail-label">{{this.label}}</div>
166
+ <div class="detail-value">{{this.value}}</div>
167
+ </td>
168
+ {{/each}}
169
+ </tr>
170
+ </table>
171
+ </div>
172
+ {{/if}}
137
173
  <div class="event-meta">
138
- <strong>By:</strong> {{actor_name}}<br>
139
- <strong>When:</strong> {{timestamp}}
174
+ <strong>By:</strong> {{actor_name}}<strong>When:</strong> {{timestamp}}
140
175
  </div>
141
176
  </div>
142
177
 
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {
@@ -80,7 +79,7 @@
80
79
  </div>
81
80
  <div class="content">
82
81
  <h2 style="margin-top: 0; color: #0e0d0c;">Confirm Your Email Address</h2>
83
- <p>Hello,</p>
82
+ <p>Hello {{first_name}},</p>
84
83
  <p>Thank you for signing up for Heliyos AI! To complete your registration and verify your email address, please click the
85
84
  button below:</p>
86
85
  <p style="text-align: center;">
@@ -21,7 +21,6 @@
21
21
  background-color: #ffffff;
22
22
  border-radius: 12px;
23
23
  overflow: hidden;
24
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
25
24
  }
26
25
 
27
26
  .header {