1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

import service adjustments

This commit is contained in:
Kyle Spearrin
2018-08-06 10:37:57 -04:00
parent a5476f12aa
commit 8b26d90e74
2 changed files with 15 additions and 29 deletions

View File

@@ -1,7 +1,11 @@
import { Importer } from '../importers/importer';
export type ImportOptions = Array<{id: string, name: string}>;
export interface ImportOption {
id: string;
name: string;
}
export abstract class ImportService {
submit: (importer: Importer, fileContents: string) => Promise<Error>;
getOptions: () => ImportOptions;
importOptions: ImportOption[];
import: (importer: Importer, fileContents: string) => Promise<any>;
getImporter: (format: string) => Importer;
}