emailengine-app 2.88.0 → 2.90.0
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/.ncurc.js +36 -45
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +58 -0
- package/Dockerfile +5 -1
- package/bin/healthcheck.js +1 -1
- package/copy-static-files.sh +0 -8
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +1 -4
- package/lib/account/field-codec.js +396 -0
- package/lib/account.js +158 -453
- package/lib/api-routes/account-routes.js +42 -6
- package/lib/api-routes/route-metadata.js +5 -2
- package/lib/api-routes/submit-routes.js +15 -2
- package/lib/api-token-auth.js +342 -274
- package/lib/arf-detect.js +174 -149
- package/lib/attachment-size.js +29 -0
- package/lib/autodetect-imap-settings.js +83 -234
- package/lib/consts.js +1 -5
- package/lib/db.js +1 -4
- package/lib/email-client/base-client.js +907 -780
- package/lib/email-client/gmail-client.js +557 -450
- package/lib/email-client/imap/cid-parts.js +61 -0
- package/lib/email-client/imap/mailbox.js +376 -422
- package/lib/email-client/imap/sync-operations.js +239 -178
- package/lib/email-client/new-message-steps.js +168 -2
- package/lib/email-client/outlook/graph-message.js +266 -0
- package/lib/email-client/outlook/subscription-expiry.js +30 -0
- package/lib/email-client/outlook-client.js +652 -808
- package/lib/get-raw-email.js +338 -232
- package/lib/get-secret.js +1 -4
- package/lib/license-subscription.js +77 -11
- package/lib/load-env.js +48 -0
- package/lib/logger.js +1 -4
- package/lib/mcp/tools.js +244 -207
- package/lib/metric-values.js +76 -0
- package/lib/metrics.js +320 -0
- package/lib/node-version.js +99 -12
- package/lib/oauth/gmail.js +39 -120
- package/lib/oauth/http-request.js +195 -0
- package/lib/oauth/mail-ru.js +24 -58
- package/lib/oauth/outlook.js +37 -137
- package/lib/oauth/pubsub/google.js +176 -117
- package/lib/oauth2-apps.js +440 -463
- package/lib/openapi/build-document.js +10 -10
- package/lib/read-env-value.js +1 -1
- package/lib/route-descriptors.js +78 -0
- package/lib/schemas.js +10 -1
- package/lib/sentry-integrations.js +299 -0
- package/lib/sentry.js +75 -27
- package/lib/settings.js +4 -1
- package/lib/sso-routes.js +249 -0
- package/lib/sso.js +29 -6
- package/lib/tools.js +5 -4
- package/lib/ui-routes/account-edit-form.js +198 -0
- package/lib/ui-routes/account-page.js +241 -0
- package/lib/ui-routes/account-routes.js +12 -318
- package/lib/ui-routes/auth-routes.js +10 -10
- package/lib/ui-routes/dashboard-routes.js +4 -0
- package/lib/ui-view-context.js +328 -0
- package/lib/utils/public-suffix.js +22 -101
- package/lib/web-safe-html.js +70 -13
- package/lib/worker-metrics.js +82 -0
- package/list-generate.js +57 -23
- package/package.json +34 -33
- package/sbom.json +380 -1612
- package/scripts/refresh-test-tokens.js +1 -1
- package/server.js +351 -707
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +18 -0
- package/static/js/ee-client.js +2619 -645
- package/static/js/ui.js +12 -2
- package/static/licenses.html +1055 -969
- package/translations/messages.pot +71 -60
- package/views/accounts/browse.hbs +19 -1
- package/views/dashboard.hbs +9 -0
- package/views/upgrade.hbs +25 -0
- package/workers/api.js +20 -451
- package/data/public_suffix_list.dat +0 -16597
- package/lib/net-tos-guard.js +0 -42
|
@@ -349,8 +349,20 @@ function registerCreateAccount(server, args) {
|
|
|
349
349
|
|
|
350
350
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
351
351
|
|
|
352
|
-
locale: Joi.string()
|
|
353
|
-
|
|
352
|
+
locale: Joi.string()
|
|
353
|
+
.empty('')
|
|
354
|
+
.max(100)
|
|
355
|
+
.example('fr')
|
|
356
|
+
.description(
|
|
357
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
358
|
+
),
|
|
359
|
+
tz: Joi.string()
|
|
360
|
+
.empty('')
|
|
361
|
+
.max(100)
|
|
362
|
+
.example('Europe/Tallinn')
|
|
363
|
+
.description(
|
|
364
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
365
|
+
)
|
|
354
366
|
})
|
|
355
367
|
.label('CreateAccount')
|
|
356
368
|
.example({
|
|
@@ -534,8 +546,20 @@ function registerUpdateAccount(server, args) {
|
|
|
534
546
|
|
|
535
547
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
536
548
|
|
|
537
|
-
locale: Joi.string()
|
|
538
|
-
|
|
549
|
+
locale: Joi.string()
|
|
550
|
+
.empty('')
|
|
551
|
+
.max(100)
|
|
552
|
+
.example('fr')
|
|
553
|
+
.description(
|
|
554
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
555
|
+
),
|
|
556
|
+
tz: Joi.string()
|
|
557
|
+
.empty('')
|
|
558
|
+
.max(100)
|
|
559
|
+
.example('Europe/Tallinn')
|
|
560
|
+
.description(
|
|
561
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
562
|
+
)
|
|
539
563
|
})
|
|
540
564
|
.label('UpdateAccount')
|
|
541
565
|
.example({
|
|
@@ -1499,8 +1523,20 @@ function registerGetAccount(server, args) {
|
|
|
1499
1523
|
|
|
1500
1524
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
1501
1525
|
|
|
1502
|
-
locale: Joi.string()
|
|
1503
|
-
|
|
1526
|
+
locale: Joi.string()
|
|
1527
|
+
.empty('')
|
|
1528
|
+
.max(100)
|
|
1529
|
+
.example('fr')
|
|
1530
|
+
.description(
|
|
1531
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
1532
|
+
),
|
|
1533
|
+
tz: Joi.string()
|
|
1534
|
+
.empty('')
|
|
1535
|
+
.max(100)
|
|
1536
|
+
.example('Europe/Tallinn')
|
|
1537
|
+
.description(
|
|
1538
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
1539
|
+
),
|
|
1504
1540
|
|
|
1505
1541
|
type: AccountTypeSchema,
|
|
1506
1542
|
app: Joi.string().max(256).example('AAABhaBPHscAAAAH').description('OAuth2 application ID'),
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
// It sits under lib/api-routes/ rather than lib/openapi/ so the dependency runs one way. The
|
|
14
14
|
// generator reads route metadata; route modules do not read the generator.
|
|
15
15
|
|
|
16
|
+
const { routePlugins } = require('../route-descriptors');
|
|
17
|
+
|
|
16
18
|
const PLUGIN_OPTIONS_KEY = 'openapi';
|
|
17
19
|
|
|
18
20
|
// The shared no-metadata answer. This accessor runs in the api-token strategy on every API
|
|
@@ -24,12 +26,13 @@ const NO_OPTIONS = Object.freeze({});
|
|
|
24
26
|
/**
|
|
25
27
|
* The documentation and permission metadata a route declares.
|
|
26
28
|
*
|
|
27
|
-
* @param {Object} route - a
|
|
29
|
+
* @param {Object} route - a route descriptor (lib/route-descriptors.js), or a live `request.route`
|
|
28
30
|
* @param {String} [namespace] - which plugins block to read; defaults to `plugins.openapi`
|
|
29
31
|
* @returns {Object} the route's plugins block, or an empty object when it declares none
|
|
30
32
|
*/
|
|
31
33
|
function pluginOptions(route, namespace) {
|
|
32
|
-
|
|
34
|
+
const plugins = routePlugins(route);
|
|
35
|
+
return (plugins && plugins[namespace || PLUGIN_OPTIONS_KEY]) || NO_OPTIONS;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -286,8 +286,21 @@ function buildSubmitMessagePayloadSchema(MAX_ATTACHMENT_SIZE) {
|
|
|
286
286
|
.example('Sent Mail')
|
|
287
287
|
.description("Upload sent message to this folder. By default the account's Sent Mail folder is used."),
|
|
288
288
|
|
|
289
|
-
locale: Joi.string()
|
|
290
|
-
|
|
289
|
+
locale: Joi.string()
|
|
290
|
+
.empty('')
|
|
291
|
+
.max(100)
|
|
292
|
+
.example('fr')
|
|
293
|
+
.description(
|
|
294
|
+
'Language of the text EmailEngine adds to the message, such as the "On ... wrote:" line and the forwarded message headers of `reference.inline`. A language tag like "sv" or "pt-BR"; only the language part is used, and a language without a translation is written in English. Defaults to the locale of the account, then to the locale setting of the instance'
|
|
295
|
+
)
|
|
296
|
+
.label('MessageLocale'),
|
|
297
|
+
tz: Joi.string()
|
|
298
|
+
.empty('')
|
|
299
|
+
.max(100)
|
|
300
|
+
.example('Europe/Tallinn')
|
|
301
|
+
.description(
|
|
302
|
+
'Time zone of the dates EmailEngine writes into the message, such as the date of the quoted message with `reference.inline`. Defaults to the time zone of the account, then to the timezone setting of the instance'
|
|
303
|
+
),
|
|
291
304
|
|
|
292
305
|
sendAt: sendAtSchema,
|
|
293
306
|
deliveryAttempts: deliveryAttemptsSchema,
|