@idp.global/interfaces 7.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 +21 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/activity.d.ts +1 -1
- package/dist_ts/data/index.d.ts +2 -0
- package/dist_ts/data/index.js +3 -1
- package/dist_ts/data/scim.d.ts +87 -0
- package/dist_ts/data/scim.js +11 -0
- package/dist_ts/data/ssoconnection.d.ts +87 -0
- package/dist_ts/data/ssoconnection.js +2 -0
- package/dist_ts/data/user.d.ts +27 -0
- package/dist_ts/dto/index.d.ts +1 -0
- package/dist_ts/dto/index.js +2 -1
- package/dist_ts/dto/ssoconnection.d.ts +57 -0
- package/dist_ts/dto/ssoconnection.js +2 -0
- package/dist_ts/dto/user.d.ts +16 -0
- package/dist_ts/request/admin.d.ts +54 -0
- package/dist_ts/request/index.d.ts +1 -0
- package/dist_ts/request/index.js +2 -1
- package/dist_ts/request/registration.d.ts +3 -1
- package/dist_ts/request/ssoconnection.d.ts +163 -0
- package/dist_ts/request/ssoconnection.js +4 -0
- 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 +12 -1
- package/ts/data/index.ts +2 -0
- package/ts/data/scim.ts +107 -0
- package/ts/data/ssoconnection.ts +91 -0
- package/ts/data/user.ts +27 -0
- package/ts/dto/index.ts +1 -0
- package/ts/dto/ssoconnection.ts +60 -0
- package/ts/dto/user.ts +17 -0
- package/ts/request/admin.ts +69 -0
- package/ts/request/index.ts +1 -0
- package/ts/request/registration.ts +3 -1
- package/ts/request/ssoconnection.ts +208 -0
- package/ts/request/user.ts +26 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as data from '../data/index.js';
|
|
2
|
+
import * as dto from '../dto/index.js';
|
|
3
|
+
import * as plugins from '../plugins.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* List the SSO connections of an organization (org admin only)
|
|
7
|
+
*/
|
|
8
|
+
export interface IReq_GetSsoConnections
|
|
9
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
10
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
11
|
+
IReq_GetSsoConnections
|
|
12
|
+
> {
|
|
13
|
+
method: 'getSsoConnections';
|
|
14
|
+
request: {
|
|
15
|
+
jwt: string;
|
|
16
|
+
organizationId: string;
|
|
17
|
+
};
|
|
18
|
+
response: {
|
|
19
|
+
connections: dto.ISsoConnectionDto[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create an SSO connection for an organization (org admin only).
|
|
25
|
+
* Either metadataXml or the manual idp fields must be provided.
|
|
26
|
+
*/
|
|
27
|
+
export interface IReq_CreateSsoConnection
|
|
28
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
29
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
30
|
+
IReq_CreateSsoConnection
|
|
31
|
+
> {
|
|
32
|
+
method: 'createSsoConnection';
|
|
33
|
+
request: {
|
|
34
|
+
jwt: string;
|
|
35
|
+
organizationId: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
emailDomains: string[];
|
|
38
|
+
/** IdP metadata XML; parsed server-side when provided */
|
|
39
|
+
metadataXml?: string;
|
|
40
|
+
/** Manual IdP configuration, used when metadataXml is absent */
|
|
41
|
+
idp?: {
|
|
42
|
+
entityId: string;
|
|
43
|
+
ssoUrl: string;
|
|
44
|
+
signingCertificates: string[];
|
|
45
|
+
};
|
|
46
|
+
provisioning: {
|
|
47
|
+
mode: data.TSsoProvisioningMode;
|
|
48
|
+
defaultOrgRoles: string[];
|
|
49
|
+
};
|
|
50
|
+
groupMappings?: data.IGroupRoleMapping[];
|
|
51
|
+
attributeMapping?: data.ISsoAttributeMapping;
|
|
52
|
+
};
|
|
53
|
+
response: {
|
|
54
|
+
connection: dto.ISsoConnectionDto;
|
|
55
|
+
spDetails: dto.ISsoSpDetailsDto;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Update an SSO connection (org admin only). Only provided fields change.
|
|
61
|
+
*/
|
|
62
|
+
export interface IReq_UpdateSsoConnection
|
|
63
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
64
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
65
|
+
IReq_UpdateSsoConnection
|
|
66
|
+
> {
|
|
67
|
+
method: 'updateSsoConnection';
|
|
68
|
+
request: {
|
|
69
|
+
jwt: string;
|
|
70
|
+
connectionId: string;
|
|
71
|
+
displayName?: string;
|
|
72
|
+
status?: 'active' | 'disabled';
|
|
73
|
+
emailDomains?: string[];
|
|
74
|
+
metadataXml?: string;
|
|
75
|
+
idp?: {
|
|
76
|
+
entityId: string;
|
|
77
|
+
ssoUrl: string;
|
|
78
|
+
signingCertificates: string[];
|
|
79
|
+
};
|
|
80
|
+
provisioning?: {
|
|
81
|
+
mode: data.TSsoProvisioningMode;
|
|
82
|
+
defaultOrgRoles: string[];
|
|
83
|
+
};
|
|
84
|
+
groupMappings?: data.IGroupRoleMapping[];
|
|
85
|
+
attributeMapping?: data.ISsoAttributeMapping;
|
|
86
|
+
};
|
|
87
|
+
response: {
|
|
88
|
+
connection: dto.ISsoConnectionDto;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Delete an SSO connection (org admin only)
|
|
94
|
+
*/
|
|
95
|
+
export interface IReq_DeleteSsoConnection
|
|
96
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
97
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
98
|
+
IReq_DeleteSsoConnection
|
|
99
|
+
> {
|
|
100
|
+
method: 'deleteSsoConnection';
|
|
101
|
+
request: {
|
|
102
|
+
jwt: string;
|
|
103
|
+
connectionId: string;
|
|
104
|
+
};
|
|
105
|
+
response: {
|
|
106
|
+
success: boolean;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get the SP-side details (entityId, ACS URL, metadata URL, SCIM base URL)
|
|
112
|
+
* an org admin needs to configure the customer IdP (org admin only)
|
|
113
|
+
*/
|
|
114
|
+
export interface IReq_GetSsoSpDetails
|
|
115
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
116
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
117
|
+
IReq_GetSsoSpDetails
|
|
118
|
+
> {
|
|
119
|
+
method: 'getSsoSpDetails';
|
|
120
|
+
request: {
|
|
121
|
+
jwt: string;
|
|
122
|
+
connectionId: string;
|
|
123
|
+
};
|
|
124
|
+
response: {
|
|
125
|
+
spDetails: dto.ISsoSpDetailsDto;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Create a SCIM bearer token for an organization (org admin only).
|
|
131
|
+
* The plaintext token is returned exactly once.
|
|
132
|
+
*/
|
|
133
|
+
export interface IReq_CreateScimToken
|
|
134
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
135
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
136
|
+
IReq_CreateScimToken
|
|
137
|
+
> {
|
|
138
|
+
method: 'createScimToken';
|
|
139
|
+
request: {
|
|
140
|
+
jwt: string;
|
|
141
|
+
organizationId: string;
|
|
142
|
+
label: string;
|
|
143
|
+
/** Optional expiry timestamp (epoch ms) */
|
|
144
|
+
expiresAt?: number;
|
|
145
|
+
};
|
|
146
|
+
response: {
|
|
147
|
+
token: dto.IScimTokenDto;
|
|
148
|
+
/** Plaintext bearer token; shown exactly once */
|
|
149
|
+
plaintextToken: string;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* List the SCIM tokens of an organization (org admin only)
|
|
155
|
+
*/
|
|
156
|
+
export interface IReq_GetScimTokens
|
|
157
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
158
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
159
|
+
IReq_GetScimTokens
|
|
160
|
+
> {
|
|
161
|
+
method: 'getScimTokens';
|
|
162
|
+
request: {
|
|
163
|
+
jwt: string;
|
|
164
|
+
organizationId: string;
|
|
165
|
+
};
|
|
166
|
+
response: {
|
|
167
|
+
tokens: dto.IScimTokenDto[];
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Revoke a SCIM token (org admin only)
|
|
173
|
+
*/
|
|
174
|
+
export interface IReq_RevokeScimToken
|
|
175
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
176
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
177
|
+
IReq_RevokeScimToken
|
|
178
|
+
> {
|
|
179
|
+
method: 'revokeScimToken';
|
|
180
|
+
request: {
|
|
181
|
+
jwt: string;
|
|
182
|
+
tokenId: string;
|
|
183
|
+
};
|
|
184
|
+
response: {
|
|
185
|
+
success: boolean;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Public home-realm discovery: given an email address, reports whether an
|
|
191
|
+
* active SSO connection covers its domain. Discloses domain-level presence
|
|
192
|
+
* only (standard Okta-style HRD behavior); no account information.
|
|
193
|
+
*/
|
|
194
|
+
export interface IReq_DiscoverSsoForEmail
|
|
195
|
+
extends plugins.typedRequestInterfaces.implementsTR<
|
|
196
|
+
plugins.typedRequestInterfaces.ITypedRequest,
|
|
197
|
+
IReq_DiscoverSsoForEmail
|
|
198
|
+
> {
|
|
199
|
+
method: 'discoverSsoForEmail';
|
|
200
|
+
request: {
|
|
201
|
+
email: string;
|
|
202
|
+
};
|
|
203
|
+
response: {
|
|
204
|
+
ssoAvailable: boolean;
|
|
205
|
+
/** Relative login path to start the SAML flow when available */
|
|
206
|
+
loginUrl?: string;
|
|
207
|
+
};
|
|
208
|
+
}
|
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,
|