diff --git a/.gitignore b/.gitignore index 11f1206b..a4500526 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ src/python/account/ node_modules/ angular-app/.angular + +webapp/src/app/api \ No newline at end of file diff --git a/jenkinsfile b/Jenkinsfile similarity index 100% rename from jenkinsfile rename to Jenkinsfile diff --git a/service/src/main/inse/collaboration_network/router.py b/service/src/main/inse/collaboration_network/router.py index f3179b6b..9dd124eb 100644 --- a/service/src/main/inse/collaboration_network/router.py +++ b/service/src/main/inse/collaboration_network/router.py @@ -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, ) diff --git a/service/src/main/inse/collaboration_network/schemas.py b/service/src/main/inse/collaboration_network/schemas.py index 96c6e08c..3428e42a 100644 --- a/service/src/main/inse/collaboration_network/schemas.py +++ b/service/src/main/inse/collaboration_network/schemas.py @@ -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.", ) diff --git a/service/src/main/inse/collaboration_network/service.py b/service/src/main/inse/collaboration_network/service.py index bbbc8820..da2f7435 100644 --- a/service/src/main/inse/collaboration_network/service.py +++ b/service/src/main/inse/collaboration_network/service.py @@ -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 diff --git a/service/src/main/inse/config.py b/service/src/main/inse/config.py index abba0c65..ad171904 100644 --- a/service/src/main/inse/config.py +++ b/service/src/main/inse/config.py @@ -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==" ) diff --git a/service/src/main/inse/integrations/__init__.py b/service/src/main/inse/integrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/service/src/main/inse/integrations/elasticsearch.py b/service/src/main/inse/integrations/elasticsearch.py new file mode 100644 index 00000000..e3ad986f --- /dev/null +++ b/service/src/main/inse/integrations/elasticsearch.py @@ -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() diff --git a/service/src/main/inse/integrations/llm.py b/service/src/main/inse/integrations/llm.py new file mode 100644 index 00000000..8ec7a76d --- /dev/null +++ b/service/src/main/inse/integrations/llm.py @@ -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", "") diff --git a/service/src/main/inse/logic.py b/service/src/main/inse/logic.py index b7aaad0f..03706004 100644 --- a/service/src/main/inse/logic.py +++ b/service/src/main/inse/logic.py @@ -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) diff --git a/service/src/main/inse/models.zip b/service/src/main/inse/models.zip new file mode 100644 index 00000000..1dc6b609 Binary files /dev/null and b/service/src/main/inse/models.zip differ diff --git a/service/src/main/inse/utils.py b/service/src/main/inse/utils.py index 0acf79b6..59123932 100644 --- a/service/src/main/inse/utils.py +++ b/service/src/main/inse/utils.py @@ -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") \ No newline at end of file diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index a1a9a880..87c2e9fa 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -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: diff --git a/service/src/main/inse/works/model.py b/service/src/main/inse/works/model.py index e10b7d33..db5baf59 100644 --- a/service/src/main/inse/works/model.py +++ b/service/src/main/inse/works/model.py @@ -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.") diff --git a/service/src/main/inse/works/search_client.py b/service/src/main/inse/works/search_client.py index f194b4ef..849299b7 100644 --- a/service/src/main/inse/works/search_client.py +++ b/service/src/main/inse/works/search_client.py @@ -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() diff --git a/service/src/main/inse/works/service.py b/service/src/main/inse/works/service.py index 9471fdcf..8377664c 100644 --- a/service/src/main/inse/works/service.py +++ b/service/src/main/inse/works/service.py @@ -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) diff --git a/service/src/main/inse/works/test_openalex_logic.py b/service/src/main/inse/works/test_openalex_logic.py index 646be283..70c6ae6e 100644 --- a/service/src/main/inse/works/test_openalex_logic.py +++ b/service/src/main/inse/works/test_openalex_logic.py @@ -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")) diff --git a/service/src/main/inse/works/test_service.py b/service/src/main/inse/works/test_service.py index a2474868..458c337c 100644 --- a/service/src/main/inse/works/test_service.py +++ b/service/src/main/inse/works/test_service.py @@ -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" diff --git a/webapp/build.gradle b/webapp/build.gradle index 15fc5477..d6f8a0a4 100644 --- a/webapp/build.gradle +++ b/webapp/build.gradle @@ -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" } diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 2192cf18..0482a8d5 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -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 diff --git a/webapp/src/app/api/.openapi-generator/VERSION b/webapp/src/app/api/.openapi-generator/VERSION index ba7f754d..6328c542 100644 --- a/webapp/src/app/api/.openapi-generator/VERSION +++ b/webapp/src/app/api/.openapi-generator/VERSION @@ -1 +1 @@ -7.4.0 +7.17.0 diff --git a/webapp/src/app/api/README.md b/webapp/src/app/api/README.md index de16f95a..dfa7b6e7 100644 --- a/webapp/src/app/api/README.md +++ b/webapp/src/app/api/README.md @@ -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 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), diff --git a/webapp/src/app/api/api/personNetwork.service.ts b/webapp/src/app/api/api/personNetwork.service.ts index 7efc8b4c..fdf87059 100644 --- a/webapp/src/app/api/api/personNetwork.service.ts +++ b/webapp/src/app/api/api/personNetwork.service.ts @@ -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\'s collaboration network. * Returns a person\'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; - public getCollaborationNetwork(rawUserId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCollaborationNetwork(rawUserId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCollaborationNetwork(rawUserId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { 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('get', `${this.configuration.basePath}${localVarPath}`, + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, + body: filterProperties, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), reportProgress: reportProgress } ); diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index f75b14e0..395a79a4 100644 --- a/webapp/src/app/api/api/works.service.ts +++ b/webapp/src/app/api/api/works.service.ts @@ -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; + public getAllAuthorWorks(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: 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; - 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>; - 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>; - 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 { + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { 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, - page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (publicationYear) { + publicationYear.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_year'); + }) } - if (size !== undefined && size !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); + if (type) { + type.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'type'); + }) } - if (publicationYear !== undefined && publicationYear !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - publicationYear, 'publication_year'); - } - if (type !== undefined && type !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - type, 'type'); - } - if (language !== undefined && language !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - language, 'language'); + if (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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('get', `${this.configuration.basePath}${localVarPath}`, + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + ...(withCredentials ? { withCredentials } : {}), headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), reportProgress: reportProgress } ); diff --git a/webapp/src/app/api/configuration.ts b/webapp/src/app/api/configuration.ts index 036ff8de..c39ce2d6 100644 --- a/webapp/src/app/api/configuration.ts +++ b/webapp/src/app/api/configuration.ts @@ -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. diff --git a/webapp/src/app/api/index.ts b/webapp/src/app/api/index.ts index 104dd3d2..02cb7d43 100644 --- a/webapp/src/app/api/index.ts +++ b/webapp/src/app/api/index.ts @@ -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'; diff --git a/webapp/src/app/api/model/abstractInvertedIndex.ts b/webapp/src/app/api/model/abstractInvertedIndex.ts deleted file mode 100644 index e6e3268a..00000000 --- a/webapp/src/app/api/model/abstractInvertedIndex.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/anyRepositoryHasFulltext.ts b/webapp/src/app/api/model/anyRepositoryHasFulltext.ts deleted file mode 100644 index c5f37dde..00000000 --- a/webapp/src/app/api/model/anyRepositoryHasFulltext.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/authorPosition.ts b/webapp/src/app/api/model/authorPosition.ts deleted file mode 100644 index 52938864..00000000 --- a/webapp/src/app/api/model/authorPosition.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/authorship.ts b/webapp/src/app/api/model/authorship.ts index 867cbb5d..db3a0bf0 100644 --- a/webapp/src/app/api/model/authorship.ts +++ b/webapp/src/app/api/model/authorship.ts @@ -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 | null; + countries?: Array | null; + is_corresponding?: boolean | null; + raw_author_name?: string | null; + raw_affiliation_strings?: Array | null; } diff --git a/webapp/src/app/api/model/authorshipAuthor.ts b/webapp/src/app/api/model/authorshipAuthor.ts deleted file mode 100644 index 79f84f52..00000000 --- a/webapp/src/app/api/model/authorshipAuthor.ts +++ /dev/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; -} - diff --git a/webapp/src/app/api/model/authorships.ts b/webapp/src/app/api/model/authorships.ts deleted file mode 100644 index 78acf93c..00000000 --- a/webapp/src/app/api/model/authorships.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/award.ts b/webapp/src/app/api/model/award.ts index 3fd4903b..4e3b5cc9 100644 --- a/webapp/src/app/api/model/award.ts +++ b/webapp/src/app/api/model/award.ts @@ -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; } diff --git a/webapp/src/app/api/model/awards.ts b/webapp/src/app/api/model/awards.ts deleted file mode 100644 index b9a9441e..00000000 --- a/webapp/src/app/api/model/awards.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/citedByCount.ts b/webapp/src/app/api/model/citedByCount.ts deleted file mode 100644 index 834df7a1..00000000 --- a/webapp/src/app/api/model/citedByCount.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/citedByCount1.ts b/webapp/src/app/api/model/citedByCount1.ts deleted file mode 100644 index e8f6feca..00000000 --- a/webapp/src/app/api/model/citedByCount1.ts +++ /dev/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 CitedByCount1 { -} - diff --git a/webapp/src/app/api/model/collaborationNetwork.ts b/webapp/src/app/api/model/collaborationNetwork.ts index 26ebad96..672858af 100644 --- a/webapp/src/app/api/model/collaborationNetwork.ts +++ b/webapp/src/app/api/model/collaborationNetwork.ts @@ -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; /** - * 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; + filter_information: FilterInformation; } diff --git a/webapp/src/app/api/model/collaborationNetworkEdge.ts b/webapp/src/app/api/model/collaborationNetworkEdge.ts index ccc992d8..16fb5fc6 100644 --- a/webapp/src/app/api/model/collaborationNetworkEdge.ts +++ b/webapp/src/app/api/model/collaborationNetworkEdge.ts @@ -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; + raw_target_id: string; } diff --git a/webapp/src/app/api/model/collaborationNetworkNode.ts b/webapp/src/app/api/model/collaborationNetworkNode.ts index 36155ee4..d37a6831 100644 --- a/webapp/src/app/api/model/collaborationNetworkNode.ts +++ b/webapp/src/app/api/model/collaborationNetworkNode.ts @@ -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 { } + diff --git a/webapp/src/app/api/model/collaborationWork.ts b/webapp/src/app/api/model/collaborationWork.ts deleted file mode 100644 index d6d51a5f..00000000 --- a/webapp/src/app/api/model/collaborationWork.ts +++ /dev/null @@ -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; -} - diff --git a/webapp/src/app/api/model/contentUrl.ts b/webapp/src/app/api/model/contentUrl.ts deleted file mode 100644 index 972e8cdf..00000000 --- a/webapp/src/app/api/model/contentUrl.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/countries.ts b/webapp/src/app/api/model/countries.ts deleted file mode 100644 index 27311b72..00000000 --- a/webapp/src/app/api/model/countries.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/countryCode.ts b/webapp/src/app/api/model/countryCode.ts deleted file mode 100644 index b3dcb632..00000000 --- a/webapp/src/app/api/model/countryCode.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/countsByYear.ts b/webapp/src/app/api/model/countsByYear.ts deleted file mode 100644 index e90ee06e..00000000 --- a/webapp/src/app/api/model/countsByYear.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/createdDate.ts b/webapp/src/app/api/model/createdDate.ts deleted file mode 100644 index 2cac33c2..00000000 --- a/webapp/src/app/api/model/createdDate.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/dehydratedAuthor.ts b/webapp/src/app/api/model/dehydratedAuthor.ts index f68bd161..4d3817f1 100644 --- a/webapp/src/app/api/model/dehydratedAuthor.ts +++ b/webapp/src/app/api/model/dehydratedAuthor.ts @@ -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; } diff --git a/webapp/src/app/api/model/dehydratedFunder.ts b/webapp/src/app/api/model/dehydratedFunder.ts index 345609f5..b134bbb1 100644 --- a/webapp/src/app/api/model/dehydratedFunder.ts +++ b/webapp/src/app/api/model/dehydratedFunder.ts @@ -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; } diff --git a/webapp/src/app/api/model/dehydratedInstitution.ts b/webapp/src/app/api/model/dehydratedInstitution.ts index 5b02b57c..7b6c9824 100644 --- a/webapp/src/app/api/model/dehydratedInstitution.ts +++ b/webapp/src/app/api/model/dehydratedInstitution.ts @@ -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 | null; } diff --git a/webapp/src/app/api/model/dehydratedSource.ts b/webapp/src/app/api/model/dehydratedSource.ts index 543c23ff..ae714846 100644 --- a/webapp/src/app/api/model/dehydratedSource.ts +++ b/webapp/src/app/api/model/dehydratedSource.ts @@ -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 | 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 | null; + type?: string | null; } diff --git a/webapp/src/app/api/model/descriptorName.ts b/webapp/src/app/api/model/descriptorName.ts deleted file mode 100644 index 02f65421..00000000 --- a/webapp/src/app/api/model/descriptorName.ts +++ /dev/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 { -} - diff --git a/webapp/src/app/api/model/descriptorUi.ts b/webapp/src/app/api/model/descriptorUi.ts deleted file mode 100644 index 26a2aeda..00000000 --- a/webapp/src/app/api/model/descriptorUi.ts +++ /dev/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 DescriptorUi { -} - diff --git a/webapp/src/app/api/model/displayName.ts b/webapp/src/app/api/model/displayName.ts deleted file mode 100644 index 22359aae..00000000 --- a/webapp/src/app/api/model/displayName.ts +++ /dev/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 DisplayName { -} - diff --git a/webapp/src/app/api/model/displayName1.ts b/webapp/src/app/api/model/displayName1.ts deleted file mode 100644 index 15fec290..00000000 --- a/webapp/src/app/api/model/displayName1.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/doi.ts b/webapp/src/app/api/model/doi.ts deleted file mode 100644 index bc585f48..00000000 --- a/webapp/src/app/api/model/doi.ts +++ /dev/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 Doi { -} - diff --git a/webapp/src/app/api/model/doi1.ts b/webapp/src/app/api/model/doi1.ts deleted file mode 100644 index 80544605..00000000 --- a/webapp/src/app/api/model/doi1.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/firstPage.ts b/webapp/src/app/api/model/firstPage.ts deleted file mode 100644 index cad2ffe8..00000000 --- a/webapp/src/app/api/model/firstPage.ts +++ /dev/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 FirstPage { -} - diff --git a/webapp/src/app/api/model/funderAwardId.ts b/webapp/src/app/api/model/funderAwardId.ts deleted file mode 100644 index 8728c8e8..00000000 --- a/webapp/src/app/api/model/funderAwardId.ts +++ /dev/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 FunderAwardId { -} - diff --git a/webapp/src/app/api/model/funderDisplayName.ts b/webapp/src/app/api/model/funderDisplayName.ts deleted file mode 100644 index 8e585ee2..00000000 --- a/webapp/src/app/api/model/funderDisplayName.ts +++ /dev/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 FunderDisplayName { -} - diff --git a/webapp/src/app/api/model/funderId.ts b/webapp/src/app/api/model/funderId.ts deleted file mode 100644 index f00155e7..00000000 --- a/webapp/src/app/api/model/funderId.ts +++ /dev/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 FunderId { -} - diff --git a/webapp/src/app/api/model/funders.ts b/webapp/src/app/api/model/funders.ts deleted file mode 100644 index 7a4aed90..00000000 --- a/webapp/src/app/api/model/funders.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/fwci.ts b/webapp/src/app/api/model/fwci.ts index f9758be6..0c0cf8de 100644 --- a/webapp/src/app/api/model/fwci.ts +++ b/webapp/src/app/api/model/fwci.ts @@ -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). diff --git a/webapp/src/app/api/model/grobidXml.ts b/webapp/src/app/api/model/grobidXml.ts deleted file mode 100644 index 26db045b..00000000 --- a/webapp/src/app/api/model/grobidXml.ts +++ /dev/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 GrobidXml { -} - diff --git a/webapp/src/app/api/model/hTTPValidationError.ts b/webapp/src/app/api/model/hTTPValidationError.ts index 76069463..f624be37 100644 --- a/webapp/src/app/api/model/hTTPValidationError.ts +++ b/webapp/src/app/api/model/hTTPValidationError.ts @@ -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). diff --git a/webapp/src/app/api/model/hostOrganization.ts b/webapp/src/app/api/model/hostOrganization.ts deleted file mode 100644 index 4bc7c68a..00000000 --- a/webapp/src/app/api/model/hostOrganization.ts +++ /dev/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 HostOrganization { -} - diff --git a/webapp/src/app/api/model/hostOrganizationLineage.ts b/webapp/src/app/api/model/hostOrganizationLineage.ts deleted file mode 100644 index 94d2c381..00000000 --- a/webapp/src/app/api/model/hostOrganizationLineage.ts +++ /dev/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 HostOrganizationLineage { -} - diff --git a/webapp/src/app/api/model/hostOrganizationName.ts b/webapp/src/app/api/model/hostOrganizationName.ts deleted file mode 100644 index 8b116bd2..00000000 --- a/webapp/src/app/api/model/hostOrganizationName.ts +++ /dev/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 HostOrganizationName { -} - diff --git a/webapp/src/app/api/model/id.ts b/webapp/src/app/api/model/id.ts deleted file mode 100644 index 143d492c..00000000 --- a/webapp/src/app/api/model/id.ts +++ /dev/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 Id { -} - diff --git a/webapp/src/app/api/model/id1.ts b/webapp/src/app/api/model/id1.ts deleted file mode 100644 index 2bdf1611..00000000 --- a/webapp/src/app/api/model/id1.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/indexedIn.ts b/webapp/src/app/api/model/indexedIn.ts deleted file mode 100644 index 2937fece..00000000 --- a/webapp/src/app/api/model/indexedIn.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/institutions.ts b/webapp/src/app/api/model/institutions.ts deleted file mode 100644 index d8cabeec..00000000 --- a/webapp/src/app/api/model/institutions.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/isAccepted.ts b/webapp/src/app/api/model/isAccepted.ts deleted file mode 100644 index 5c8f1f19..00000000 --- a/webapp/src/app/api/model/isAccepted.ts +++ /dev/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 IsAccepted { -} - diff --git a/webapp/src/app/api/model/isCore.ts b/webapp/src/app/api/model/isCore.ts deleted file mode 100644 index cc10c29b..00000000 --- a/webapp/src/app/api/model/isCore.ts +++ /dev/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 IsCore { -} - diff --git a/webapp/src/app/api/model/isCorresponding.ts b/webapp/src/app/api/model/isCorresponding.ts deleted file mode 100644 index 3fc25476..00000000 --- a/webapp/src/app/api/model/isCorresponding.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/isInDoaj.ts b/webapp/src/app/api/model/isInDoaj.ts deleted file mode 100644 index d6ff0380..00000000 --- a/webapp/src/app/api/model/isInDoaj.ts +++ /dev/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 IsInDoaj { -} - diff --git a/webapp/src/app/api/model/isInTop10Percent.ts b/webapp/src/app/api/model/isInTop10Percent.ts deleted file mode 100644 index 3c157b75..00000000 --- a/webapp/src/app/api/model/isInTop10Percent.ts +++ /dev/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 IsInTop10Percent { -} - diff --git a/webapp/src/app/api/model/isInTop1Percent.ts b/webapp/src/app/api/model/isInTop1Percent.ts deleted file mode 100644 index 8821ecf5..00000000 --- a/webapp/src/app/api/model/isInTop1Percent.ts +++ /dev/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 IsInTop1Percent { -} - diff --git a/webapp/src/app/api/model/isMajorTopic.ts b/webapp/src/app/api/model/isMajorTopic.ts deleted file mode 100644 index b12118a8..00000000 --- a/webapp/src/app/api/model/isMajorTopic.ts +++ /dev/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 IsMajorTopic { -} - diff --git a/webapp/src/app/api/model/isOa.ts b/webapp/src/app/api/model/isOa.ts deleted file mode 100644 index a055c674..00000000 --- a/webapp/src/app/api/model/isOa.ts +++ /dev/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 IsOa { -} - diff --git a/webapp/src/app/api/model/isOa1.ts b/webapp/src/app/api/model/isOa1.ts deleted file mode 100644 index 2c713fe1..00000000 --- a/webapp/src/app/api/model/isOa1.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/isOa2.ts b/webapp/src/app/api/model/isOa2.ts deleted file mode 100644 index 73d6a25b..00000000 --- a/webapp/src/app/api/model/isOa2.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/isParatext.ts b/webapp/src/app/api/model/isParatext.ts deleted file mode 100644 index b2b15e9c..00000000 --- a/webapp/src/app/api/model/isParatext.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/isPublished.ts b/webapp/src/app/api/model/isPublished.ts deleted file mode 100644 index 0fc06ec7..00000000 --- a/webapp/src/app/api/model/isPublished.ts +++ /dev/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 IsPublished { -} - diff --git a/webapp/src/app/api/model/isRetracted.ts b/webapp/src/app/api/model/isRetracted.ts deleted file mode 100644 index bcd6c227..00000000 --- a/webapp/src/app/api/model/isRetracted.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/issn.ts b/webapp/src/app/api/model/issn.ts deleted file mode 100644 index d7361a2b..00000000 --- a/webapp/src/app/api/model/issn.ts +++ /dev/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 Issn { -} - diff --git a/webapp/src/app/api/model/issnL.ts b/webapp/src/app/api/model/issnL.ts deleted file mode 100644 index d7908d70..00000000 --- a/webapp/src/app/api/model/issnL.ts +++ /dev/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 IssnL { -} - diff --git a/webapp/src/app/api/model/issue.ts b/webapp/src/app/api/model/issue.ts deleted file mode 100644 index 0df4b594..00000000 --- a/webapp/src/app/api/model/issue.ts +++ /dev/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 Issue { -} - diff --git a/webapp/src/app/api/model/keywords.ts b/webapp/src/app/api/model/keywords.ts deleted file mode 100644 index e36d1d49..00000000 --- a/webapp/src/app/api/model/keywords.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/landingPageUrl.ts b/webapp/src/app/api/model/landingPageUrl.ts deleted file mode 100644 index 6f623984..00000000 --- a/webapp/src/app/api/model/landingPageUrl.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/language.ts b/webapp/src/app/api/model/language.ts deleted file mode 100644 index 4ec3ee2b..00000000 --- a/webapp/src/app/api/model/language.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/language1.ts b/webapp/src/app/api/model/language1.ts deleted file mode 100644 index d737f7bf..00000000 --- a/webapp/src/app/api/model/language1.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/lastPage.ts b/webapp/src/app/api/model/lastPage.ts deleted file mode 100644 index 543605ed..00000000 --- a/webapp/src/app/api/model/lastPage.ts +++ /dev/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 LastPage { -} - diff --git a/webapp/src/app/api/model/license.ts b/webapp/src/app/api/model/license.ts deleted file mode 100644 index f8639bee..00000000 --- a/webapp/src/app/api/model/license.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/licenseId.ts b/webapp/src/app/api/model/licenseId.ts deleted file mode 100644 index b1e59193..00000000 --- a/webapp/src/app/api/model/licenseId.ts +++ /dev/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 LicenseId { -} - diff --git a/webapp/src/app/api/model/lineage.ts b/webapp/src/app/api/model/lineage.ts deleted file mode 100644 index cdaee3d2..00000000 --- a/webapp/src/app/api/model/lineage.ts +++ /dev/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 Lineage { -} - diff --git a/webapp/src/app/api/model/location.ts b/webapp/src/app/api/model/location.ts index acf24a96..f207d751 100644 --- a/webapp/src/app/api/model/location.ts +++ b/webapp/src/app/api/model/location.ts @@ -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; } diff --git a/webapp/src/app/api/model/locationSource.ts b/webapp/src/app/api/model/locationSource.ts deleted file mode 100644 index 31687b7d..00000000 --- a/webapp/src/app/api/model/locationSource.ts +++ /dev/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; -} - diff --git a/webapp/src/app/api/model/locations.ts b/webapp/src/app/api/model/locations.ts deleted file mode 100644 index 35f92d01..00000000 --- a/webapp/src/app/api/model/locations.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/mag.ts b/webapp/src/app/api/model/mag.ts deleted file mode 100644 index 4ca84fb6..00000000 --- a/webapp/src/app/api/model/mag.ts +++ /dev/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 Mag { -} - diff --git a/webapp/src/app/api/model/max.ts b/webapp/src/app/api/model/max.ts deleted file mode 100644 index 3b9623f1..00000000 --- a/webapp/src/app/api/model/max.ts +++ /dev/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 Max { -} - diff --git a/webapp/src/app/api/model/mesh.ts b/webapp/src/app/api/model/mesh.ts deleted file mode 100644 index 6e24d5f9..00000000 --- a/webapp/src/app/api/model/mesh.ts +++ /dev/null @@ -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 { -} - diff --git a/webapp/src/app/api/model/min.ts b/webapp/src/app/api/model/min.ts deleted file mode 100644 index 87cf3368..00000000 --- a/webapp/src/app/api/model/min.ts +++ /dev/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 Min { -} - diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index fd285de5..aaffaea7 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -1,114 +1,25 @@ -export * from './abstractInvertedIndex'; -export * from './anyRepositoryHasFulltext'; -export * from './authorPosition'; export * from './authorship'; -export * from './authorshipAuthor'; -export * from './authorships'; export * from './award'; -export * from './awards'; -export * from './citedByCount'; -export * from './citedByCount1'; export * from './collaborationNetwork'; export * from './collaborationNetworkEdge'; export * from './collaborationNetworkNode'; -export * from './collaborationWork'; -export * from './contentUrl'; -export * from './countries'; -export * from './countryCode'; -export * from './countsByYear'; -export * from './createdDate'; +export * from './collaborationNetworkNodeType'; export * from './dehydratedAuthor'; export * from './dehydratedFunder'; export * from './dehydratedInstitution'; export * from './dehydratedSource'; -export * from './descriptorName'; -export * from './descriptorUi'; -export * from './displayName'; -export * from './displayName1'; -export * from './doi'; -export * from './doi1'; -export * from './firstPage'; -export * from './funderAwardId'; -export * from './funderDisplayName'; -export * from './funderId'; -export * from './funders'; +export * from './filterInformation'; +export * from './filterProperties'; export * from './fwci'; -export * from './grobidXml'; export * from './hTTPValidationError'; -export * from './hostOrganization'; -export * from './hostOrganizationLineage'; -export * from './hostOrganizationName'; -export * from './id'; -export * from './id1'; -export * from './indexedIn'; -export * from './institutions'; -export * from './isAccepted'; -export * from './isCore'; -export * from './isCorresponding'; -export * from './isInDoaj'; -export * from './isInTop10Percent'; -export * from './isInTop1Percent'; -export * from './isMajorTopic'; -export * from './isOa'; -export * from './isOa1'; -export * from './isOa2'; -export * from './isParatext'; -export * from './isPublished'; -export * from './isRetracted'; -export * from './issn'; -export * from './issnL'; -export * from './issue'; -export * from './keywords'; -export * from './landingPageUrl'; -export * from './language'; -export * from './language1'; -export * from './lastPage'; -export * from './license'; -export * from './licenseId'; -export * from './lineage'; +export * from './institutionInformation'; export * from './location'; -export * from './locationSource'; -export * from './locations'; -export * from './mag'; -export * from './max'; -export * from './mesh'; -export * from './min'; -export * from './oaStatus'; -export * from './oaUrl'; export * from './openAccess'; -export * from './openalex'; -export * from './orcid'; -export * from './pdf'; -export * from './pdfUrl'; -export * from './pmcid'; -export * from './pmid'; -export * from './publicationDate'; -export * from './publicationYear'; -export * from './publicationYear1'; -export * from './qualifierName'; -export * from './qualifierUi'; -export * from './rawAffiliationStrings'; -export * from './rawAuthorName'; -export * from './referencedWorks'; -export * from './referencedWorksCount'; -export * from './relatedWorks'; -export * from './ror'; export * from './score'; -export * from './sustainableDevelopmentGoals'; -export * from './title'; -export * from './topics'; -export * from './type'; -export * from './type1'; -export * from './type2'; -export * from './type3'; -export * from './updatedDate'; export * from './validationError'; export * from './validationErrorLocInner'; export * from './value'; -export * from './version'; -export * from './volume'; export * from './work'; -export * from './workBestOaLocation'; export * from './workBiblio'; export * from './workCitationNormalizedPercentile'; export * from './workCitedByPercentileYear'; @@ -116,14 +27,12 @@ export * from './workCountsByYearInner'; export * from './workHasContent'; export * from './workIds'; export * from './workKeyword'; +export * from './workList'; export * from './workMeshInner'; -export * from './workOpenAccess'; export * from './workPage'; -export * from './workPrimaryLocation'; -export * from './workPrimaryTopic'; +export * from './workSummary'; export * from './workSustainableDevelopmentGoalsInner'; export * from './workTopic'; export * from './workTopicDomain'; export * from './workTopicField'; export * from './workTopicSubfield'; -export * from './year'; diff --git a/webapp/src/app/api/model/oaStatus.ts b/webapp/src/app/api/model/oaStatus.ts deleted file mode 100644 index e25f2b3f..00000000 --- a/webapp/src/app/api/model/oaStatus.ts +++ /dev/null @@ -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. - */ - - -/** - * Open access status - */ -export interface OaStatus { -} - diff --git a/webapp/src/app/api/model/oaUrl.ts b/webapp/src/app/api/model/oaUrl.ts deleted file mode 100644 index 2a137d9f..00000000 --- a/webapp/src/app/api/model/oaUrl.ts +++ /dev/null @@ -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. - */ - - -/** - * Best open access URL - */ -export interface OaUrl { -} - diff --git a/webapp/src/app/api/model/openAccess.ts b/webapp/src/app/api/model/openAccess.ts index 7780553a..32a4ddd9 100644 --- a/webapp/src/app/api/model/openAccess.ts +++ b/webapp/src/app/api/model/openAccess.ts @@ -1,27 +1,21 @@ /** * 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 { OaStatus } from './oaStatus'; -import { AnyRepositoryHasFulltext } from './anyRepositoryHasFulltext'; -import { OaUrl } from './oaUrl'; -import { IsOa2 } from './isOa2'; /** * Open access information */ export interface OpenAccess { - is_oa?: IsOa2; - oa_status?: OaStatus; - oa_url?: OaUrl; - any_repository_has_fulltext?: AnyRepositoryHasFulltext; + is_oa?: boolean | null; + oa_status?: string | null; + oa_url?: string | null; + any_repository_has_fulltext?: boolean | null; } diff --git a/webapp/src/app/api/model/openalex.ts b/webapp/src/app/api/model/openalex.ts deleted file mode 100644 index f90fffce..00000000 --- a/webapp/src/app/api/model/openalex.ts +++ /dev/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 Openalex { -} - diff --git a/webapp/src/app/api/model/orcid.ts b/webapp/src/app/api/model/orcid.ts deleted file mode 100644 index 9bc9cde8..00000000 --- a/webapp/src/app/api/model/orcid.ts +++ /dev/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 Orcid { -} - diff --git a/webapp/src/app/api/model/pdf.ts b/webapp/src/app/api/model/pdf.ts deleted file mode 100644 index b4917e2e..00000000 --- a/webapp/src/app/api/model/pdf.ts +++ /dev/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 Pdf { -} - diff --git a/webapp/src/app/api/model/pdfUrl.ts b/webapp/src/app/api/model/pdfUrl.ts deleted file mode 100644 index abbf6de0..00000000 --- a/webapp/src/app/api/model/pdfUrl.ts +++ /dev/null @@ -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. - */ - - -/** - * Direct URL to PDF - */ -export interface PdfUrl { -} - diff --git a/webapp/src/app/api/model/pmcid.ts b/webapp/src/app/api/model/pmcid.ts deleted file mode 100644 index 3a1ffc36..00000000 --- a/webapp/src/app/api/model/pmcid.ts +++ /dev/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 Pmcid { -} - diff --git a/webapp/src/app/api/model/pmid.ts b/webapp/src/app/api/model/pmid.ts deleted file mode 100644 index dc0e0e78..00000000 --- a/webapp/src/app/api/model/pmid.ts +++ /dev/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 Pmid { -} - diff --git a/webapp/src/app/api/model/publicationDate.ts b/webapp/src/app/api/model/publicationDate.ts deleted file mode 100644 index fd403f97..00000000 --- a/webapp/src/app/api/model/publicationDate.ts +++ /dev/null @@ -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 day when this work was published (ISO 8601 format). - */ -export interface PublicationDate { -} - diff --git a/webapp/src/app/api/model/publicationYear.ts b/webapp/src/app/api/model/publicationYear.ts deleted file mode 100644 index 431a0824..00000000 --- a/webapp/src/app/api/model/publicationYear.ts +++ /dev/null @@ -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 publication year. Can be repeated. - */ -export interface PublicationYear { -} - diff --git a/webapp/src/app/api/model/publicationYear1.ts b/webapp/src/app/api/model/publicationYear1.ts deleted file mode 100644 index af94a021..00000000 --- a/webapp/src/app/api/model/publicationYear1.ts +++ /dev/null @@ -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 year this work was published. - */ -export interface PublicationYear1 { -} - diff --git a/webapp/src/app/api/model/qualifierName.ts b/webapp/src/app/api/model/qualifierName.ts deleted file mode 100644 index 2f872d7c..00000000 --- a/webapp/src/app/api/model/qualifierName.ts +++ /dev/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 QualifierName { -} - diff --git a/webapp/src/app/api/model/qualifierUi.ts b/webapp/src/app/api/model/qualifierUi.ts deleted file mode 100644 index 0a4e5284..00000000 --- a/webapp/src/app/api/model/qualifierUi.ts +++ /dev/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 QualifierUi { -} - diff --git a/webapp/src/app/api/model/rawAffiliationStrings.ts b/webapp/src/app/api/model/rawAffiliationStrings.ts deleted file mode 100644 index c5132e5a..00000000 --- a/webapp/src/app/api/model/rawAffiliationStrings.ts +++ /dev/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 RawAffiliationStrings { -} - diff --git a/webapp/src/app/api/model/rawAuthorName.ts b/webapp/src/app/api/model/rawAuthorName.ts deleted file mode 100644 index ff388ea4..00000000 --- a/webapp/src/app/api/model/rawAuthorName.ts +++ /dev/null @@ -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. - */ - - -/** - * Author name as it appears in the work - */ -export interface RawAuthorName { -} - diff --git a/webapp/src/app/api/model/referencedWorks.ts b/webapp/src/app/api/model/referencedWorks.ts deleted file mode 100644 index 58779843..00000000 --- a/webapp/src/app/api/model/referencedWorks.ts +++ /dev/null @@ -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. - */ - - -/** - * OpenAlex IDs for works that this work cites. - */ -export interface ReferencedWorks { -} - diff --git a/webapp/src/app/api/model/referencedWorksCount.ts b/webapp/src/app/api/model/referencedWorksCount.ts deleted file mode 100644 index 40276c37..00000000 --- a/webapp/src/app/api/model/referencedWorksCount.ts +++ /dev/null @@ -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 works that this work cites. - */ -export interface ReferencedWorksCount { -} - diff --git a/webapp/src/app/api/model/relatedWorks.ts b/webapp/src/app/api/model/relatedWorks.ts deleted file mode 100644 index 77939aa1..00000000 --- a/webapp/src/app/api/model/relatedWorks.ts +++ /dev/null @@ -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. - */ - - -/** - * OpenAlex IDs for works related to this work (computed algorithmically). - */ -export interface RelatedWorks { -} - diff --git a/webapp/src/app/api/model/ror.ts b/webapp/src/app/api/model/ror.ts deleted file mode 100644 index fe7b0be5..00000000 --- a/webapp/src/app/api/model/ror.ts +++ /dev/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 Ror { -} - diff --git a/webapp/src/app/api/model/score.ts b/webapp/src/app/api/model/score.ts index 65208c6d..fac39735 100644 --- a/webapp/src/app/api/model/score.ts +++ b/webapp/src/app/api/model/score.ts @@ -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). diff --git a/webapp/src/app/api/model/sustainableDevelopmentGoals.ts b/webapp/src/app/api/model/sustainableDevelopmentGoals.ts deleted file mode 100644 index 093a8ec8..00000000 --- a/webapp/src/app/api/model/sustainableDevelopmentGoals.ts +++ /dev/null @@ -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. - */ - - -/** - * UN Sustainable Development Goals relevant to this work, with prediction scores. - */ -export interface SustainableDevelopmentGoals { -} - diff --git a/webapp/src/app/api/model/title.ts b/webapp/src/app/api/model/title.ts deleted file mode 100644 index ab12865a..00000000 --- a/webapp/src/app/api/model/title.ts +++ /dev/null @@ -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 title of this work. - */ -export interface Title { -} - diff --git a/webapp/src/app/api/model/topics.ts b/webapp/src/app/api/model/topics.ts deleted file mode 100644 index e4547ca1..00000000 --- a/webapp/src/app/api/model/topics.ts +++ /dev/null @@ -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 up to 3 Topics for this work, each with a relevance score. - */ -export interface Topics { -} - diff --git a/webapp/src/app/api/model/type.ts b/webapp/src/app/api/model/type.ts deleted file mode 100644 index 77593c2b..00000000 --- a/webapp/src/app/api/model/type.ts +++ /dev/null @@ -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 publication type. Can be repeated. - */ -export interface Type { -} - diff --git a/webapp/src/app/api/model/type1.ts b/webapp/src/app/api/model/type1.ts deleted file mode 100644 index 9f6d7d9a..00000000 --- a/webapp/src/app/api/model/type1.ts +++ /dev/null @@ -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 [institution type](/api-reference/institution-types) - */ -export interface Type1 { -} - diff --git a/webapp/src/app/api/model/type2.ts b/webapp/src/app/api/model/type2.ts deleted file mode 100644 index 254e9ebd..00000000 --- a/webapp/src/app/api/model/type2.ts +++ /dev/null @@ -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 [source type](/api-reference/source-types) - */ -export interface Type2 { -} - diff --git a/webapp/src/app/api/model/type3.ts b/webapp/src/app/api/model/type3.ts deleted file mode 100644 index 9c8d4480..00000000 --- a/webapp/src/app/api/model/type3.ts +++ /dev/null @@ -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 type of the work. Common values: `article`, `book`, `dataset`, `preprint`, `dissertation`, `book-chapter`. - */ -export interface Type3 { -} - diff --git a/webapp/src/app/api/model/updatedDate.ts b/webapp/src/app/api/model/updatedDate.ts deleted file mode 100644 index edf635e9..00000000 --- a/webapp/src/app/api/model/updatedDate.ts +++ /dev/null @@ -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 last updated (ISO 8601 datetime). - */ -export interface UpdatedDate { -} - diff --git a/webapp/src/app/api/model/validationError.ts b/webapp/src/app/api/model/validationError.ts index f9187b28..bdbd57ad 100644 --- a/webapp/src/app/api/model/validationError.ts +++ b/webapp/src/app/api/model/validationError.ts @@ -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). diff --git a/webapp/src/app/api/model/validationErrorLocInner.ts b/webapp/src/app/api/model/validationErrorLocInner.ts index 18e001f5..d248a9b7 100644 --- a/webapp/src/app/api/model/validationErrorLocInner.ts +++ b/webapp/src/app/api/model/validationErrorLocInner.ts @@ -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). diff --git a/webapp/src/app/api/model/value.ts b/webapp/src/app/api/model/value.ts index f11604e9..a9fc79ba 100644 --- a/webapp/src/app/api/model/value.ts +++ b/webapp/src/app/api/model/value.ts @@ -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). diff --git a/webapp/src/app/api/model/version.ts b/webapp/src/app/api/model/version.ts deleted file mode 100644 index f8a6908c..00000000 --- a/webapp/src/app/api/model/version.ts +++ /dev/null @@ -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. - */ - - -/** - * Version of the work at this location - */ -export interface Version { -} - diff --git a/webapp/src/app/api/model/volume.ts b/webapp/src/app/api/model/volume.ts deleted file mode 100644 index e577dd13..00000000 --- a/webapp/src/app/api/model/volume.ts +++ /dev/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 Volume { -} - diff --git a/webapp/src/app/api/model/work.ts b/webapp/src/app/api/model/work.ts index 7cffcdbb..07d94a1c 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -1,95 +1,71 @@ /** * 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 { ContentUrl } from './contentUrl'; -import { PublicationYear1 } from './publicationYear1'; -import { IndexedIn } from './indexedIn'; -import { Type3 } from './type3'; -import { Keywords } from './keywords'; -import { UpdatedDate } from './updatedDate'; -import { AbstractInvertedIndex } from './abstractInvertedIndex'; -import { ReferencedWorksCount } from './referencedWorksCount'; -import { Language1 } from './language1'; -import { WorkBestOaLocation } from './workBestOaLocation'; -import { WorkOpenAccess } from './workOpenAccess'; -import { Id1 } from './id1'; -import { DisplayName1 } from './displayName1'; -import { WorkHasContent } from './workHasContent'; -import { WorkPrimaryTopic } from './workPrimaryTopic'; -import { PublicationDate } from './publicationDate'; -import { Topics } from './topics'; +import { DehydratedFunder } from './dehydratedFunder'; +import { Authorship } from './authorship'; +import { OpenAccess } from './openAccess'; import { WorkIds } from './workIds'; -import { IsParatext } from './isParatext'; -import { Locations } from './locations'; -import { CitedByCount } from './citedByCount'; -import { Mesh } from './mesh'; -import { SustainableDevelopmentGoals } from './sustainableDevelopmentGoals'; -import { Title } from './title'; -import { Authorships } from './authorships'; -import { IsRetracted } from './isRetracted'; -import { CountsByYear } from './countsByYear'; -import { ReferencedWorks } from './referencedWorks'; -import { Awards } from './awards'; -import { Doi1 } from './doi1'; +import { WorkSustainableDevelopmentGoalsInner } from './workSustainableDevelopmentGoalsInner'; +import { WorkTopic } from './workTopic'; +import { WorkCountsByYearInner } from './workCountsByYearInner'; +import { WorkKeyword } from './workKeyword'; import { WorkCitationNormalizedPercentile } from './workCitationNormalizedPercentile'; +import { Award } from './award'; import { Fwci } from './fwci'; -import { CreatedDate } from './createdDate'; -import { Funders } from './funders'; -import { RelatedWorks } from './relatedWorks'; +import { WorkMeshInner } from './workMeshInner'; import { WorkCitedByPercentileYear } from './workCitedByPercentileYear'; +import { WorkHasContent } from './workHasContent'; +import { Location } from './location'; import { WorkBiblio } from './workBiblio'; -import { WorkPrimaryLocation } from './workPrimaryLocation'; /** * A scholarly document (article, book, dataset, thesis, etc.) */ export interface Work { - id?: Id1; - doi?: Doi1; - title?: Title; - display_name?: DisplayName1; - publication_year?: PublicationYear1; - publication_date?: PublicationDate; - type?: Type3; - language?: Language1; - cited_by_count?: CitedByCount; - is_retracted?: IsRetracted; - is_paratext?: IsParatext; - primary_location?: WorkPrimaryLocation; - locations?: Locations; - best_oa_location?: WorkBestOaLocation; - open_access?: WorkOpenAccess; - authorships?: Authorships; - ids?: WorkIds; - biblio?: WorkBiblio; - abstract_inverted_index?: AbstractInvertedIndex; - referenced_works?: ReferencedWorks; - referenced_works_count?: ReferencedWorksCount; - related_works?: RelatedWorks; - topics?: Topics; - primary_topic?: WorkPrimaryTopic; - keywords?: Keywords; - funders?: Funders; - awards?: Awards; - fwci?: Fwci; - citation_normalized_percentile?: WorkCitationNormalizedPercentile; - cited_by_percentile_year?: WorkCitedByPercentileYear; - counts_by_year?: CountsByYear; - sustainable_development_goals?: SustainableDevelopmentGoals; - mesh?: Mesh; - indexed_in?: IndexedIn; - has_content?: WorkHasContent; - content_url?: ContentUrl; - created_date?: CreatedDate; - updated_date?: UpdatedDate; + id?: string | null; + doi?: string | null; + title?: string | null; + display_name?: string | null; + publication_year?: number | null; + publication_date?: string | null; + type?: string | null; + language?: string | null; + cited_by_count?: number | null; + is_retracted?: boolean | null; + is_paratext?: boolean | null; + primary_location?: Location | null; + locations?: Array | null; + best_oa_location?: Location | null; + open_access?: OpenAccess | null; + authorships?: Array | null; + ids?: WorkIds | null; + biblio?: WorkBiblio | null; + abstract_inverted_index?: object | null; + referenced_works?: Array | null; + referenced_works_count?: number | null; + related_works?: Array | null; + topics?: Array | null; + primary_topic?: WorkTopic | null; + keywords?: Array | null; + funders?: Array | null; + awards?: Array | null; + fwci?: Fwci | null; + citation_normalized_percentile?: WorkCitationNormalizedPercentile | null; + cited_by_percentile_year?: WorkCitedByPercentileYear | null; + counts_by_year?: Array | null; + sustainable_development_goals?: Array | null; + mesh?: Array | null; + indexed_in?: Array | null; + has_content?: WorkHasContent | null; + content_url?: string | null; + created_date?: string | null; + updated_date?: string | null; } diff --git a/webapp/src/app/api/model/workBestOaLocation.ts b/webapp/src/app/api/model/workBestOaLocation.ts deleted file mode 100644 index cef33f8a..00000000 --- a/webapp/src/app/api/model/workBestOaLocation.ts +++ /dev/null @@ -1,38 +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 { 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 { Location } from './location'; - - -/** - * A Location object with the best available open access location for this work. - */ -export interface WorkBestOaLocation { - 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; -} - diff --git a/webapp/src/app/api/model/workBiblio.ts b/webapp/src/app/api/model/workBiblio.ts index 979f3a4d..f6d7079b 100644 --- a/webapp/src/app/api/model/workBiblio.ts +++ b/webapp/src/app/api/model/workBiblio.ts @@ -1,24 +1,21 @@ /** * 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 { FirstPage } from './firstPage'; -import { Issue } from './issue'; -import { Volume } from './volume'; -import { LastPage } from './lastPage'; +/** + * Bibliographic info: `volume`, `issue`, `first_page`, `last_page`. + */ export interface WorkBiblio { - volume?: Volume; - issue?: Issue; - first_page?: FirstPage; - last_page?: LastPage; + volume?: string | null; + issue?: string | null; + first_page?: string | null; + last_page?: string | null; } diff --git a/webapp/src/app/api/model/workCitationNormalizedPercentile.ts b/webapp/src/app/api/model/workCitationNormalizedPercentile.ts index 69eb0ff5..a587ddf6 100644 --- a/webapp/src/app/api/model/workCitationNormalizedPercentile.ts +++ b/webapp/src/app/api/model/workCitationNormalizedPercentile.ts @@ -1,22 +1,21 @@ /** * 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 { IsInTop1Percent } from './isInTop1Percent'; import { Value } from './value'; -import { IsInTop10Percent } from './isInTop10Percent'; +/** + * Percentile of citation count normalized by work type, year, and subfield. Includes `value`, `is_in_top_1_percent`, `is_in_top_10_percent`. + */ export interface WorkCitationNormalizedPercentile { - value?: Value; - is_in_top_1_percent?: IsInTop1Percent; - is_in_top_10_percent?: IsInTop10Percent; + value?: Value | null; + is_in_top_1_percent?: boolean | null; + is_in_top_10_percent?: boolean | null; } diff --git a/webapp/src/app/api/model/workCitedByPercentileYear.ts b/webapp/src/app/api/model/workCitedByPercentileYear.ts index a6e1d5e7..5257eb3b 100644 --- a/webapp/src/app/api/model/workCitedByPercentileYear.ts +++ b/webapp/src/app/api/model/workCitedByPercentileYear.ts @@ -1,20 +1,19 @@ /** * 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 { Min } from './min'; -import { Max } from './max'; +/** + * Percentile rank compared to other works published in the same year. Contains `min` and `max`. + */ export interface WorkCitedByPercentileYear { - min?: Min; - max?: Max; + min?: number | null; + max?: number | null; } diff --git a/webapp/src/app/api/model/workCountsByYearInner.ts b/webapp/src/app/api/model/workCountsByYearInner.ts index eb088867..76d97d77 100644 --- a/webapp/src/app/api/model/workCountsByYearInner.ts +++ b/webapp/src/app/api/model/workCountsByYearInner.ts @@ -1,23 +1,19 @@ /** * 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 { CitedByCount1 } from './citedByCount1'; -import { Year } from './year'; /** * WorkCountsByYearInner */ export interface WorkCountsByYearInner { - year?: Year; - cited_by_count?: CitedByCount1; + year?: number | null; + cited_by_count?: number | null; } diff --git a/webapp/src/app/api/model/workHasContent.ts b/webapp/src/app/api/model/workHasContent.ts index fe9f7280..44fbe446 100644 --- a/webapp/src/app/api/model/workHasContent.ts +++ b/webapp/src/app/api/model/workHasContent.ts @@ -1,20 +1,19 @@ /** * 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 { Pdf } from './pdf'; -import { GrobidXml } from './grobidXml'; +/** + * Information about downloadable full-text content: + */ export interface WorkHasContent { - pdf?: Pdf; - grobid_xml?: GrobidXml; + pdf?: boolean | null; + grobid_xml?: boolean | null; } diff --git a/webapp/src/app/api/model/workIds.ts b/webapp/src/app/api/model/workIds.ts index 035ab07e..e8315250 100644 --- a/webapp/src/app/api/model/workIds.ts +++ b/webapp/src/app/api/model/workIds.ts @@ -1,26 +1,22 @@ /** * 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 { Mag } from './mag'; -import { Openalex } from './openalex'; -import { Pmcid } from './pmcid'; -import { Pmid } from './pmid'; -import { Doi } from './doi'; +/** + * External identifiers: `openalex`, `doi`, `mag`, `pmid`, `pmcid`. + */ export interface WorkIds { - openalex?: Openalex; - doi?: Doi; - mag?: Mag; - pmid?: Pmid; - pmcid?: Pmcid; + openalex?: string | null; + doi?: string | null; + mag?: number | null; + pmid?: string | null; + pmcid?: string | null; } diff --git a/webapp/src/app/api/model/workKeyword.ts b/webapp/src/app/api/model/workKeyword.ts index 8513c02b..c9c99afb 100644 --- a/webapp/src/app/api/model/workKeyword.ts +++ b/webapp/src/app/api/model/workKeyword.ts @@ -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). @@ -10,16 +8,14 @@ * Do not edit the class manually. */ import { Score } from './score'; -import { DisplayName } from './displayName'; -import { Id } from './id'; /** * WorkKeyword */ export interface WorkKeyword { - id?: Id; - display_name?: DisplayName; - score?: Score; + id?: string | null; + display_name?: string | null; + score?: Score | null; } diff --git a/webapp/src/app/api/model/workMeshInner.ts b/webapp/src/app/api/model/workMeshInner.ts index 21c26650..40633524 100644 --- a/webapp/src/app/api/model/workMeshInner.ts +++ b/webapp/src/app/api/model/workMeshInner.ts @@ -1,29 +1,22 @@ /** * 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 { QualifierName } from './qualifierName'; -import { QualifierUi } from './qualifierUi'; -import { DescriptorName } from './descriptorName'; -import { IsMajorTopic } from './isMajorTopic'; -import { DescriptorUi } from './descriptorUi'; /** * WorkMeshInner */ export interface WorkMeshInner { - descriptor_ui?: DescriptorUi; - descriptor_name?: DescriptorName; - qualifier_ui?: QualifierUi; - qualifier_name?: QualifierName; - is_major_topic?: IsMajorTopic; + descriptor_ui?: string | null; + descriptor_name?: string | null; + qualifier_ui?: string | null; + qualifier_name?: string | null; + is_major_topic?: boolean | null; } diff --git a/webapp/src/app/api/model/workOpenAccess.ts b/webapp/src/app/api/model/workOpenAccess.ts deleted file mode 100644 index 6e89d3a5..00000000 --- a/webapp/src/app/api/model/workOpenAccess.ts +++ /dev/null @@ -1,28 +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 { OpenAccess } from './openAccess'; -import { OaStatus } from './oaStatus'; -import { AnyRepositoryHasFulltext } from './anyRepositoryHasFulltext'; -import { OaUrl } from './oaUrl'; -import { IsOa2 } from './isOa2'; - - -/** - * Information about the access status of this work: - */ -export interface WorkOpenAccess { - is_oa?: IsOa2; - oa_status?: OaStatus; - oa_url?: OaUrl; - any_repository_has_fulltext?: AnyRepositoryHasFulltext; -} - diff --git a/webapp/src/app/api/model/workPage.ts b/webapp/src/app/api/model/workPage.ts index 39a87462..a355cca4 100644 --- a/webapp/src/app/api/model/workPage.ts +++ b/webapp/src/app/api/model/workPage.ts @@ -1,22 +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 { Work } from './work'; +import { WorkSummary } from './workSummary'; export interface WorkPage { /** * The works on this page. */ - elements?: Array; + elements?: Array; /** * The current page number. */ diff --git a/webapp/src/app/api/model/workPrimaryLocation.ts b/webapp/src/app/api/model/workPrimaryLocation.ts deleted file mode 100644 index ad1a9bf6..00000000 --- a/webapp/src/app/api/model/workPrimaryLocation.ts +++ /dev/null @@ -1,38 +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 { 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 { Location } from './location'; - - -/** - * A Location object with the primary location of this work (closest to the version of record). Includes `source`, `landing_page_url`, `pdf_url`, `is_oa`, `license`, and `version`. - */ -export interface WorkPrimaryLocation { - 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; -} - diff --git a/webapp/src/app/api/model/workPrimaryTopic.ts b/webapp/src/app/api/model/workPrimaryTopic.ts deleted file mode 100644 index a0ffb8cd..00000000 --- a/webapp/src/app/api/model/workPrimaryTopic.ts +++ /dev/null @@ -1,32 +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 { Score } from './score'; -import { WorkTopicDomain } from './workTopicDomain'; -import { WorkTopicSubfield } from './workTopicSubfield'; -import { DisplayName } from './displayName'; -import { WorkTopicField } from './workTopicField'; -import { WorkTopic } from './workTopic'; -import { Id } from './id'; - - -/** - * The top ranked Topic for this work, with `id`, `display_name`, `score`, and hierarchy (`subfield`, `field`, `domain`). - */ -export interface WorkPrimaryTopic { - id?: Id; - display_name?: DisplayName; - score?: Score; - subfield?: WorkTopicSubfield; - field?: WorkTopicField; - domain?: WorkTopicDomain; -} - diff --git a/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts b/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts index 4e89f69d..c9ecd00f 100644 --- a/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts +++ b/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts @@ -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). @@ -10,16 +8,14 @@ * Do not edit the class manually. */ import { Score } from './score'; -import { DisplayName } from './displayName'; -import { Id } from './id'; /** * WorkSustainableDevelopmentGoalsInner */ export interface WorkSustainableDevelopmentGoalsInner { - id?: Id; - display_name?: DisplayName; - score?: Score; + id?: string | null; + display_name?: string | null; + score?: Score | null; } diff --git a/webapp/src/app/api/model/workTopic.ts b/webapp/src/app/api/model/workTopic.ts index e35fbb63..925ead4f 100644 --- a/webapp/src/app/api/model/workTopic.ts +++ b/webapp/src/app/api/model/workTopic.ts @@ -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). @@ -12,20 +10,18 @@ import { Score } from './score'; import { WorkTopicDomain } from './workTopicDomain'; import { WorkTopicSubfield } from './workTopicSubfield'; -import { DisplayName } from './displayName'; import { WorkTopicField } from './workTopicField'; -import { Id } from './id'; /** * WorkTopic */ export interface WorkTopic { - id?: Id; - display_name?: DisplayName; - score?: Score; - subfield?: WorkTopicSubfield; - field?: WorkTopicField; - domain?: WorkTopicDomain; + id?: string | null; + display_name?: string | null; + score?: Score | null; + subfield?: WorkTopicSubfield | null; + field?: WorkTopicField | null; + domain?: WorkTopicDomain | null; } diff --git a/webapp/src/app/api/model/workTopicDomain.ts b/webapp/src/app/api/model/workTopicDomain.ts index 19c1c3f3..1a9879d4 100644 --- a/webapp/src/app/api/model/workTopicDomain.ts +++ b/webapp/src/app/api/model/workTopicDomain.ts @@ -1,20 +1,19 @@ /** * 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 { DisplayName } from './displayName'; -import { Id } from './id'; +/** + * The parent [domain](/api-reference/domains) + */ export interface WorkTopicDomain { - id?: Id; - display_name?: DisplayName; + id?: string | null; + display_name?: string | null; } diff --git a/webapp/src/app/api/model/workTopicField.ts b/webapp/src/app/api/model/workTopicField.ts index 13863cfa..1807cfc1 100644 --- a/webapp/src/app/api/model/workTopicField.ts +++ b/webapp/src/app/api/model/workTopicField.ts @@ -1,20 +1,19 @@ /** * 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 { DisplayName } from './displayName'; -import { Id } from './id'; +/** + * The parent [field](/api-reference/fields) + */ export interface WorkTopicField { - id?: Id; - display_name?: DisplayName; + id?: string | null; + display_name?: string | null; } diff --git a/webapp/src/app/api/model/workTopicSubfield.ts b/webapp/src/app/api/model/workTopicSubfield.ts index 78829a2b..b6e7278a 100644 --- a/webapp/src/app/api/model/workTopicSubfield.ts +++ b/webapp/src/app/api/model/workTopicSubfield.ts @@ -1,20 +1,19 @@ /** * 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 { DisplayName } from './displayName'; -import { Id } from './id'; +/** + * The parent [subfield](/api-reference/subfields) + */ export interface WorkTopicSubfield { - id?: Id; - display_name?: DisplayName; + id?: string | null; + display_name?: string | null; } diff --git a/webapp/src/app/api/model/year.ts b/webapp/src/app/api/model/year.ts deleted file mode 100644 index dbedb792..00000000 --- a/webapp/src/app/api/model/year.ts +++ /dev/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 Year { -} - diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 34c5c87d..87b8ee89 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -47,7 +47,7 @@ export const routes: Routes = [ resolve: { collaborationNetwork: collaborationNetworkResolver, }, - runGuardsAndResolvers: 'pathParamsChange', + runGuardsAndResolvers: 'paramsOrQueryParamsChange', }, { path: 'publications', diff --git a/webapp/src/app/modules/person-network-collaborators/person-network-collaborators.component.ts b/webapp/src/app/modules/person-network-collaborators/person-network-collaborators.component.ts index 820ea75b..7fc1e153 100644 --- a/webapp/src/app/modules/person-network-collaborators/person-network-collaborators.component.ts +++ b/webapp/src/app/modules/person-network-collaborators/person-network-collaborators.component.ts @@ -77,48 +77,53 @@ export class PersonNetworkCollaboratorsComponent implements AfterViewInit { // key: work id, value: work const works: Record = {}; - collaborationNetwork.works.forEach((work) => { - works[work.raw_work_id] = { - id: work.raw_work_id, - title: work.display_title, - }; - }); + const allWorks: Record = collaborationNetwork.nodes + .filter((node) => node.category === 'work') + .map((node) => ({ + id: node.raw_id, + title: node.display_name, + })) + .reduce( + (acc, work) => { + acc[work.id] = work; + return acc; + }, + {} as Record, + ); + + const allAuthors: Record = collaborationNetwork.nodes + .filter((node) => node.category === 'author') + .map((node) => ({ + id: node.raw_id, + name: node.display_name, + category: node.category, + works: [], + })) + .reduce( + (acc, author) => { + acc[author.id] = author; + return acc; + }, + {} as Record, + ); collaborationNetwork.edges.forEach((edge) => { - edge.raw_work_ids.forEach((work_id) => { - if (!worksByCollaborator[edge.raw_source_person_id]) { - worksByCollaborator[edge.raw_source_person_id] = new Set(); - } - worksByCollaborator[edge.raw_source_person_id].add(work_id); - if (!worksByCollaborator[edge.raw_target_person_id]) { - worksByCollaborator[edge.raw_target_person_id] = new Set(); - } - worksByCollaborator[edge.raw_target_person_id].add(work_id); - }); + if ( + edge.raw_source_id.toUpperCase().startsWith('A') && + edge.raw_target_id.toUpperCase().startsWith('W') + ) { + allAuthors[edge.raw_source_id]?.works.push( + allWorks[edge.raw_target_id], + ); + } }); return new MatTableDataSource( - collaborationNetwork.nodes.map((node) => { - let nodeWorks: Work[] = Array.from( - worksByCollaborator[node.raw_person_id] || [], - ).map((work_id: string): Work => works[work_id]); - - if (node.raw_person_id === collaborationNetwork.raw_person_id) { - return { - id: node.raw_person_id, - name: node.display_name + ' (Autor)', - works: nodeWorks, - category: 'author', - }; - } - - return { - id: node.raw_person_id, - name: node.display_name, - works: nodeWorks, - category: 'collaborator', - }; - }), + Object.values(allAuthors).filter( + (author) => + author.works.length > 0 && + author.id !== collaborationNetwork.raw_person_id, + ), ); } } diff --git a/webapp/src/app/modules/person-network-publications/person-network-publications.component.ts b/webapp/src/app/modules/person-network-publications/person-network-publications.component.ts index df095f24..14d9a6a8 100644 --- a/webapp/src/app/modules/person-network-publications/person-network-publications.component.ts +++ b/webapp/src/app/modules/person-network-publications/person-network-publications.component.ts @@ -71,40 +71,52 @@ export class PersonNetworkPublicationsComponent implements AfterViewInit { buildWorksDataSource( collaborationNetwork: CollaborationNetwork, ): MatTableDataSource { - const workContributors: Record> = {}; + const allWorks: Record = collaborationNetwork.nodes + .filter((node) => node.category === 'work') + .map((node) => ({ + id: node.raw_id, + title: node.display_name, + collaborators: [], + })) + .reduce( + (acc, work) => { + acc[work.id] = work; + return acc; + }, + {} as Record, + ); + + const allAuthors: Record = collaborationNetwork.nodes + .filter((node) => node.category === 'author') + .map((node) => ({ + id: node.raw_id, + name: node.display_name, + category: + node.raw_id === collaborationNetwork.raw_person_id + ? 'author' + : 'collaborator', + })) + .reduce( + (acc, person) => { + acc[person.id] = person; + return acc; + }, + {} as Record, + ); + collaborationNetwork.edges.forEach((edge) => { - edge.raw_work_ids.forEach((workId) => { - if (!workContributors[workId]) { - workContributors[workId] = new Set(); - } - workContributors[workId].add(edge.raw_source_person_id); - workContributors[workId].add(edge.raw_target_person_id); - }); + if ( + edge.raw_source_id.toUpperCase().startsWith('A') && + edge.raw_target_id.toUpperCase().startsWith('W') + ) { + allWorks[edge.raw_target_id]?.collaborators.push( + allAuthors[edge.raw_source_id], + ); + } }); - const worksMap: Record = {}; - collaborationNetwork.works.forEach((work) => { - worksMap[work.raw_work_id] = { - id: work.raw_work_id, - title: work.display_title, - collaborators: [...workContributors[work.raw_work_id]].map( - (personId) => { - const node = collaborationNetwork.nodes.find( - (n) => n.raw_person_id === personId, - ); - return { - id: personId, - name: node ? node.display_name : 'Unknown Collaborator', - category: - personId === collaborationNetwork.raw_person_id - ? 'author' - : 'collaborator', - }; - }, - ), - }; - }); - - return new MatTableDataSource(Object.values(worksMap)); + return new MatTableDataSource( + Object.values(allWorks).filter((work) => work.collaborators.length > 0), + ); } } diff --git a/webapp/src/app/modules/person-network/person-network.component.html b/webapp/src/app/modules/person-network/person-network.component.html index cf991a8d..a8d42a2e 100644 --- a/webapp/src/app/modules/person-network/person-network.component.html +++ b/webapp/src/app/modules/person-network/person-network.component.html @@ -16,36 +16,62 @@
- - - Kollaborierende - - Publikationen - -
-
- - {{ - this.displayedTable() === "collaborators" - ? "Suche Kollaborierende nach Name oder ID" - : "Suche Publikationen nach Titel oder ID" - }} - - search - -
+
+
+ Zeitraum: + + + + +
+ + Minimale Anzahl von Kollaborationen + + + + + Kollaborierende + + Publikationen + + + {{ + this.displayedTable() === "collaborators" + ? "Suche Kollaborierende nach Name oder ID" + : "Suche Publikationen nach Titel oder ID" + }} + + search + +
+
diff --git a/webapp/src/app/modules/person-network/person-network.component.scss b/webapp/src/app/modules/person-network/person-network.component.scss index 6e2240f0..71a45b8a 100644 --- a/webapp/src/app/modules/person-network/person-network.component.scss +++ b/webapp/src/app/modules/person-network/person-network.component.scss @@ -71,4 +71,8 @@ .element-row.expanded { border-bottom-color: transparent; +} + +.network-filter-form { + } \ No newline at end of file diff --git a/webapp/src/app/modules/person-network/person-network.component.ts b/webapp/src/app/modules/person-network/person-network.component.ts index 8728fedf..3055260f 100644 --- a/webapp/src/app/modules/person-network/person-network.component.ts +++ b/webapp/src/app/modules/person-network/person-network.component.ts @@ -1,10 +1,13 @@ +import { toSignal } from '@angular/core/rxjs-interop'; import { AfterViewInit, Component, + computed, effect, OnInit, signal, ViewChild, + WritableSignal, } from '@angular/core'; import { ActivatedRoute, Router, RouterModule } from '@angular/router'; import type { EChartsCoreOption } from 'echarts/core'; @@ -22,13 +25,20 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { MatFormFieldModule } from '@angular/material/form-field'; -import { FormsModule } from '@angular/forms'; +import { + FormControl, + FormGroup, + FormsModule, + ReactiveFormsModule, +} from '@angular/forms'; import { MatInputModule } from '@angular/material/input'; +import { MatSliderModule } from '@angular/material/slider'; import { MatSort, MatSortModule } from '@angular/material/sort'; import { LiveAnnouncer } from '@angular/cdk/a11y'; import { CollaborationNetwork } from '../../api'; import { PersonNetworkCollaboratorsComponent } from '../person-network-collaborators/person-network-collaborators.component'; import { PersonNetworkPublicationsComponent } from '../person-network-publications/person-network-publications.component'; +import { debounceTime } from 'rxjs'; echarts.use([GridComponent, CanvasRenderer, GraphChart, TitleComponent]); type Collaborator = { @@ -61,6 +71,9 @@ type Works = { RouterModule, PersonNetworkCollaboratorsComponent, PersonNetworkPublicationsComponent, + MatSliderModule, + ReactiveFormsModule, + FormsModule, ], templateUrl: './person-network.component.html', styleUrl: './person-network.component.scss', @@ -72,17 +85,18 @@ export class PersonNetworkComponent implements OnInit, AfterViewInit { displayedTable = signal<'collaborators' | 'publications'>('collaborators'); searchTerm = signal(''); - refreshQueryParams = effect(() => { - this.router.navigate([], { - relativeTo: this.activatedRoute, - queryParams: { - table: this.displayedTable(), - search_term: this.searchTerm(), - }, - replaceUrl: true, - }); + minimumCollaborations: WritableSignal = signal(5); + + filterForm = new FormGroup({ + searchTerm: new FormControl(''), + startYear: new FormControl(2000), + endYear: new FormControl(2025), + minimumCollaborations: new FormControl(1), + displayedTable: new FormControl('collaborators'), }); + formatYearLabel = (value: number) => `${value}`; + collaboratorsDataSource: MatTableDataSource = new MatTableDataSource(); worksDataSource: MatTableDataSource = new MatTableDataSource(); @@ -115,6 +129,35 @@ export class PersonNetworkComponent implements OnInit, AfterViewInit { this.collaborationNetwork = collaborationNetwork; console.log('Collaboration Network:', this.collaborationNetwork); + this.filterForm.valueChanges + .pipe(debounceTime(300)) + .subscribe((value) => { + this.router.navigate([], { + relativeTo: this.activatedRoute, + queryParams: { + table: value.displayedTable, + search_term: value.searchTerm, + start_year: value.startYear, + end_year: value.endYear, + }, + // replaceUrl: true, + }); + }); + + const currentParams = this.activatedRoute.snapshot.queryParams; + this.filterForm + .get('startYear')! + .setValue( + Number(currentParams['start_year']) || + this.collaborationNetwork.filter_information.min_possible_year, + ); + this.filterForm + .get('endYear')! + .setValue( + Number(currentParams['end_year']) || + this.collaborationNetwork.filter_information.max_possible_year, + ); + this.activatedRoute.queryParams.subscribe((params) => { const table = params['table']; if (table === 'collaborators' || table === 'publications') { @@ -126,45 +169,75 @@ export class PersonNetworkComponent implements OnInit, AfterViewInit { const searchTerm = params['search_term'] || ''; this.searchTerm.set(searchTerm); }); - }); + this.updateGraphOptions(); + }); + } + + private updateGraphOptions(): void { const datas = [ { nodes: this.collaborationNetwork.nodes.map((node) => { + const category = (() => { + if (node.category === 'institution') { + return 'institution'; + } + if (node.category === 'work') { + return 'work'; + } + if (node.raw_id === this.collaborationNetwork.raw_person_id) { + return 'author'; + } + return 'collaborator'; + })(); + + if (category === 'work') { + return { + id: node.raw_id + '', + name: node.display_name, + category, + }; + } return { - id: node.raw_person_id + '', + id: node.raw_id + '', name: node.display_name, - category: - node.raw_person_id === this.collaborationNetwork.raw_person_id - ? 'author' - : 'collaborator', + category, + label: { show: true }, }; }), - edges: this.collaborationNetwork.edges.map((edge) => { - return [ - edge.raw_source_person_id + '', - edge.raw_target_person_id + '', - ]; + links: this.collaborationNetwork.edges.map((edge) => { + return [edge.raw_source_id + '', edge.raw_target_id + '']; }), categories: [ { name: 'author', + label: { show: true }, }, { name: 'collaborator', }, + { + name: 'institution', + }, + { + name: 'work', + }, ], + emphasis: { + label: { + show: true, + }, + }, }, ]; this.authorDisplayName = this.collaborationNetwork.nodes.find( - (node) => - node.raw_person_id === this.collaborationNetwork.raw_person_id, + (node) => node.raw_id === this.collaborationNetwork.raw_person_id, )?.display_name || 'Unknown Author'; this.options = { - series: datas.map((item, idx) => { + series: datas.map((item) => { return { name: this.authorDisplayName, type: 'graph', @@ -173,18 +246,17 @@ export class PersonNetworkComponent implements OnInit, AfterViewInit { animation: false, data: item.nodes, roam: true, - label: { - show: true, - }, legend: [ { data: item.categories.map((c) => c.name), }, ], force: { - repulsion: 1000, + repulsion: 10000, + edgeLength: 100, + gravity: 0.1, }, - links: item.edges.map((e) => { + links: item.links.map((e) => { return { source: e[0] + '', target: e[1] + '', diff --git a/webapp/src/app/modules/person-publications/person-publications.component.html b/webapp/src/app/modules/person-publications/person-publications.component.html index ba8fba80..d25adfc0 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.html +++ b/webapp/src/app/modules/person-publications/person-publications.component.html @@ -118,7 +118,7 @@ track topic ) { - {{ topic.display_name }} + {{ topic }} } @empty { - diff --git a/webapp/src/app/modules/person-publications/person-publications.component.ts b/webapp/src/app/modules/person-publications/person-publications.component.ts index a069b843..71cb18dc 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.ts +++ b/webapp/src/app/modules/person-publications/person-publications.component.ts @@ -14,7 +14,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; -import { Work, WorksService } from '../../api'; +import { WorksService, WorkSummary } from '../../api'; import { PaginationService } from '../../shared/services/pagination.service'; import { createLoadError } from '../../shared/utils/errorHandler'; import { ChipComponent } from '../../shared/ui/chip/chip.component'; @@ -47,7 +47,7 @@ export class PersonPublicationsComponent implements OnInit { 'topics', 'citations', ]; - publications: Work[] = []; + publications: WorkSummary[] = []; total = 0; loading = false; authorId = ''; @@ -89,10 +89,10 @@ export class PersonPublicationsComponent implements OnInit { ]; constructor( - private route: ActivatedRoute, - private workService: WorksService, - public paginationService: PaginationService, - private snackBar: MatSnackBar, + private readonly route: ActivatedRoute, + private readonly workService: WorksService, + public readonly paginationService: PaginationService, + private readonly snackBar: MatSnackBar, ) {} ngOnInit(): void { @@ -109,7 +109,7 @@ export class PersonPublicationsComponent implements OnInit { this.loading = true; this.workService - .getAuthorWorks(this.authorId, pageIndex + 1, pageSize, this.filters()) + .getAuthorWorks(this.authorId, pageIndex + 1, pageSize) .subscribe({ next: (page) => { this.publications = page.elements ?? []; diff --git a/webapp/src/app/resolvers/collaboration-network.resolver.ts b/webapp/src/app/resolvers/collaboration-network.resolver.ts index 1842e46e..ac1b257d 100644 --- a/webapp/src/app/resolvers/collaboration-network.resolver.ts +++ b/webapp/src/app/resolvers/collaboration-network.resolver.ts @@ -1,6 +1,10 @@ import { ResolveFn } from '@angular/router'; import { inject } from '@angular/core'; -import { CollaborationNetwork, PersonNetworkService } from '../api'; +import { + CollaborationNetwork, + FilterProperties, + PersonNetworkService, +} from '../api'; export const collaborationNetworkResolver: ResolveFn = ( route, @@ -10,6 +14,19 @@ export const collaborationNetworkResolver: ResolveFn = ( if (!rawAuthorId) { throw new Error('Author ID is required to resolve collaboration network'); } + const startYear = route.queryParamMap.get('start_year'); + const endYear = route.queryParamMap.get('end_year'); + console.log('Resolving collaboration network for author ID:', rawAuthorId); - return inject(PersonNetworkService).getCollaborationNetwork(rawAuthorId); + const filterProperties: FilterProperties = { + start_year: startYear ? Number.parseInt(startYear, 10) : null, + end_year: endYear ? Number.parseInt(endYear, 10) : null, + allowed_institutions: null, + }; + console.log('Using filter properties:', filterProperties); + + return inject(PersonNetworkService).getCollaborationNetwork( + rawAuthorId, + filterProperties, + ); }; diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts index e9a6af37..37e47874 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts @@ -22,7 +22,18 @@ export class AppMenuComponent { navItems = [ { label: 'Dashboard', icon: 'dashboard', route: '/items', disabled: false }, { label: 'Personen', icon: 'groups', route: '/person/0', disabled: false }, - { label: "Arman Arzani", icon: 'person', route: '/person/A5007170803', disabled: false }, + { + label: 'Arman Arzani', + icon: 'person', + route: '/person/A5093075883', + disabled: false, + }, + { + label: 'Marcus Handte', + icon: 'person', + route: '/person/A5007170803', + disabled: false, + }, ]; constructor(public credentialService: CredentialService) {}