@idp.global/interfaces 25.0.0 → 25.1.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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-18 - 25.1.0
4
+
5
+ ### Features
6
+
7
+ - add administrator recovery state and request contracts (admin-recovery)
8
+ - Add persisted and public DTO administrator recovery state types.
9
+ - Expose administratorRecovery on user data and global admin DTOs.
10
+ - Add typed admin requests for requesting and approving replacement-passkey recovery operations.
11
+
3
12
  ## 2026-07-18 - 25.0.0
4
13
 
5
14
  ### Breaking Changes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '25.0.0',
6
+ version: '25.1.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -27,6 +27,28 @@ export type TBreakGlassAccess = IBreakGlassAccessBase & ({
27
27
  reviewedAt: number;
28
28
  reviewOutcome: TBreakGlassReviewOutcome;
29
29
  });
30
+ interface IAdministratorRecoveryBase {
31
+ operationId: string;
32
+ /** Custody-protected binding to the recovery-authenticated login session. */
33
+ requestingSessionRef: string;
34
+ requestedAt: number;
35
+ approvalExpiresAt: number;
36
+ }
37
+ export type TAdministratorRecovery = IAdministratorRecoveryBase & ({
38
+ status: 'pending';
39
+ } | {
40
+ status: 'active';
41
+ approvedByUserRef: string;
42
+ approvedAt: number;
43
+ activeUntil: number;
44
+ } | {
45
+ status: 'completed';
46
+ approvedByUserRef: string;
47
+ approvedAt: number;
48
+ activeUntil: number;
49
+ completedAt: number;
50
+ passkeyCredentialRef: string;
51
+ });
30
52
  export interface IUser {
31
53
  id: string;
32
54
  data: {
@@ -71,6 +93,11 @@ export interface IUser {
71
93
  * time-bounded and a reviewed record is retained until the next request.
72
94
  */
73
95
  breakGlassAccess?: TBreakGlassAccess | null;
96
+ /**
97
+ * Controlled, one-time replacement-passkey enrollment for a global
98
+ * administrator. Approval never grants ordinary administrator authority.
99
+ */
100
+ administratorRecovery?: TAdministratorRecovery | null;
74
101
  /**
75
102
  * Links to external identities established via enterprise SSO.
76
103
  * One entry per SSO connection the user has signed in through.
@@ -23,6 +23,23 @@ export type TBreakGlassAccessDto = IBreakGlassAccessDtoBase & ({
23
23
  reviewedAt: number;
24
24
  reviewOutcome: TBreakGlassReviewOutcome;
25
25
  });
26
+ interface IAdministratorRecoveryDtoBase {
27
+ operationId: string;
28
+ requestedAt: number;
29
+ approvalExpiresAt: number;
30
+ }
31
+ export type TAdministratorRecoveryDto = IAdministratorRecoveryDtoBase & ({
32
+ status: 'pending';
33
+ } | {
34
+ status: 'active' | 'expired';
35
+ approvedAt: number;
36
+ activeUntil: number;
37
+ } | {
38
+ status: 'completed';
39
+ approvedAt: number;
40
+ activeUntil: number;
41
+ completedAt: number;
42
+ });
26
43
  export interface IUserDataDto {
27
44
  name: string;
28
45
  username: string;
@@ -34,6 +51,8 @@ export interface IUserDataDto {
34
51
  globalCapabilities: TDelegableGlobalCapability[];
35
52
  /** Current public-safe break-glass state, without custody references. */
36
53
  breakGlassAccess?: TBreakGlassAccessDto | null;
54
+ /** Current public-safe administrator-recovery state. */
55
+ administratorRecovery?: TAdministratorRecoveryDto | null;
37
56
  }
38
57
  export interface IUserDto {
39
58
  id: string;
@@ -68,6 +87,8 @@ export interface IGlobalUserAdminDto {
68
87
  globalCapabilities: TDelegableGlobalCapability[];
69
88
  /** Current public-safe break-glass request/grant/review state. */
70
89
  breakGlassAccess: TBreakGlassAccessDto | null;
90
+ /** Current public-safe administrator-recovery state. */
91
+ administratorRecovery: TAdministratorRecoveryDto | null;
71
92
  /** number of organizations the user belongs to */
72
93
  orgCount: number;
73
94
  /** epoch ms; derived for accounts created before this field existed */
@@ -341,6 +341,40 @@ export interface IReq_ReviewBreakGlassAccess extends plugins.typedRequestInterfa
341
341
  user: dto.IGlobalUserAdminDto;
342
342
  };
343
343
  }
344
+ /**
345
+ * Request one controlled replacement-passkey enrollment for the authenticated
346
+ * global administrator. The current session must carry a fresh recovery
347
+ * factor, and approval does not grant any ordinary administrator operation.
348
+ */
349
+ export interface IReq_RequestAdministratorRecovery extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RequestAdministratorRecovery> {
350
+ method: 'requestAdministratorRecovery';
351
+ request: {
352
+ jwt: string;
353
+ operationId: string;
354
+ /** Exact current revision of the authenticated global administrator. */
355
+ expectedUserRevision: number;
356
+ };
357
+ response: {
358
+ user: dto.IGlobalUserAdminDto;
359
+ };
360
+ }
361
+ /**
362
+ * Approve one pending replacement-passkey enrollment for a different global
363
+ * administrator. The approver must use a fresh phishing-resistant factor.
364
+ */
365
+ export interface IReq_ApproveAdministratorRecovery extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ApproveAdministratorRecovery> {
366
+ method: 'approveAdministratorRecovery';
367
+ request: {
368
+ jwt: string;
369
+ operationId: string;
370
+ userId: string;
371
+ /** Exact current revision of the requesting global administrator. */
372
+ expectedUserRevision: number;
373
+ };
374
+ response: {
375
+ user: dto.IGlobalUserAdminDto;
376
+ };
377
+ }
344
378
  /**
345
379
  * Platform-wide organization directory with member counts (admin only)
346
380
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "25.0.0",
3
+ "version": "25.1.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '25.0.0',
6
+ version: '25.1.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
package/ts/data/user.ts CHANGED
@@ -44,6 +44,32 @@ export type TBreakGlassAccess = IBreakGlassAccessBase & (
44
44
  }
45
45
  );
46
46
 
47
+ interface IAdministratorRecoveryBase {
48
+ operationId: string;
49
+ /** Custody-protected binding to the recovery-authenticated login session. */
50
+ requestingSessionRef: string;
51
+ requestedAt: number;
52
+ approvalExpiresAt: number;
53
+ }
54
+
55
+ export type TAdministratorRecovery = IAdministratorRecoveryBase & (
56
+ | { status: 'pending' }
57
+ | {
58
+ status: 'active';
59
+ approvedByUserRef: string;
60
+ approvedAt: number;
61
+ activeUntil: number;
62
+ }
63
+ | {
64
+ status: 'completed';
65
+ approvedByUserRef: string;
66
+ approvedAt: number;
67
+ activeUntil: number;
68
+ completedAt: number;
69
+ passkeyCredentialRef: string;
70
+ }
71
+ );
72
+
47
73
  export interface IUser {
48
74
  id: string;
49
75
  data: {
@@ -89,6 +115,11 @@ export interface IUser {
89
115
  * time-bounded and a reviewed record is retained until the next request.
90
116
  */
91
117
  breakGlassAccess?: TBreakGlassAccess | null;
118
+ /**
119
+ * Controlled, one-time replacement-passkey enrollment for a global
120
+ * administrator. Approval never grants ordinary administrator authority.
121
+ */
122
+ administratorRecovery?: TAdministratorRecovery | null;
92
123
  /**
93
124
  * Links to external identities established via enterprise SSO.
94
125
  * One entry per SSO connection the user has signed in through.
package/ts/dto/user.ts CHANGED
@@ -34,6 +34,27 @@ export type TBreakGlassAccessDto = IBreakGlassAccessDtoBase & (
34
34
  }
35
35
  );
36
36
 
37
+ interface IAdministratorRecoveryDtoBase {
38
+ operationId: string;
39
+ requestedAt: number;
40
+ approvalExpiresAt: number;
41
+ }
42
+
43
+ export type TAdministratorRecoveryDto = IAdministratorRecoveryDtoBase & (
44
+ | { status: 'pending' }
45
+ | {
46
+ status: 'active' | 'expired';
47
+ approvedAt: number;
48
+ activeUntil: number;
49
+ }
50
+ | {
51
+ status: 'completed';
52
+ approvedAt: number;
53
+ activeUntil: number;
54
+ completedAt: number;
55
+ }
56
+ );
57
+
37
58
  export interface IUserDataDto {
38
59
  name: string;
39
60
  username: string;
@@ -45,6 +66,8 @@ export interface IUserDataDto {
45
66
  globalCapabilities: TDelegableGlobalCapability[];
46
67
  /** Current public-safe break-glass state, without custody references. */
47
68
  breakGlassAccess?: TBreakGlassAccessDto | null;
69
+ /** Current public-safe administrator-recovery state. */
70
+ administratorRecovery?: TAdministratorRecoveryDto | null;
48
71
  }
49
72
 
50
73
  export interface IUserDto {
@@ -82,6 +105,8 @@ export interface IGlobalUserAdminDto {
82
105
  globalCapabilities: TDelegableGlobalCapability[];
83
106
  /** Current public-safe break-glass request/grant/review state. */
84
107
  breakGlassAccess: TBreakGlassAccessDto | null;
108
+ /** Current public-safe administrator-recovery state. */
109
+ administratorRecovery: TAdministratorRecoveryDto | null;
85
110
  /** number of organizations the user belongs to */
86
111
  orgCount: number;
87
112
  /** epoch ms; derived for accounts created before this field existed */
@@ -438,6 +438,50 @@ export interface IReq_ReviewBreakGlassAccess
438
438
  };
439
439
  }
440
440
 
441
+ /**
442
+ * Request one controlled replacement-passkey enrollment for the authenticated
443
+ * global administrator. The current session must carry a fresh recovery
444
+ * factor, and approval does not grant any ordinary administrator operation.
445
+ */
446
+ export interface IReq_RequestAdministratorRecovery
447
+ extends plugins.typedRequestInterfaces.implementsTR<
448
+ plugins.typedRequestInterfaces.ITypedRequest,
449
+ IReq_RequestAdministratorRecovery
450
+ > {
451
+ method: 'requestAdministratorRecovery';
452
+ request: {
453
+ jwt: string;
454
+ operationId: string;
455
+ /** Exact current revision of the authenticated global administrator. */
456
+ expectedUserRevision: number;
457
+ };
458
+ response: {
459
+ user: dto.IGlobalUserAdminDto;
460
+ };
461
+ }
462
+
463
+ /**
464
+ * Approve one pending replacement-passkey enrollment for a different global
465
+ * administrator. The approver must use a fresh phishing-resistant factor.
466
+ */
467
+ export interface IReq_ApproveAdministratorRecovery
468
+ extends plugins.typedRequestInterfaces.implementsTR<
469
+ plugins.typedRequestInterfaces.ITypedRequest,
470
+ IReq_ApproveAdministratorRecovery
471
+ > {
472
+ method: 'approveAdministratorRecovery';
473
+ request: {
474
+ jwt: string;
475
+ operationId: string;
476
+ userId: string;
477
+ /** Exact current revision of the requesting global administrator. */
478
+ expectedUserRevision: number;
479
+ };
480
+ response: {
481
+ user: dto.IGlobalUserAdminDto;
482
+ };
483
+ }
484
+
441
485
  /**
442
486
  * Platform-wide organization directory with member counts (admin only)
443
487
  */