| 1 | /** Field names and millisecond timestamps follow Keycloak's admin representations. */ |
| 2 | export interface User { |
| 3 | id: string; |
| 4 | username: string; |
| 5 | email: string | null; |
| 6 | firstName: string | null; |
| 7 | lastName: string | null; |
| 8 | enabled: boolean; |
| 9 | emailVerified: boolean; |
| 10 | createdTimestamp: number; |
| 11 | requiredActions: string[]; |
| 12 | groups: Group[]; |
| 13 | /** Keycloak replaces the whole map on update, so send it merged. */ |
| 14 | attributes?: Record<string, string[]>; |
| 15 | } |
| 16 | |
| 17 | export interface Group { |
| 18 | id: string; |
| 19 | name: string; |
| 20 | } |
| 21 | |
| 22 | export interface Credential { |
| 23 | id: string; |
| 24 | type: "password" | "webauthn-passwordless" | "webauthn" | "otp"; |
| 25 | userLabel: string | null; |
| 26 | createdDate: number; |
| 27 | } |
| 28 | |
| 29 | export interface Session { |
| 30 | id: string; |
| 31 | ipAddress: string; |
| 32 | start: number; |
| 33 | lastAccess: number; |
| 34 | /** Client UUID to `clientId`. */ |
| 35 | clients: Record<string, string>; |
| 36 | } |