import { DataProvider, Fam, Indi } from './api'; export interface Date { qualifier?: string; day?: number; month?: number; year?: number; text?: string; } export interface DateRange { from?: Date; to?: Date; } export interface DateOrRange { date?: Date; dateRange?: DateRange; } export interface JsonEvent extends DateOrRange { type?: string; place?: string; confirmed?: boolean; notes?: string[]; /** * Certainty of the event: the highest GEDCOM QUAY value (0-3) among its * source citations. Undefined if no citation has a QUAY value. */ confidence?: number; } export interface JsonImage { url: string; title?: string; } /** Json representation of an individual. */ export interface JsonIndi { id: string; firstName?: string; lastName?: string; maidenName?: string; famc?: string; fams?: string[]; numberOfChildren?: number; numberOfMarriages?: number; birth?: JsonEvent; death?: JsonEvent; sex?: string; images?: JsonImage[]; notes?: string[]; events?: JsonEvent[]; hideId?: boolean; hideSex?: boolean; /** * Certainty of the individual and their parentage: the highest GEDCOM QUAY * value (0-3) among citations on the individual record and on their birth, * christening or baptism. Undefined if no citation has a QUAY value. */ confidence?: number; /** * Certainty (QUAY 0-3) of the link between the individual and their * parents. Taken from the same citations as `confidence`, but unlike it, * not changed by propagateConfidence(). */ parentLinkConfidence?: number; /** Occupations of the individual (GEDCOM OCCU), in order of appearance. */ occupations?: string[]; /** Titles of the individual (GEDCOM TITL), in order of appearance. */ titles?: string[]; } /** Json representation of a family. */ export interface JsonFam { id: string; children?: string[]; wife?: string; husb?: string; marriage?: JsonEvent; } /** Json representation of Gedcom data. */ export interface JsonGedcomData { indis: JsonIndi[]; fams: JsonFam[]; } /** Details of an individual record. */ export interface IndiDetails extends Indi { getFirstName(): string | null; getLastName(): string | null; getMaidenName(): string | null; getNumberOfChildren(): number | null; getNumberOfMarriages(): number | null; getMaidenName(): string | null; getBirthDate(): DateOrRange | null; getBirthPlace(): string | null; getDeathDate(): DateOrRange | null; getDeathPlace(): string | null; isConfirmedDeath(): boolean; getSex(): string | null; getImageUrl(): string | null; getImages(): JsonImage[] | null; getNotes(): string[] | null; getEvents(): JsonEvent[] | null; showId(): boolean; showSex(): boolean; /** QUAY-based certainty (0-3) of the individual, if known. */ getConfidence?(): number | null; /** QUAY-based certainty (0-3) of the link to the parents, if known. */ getParentLinkConfidence?(): number | null; /** QUAY-based certainty (0-3) of the birth event, if known. */ getBirthConfidence?(): number | null; /** QUAY-based certainty (0-3) of the death event, if known. */ getDeathConfidence?(): number | null; /** Occupations of the individual, if known. */ getOccupations?(): string[] | null; /** Titles of the individual (e.g. nobility titles), if known. */ getTitles?(): string[] | null; } /** Details of a family record. */ export interface FamDetails extends Fam { getMarriageDate(): DateOrRange | null; getMarriagePlace(): string | null; /** QUAY-based certainty (0-3) of the marriage event, if known. */ getMarriageConfidence?(): number | null; } /** Implementation of the DataProvider interface based on Json input. */ export declare class JsonDataProvider implements DataProvider { readonly json: JsonGedcomData; readonly indis: Map; readonly fams: Map; constructor(json: JsonGedcomData); getIndi(id: string): IndiDetails | null; getFam(id: string): FamDetails | null; }