@idp.global/interfaces 8.0.0 → 8.0.1
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 +10 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/activity.d.ts +1 -1
- package/dist_ts/data/user.d.ts +5 -0
- package/dist_ts/dto/user.d.ts +16 -0
- package/dist_ts/request/admin.d.ts +54 -0
- package/dist_ts/request/registration.d.ts +3 -1
- package/dist_ts/request/user.d.ts +21 -0
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/activity.ts +1 -0
- package/ts/data/user.ts +5 -0
- package/ts/dto/user.ts +17 -0
- package/ts/request/admin.ts +69 -0
- package/ts/request/registration.ts +3 -1
- package/ts/request/user.ts +26 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-08 - 8.0.1
|
|
4
|
+
|
|
5
|
+
- feat(admin): add global admin directory, user suspension, and profile update contracts
|
|
6
|
+
- IReq_GetGlobalUsers: paged, searchable platform user directory (admin only)
|
|
7
|
+
- IReq_SetUserSuspension: suspend/unsuspend a user; suspension revokes sessions and JWTs
|
|
8
|
+
- IReq_GetGlobalOrgStats: platform org directory with member counts (admin only)
|
|
9
|
+
- IReq_UpdateProfile: self-service name/username/mobile update (email deliberately excluded)
|
|
10
|
+
- new IGlobalUserAdminDto; IUser gains optional createdAt; TActivityAction gains user_unsuspended
|
|
11
|
+
- deprecated: IReq_SuspendUser (use IReq_SetUserSuspension), IReq_MobileVerificationForRegistration (platform SMS service removed)
|
|
12
|
+
|
|
3
13
|
## 2026-07-08 - 8.0.0
|
|
4
14
|
|
|
5
15
|
### Breaking Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '8.0.
|
|
6
|
+
version: '8.0.1',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed';
|
|
1
|
+
export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed';
|
|
2
2
|
export interface IActivityLog {
|
|
3
3
|
id: string;
|
|
4
4
|
data: {
|
package/dist_ts/data/user.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ export interface IUser {
|
|
|
17
17
|
*/
|
|
18
18
|
passwordHash?: string;
|
|
19
19
|
status: 'new' | 'active' | 'deleted' | 'suspended';
|
|
20
|
+
/**
|
|
21
|
+
* epoch ms of account creation; absent on accounts created before this
|
|
22
|
+
* field existed (derive from the Mongo ObjectId timestamp when missing)
|
|
23
|
+
*/
|
|
24
|
+
createdAt?: number;
|
|
20
25
|
/**
|
|
21
26
|
* a quick ref for which organizations might have roles for this user
|
|
22
27
|
* speeds up lookup
|
package/dist_ts/dto/user.d.ts
CHANGED
|
@@ -23,3 +23,19 @@ export interface IUserProfileDto {
|
|
|
23
23
|
status?: IUserDataDto['status'];
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Platform-wide user summary for the global admin directory.
|
|
28
|
+
* Never contains credentials, external identities, or SCIM internals.
|
|
29
|
+
*/
|
|
30
|
+
export interface IGlobalUserAdminDto {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
username: string;
|
|
34
|
+
email: string;
|
|
35
|
+
status: IUserDataDto['status'];
|
|
36
|
+
isGlobalAdmin: boolean;
|
|
37
|
+
/** number of organizations the user belongs to */
|
|
38
|
+
orgCount: number;
|
|
39
|
+
/** epoch ms; derived for accounts created before this field existed */
|
|
40
|
+
createdAt: number;
|
|
41
|
+
}
|
|
@@ -98,3 +98,57 @@ export interface IReq_RegenerateAppCredentials extends plugins.typedRequestInter
|
|
|
98
98
|
clientSecret: string;
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Paged, searchable platform user directory (admin only)
|
|
103
|
+
*/
|
|
104
|
+
export interface IReq_GetGlobalUsers extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetGlobalUsers> {
|
|
105
|
+
method: 'getGlobalUsers';
|
|
106
|
+
request: {
|
|
107
|
+
jwt: string;
|
|
108
|
+
/** case-insensitive substring match against name, username and email */
|
|
109
|
+
search?: string;
|
|
110
|
+
limit?: number;
|
|
111
|
+
offset?: number;
|
|
112
|
+
};
|
|
113
|
+
response: {
|
|
114
|
+
users: dto.IGlobalUserAdminDto[];
|
|
115
|
+
total: number;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Suspend or unsuspend a user account (admin only).
|
|
120
|
+
* Suspension revokes all active sessions and JWTs of the target user.
|
|
121
|
+
*/
|
|
122
|
+
export interface IReq_SetUserSuspension extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetUserSuspension> {
|
|
123
|
+
method: 'setUserSuspension';
|
|
124
|
+
request: {
|
|
125
|
+
jwt: string;
|
|
126
|
+
userId: string;
|
|
127
|
+
suspended: boolean;
|
|
128
|
+
};
|
|
129
|
+
response: {
|
|
130
|
+
user: dto.IGlobalUserAdminDto;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Platform-wide organization directory with member counts (admin only)
|
|
135
|
+
*/
|
|
136
|
+
export interface IReq_GetGlobalOrgStats extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetGlobalOrgStats> {
|
|
137
|
+
method: 'getGlobalOrgStats';
|
|
138
|
+
request: {
|
|
139
|
+
jwt: string;
|
|
140
|
+
/** case-insensitive substring match against name and slug */
|
|
141
|
+
search?: string;
|
|
142
|
+
limit?: number;
|
|
143
|
+
offset?: number;
|
|
144
|
+
};
|
|
145
|
+
response: {
|
|
146
|
+
orgs: Array<{
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
slug: string;
|
|
150
|
+
memberCount: number;
|
|
151
|
+
}>;
|
|
152
|
+
total: number;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -39,7 +39,9 @@ export interface IReq_SetDataForRegistration extends plugins.typedRequestInterfa
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* @deprecated SMS verification was removed from registration — the platform
|
|
43
|
+
* no longer provides an SMS sending service. The server no longer handles
|
|
44
|
+
* this method. Kept until the next major release.
|
|
43
45
|
*/
|
|
44
46
|
export interface IReq_MobileVerificationForRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_MobileVerificationForRegistration> {
|
|
45
47
|
method: 'mobileVerificationForRegistration';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as dto from '../dto/index.js';
|
|
2
2
|
import * as plugins from '../plugins.js';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated superseded by IReq_SetUserSuspension (request/admin.ts), which
|
|
5
|
+
* supports unsuspension and returns the updated user instead of a key. Kept
|
|
6
|
+
* until the next major release.
|
|
7
|
+
*/
|
|
3
8
|
export interface IReq_SuspendUser extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SuspendUser> {
|
|
4
9
|
method: 'suspendUser';
|
|
5
10
|
request: {
|
|
@@ -59,6 +64,22 @@ export interface IReq_RevokeSession extends plugins.typedRequestInterfaces.imple
|
|
|
59
64
|
success: boolean;
|
|
60
65
|
};
|
|
61
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Self-service profile update. Email is deliberately NOT updatable here —
|
|
69
|
+
* it is the account's login identifier and needs a verified-change flow.
|
|
70
|
+
*/
|
|
71
|
+
export interface IReq_UpdateProfile extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_UpdateProfile> {
|
|
72
|
+
method: 'updateProfile';
|
|
73
|
+
request: {
|
|
74
|
+
jwt: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
username?: string;
|
|
77
|
+
mobileNumber?: string;
|
|
78
|
+
};
|
|
79
|
+
response: {
|
|
80
|
+
user: dto.ICurrentUserDto;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
62
83
|
export interface IReq_GetUserActivity extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserActivity> {
|
|
63
84
|
method: 'getUserActivity';
|
|
64
85
|
request: {
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/activity.ts
CHANGED
package/ts/data/user.ts
CHANGED
|
@@ -21,6 +21,11 @@ export interface IUser {
|
|
|
21
21
|
*/
|
|
22
22
|
passwordHash?: string;
|
|
23
23
|
status: 'new' | 'active' | 'deleted' | 'suspended';
|
|
24
|
+
/**
|
|
25
|
+
* epoch ms of account creation; absent on accounts created before this
|
|
26
|
+
* field existed (derive from the Mongo ObjectId timestamp when missing)
|
|
27
|
+
*/
|
|
28
|
+
createdAt?: number;
|
|
24
29
|
/**
|
|
25
30
|
* a quick ref for which organizations might have roles for this user
|
|
26
31
|
* speeds up lookup
|
package/ts/dto/user.ts
CHANGED
|
@@ -25,3 +25,20 @@ export interface IUserProfileDto {
|
|
|
25
25
|
status?: IUserDataDto['status'];
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Platform-wide user summary for the global admin directory.
|
|
31
|
+
* Never contains credentials, external identities, or SCIM internals.
|
|
32
|
+
*/
|
|
33
|
+
export interface IGlobalUserAdminDto {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
username: string;
|
|
37
|
+
email: string;
|
|
38
|
+
status: IUserDataDto['status'];
|
|
39
|
+
isGlobalAdmin: boolean;
|
|
40
|
+
/** number of organizations the user belongs to */
|
|
41
|
+
orgCount: number;
|
|
42
|
+
/** epoch ms; derived for accounts created before this field existed */
|
|
43
|
+
createdAt: number;
|
|
44
|
+
}
|
package/ts/request/admin.ts
CHANGED
|
@@ -128,3 +128,72 @@ export interface IReq_RegenerateAppCredentials
|
|
|
128
128
|
clientSecret: string; // Only shown once
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Paged, searchable platform user directory (admin only)
|
|
134
|
+
*/
|
|
135
|
+
export interface IReq_GetGlobalUsers
|
|
136
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
137
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
138
|
+
IReq_GetGlobalUsers
|
|
139
|
+
> {
|
|
140
|
+
method: 'getGlobalUsers';
|
|
141
|
+
request: {
|
|
142
|
+
jwt: string;
|
|
143
|
+
/** case-insensitive substring match against name, username and email */
|
|
144
|
+
search?: string;
|
|
145
|
+
limit?: number;
|
|
146
|
+
offset?: number;
|
|
147
|
+
};
|
|
148
|
+
response: {
|
|
149
|
+
users: dto.IGlobalUserAdminDto[];
|
|
150
|
+
total: number;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Suspend or unsuspend a user account (admin only).
|
|
156
|
+
* Suspension revokes all active sessions and JWTs of the target user.
|
|
157
|
+
*/
|
|
158
|
+
export interface IReq_SetUserSuspension
|
|
159
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
160
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
161
|
+
IReq_SetUserSuspension
|
|
162
|
+
> {
|
|
163
|
+
method: 'setUserSuspension';
|
|
164
|
+
request: {
|
|
165
|
+
jwt: string;
|
|
166
|
+
userId: string;
|
|
167
|
+
suspended: boolean;
|
|
168
|
+
};
|
|
169
|
+
response: {
|
|
170
|
+
user: dto.IGlobalUserAdminDto;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Platform-wide organization directory with member counts (admin only)
|
|
176
|
+
*/
|
|
177
|
+
export interface IReq_GetGlobalOrgStats
|
|
178
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
179
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
180
|
+
IReq_GetGlobalOrgStats
|
|
181
|
+
> {
|
|
182
|
+
method: 'getGlobalOrgStats';
|
|
183
|
+
request: {
|
|
184
|
+
jwt: string;
|
|
185
|
+
/** case-insensitive substring match against name and slug */
|
|
186
|
+
search?: string;
|
|
187
|
+
limit?: number;
|
|
188
|
+
offset?: number;
|
|
189
|
+
};
|
|
190
|
+
response: {
|
|
191
|
+
orgs: Array<{
|
|
192
|
+
id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
slug: string;
|
|
195
|
+
memberCount: number;
|
|
196
|
+
}>;
|
|
197
|
+
total: number;
|
|
198
|
+
};
|
|
199
|
+
}
|
|
@@ -55,7 +55,9 @@ export interface IReq_SetDataForRegistration
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* @deprecated SMS verification was removed from registration — the platform
|
|
59
|
+
* no longer provides an SMS sending service. The server no longer handles
|
|
60
|
+
* this method. Kept until the next major release.
|
|
59
61
|
*/
|
|
60
62
|
export interface IReq_MobileVerificationForRegistration
|
|
61
63
|
extends plugins.typedRequestInterfaces.implementsTR<
|
package/ts/request/user.ts
CHANGED
|
@@ -2,6 +2,11 @@ import * as data from '../data/index.js';
|
|
|
2
2
|
import * as dto from '../dto/index.js';
|
|
3
3
|
import * as plugins from '../plugins.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated superseded by IReq_SetUserSuspension (request/admin.ts), which
|
|
7
|
+
* supports unsuspension and returns the updated user instead of a key. Kept
|
|
8
|
+
* until the next major release.
|
|
9
|
+
*/
|
|
5
10
|
export interface IReq_SuspendUser
|
|
6
11
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
7
12
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
@@ -86,6 +91,27 @@ export interface IReq_RevokeSession
|
|
|
86
91
|
};
|
|
87
92
|
}
|
|
88
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Self-service profile update. Email is deliberately NOT updatable here —
|
|
96
|
+
* it is the account's login identifier and needs a verified-change flow.
|
|
97
|
+
*/
|
|
98
|
+
export interface IReq_UpdateProfile
|
|
99
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
100
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
101
|
+
IReq_UpdateProfile
|
|
102
|
+
> {
|
|
103
|
+
method: 'updateProfile';
|
|
104
|
+
request: {
|
|
105
|
+
jwt: string;
|
|
106
|
+
name?: string;
|
|
107
|
+
username?: string;
|
|
108
|
+
mobileNumber?: string;
|
|
109
|
+
};
|
|
110
|
+
response: {
|
|
111
|
+
user: dto.ICurrentUserDto;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
89
115
|
export interface IReq_GetUserActivity
|
|
90
116
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
91
117
|
plugins.typedRequestInterfaces.ITypedRequest,
|