UNPKG

@readium/shared

Version:

Shared models to be used across other Readium projects and implementations in Typescript

55 lines (54 loc) 1.58 kB
import { Links } from './Link'; import { LocalizedString } from './LocalizedString'; import { Locator } from './Locator'; /** * Holds the metadata of a `LocatorCollection`. */ export declare class LocatorCollectionMetadata { title?: LocalizedString; /** numberOfItems Indicates the total number of locators in the collection. */ numberOfItems?: number; otherMetadata?: Map<string, any>; /** * Creates a [LocatorMetadata]. */ constructor(values: { title?: LocalizedString; numberOfItems?: number; otherMetadata?: Map<string, any>; }); /** * Parses a [LocatorMetadata] from its RWPM JSON representation. */ static deserialize(json: any): LocatorCollectionMetadata | undefined; /** * Serializes a [LocatorMetadata] to its RWPM JSON representation. */ serialize(): any; } /** * Represents a sequential list of `Locator` objects. * * For example, a search result or a list of positions. */ export declare class LocatorCollection { metadata: LocatorCollectionMetadata; links: Links; locators: Array<Locator>; /** * Creates a [LocatorCollection]. */ constructor(values: { metadata?: LocatorCollectionMetadata; links?: Links; locators?: Array<Locator>; }); /** * Parses a [LocatorCollection] from its RWPM JSON representation. */ static deserialize(json: any): LocatorCollection | undefined; /** * Serializes a [LocatorCollection] to its RWPM JSON representation. */ serialize(): any; }