1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[PM-15001] Replace throttle decorator (#15015)

* Add comments to AuditService Abstraction

* Replace throttle usage with rxjs mergeMap with concurrent limit

* Add test cases for audit service

* Remove throttle
This commit is contained in:
Leslie Tilton
2025-06-12 10:52:04 -05:00
committed by GitHub
parent 381e7fa45e
commit 6a579ed99f
5 changed files with 134 additions and 175 deletions

View File

@@ -1,8 +1,17 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { BreachAccountResponse } from "../models/response/breach-account.response";
export abstract class AuditService {
passwordLeaked: (password: string) => Promise<number>;
breachedAccounts: (username: string) => Promise<BreachAccountResponse[]>;
/**
* 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[]>;
}