aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/lib/services/abstractions/IPasswordResetService.ts
blob: b6f6671308277e0bc5b3cda79e99789f764df7da (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 "$lib/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
}