@serve.zone/interfaces 19.6.1 → 19.8.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,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-29 - 19.8.0
4
+
5
+ ### Features
6
+
7
+ - add an authenticated gateway-client mail-domain count contract (gateway)
8
+ - Expose getGatewayClientMailDomainCount with a count-only response for distinct configured mail domains.
9
+ - Derive ownership from the authenticating gateway credential instead of caller-selected owner fields.
10
+ - Document the new request and extend gateway contract tests.
11
+
12
+ ## 2026-07-29 - 19.7.0
13
+
14
+ ### Features
15
+
16
+ - add first-class Reply-To support to service mail contracts (mail)
17
+ - Add optional replyTo support for outbound message payloads as a single bare ASCII mailbox address.
18
+ - Expose stable mail submission error codes for invalid Reply-To values and typed-field/header conflicts.
19
+ - Add service-mail type coverage and documentation for Reply-To handling.
20
+
21
+ ### Chores
22
+
23
+ - update active Git Zone runtime tooling (dev-deps)
24
+ - Update `@git.zone/tsrun` from 2.0.5 to 2.0.6.
25
+
3
26
  ## 2026-07-28 - 19.6.1
4
27
 
5
28
  ### Fixes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '19.6.1',
6
+ version: '19.8.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=
@@ -12,6 +12,7 @@ export type TMailBounceType = 'hard' | 'soft' | 'complaint' | 'unknown';
12
12
  export type TMailInboundProtocol = 'smtp' | 'submission' | 'api';
13
13
  export type TMailRecipientResolutionAction = 'accept' | 'reject' | 'defer';
14
14
  export type TMailDeliveryJournalEventType = 'accepted' | 'queued' | 'deliveryStarted' | 'deliverySucceeded' | 'deliveryDeferred' | 'deliveryFailed' | 'deadLettered' | 'rejected' | 'bounced' | 'complaint';
15
+ export type TMailSubmissionErrorCode = 'INVALID_REPLY_TO' | 'REPLY_TO_FIELD_HEADER_CONFLICT';
15
16
  /**
16
17
  * Runtime owner of a mail resource. `appInstanceId` is the deployed WorkApp or service
17
18
  * instance, not an App Store template id.
@@ -317,6 +318,8 @@ export interface IMailOutboundMessagePayload {
317
318
  to: string[];
318
319
  cc?: string[];
319
320
  bcc?: string[];
321
+ /** One bare ASCII mailbox address. Display names and address lists are not supported. */
322
+ replyTo?: string;
320
323
  subject: string;
321
324
  text?: string;
322
325
  html?: string;
@@ -100,6 +100,17 @@ export interface IReq_GetGatewayClientMailOverview extends plugins.typedrequestI
100
100
  emails: IMailOverviewEmail[];
101
101
  };
102
102
  }
103
+ /** Cheap gateway-client-owned count of distinct configured mail domains. */
104
+ export interface IReq_GetGatewayClientMailDomainCount extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientMailDomainCount> {
105
+ method: 'getGatewayClientMailDomainCount';
106
+ request: {
107
+ identity?: IGatewayIdentity;
108
+ apiToken?: string;
109
+ };
110
+ response: {
111
+ count: number;
112
+ };
113
+ }
103
114
  export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientDomains> {
104
115
  method: 'getGatewayClientDomains';
105
116
  request: {
@@ -1,6 +1,6 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import type { IIdentity } from '../data/user.js';
3
- import type { IMailAddressBinding, IMailCredentialOneTimeSecret, IMailConnectionInfo, IMailDeliveryJournalEvent, IMailDeliveryStatus, IMailDomainAuthority, IMailEnvelope, IMailInboundMessagePayload, IMailOutboundIdentity, IMailOutboundMessagePayload, IMailRecipientResolution, IMailResourceOwner, IMailSpoolItem, IWorkAppMailBinding } from '../data/mail.js';
3
+ import type { IMailAddressBinding, IMailCredentialOneTimeSecret, IMailConnectionInfo, IMailDeliveryJournalEvent, IMailDeliveryStatus, IMailDomainAuthority, IMailEnvelope, IMailInboundMessagePayload, IMailOutboundIdentity, IMailOutboundMessagePayload, IMailRecipientResolution, IMailResourceOwner, IMailSpoolItem, IWorkAppMailBinding, TMailSubmissionErrorCode } from '../data/mail.js';
4
4
  export interface IMailControlRequestAuth {
5
5
  identity?: IIdentity;
6
6
  apiToken?: string;
@@ -212,6 +212,7 @@ export interface IReq_EnqueueMail extends plugins.typedrequestInterfaces.impleme
212
212
  accepted: boolean;
213
213
  spoolItemId?: string;
214
214
  outboundIdentity?: IMailOutboundIdentity;
215
+ errorCode?: TMailSubmissionErrorCode;
215
216
  message?: string;
216
217
  };
217
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "19.6.1",
3
+ "version": "19.8.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
@@ -17,7 +17,7 @@
17
17
  "devDependencies": {
18
18
  "@git.zone/tsbuild": "^4.4.2",
19
19
  "@git.zone/tsdoc": "^2.1.1",
20
- "@git.zone/tsrun": "^2.0.5",
20
+ "@git.zone/tsrun": "^2.0.6",
21
21
  "@git.zone/tstest": "^3.6.7",
22
22
  "@types/node": "^26.1.1"
23
23
  },
package/readme.md CHANGED
@@ -287,7 +287,7 @@ The immutable deployment workflow is:
287
287
 
288
288
  `data.IServiceDeploymentOperation` is the durable revisioned compare-and-set fence for this workflow. Image promotion requires Cloudly-created trusted evidence that binds the operation, actor, repository, exact tag, root digest, and OCI index media type. The service request group also exposes deployment preflight, exact-digest rollback, retry, and cleanup contracts.
289
289
 
290
- Gateway request contracts include `getGatewayClientRoutes` (`requests.gateway.IReq_GetGatewayClientRoutes`) for listing owned `IGatewayClientRoute[]` route views, and `syncGatewayClientRoute` for idempotently syncing or deleting hostname-owned, routeRef-owned, and combined hostname-plus-routeRef routes. A client can label canonical intent with `managedRouteKind: 'letsencrypt-http01-forward'` and set a higher `priority` for a path-specific HTTP-01 route while retaining a separate normal route for the same hostname. Mail request contracts include `syncMailAddressBinding`, `deleteMailAddressBinding`, `rotateMailCredential`, and `getMailDeliveryStatus`. `IReq_GetMailDeliveryStatus` looks up a delivery spool item by `spoolItemId`, returns `data.IMailDeliveryStatus`, and accepts `IMailSubmissionRequestAuth` so service-mail credentials can query their own accepted, queued, deferred, delivered, or failed status. `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.
290
+ Gateway request contracts include `getGatewayClientRoutes` (`requests.gateway.IReq_GetGatewayClientRoutes`) for listing owned `IGatewayClientRoute[]` route views, and `syncGatewayClientRoute` for idempotently syncing or deleting hostname-owned, routeRef-owned, and combined hostname-plus-routeRef routes. A client can label canonical intent with `managedRouteKind: 'letsencrypt-http01-forward'` and set a higher `priority` for a path-specific HTTP-01 route while retaining a separate normal route for the same hostname. Mail request contracts include `syncMailAddressBinding`, `deleteMailAddressBinding`, `rotateMailCredential`, and `getMailDeliveryStatus`. `IReq_GetMailDeliveryStatus` looks up a delivery spool item by `spoolItemId`, returns `data.IMailDeliveryStatus`, and accepts `IMailSubmissionRequestAuth` so service-mail credentials can query their own accepted, queued, deferred, delivered, or failed status. Typed outbound messages may set `replyTo` to one bare ASCII mailbox address; arbitrary `Reply-To` values do not belong in the custom header bag. Invalid values and typed-field/custom-header conflicts return stable `TMailSubmissionErrorCode` values. `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.
291
291
 
292
292
  ### Web Push Contracts
293
293
 
@@ -345,7 +345,7 @@ const provisioning: requests.gateway.IReq_ProvisionGatewayClientCredential['requ
345
345
  };
346
346
  ```
347
347
 
348
- `getGatewayClientContext` returns effective live policy. A `gatewayClient` role necessarily includes the credential ID, bound client ID/type, and `policyGeneration`; consumers should reject admin/operator or mismatched contexts rather than falling back to a caller-supplied owner ID. `getGatewayClientMailOverview` provides an owner-scoped domain and recent-message summary. Cloudly therefore uses only `dcrouterGatewayApiToken`; the former `dcrouterOpsApiToken` setting is not part of `data.ICloudlySettings`.
348
+ `getGatewayClientContext` returns effective live policy. A `gatewayClient` role necessarily includes the credential ID, bound client ID/type, and `policyGeneration`; consumers should reject admin/operator or mismatched contexts rather than falling back to a caller-supplied owner ID. `getGatewayClientMailOverview` provides an owner-scoped domain and recent-message summary. `getGatewayClientMailDomainCount` derives ownership exclusively from the authenticating gateway credential and returns `{ count: number }` for its distinct configured mail domains. Cloudly therefore uses only `dcrouterGatewayApiToken`; the former `dcrouterOpsApiToken` setting is not part of `data.ICloudlySettings`.
349
349
 
350
350
  Request groups are exported by product area:
351
351
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '19.6.1',
6
+ version: '19.8.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
package/ts/data/mail.ts CHANGED
@@ -50,6 +50,10 @@ export type TMailDeliveryJournalEventType =
50
50
  | 'bounced'
51
51
  | 'complaint';
52
52
 
53
+ export type TMailSubmissionErrorCode =
54
+ | 'INVALID_REPLY_TO'
55
+ | 'REPLY_TO_FIELD_HEADER_CONFLICT';
56
+
53
57
  /**
54
58
  * Runtime owner of a mail resource. `appInstanceId` is the deployed WorkApp or service
55
59
  * instance, not an App Store template id.
@@ -385,6 +389,8 @@ export interface IMailOutboundMessagePayload {
385
389
  to: string[];
386
390
  cc?: string[];
387
391
  bcc?: string[];
392
+ /** One bare ASCII mailbox address. Display names and address lists are not supported. */
393
+ replyTo?: string;
388
394
  subject: string;
389
395
  text?: string;
390
396
  html?: string;
@@ -141,6 +141,21 @@ export interface IReq_GetGatewayClientMailOverview extends plugins.typedrequestI
141
141
  };
142
142
  }
143
143
 
144
+ /** Cheap gateway-client-owned count of distinct configured mail domains. */
145
+ export interface IReq_GetGatewayClientMailDomainCount extends plugins.typedrequestInterfaces.implementsTR<
146
+ plugins.typedrequestInterfaces.ITypedRequest,
147
+ IReq_GetGatewayClientMailDomainCount
148
+ > {
149
+ method: 'getGatewayClientMailDomainCount';
150
+ request: {
151
+ identity?: IGatewayIdentity;
152
+ apiToken?: string;
153
+ };
154
+ response: {
155
+ count: number;
156
+ };
157
+ }
158
+
144
159
  export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<
145
160
  plugins.typedrequestInterfaces.ITypedRequest,
146
161
  IReq_GetGatewayClientDomains
@@ -15,6 +15,7 @@ import type {
15
15
  IMailResourceOwner,
16
16
  IMailSpoolItem,
17
17
  IWorkAppMailBinding,
18
+ TMailSubmissionErrorCode,
18
19
  } from '../data/mail.js';
19
20
 
20
21
  export interface IMailControlRequestAuth {
@@ -305,6 +306,7 @@ export interface IReq_EnqueueMail extends plugins.typedrequestInterfaces.impleme
305
306
  accepted: boolean;
306
307
  spoolItemId?: string;
307
308
  outboundIdentity?: IMailOutboundIdentity;
309
+ errorCode?: TMailSubmissionErrorCode;
308
310
  message?: string;
309
311
  };
310
312
  }