UNPKG

openalex-client

Version:

TypeScript SDK for OpenAlex academic database API

71 lines 2.57 kB
import { BaseService } from "./base"; import { Concept, Work, Author, QueryParams, OpenAlexResponse } from "../types"; export declare class ConceptsService extends BaseService<Concept> { protected readonly endpoint = "concepts"; /** * Get works related to a specific concept */ getWorks(conceptId: string, params?: QueryParams): Promise<OpenAlexResponse<Work>>; /** * Get authors working in a specific concept area */ getAuthors(conceptId: string, params?: QueryParams): Promise<OpenAlexResponse<Author>>; /** * Search concepts by Wikidata ID */ getByWikidata(wikidataId: string, params?: Pick<QueryParams, "select" | "mailto">): Promise<Concept>; /** * Get concepts by level (0-5, where 0 is most general) */ getByLevel(level: number, params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get top-level concepts (level 0) */ getTopLevel(params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get concepts by minimum works count */ getByMinWorksCount(minCount: number, params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get concepts by citation count range */ getByCitationRange(minCitations: number, maxCitations?: number, params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get the most popular concepts */ getMostPopular(params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get the most cited concepts */ getMostCited(params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Search concepts by name/description */ searchByName(name: string, params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get concepts with recent activity */ getRecentlyActive(params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get ancestor concepts (broader concepts) */ getAncestors(conceptId: string): Promise<Concept[]>; /** * Get related concepts */ getRelated(conceptId: string): Promise<Concept[]>; /** * Get descendant concepts (narrower concepts) */ getDescendants(conceptId: string, params?: QueryParams): Promise<OpenAlexResponse<Concept>>; /** * Get concepts hierarchy tree */ getHierarchy(conceptId: string, maxDepth?: number): Promise<ConceptHierarchy>; private buildHierarchy; } export interface ConceptHierarchy { concept: Concept; children: ConceptHierarchy[]; } //# sourceMappingURL=concepts.d.ts.map