@serve.zone/dcrouter-apiclient 32.6.3 → 32.7.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.
|
@@ -11,6 +11,38 @@ export interface IEmailOutboundEgressStatus {
|
|
|
11
11
|
}
|
|
12
12
|
/** Lifecycle state of the smartmta Rust mailer bridge. 'failed' and 'restarting' mean mail processing is degraded. */
|
|
13
13
|
export type TEmailBridgeState = 'idle' | 'starting' | 'running' | 'restarting' | 'failed' | 'stopped';
|
|
14
|
+
/**
|
|
15
|
+
* Where the SMTP listener's certificate (STARTTLS on 25/587, implicit TLS on
|
|
16
|
+
* the smartmta-terminated secure port) comes from.
|
|
17
|
+
* - 'managedCertificate': the stored ACME certificate that covers the mail
|
|
18
|
+
* hostname and every enabled mail-edge hostname. Configured `emailConfig.tls`
|
|
19
|
+
* material is ignored, and is removed when an operator switches to this
|
|
20
|
+
* source. Renewals reach the running listener without a restart.
|
|
21
|
+
* - 'configuredMaterial': the operator-managed `emailConfig.tls` material
|
|
22
|
+
* (inline `certPem`/`keyPem`, or `certPath`/`keyPath` read when the listener
|
|
23
|
+
* starts). ACME renewals never replace it.
|
|
24
|
+
* Settings persisted without a source keep their previous behaviour:
|
|
25
|
+
* 'configuredMaterial' while `emailConfig.tls` carries material, otherwise
|
|
26
|
+
* 'managedCertificate'.
|
|
27
|
+
*/
|
|
28
|
+
export type TEmailTlsSource = 'managedCertificate' | 'configuredMaterial';
|
|
29
|
+
/** The certificate the running SMTP listener serves, checked at read time. */
|
|
30
|
+
export interface IEmailTlsCertificateStatus {
|
|
31
|
+
source: TEmailTlsSource;
|
|
32
|
+
/** Where the served material was read from; null when no material was found. */
|
|
33
|
+
origin: string | null;
|
|
34
|
+
/** DNS subject alternative names of the served certificate. */
|
|
35
|
+
names: string[];
|
|
36
|
+
/** Epoch milliseconds; null when no parseable certificate is served. */
|
|
37
|
+
notBefore: number | null;
|
|
38
|
+
/** Epoch milliseconds; null when no parseable certificate is served. */
|
|
39
|
+
notAfter: number | null;
|
|
40
|
+
/** Mail hostname plus every enabled mail-edge hostname the certificate must cover. */
|
|
41
|
+
requiredHostnames: string[];
|
|
42
|
+
/** Empty when the served certificate is valid, matches its key and covers every required hostname. */
|
|
43
|
+
problems: string[];
|
|
44
|
+
checkedAt: number;
|
|
45
|
+
}
|
|
14
46
|
export interface IEmailPortConfig {
|
|
15
47
|
/** External to internal SMTP port mapping. */
|
|
16
48
|
portMapping?: Record<number, number>;
|
|
@@ -31,6 +63,10 @@ export interface IEmailServerSettings {
|
|
|
31
63
|
portMapping: Record<number, number> | null;
|
|
32
64
|
receivedEmailsPath: string | null;
|
|
33
65
|
maxMessageSize: number | null;
|
|
66
|
+
/** Effective SMTP certificate source (see TEmailTlsSource for the default of settings persisted without one). */
|
|
67
|
+
tlsSource: TEmailTlsSource;
|
|
68
|
+
/** Present when the email server is running: the certificate the SMTP listener serves. */
|
|
69
|
+
tlsCertificate?: IEmailTlsCertificateStatus;
|
|
34
70
|
domainCount: number;
|
|
35
71
|
routeCount: number;
|
|
36
72
|
authUserCount: number;
|
|
@@ -59,6 +95,13 @@ export type TEmailServerSettingsUpdate = {
|
|
|
59
95
|
portMapping?: Record<number, number> | null;
|
|
60
96
|
receivedEmailsPath?: string | null;
|
|
61
97
|
maxMessageSize?: number | null;
|
|
98
|
+
/**
|
|
99
|
+
* Switch the SMTP certificate source. 'managedCertificate' is refused while
|
|
100
|
+
* no valid stored certificate covers the mail hostname and every enabled
|
|
101
|
+
* mail-edge hostname; accepting it removes the configured `emailConfig.tls`
|
|
102
|
+
* material. 'configuredMaterial' is refused while none is persisted.
|
|
103
|
+
*/
|
|
104
|
+
tlsSource?: TEmailTlsSource;
|
|
62
105
|
/**
|
|
63
106
|
* Exact names of persisted legacy routes to remove (the internal-relay
|
|
64
107
|
* retirement lever). Fails loudly on unknown names and refuses generated
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"MAC authentication"
|
|
29
29
|
],
|
|
30
30
|
"name": "@serve.zone/dcrouter-apiclient",
|
|
31
|
-
"version": "32.
|
|
31
|
+
"version": "32.7.0",
|
|
32
32
|
"type": "module",
|
|
33
33
|
"description": "Object-oriented TypeScript client and shared TypedRequest contracts for the dcrouter OpsServer API.",
|
|
34
34
|
"main": "./dist_ts_apiclient/index.js",
|
|
@@ -15,6 +15,40 @@ export interface IEmailOutboundEgressStatus {
|
|
|
15
15
|
/** Lifecycle state of the smartmta Rust mailer bridge. 'failed' and 'restarting' mean mail processing is degraded. */
|
|
16
16
|
export type TEmailBridgeState = 'idle' | 'starting' | 'running' | 'restarting' | 'failed' | 'stopped';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Where the SMTP listener's certificate (STARTTLS on 25/587, implicit TLS on
|
|
20
|
+
* the smartmta-terminated secure port) comes from.
|
|
21
|
+
* - 'managedCertificate': the stored ACME certificate that covers the mail
|
|
22
|
+
* hostname and every enabled mail-edge hostname. Configured `emailConfig.tls`
|
|
23
|
+
* material is ignored, and is removed when an operator switches to this
|
|
24
|
+
* source. Renewals reach the running listener without a restart.
|
|
25
|
+
* - 'configuredMaterial': the operator-managed `emailConfig.tls` material
|
|
26
|
+
* (inline `certPem`/`keyPem`, or `certPath`/`keyPath` read when the listener
|
|
27
|
+
* starts). ACME renewals never replace it.
|
|
28
|
+
* Settings persisted without a source keep their previous behaviour:
|
|
29
|
+
* 'configuredMaterial' while `emailConfig.tls` carries material, otherwise
|
|
30
|
+
* 'managedCertificate'.
|
|
31
|
+
*/
|
|
32
|
+
export type TEmailTlsSource = 'managedCertificate' | 'configuredMaterial';
|
|
33
|
+
|
|
34
|
+
/** The certificate the running SMTP listener serves, checked at read time. */
|
|
35
|
+
export interface IEmailTlsCertificateStatus {
|
|
36
|
+
source: TEmailTlsSource;
|
|
37
|
+
/** Where the served material was read from; null when no material was found. */
|
|
38
|
+
origin: string | null;
|
|
39
|
+
/** DNS subject alternative names of the served certificate. */
|
|
40
|
+
names: string[];
|
|
41
|
+
/** Epoch milliseconds; null when no parseable certificate is served. */
|
|
42
|
+
notBefore: number | null;
|
|
43
|
+
/** Epoch milliseconds; null when no parseable certificate is served. */
|
|
44
|
+
notAfter: number | null;
|
|
45
|
+
/** Mail hostname plus every enabled mail-edge hostname the certificate must cover. */
|
|
46
|
+
requiredHostnames: string[];
|
|
47
|
+
/** Empty when the served certificate is valid, matches its key and covers every required hostname. */
|
|
48
|
+
problems: string[];
|
|
49
|
+
checkedAt: number;
|
|
50
|
+
}
|
|
51
|
+
|
|
18
52
|
export interface IEmailPortConfig {
|
|
19
53
|
/** External to internal SMTP port mapping. */
|
|
20
54
|
portMapping?: Record<number, number>;
|
|
@@ -36,6 +70,10 @@ export interface IEmailServerSettings {
|
|
|
36
70
|
portMapping: Record<number, number> | null;
|
|
37
71
|
receivedEmailsPath: string | null;
|
|
38
72
|
maxMessageSize: number | null;
|
|
73
|
+
/** Effective SMTP certificate source (see TEmailTlsSource for the default of settings persisted without one). */
|
|
74
|
+
tlsSource: TEmailTlsSource;
|
|
75
|
+
/** Present when the email server is running: the certificate the SMTP listener serves. */
|
|
76
|
+
tlsCertificate?: IEmailTlsCertificateStatus;
|
|
39
77
|
domainCount: number;
|
|
40
78
|
routeCount: number;
|
|
41
79
|
authUserCount: number;
|
|
@@ -66,6 +104,13 @@ export type TEmailServerSettingsUpdate = {
|
|
|
66
104
|
portMapping?: Record<number, number> | null;
|
|
67
105
|
receivedEmailsPath?: string | null;
|
|
68
106
|
maxMessageSize?: number | null;
|
|
107
|
+
/**
|
|
108
|
+
* Switch the SMTP certificate source. 'managedCertificate' is refused while
|
|
109
|
+
* no valid stored certificate covers the mail hostname and every enabled
|
|
110
|
+
* mail-edge hostname; accepting it removes the configured `emailConfig.tls`
|
|
111
|
+
* material. 'configuredMaterial' is refused while none is persisted.
|
|
112
|
+
*/
|
|
113
|
+
tlsSource?: TEmailTlsSource;
|
|
69
114
|
/**
|
|
70
115
|
* Exact names of persisted legacy routes to remove (the internal-relay
|
|
71
116
|
* retirement lever). Fails loudly on unknown names and refuses generated
|
package/ts_interfaces/readme.md
CHANGED
|
@@ -40,7 +40,7 @@ import { data, requests } from '@serve.zone/dcrouter/interfaces';
|
|
|
40
40
|
| Routes | merged route listing, operator route CRUD, managed HTTP-01 Special Forwards, toggles, warnings, ownership metadata, ordered source/path bindings |
|
|
41
41
|
| Access | API tokens, source profiles, target profiles, network targets |
|
|
42
42
|
| DNS and domains | DNS providers, domains, DNS records, ACME config |
|
|
43
|
-
| Email | email-domain management, email operations,
|
|
43
|
+
| Email | email-domain management, email operations, `TEmailOutboundMode` / `IEmailServerSettings.outboundMode`, and the SMTP certificate source `TEmailTlsSource` / `IEmailServerSettings.tlsSource` with the served `IEmailTlsCertificateStatus` |
|
|
44
44
|
| Edge services | remote ingress, VPN, RADIUS, `IRemoteIngressEgressPolicyConfig`, and RemoteIngress status capabilities |
|
|
45
45
|
| Observability | stats, combined stats, logs, configuration |
|
|
46
46
|
| Gateway clients | dcrouter-local gateway client identity, token policy, and ownership metadata |
|