UNPKG

@kit-data-manager/pid-component

Version:

The PID-Component is a web component that can be used to evaluate and display FAIR Digital Objects, PIDs, ORCiDs, and possibly other identifiers in a user-friendly way. It is easily extensible to support other identifier types.

46 lines (45 loc) 1.36 kB
import { GenericIdentifierType } from './GenericIdentifierType'; import { DBSchema } from '@tempfix/idb'; export interface PIDComponentDB extends DBSchema { entities: { key: string; value: { value: string; rendererKey: string; orderedRendererKeys: string[] | null; context: string; lastAccess: Date; lastData: unknown; }; indexes: { 'by-context': string; }; }; relations: { key: string; value: { start: string; description: string; end: string; }; indexes: { 'by-start': string; 'by-end': string; 'by-description': string; }; }; } export declare class Database { dbPromise: Promise<import("@tempfix/idb").IDBPDatabase<PIDComponentDB>>; addEntity(renderer: GenericIdentifierType, orderedRendererKeys?: string[] | null): Promise<void>; getEntity(value: string, settings: { type: string; values: { name: string; value: unknown; }[]; }[], orderedRendererKeys?: string[], fallbackToAll?: boolean): Promise<GenericIdentifierType | null>; deleteEntity(value: string): Promise<void>; clearEntities(): Promise<void>; private normalizeKey; }