Updated graph such that it shows works too

This commit is contained in:
Mats Paul Tončik
2026-05-30 21:13:37 +02:00
166 changed files with 1586 additions and 3026 deletions
+2
View File
@@ -15,3 +15,5 @@ src/python/account/
node_modules/
angular-app/.angular
webapp/src/app/api
View File
@@ -1,9 +1,10 @@
from typing import Annotated
from typing import Annotated, Optional
from fastapi import APIRouter, Path, status
from fastapi import APIRouter, Body, Path, status
from inse.collaboration_network.schemas import (
CollaborationNetwork,
FilterProperties,
)
from inse.tags import Tags
import inse.collaboration_network.service as collaboration_network_service
@@ -14,7 +15,7 @@ router = APIRouter(
)
@router.get(
@router.post(
"/{raw_user_id}",
summary="Get a person's collaboration network.",
description="Returns a person's collaboration network based on their works and co-authors.",
@@ -27,9 +28,16 @@ router = APIRouter(
status.HTTP_404_NOT_FOUND: {"description": "Person not found"},
},
)
def get_collaboration_network(
async def get_collaboration_network(
raw_user_id: Annotated[str, Path(description="The raw user ID of the person.")],
filter_properties: Annotated[
Optional[FilterProperties],
Body(
description="The filter properties for the collaboration network.",
),
] = None,
) -> CollaborationNetwork:
return collaboration_network_service.get_collaboration_network(
raw_user_id=raw_user_id
return await collaboration_network_service.get_collaboration_network(
raw_user_id=raw_user_id,
filter_properties=filter_properties,
)
@@ -1,37 +1,94 @@
from typing import List
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel, Field
class CollaborationNetworkNode(BaseModel):
raw_person_id: str = Field(
title="Raw Person ID", description="The raw person ID of the person."
class InstitutionInformation(BaseModel):
raw_id: str = Field(
title="Raw Institution ID",
description="The raw institution ID of the institution.",
)
display_name: str = Field(
title="Display Name", description="The display name of the person."
title="Institution Display Name",
description="The display name of the institution.",
)
def __eq__(self, value: object) -> bool:
if isinstance(value, InstitutionInformation):
return self.raw_id == value.raw_id
return False
def __hash__(self) -> int:
return hash(self.raw_id)
class CollaborationNetworkNodeType(str, Enum):
AUTHOR = "author"
INSTITUTION = "institution"
WORK = "work"
class FilterInformation(BaseModel):
min_possible_year: int = Field(
title="Minimum Year",
description="The minimum publication year of the works in the collaboration network.",
)
max_possible_year: int = Field(
title="Maximum Year",
description="The maximum publication year of the works in the collaboration network.",
)
institutions: List[InstitutionInformation] = Field(
title="Institutions",
description="The list of institutions associated with the works in the collaboration network.",
)
class FilterProperties(BaseModel):
start_year: Optional[int] = Field(
title="Start Year",
description="The start publication year for the works to include in the collaboration network.",
)
end_year: Optional[int] = Field(
title="End Year",
description="The end publication year for the works to include in the collaboration network.",
)
allowed_institutions: Optional[List[str]] = Field(
title="Allowed Institutions",
description="The list of raw institution IDs to include in the collaboration network. If not provided, all institutions will be included.",
)
class CollaborationNetworkNode(BaseModel):
raw_id: str = Field(
title="Raw ID",
description="The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.",
)
display_name: str = Field(
title="Display Name", description="The display name of the node."
)
category: CollaborationNetworkNodeType = Field(
title="Category",
description="The category of the node, either 'author', 'institution', or 'work'.",
)
def __eq__(self, value: object) -> bool:
if isinstance(value, CollaborationNetworkNode):
return self.raw_person_id == value.raw_person_id
return self.raw_id == value.raw_id
return False
def __hash__(self) -> int:
return hash(self.raw_person_id)
return hash(self.raw_id)
class CollaborationNetworkEdge(BaseModel):
raw_source_person_id: str = Field(
title="Source Raw Person ID",
description="The raw person ID of the source person.",
raw_source_id: str = Field(
title="Source Raw ID",
description="The raw ID of the source node.",
)
raw_target_person_id: str = Field(
title="Target Raw Person ID",
description="The raw person ID of the target person.",
)
raw_work_ids: List[str] = Field(
title="Work IDs",
description="The list of work IDs that represent the collaborations between the two persons.",
raw_target_id: str = Field(
title="Target Raw ID",
description="The raw ID of the target node.",
)
def __eq__(self, value: object) -> bool:
@@ -40,7 +97,7 @@ class CollaborationNetworkEdge(BaseModel):
return False
def __hash__(self) -> int:
return hash((self.raw_source_person_id, self.raw_target_person_id))
return hash((self.raw_source_id, self.raw_target_id))
@classmethod
def same_collaboration(
@@ -55,53 +112,13 @@ class CollaborationNetworkEdge(BaseModel):
bool: True if the edges have the same source and target person IDs (undirected), False otherwise.
"""
return (
edge1.raw_source_person_id == edge2.raw_source_person_id
and edge1.raw_target_person_id == edge2.raw_target_person_id
edge1.raw_source_id == edge2.raw_source_id
and edge1.raw_target_id == edge2.raw_target_id
) or (
edge1.raw_source_person_id == edge2.raw_target_person_id
and edge1.raw_target_person_id == edge2.raw_source_person_id
edge1.raw_source_id == edge2.raw_target_id
and edge1.raw_target_id == edge2.raw_source_id
)
@classmethod
def merge(
cls, edge1: "CollaborationNetworkEdge", edge2: "CollaborationNetworkEdge"
) -> "CollaborationNetworkEdge":
"""Merges two collaboration edges by concatenating their raw_work_ids.
Args:
edge1 (CollaborationNetworkEdge): The first collaboration edge.
edge2 (CollaborationNetworkEdge): The second collaboration edge.
Returns:
CollaborationNetworkEdge: A new collaboration edge with the same source and target but with the raw_work_ids equal to the concatenation of the raw_work_ids of the input edges.
"""
if not cls.same_collaboration(edge1, edge2):
raise ValueError(
"Cannot merge edges that do not represent the same collaboration."
)
return cls(
raw_source_person_id=edge1.raw_source_person_id,
raw_target_person_id=edge1.raw_target_person_id,
raw_work_ids=edge1.raw_work_ids + edge2.raw_work_ids,
)
class CollaborationWork(BaseModel):
raw_work_id: str = Field(
title="Raw Work ID", description="The raw work ID of the work."
)
display_title: str = Field(
title="Display Title", description="The display title of the work."
)
def __eq__(self, value: object) -> bool:
if isinstance(value, CollaborationWork):
return self.raw_work_id == value.raw_work_id
return False
def __hash__(self) -> int:
return hash(self.raw_work_id)
class CollaborationNetwork(BaseModel):
raw_person_id: str = Field(
@@ -116,7 +133,7 @@ class CollaborationNetwork(BaseModel):
title="Collaboration Network Edges",
description="The edges in the collaboration network.",
)
works: List[CollaborationWork] = Field(
title="Collaboration Works",
description="The works that represent the collaborations in the collaboration network.",
filter_information: FilterInformation = Field(
title="Filter Information",
description="The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.",
)
@@ -1,144 +1,382 @@
import logging
from typing import List, Set, Tuple
from typing import List, Optional, Set, Tuple
from inse.collaboration_network.schemas import (
CollaborationNetwork,
CollaborationNetworkEdge,
CollaborationNetworkNode,
CollaborationWork,
CollaborationNetworkNodeType,
FilterInformation,
FilterProperties,
InstitutionInformation,
)
from inse.work import service as work_service
from inse.utils import extract_raw_author_id, extract_raw_work_id
from inse.models.work import Work
from inse.works import logic as work_logic
from inse.works.model import Work
from inse.utils import (
extract_raw_author_id,
extract_raw_institution_id,
extract_raw_work_id,
)
from inse.models.author import Author
from inse.models.authorship import Authorship
from inse.models.dehydrated_author import DehydratedAuthor
from inse.models.dehydrated_institution import DehydratedInstitution
from inse.models.institution import Institution
logger = logging.getLogger(__name__)
def get_collaboration_network(raw_user_id: str) -> CollaborationNetwork:
async def get_collaboration_network(
raw_user_id: str,
filter_properties: Optional[FilterProperties] = None,
) -> CollaborationNetwork:
"""Gets the collaboration network for a given user ID.
Args:
raw_user_id (str): The raw user ID for whom to get the collaboration network.
filter_properties (Optional[FilterProperties]): The filter properties for the collaboration network.
Returns:
CollaborationNetwork: The collaboration network for the given user.
"""
raw_user_id = raw_user_id.strip().upper()
logger.info(f"Getting collaboration network for user ID: {raw_user_id}")
work_page = work_service.search_person_works(
raw_author_id=raw_user_id, offset=0, size=None
)
work_page = await work_logic.get_all_author_works(author_id=raw_user_id)
works: List[Work] = work_page.elements
return build_collaboration_network(raw_user_id=raw_user_id, works=works)
return build_collaboration_network(
raw_user_id=raw_user_id, works=works, filter_properties=filter_properties
)
def get_work_year(work: Work) -> int:
"""Extracts the publication year from a given work.
Args:
work (Work): The work from which to extract the publication year.
Returns:
int: The publication year of the work, or -1 if it cannot be extracted.
"""
if not work.publication_year:
return -1
try:
return int(work.publication_year)
except ValueError:
return -1
def filter_works(
min_year: Optional[int], max_year: Optional[int], works: List[Work]
) -> List[Work]:
"""Filters a list of works based on a given year range.
Args:
min_year (Optional[int]): The minimum publication year for the works to include.
max_year (Optional[int]): The maximum publication year for the works to include.
works (List[Work]): The list of works to filter.
Returns:
List[Work]: A list of works that fall within the specified year range.
"""
filtered_works = []
for work in works:
work_year = get_work_year(work)
if min_year is not None and work_year < min_year:
continue
if max_year is not None and work_year > max_year:
continue
filtered_works.append(work)
return filtered_works
def get_year_range(works: List[Work]) -> Tuple[int, int]:
"""Determines the minimum and maximum publication years from a list of works.
Args:
works (List[Work]): The list of works from which to determine the year range.
Returns:
Tuple[int, int]: A tuple containing the minimum and maximum publication years, respectively.
"""
min_year = float("inf")
max_year = float("-inf")
for work in works:
work_year = get_work_year(work)
if work_year != -1: # Only consider valid years
min_year = min(min_year, work_year)
max_year = max(max_year, work_year)
return int(min_year), int(max_year)
def build_collaboration_network(
raw_user_id: str, works: List[Work]
raw_user_id: str,
works: List[Work],
filter_properties: Optional[FilterProperties] = None,
) -> CollaborationNetwork:
"""Builds a collaboration network for a given user based on their works.
Args:
raw_user_id (str): The raw user ID for whom the collaboration network is being built.
works (List[Work]): A list of works for which to build the collaboration network.
filter_properties (Optional[FilterProperties]): The filter properties for the collaboration network.
Returns:
CollaborationNetwork: The built collaboration network.
"""
collaboration_nodes: Set[CollaborationNetworkNode] = set()
collaboration_edges: Set[CollaborationNetworkEdge] = set()
collaboration_works: Set[CollaborationWork] = set()
for work in works:
nodes, edges, work = extract_authors_and_collaborations(work=work)
min_possible_year, max_possible_year = get_year_range(works)
min_year = (
filter_properties.start_year
if filter_properties
and filter_properties.start_year is not None
and filter_properties.start_year >= min_possible_year
else min_possible_year
)
max_year = (
filter_properties.end_year
if filter_properties
and filter_properties.end_year is not None
and filter_properties.end_year <= max_possible_year
else max_possible_year
)
filtered_works = filter_works(
min_year=min_year,
max_year=max_year,
works=works,
)
for work in filtered_works:
nodes, edges = process_work(work=work)
work_year = get_work_year(work)
min_possible_year = min(min_possible_year, work_year)
max_possible_year = max(max_possible_year, work_year)
collaboration_nodes.update(nodes)
collaboration_works.add(work)
# updating weights of same edges
for edge in edges:
if edge in collaboration_edges:
existing_edge = next(e for e in collaboration_edges if e == edge)
merged_edge = CollaborationNetworkEdge.merge(existing_edge, edge)
collaboration_edges.remove(existing_edge)
collaboration_edges.add(merged_edge)
else:
collaboration_edges.add(edge)
collaboration_edges.update(edges)
filter_information = FilterInformation(
min_possible_year=int(min_possible_year),
max_possible_year=int(max_possible_year),
institutions=sorted(
extract_institutions(works=works), key=lambda inst: inst.display_name
),
)
return CollaborationNetwork(
raw_person_id=raw_user_id,
nodes=list(collaboration_nodes),
edges=list(collaboration_edges),
works=list(collaboration_works),
filter_information=filter_information,
)
def extract_authors_and_collaborations(
work: Work,
) -> Tuple[
Set[CollaborationNetworkNode], Set[CollaborationNetworkEdge], CollaborationWork
]:
"""Extracts authors and their collaborations from a given work.
def extract_institutions(works: List[Work]) -> Set[InstitutionInformation]:
"""Extracts a set of unique institutions from a list of works.
Args:
work (Work): The work from which to extract authors and collaborations.
works (List[Work]): The list of works from which to extract institutions.
Returns:
Tuple[Set[CollaborationNetworkNode], Set[CollaborationNetworkEdge], CollaborationWork]: A tuple containing a set of collaboration network nodes and edges, and a collaboration work.
Set[InstitutionInformation]: A set of unique institution information associated with the works.
"""
collaboration_nodes: Set[CollaborationNetworkNode] = set()
collaboration_edges: Set[CollaborationNetworkEdge] = set()
institutions: Set[InstitutionInformation] = set()
for work in works:
if work.authorships:
for authorship in work.authorships:
if authorship.institutions:
for institution in authorship.institutions:
if not institution.id or not institution.display_name:
continue
institution_id = extract_raw_institution_id(institution.id)
institution_info = InstitutionInformation(
raw_id=institution_id,
display_name=str(institution.display_name),
)
institutions.add(institution_info)
return institutions
def process_authorship(
authorship: Authorship,
) -> Tuple[
Optional[CollaborationNetworkNode],
Set[CollaborationNetworkNode],
Set[CollaborationNetworkEdge],
]:
"""Processes an authorship to extract the corresponding collaboration network node and associated institutions.
Args:
authorship (Authorship): The authorship to process.
Returns:
Tuple[CollaborationNetworkNode, List[CollaborationNetworkNode]]: A tuple containing the collaboration network node and a list of associated institution nodes.
"""
author = authorship.author
if not author or not author.id or not author.display_name:
return None, set(), set()
author_node = get_author_node(author)
if not author_node:
return None, set(), set()
institution_nodes = get_institution_nodes(authorship.institutions or [])
associated_institution_edges = {
CollaborationNetworkEdge(
raw_source_id=author_node.raw_id,
raw_target_id=institution_node.raw_id,
)
for institution_node in institution_nodes
}
return author_node, institution_nodes, associated_institution_edges
def get_institution_nodes(
institutions: List[Institution] | List[DehydratedInstitution],
) -> Set[CollaborationNetworkNode]:
"""Processes a list of institutions to extract the corresponding collaboration network nodes.
Args:
institutions (List[Institution]): The list of institutions to process.
Returns:
Set[CollaborationNetworkNode]: A set of collaboration network nodes corresponding to the institutions.
"""
institution_nodes: Set[CollaborationNetworkNode] = set()
for institution in institutions:
institution_node = get_institution_node(institution)
if institution_node:
institution_nodes.add(institution_node)
return institution_nodes
def get_institution_node(
institution: Institution | DehydratedInstitution,
) -> Optional[CollaborationNetworkNode]:
"""Processes an institution to extract the corresponding collaboration network node.
Args:
institution (Institution): The institution to process.
Returns:
CollaborationNetworkNode: The collaboration network node corresponding to the institution, or None if the institution is invalid.
"""
if not institution or not institution.id or not institution.display_name:
return None
institution_id = extract_raw_institution_id(institution.id)
display_name = institution.display_name
return CollaborationNetworkNode(
raw_id=institution_id,
display_name=display_name,
category=CollaborationNetworkNodeType.INSTITUTION,
)
def get_work_node(work: Work) -> Optional[CollaborationNetworkNode]:
"""Processes a work to extract the corresponding collaboration network node.
Args:
work (Work): The work to process.
Returns:
Optional[CollaborationNetworkNode]: The collaboration network node corresponding to the work, or None if the work is invalid.
"""
if not work or not work.id or not work.display_name:
return None
work_id = extract_raw_work_id(work.id)
display_name = work.display_name
return CollaborationNetworkNode(
raw_id=work_id,
display_name=display_name,
category=CollaborationNetworkNodeType.WORK,
)
def get_author_node(
author: Author | DehydratedAuthor,
) -> Optional[CollaborationNetworkNode]:
"""Processes an author to extract the corresponding collaboration network node.
Args:
author (Author): The author to process.
Returns:
CollaborationNetworkNode: The collaboration network node corresponding to the author, or None if the author is invalid.
"""
if not author or not author.id or not author.display_name:
return None
author_id = extract_raw_author_id(author.id)
display_name = author.display_name
return CollaborationNetworkNode(
raw_id=author_id,
display_name=display_name,
category=CollaborationNetworkNodeType.AUTHOR,
)
def process_work(
work: Work,
allowed_institutions: Optional[List[InstitutionInformation]] = None,
) -> Tuple[Set[CollaborationNetworkNode], Set[CollaborationNetworkEdge]]:
"""Processes a work to extract the corresponding collaboration network nodes and edges.
Args:
work (Work): The work to process.
Returns:
Tuple[Set[CollaborationNetworkNode], Set[CollaborationNetworkEdge]]: A tuple containing a set of collaboration network nodes and edges.
"""
work_node = get_work_node(work)
if not work_node:
return set(), set()
authorships = work.authorships
# work missing required properties for displaying
if not authorships or not work.id or not work.display_name:
return (
collaboration_nodes,
collaboration_edges,
CollaborationWork(raw_work_id="", display_title=""),
)
if not authorships:
return set(), set()
collaboration_nodes: Set[CollaborationNetworkNode] = {work_node}
collaboration_edges: Set[CollaborationNetworkEdge] = set()
for authorship in authorships:
author = authorship.author
# only considering authors with OpenAlex IDs
if not author or not author.id:
continue
author_id = extract_raw_author_id(author.id)
# skipping if raw author ID cannot be extracted
if not author_id:
continue
display_name = author.display_name
# skipping if display name is missing
if not display_name:
author_node, institution_nodes, associated_institution_edges = (
process_authorship(authorship)
)
if not author_node:
continue
collaboration_nodes.add(
CollaborationNetworkNode(raw_person_id=author_id, display_name=display_name)
# skipping authors that are not associated with any of the allowed institutions (if provided)
if allowed_institutions is not None and institution_nodes:
institution_ids = {node.raw_id for node in institution_nodes}
allowed_institution_ids = {inst.raw_id for inst in allowed_institutions}
if not institution_ids.intersection(allowed_institution_ids):
continue
work_author_edge = CollaborationNetworkEdge(
raw_source_id=author_node.raw_id,
raw_target_id=work_node.raw_id,
)
# sorted to ensure consistent order
author_ids = sorted(
[
extract_raw_author_id(authorship.author.id)
for authorship in authorships
if authorship.author and authorship.author.id
]
)
for i in range(len(author_ids)):
for j in range(i + 1, len(author_ids)):
collaboration_edges.add(
CollaborationNetworkEdge(
raw_source_person_id=author_ids[i],
raw_target_person_id=author_ids[j],
raw_work_ids=[extract_raw_work_id(work.id or "")],
)
)
collaboration_nodes.add(author_node)
collaboration_edges.add(work_author_edge)
collaboration_nodes.update(institution_nodes)
collaboration_edges.update(associated_institution_edges)
return (
collaboration_nodes,
collaboration_edges,
CollaborationWork(
raw_work_id=extract_raw_work_id(work.id),
display_title=work.display_name,
),
)
return collaboration_nodes, collaboration_edges
+2 -1
View File
@@ -28,7 +28,8 @@ class Settings(BaseSettings):
auth_secret: str = "change-me-to-a-secure-secret-key"
# OpenAlex works search config
openalex_works_search_base_url: str = "https://project.nes.uni-due.de/elastic"
openalex_works_search_index: str = "openalex-works"
# IMPORTANT: wildcard * needed to query all work indices
openalex_works_search_index: str = "openalex-works*"
openalex_works_api_key: str = (
"am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ=="
)
@@ -0,0 +1,33 @@
from typing import Any, Optional
import httpx
from .. import config
def search(
index: str,
query_field: str,
query_value: str
) -> dict[str, Any]:
headers = {
"Authorization": f"ApiKey {config.settings.elasticsearch_api_key}",
"Content-Type": "application/json"
}
payload = {
"query": {
"query_string": {
"default_field": query_field,
"query": query_value
}
}
}
with httpx.Client() as client:
response = client.post(
f"{config.settings.elasticsearch_url}/{index}/_search",
json=payload,
headers=headers
)
response.raise_for_status()
return response.json()
+32
View File
@@ -0,0 +1,32 @@
from typing import Any
import httpx
from .. import config
def call(
system_prompt: str,
user_prompt: str,
model: str = None,
stream: bool = False,
timeout: int = 30
) -> str:
headers = {
"Authorization": f"Bearer {config.settings.llm_api_token}",
"Content-Type": "application/json"
}
if model is None:
model = config.settings.llm_model
payload = {
"model": model,
"prompt": f"{system_prompt}\n{user_prompt}",
"stream": stream
}
with httpx.Client(timeout=timeout) as client:
response = client.post(config.settings.llm_api_url, json=payload, headers=headers)
response.raise_for_status()
data = response.json()
return data.get("response", "")
+8 -33
View File
@@ -20,6 +20,8 @@ import json
from . import schema
from . import model
from . import config
from .integrations import elasticsearch
from .integrations import llm
logger = logging.getLogger(__name__)
topic_cache_filename: str = "topic_hierarchy_cache.json"
@@ -200,11 +202,6 @@ def count_topic_hierarchy(topic_names: List[str]) -> dict:
def search_persons(author_id: Optional[str] = None, query: Optional[str] = None,
include: Optional[set[str]] = None) -> model.PersonSearchResult:
headers = {
"Authorization": f"ApiKey {config.settings.elasticsearch_api_key}",
"Content-Type": "application/json"
}
if author_id:
query_field = "_id"
query_value = author_id
@@ -214,19 +211,11 @@ def search_persons(author_id: Optional[str] = None, query: Optional[str] = None,
else:
return "Either author_id or query must be provided"
payload = {
"query": {
"query_string": {
"default_field": query_field,
"query": query_value
}
}
}
with httpx.Client() as client:
response = client.post(config.settings.elasticsearch_url + '/openalex-authors/_search', json=payload, headers=headers)
response.raise_for_status()
data = response.json()
data = elasticsearch.search(
index="openalex-authors",
query_field=query_field,
query_value=query_value
)
include_set = {tag.strip().lower() for tag in include} if include else set()
persons = []
@@ -294,20 +283,6 @@ def generate_person_bio(author_id: str) -> str:
system_prompt = "Erstelle eine Beschreibung der Person in 3-5 Sätzen. Gebe nur die Beschreibung zurück, ohne Einleitung oder Schluss."
user_prompt = f"Daten zur Person:\n{person_json}"
headers = {
"Authorization": f"Bearer {config.settings.llm_api_token}",
"Content-Type": "application/json"
}
payload = {
"model": config.settings.llm_model,
"prompt": f"{system_prompt}\n{user_prompt}",
"stream": False
}
with httpx.Client(timeout=30.0) as client:
response = client.post(config.settings.llm_api_url, json=payload, headers=headers)
response.raise_for_status()
data = response.json()
return data.get("response", "")
return llm.call(system_prompt=system_prompt, user_prompt=user_prompt)
Binary file not shown.
+6
View File
@@ -17,3 +17,9 @@ def extract_raw_work_id(work_id: str) -> str:
if match:
return match.group().split("/")[-1]
raise ValueError("Invalid work ID format")
def extract_raw_institution_id(institution_id: str) -> str:
match = re.search(r"https://openalex\.org/I\d+", institution_id, re.IGNORECASE)
if match:
return match.group().split("/")[-1]
raise ValueError("Invalid institution ID format")
+89 -13
View File
@@ -32,8 +32,59 @@ async def get_author_works(
client: OpenAlexWorksSearchClient | None = None,
) -> model.WorkPage:
search_client = client or OpenAlexWorksSearchClient()
data = await _search_author_works_data(
search_client,
author_id,
page,
size,
publication_year=publication_year,
work_type=work_type,
language=language,
)
elements, total = _parse_work_search_response(data)
return model.WorkPage(elements=elements, page=page, size=size, total=total)
async def get_all_author_works(
author_id: str,
client: OpenAlexWorksSearchClient | None = None,
) -> model.WorkList:
search_client = client or OpenAlexWorksSearchClient()
page = 1
size = 100
all_elements: list[model.Work] = []
total = 0
while True:
data = await _search_author_works_data(
search_client,
author_id,
page,
size,
)
elements, total = _parse_full_work_search_response(data)
all_elements.extend(elements)
if not elements or len(all_elements) >= total:
break
page += 1
return model.WorkList(elements=all_elements, total=total)
async def _search_author_works_data(
search_client: OpenAlexWorksSearchClient,
author_id: str,
page: int,
size: int,
publication_year: list[int] | None = None,
work_type: list[str] | None = None,
language: list[str] | None = None,
) -> dict:
try:
data = await search_client.search_author_works(
return await search_client.search_author_works(
author_id,
page,
size,
@@ -54,21 +105,18 @@ async def get_author_works(
detail="OpenAlex works search request failed.",
) from exc
hits_block = data.get("hits", {})
total = hits_block.get("total", 0)
def _parse_work_search_response(data: dict) -> tuple[list[model.WorkSummary], int]:
hits = data.get("hits", {})
total = hits.get("total", 0)
if isinstance(total, dict):
total = total.get("value", 0)
try:
hits = hits_block.get("hits", [])
elements: List[Work] = []
for work in hits:
if "mag" in work["_source"]["ids"]:
work["_source"]["ids"]["mag"] = int(work["_source"]["ids"]["mag"])
work = Work.from_dict(work["_source"])
if not work:
continue
elements.append(work)
elements = [
model.WorkSummary.model_validate(_to_work_summary(hit.get("_source", {})))
for hit in hits.get("hits", [])
]
except ValidationError as exc:
logger.exception("OpenAlex works search response could not be parsed.")
raise HTTPException(
@@ -76,7 +124,35 @@ async def get_author_works(
detail="OpenAlex works search response could not be parsed.",
) from exc
return model.WorkPage(elements=elements, page=page, size=size, total=total)
return elements, total
def _parse_full_work_search_response(data: dict) -> tuple[list[model.Work], int]:
hits_block = data.get("hits", {})
total = hits_block.get("total", 0)
if isinstance(total, dict):
total = total.get("value", 0)
try:
elements: List[Work] = []
hits = hits_block.get("hits", [])
sources = [hit.get("_source", {}) for hit in hits]
for source in sources:
if "mag" in source["ids"]:
source["ids"]["mag"] = int(source["ids"]["mag"])
work = Work.from_dict(source)
if not work:
continue
elements.append(work)
except ValidationError as exc:
logger.exception("OpenAlex works search response could not be parsed.")
raise HTTPException(
status_code=HTTP_502_BAD_GATEWAY,
detail="OpenAlex works search response could not be parsed.",
) from exc
return elements, total
def _to_work_summary(source: dict) -> dict:
+113 -1
View File
@@ -244,10 +244,122 @@ class HasContent(OpenAlexModel):
)
# class Work(OpenAlexModel):
# id: str = Field(description="The external id of the work.")
# doi: Optional[str] = Field(
# default=None, description="The optional DOI of the work."
# )
# title: Optional[str] = Field(default=None, description="The title of the work.")
# display_name: Optional[str] = Field(
# default=None, description="The display name of the work."
# )
# publication_year: Optional[int] = Field(
# default=None, description="The publication year."
# )
# publication_date: Optional[str] = Field(
# default=None, description="The publication date."
# )
# type: Optional[str] = Field(default=None, description="The work type.")
# language: Optional[str] = Field(default=None, description="The work language.")
# cited_by_count: int = Field(default=0, description="The number of citations.")
# is_retracted: Optional[bool] = Field(
# default=None, description="Whether the work is retracted."
# )
# is_paratext: Optional[bool] = Field(
# default=None, description="Whether the work is paratext."
# )
# primary_location: Optional[Location] = Field(
# default=None, description="The primary location."
# )
# locations: List[Location] = Field(
# default_factory=list, description="The work locations."
# )
# best_oa_location: Optional[Location] = Field(
# default=None, description="The best open access location."
# )
# open_access: Optional[OpenAccess] = Field(
# default=None, description="Open access information."
# )
# authorships: List[Authorship] = Field(
# default_factory=list, description="The authorships."
# )
# ids: Optional[WorkIds] = Field(default=None, description="External ids.")
# biblio: Optional[Biblio] = Field(
# default=None, description="Bibliographic information."
# )
# abstract_inverted_index: dict[str, List[int]] = Field(
# default_factory=dict, description="The inverted abstract index."
# )
# referenced_works: List[str] = Field(
# default_factory=list, description="Referenced work ids."
# )
# referenced_works_count: int = Field(
# default=0, description="The number of referenced works."
# )
# related_works: List[str] = Field(
# default_factory=list, description="Related work ids."
# )
# topics: List[Topic] = Field(default_factory=list, description="The topics.")
# primary_topic: Optional[Topic] = Field(
# default=None, description="The primary topic."
# )
# keywords: List[Keyword] = Field(default_factory=list, description="The keywords.")
# funders: List[Funder] = Field(default_factory=list, description="The funders.")
# awards: List[Award] = Field(default_factory=list, description="The awards.")
# fwci: Optional[float] = Field(
# default=None, description="The field weighted citation impact."
# )
# citation_normalized_percentile: Optional[CitationNormalizedPercentile] = Field(
# default=None, description="The normalized citation percentile."
# )
# cited_by_percentile_year: Optional[CitedByPercentileYear] = Field(
# default=None, description="The cited by percentile year."
# )
# counts_by_year: List[CountByYear] = Field(
# default_factory=list, description="Citation counts by year."
# )
# sustainable_development_goals: List[SustainableDevelopmentGoal] = Field(
# default_factory=list, description="Sustainable development goals."
# )
# mesh: List[Mesh] = Field(default_factory=list, description="MeSH terms.")
# indexed_in: List[str] = Field(
# default_factory=list, description="Indexes containing the work."
# )
# has_content: Optional[HasContent] = Field(
# default=None, description="Available content flags."
# )
# content_url: Optional[str] = Field(default=None, description="The content URL.")
# created_date: Optional[str] = Field(default=None, description="The creation date.")
# updated_date: Optional[str] = Field(
# default=None, description="The last update timestamp."
# )
class WorkSummary(BaseModel):
doi: Optional[str] = Field(
default=None, description="The optional DOI of the work."
)
title: Optional[str] = Field(default=None, description="The title of the work.")
type: Optional[str] = Field(default=None, description="The work type.")
language: Optional[str] = Field(default=None, description="The work language.")
publication_year: Optional[int] = Field(
default=None, description="The publication year."
)
cited_by_count: int = Field(default=0, description="The number of citations.")
topics: List[str] = Field(
default_factory=list, description="The display names of the work topics."
)
class WorkPage(BaseModel):
elements: List[Work] = Field(
elements: List[WorkSummary] = Field(
default_factory=list, description="The works on this page."
)
page: int = Field(default=1, description="The current page number.")
size: int = Field(default=20, description="The requested page size.")
total: int = Field(default=0, description="The total number of works.")
class WorkList(BaseModel):
elements: List[Work] = Field(default_factory=list, description="All works.")
total: int = Field(default=0, description="The total number of works.")
@@ -3,6 +3,7 @@
"""
HTTP client for the OpenAlex works Elasticsearch index.
"""
import logging
from typing import Any
import httpx
@@ -13,6 +14,8 @@ from .. import config
class MissingApiKeyError(Exception):
pass
logger = logging.getLogger(__name__)
class OpenAlexWorksSearchClient:
def __init__(
@@ -110,5 +113,6 @@ class OpenAlexWorksSearchClient:
language=language,
),
)
logging.debug(f"Response: {response.text}")
response.raise_for_status()
return response.json()
+11
View File
@@ -56,3 +56,14 @@ async def get_author_works(
work_type=work_type,
language=language,
)
@router.get("/{author_id}/all",
operation_id="getAllAuthorWorks",
response_model=model.WorkList,
summary="Returns all works for an author.")
async def get_all_author_works(
author_id: Annotated[str, Path(description="The author id, for example A5023888391.")],
principal: security.Principal = Depends(security.roles_allowed(["SUPER_ADMIN", "UNI_ADMIN"])),
):
return await logic.get_all_author_works(author_id)
@@ -1,3 +1,5 @@
import json
import httpx
import pytest
from fastapi import HTTPException
@@ -76,6 +78,73 @@ async def test_get_author_works_maps_elasticsearch_response_to_work_page():
assert page.elements[0].topics == ["Machine learning"]
@pytest.mark.anyio
async def test_get_all_author_works_collects_all_pages():
requested_pages = []
def handler(request: httpx.Request) -> httpx.Response:
payload = json_from_request(request)
requested_pages.append(payload["from"] // payload["size"] + 1)
page = requested_pages[-1]
hits = [
{
"_source": {
"id": f"https://openalex.org/W{page}",
"doi": f"https://doi.org/10.1234/example-{page}",
"title": f"Example work {page}",
"display_name": f"Example work {page}",
"type": "article",
"language": "en",
"publication_year": 2024,
"publication_date": "2024-01-01",
"cited_by_count": page,
"primary_location": {
"is_oa": True,
"source": {
"id": "https://openalex.org/S123",
"display_name": "Example Source",
},
},
"authorships": [
{
"author": {
"id": "https://openalex.org/A5023888391",
"display_name": "Example Author",
},
},
],
"topics": [],
}
}
]
return httpx.Response(
200,
json={
"hits": {
"total": {"value": 2},
"hits": hits,
},
},
)
client = OpenAlexWorksSearchClient(
base_url="https://project.nes.uni-due.de/elastic",
api_key="test-key",
transport=httpx.MockTransport(handler),
)
works = await logic.get_all_author_works("A5023888391", client=client)
assert requested_pages == [1, 2]
assert works.total == 2
assert [work.title for work in works.elements] == ["Example work 1", "Example work 2"]
assert works.elements[0].id == "https://openalex.org/W1"
assert works.elements[0].display_name == "Example work 1"
assert works.elements[0].publication_date == "2024-01-01"
assert works.elements[0].primary_location.is_oa is True
assert works.elements[0].authorships[0].author.id == "https://openalex.org/A5023888391"
@pytest.mark.anyio
async def test_get_author_works_maps_missing_api_key_to_service_unavailable():
client = OpenAlexWorksSearchClient(api_key="")
@@ -101,3 +170,7 @@ async def test_get_author_works_maps_elasticsearch_errors_to_bad_gateway():
await logic.get_author_works("A5023888391", page=1, size=20, client=client)
assert exc.value.status_code == 502
def json_from_request(request: httpx.Request) -> dict:
return json.loads(request.content.decode("utf-8"))
@@ -64,3 +64,45 @@ def test_get_author_works_returns_page(monkeypatch):
"cited_by_count": 42,
"topics": ["Machine learning"],
}
def test_get_all_author_works_returns_list(monkeypatch):
config.settings.auth_disabled = True
async def fake_get_all_author_works(
author_id: str,
):
assert author_id == "A5023888391"
return model.WorkList(
elements=[
model.Work(
id="https://openalex.org/W2741809807",
doi="https://doi.org/10.7717/peerj.4375",
title="Example work",
display_name="Example work",
type="article",
language="en",
publication_year=2023,
cited_by_count=42,
topics=[
model.Topic(
id="https://openalex.org/T10102",
display_name="Machine learning",
)
],
)
],
total=1,
)
monkeypatch.setattr(logic, "get_all_author_works", fake_get_all_author_works)
response = client.get("/inse-service/authors/A5023888391/works/all")
assert response.status_code == 200
data = response.json()
assert data["total"] == 1
assert data["elements"][0]["id"] == "https://openalex.org/W2741809807"
assert data["elements"][0]["title"] == "Example work"
assert data["elements"][0]["display_name"] == "Example work"
assert data["elements"][0]["topics"][0]["display_name"] == "Machine learning"
+1 -1
View File
@@ -2,7 +2,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
plugins {
id "base"
id "org.openapi.generator" version "7.4.0"
id "org.openapi.generator" version "7.17.0"
id "com.github.node-gradle.node" version "7.0.2"
}
+8 -97
View File
@@ -1,6 +1,7 @@
.gitignore
.openapi-generator-ignore
README.md
api.base.service.ts
api.module.ts
api/api.ts
api/personNetwork.service.ts
@@ -9,118 +10,29 @@ configuration.ts
encoder.ts
git_push.sh
index.ts
model/abstractInvertedIndex.ts
model/anyRepositoryHasFulltext.ts
model/authorPosition.ts
model/authorship.ts
model/authorshipAuthor.ts
model/authorships.ts
model/award.ts
model/awards.ts
model/citedByCount.ts
model/citedByCount1.ts
model/collaborationNetwork.ts
model/collaborationNetworkEdge.ts
model/collaborationNetworkNode.ts
model/collaborationWork.ts
model/contentUrl.ts
model/countries.ts
model/countryCode.ts
model/countsByYear.ts
model/createdDate.ts
model/collaborationNetworkNodeType.ts
model/dehydratedAuthor.ts
model/dehydratedFunder.ts
model/dehydratedInstitution.ts
model/dehydratedSource.ts
model/descriptorName.ts
model/descriptorUi.ts
model/displayName.ts
model/displayName1.ts
model/doi.ts
model/doi1.ts
model/firstPage.ts
model/funderAwardId.ts
model/funderDisplayName.ts
model/funderId.ts
model/funders.ts
model/filterInformation.ts
model/filterProperties.ts
model/fwci.ts
model/grobidXml.ts
model/hTTPValidationError.ts
model/hostOrganization.ts
model/hostOrganizationLineage.ts
model/hostOrganizationName.ts
model/id.ts
model/id1.ts
model/indexedIn.ts
model/institutions.ts
model/isAccepted.ts
model/isCore.ts
model/isCorresponding.ts
model/isInDoaj.ts
model/isInTop10Percent.ts
model/isInTop1Percent.ts
model/isMajorTopic.ts
model/isOa.ts
model/isOa1.ts
model/isOa2.ts
model/isParatext.ts
model/isPublished.ts
model/isRetracted.ts
model/issn.ts
model/issnL.ts
model/issue.ts
model/keywords.ts
model/landingPageUrl.ts
model/language.ts
model/language1.ts
model/lastPage.ts
model/license.ts
model/licenseId.ts
model/lineage.ts
model/institutionInformation.ts
model/location.ts
model/locationSource.ts
model/locations.ts
model/mag.ts
model/max.ts
model/mesh.ts
model/min.ts
model/models.ts
model/oaStatus.ts
model/oaUrl.ts
model/openAccess.ts
model/openalex.ts
model/orcid.ts
model/pdf.ts
model/pdfUrl.ts
model/pmcid.ts
model/pmid.ts
model/publicationDate.ts
model/publicationYear.ts
model/publicationYear1.ts
model/qualifierName.ts
model/qualifierUi.ts
model/rawAffiliationStrings.ts
model/rawAuthorName.ts
model/referencedWorks.ts
model/referencedWorksCount.ts
model/relatedWorks.ts
model/ror.ts
model/score.ts
model/sustainableDevelopmentGoals.ts
model/title.ts
model/topics.ts
model/type.ts
model/type1.ts
model/type2.ts
model/type3.ts
model/updatedDate.ts
model/validationError.ts
model/validationErrorLocInner.ts
model/value.ts
model/version.ts
model/volume.ts
model/work.ts
model/workBestOaLocation.ts
model/workBiblio.ts
model/workCitationNormalizedPercentile.ts
model/workCitedByPercentileYear.ts
@@ -128,16 +40,15 @@ model/workCountsByYearInner.ts
model/workHasContent.ts
model/workIds.ts
model/workKeyword.ts
model/workList.ts
model/workMeshInner.ts
model/workOpenAccess.ts
model/workPage.ts
model/workPrimaryLocation.ts
model/workPrimaryTopic.ts
model/workSummary.ts
model/workSustainableDevelopmentGoalsInner.ts
model/workTopic.ts
model/workTopicDomain.ts
model/workTopicField.ts
model/workTopicSubfield.ts
model/year.ts
param.ts
provide-api.ts
variables.ts
@@ -1 +1 @@
7.4.0
7.17.0
+111 -152
View File
@@ -1,30 +1,35 @@
## @
# @
### Building
API for the Innovation Search Engine (INSE) application.
The version of the OpenAPI document: 0.1.0
## Building
To install the required dependencies and to build the typescript sources run:
```
```console
npm install
npm run build
```
### publishing
## Publishing
First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!)
First build the package then run `npm publish dist` (don't forget to specify the `dist` folder!)
### consuming
## Consuming
Navigate to the folder of your consuming project and run one of next commands.
_published:_
```
```console
npm install @ --save
```
_without publishing (not recommended):_
```
```console
npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save
```
@@ -33,173 +38,126 @@ _It's important to take the tgz file, otherwise you'll get trouble with links on
_using `npm link`:_
In PATH_TO_GENERATED_PACKAGE/dist:
```
```console
npm link
```
In your project:
```
```console
npm link
```
__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround.
Please refer to this issue <https://github.com/angular/angular-cli/issues/8284> for a solution / workaround.
Published packages are not effected by this issue.
#### General usage
### General usage
In your Angular project:
```typescript
```
// without configuring providers
import { ApiModule } from '';
import { HttpClientModule } from '@angular/common/http';
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
@NgModule({
imports: [
ApiModule,
// make sure to import the HttpClientModule in the AppModule only,
// see https://github.com/angular/angular/issues/20575
HttpClientModule
],
declarations: [ AppComponent ],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule {}
```
```
// configuring providers
import { ApiModule, Configuration, ConfigurationParameters } from '';
export function apiConfigFactory (): Configuration {
const params: ConfigurationParameters = {
// set configuration parameters here.
}
return new Configuration(params);
}
@NgModule({
imports: [ ApiModule.forRoot(apiConfigFactory) ],
declarations: [ AppComponent ],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule {}
```
```
// configuring providers with an authentication service that manages your access tokens
import { ApiModule, Configuration } from '';
@NgModule({
imports: [ ApiModule ],
declarations: [ AppComponent ],
export const appConfig: ApplicationConfig = {
providers: [
{
provide: Configuration,
useFactory: (authService: AuthService) => new Configuration(
{
basePath: environment.apiUrl,
accessToken: authService.getAccessToken.bind(authService)
}
),
deps: [AuthService],
multi: false
}
// ...
provideHttpClient(),
provideApi()
],
bootstrap: [ AppComponent ]
})
export class AppModule {}
```
```
import { DefaultApi } from '';
export class AppComponent {
constructor(private apiGateway: DefaultApi) { }
}
```
Note: The ApiModule is restricted to being instantiated once app wide.
This is to ensure that all services are treated as singletons.
#### Using multiple OpenAPI files / APIs / ApiModules
In order to use multiple `ApiModules` generated from different OpenAPI files,
you can create an alias name when importing the modules
in order to avoid naming conflicts:
```
import { ApiModule } from 'my-api-path';
import { ApiModule as OtherApiModule } from 'my-other-api-path';
import { HttpClientModule } from '@angular/common/http';
@NgModule({
imports: [
ApiModule,
OtherApiModule,
// make sure to import the HttpClientModule in the AppModule only,
// see https://github.com/angular/angular/issues/20575
HttpClientModule
]
})
export class AppModule {
}
```
### Set service base path
If different than the generated base path, during app bootstrap, you can provide the base path to your service.
```
import { BASE_PATH } from '';
bootstrap(AppComponent, [
{ provide: BASE_PATH, useValue: 'https://your-web-service.com' },
]);
```
or
```
import { BASE_PATH } from '';
@NgModule({
imports: [],
declarations: [ AppComponent ],
providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],
bootstrap: [ AppComponent ]
})
export class AppModule {}
```
#### Using @angular/cli
First extend your `src/environments/*.ts` files by adding the corresponding base path:
```
export const environment = {
production: false,
API_BASE_PATH: 'http://127.0.0.1:8080'
};
```
In the src/app/app.module.ts:
**NOTE**
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
```typescript
import { ApiModule } from '';
```
import { BASE_PATH } from '';
If different from the generated base path, during app bootstrap, you can provide the base path to your service.
```typescript
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideApi('http://localhost:9999')
],
};
```
```typescript
// with a custom configuration
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideApi({
withCredentials: true,
username: 'user',
password: 'password'
})
],
};
```
```typescript
// with factory building a custom configuration
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi, Configuration } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
{
provide: Configuration,
useFactory: (authService: AuthService) => new Configuration({
basePath: 'http://localhost:9999',
withCredentials: true,
username: authService.getUsername(),
password: authService.getPassword(),
}),
deps: [AuthService],
multi: false
}
],
};
```
### Using multiple OpenAPI files / APIs
In order to use multiple APIs generated from different OpenAPI files,
you can create an alias name when importing the modules
in order to avoid naming conflicts:
```typescript
import { provideApi as provideUserApi } from 'my-user-api-path';
import { provideApi as provideAdminApi } from 'my-admin-api-path';
import { HttpClientModule } from '@angular/common/http';
import { environment } from '../environments/environment';
@NgModule({
declarations: [
AppComponent
],
imports: [ ],
providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],
bootstrap: [ AppComponent ]
})
export class AppModule { }
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideUserApi(environment.basePath),
provideAdminApi(environment.basePath),
],
};
```
### Customizing path parameter encoding
@@ -215,6 +173,7 @@ pass an arrow-function or method-reference to the `encodeParam` property of the
(see [General Usage](#general-usage) above).
Example value for use in your Configuration-Provider:
```typescript
new Configuration({
encodeParam: (param: Param) => myFancyParamEncoder(param),
+31 -83
View File
@@ -1,8 +1,6 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,118 +19,66 @@ import { Observable } from 'rxjs';
// @ts-ignore
import { CollaborationNetwork } from '../model/collaborationNetwork';
// @ts-ignore
import { FilterProperties } from '../model/filterProperties';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class PersonNetworkService {
export class PersonNetworkService extends BaseService {
protected basePath = 'http://localhost:8000';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* Get a person\&#39;s collaboration network.
* Returns a person\&#39;s collaboration network based on their works and co-authors.
* @endpoint post /aise-service/api/person/network/{raw_user_id}
* @param rawUserId The raw user ID of the person.
* @param filterProperties
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getCollaborationNetwork(rawUserId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CollaborationNetwork>;
public getCollaborationNetwork(rawUserId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CollaborationNetwork>>;
public getCollaborationNetwork(rawUserId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CollaborationNetwork>>;
public getCollaborationNetwork(rawUserId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CollaborationNetwork>;
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CollaborationNetwork>>;
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CollaborationNetwork>>;
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (rawUserId === null || rawUserId === undefined) {
throw new Error('Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -145,14 +91,16 @@ export class PersonNetworkService {
}
let localVarPath = `/aise-service/api/person/network/${this.configuration.encodeParam({name: "rawUserId", value: rawUserId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<CollaborationNetwork>('get', `${this.configuration.basePath}${localVarPath}`,
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CollaborationNetwork>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: filterProperties,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+90 -103
View File
@@ -1,8 +1,6 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,86 +19,87 @@ import { Observable } from 'rxjs';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { Language } from '../model/language';
// @ts-ignore
import { PublicationYear } from '../model/publicationYear';
// @ts-ignore
import { Type } from '../model/type';
import { WorkList } from '../model/workList';
// @ts-ignore
import { WorkPage } from '../model/workPage';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class WorksService {
export class WorksService extends BaseService {
protected basePath = 'http://localhost:8000';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
if (configuration) {
this.configuration = configuration;
}
if (typeof this.configuration.basePath !== 'string') {
if (Array.isArray(basePath) && basePath.length > 0) {
basePath = basePath[0];
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
/**
* Returns all works for an author.
* @endpoint get /api/works/{author_id}/all
* @param authorId The author id, for example A5023888391.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllAuthorWorks(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WorkList>;
public getAllAuthorWorks(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WorkList>>;
public getAllAuthorWorks(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WorkList>>;
public getAllAuthorWorks(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error('Required parameter authorId was null or undefined when calling getAllAuthorWorks.');
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10));
} else {
throw Error("key may not be null if value is Date");
}
let localVarHeaders = this.defaultHeaders;
// authentication (bearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(
httpParams, value[k], key != null ? `${key}.${k}` : k));
responseType_ = 'blob';
}
} else if (key != null) {
httpParams = httpParams.append(key, value);
} else {
throw Error("key may not be null if value is not object or array");
}
return httpParams;
let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/all`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<WorkList>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* Returns a page of works for an author.
* @endpoint get /api/works/{author_id}
* @param authorId The author id, for example A5023888391.
* @param page The page number.
* @param size The page size.
@@ -110,66 +109,53 @@ export class WorksService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: PublicationYear, type?: Type, language?: Language, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WorkPage>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: PublicationYear, type?: Type, language?: Language, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WorkPage>>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: PublicationYear, type?: Type, language?: Language, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WorkPage>>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: PublicationYear, type?: Type, language?: Language, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array<number>, type?: Array<string>, language?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<WorkPage>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array<number>, type?: Array<string>, language?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<WorkPage>>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array<number>, type?: Array<string>, language?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<WorkPage>>;
public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array<number>, type?: Array<string>, language?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error('Required parameter authorId was null or undefined when calling getAuthorWorks.');
}
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (page !== undefined && page !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>size, 'size');
if (publicationYear) {
publicationYear.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'publication_year');
})
}
if (size !== undefined && size !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>size, 'size');
if (type) {
type.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'type');
})
}
if (publicationYear !== undefined && publicationYear !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>publicationYear, 'publication_year');
}
if (type !== undefined && type !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>type, 'type');
}
if (language !== undefined && language !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>language, 'language');
if (language) {
language.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'language');
})
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (bearer) required
localVarCredential = this.configuration.lookupCredential('bearer');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
@@ -184,15 +170,16 @@ export class WorksService {
}
let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
return this.httpClient.request<WorkPage>('get', `${this.configuration.basePath}${localVarPath}`,
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<WorkPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+35 -17
View File
@@ -1,4 +1,4 @@
import { HttpParameterCodec } from '@angular/common/http';
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
export interface ConfigurationParameters {
@@ -66,26 +66,30 @@ export class Configuration {
*/
credentials: {[ key: string ]: string | (() => string | undefined)};
constructor(configurationParameters: ConfigurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;
this.username = configurationParameters.username;
this.password = configurationParameters.password;
this.accessToken = configurationParameters.accessToken;
this.basePath = configurationParameters.basePath;
this.withCredentials = configurationParameters.withCredentials;
this.encoder = configurationParameters.encoder;
if (configurationParameters.encodeParam) {
this.encodeParam = configurationParameters.encodeParam;
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
if (apiKeys) {
this.apiKeys = apiKeys;
}
else {
this.encodeParam = param => this.defaultEncodeParam(param);
if (username !== undefined) {
this.username = username;
}
if (configurationParameters.credentials) {
this.credentials = configurationParameters.credentials;
if (password !== undefined) {
this.password = password;
}
else {
this.credentials = {};
if (accessToken !== undefined) {
this.accessToken = accessToken;
}
if (basePath !== undefined) {
this.basePath = basePath;
}
if (withCredentials !== undefined) {
this.withCredentials = withCredentials;
}
if (encoder) {
this.encoder = encoder;
}
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
this.credentials = credentials ?? {};
// init default bearer credential
if (!this.credentials['bearer']) {
@@ -157,6 +161,20 @@ export class Configuration {
: value;
}
public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders {
const value = this.lookupCredential(credentialKey);
return value
? headers.set(headerName, (prefix ?? '') + value)
: headers;
}
public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams {
const value = this.lookupCredential(credentialKey);
return value
? query.set(paramName, value)
: query;
}
private defaultEncodeParam(param: Param): string {
// This implementation exists as fallback for missing configuration
// and for backwards compatibility to older typescript-angular generator versions.
+1
View File
@@ -3,4 +3,5 @@ export * from './model/models';
export * from './variables';
export * from './configuration';
export * from './api.module';
export * from './provide-api';
export * from './param';
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* The abstract as an inverted index (word positions). OpenAlex doesn\'t include plaintext abstracts due to legal constraints. Use the `has_abstract` filter to get works with or without abstracts.
*/
export interface AbstractInvertedIndex {
}
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Whether any repository has the full text
*/
export interface AnyRepositoryHasFulltext {
}
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Position in author list
*/
export interface AuthorPosition {
}
+9 -16
View File
@@ -1,33 +1,26 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { IsCorresponding } from './isCorresponding';
import { Countries } from './countries';
import { RawAuthorName } from './rawAuthorName';
import { AuthorshipAuthor } from './authorshipAuthor';
import { AuthorPosition } from './authorPosition';
import { Institutions } from './institutions';
import { RawAffiliationStrings } from './rawAffiliationStrings';
import { DehydratedInstitution } from './dehydratedInstitution';
import { DehydratedAuthor } from './dehydratedAuthor';
/**
* Author and their affiliation for a work
*/
export interface Authorship {
author_position?: AuthorPosition;
author?: AuthorshipAuthor;
institutions?: Institutions;
countries?: Countries;
is_corresponding?: IsCorresponding;
raw_author_name?: RawAuthorName;
raw_affiliation_strings?: RawAffiliationStrings;
author_position?: string | null;
author?: DehydratedAuthor | null;
institutions?: Array<DehydratedInstitution> | null;
countries?: Array<string> | null;
is_corresponding?: boolean | null;
raw_author_name?: string | null;
raw_affiliation_strings?: Array<string> | null;
}
@@ -1,26 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Orcid } from './orcid';
import { DisplayName } from './displayName';
import { Id } from './id';
import { DehydratedAuthor } from './dehydratedAuthor';
/**
* [Dehydrated author](/api-reference/authors#the-dehydratedauthor-object)
*/
export interface AuthorshipAuthor {
id?: Id;
display_name?: DisplayName;
orcid?: Orcid;
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* List of Authorship objects representing authors and their institutions. Limited to the first 100 authors. Each authorship includes `author`, `institutions`, `author_position`, `is_corresponding`, and other fields.
*/
export interface Authorships {
}
+6 -14
View File
@@ -1,31 +1,23 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { FunderDisplayName } from './funderDisplayName';
import { FunderAwardId } from './funderAwardId';
import { DisplayName } from './displayName';
import { Id } from './id';
import { FunderId } from './funderId';
import { Doi } from './doi';
/**
* Award
*/
export interface Award {
id?: Id;
display_name?: DisplayName;
funder_award_id?: FunderAwardId;
funder_id?: FunderId;
funder_display_name?: FunderDisplayName;
doi?: Doi;
id?: string | null;
display_name?: string | null;
funder_award_id?: string | null;
funder_id?: string | null;
funder_display_name?: string | null;
doi?: string | null;
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Dehydrated Award objects representing grants associated with this work.
*/
export interface Awards {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* The number of citations to this work.
*/
export interface CitedByCount {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface CitedByCount1 {
}
@@ -1,16 +1,14 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { FilterInformation } from './filterInformation';
import { CollaborationNetworkEdge } from './collaborationNetworkEdge';
import { CollaborationWork } from './collaborationWork';
import { CollaborationNetworkNode } from './collaborationNetworkNode';
@@ -28,8 +26,8 @@ export interface CollaborationNetwork {
*/
edges: Array<CollaborationNetworkEdge>;
/**
* The works that represent the collaborations in the collaboration network.
* The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.
*/
works: Array<CollaborationWork>;
filter_information: FilterInformation;
}
@@ -1,8 +1,6 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,16 +11,12 @@
export interface CollaborationNetworkEdge {
/**
* The raw person ID of the source person.
* The raw ID of the source node.
*/
raw_source_person_id: string;
raw_source_id: string;
/**
* The raw person ID of the target person.
* The raw ID of the target node.
*/
raw_target_person_id: string;
/**
* The list of work IDs that represent the collaborations between the two persons.
*/
raw_work_ids: Array<string>;
raw_target_id: string;
}
@@ -1,24 +1,30 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType';
export interface CollaborationNetworkNode {
/**
* The raw person ID of the person.
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
*/
raw_person_id: string;
raw_id: string;
/**
* The display name of the person.
* The display name of the node.
*/
display_name: string;
/**
* The category of the node, either \'author\', \'institution\', or \'work\'.
*/
category: CollaborationNetworkNodeType;
}
export namespace CollaborationNetworkNode {
}
@@ -1,24 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface CollaborationWork {
/**
* The raw work ID of the work.
*/
raw_work_id: string;
/**
* The display title of the work.
*/
display_title: string;
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* URL for downloading full-text content. Only present when `has_content.pdf` or `has_content.grobid_xml` is true.
*/
export interface ContentUrl {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Country codes of affiliations
*/
export interface Countries {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* [Country](/api-reference/countries) code
*/
export interface CountryCode {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* `cited_by_count` for each of the last ten years.
*/
export interface CountsByYear {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* When this work was added to OpenAlex (ISO 8601 date).
*/
export interface CreatedDate {
}
+3 -8
View File
@@ -1,25 +1,20 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Orcid } from './orcid';
import { DisplayName } from './displayName';
import { Id } from './id';
/**
* [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts
*/
export interface DehydratedAuthor {
id?: Id;
display_name?: DisplayName;
orcid?: Orcid;
id?: string | null;
display_name?: string | null;
orcid?: string | null;
}
+3 -8
View File
@@ -1,25 +1,20 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Ror } from './ror';
import { DisplayName } from './displayName';
import { Id } from './id';
/**
* [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts
*/
export interface DehydratedFunder {
id?: Id;
display_name?: DisplayName;
ror?: Ror;
id?: string | null;
display_name?: string | null;
ror?: string | null;
}
@@ -1,31 +1,23 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Ror } from './ror';
import { DisplayName } from './displayName';
import { Lineage } from './lineage';
import { Id } from './id';
import { CountryCode } from './countryCode';
import { Type1 } from './type1';
/**
* [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts
*/
export interface DehydratedInstitution {
id?: Id;
display_name?: DisplayName;
ror?: Ror;
country_code?: CountryCode;
type?: Type1;
lineage?: Lineage;
id?: string | null;
display_name?: string | null;
ror?: string | null;
country_code?: string | null;
type?: string | null;
lineage?: Array<string> | null;
}
+11 -24
View File
@@ -1,41 +1,28 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Type2 } from './type2';
import { HostOrganization } from './hostOrganization';
import { IsInDoaj } from './isInDoaj';
import { HostOrganizationName } from './hostOrganizationName';
import { HostOrganizationLineage } from './hostOrganizationLineage';
import { Issn } from './issn';
import { DisplayName } from './displayName';
import { Id } from './id';
import { IssnL } from './issnL';
import { IsOa } from './isOa';
import { IsCore } from './isCore';
/**
* [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts
*/
export interface DehydratedSource {
id?: Id;
display_name?: DisplayName;
issn_l?: IssnL;
issn?: Issn;
is_oa?: IsOa;
is_in_doaj?: IsInDoaj;
is_core?: IsCore;
host_organization?: HostOrganization;
host_organization_name?: HostOrganizationName;
host_organization_lineage?: HostOrganizationLineage;
type?: Type2;
id?: string | null;
display_name?: string | null;
issn_l?: string | null;
issn?: Array<string> | null;
is_oa?: boolean | null;
is_in_doaj?: boolean | null;
is_core?: boolean | null;
host_organization?: string | null;
host_organization_name?: string | null;
host_organization_lineage?: Array<string> | null;
type?: string | null;
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface DescriptorName {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface DescriptorUi {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface DisplayName {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Same as `title`. Included for consistency with other entities.
*/
export interface DisplayName1 {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Doi {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* The DOI for the work. This is the Canonical External ID for works.
*/
export interface Doi1 {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface FirstPage {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface FunderAwardId {
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface FunderDisplayName {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface FunderId {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Dehydrated Funder objects representing the funders of this work.
*/
export interface Funders {
}
-2
View File
@@ -1,8 +1,6 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface GrobidXml {
}
@@ -1,8 +1,6 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface HostOrganization {
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface HostOrganizationLineage {
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface HostOrganizationName {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Id {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* The OpenAlex ID for this work.
*/
export interface Id1 {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Sources this work is indexed in. Values: `arxiv`, `crossref`, `doaj`, `pubmed`.
*/
export interface IndexedIn {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* [Dehydrated institutions](/api-reference/institutions#the-dehydratedinstitution-object)
*/
export interface Institutions {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsAccepted {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsCore {
}
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Whether this is the corresponding author
*/
export interface IsCorresponding {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsInDoaj {
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsInTop10Percent {
}
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsInTop1Percent {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsMajorTopic {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsOa {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Whether this location provides open access
*/
export interface IsOa1 {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Whether this work is open access
*/
export interface IsOa2 {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* True if this work is paratext (e.g., front cover, table of contents).
*/
export interface IsParatext {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IsPublished {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* True if this work has been retracted (from Retraction Watch database).
*/
export interface IsRetracted {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Issn {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface IssnL {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Issue {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Keywords identified based on the work\'s topics, with relevance scores.
*/
export interface Keywords {
}
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* URL to the landing page
*/
export interface LandingPageUrl {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Filter by language code. Can be repeated.
*/
export interface Language {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* [Language](/api-reference/languages) in ISO 639-1 format
*/
export interface Language1 {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface LastPage {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* The [license](/api-reference/licenses) (e.g., cc-by)
*/
export interface License {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface LicenseId {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Lineage {
}
+10 -20
View File
@@ -1,37 +1,27 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { LocationSource } from './locationSource';
import { LandingPageUrl } from './landingPageUrl';
import { Version } from './version';
import { IsPublished } from './isPublished';
import { License } from './license';
import { IsAccepted } from './isAccepted';
import { PdfUrl } from './pdfUrl';
import { LicenseId } from './licenseId';
import { IsOa1 } from './isOa1';
import { DehydratedSource } from './dehydratedSource';
/**
* Where a work is hosted
*/
export interface Location {
is_oa?: IsOa1;
landing_page_url?: LandingPageUrl;
pdf_url?: PdfUrl;
source?: LocationSource;
license?: License;
license_id?: LicenseId;
version?: Version;
is_accepted?: IsAccepted;
is_published?: IsPublished;
is_oa?: boolean | null;
landing_page_url?: string | null;
pdf_url?: string | null;
source?: DehydratedSource | null;
license?: string | null;
license_id?: string | null;
version?: string | null;
is_accepted?: boolean | null;
is_published?: boolean | null;
}
@@ -1,42 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Type2 } from './type2';
import { HostOrganization } from './hostOrganization';
import { IsInDoaj } from './isInDoaj';
import { HostOrganizationName } from './hostOrganizationName';
import { HostOrganizationLineage } from './hostOrganizationLineage';
import { Issn } from './issn';
import { DehydratedSource } from './dehydratedSource';
import { DisplayName } from './displayName';
import { Id } from './id';
import { IssnL } from './issnL';
import { IsOa } from './isOa';
import { IsCore } from './isCore';
/**
* [Dehydrated source](/api-reference/sources#the-dehydratedsource-object)
*/
export interface LocationSource {
id?: Id;
display_name?: DisplayName;
issn_l?: IssnL;
issn?: Issn;
is_oa?: IsOa;
is_in_doaj?: IsInDoaj;
is_core?: IsCore;
host_organization?: HostOrganization;
host_organization_name?: HostOrganizationName;
host_organization_lineage?: HostOrganizationLineage;
type?: Type2;
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* List of Location objects describing all unique places where this work lives.
*/
export interface Locations {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Mag {
}
-16
View File
@@ -1,16 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Max {
}
-19
View File
@@ -1,19 +0,0 @@
/**
* Innovation Search Engine API
* API for the Innovation Search Engine (INSE) application.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* MeSH tags for works found in PubMed.
*/
export interface Mesh {
}

Some files were not shown because too many files have changed in this diff Show More