@serve.zone/interfaces 28.2.0 → 28.3.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,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-09-08 - 28.3.0
4
+
5
+ ### Features
6
+
7
+ - add human credential administration contracts (admin)
8
+ - Define getHumanCredential and mutateHumanCredential TypedRequest interfaces for inspecting and mutating human credential metadata.
9
+ - Support password rotation, password login revocation, and session revocation operations with generation checks and replay handling.
10
+ - Document human credential administration behavior, session invalidation semantics, and password handling expectations.
11
+
12
+ ### Fixes
13
+
14
+ - pin @types/node and update pnpm package manager (package)
15
+ - Pins @types/node at 26.4.0 instead of using a caret range.
16
+ - Updates packageManager from pnpm 11.25.0 to 12.2.1.
17
+
3
18
  ## 2026-09-06 - 28.2.0
4
19
 
5
20
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '28.2.0',
6
+ version: '28.3.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=
@@ -1,5 +1,49 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import type { IIdentity, IIdentityCredential, IServiceDeploymentGrant } from '../data/user.js';
3
+ /** Backend-owned human credential metadata; never includes a password verifier. */
4
+ export interface IHumanCredentialMetadata {
5
+ userId: string;
6
+ generation: number;
7
+ passwordEnabled: boolean;
8
+ updatedAt: number;
9
+ }
10
+ export interface IReq_Admin_GetHumanCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_GetHumanCredential> {
11
+ method: 'getHumanCredential';
12
+ request: {
13
+ identity: IIdentityCredential;
14
+ userId: string;
15
+ };
16
+ response: {
17
+ credential: IHumanCredentialMetadata;
18
+ };
19
+ }
20
+ /**
21
+ * Requires a recently authenticated human administrator. Each operation invalidates
22
+ * previously issued human UI/API and registry sessions. Revoking a password retains
23
+ * the user's upstream OIDC binding, so a new trusted OIDC login remains possible.
24
+ */
25
+ export interface IReq_Admin_MutateHumanCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_MutateHumanCredential> {
26
+ method: 'mutateHumanCredential';
27
+ request: {
28
+ identity: IIdentityCredential;
29
+ userId: string;
30
+ mutationId: string;
31
+ expectedGeneration: number;
32
+ operation: {
33
+ kind: 'rotatePassword';
34
+ password: string;
35
+ } | {
36
+ kind: 'revokePassword';
37
+ } | {
38
+ kind: 'revokeSessions';
39
+ };
40
+ };
41
+ response: {
42
+ /** Historical on replay; read getHumanCredential for current state. */
43
+ credential: IHumanCredentialMetadata;
44
+ replayed: boolean;
45
+ };
46
+ }
3
47
  export interface IReq_Admin_LoginWithUsernameAndPassword extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_LoginWithUsernameAndPassword> {
4
48
  method: 'adminLoginWithUsernameAndPassword';
5
49
  request: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "28.2.0",
3
+ "version": "28.3.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
@@ -31,7 +31,7 @@
31
31
  "@git.zone/tsdoc": "^2.2.0",
32
32
  "@git.zone/tsrun": "^2.0.6",
33
33
  "@git.zone/tstest": "^4.0.0",
34
- "@types/node": "^26.4.1"
34
+ "@types/node": "26.4.0"
35
35
  },
36
36
  "files": [
37
37
  "ts/**/*",
package/readme.md CHANGED
@@ -47,6 +47,21 @@ validator; unlike `@serve.zone/interfaces/runtime`, it does not load the general
47
47
  runtime graph, `plugins.js`, SmartCrypto, TypedRequest, Corestore, or settlement
48
48
  runtime modules.
49
49
 
50
+ ### Human Credential Administration
51
+
52
+ `requests.admin.getHumanCredential` and `mutateHumanCredential` describe human
53
+ credential inspection and mutation for recently authenticated administrators.
54
+ Operations rotate a password, revoke password login, or revoke existing sessions.
55
+ Each successful mutation advances the generation and invalidates older human
56
+ UI/API and OCI registry sessions. Upstream OIDC identity bindings remain intact.
57
+
58
+ Send the expected generation and a stable mutation ID. After a lost response,
59
+ authenticate again and repeat the same request. A replay returns the original
60
+ metadata without applying the operation again; inspect current metadata separately.
61
+ Requests containing passwords must never be logged. Responses contain no passwords
62
+ or verifiers. Cloudly owns validation, atomic persistence, and session enforcement;
63
+ these shared contracts alone do not implement an endpoint.
64
+
50
65
  ### Node Credential Administration
51
66
 
52
67
  `requests.node` defines `getNodeCredential`, `rotateNodeCredential` and
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '28.2.0',
6
+ version: '28.3.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
@@ -1,6 +1,50 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import type { IIdentity, IIdentityCredential, IServiceDeploymentGrant } from '../data/user.js';
3
3
 
4
+ /** Backend-owned human credential metadata; never includes a password verifier. */
5
+ export interface IHumanCredentialMetadata {
6
+ userId: string;
7
+ generation: number;
8
+ passwordEnabled: boolean;
9
+ updatedAt: number;
10
+ }
11
+
12
+ export interface IReq_Admin_GetHumanCredential extends plugins.typedrequestInterfaces.implementsTR<
13
+ plugins.typedrequestInterfaces.ITypedRequest,
14
+ IReq_Admin_GetHumanCredential
15
+ > {
16
+ method: 'getHumanCredential';
17
+ request: { identity: IIdentityCredential; userId: string };
18
+ response: { credential: IHumanCredentialMetadata };
19
+ }
20
+
21
+ /**
22
+ * Requires a recently authenticated human administrator. Each operation invalidates
23
+ * previously issued human UI/API and registry sessions. Revoking a password retains
24
+ * the user's upstream OIDC binding, so a new trusted OIDC login remains possible.
25
+ */
26
+ export interface IReq_Admin_MutateHumanCredential extends plugins.typedrequestInterfaces.implementsTR<
27
+ plugins.typedrequestInterfaces.ITypedRequest,
28
+ IReq_Admin_MutateHumanCredential
29
+ > {
30
+ method: 'mutateHumanCredential';
31
+ request: {
32
+ identity: IIdentityCredential;
33
+ userId: string;
34
+ mutationId: string;
35
+ expectedGeneration: number;
36
+ operation:
37
+ | { kind: 'rotatePassword'; password: string }
38
+ | { kind: 'revokePassword' }
39
+ | { kind: 'revokeSessions' };
40
+ };
41
+ response: {
42
+ /** Historical on replay; read getHumanCredential for current state. */
43
+ credential: IHumanCredentialMetadata;
44
+ replayed: boolean;
45
+ };
46
+ }
47
+
4
48
  export interface IReq_Admin_LoginWithUsernameAndPassword extends plugins.typedrequestInterfaces.implementsTR<
5
49
  plugins.typedrequestInterfaces.ITypedRequest,
6
50
  IReq_Admin_LoginWithUsernameAndPassword