@spotto/contract 1.0.69-alpha.27 → 1.0.69-alpha.29
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.
|
@@ -10,4 +10,20 @@ export interface GetOrganisationResponse {
|
|
|
10
10
|
integrations?: Integrations;
|
|
11
11
|
meta?: IEntityMeta;
|
|
12
12
|
children?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Lightweight SSO state for the org, surfaced so the admin UI can decide
|
|
15
|
+
* whether to show add/remove user flows on SSO-managed orgs without
|
|
16
|
+
* needing the super-user-only `GET /sso/orgs/:id` endpoint. Present only
|
|
17
|
+
* when the caller holds `users:view` — the same gate as the user
|
|
18
|
+
* management UI that consumes it.
|
|
19
|
+
*
|
|
20
|
+
* `allowGuestUsers` reflects the mixed-mode opt-in: when `true`, the
|
|
21
|
+
* org accepts both SSO-managed users and native guest users; the FE
|
|
22
|
+
* should keep the "add user" flow available (for guest emails outside
|
|
23
|
+
* `emailDomains`). When `false`, all users come exclusively from the IdP.
|
|
24
|
+
*/
|
|
25
|
+
sso?: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
allowGuestUsers: boolean;
|
|
28
|
+
};
|
|
13
29
|
}
|
|
@@ -66,6 +66,14 @@ export interface SsoEnabledBase<TRoleId = string> {
|
|
|
66
66
|
* through to `unknownRoleAction`. See `RoleMapping`.
|
|
67
67
|
*/
|
|
68
68
|
roleMappings: RoleMapping<TRoleId>[];
|
|
69
|
+
/**
|
|
70
|
+
* Mixed-mode opt-in: when `true`, the org accepts both SSO-managed users
|
|
71
|
+
* (via federation) AND native "guest" users created through `POST /users`
|
|
72
|
+
* with password login. Guest emails must be OUTSIDE `emailDomains` — the
|
|
73
|
+
* staff-domain space is reserved for the IdP. Defaults to `false`
|
|
74
|
+
* (SSO-only) when absent.
|
|
75
|
+
*/
|
|
76
|
+
allowGuestUsers?: boolean;
|
|
69
77
|
}
|
|
70
78
|
export interface SsoEnabledOidc<TRoleId = string> extends SsoEnabledBase<TRoleId> {
|
|
71
79
|
mode: 'oidc';
|
|
@@ -31,6 +31,12 @@ interface OnboardSsoOrgWireBase {
|
|
|
31
31
|
* mappings via `PUT /sso/orgs/:id/sso-mappings`.
|
|
32
32
|
*/
|
|
33
33
|
roleMappings?: RoleMappingInput[];
|
|
34
|
+
/**
|
|
35
|
+
* Opt-in to mixed-mode: allow native "guest" users alongside SSO-managed
|
|
36
|
+
* users in the same org. Guests authenticate by password and must use an
|
|
37
|
+
* email domain OUTSIDE `emailDomains`. Defaults to `false`.
|
|
38
|
+
*/
|
|
39
|
+
allowGuestUsers?: boolean;
|
|
34
40
|
}
|
|
35
41
|
export interface OnboardSsoOrgOidcRequest extends OnboardSsoOrgWireBase {
|
|
36
42
|
mode: 'oidc';
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
* their original pre-SSO password.
|
|
6
6
|
* - `noPriorAccount` — user was JIT-created post-SSO; no native record to
|
|
7
7
|
* restore. Loses access. Operator must manually re-add.
|
|
8
|
+
* - `skippedGuest` — user is a mixed-mode guest (`authProvider: 'native'`).
|
|
9
|
+
* They were never IdP-managed; their native Cognito record is intact
|
|
10
|
+
* and they retain access. No Mongo write needed.
|
|
8
11
|
* - `failed` — Mongo update threw mid-loop; see `error`. The revert as a
|
|
9
12
|
* whole continues processing other users; an operator can retry the
|
|
10
13
|
* failed ones.
|
|
@@ -13,7 +16,7 @@ export interface RevertedUserResult {
|
|
|
13
16
|
/** Mongo user `_id` as 24-char hex. */
|
|
14
17
|
userId: string;
|
|
15
18
|
email: string;
|
|
16
|
-
status: 'reverted' | 'noPriorAccount' | 'failed';
|
|
19
|
+
status: 'reverted' | 'noPriorAccount' | 'skippedGuest' | 'failed';
|
|
17
20
|
error?: string;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
@@ -26,10 +26,14 @@ export interface GetInternalUserResponse extends BaseGetUserResponse {
|
|
|
26
26
|
*/
|
|
27
27
|
invitePending?: boolean;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Auth-source marker.
|
|
30
|
+
* - `'sso'` — managed by the org's IdP (federated).
|
|
31
|
+
* - `'native'` — explicit mixed-mode guest (password login on an SSO org).
|
|
32
|
+
* - `undefined` — legacy native user (non-SSO org, or pre-SSO).
|
|
33
|
+
*
|
|
34
|
+
* Lets the admin UI distinguish SSO users from guests without having to
|
|
35
|
+
* join against `organisation.sso.enabled`.
|
|
32
36
|
*/
|
|
33
|
-
authProvider?: 'sso';
|
|
37
|
+
authProvider?: 'sso' | 'native';
|
|
34
38
|
}
|
|
35
39
|
export declare type GetUserResponse = GetExternalUserResponse | GetInternalUserResponse;
|
package/dist/users/current.d.ts
CHANGED
|
@@ -22,12 +22,12 @@ export interface CurrentUserResponse {
|
|
|
22
22
|
meta?: IEntityMeta;
|
|
23
23
|
systemSettings: System;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* Auth-source marker, mirroring the persisted user field.
|
|
26
|
+
* - `'sso'` — current session is via SSO (FE may want RP-initiated logout).
|
|
27
|
+
* - `'native'` — explicit mixed-mode guest (password login on an SSO org).
|
|
28
|
+
* - `undefined` — legacy native user (non-SSO org, or pre-SSO).
|
|
29
29
|
*/
|
|
30
|
-
authProvider?: 'sso';
|
|
30
|
+
authProvider?: 'sso' | 'native';
|
|
31
31
|
}
|
|
32
32
|
export interface CurrentUserPublicResponse {
|
|
33
33
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.69-alpha.
|
|
4
|
+
"version": "1.0.69-alpha.29",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "a9ff090ef4f24d4067f9ee212ffd0ab458c8af66"
|
|
22
22
|
}
|