emailengine-app 2.76.0 → 2.78.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.
Files changed (165) hide show
  1. package/.github/workflows/release.yaml +24 -19
  2. package/.github/workflows/test.yml +80 -0
  3. package/.ncurc.js +14 -2
  4. package/.release-please-manifest.json +3 -0
  5. package/CHANGELOG.md +54 -0
  6. package/README.md +1 -1
  7. package/bin/emailengine.js +1 -1
  8. package/data/google-crawlers.json +1 -1
  9. package/encrypt.js +72 -5
  10. package/lib/account/expected-identity.js +88 -0
  11. package/lib/account.js +75 -26
  12. package/lib/address-strategies.js +18 -0
  13. package/lib/api-reference/code-samples.js +194 -0
  14. package/lib/api-reference/format.js +193 -0
  15. package/lib/api-reference/index.js +222 -0
  16. package/lib/api-reference/model.js +338 -0
  17. package/lib/api-reference/schema-tree.js +366 -0
  18. package/lib/api-routes/account-routes.js +136 -39
  19. package/lib/api-routes/behavior-notes.js +57 -0
  20. package/lib/api-routes/blocklist-routes.js +9 -9
  21. package/lib/api-routes/changes-routes.js +6 -4
  22. package/lib/api-routes/chat-routes.js +3 -3
  23. package/lib/api-routes/delivery-test-routes.js +24 -6
  24. package/lib/api-routes/export-routes.js +14 -12
  25. package/lib/api-routes/gateway-routes.js +11 -11
  26. package/lib/api-routes/license-routes.js +7 -7
  27. package/lib/api-routes/mailbox-routes.js +18 -9
  28. package/lib/api-routes/message-routes.js +55 -35
  29. package/lib/api-routes/oauth2-app-routes.js +22 -16
  30. package/lib/api-routes/outbox-routes.js +7 -7
  31. package/lib/api-routes/pubsub-routes.js +3 -3
  32. package/lib/api-routes/settings-routes.js +10 -9
  33. package/lib/api-routes/stats-routes.js +3 -3
  34. package/lib/api-routes/submit-routes.js +58 -8
  35. package/lib/api-routes/template-routes.js +13 -13
  36. package/lib/api-routes/token-routes.js +15 -10
  37. package/lib/api-routes/webhook-route-routes.js +5 -5
  38. package/lib/append-list.js +3 -14
  39. package/lib/arf-detect.js +23 -1
  40. package/lib/autodetect-imap-settings.js +40 -16
  41. package/lib/base32.js +30 -0
  42. package/lib/bounce-detect.js +182 -62
  43. package/lib/consts.js +7 -0
  44. package/lib/egress-filter.js +89 -8
  45. package/lib/email-client/base-client.js +72 -82
  46. package/lib/email-client/gmail-client.js +3 -3
  47. package/lib/email-client/imap/listing-diff.js +3 -3
  48. package/lib/email-client/imap/mailbox.js +5 -69
  49. package/lib/email-client/imap-client.js +3 -2
  50. package/lib/email-client/message-builder.js +13 -13
  51. package/lib/email-client/outlook-client.js +1 -1
  52. package/lib/enum-descriptions.js +130 -0
  53. package/lib/export.js +1 -1
  54. package/lib/gateway.js +1 -1
  55. package/lib/get-raw-email.js +1 -1
  56. package/lib/imapproxy/imap-core/lib/imap-connection.js +2 -2
  57. package/lib/imapproxy/imap-core/lib/imap-server.js +2 -2
  58. package/lib/imapproxy/imap-server.js +42 -28
  59. package/lib/imapproxy/upstream-client.js +38 -0
  60. package/lib/license-beacon.js +1 -1
  61. package/lib/llm-pre-process.js +1 -1
  62. package/lib/msgpack.js +62 -0
  63. package/lib/oauth/decode-jwt-payload.js +39 -0
  64. package/lib/oauth/outlook-identity.js +61 -0
  65. package/lib/oauth/retry-setup.js +38 -0
  66. package/lib/oauth2-apps.js +10 -4
  67. package/lib/openapi/build-document.js +318 -0
  68. package/lib/openapi/index.js +95 -0
  69. package/lib/openapi/joi-schema.js +523 -0
  70. package/lib/outbox.js +66 -3
  71. package/lib/pre-process.js +1 -1
  72. package/lib/read-env-value.js +37 -0
  73. package/lib/routes-ui.js +5 -1
  74. package/lib/schemas.js +88 -17
  75. package/lib/swagger-options.js +173 -0
  76. package/lib/templates.js +1 -1
  77. package/lib/tokens.js +70 -6
  78. package/lib/tools.js +117 -48
  79. package/lib/totp.js +67 -0
  80. package/lib/ui-routes/account-routes.js +91 -15
  81. package/lib/ui-routes/admin-config-routes.js +2 -7
  82. package/lib/ui-routes/admin-entities-routes.js +3 -0
  83. package/lib/ui-routes/auth-routes.js +6 -24
  84. package/lib/ui-routes/dashboard-routes.js +2 -26
  85. package/lib/ui-routes/reference-routes.js +198 -0
  86. package/lib/ui-routes/route-helpers.js +39 -0
  87. package/lib/utils/is-email.js +34 -0
  88. package/lib/utils/to-camel-case.js +17 -0
  89. package/lib/webhook-egress.js +37 -0
  90. package/lib/webhooks.js +1 -1
  91. package/package.json +27 -31
  92. package/prepare-bundle-deps.sh +28 -0
  93. package/release-please-config.json +11 -0
  94. package/sbom.json +1 -1
  95. package/server.js +11 -3
  96. package/static/css/flyonui.css +1 -1
  97. package/static/css/public.css +3 -0
  98. package/static/css/src/app.tailwind.css +113 -0
  99. package/static/js/app.js +69 -0
  100. package/static/js/ee-client.js +238 -8
  101. package/static/js/reference.js +1021 -0
  102. package/static/js/ui.js +61 -33
  103. package/static/licenses.html +658 -1560
  104. package/translations/README.md +64 -0
  105. package/translations/de.mo +0 -0
  106. package/translations/de.po +164 -120
  107. package/translations/en.po +200 -161
  108. package/translations/et.mo +0 -0
  109. package/translations/et.po +163 -120
  110. package/translations/fr.mo +0 -0
  111. package/translations/fr.po +163 -120
  112. package/translations/ja.mo +0 -0
  113. package/translations/ja.po +163 -120
  114. package/translations/messages.pot +84 -54
  115. package/translations/nl.mo +0 -0
  116. package/translations/nl.po +164 -120
  117. package/translations/pl.mo +0 -0
  118. package/translations/pl.po +163 -120
  119. package/views/account-identity-error.hbs +34 -0
  120. package/views/accounts/edit.hbs +1 -0
  121. package/views/accounts/register/imap.hbs +12 -2
  122. package/views/config/ai.hbs +1 -1
  123. package/views/config/document-store/chat.hbs +5 -5
  124. package/views/config/document-store/index.hbs +2 -2
  125. package/views/config/document-store/pre-processing/index.hbs +1 -1
  126. package/views/config/email-processing.hbs +1 -1
  127. package/views/config/imap-proxy.hbs +1 -1
  128. package/views/config/license.hbs +1 -1
  129. package/views/config/oauth/index.hbs +3 -3
  130. package/views/config/security.hbs +1 -1
  131. package/views/config/smtp.hbs +2 -2
  132. package/views/dashboard.hbs +1 -1
  133. package/views/layout/app.hbs +43 -8
  134. package/views/oauth-scope-error.hbs +1 -1
  135. package/views/partials/oauth_form.hbs +4 -4
  136. package/views/partials/reference/anchor-link.hbs +20 -0
  137. package/views/partials/reference/disclosure.hbs +37 -0
  138. package/views/partials/reference/nav.hbs +120 -0
  139. package/views/partials/reference/operation.hbs +127 -0
  140. package/views/partials/reference/params.hbs +20 -0
  141. package/views/partials/reference/schema-node.hbs +99 -0
  142. package/views/partials/reference/schema.hbs +19 -0
  143. package/views/partials/reference/section-heading.hbs +16 -0
  144. package/views/partials/reference/token-alert.hbs +49 -0
  145. package/views/partials/reference/try-field.hbs +31 -0
  146. package/views/partials/reference/try-it.hbs +78 -0
  147. package/views/partials/side_menu.hbs +1 -1
  148. package/views/partials/ui/badge.hbs +4 -2
  149. package/views/partials/ui/page-header.hbs +1 -1
  150. package/views/partials/ui/search-input.hbs +31 -0
  151. package/views/partials/ui/setting-ref.hbs +1 -1
  152. package/views/partials/ui/stat-card.hbs +4 -2
  153. package/views/partials/ui/tab.hbs +6 -1
  154. package/views/partials/ui/tabs.hbs +2 -2
  155. package/views/reference/index.hbs +76 -0
  156. package/views/reference/redirect.hbs +49 -0
  157. package/views/reference/tag.hbs +28 -0
  158. package/views/reference/token.hbs +49 -0
  159. package/views/tokens/index.hbs +9 -1
  160. package/views/webhooks/index.hbs +3 -3
  161. package/workers/api.js +194 -302
  162. package/workers/imap.js +1 -1
  163. package/workers/submit.js +1 -1
  164. package/workers/webhooks.js +2 -13
  165. package/views/swagger/index.hbs +0 -82
@@ -33,11 +33,11 @@
33
33
  <span class="helper-text">If enabled, then EmailEngine uses the OpenAI API to produce text embeddings
34
34
  for emails in the document store. For this feature to work, ensure document store syncing is active
35
35
  and that the OpenAI API key is configured. You can run chat requests with the <a
36
- href="/admin/swagger#/Chat/postV1ChatAccount" target="_blank" rel="noopener noreferrer"
36
+ href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount" target="_blank" rel="noopener noreferrer"
37
37
  class="link link-animated">Chat API method</a>.</span>
38
38
  <div class="mt-2"><small><strong>Important:</strong> EmailEngine will only create embeddings for emails
39
39
  processed when the feature is active. To generate embeddings for previously stored emails,
40
- utilize the <a href="/admin/swagger#/Account/putV1AccountAccountFlush" target="_blank"
40
+ utilize the <a href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
41
41
  rel="noopener noreferrer" class="link link-animated">Flush API method</a>. This will force
42
42
  EmailEngine to re-process all emails in the Document Store.</small>
43
43
  </div>
@@ -51,10 +51,10 @@
51
51
  <div class="space-y-1">
52
52
  {{> ui/setting-ref name="documentStoreGenerateEmbeddings" class="whitespace-nowrap"}}
53
53
 
54
- {{> ui/setting-ref name="Chat with emails" href="/admin/swagger#/Chat/postV1ChatAccount"
54
+ {{> ui/setting-ref name="Chat with emails" href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount"
55
55
  nofloat=true class="whitespace-nowrap"}}
56
56
 
57
- {{> ui/setting-ref name="Request account flush" href="/admin/swagger#/Account/putV1AccountAccountFlush"
57
+ {{> ui/setting-ref name="Request account flush" href="/admin/reference/account#putV1AccountAccountFlush"
58
58
  nofloat=true class="whitespace-nowrap"}}
59
59
 
60
60
  <div>
@@ -125,7 +125,7 @@
125
125
  <form id="chatPayloadForm" method="post" action=".">
126
126
  <div class="modal-body space-y-4">
127
127
  <div>
128
- {{> ui/setting-ref prefix="API Reference: " name="/v1/chat/{account}" href="/admin/swagger#/Chat/postV1ChatAccount"}}
128
+ {{> ui/setting-ref prefix="API Reference: " name="/v1/chat/{account}" href="/admin/reference/deprecated-endpoints-document-store#postV1ChatAccount"}}
129
129
  {{#> ui/form-field id="inputAccount" label="Account ID"}}
130
130
  <input type="text" class="input" name="account" id="inputAccount" aria-describedby="inputAccountHelp"
131
131
  value="" required>
@@ -39,7 +39,7 @@
39
39
 
40
40
  <div class="mt-2"><small><strong>Important:</strong> EmailEngine only saves emails to the Document
41
41
  Store if processed while the feature is active. To add existing emails, use the <a
42
- href="/admin/swagger#/Account/putV1AccountAccountFlush" target="_blank"
42
+ href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
43
43
  rel="noopener noreferrer" class="link link-animated">Flush API method</a>. This makes
44
44
  EmailEngine re-process all emails for a specific account.</small>
45
45
  </div>
@@ -49,7 +49,7 @@
49
49
  {{> ui/setting-ref name="documentStoreEnabled" class="whitespace-nowrap"}}
50
50
 
51
51
  <div class="text-base-content/60 code-link whitespace-nowrap">[<a
52
- href="/admin/swagger#/Account/putV1AccountAccountFlush" target="_blank"
52
+ href="/admin/reference/account#putV1AccountAccountFlush" target="_blank"
53
53
  rel="noopener noreferrer" class="link link-animated">Request&nbsp;account&nbsp;flush</a>]</div>
54
54
 
55
55
  {{#if values.documentStoreEnabled}}
@@ -35,7 +35,7 @@
35
35
  rel="noopener noreferrer" referrerpolicy="no-referrer"
36
36
  class="link link-animated">documentation</a>]
37
37
 
38
- [<a href="/admin/swagger#/Settings/postV1Settings" target="_blank" rel="noopener noreferrer"
38
+ [<a href="/admin/reference/settings#postV1Settings" target="_blank" rel="noopener noreferrer"
39
39
  referrerpolicy="no-referrer" class="link link-animated">documentStorePreProcessingFn</a>]
40
40
  </div>
41
41
  <label class="label-text" for="editor-fn">Filter function</label>
@@ -31,7 +31,7 @@
31
31
  </select>
32
32
  <span class="helper-text"><strong>Full:</strong> Track all changes (new, deleted, updated emails).
33
33
  <strong>Fast:</strong> Track only new emails. Applies to new accounts only. To change existing
34
- accounts, perform an <a href="/admin/swagger#/Account/putV1AccountAccountFlush"
34
+ accounts, perform an <a href="/admin/reference/account#putV1AccountAccountFlush"
35
35
  class="link link-animated">account flush</a>.</span>
36
36
  {{/ui/form-field}}
37
37
  </div>
@@ -103,7 +103,7 @@
103
103
 
104
104
  <p class="mb-4">Connect to the proxy using the account ID as your IMAP username.</p>
105
105
 
106
- {{#> ui/tabs label="Client configuration examples" id="code-examples"}}
106
+ {{#> ui/tabs label="Client configuration examples" elId="code-examples"}}
107
107
  {{> ui/tab target="example-node-imap" label="Node.js (node-imap)" active=true}}
108
108
  {{> ui/tab target="example-php-imap" label="PHP (php-imap)"}}
109
109
  {{/ui/tabs}}
@@ -101,7 +101,7 @@ class="mb-1"}}
101
101
  </div>
102
102
 
103
103
  <div class="mb-6">
104
- {{> ui/setting-ref name="license" href="/admin/swagger#/license/postV1License"}}
104
+ {{> ui/setting-ref name="license" href="/admin/reference/license#postV1License"}}
105
105
  {{#> ui/form-field id="licenseTextElement" label="Or paste license key here" error=errors.license}}
106
106
  <textarea class="textarea w-full droptxt autoselect{{#if errors.license}} is-invalid{{/if}}"
107
107
  id="licenseTextElement" name="license" rows="9" data-enable-grammarly="false" spellcheck="false"
@@ -59,12 +59,12 @@
59
59
  {{#if enabled}}
60
60
 
61
61
  {{#if meta.authFlag}}
62
- {{> ui/badge label="Failing" variant="error"}}
62
+ {{> ui/badge label="Failing" variant="error" class="" icon="" soft=""}}
63
63
  {{else}}
64
- {{> ui/badge label="Enabled" variant="success"}}
64
+ {{> ui/badge label="Enabled" variant="success" class="" icon="" soft=""}}
65
65
  {{/if}}
66
66
  {{else}}
67
- {{> ui/badge label="Disabled" variant="warning"}}
67
+ {{> ui/badge label="Disabled" variant="warning" class="" icon="" soft=""}}
68
68
  {{/if}}
69
69
  </td>
70
70
 
@@ -36,7 +36,7 @@
36
36
  {{> ui/checkbox id="enableOAuthTokensApi" name="enableOAuthTokensApi"
37
37
  label="Allow OAuth2 Token Access via API" checked=values.enableOAuthTokensApi
38
38
  error=errors.enableOAuthTokensApi}}
39
- <span class="helper-text">Enable <a href="/admin/swagger#/Account/getV1AccountAccountOauthtoken"
39
+ <span class="helper-text">Enable <a href="/admin/reference/account#getV1AccountAccountOauthtoken"
40
40
  target="_blank" rel="noopener noreferrer" class="link link-animated">API endpoint</a> to
41
41
  retrieve OAuth2 tokens. Set <code>EENGINE_ENABLE_OAUTH_TOKENS_API=true</code> at startup to enable
42
42
  by default.</span>
@@ -3,7 +3,7 @@
3
3
  {{> ui/page-header title="SMTP Server" icon="icon-[tabler--server]" stateLabel=serverState.label stateType="smtp" class="mb-1"}}
4
4
 
5
5
  <p>Send emails through EmailEngine using SMTP protocol. While the <a
6
- href="/admin/swagger#/Submit/postV1AccountAccountSubmit" target="_blank" rel="noopener noreferrer"
6
+ href="/admin/reference/submit#postV1AccountAccountSubmit" target="_blank" rel="noopener noreferrer"
7
7
  referrerpolicy="no-referrer" class="link link-animated">submission API</a> is recommended for modern
8
8
  applications, the SMTP
9
9
  interface supports legacy systems that require traditional email sending.</p>
@@ -107,7 +107,7 @@
107
107
  <p class="mb-4"><strong>With authentication disabled:</strong> Include the <code>X-EE-Account</code> header
108
108
  with the account ID in your messages.</p>
109
109
 
110
- {{#> ui/tabs label="Integration examples" id="code-examples"}}
110
+ {{#> ui/tabs label="Integration examples" elId="code-examples"}}
111
111
  {{> ui/tab target="example-nodemailer" label="Node.js (Nodemailer)" active=true}}
112
112
  {{> ui/tab target="example-phpmailer" label="PHP (PHPMailer)"}}
113
113
  {{/ui/tabs}}
@@ -69,7 +69,7 @@
69
69
  {{#unless hasAccounts}}
70
70
  {{#> ui/stat-card variant="success" title="Welcome to EmailEngine!" icon="icon-[tabler--info-circle]" class="mt-6"}}
71
71
  <p class="mb-2">Get started by connecting your first email account. Once connected, you can send
72
- and receive emails through the <a href="/admin/swagger" class="link link-animated">API</a>.
72
+ and receive emails through the <a href="/admin/reference" class="link link-animated">API</a>.
73
73
  </p>
74
74
  <p class="mb-4 text-sm text-base-content/60">You can also add accounts programmatically via the <a
75
75
  href="https://learn.emailengine.app/docs/api/post-v-1-account" target="_blank" rel="noopener noreferrer"
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="en" class="ee-app-chrome">
3
3
 
4
4
  <head>
5
5
 
@@ -18,10 +18,6 @@
18
18
 
19
19
  <link href="/static/css/flyonui.css" rel="stylesheet">
20
20
 
21
- {{#if injectHtmlHead}}
22
- {{{injectHtmlHead}}}
23
- {{/if}}
24
-
25
21
  </head>
26
22
 
27
23
  <body class="bg-base-200 min-h-screen" data-sse-changes="true">
@@ -204,8 +200,47 @@
204
200
  <!-- End of Topbar -->
205
201
 
206
202
  <!-- Page content -->
207
- <div id="content" class="grow">
208
- <div class="w-full px-6 py-6">
203
+ <div id="content" class="grow lg:flex lg:items-start">
204
+
205
+ {{#if secondaryNav}}
206
+ <!-- Secondary navigation column. Rendered flush against the main sidebar
207
+ (no card, no gap, matching surface and border) so it reads as a second
208
+ level of the same menu rather than a panel floating in the page. A page
209
+ opts in by setting `secondaryNav` to a partial name in its view context;
210
+ every other page renders exactly as before.
211
+
212
+ Below lg there is no room for a second column, so the whole thing collapses
213
+ to the row below, closed by default. It used to be a 192px scroll strip
214
+ pinned above the content, which showed about a fifth of the list, hid the
215
+ rest behind a nested scrollbar most people never notice, and still pushed
216
+ the page heading off the first screen. A disclosure costs one row instead.
217
+ Opened, it is capped at the screen and scrolls itself - the difference from
218
+ what it replaced is that the space is asked for, not permanently taken, and
219
+ that the filter's 82 hits cannot push the page a thousand pixels down.
220
+
221
+ aria-expanded on the button is the only state there is: below lg the panel
222
+ derives its visibility from it, above lg it is a column regardless of what
223
+ the button last said. -->
224
+ <aside class="bg-base-100 border-base-content/20 shrink-0 border-b lg:sticky lg:top-topbar lg:h-[calc(100vh-var(--spacing-topbar))] lg:w-64 lg:overflow-y-auto lg:border-e lg:border-b-0"
225
+ aria-label="Section navigation">
226
+
227
+ <button type="button" id="secondary-nav-toggle" aria-expanded="false" aria-controls="secondary-nav-panel"
228
+ class="peer group hover:bg-base-200 flex w-full cursor-pointer items-center justify-between gap-2 px-4 py-3 text-sm font-semibold lg:hidden">
229
+ <span class="flex items-center gap-2">
230
+ <span class="icon-[tabler--list-search] size-4 shrink-0"></span>
231
+ {{#if secondaryNavLabel}}{{secondaryNavLabel}}{{else}}Sections{{/if}}
232
+ </span>
233
+ <span class="icon-[tabler--chevron-down] size-4 shrink-0 transition-transform duration-200 group-aria-expanded:rotate-180"></span>
234
+ </button>
235
+
236
+ <div id="secondary-nav-panel"
237
+ class="border-base-content/10 hidden border-t max-lg:max-h-[calc(100dvh-var(--spacing-topbar))] max-lg:overflow-y-auto max-lg:overscroll-contain max-lg:peer-aria-expanded:block lg:block lg:border-t-0">
238
+ {{> (lookup . "secondaryNav")}}
239
+ </div>
240
+ </aside>
241
+ {{/if}}
242
+
243
+ <div class="w-full min-w-0 px-6 py-6">
209
244
 
210
245
  <div id="toastContainer" class="fixed top-16 right-6 z-[10000] w-80 max-w-[90vw]"></div>
211
246
 
@@ -221,7 +256,7 @@
221
256
 
222
257
  {{#unless licenseInfo.active}}
223
258
  {{#unless hideLicenseWarning}}
224
- {{#> ui/stat-card id="license-warning" variant="error" title="License key missing" icon="icon-[tabler--key]" class="mb-6"}}
259
+ {{#> ui/stat-card elId="license-warning" variant="error" title="License key missing" icon="icon-[tabler--key]" class="mb-6"}}
225
260
 
226
261
  {{#if licenseInfo.suspended}}
227
262
  <div class="alert alert-soft alert-error mb-6" role="alert">
@@ -24,7 +24,7 @@ permissions; offers a link to restart the consent flow. --}}
24
24
  </p>
25
25
 
26
26
  <div class="ee-form-actions">
27
- <a href="{{reAuthUrl}}" class="ee-btn ee-btn-primary ee-btn-block">
27
+ <a href="{{retryUrl}}" class="ee-btn ee-btn-primary ee-btn-block">
28
28
  <span class="ee-icon ee-icon-refresh"></span>{{_ "Try Again" templateLocale}}
29
29
  </a>
30
30
  </div>
@@ -23,7 +23,7 @@ interactive logins.
23
23
  </p>
24
24
  <p class="mt-2 mb-0">
25
25
  Accounts using service access can only be added via the
26
- <a href="/admin/swagger#/Account/postV1Account" class="link link-animated">REST API</a>, not through the hosted
26
+ <a href="/admin/reference/account#postV1Account" class="link link-animated">REST API</a>, not through the hosted
27
27
  authentication form.{{#if providerData.tutorialUrl}} Read the
28
28
  <a href="{{providerData.tutorialUrl}}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"
29
29
  class="link link-animated">setup guide</a> for both methods.{{/if}}
@@ -38,7 +38,7 @@ client credentials, with no interactive user login required. The Entra app regis
38
38
  <strong>application permissions</strong> (not delegated) with admin consent. Use this for
39
39
  service integrations, shared mailboxes, or when you cannot perform interactive logins.
40
40
  Accounts using application access can only be added via the
41
- <a href="/admin/swagger#/Account/postV1Account" class="link link-animated">REST API</a>,
41
+ <a href="/admin/reference/account#postV1Account" class="link link-animated">REST API</a>,
42
42
  not through the hosted authentication form.
43
43
  {{#if providerData.tutorialUrl}}
44
44
  Read about setting up {{providerData.comment}} from <a href="{{providerData.tutorialUrl}}" target="_blank"
@@ -780,7 +780,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
780
780
  <p>
781
781
  If your EmailEngine instance cannot be exposed directly, configure a public
782
782
  proxy domain in <span class="text-base-content/60 code-link"><a
783
- href="/admin/swagger#/Settings/postV1Settings" target="_blank" rel="noopener noreferrer"
783
+ href="/admin/reference/settings#postV1Settings" target="_blank" rel="noopener noreferrer"
784
784
  class="link link-animated">notificationBaseUrl</a></span>. Microsoft Graph will then
785
785
  post to <code>https://&lt;proxy-domain&gt;/oauth/msg/...</code> instead of
786
786
  <code>{{mainServiceUrl}}</code>.
@@ -823,7 +823,7 @@ Read about setting up {{providerData.comment}} from <a href="{{providerData.tuto
823
823
  <p>
824
824
  If your EmailEngine instance cannot be exposed directly, configure a public
825
825
  proxy domain in <span class="text-base-content/60 code-link"><a
826
- href="/admin/swagger#/Settings/postV1Settings" target="_blank" rel="noopener noreferrer"
826
+ href="/admin/reference/settings#postV1Settings" target="_blank" rel="noopener noreferrer"
827
827
  class="link link-animated">notificationBaseUrl</a></span>. Microsoft Graph will then
828
828
  post to <code>https://&lt;proxy-domain&gt;/oauth/msg/...</code> instead of
829
829
  <code>{{mainServiceUrl}}</code>.
@@ -0,0 +1,20 @@
1
+ {{!--
2
+ reference/anchor-link - the link icon that makes something on a reference page
3
+ addressable. Used once per operation (reference/operation) and once per property row
4
+ (reference/schema-node), so the two stay identical rather than being kept in step by
5
+ hand.
6
+
7
+ A single element, with the icon mask on the anchor itself and the color and hover in
8
+ the .ee-ref-anchor rule rather than a utility string: a tag page renders this up to 434
9
+ times, where a wrapper span and a repeated 68-character class list cost real DOM nodes
10
+ and parse time. The accessible name comes from aria-label, since there is no text.
11
+
12
+ Params:
13
+ target - the id to link to, without the "#" (required)
14
+ label - the full accessible name, e.g. "Link to this operation" (required)
15
+ small - true for the smaller icon used on property rows (optional)
16
+ class - extra classes on the anchor: the ms-auto that pushes the operation link to
17
+ the end of its row, or the ee-ref-prop-anchor that keeps a property link
18
+ hidden until its row is hovered (optional)
19
+ --}}
20
+ <a href="#{{target}}" class="ee-ref-anchor icon-[tabler--link] {{#if small}}size-3.5{{else}}size-4{{/if}}{{#if class}} {{class}}{{/if}}" aria-label="{{label}}"></a>
@@ -0,0 +1,37 @@
1
+ {{!--
2
+ reference/disclosure - inline collapsible section used throughout the API reference:
3
+ example payloads, nested property groups, and the try-it panel. Block form; the block
4
+ is the body:
5
+ {{#> reference/disclosure label="Example response"}} ...body... {{/reference/disclosure}}
6
+
7
+ Params:
8
+ label - summary text (required)
9
+ elId - element id on the <details> (optional). Deliberately NOT named `id`:
10
+ Handlebars merges a partial's hash params into the caller's context,
11
+ so a partial that reads `id` also picks up an `id` that merely
12
+ happens to be on the surrounding context - and every call site here
13
+ sits inside an operation whose model has one. That silently emitted
14
+ the operation id on four elements per operation.
15
+ open - true to render expanded (optional)
16
+ primary - true for the larger primary-colored summary (the try-it panel);
17
+ default is the muted text-xs look used by the example blocks
18
+ class - extra classes on the <details> (optional; the caller owns spacing)
19
+
20
+ The chevron rotation is driven by .ee-ref-disclosure in app.tailwind.css rather than
21
+ Tailwind's group-open variant: these disclosures nest (a property group inside a
22
+ property group), and a named group matches ANY open ancestor, so an inner collapsed
23
+ group's chevron would rotate whenever an outer one was open. The stylesheet uses a
24
+ child combinator, which is exact at every depth.
25
+
26
+ Not ui/details: that one hardcodes a card shell plus font-bold text-primary on the
27
+ summary, which is the wrong weight for an inline disclosure inside a card body.
28
+ --}}
29
+ <details class="ee-ref-disclosure{{#if class}} {{class}}{{/if}}" {{#if elId}}id="{{elId}}" {{/if}}{{#if open}}open{{/if}}>
30
+ <summary
31
+ class="flex cursor-pointer list-none items-center gap-1 [&::-webkit-details-marker]:hidden {{#if primary}}text-primary hover:text-primary/80 text-sm font-semibold{{else}}text-base-content/60 hover:text-base-content text-xs{{/if}}">
32
+ <span class="ee-ref-chevron icon-[tabler--chevron-right] shrink-0 {{#if primary}}size-4{{else}}size-3.5{{/if}}"></span>
33
+ {{label}}
34
+ </summary>
35
+ {{!-- own hash params are neutralized so they cannot fall through into nested ui/* calls inside the block --}}
36
+ {{> @partial-block label="" elId="" open="" primary="" class=""}}
37
+ </details>
@@ -0,0 +1,120 @@
1
+ {{!--
2
+ reference/nav - the API reference's section navigation: an operation filter over the
3
+ whole API, and the tag list with the current tag's operations expanded.
4
+
5
+ Rendered by views/layout/app.hbs into the secondary-nav column (the route sets
6
+ `secondaryNav: 'reference/nav'`), so this partial owns only its inner content - the
7
+ column's surface, border, width and sticky behavior belong to the layout. It emits
8
+ no card or shadow on purpose: the column sits flush against the main sidebar and has
9
+ to read as a continuation of it.
10
+
11
+ The filter list is rendered server-side (all operations, hidden until the box has
12
+ input) and narrowed by static/js/reference.js. There is no client-side index to
13
+ fetch or build - filtering is plain DOM work over markup that is already there.
14
+
15
+ A hit matches on more than it shows: `data-search` carries the operation id and every
16
+ parameter and request-body property name as well. What is searchable is decided in one
17
+ place, searchCorpus() in lib/api-reference/model.js - so "mailbox" or "mailMerge" finds
18
+ the endpoints that accept them, not only the ones with the word in their path.
19
+
20
+ Params (from the reference view context):
21
+ nav - tags with { name, slug, url, operationCount, active, operations[] }
22
+ searchIndex - flat operation list backing the filter
23
+ --}}
24
+ <div class="flex flex-col gap-3 p-3">
25
+
26
+ {{!-- Back to the reference home. Without it the only way out of a group page is the
27
+ main side menu, which is easy to miss. --}}
28
+ <a href="/admin/reference"
29
+ class="flex items-center gap-2 rounded-field px-2 py-1.5 text-sm{{#if overviewActive}} bg-primary/10 text-primary font-semibold{{else}} hover:bg-base-200{{/if}}">
30
+ <span class="icon-[tabler--home] size-4 shrink-0"></span>
31
+ Overview
32
+ </a>
33
+
34
+ {{!-- Access-token status. Always a link to the control on the overview page, whatever
35
+ the current state - the try-it panels on every group page depend on it, so it has
36
+ to be reachable from all of them. The state text is repainted by
37
+ static/js/reference.js from the token held for this tab. --}}
38
+ <a href="/admin/reference/token"
39
+ class="flex items-center justify-between gap-2 rounded-field px-2 py-1.5 text-sm{{#if tokenActive}} bg-primary/10 text-primary font-semibold{{else}} hover:bg-base-200{{/if}}">
40
+ <span class="flex items-center gap-2">
41
+ <span class="icon-[tabler--key] size-4 shrink-0"></span>
42
+ Access token
43
+ </span>
44
+ <span id="ref-token-state" class="text-base-content/50 text-2xs">Not set</span>
45
+ </a>
46
+
47
+ {{> ui/search-input id="ref-filter" placeholder="Filter endpoints" shortcut="Ctrl K" shortcutMac="Cmd K" name="" value="" type="" class=""}}
48
+
49
+ {{!-- Result count and key hints, shown only while the filter has input. The count is a
50
+ live region so it is announced; the key hints are static decoration beside it. --}}
51
+ <div id="ref-filter-hint" class="text-base-content/50 hidden items-center justify-between gap-2 px-2 text-2xs">
52
+ <span role="status"></span>
53
+ <span aria-hidden="true">Up/Down move, Enter open</span>
54
+ </div>
55
+
56
+ <ul id="ref-filter-results" class="flex flex-col gap-0.5 hidden">
57
+ {{#each searchIndex}}
58
+ <li class="ee-ref-hit" data-search="{{search}}">
59
+ <a href="{{url}}" class="hover:bg-base-200 block rounded-field px-2 py-1.5">
60
+ <span class="flex items-center gap-2">
61
+ <span class="text-{{methodVariant}} shrink-0 font-mono text-2xs font-semibold">{{method}}</span>
62
+ <span class="text-base-content/80 truncate text-xs">{{path}}</span>
63
+ </span>
64
+ {{#if summary}}<span class="text-base-content/50 block truncate ps-1 text-2xs">{{summary}}</span>{{/if}}
65
+ </a>
66
+ </li>
67
+ {{/each}}
68
+ <li id="ref-filter-empty" class="text-base-content/50 hidden px-2 py-2 text-xs">No matching endpoints</li>
69
+ </ul>
70
+
71
+ {{!-- Every group carries its operations, so the list of a group you are not on can be
72
+ opened without loading its page. Below the layout's lg breakpoint the nav is a
73
+ disclosure, and there static/js/reference.js turns a tap on a group row into opening
74
+ that list instead of a page load - the chevron is the affordance for it. Which list
75
+ is open is aria-expanded on the group row and nothing else: the attribute is the
76
+ state, `max-lg:peer-aria-expanded:block` is the rendering.
77
+
78
+ As a column it is not a disclosure at all - the active group's list is shown by
79
+ lg:block and every other stays hidden, no matter what the reader last expanded on a
80
+ narrow window. Without that, widening after collapsing the active group would leave
81
+ the column with no list and no control to bring one back.
82
+
83
+ Not FlyonUI's collapse or accordion, though both are in the bundle: HSCollapse
84
+ animates an inline height that would fight lg:block (and strand a stale one when the
85
+ viewport crosses lg), HSAccordion needs a <button> where these rows have to stay
86
+ links above lg, and neither has any notion of a breakpoint - which is the whole
87
+ problem here. --}}
88
+ <ul id="ref-tag-list" class="flex flex-col gap-0.5">
89
+ {{#each nav}}
90
+ <li>
91
+ <a href="{{url}}" aria-controls="ref-ops-{{slug}}" aria-expanded="{{#if active}}true{{else}}false{{/if}}"
92
+ class="peer group flex items-center justify-between gap-2 rounded-field px-2 py-1.5 text-sm{{#if active}} bg-primary/10 text-primary font-semibold{{else}} hover:bg-base-200{{/if}}">
93
+ <span class="truncate">{{name}}</span>
94
+ <span class="flex shrink-0 items-center gap-1">
95
+ <span class="text-base-content/40 text-2xs">{{operationCount}}</span>
96
+ <span
97
+ class="icon-[tabler--chevron-down] text-base-content/40 size-3.5 transition-transform duration-200 group-aria-expanded:rotate-180 lg:hidden"></span>
98
+ </span>
99
+ </a>
100
+ {{!-- ee-ref-op-nav marks the ACTIVE group's list only: it is the hook static/js/
101
+ reference.js scroll-spies on, and only that list holds in-page anchors to mark.
102
+ The current-state styling is written as aria-[current] variants here rather than
103
+ a rule in app.tailwind.css because a components-layer rule loses to the
104
+ text-base-content/70 utility on this same element - utilities are emitted later,
105
+ so the colour would silently not apply. Same utilities as the active tag entry
106
+ above, so the two levels read as one marker. --}}
107
+ <ul id="ref-ops-{{slug}}"
108
+ class="{{#if active}}ee-ref-op-nav lg:block {{/if}}border-base-content/10 my-1 ms-3 hidden border-s ps-2 max-lg:peer-aria-expanded:block">
109
+ {{#each operations}}
110
+ <li>
111
+ <a href="{{url}}"
112
+ class="text-base-content/70 hover:bg-base-200 hover:text-base-content aria-[current=location]:bg-primary/10 aria-[current=location]:text-primary aria-[current=location]:font-semibold block truncate rounded-field px-2 py-1 text-xs">{{summary}}</a>
113
+ </li>
114
+ {{/each}}
115
+ </ul>
116
+ </li>
117
+ {{/each}}
118
+ </ul>
119
+
120
+ </div>
@@ -0,0 +1,127 @@
1
+ {{!--
2
+ reference/operation - one API operation: signature, parameters, request body,
3
+ responses, code samples and the try-it panel.
4
+
5
+ Context is an operation view model from lib/api-reference/model.js, decorated with
6
+ per-request `samples` in lib/api-reference/index.js.
7
+
8
+ descriptionHtml fields are pre-escaped in lib/api-reference/format.js (escape first,
9
+ then a closed tag set added back), which is why they render unescaped.
10
+
11
+ Tab ids (response.tabId, sample.tabId) are precomputed in the model: ui/tabs
12
+ neutralizes its own hash params inside the partial block, so the operation id is
13
+ not reachable from there to compose them with.
14
+ --}}
15
+ <section id="{{id}}" class="ee-ref-op card bg-base-100 mb-6 shadow-md">
16
+ <div class="card-body">
17
+
18
+ <div class="flex flex-wrap items-center gap-2">
19
+ {{> ui/badge label=methodLabel variant=methodVariant icon="" class="font-mono" soft=""}}
20
+ <code class="text-sm font-semibold break-all">{{path}}</code>
21
+ {{#if deprecated}}
22
+ {{> ui/badge label="Deprecated" variant="warning" soft=true icon="" class=""}}
23
+ {{/if}}
24
+ {{> reference/anchor-link target=id label="Link to this operation" class="ms-auto" small=""}}
25
+ </div>
26
+
27
+ {{#if summary}}
28
+ <h3 class="text-base-content mt-2 text-lg font-semibold">{{summary}}</h3>
29
+ {{/if}}
30
+
31
+ {{#if descriptionHtml}}
32
+ <div class="text-base-content/70 mt-1 text-sm"><p>{{{descriptionHtml}}}</p></div>
33
+ {{/if}}
34
+
35
+ {{#if behavior.length}}
36
+ {{!-- notes are pre-escaped by formatDescription, hence the triple stash --}}
37
+ <div class="alert alert-soft alert-info mt-4 flex items-start gap-3" role="note">
38
+ <span class="icon-[tabler--info-circle] size-5 shrink-0"></span>
39
+ <div class="min-w-0 text-sm">
40
+ <div class="mb-1 font-semibold">Behavior</div>
41
+ <ul class="list-disc space-y-1 ps-4">
42
+ {{#each behavior}}<li>{{{this}}}</li>{{/each}}
43
+ </ul>
44
+ </div>
45
+ </div>
46
+ {{/if}}
47
+
48
+ {{> reference/params title="Path parameters" params=pathParams}}
49
+ {{> reference/params title="Query parameters" params=queryParams}}
50
+ {{> reference/params title="Headers" params=headerParams}}
51
+
52
+ {{#if body}}
53
+ <div class="mt-5">
54
+ {{> reference/section-heading label="Request body" suffix=body.contentType class="mb-2"}}
55
+ {{#if body.descriptionHtml}}
56
+ <div class="text-base-content/70 mb-2 text-sm"><p>{{{body.descriptionHtml}}}</p></div>
57
+ {{/if}}
58
+ {{#if body.tree}}
59
+ {{> reference/schema body.tree}}
60
+ {{/if}}
61
+ {{#if body.exampleJson}}
62
+ {{#> reference/disclosure label="Example request body" class="mt-3"}}
63
+ <pre class="ee-code-block mt-2"><code class="language-json">{{body.exampleJson}}</code></pre>
64
+ {{/reference/disclosure}}
65
+ {{/if}}
66
+ </div>
67
+ {{/if}}
68
+
69
+ {{#if responses.length}}
70
+ <div class="mt-5">
71
+ {{> reference/section-heading label="Responses" class="mb-2"}}
72
+ {{#> ui/tabs label="Response status codes" class="mb-3"}}
73
+ {{#each responses}}
74
+ {{> ui/tab target=tabId label=code active=active}}
75
+ {{/each}}
76
+ {{/ui/tabs}}
77
+ {{#each responses}}
78
+ <div id="{{tabId}}" role="tabpanel" aria-labelledby="{{tabId}}-tab" {{#unless active}}class="hidden" {{/unless}}>
79
+ <div class="flex flex-wrap items-center gap-2">
80
+ {{> ui/badge label=code variant=variant soft=true icon="" class=""}}
81
+ {{#if contentType}}<span class="text-base-content/50 text-xs">{{contentType}}</span>{{/if}}
82
+ </div>
83
+ {{#if descriptionHtml}}
84
+ <div class="text-base-content/70 mt-1 text-sm"><p>{{{descriptionHtml}}}</p></div>
85
+ {{/if}}
86
+ {{#if tree}}
87
+ <div class="mt-2">{{> reference/schema tree}}</div>
88
+ {{/if}}
89
+ {{#if exampleJson}}
90
+ {{#> reference/disclosure label="Example response" class="mt-3"}}
91
+ <pre class="ee-code-block mt-2"><code class="language-json">{{exampleJson}}</code></pre>
92
+ {{/reference/disclosure}}
93
+ {{/if}}
94
+ </div>
95
+ {{/each}}
96
+ </div>
97
+ {{/if}}
98
+
99
+ {{!-- data-sample-tabs marks this strip for static/js/reference.js, which reselects the
100
+ language the reader last chose so a page of 13 operations does not reset to curl
101
+ on every one of them --}}
102
+ {{#if samples.length}}
103
+ <div class="mt-5" data-sample-tabs>
104
+ {{> reference/section-heading label="Code samples" class="mb-2"}}
105
+ {{#> ui/tabs label="Code sample languages" class="mb-3"}}
106
+ {{#each samples}}
107
+ {{> ui/tab target=tabId label=label active=active key=id}}
108
+ {{/each}}
109
+ {{/ui/tabs}}
110
+ {{#each samples}}
111
+ <div id="{{tabId}}" role="tabpanel" aria-labelledby="{{tabId}}-tab" {{#unless active}}class="hidden" {{/unless}}>
112
+ <div class="relative">
113
+ <button type="button" class="copy-btn btn btn-text btn-xs absolute end-2 top-2"
114
+ data-copy-target="#{{tabId}}-code" aria-label="Copy to clipboard">
115
+ <span class="icon-[tabler--copy] size-4"></span>
116
+ </button>
117
+ <pre class="ee-code-block"><code id="{{tabId}}-code" class="language-{{language}}">{{code}}</code></pre>
118
+ </div>
119
+ </div>
120
+ {{/each}}
121
+ </div>
122
+ {{/if}}
123
+
124
+ {{> reference/try-it}}
125
+
126
+ </div>
127
+ </section>
@@ -0,0 +1,20 @@
1
+ {{!--
2
+ reference/params - one parameter group (path, query or header) for an operation.
3
+ Renders nothing when the group is empty, so callers can include all three
4
+ unconditionally.
5
+ Params:
6
+ title - group heading, e.g. "Path parameters" (required)
7
+ params - array of parameter view models from lib/api-reference/model.js (required)
8
+
9
+ Rows are reference/schema-node: buildParameter() emits the same field names as a
10
+ schema tree node, so a parameter renders identically to a property without a
11
+ second copy of the row markup.
12
+ --}}
13
+ {{#if params.length}}
14
+ <div class="mt-4">
15
+ {{> reference/section-heading label=title class="mb-2"}}
16
+ <ul class="ee-ref-props">
17
+ {{#each params}}{{> reference/schema-node}}{{/each}}
18
+ </ul>
19
+ </div>
20
+ {{/if}}