mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
* Add comments to AuditService Abstraction * Replace throttle usage with rxjs mergeMap with concurrent limit * Add test cases for audit service * Remove throttle
18 lines
701 B
TypeScript
18 lines
701 B
TypeScript
import { BreachAccountResponse } from "../models/response/breach-account.response";
|
|
|
|
export abstract class AuditService {
|
|
/**
|
|
* Checks how many times a password has been leaked.
|
|
* @param password The password to check.
|
|
* @returns A promise that resolves to the number of times the password has been leaked.
|
|
*/
|
|
abstract passwordLeaked: (password: string) => Promise<number>;
|
|
|
|
/**
|
|
* Retrieves accounts that have been breached for a given username.
|
|
* @param username The username to check for breaches.
|
|
* @returns A promise that resolves to an array of BreachAccountResponse objects.
|
|
*/
|
|
abstract breachedAccounts: (username: string) => Promise<BreachAccountResponse[]>;
|
|
}
|