@serve.zone/interfaces 8.1.1 → 10.0.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-10 - 10.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - accept JWT-only credentials for cluster config requests (config)
8
+ - Add IIdentityCredential as a JWT-only authentication contract.
9
+ - Make IIdentity extend IIdentityCredential so full identities remain compatible where credentials are accepted.
10
+ - Update getClusterConfig request identity to require only the JWT needed for server-side resolution.
11
+
12
+ ## 2026-07-10 - 9.0.0
13
+
14
+ ### Breaking Changes
15
+
16
+ - require identity for baremetal request contracts (baremetal)
17
+ - Require identity on getBaremetalServers and controlBaremetal requests.
18
+ - Add typedrequest contract conformance to baremetal request interfaces.
19
+ - Update package manager metadata to pnpm 11.11.0.
20
+
3
21
  ## 2026-07-07 - 8.1.1
4
22
 
5
23
  ### Fixes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '8.1.1',
6
+ version: '10.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  };
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -3,18 +3,19 @@ export interface IToken {
3
3
  expiresAt: number;
4
4
  assignedRoles: string[];
5
5
  }
6
+ export interface IIdentityCredential {
7
+ jwt: string;
8
+ }
6
9
  /**
7
10
  * an identity is assumed by authentication as a user
8
11
  * an identity is ephemeral and has to be renewed regularly
9
12
  */
10
- export interface IIdentity {
13
+ export interface IIdentity extends IIdentityCredential {
11
14
  name: string;
12
15
  userId: string;
13
16
  type: 'machine' | 'human';
14
17
  role: 'admin' | 'user' | 'api' | 'cluster';
15
18
  expiresAt: number;
16
- /** the jwt token should contain above data for verification */
17
- jwt: string;
18
19
  }
19
20
  export interface IUser {
20
21
  id: string;
@@ -1,14 +1,19 @@
1
+ import * as plugins from '../plugins.js';
1
2
  import type { IBareMetal } from '../data/baremetal.js';
2
- export interface IRequest_Any_Cloudly_GetBaremetalServers {
3
+ import type { IIdentity } from '../data/user.js';
4
+ export interface IRequest_Any_Cloudly_GetBaremetalServers extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetBaremetalServers> {
3
5
  method: 'getBaremetalServers';
4
- request: {};
6
+ request: {
7
+ identity: IIdentity;
8
+ };
5
9
  response: {
6
10
  baremetals: IBareMetal[];
7
11
  };
8
12
  }
9
- export interface IRequest_Any_Cloudly_ControlBaremetal {
13
+ export interface IRequest_Any_Cloudly_ControlBaremetal extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_ControlBaremetal> {
10
14
  method: 'controlBaremetal';
11
15
  request: {
16
+ identity: IIdentity;
12
17
  baremetalId: string;
13
18
  action: 'powerOn' | 'powerOff' | 'reset';
14
19
  };
@@ -17,7 +17,7 @@ export interface IRequest_Any_Cloudly_GetServerConfig extends plugins.typedreque
17
17
  export interface IRequest_Any_Cloudly_GetClusterConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetClusterConfig> {
18
18
  method: 'getClusterConfig';
19
19
  request: {
20
- identity: userInterfaces.IIdentity;
20
+ identity: userInterfaces.IIdentityCredential;
21
21
  };
22
22
  response: {
23
23
  configData: clusterInterfaces.ICluster;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "8.1.1",
3
+ "version": "10.0.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
@@ -99,7 +99,7 @@ Common data contracts include:
99
99
  - `ISecretBundle` and `ISecretGroup` for secret ownership and shared secret groups.
100
100
  - Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, managed SMTP/API credentials, spool items, delivery journals, and inbound/outbound message payloads.
101
101
  - 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.
102
- - `IUser`, `IIdentity`, and token-related contracts for authentication context.
102
+ - `IUser`, JWT-only `IIdentityCredential`, full `IIdentity`, and token-related contracts for authentication context. `IIdentity` extends `IIdentityCredential` with server-issued user metadata.
103
103
  - `ICloudlyConfig`, `ICloudlySettings`, status, server, bare-metal, BaseOS, backup, and task execution interfaces for control-plane state.
104
104
 
105
105
  Shared service port helpers are exported from `data` so Cloudly, App Store resolution, Coreflow, Coretraffic, Onebox, and dcrouter agree on the same normalization rules:
@@ -138,6 +138,8 @@ interface IExampleRequest {
138
138
  }
139
139
  ```
140
140
 
141
+ `requests.config.IRequest_Any_Cloudly_GetClusterConfig` accepts `data.IIdentityCredential`, which contains only the JWT needed for server-side identity resolution. Username/password login and machine-token exchange responses continue to return the full `data.IIdentity`.
142
+
141
143
  Gateway request contracts include `getGatewayClientRoutes` (`requests.gateway.IReq_GetGatewayClientRoutes`) for listing owned `IGatewayClientRoute[]` route views, and `syncGatewayClientRoute` for idempotently syncing or deleting hostname-owned and routeRef-owned routes. 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.
142
144
 
143
145
  Request groups are exported by product area:
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '8.1.1',
6
+ version: '10.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
package/ts/data/user.ts CHANGED
@@ -4,18 +4,20 @@ export interface IToken {
4
4
  assignedRoles: string[];
5
5
  }
6
6
 
7
+ export interface IIdentityCredential {
8
+ jwt: string;
9
+ }
10
+
7
11
  /**
8
12
  * an identity is assumed by authentication as a user
9
13
  * an identity is ephemeral and has to be renewed regularly
10
14
  */
11
- export interface IIdentity {
15
+ export interface IIdentity extends IIdentityCredential {
12
16
  name: string;
13
17
  userId: string;
14
18
  type: 'machine' | 'human';
15
19
  role: 'admin' | 'user' | 'api' | 'cluster';
16
20
  expiresAt: number;
17
- /** the jwt token should contain above data for verification */
18
- jwt: string;
19
21
  }
20
22
 
21
23
  export interface IUser {
@@ -27,4 +29,4 @@ export interface IUser {
27
29
  password?: string;
28
30
  tokens?: IToken[];
29
31
  }
30
- }
32
+ }
@@ -1,17 +1,29 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import type { IBareMetal } from '../data/baremetal.js';
3
+ import type { IIdentity } from '../data/user.js';
3
4
 
4
- export interface IRequest_Any_Cloudly_GetBaremetalServers {
5
+ export interface IRequest_Any_Cloudly_GetBaremetalServers
6
+ extends plugins.typedrequestInterfaces.implementsTR<
7
+ plugins.typedrequestInterfaces.ITypedRequest,
8
+ IRequest_Any_Cloudly_GetBaremetalServers
9
+ > {
5
10
  method: 'getBaremetalServers';
6
- request: {};
11
+ request: {
12
+ identity: IIdentity;
13
+ };
7
14
  response: {
8
15
  baremetals: IBareMetal[];
9
16
  };
10
17
  }
11
18
 
12
- export interface IRequest_Any_Cloudly_ControlBaremetal {
19
+ export interface IRequest_Any_Cloudly_ControlBaremetal
20
+ extends plugins.typedrequestInterfaces.implementsTR<
21
+ plugins.typedrequestInterfaces.ITypedRequest,
22
+ IRequest_Any_Cloudly_ControlBaremetal
23
+ > {
13
24
  method: 'controlBaremetal';
14
25
  request: {
26
+ identity: IIdentity;
15
27
  baremetalId: string;
16
28
  action: 'powerOn' | 'powerOff' | 'reset';
17
29
  };
@@ -19,4 +31,4 @@ export interface IRequest_Any_Cloudly_ControlBaremetal {
19
31
  success: boolean;
20
32
  message: string;
21
33
  };
22
- }
34
+ }
@@ -27,7 +27,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
27
27
  > {
28
28
  method: 'getClusterConfig';
29
29
  request: {
30
- identity: userInterfaces.IIdentity;
30
+ identity: userInterfaces.IIdentityCredential;
31
31
  };
32
32
  response: {
33
33
  configData: clusterInterfaces.ICluster;