import {IndiInfo} from 'topola'; import {TopolaData} from '../util/gedcom_util'; /** Supported data sources. */ export enum DataSourceEnum { UPLOADED, GEDCOM_URL, WIKITREE, EMBEDDED, GOOGLE_DRIVE, } /** Source specification together with individual selection. */ export interface SourceSelection { spec: SourceSpecT; selection?: IndiInfo; } /** Interface encapsulating functions specific for a data source. */ export interface DataSource { /** * Returns true if the application is now loading a completely new data set * and the existing one should be wiped. */ isNewData( newSource: SourceSelection, oldSource: SourceSelection, data?: TopolaData, ): boolean; /** Loads data from the data source. */ loadData(spec: SourceSelection): Promise; }