/** * arXiv: metadata search through the query API, and one record with its * licence through OAI-PMH. arXiv metadata is CC0. arXiv asks for no more than * one request every three seconds, which core.ts enforces. * * The query API searches titles, abstracts, authors and comments only, not * the body of a paper. */ import { type PaperContext } from "./core.js"; import type { PaperRecord } from "./records.js"; /** * Turn a free-text query into arXiv's field syntax: every word and quoted * phrase is searched in all fields, joined with AND unless the query says * OR or NOT. */ export declare function arxivQuery(query: string): string; /** * The year of first submission, from the ID's YYMM part. OAI's can * hold a later date than the first version (1802.07127 shows 2019-07-10), so * the record does not use it. */ export declare function arxivYear(arxivId: string): number | undefined; export type ArxivSearch = { records: PaperRecord[]; total: number; }; export declare function searchArxiv(ctx: PaperContext, query: string, options: { limit: number; }): Promise; /** * One arXiv record through OAI-PMH, which also gives the paper's licence and * the DOI of the published version. The version suffix is not part of an OAI * identifier, so it is dropped for the call and kept in the record. */ export declare function getArxivRecord(ctx: PaperContext, arxivId: string): Promise;