/** * [[include:src/codecs/crossref/README.md]] * * @module codecs/crossref */ import schema from '@stencila/schema'; import * as vfile from '../../util/vfile'; import { Codec, CommonEncodeOptions } from '../types'; interface EncodeOptions extends CommonEncodeOptions { /** * The DOI for the node */ doi?: string; /** * The URL for the node */ url?: string; } export declare class CrossrefCodec extends Codec implements Codec { readonly mediaTypes: string[]; readonly extNames: string[]; /** * "Decode" some content into a `CreativeWork` by via a bibliographic query to Crossref's API * * See https://www.crossref.org/labs/resolving-citations-we-dont-need-no-stinkin-parser/ */ readonly decode: (file: vfile.VFile) => Promise; /** * Encode a `CreativeWork` to Crossref's metadata deposit schema. * * See https://www.crossref.org/education/content-registration/crossrefs-metadata-deposit-schema/crossref-xsd-schema-quick-reference/ * Generated XML can be validated via https://www.crossref.org/02publishers/parser.html */ readonly encode: (node: schema.Node, options?: EncodeOptions) => Promise; } /** * The output from api.crossref.org is not strictly CSL-JSON; this function fixes it. * See https://github.com/CrossRef/rest-api-doc/issues/222 for more. */ export declare function decodeCrossrefCsl(csl: CSL.Data & { [key: string]: any; }): Promise; export {};