@serve.zone/interfaces 7.26.0 → 7.27.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/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-06-22 - 7.27.0
4
+
5
+ ### Features
6
+
7
+ - add service-level mail configuration contracts (mail)
8
+ - Expose public outbound credential metadata on mail address bindings and service mail config
9
+ - Add service data mail configuration for per-address inbound and outbound mail settings
10
+ - Add dcrouter gateway, SMTP submission, and inbound mail forward settings to Cloudly settings
11
+ - Add outboundEnabled to mail address binding sync requests
12
+
3
13
  ## 2026-06-17 - 7.26.0
4
14
 
5
15
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.26.0',
6
+ version: '7.27.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -117,6 +117,8 @@ export interface IMailAddressBinding {
117
117
  status: TMailResourceStatus;
118
118
  inboundTarget?: IMailInboundTarget;
119
119
  outboundIdentityId?: string;
120
+ /** Public, non-secret credential state for reconciliation. */
121
+ outboundCredential?: IMailCredentialPublic;
120
122
  recipientPolicy?: IMailRecipientPolicy;
121
123
  spoolPolicy?: IMailSpoolPolicy;
122
124
  createdAt: number;
@@ -169,6 +171,34 @@ export interface IWorkAppMailBinding {
169
171
  updatedAt: number;
170
172
  createdBy?: string;
171
173
  }
174
+ export type TServiceMailSubmissionTlsMode = 'plain' | 'starttls' | 'implicitTls';
175
+ export interface IServiceMailInboundConfig {
176
+ enabled?: boolean;
177
+ /** Published Docker/Swarm port that dcrouter may SMTP-forward inbound mail to. */
178
+ publishedPort?: number;
179
+ preserveHeaders?: boolean;
180
+ addHeaders?: Record<string, string>;
181
+ }
182
+ export interface IServiceMailOutboundConfig {
183
+ enabled?: boolean;
184
+ /** dcrouter credential id/username. Public metadata only; never store passwords here. */
185
+ credentialId?: string;
186
+ username?: string;
187
+ status?: TMailCredentialStatus;
188
+ lastRotatedAt?: number;
189
+ }
190
+ export interface IServiceMailAddressConfig {
191
+ address: string;
192
+ enabled?: boolean;
193
+ displayName?: string;
194
+ inbound?: IServiceMailInboundConfig;
195
+ outbound?: IServiceMailOutboundConfig;
196
+ }
197
+ export interface IServiceMailConfig {
198
+ enabled?: boolean;
199
+ defaultFrom?: string;
200
+ addresses: IServiceMailAddressConfig[];
201
+ }
172
202
  export interface IMailEnvelope {
173
203
  mailFrom: string;
174
204
  rcptTo: string[];
@@ -2,6 +2,7 @@ import type { IServiceRessources } from './docker.js';
2
2
  import type { IRegistryTarget } from './registry.js';
3
3
  import type { IAppStorePublishedPort } from '../appstore/index.js';
4
4
  import type { IHostedAppLifecycleState } from './hostedapp.js';
5
+ import type { IServiceMailConfig } from './mail.js';
5
6
  export interface IServiceVolume {
6
7
  /** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
7
8
  name?: string;
@@ -114,6 +115,7 @@ export interface IService {
114
115
  [domain: string]: string;
115
116
  };
116
117
  };
118
+ mail?: IServiceMailConfig;
117
119
  volumes?: IServiceVolume[];
118
120
  publishedPorts?: IAppStorePublishedPort[];
119
121
  resources?: IServiceRessources;
@@ -9,7 +9,18 @@ export interface ICloudlySettings {
9
9
  backupExternalTargetType?: string;
10
10
  backupExternalTargetConfig?: string;
11
11
  backupNodeCacheKeepDays?: string;
12
+ dcrouterGatewayUrl?: string;
13
+ dcrouterGatewayApiToken?: string;
14
+ dcrouterOpsApiToken?: string;
15
+ dcrouterGatewayClientId?: string;
16
+ dcrouterTargetHost?: string;
17
+ dcrouterTargetPort?: string;
12
18
  dcrouterTargetHostsByNode?: string;
19
+ dcrouterMailSubmissionHost?: string;
20
+ dcrouterMailSubmissionPort?: string;
21
+ dcrouterMailSubmissionTlsMode?: 'plain' | 'starttls' | 'implicitTls';
22
+ dcrouterMailForwardTargetHost?: string;
23
+ dcrouterMailForwardTargetHostsByNode?: string;
13
24
  baseosJoinToken?: string;
14
25
  corebuildWorkerUrl?: string;
15
26
  corebuildWorkerToken?: string;
@@ -14,6 +14,8 @@ export type TMailDomainAuthoritySync = Omit<IMailDomainAuthority, 'id' | 'status
14
14
  };
15
15
  export type TMailAddressBindingSync = Omit<IMailAddressBinding, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'> & {
16
16
  id?: string;
17
+ /** Explicitly controls managed SMTP credential availability for this binding. */
18
+ outboundEnabled?: boolean;
17
19
  };
18
20
  export type TWorkAppMailBindingSync = Omit<IWorkAppMailBinding, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'> & {
19
21
  id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "7.26.0",
3
+ "version": "7.27.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
package/readme.md CHANGED
@@ -72,7 +72,8 @@ Common data contracts include:
72
72
  - `IService`, `IDeployment`, `IImage`, `IRegistryTarget`, and `IExternalRegistry` for workload delivery.
73
73
  - `IDomain`, `IDnsEntry`, and traffic contracts for routing and DNS management.
74
74
  - `ISecretBundle` and `ISecretGroup` for secret ownership and shared secret groups.
75
- - Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, credentials, spool items, delivery journals, and inbound/outbound message payloads.
75
+ - Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, managed SMTP/API credentials, spool items, delivery journals, and inbound/outbound message payloads.
76
+ - Service-level mail configuration through `IService.data.mail`, including per-address inbound `smtpForward` settings and outbound credential metadata. Cloudly settings include dcrouter gateway, SMTP submission, and inbound forward-target keys for reconciling those bindings.
76
77
  - `IUser`, `IIdentity`, and token-related contracts for authentication context.
77
78
  - `ICloudlyConfig`, `ICloudlySettings`, status, server, bare-metal, BaseOS, backup, and task execution interfaces for control-plane state.
78
79
 
@@ -98,6 +99,8 @@ interface IExampleRequest {
98
99
  }
99
100
  ```
100
101
 
102
+ Mail request contracts include `syncMailAddressBinding`, `deleteMailAddressBinding`, and `rotateMailCredential`. `TMailAddressBindingSync.outboundEnabled` explicitly controls whether a gateway should maintain a managed outbound SMTP credential for an address binding. Binding credential metadata is public; `rotateMailCredential` returns the new secret only in its one-time `IMailCredentialOneTimeSecret` response.
103
+
101
104
  Request groups are exported by product area:
102
105
 
103
106
  - `requests.admin`
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.26.0',
6
+ version: '7.27.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
package/ts/data/mail.ts CHANGED
@@ -166,6 +166,8 @@ export interface IMailAddressBinding {
166
166
  status: TMailResourceStatus;
167
167
  inboundTarget?: IMailInboundTarget;
168
168
  outboundIdentityId?: string;
169
+ /** Public, non-secret credential state for reconciliation. */
170
+ outboundCredential?: IMailCredentialPublic;
169
171
  recipientPolicy?: IMailRecipientPolicy;
170
172
  spoolPolicy?: IMailSpoolPolicy;
171
173
  createdAt: number;
@@ -221,6 +223,39 @@ export interface IWorkAppMailBinding {
221
223
  createdBy?: string;
222
224
  }
223
225
 
226
+ export type TServiceMailSubmissionTlsMode = 'plain' | 'starttls' | 'implicitTls';
227
+
228
+ export interface IServiceMailInboundConfig {
229
+ enabled?: boolean;
230
+ /** Published Docker/Swarm port that dcrouter may SMTP-forward inbound mail to. */
231
+ publishedPort?: number;
232
+ preserveHeaders?: boolean;
233
+ addHeaders?: Record<string, string>;
234
+ }
235
+
236
+ export interface IServiceMailOutboundConfig {
237
+ enabled?: boolean;
238
+ /** dcrouter credential id/username. Public metadata only; never store passwords here. */
239
+ credentialId?: string;
240
+ username?: string;
241
+ status?: TMailCredentialStatus;
242
+ lastRotatedAt?: number;
243
+ }
244
+
245
+ export interface IServiceMailAddressConfig {
246
+ address: string;
247
+ enabled?: boolean;
248
+ displayName?: string;
249
+ inbound?: IServiceMailInboundConfig;
250
+ outbound?: IServiceMailOutboundConfig;
251
+ }
252
+
253
+ export interface IServiceMailConfig {
254
+ enabled?: boolean;
255
+ defaultFrom?: string;
256
+ addresses: IServiceMailAddressConfig[];
257
+ }
258
+
224
259
  export interface IMailEnvelope {
225
260
  mailFrom: string;
226
261
  rcptTo: string[];
@@ -2,6 +2,7 @@ import type { IServiceRessources } from './docker.js';
2
2
  import type { IRegistryTarget } from './registry.js';
3
3
  import type { IAppStorePublishedPort } from '../appstore/index.js';
4
4
  import type { IHostedAppLifecycleState } from './hostedapp.js';
5
+ import type { IServiceMailConfig } from './mail.js';
5
6
 
6
7
  export interface IServiceVolume {
7
8
  /** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
@@ -122,6 +123,7 @@ export interface IService {
122
123
  web: number;
123
124
  custom?: { [domain: string]: string };
124
125
  };
126
+ mail?: IServiceMailConfig;
125
127
  volumes?: IServiceVolume[];
126
128
  publishedPorts?: IAppStorePublishedPort[];
127
129
  resources?: IServiceRessources;
@@ -27,8 +27,22 @@ export interface ICloudlySettings {
27
27
  // JSON map of swarm node hostname -> gateway-reachable IP/host. Routes for
28
28
  // services pinned to a node target that node's coretraffic instead of the
29
29
  // static dcrouterTargetHost (e.g. {"cloudlyworkergrasberg":"192.168.190.108"}).
30
+ dcrouterGatewayUrl?: string;
31
+ dcrouterGatewayApiToken?: string;
32
+ dcrouterOpsApiToken?: string;
33
+ dcrouterGatewayClientId?: string;
34
+ dcrouterTargetHost?: string;
35
+ dcrouterTargetPort?: string;
30
36
  dcrouterTargetHostsByNode?: string;
31
37
 
38
+ // External dcrouter mail integration. Submission settings are injected into
39
+ // service secret bundles; forward targets are used for inbound smtpForward.
40
+ dcrouterMailSubmissionHost?: string;
41
+ dcrouterMailSubmissionPort?: string;
42
+ dcrouterMailSubmissionTlsMode?: 'plain' | 'starttls' | 'implicitTls';
43
+ dcrouterMailForwardTargetHost?: string;
44
+ dcrouterMailForwardTargetHostsByNode?: string;
45
+
32
46
  // BaseOS enrollment
33
47
  baseosJoinToken?: string;
34
48
 
@@ -39,6 +39,8 @@ export type TMailAddressBindingSync = Omit<
39
39
  'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'
40
40
  > & {
41
41
  id?: string;
42
+ /** Explicitly controls managed SMTP credential availability for this binding. */
43
+ outboundEnabled?: boolean;
42
44
  };
43
45
 
44
46
  export type TWorkAppMailBindingSync = Omit<