1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-27 21:53:14 +00:00
Files
jslib/common/src/abstractions/import.service.ts
Matt Gibson 7afb748791 Feature/password protected export (#612)
* Add password protected export

* Run prettier

* Test password protected export service

* Create type for known import type strings

* Test import service changes

* Test bitwarden password importer

* Run prettier

* Remove unnecessary class properties

* Run prettier

* Tslint fixes

* Add KdfType to password protected export

* Linter fixes

* run prettier
2022-02-07 09:33:10 -06:00

15 lines
542 B
TypeScript

import { Importer } from "../importers/importer";
import { ImportType } from "../services/import.service";
export interface ImportOption {
id: string;
name: string;
}
export abstract class ImportService {
featuredImportOptions: readonly ImportOption[];
regularImportOptions: readonly ImportOption[];
getImportOptions: () => ImportOption[];
import: (importer: Importer, fileContents: string, organizationId?: string) => Promise<Error>;
getImporter: (format: ImportType, organizationId: string, password?: string) => Importer;
}