mirror of
https://github.com/bitwarden/browser
synced 2026-02-23 16:13:21 +00:00
Updates to remove the userVerificationPromptService
This commit is contained in:
@@ -3,7 +3,7 @@ import { EventView } from "../models/view/eventView";
|
||||
export type ExportFormat = "csv" | "json" | "encrypted_json";
|
||||
|
||||
export abstract class ExportService {
|
||||
getExport: (format?: ExportFormat, organizationId?: string, password?: string) => Promise<string>;
|
||||
getExport: (format?: ExportFormat, organizationId?: string) => Promise<string>;
|
||||
getPasswordProtectedExport: (password: string, organizationId?: string) => Promise<string>;
|
||||
getOrganizationExport: (organizationId: string, format?: ExportFormat) => Promise<string>;
|
||||
getEventExport: (events: EventView[]) => Promise<string>;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
export abstract class UserVerificationPromptService {
|
||||
protectedFields: () => string[];
|
||||
showUserVerificationPrompt: (
|
||||
confirmDescription?: string,
|
||||
confirmButtonText?: string,
|
||||
modalTitle?: string
|
||||
) => Promise<boolean>;
|
||||
enabled: () => Promise<boolean>;
|
||||
}
|
||||
@@ -36,19 +36,13 @@ export class ExportService implements ExportServiceAbstraction {
|
||||
private cryptoFunctionService: CryptoFunctionService
|
||||
) {}
|
||||
|
||||
async getExport(
|
||||
format: ExportFormat = "csv",
|
||||
organizationId?: string,
|
||||
password?: string
|
||||
): Promise<string> {
|
||||
async getExport(format: ExportFormat = "csv", organizationId?: string): Promise<string> {
|
||||
if (organizationId) {
|
||||
return await this.getOrganizationExport(organizationId, format);
|
||||
}
|
||||
|
||||
if (format === "encrypted_json") {
|
||||
return password == undefined || password == ""
|
||||
? this.getEncryptedExport()
|
||||
: this.getPasswordProtectedExport(password);
|
||||
return this.getEncryptedExport();
|
||||
} else {
|
||||
return this.getDecryptedExport(format);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user