@sickrin/openalex-sdk
Version:
A TypeScript SDK for interacting with the OpenAlex API - forked and enhanced version
150 lines (149 loc) • 3.73 kB
TypeScript
import { KeyTypeOpenAlex, TypeCrossRef } from '../types/work';
export declare class Work {
id: string;
abstract_inverted_index?: {};
alternate_host_venues?: any;
authorships?: Authorship[];
apc_list?: ApcPayment;
apc_paid?: ApcPayment;
best_oa_location?: LocationOpenAlex;
biblio?: Biblio;
cited_by_api_url?: string;
cited_by_count?: number;
concepts?: ConceptWork[];
corresponding_author_ids?: string[];
corresponding_institution_ids?: string[];
countries_distinct_count?: number;
counts_by_year: CountsByYear[];
created_date?: string;
display_name?: string;
doi?: string;
fulltext_origin?: string;
grants?: {
funder?: string;
funder_display_name?: string;
award_id?: string;
};
has_fulltext?: boolean;
host_venue?: LocationOpenAlex;
ids?: {
openalex?: string;
doi?: string;
mag?: number;
pmid?: string;
};
institutions_distinct_count?: number;
is_paratext?: boolean;
is_retracted?: boolean;
keywords?: {
keyword?: string;
score?: number;
}[];
language?: string;
license?: string;
locations?: LocationOpenAlex[];
locations_count?: number;
mesh?: {
descriptor_ui: string;
descriptor_name: string;
qualifier_ui: string;
qualifier_name: string;
is_major_topic: boolean;
};
ngrams_url?: string;
open_access?: {
is_oa: boolean;
oa_status: 'gold' | 'green' | 'bronze' | 'hybrid' | 'closed';
oa_url: string;
any_repository_has_fulltext: boolean;
};
primary_location?: LocationOpenAlex;
publication_date?: string;
publication_year?: number;
referenced_works?: string[];
related_works?: string[];
sustainable_development_goals?: {}[];
title?: string;
type?: KeyTypeOpenAlex;
type_crossref?: TypeCrossRef;
updated_date?: string;
ngrams?: string;
ngram_count?: number;
ngram_tokens?: number;
term_frequency?: number;
}
export type AuthorPosition = 'first' | 'last' | 'middle';
export declare class Authorship {
id: string;
author: Author;
author_position?: AuthorPosition;
countries?: string[];
institutions?: Institution[];
is_corresponding?: boolean;
raw_affiliation_string?: string;
raw_author_name?: string;
work: Work;
}
export declare class Author {
id: string;
display_name: string;
orcid?: string;
authorships?: Authorship[];
}
export declare class Institution {
id: string;
display_name?: string;
ror?: string;
country_code?: string;
type?: string;
lineage?: string[];
}
export declare class ApcPayment {
id: string;
value?: number;
currency?: string;
provenance?: string;
value_usd?: number;
}
export declare class LocationOpenAlex {
id: string;
is_accepted?: boolean;
is_oa?: boolean;
is_published?: boolean;
landing_page_url?: string;
license?: string;
source?: Source;
pdf_url?: string;
version?: string;
work: Work;
}
export declare class Source {
id: string;
display_name?: string;
issn_l?: string;
issn?: string[];
host_organization?: string;
type?: string;
locations?: LocationOpenAlex[];
}
export declare class Biblio {
id: string;
volume?: string;
issue?: string;
first_page?: string;
last_page?: string;
}
export declare class ConceptWork {
id: string;
wikidata?: string;
display_name?: string;
level?: number;
score?: number;
works?: Work[];
}
export declare class CountsByYear {
id: string;
year: number;
count: number;
work: Work;
}