@idp.global/interfaces 25.2.0 → 26.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 +18 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/emailactiontoken.d.ts +8 -0
- package/dist_ts/data/registrationsession.d.ts +8 -0
- package/dist_ts/dto/activity.d.ts +1 -1
- package/dist_ts/request/login.d.ts +16 -0
- package/dist_ts/request/registration.d.ts +19 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/emailactiontoken.ts +8 -0
- package/ts/data/registrationsession.ts +8 -0
- package/ts/dto/activity.ts +20 -0
- package/ts/request/login.ts +21 -0
- package/ts/request/registration.ts +24 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-22 - 26.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- add email code verification contracts (auth)
|
|
8
|
+
- Require codeHash and codeAttemptsRemaining on email action tokens and registration sessions
|
|
9
|
+
- Add typed requests for login and registration email code verification
|
|
10
|
+
|
|
11
|
+
## 2026-07-18 - 25.2.1
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- include administrator recovery events in activity DTO union (activity-dto)
|
|
16
|
+
- Add administrator recovery DTO variants using the administrator_recovery target and null facts.
|
|
17
|
+
- Add a type-level guard so every activity action remains represented in TActivityEventDto.
|
|
18
|
+
- update pnpm to 11.14.0 (package-manager)
|
|
19
|
+
- Updates the packageManager field from pnpm@11.11.0 to pnpm@11.14.0.
|
|
20
|
+
|
|
3
21
|
## 2026-07-18 - 25.2.0
|
|
4
22
|
|
|
5
23
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '26.0.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=
|
|
@@ -5,6 +5,14 @@ export interface IEmailActionToken {
|
|
|
5
5
|
email: string;
|
|
6
6
|
action: TEmailActionTokenAction;
|
|
7
7
|
tokenHash: string;
|
|
8
|
+
/**
|
|
9
|
+
* Salted hash of the 6-digit code delivered alongside the link.
|
|
10
|
+
*/
|
|
11
|
+
codeHash: string;
|
|
12
|
+
/**
|
|
13
|
+
* Remaining code verification attempts before the token is invalidated.
|
|
14
|
+
*/
|
|
15
|
+
codeAttemptsRemaining: number;
|
|
8
16
|
validUntil: number;
|
|
9
17
|
createdAt: number;
|
|
10
18
|
};
|
|
@@ -4,6 +4,14 @@ export interface IRegistrationSession {
|
|
|
4
4
|
data: {
|
|
5
5
|
emailAddress: string;
|
|
6
6
|
hashedEmailToken: string;
|
|
7
|
+
/**
|
|
8
|
+
* Salted hash of the 6-digit code delivered alongside the link.
|
|
9
|
+
*/
|
|
10
|
+
codeHash: string;
|
|
11
|
+
/**
|
|
12
|
+
* Remaining code verification attempts before the session is invalidated.
|
|
13
|
+
*/
|
|
14
|
+
codeAttemptsRemaining: number;
|
|
7
15
|
status: TRegistrationSessionStatus;
|
|
8
16
|
validUntil: number;
|
|
9
17
|
createdAt: number;
|
|
@@ -24,7 +24,7 @@ export type TActivityEventDto = TActivityEventFor<'login', 'account', {
|
|
|
24
24
|
roleChange: TActivityRoleChange;
|
|
25
25
|
}> | TActivityEventFor<'org_app_role_mappings_updated', 'organization_role_mapping', null> | TActivityEventFor<'profile_updated', 'profile', null> | TActivityEventFor<'totp_enabled', 'mfa_method', null> | TActivityEventFor<'totp_disabled', 'mfa_method', null> | TActivityEventFor<'backup_codes_regenerated', 'mfa_method', null> | TActivityEventFor<'mfa_completed', 'mfa_method', {
|
|
26
26
|
factor: TActivityMfaFactor;
|
|
27
|
-
}> | TActivityEventFor<'passkey_registered', 'passkey', null> | TActivityEventFor<'passkey_revoked', 'passkey', null> | TActivityEventFor<'passkey_login', 'passkey', null> | TActivityEventFor<'app_connected', 'application_connection', null> | TActivityEventFor<'app_disconnected', 'application_connection', null> | TActivityEventFor<'user_suspended', 'account', null> | TActivityEventFor<'user_unsuspended', 'account', null> | TActivityEventFor<'global_admin_granted', 'account', null> | TActivityEventFor<'global_admin_removed', 'account', null> | TActivityEventFor<'global_capabilities_changed', 'account', null> | TActivityEventFor<'break_glass_requested', 'break_glass_access', null> | TActivityEventFor<'break_glass_activated', 'break_glass_access', null> | TActivityEventFor<'break_glass_used', 'break_glass_access', null> | TActivityEventFor<'break_glass_reviewed', 'break_glass_access', null> | TActivityEventFor<'account_deletion_requested', 'account', null> | TActivityEventFor<'account_deletion_cancelled', 'account', null> | TActivityEventFor<'account_purged', 'account', null> | TActivityEventFor<'sso_connection_created', 'sso_connection', {
|
|
27
|
+
}> | TActivityEventFor<'passkey_registered', 'passkey', null> | TActivityEventFor<'passkey_revoked', 'passkey', null> | TActivityEventFor<'passkey_login', 'passkey', null> | TActivityEventFor<'app_connected', 'application_connection', null> | TActivityEventFor<'app_disconnected', 'application_connection', null> | TActivityEventFor<'user_suspended', 'account', null> | TActivityEventFor<'user_unsuspended', 'account', null> | TActivityEventFor<'global_admin_granted', 'account', null> | TActivityEventFor<'global_admin_removed', 'account', null> | TActivityEventFor<'global_capabilities_changed', 'account', null> | TActivityEventFor<'break_glass_requested', 'break_glass_access', null> | TActivityEventFor<'break_glass_activated', 'break_glass_access', null> | TActivityEventFor<'break_glass_used', 'break_glass_access', null> | TActivityEventFor<'break_glass_reviewed', 'break_glass_access', null> | TActivityEventFor<'administrator_recovery_requested', 'administrator_recovery', null> | TActivityEventFor<'administrator_recovery_activated', 'administrator_recovery', null> | TActivityEventFor<'administrator_recovery_completed', 'administrator_recovery', null> | TActivityEventFor<'account_deletion_requested', 'account', null> | TActivityEventFor<'account_deletion_cancelled', 'account', null> | TActivityEventFor<'account_purged', 'account', null> | TActivityEventFor<'sso_connection_created', 'sso_connection', {
|
|
28
28
|
protocol: 'saml';
|
|
29
29
|
}> | TActivityEventFor<'sso_connection_updated', 'sso_connection', {
|
|
30
30
|
protocol: 'saml';
|
|
@@ -36,6 +36,22 @@ export interface IReq_LoginWithEmailAfterEmailTokenAquired extends plugins.typed
|
|
|
36
36
|
availableMfaMethods?: data.TMfaMethod[];
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
export interface IReq_LoginWithEmailCode extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_LoginWithEmailCode> {
|
|
40
|
+
method: 'loginWithEmailCode';
|
|
41
|
+
request: {
|
|
42
|
+
email: string;
|
|
43
|
+
/**
|
|
44
|
+
* the 6-digit code delivered in the sign-in email alongside the link
|
|
45
|
+
*/
|
|
46
|
+
code: string;
|
|
47
|
+
};
|
|
48
|
+
response: {
|
|
49
|
+
refreshToken?: string;
|
|
50
|
+
twoFaNeeded?: boolean;
|
|
51
|
+
mfaChallengeToken?: string;
|
|
52
|
+
availableMfaMethods?: data.TMfaMethod[];
|
|
53
|
+
};
|
|
54
|
+
}
|
|
39
55
|
export interface ILogoutRequest extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, ILogoutRequest> {
|
|
40
56
|
method: 'logout';
|
|
41
57
|
request: {
|
|
@@ -31,6 +31,25 @@ export interface IReq_AfterRegistrationEmailClicked extends plugins.typedRequest
|
|
|
31
31
|
email: string;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
+
export interface IReq_VerifyRegistrationEmailCode extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_VerifyRegistrationEmailCode> {
|
|
35
|
+
method: 'verifyRegistrationEmailCode';
|
|
36
|
+
request: {
|
|
37
|
+
email: string;
|
|
38
|
+
/**
|
|
39
|
+
* the 6-digit code delivered in the verification email alongside the link
|
|
40
|
+
*/
|
|
41
|
+
code: string;
|
|
42
|
+
};
|
|
43
|
+
response: {
|
|
44
|
+
status: 'ok' | 'not ok';
|
|
45
|
+
/**
|
|
46
|
+
* continuation token equivalent to the emailed link token; feeds the
|
|
47
|
+
* registration stepper exactly like a clicked link
|
|
48
|
+
*/
|
|
49
|
+
token: string;
|
|
50
|
+
email: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
34
53
|
export interface IReq_SetDataForRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetDataForRegistration> {
|
|
35
54
|
method: 'setDataForRegistration';
|
|
36
55
|
request: {
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -6,6 +6,14 @@ export interface IEmailActionToken {
|
|
|
6
6
|
email: string;
|
|
7
7
|
action: TEmailActionTokenAction;
|
|
8
8
|
tokenHash: string;
|
|
9
|
+
/**
|
|
10
|
+
* Salted hash of the 6-digit code delivered alongside the link.
|
|
11
|
+
*/
|
|
12
|
+
codeHash: string;
|
|
13
|
+
/**
|
|
14
|
+
* Remaining code verification attempts before the token is invalidated.
|
|
15
|
+
*/
|
|
16
|
+
codeAttemptsRemaining: number;
|
|
9
17
|
validUntil: number;
|
|
10
18
|
createdAt: number;
|
|
11
19
|
};
|
|
@@ -9,6 +9,14 @@ export interface IRegistrationSession {
|
|
|
9
9
|
data: {
|
|
10
10
|
emailAddress: string;
|
|
11
11
|
hashedEmailToken: string;
|
|
12
|
+
/**
|
|
13
|
+
* Salted hash of the 6-digit code delivered alongside the link.
|
|
14
|
+
*/
|
|
15
|
+
codeHash: string;
|
|
16
|
+
/**
|
|
17
|
+
* Remaining code verification attempts before the session is invalidated.
|
|
18
|
+
*/
|
|
19
|
+
codeAttemptsRemaining: number;
|
|
12
20
|
status: TRegistrationSessionStatus;
|
|
13
21
|
validUntil: number;
|
|
14
22
|
createdAt: number;
|
package/ts/dto/activity.ts
CHANGED
|
@@ -82,6 +82,21 @@ export type TActivityEventDto =
|
|
|
82
82
|
| TActivityEventFor<'break_glass_activated', 'break_glass_access', null>
|
|
83
83
|
| TActivityEventFor<'break_glass_used', 'break_glass_access', null>
|
|
84
84
|
| TActivityEventFor<'break_glass_reviewed', 'break_glass_access', null>
|
|
85
|
+
| TActivityEventFor<
|
|
86
|
+
'administrator_recovery_requested',
|
|
87
|
+
'administrator_recovery',
|
|
88
|
+
null
|
|
89
|
+
>
|
|
90
|
+
| TActivityEventFor<
|
|
91
|
+
'administrator_recovery_activated',
|
|
92
|
+
'administrator_recovery',
|
|
93
|
+
null
|
|
94
|
+
>
|
|
95
|
+
| TActivityEventFor<
|
|
96
|
+
'administrator_recovery_completed',
|
|
97
|
+
'administrator_recovery',
|
|
98
|
+
null
|
|
99
|
+
>
|
|
85
100
|
| TActivityEventFor<'account_deletion_requested', 'account', null>
|
|
86
101
|
| TActivityEventFor<'account_deletion_cancelled', 'account', null>
|
|
87
102
|
| TActivityEventFor<'account_purged', 'account', null>
|
|
@@ -147,3 +162,8 @@ export type TActivityEventDto =
|
|
|
147
162
|
>
|
|
148
163
|
| TActivityEventFor<'org_suspended', 'organization', null>
|
|
149
164
|
| TActivityEventFor<'org_unsuspended', 'organization', null>;
|
|
165
|
+
|
|
166
|
+
type TAssertNoMissingActivityActions<TValue extends never> = TValue;
|
|
167
|
+
type TActivityEventDtoHasEveryAction = TAssertNoMissingActivityActions<
|
|
168
|
+
Exclude<TActivityAction, TActivityEventDto['action']>
|
|
169
|
+
>;
|
package/ts/request/login.ts
CHANGED
|
@@ -52,6 +52,27 @@ export interface IReq_LoginWithEmailAfterEmailTokenAquired
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export interface IReq_LoginWithEmailCode
|
|
56
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
57
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
58
|
+
IReq_LoginWithEmailCode
|
|
59
|
+
> {
|
|
60
|
+
method: 'loginWithEmailCode';
|
|
61
|
+
request: {
|
|
62
|
+
email: string;
|
|
63
|
+
/**
|
|
64
|
+
* the 6-digit code delivered in the sign-in email alongside the link
|
|
65
|
+
*/
|
|
66
|
+
code: string;
|
|
67
|
+
};
|
|
68
|
+
response: {
|
|
69
|
+
refreshToken?: string;
|
|
70
|
+
twoFaNeeded?: boolean;
|
|
71
|
+
mfaChallengeToken?: string;
|
|
72
|
+
availableMfaMethods?: data.TMfaMethod[];
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
55
76
|
export interface ILogoutRequest
|
|
56
77
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
57
78
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
@@ -43,6 +43,30 @@ export interface IReq_AfterRegistrationEmailClicked
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
export interface IReq_VerifyRegistrationEmailCode
|
|
47
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
48
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
49
|
+
IReq_VerifyRegistrationEmailCode
|
|
50
|
+
> {
|
|
51
|
+
method: 'verifyRegistrationEmailCode';
|
|
52
|
+
request: {
|
|
53
|
+
email: string;
|
|
54
|
+
/**
|
|
55
|
+
* the 6-digit code delivered in the verification email alongside the link
|
|
56
|
+
*/
|
|
57
|
+
code: string;
|
|
58
|
+
};
|
|
59
|
+
response: {
|
|
60
|
+
status: 'ok' | 'not ok';
|
|
61
|
+
/**
|
|
62
|
+
* continuation token equivalent to the emailed link token; feeds the
|
|
63
|
+
* registration stepper exactly like a clicked link
|
|
64
|
+
*/
|
|
65
|
+
token: string;
|
|
66
|
+
email: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
46
70
|
export interface IReq_SetDataForRegistration
|
|
47
71
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
48
72
|
plugins.typedRequestInterfaces.ITypedRequest,
|