mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 01:23:57 +00:00
* Passing CollectionView or FolderView from Import component to ImportService * Corrected import service tests * Added tests to validate if the incorrect object type error is thrown on setImportTarget
25 lines
919 B
TypeScript
25 lines
919 B
TypeScript
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
|
import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
|
|
|
|
import { Importer } from "../importers/importer";
|
|
import { ImportOption, ImportType } from "../models/import-options";
|
|
import { ImportResult } from "../models/import-result";
|
|
|
|
export abstract class ImportServiceAbstraction {
|
|
featuredImportOptions: readonly ImportOption[];
|
|
regularImportOptions: readonly ImportOption[];
|
|
getImportOptions: () => ImportOption[];
|
|
import: (
|
|
importer: Importer,
|
|
fileContents: string,
|
|
organizationId?: string,
|
|
selectedImportTarget?: FolderView | CollectionView,
|
|
canAccessImportExport?: boolean,
|
|
) => Promise<ImportResult>;
|
|
getImporter: (
|
|
format: ImportType | "bitwardenpasswordprotected",
|
|
promptForPassword_callback: () => Promise<string>,
|
|
organizationId: string,
|
|
) => Importer;
|
|
}
|