@aooth/user 0.1.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.
@@ -0,0 +1,42 @@
1
+ export interface AoothUserCredentials {
2
+ @db.index.unique 'username_idx'
3
+ username: string
4
+
5
+ @db.patch.strategy 'merge'
6
+ password: {
7
+ hash: string
8
+
9
+ history: string[]
10
+
11
+ lastChanged: number.timestamp
12
+ isInitial: boolean
13
+ }
14
+
15
+ @db.patch.strategy 'merge'
16
+ account: {
17
+ active: boolean
18
+ locked: boolean
19
+ lockReason: string
20
+ lockEnds: number.timestamp
21
+ failedLoginAttempts: number
22
+ lastLogin: number.timestamp
23
+ pendingInvitation?: boolean
24
+ }
25
+
26
+ @db.patch.strategy 'merge'
27
+ mfa: {
28
+ methods: { name: string, confirmed: boolean, value: string }[]
29
+
30
+ defaultMethod: string
31
+ autoSend: boolean
32
+ }
33
+
34
+ @db.patch.strategy 'merge'
35
+ trustedDevices?: {
36
+ token: string
37
+ ip?: string
38
+ issuedAt: number.timestamp
39
+ expiresAt: number.timestamp
40
+ name?: string
41
+ }[]
42
+ }