UNPKG

@readium/shared

Version:

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

35 lines (34 loc) 1.21 kB
import { Links } from './Link'; /** * Core Collection Model * * https://readium.org/webpub-manifest/schema/subcollection.schema.json * Can be used as extension point in the Readium Web Publication Manifest. */ export declare class PublicationCollection { metadata?: Map<string, any>; links: Links; subcollections?: Map<string, Array<PublicationCollection>>; /** * Creates a [PublicationCollection]. */ constructor(values: { metadata?: Map<string, any>; links: Links; subcollections?: Map<string, Array<PublicationCollection>>; }); /** * Parses a [PublicationCollection] from its RWPM JSON representation. */ static deserialize(json: any): PublicationCollection | undefined; /** * Parses a map of [PublicationCollection] indexed by their roles from its RWPM JSON representation. * */ static deserializeCollections(json: any): Map<string, Array<PublicationCollection>> | undefined; /** * Serializes a [PublicationCollection] to its RWPM JSON representation. */ serialize(): any; static serializeCollection(json: any, subcollections?: Map<string, Array<PublicationCollection>>): void; }