aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/services/abstractions/IPasswordResetService.ts
blob: 59d2bc6e4c17a663918cac7b133b5d829f32e9c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import type { KnownProblem } from "$models/internal/KnownProblem"

export interface IPasswordResetService {
    create_request_async(email: string): Promise<CreateRequestResponse>,
    fulfill_request_async(id: string, newPassword: string): Promise<FulfillRequestResponse>,
    request_is_valid_async(id: string): Promise<RequestIsValidResponse>
}

export type RequestIsValidResponse = {
    isValid: boolean
}

export type FulfillRequestResponse = {
    isFulfilled: boolean,
    knownProblem?: KnownProblem
}

export type CreateRequestResponse = {
    isCreated: boolean,
    knownProblem?: KnownProblem
}