@datagouv/components-next 1.4.1-dev.1378.gcf94ed54 → 1.4.1-dev.1380.g71efeb91

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/types/users.ts +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "1.4.1-dev.1378.gcf94ed54",
3
+ "version": "1.4.1-dev.1380.g71efeb91",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "engines": {
@@ -12,6 +12,14 @@ export type UserReference = {
12
12
  avatar_thumbnail: string
13
13
  }
14
14
 
15
+ export type ProConnectIdentity = {
16
+ sub: string
17
+ // Whether the last login with this identity presented a second factor held by the agent.
18
+ second_factor: boolean
19
+ // When this identity was trusted as the account holder's, null until then.
20
+ verified_at: string | null
21
+ }
22
+
15
23
  export type User = {
16
24
  id: UserReference['id']
17
25
  first_name: UserReference['first_name']
@@ -29,6 +37,12 @@ export type User = {
29
37
  last_login_at: string | null
30
38
  password_rotation_demanded: string | null
31
39
  password_rotation_performed: string | null
40
+ // Given to the user themselves and to sysadmins only, null otherwise.
41
+ has_password: boolean | null
42
+ has_two_factor: boolean | null
43
+ proconnect: ProConnectIdentity | null
44
+ // Whether this session may drop the password and the udata 2FA of the account.
45
+ can_switch_to_proconnect_only: boolean | null
32
46
  since: string | null
33
47
  metrics: {
34
48
  datasets: number