@serve.zone/interfaces 7.26.0 → 7.28.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 +18 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/mail.d.ts +34 -0
- package/dist_ts/data/service.d.ts +2 -0
- package/dist_ts/data/settings.d.ts +11 -0
- package/dist_ts/requests/mail.d.ts +14 -0
- package/package.json +1 -1
- package/readme.md +4 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/mail.ts +39 -0
- package/ts/data/service.ts +2 -0
- package/ts/data/settings.ts +14 -0
- package/ts/requests/mail.ts +18 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-06-24 - 7.28.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add service mail endpoint registration interfaces (mail)
|
|
8
|
+
- Add inbound mail configuration fields for typed endpoints and SMTP forwarding targets
|
|
9
|
+
- Add registerServiceMailEndpoint TypedRequest contract for registering inbound delivery addresses
|
|
10
|
+
|
|
11
|
+
## 2026-06-22 - 7.27.0
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- add service-level mail configuration contracts (mail)
|
|
16
|
+
- Expose public outbound credential metadata on mail address bindings and service mail config
|
|
17
|
+
- Add service data mail configuration for per-address inbound and outbound mail settings
|
|
18
|
+
- Add dcrouter gateway, SMTP submission, and inbound mail forward settings to Cloudly settings
|
|
19
|
+
- Add outboundEnabled to mail address binding sync requests
|
|
20
|
+
|
|
3
21
|
## 2026-06-17 - 7.26.0
|
|
4
22
|
|
|
5
23
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '7.
|
|
6
|
+
version: '7.28.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=
|
package/dist_ts/data/mail.d.ts
CHANGED
|
@@ -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,38 @@ 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
|
+
/** Platformclient apps use typedEndpoint; third-party apps with their own SMTP server use smtpForward. */
|
|
178
|
+
targetType?: 'typedEndpoint' | 'smtpForward';
|
|
179
|
+
/** TypedRequest method exposed by platformclient over TypedSocket for inbound delivery. */
|
|
180
|
+
typedMethod?: string;
|
|
181
|
+
/** Published Docker/Swarm port that dcrouter may SMTP-forward inbound mail to. */
|
|
182
|
+
publishedPort?: number;
|
|
183
|
+
preserveHeaders?: boolean;
|
|
184
|
+
addHeaders?: Record<string, string>;
|
|
185
|
+
}
|
|
186
|
+
export interface IServiceMailOutboundConfig {
|
|
187
|
+
enabled?: boolean;
|
|
188
|
+
/** dcrouter credential id/username. Public metadata only; never store passwords here. */
|
|
189
|
+
credentialId?: string;
|
|
190
|
+
username?: string;
|
|
191
|
+
status?: TMailCredentialStatus;
|
|
192
|
+
lastRotatedAt?: number;
|
|
193
|
+
}
|
|
194
|
+
export interface IServiceMailAddressConfig {
|
|
195
|
+
address: string;
|
|
196
|
+
enabled?: boolean;
|
|
197
|
+
displayName?: string;
|
|
198
|
+
inbound?: IServiceMailInboundConfig;
|
|
199
|
+
outbound?: IServiceMailOutboundConfig;
|
|
200
|
+
}
|
|
201
|
+
export interface IServiceMailConfig {
|
|
202
|
+
enabled?: boolean;
|
|
203
|
+
defaultFrom?: string;
|
|
204
|
+
addresses: IServiceMailAddressConfig[];
|
|
205
|
+
}
|
|
172
206
|
export interface IMailEnvelope {
|
|
173
207
|
mailFrom: string;
|
|
174
208
|
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;
|
|
@@ -149,6 +151,18 @@ export interface IReq_DeliverInboundMail extends plugins.typedrequestInterfaces.
|
|
|
149
151
|
message?: string;
|
|
150
152
|
};
|
|
151
153
|
}
|
|
154
|
+
export interface IReq_RegisterServiceMailEndpoint extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RegisterServiceMailEndpoint> {
|
|
155
|
+
method: 'registerServiceMailEndpoint';
|
|
156
|
+
request: {
|
|
157
|
+
auth: IMailSubmissionRequestAuth;
|
|
158
|
+
addresses?: string[];
|
|
159
|
+
};
|
|
160
|
+
response: {
|
|
161
|
+
success: boolean;
|
|
162
|
+
addresses?: string[];
|
|
163
|
+
message?: string;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
152
166
|
export interface IReq_GetMailDeliveryStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetMailDeliveryStatus> {
|
|
153
167
|
method: 'getMailDeliveryStatus';
|
|
154
168
|
request: {
|
package/package.json
CHANGED
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`
|
package/ts/00_commitinfo_data.ts
CHANGED
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,43 @@ 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
|
+
/** Platformclient apps use typedEndpoint; third-party apps with their own SMTP server use smtpForward. */
|
|
231
|
+
targetType?: 'typedEndpoint' | 'smtpForward';
|
|
232
|
+
/** TypedRequest method exposed by platformclient over TypedSocket for inbound delivery. */
|
|
233
|
+
typedMethod?: string;
|
|
234
|
+
/** Published Docker/Swarm port that dcrouter may SMTP-forward inbound mail to. */
|
|
235
|
+
publishedPort?: number;
|
|
236
|
+
preserveHeaders?: boolean;
|
|
237
|
+
addHeaders?: Record<string, string>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface IServiceMailOutboundConfig {
|
|
241
|
+
enabled?: boolean;
|
|
242
|
+
/** dcrouter credential id/username. Public metadata only; never store passwords here. */
|
|
243
|
+
credentialId?: string;
|
|
244
|
+
username?: string;
|
|
245
|
+
status?: TMailCredentialStatus;
|
|
246
|
+
lastRotatedAt?: number;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface IServiceMailAddressConfig {
|
|
250
|
+
address: string;
|
|
251
|
+
enabled?: boolean;
|
|
252
|
+
displayName?: string;
|
|
253
|
+
inbound?: IServiceMailInboundConfig;
|
|
254
|
+
outbound?: IServiceMailOutboundConfig;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface IServiceMailConfig {
|
|
258
|
+
enabled?: boolean;
|
|
259
|
+
defaultFrom?: string;
|
|
260
|
+
addresses: IServiceMailAddressConfig[];
|
|
261
|
+
}
|
|
262
|
+
|
|
224
263
|
export interface IMailEnvelope {
|
|
225
264
|
mailFrom: string;
|
|
226
265
|
rcptTo: string[];
|
package/ts/data/service.ts
CHANGED
|
@@ -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;
|
package/ts/data/settings.ts
CHANGED
|
@@ -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
|
|
package/ts/requests/mail.ts
CHANGED
|
@@ -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<
|
|
@@ -223,6 +225,22 @@ export interface IReq_DeliverInboundMail extends plugins.typedrequestInterfaces.
|
|
|
223
225
|
};
|
|
224
226
|
}
|
|
225
227
|
|
|
228
|
+
export interface IReq_RegisterServiceMailEndpoint extends plugins.typedrequestInterfaces.implementsTR<
|
|
229
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
230
|
+
IReq_RegisterServiceMailEndpoint
|
|
231
|
+
> {
|
|
232
|
+
method: 'registerServiceMailEndpoint';
|
|
233
|
+
request: {
|
|
234
|
+
auth: IMailSubmissionRequestAuth;
|
|
235
|
+
addresses?: string[];
|
|
236
|
+
};
|
|
237
|
+
response: {
|
|
238
|
+
success: boolean;
|
|
239
|
+
addresses?: string[];
|
|
240
|
+
message?: string;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
226
244
|
export interface IReq_GetMailDeliveryStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
227
245
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
228
246
|
IReq_GetMailDeliveryStatus
|