@fragus/sam-types 1.2.5 → 1.2.6
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/package.json
CHANGED
|
@@ -7,6 +7,15 @@ export interface IAdminUserInfo {
|
|
|
7
7
|
email: string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* When the logged-in user's password was last set and when it expires, as ISO dates. Both are null for a password
|
|
12
|
+
* set before expiry was introduced and not dated yet, which never expires.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPasswordStatus {
|
|
15
|
+
changedAt: string | null
|
|
16
|
+
expiresAt: string | null
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
export interface IUserPasswordChangeRequest {
|
|
11
20
|
password: string
|
|
12
21
|
newPassword: string
|
package/types/errorResponse.d.ts
CHANGED
|
@@ -9,6 +9,15 @@ export interface ApiError {
|
|
|
9
9
|
messageReplacements?: { [key in string]: string }
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The answer to a login whose password has expired. The token is a reset-password token, so the app can send the user
|
|
14
|
+
* to its reset-password page to choose a new one.
|
|
15
|
+
*/
|
|
16
|
+
export interface IPasswordExpiredError {
|
|
17
|
+
message: 'PASSWORD_EXPIRED'
|
|
18
|
+
resetToken: string
|
|
19
|
+
}
|
|
20
|
+
|
|
12
21
|
export interface INoContractsAvailableErrorParams {
|
|
13
22
|
matchedData: VehiclePartial
|
|
14
23
|
lookupCountry: null | {
|
|
@@ -4,3 +4,9 @@ export type PasswordErrors =
|
|
|
4
4
|
| 'WRONG_CURRENT_PASSWORD'
|
|
5
5
|
| 'WRONG_PASSWORD'
|
|
6
6
|
| 'MISSING_PASSWORD'
|
|
7
|
+
/** Login refused because the password is over a year old; see IPasswordExpiredError. */
|
|
8
|
+
| 'PASSWORD_EXPIRED'
|
|
9
|
+
/** A new password refused for being a common one, or for containing the user's email or name. */
|
|
10
|
+
| 'PASSWORD_TOO_COMMON'
|
|
11
|
+
/** A new password refused for being the same as the current one. */
|
|
12
|
+
| 'PASSWORD_UNCHANGED'
|