emailengine-app 2.75.0 → 2.77.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/.github/workflows/release.yaml +24 -19
- package/.github/workflows/test.yml +0 -10
- package/.ncurc.js +14 -2
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/config/e2e.toml +1 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +71 -4
- package/lib/address-strategies.js +18 -0
- package/lib/api-reference/code-samples.js +194 -0
- package/lib/api-reference/format.js +179 -0
- package/lib/api-reference/index.js +205 -0
- package/lib/api-reference/model.js +336 -0
- package/lib/api-reference/schema-tree.js +366 -0
- package/lib/api-routes/account-routes.js +117 -37
- package/lib/api-routes/behavior-notes.js +54 -0
- package/lib/api-routes/blocklist-routes.js +9 -9
- package/lib/api-routes/changes-routes.js +6 -4
- package/lib/api-routes/chat-routes.js +3 -3
- package/lib/api-routes/delivery-test-routes.js +24 -6
- package/lib/api-routes/export-routes.js +14 -12
- package/lib/api-routes/gateway-routes.js +11 -11
- package/lib/api-routes/license-routes.js +7 -7
- package/lib/api-routes/mailbox-routes.js +18 -9
- package/lib/api-routes/message-routes.js +55 -35
- package/lib/api-routes/oauth2-app-routes.js +22 -16
- package/lib/api-routes/outbox-routes.js +7 -7
- package/lib/api-routes/pubsub-routes.js +3 -3
- package/lib/api-routes/route-helpers.js +3 -0
- package/lib/api-routes/settings-routes.js +10 -9
- package/lib/api-routes/stats-routes.js +3 -3
- package/lib/api-routes/submit-routes.js +213 -56
- package/lib/api-routes/template-routes.js +13 -13
- package/lib/api-routes/token-routes.js +15 -10
- package/lib/api-routes/webhook-route-routes.js +5 -5
- package/lib/consts.js +7 -0
- package/lib/email-client/base-client.js +230 -31
- package/lib/email-client/gmail/send-request.js +16 -1
- package/lib/email-client/gmail-client.js +89 -5
- package/lib/email-client/imap-client.js +103 -1
- package/lib/email-client/message-builder.js +24 -7
- package/lib/email-client/outlook/send-request.js +18 -1
- package/lib/email-client/outlook-client.js +79 -4
- package/lib/enum-descriptions.js +130 -0
- package/lib/imapproxy/imap-server.js +30 -26
- package/lib/imapproxy/upstream-client.js +38 -0
- package/lib/oauth2-apps.js +9 -3
- package/lib/openapi/build-document.js +318 -0
- package/lib/openapi/index.js +95 -0
- package/lib/openapi/joi-schema.js +523 -0
- package/lib/routes-ui.js +5 -1
- package/lib/schemas.js +76 -17
- package/lib/swagger-options.js +173 -0
- package/lib/tokens.js +69 -5
- package/lib/ui-routes/admin-entities-routes.js +3 -0
- package/lib/ui-routes/dashboard-routes.js +2 -26
- package/lib/ui-routes/reference-routes.js +195 -0
- package/lib/ui-routes/route-helpers.js +11 -0
- package/package.json +19 -26
- package/playwright.config.js +1 -1
- package/prepare-bundle-deps.sh +28 -0
- package/release-please-config.json +11 -0
- package/sbom.json +0 -1
- package/server.js +22 -2
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +90 -0
- package/static/js/ee-client.js +238 -8
- package/static/js/reference.js +736 -0
- package/static/js/ui.js +61 -33
- package/static/licenses.html +16 -16
- package/translations/messages.pot +13 -13
- package/views/config/ai.hbs +1 -1
- package/views/config/document-store/chat.hbs +5 -5
- package/views/config/document-store/index.hbs +2 -2
- package/views/config/document-store/pre-processing/index.hbs +1 -1
- package/views/config/email-processing.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -1
- package/views/config/license.hbs +1 -1
- package/views/config/oauth/index.hbs +3 -3
- package/views/config/security.hbs +1 -1
- package/views/config/smtp.hbs +2 -2
- package/views/dashboard.hbs +1 -1
- package/views/layout/app.hbs +18 -7
- package/views/partials/oauth_form.hbs +4 -4
- package/views/partials/reference/anchor-link.hbs +20 -0
- package/views/partials/reference/disclosure.hbs +37 -0
- package/views/partials/reference/nav.hbs +93 -0
- package/views/partials/reference/operation.hbs +127 -0
- package/views/partials/reference/params.hbs +20 -0
- package/views/partials/reference/schema-node.hbs +99 -0
- package/views/partials/reference/schema.hbs +19 -0
- package/views/partials/reference/section-heading.hbs +16 -0
- package/views/partials/reference/token-alert.hbs +24 -0
- package/views/partials/reference/try-field.hbs +31 -0
- package/views/partials/reference/try-it.hbs +78 -0
- package/views/partials/side_menu.hbs +1 -1
- package/views/partials/ui/badge.hbs +4 -2
- package/views/partials/ui/page-header.hbs +1 -1
- package/views/partials/ui/search-input.hbs +31 -0
- package/views/partials/ui/setting-ref.hbs +1 -1
- package/views/partials/ui/stat-card.hbs +4 -2
- package/views/partials/ui/tab.hbs +6 -1
- package/views/partials/ui/tabs.hbs +2 -2
- package/views/reference/index.hbs +76 -0
- package/views/reference/redirect.hbs +49 -0
- package/views/reference/tag.hbs +28 -0
- package/views/reference/token.hbs +49 -0
- package/views/tokens/index.hbs +9 -1
- package/views/webhooks/index.hbs +3 -3
- package/workers/api.js +37 -215
- package/Gruntfile.js +0 -58
- package/views/swagger/index.hbs +0 -82
package/Gruntfile.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const config = require('@zone-eu/wild-config');
|
|
4
|
-
|
|
5
|
-
module.exports = function (grunt) {
|
|
6
|
-
// Project configuration.
|
|
7
|
-
grunt.initConfig({
|
|
8
|
-
shell: {
|
|
9
|
-
eslint: {
|
|
10
|
-
// Globs are quoted so eslint expands them itself - unquoted, sh (no globstar)
|
|
11
|
-
// expands lib/**/*.js to depth-2 files only and skips most of lib/
|
|
12
|
-
command: "npx eslint 'lib/**/*.js' 'workers/**/*.js' server.js Gruntfile.js"
|
|
13
|
-
},
|
|
14
|
-
server: {
|
|
15
|
-
// Short Gmail fallback-poll interval so gmail-polling-test can exercise the poller
|
|
16
|
-
// quickly. Harmless for push-based Gmail accounts in api-test: notifications keep
|
|
17
|
-
// resetting the timer, and a stray fallback sync is coalesced/idempotent.
|
|
18
|
-
command: 'EENGINE_GMAIL_FALLBACK_POLL_INTERVAL=15000 node server.js',
|
|
19
|
-
options: {
|
|
20
|
-
async: true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
flush: {
|
|
24
|
-
command: `redis-cli -u "${config.dbs.redis}" flushdb`
|
|
25
|
-
},
|
|
26
|
-
waitServer: {
|
|
27
|
-
// Polls /health until the server reports ready (all IMAP workers up,
|
|
28
|
-
// Redis responding) instead of sleeping for a fixed delay
|
|
29
|
-
command: 'node test/helpers/wait-for-server.js'
|
|
30
|
-
},
|
|
31
|
-
testUnit: {
|
|
32
|
-
// Self-contained tests - need Redis but not the live server.
|
|
33
|
-
// Run with default --test concurrency; the suite is verified to pass in parallel.
|
|
34
|
-
// The *-test.js pattern keeps helper modules out of the test runner
|
|
35
|
-
command: 'node --test --test-timeout=180000 test/*-test.js'
|
|
36
|
-
},
|
|
37
|
-
testIntegration: {
|
|
38
|
-
// Tests that run against the live server started by shell:server
|
|
39
|
-
command: 'node --test --test-concurrency=1 --test-timeout=180000 test/integration/*-test.js'
|
|
40
|
-
},
|
|
41
|
-
options: {
|
|
42
|
-
stdout: data => console.log(data.toString().trim()),
|
|
43
|
-
stderr: data => console.log(data.toString().trim()),
|
|
44
|
-
failOnError: true
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Load the plugin(s)
|
|
50
|
-
grunt.loadNpmTasks('grunt-shell-spawn');
|
|
51
|
-
|
|
52
|
-
// Tasks
|
|
53
|
-
grunt.registerTask('test-unit', ['shell:flush', 'shell:testUnit']);
|
|
54
|
-
grunt.registerTask('test-integration', ['shell:flush', 'shell:server', 'shell:waitServer', 'shell:testIntegration', 'shell:server:kill']);
|
|
55
|
-
grunt.registerTask('test', ['test-unit', 'test-integration']);
|
|
56
|
-
|
|
57
|
-
grunt.registerTask('default', ['shell:eslint', 'test']);
|
|
58
|
-
};
|
package/views/swagger/index.hbs
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
{{!-- swagger-ui has no dark mode of its own (its stylesheet assumes a light
|
|
2
|
-
page), so the reference renders as a light island: data-theme pins the
|
|
3
|
-
FlyonUI tokens and color-scheme to light for this subtree even while
|
|
4
|
-
the admin chrome around it is dark --}}
|
|
5
|
-
<div data-theme="light" class="rounded-box bg-white" style="color-scheme: light">
|
|
6
|
-
<div id="swagger-ui"></div>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<script src="/admin/swagger/resources/swagger-ui-bundle.js"></script>
|
|
10
|
-
<script src="/admin/swagger/resources/swagger-ui-standalone-preset.js"></script>
|
|
11
|
-
<script src="/admin/swagger/resources/extend.js" type="text/javascript"></script>
|
|
12
|
-
<script>
|
|
13
|
-
function getUrlVars() {
|
|
14
|
-
const vars = [];
|
|
15
|
-
let hash;
|
|
16
|
-
const hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
|
17
|
-
for (let i = 0; i < hashes.length; i++) {
|
|
18
|
-
hash = hashes[i].split('=');
|
|
19
|
-
vars.push(hash[0]);
|
|
20
|
-
vars[hash[0]] = hash[1];
|
|
21
|
-
}
|
|
22
|
-
return vars;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
document.addEventListener('DOMContentLoaded', function () {
|
|
26
|
-
|
|
27
|
-
let url = window.location.search.match(/url=([^&]+)/);
|
|
28
|
-
if (url && url.length > 1) {
|
|
29
|
-
url = decodeURIComponent(url[1]);
|
|
30
|
-
} else {
|
|
31
|
-
url = "/swagger.json";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// pull validatorUrl string or null form server
|
|
35
|
-
let validatorUrl = null;
|
|
36
|
-
validatorUrl: '//online.swagger.io/validator';
|
|
37
|
-
|
|
38
|
-
const ACCESS_TOKEN_QUERY_PARAM_NAME = 'access_token';
|
|
39
|
-
const accessToken = getUrlVars()[ACCESS_TOKEN_QUERY_PARAM_NAME];
|
|
40
|
-
|
|
41
|
-
fetch(url)
|
|
42
|
-
.then(function (response) {
|
|
43
|
-
return response.json()
|
|
44
|
-
})
|
|
45
|
-
.then(function (json) {
|
|
46
|
-
|
|
47
|
-
if (json.openapi && json.openapi.startsWith('3.')) {
|
|
48
|
-
json.servers = [{
|
|
49
|
-
url: window.location.protocol + '//' + window.location.host,
|
|
50
|
-
description: 'Current server'
|
|
51
|
-
}];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const swaggerOptions = {
|
|
55
|
-
|
|
56
|
-
// url: url + (accessToken ? (url.indexOf('?') < 0 ? '?' : '&') + ACCESS_TOKEN_QUERY_PARAM_NAME + '=' + accessToken : ''),
|
|
57
|
-
spec: json,
|
|
58
|
-
validatorUrl: validatorUrl,
|
|
59
|
-
dom_id: '#swagger-ui',
|
|
60
|
-
deepLinking: true,
|
|
61
|
-
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
|
|
62
|
-
plugins: [SwaggerUIBundle.plugins.DownloadUrl],
|
|
63
|
-
layout: 'StandaloneLayout',
|
|
64
|
-
docExpansion: "list",
|
|
65
|
-
tagsSorter: apisSorter.unsorted,
|
|
66
|
-
operationsSorter: operationsSorter.method,
|
|
67
|
-
|
|
68
|
-
// patch: uiCompleteScript -- Rendering
|
|
69
|
-
onComplete: function () {
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
tryItOutEnabled: true,
|
|
73
|
-
defaultModelsExpandDepth: 0,
|
|
74
|
-
defaultModelExpandDepth: -1
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const ui = SwaggerUIBundle(swaggerOptions);
|
|
78
|
-
|
|
79
|
-
window.ui = ui;
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
</script>
|