UNPKG

@readium/shared

Version:

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

65 lines (64 loc) 2.17 kB
import { Links } from './Link'; import { LocalizedString } from './LocalizedString'; import { AltIdentifier } from './AltIdentifier'; /** * Contributor Object for the Readium Web Publication Manifest. * https://readium.org/webpub-manifest/schema/contributor-object.schema.json */ export declare class Contributor { /** The name of the contributor. */ readonly name: LocalizedString; /** The string used to sort the name of the contributor. */ readonly sortAs?: LocalizedString; /** An unambiguous reference to this contributor. */ readonly identifier?: string; /** Alternate identifiers for this contributor. */ readonly altIdentifiers?: Set<AltIdentifier>; /** The role of the contributor in the publication making. */ readonly roles?: Set<string>; /** Used to retrieve similar publications for the given contributor. */ readonly links?: Links; /** The position of the publication in this collection/series, when the contributor represents a collection. */ readonly position?: number; /** * Creates a [Contributor] object. */ constructor(values: { name: LocalizedString; sortAs?: LocalizedString; identifier?: string; altIdentifiers?: Set<AltIdentifier>; roles?: Set<string>; links?: Links; position?: number; }); /** * Parses a [Contributor] from its RWPM JSON representation. * * A contributor can be parsed from a single string, or a full-fledged object. */ static deserialize(json: any): Contributor | undefined; /** * Serializes a [Contributor] to its RWPM JSON representation. */ serialize(): any; } export declare class Contributors { /** * Array of [Contributor] . */ readonly items: Array<Contributor>; /** * Creates a [Contributors] object. */ constructor(items: Array<Contributor>); /** * Parses a [Contributors] from its RWPM JSON representation. * */ static deserialize(json: any): Contributors | undefined; /** * Serializes a [Contributors] to its RWPM JSON representation. */ serialize(): any; }